diff --git a/.angular-cli.json b/.angular-cli.json
new file mode 100644
index 0000000000000000000000000000000000000000..205b6e9a46b5a386c709670508226f8bb1df0f0c
--- /dev/null
+++ b/.angular-cli.json
@@ -0,0 +1,26 @@
+{
+  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+  "project": {
+    "name": "maarchCourrier"
+  },
+  "apps": [
+    {
+      "root": "apps/maarch_entreprise/js/angular",
+      "outDir": "dist",
+      "assets": [
+        "assets",
+        "favicon.ico"
+      ],
+      "index": "index.html",
+      "main": "main.ts",
+      "prefix": "app",
+      "styles": [
+      ],
+      "scripts": []
+    }
+  ],
+  "defaults": {
+    "styleExt": "css",
+    "component": {}
+  }
+}
diff --git a/apps/maarch_entreprise/Views/action-administration.component.html b/apps/maarch_entreprise/Views/action-administration.component.html
index 0f9f6af9cd30d5220f5a5f9627ad04eb01ac9afb..09db6147224530c0d5538607a0250efdabf420ec 100755
--- a/apps/maarch_entreprise/Views/action-administration.component.html
+++ b/apps/maarch_entreprise/Views/action-administration.component.html
@@ -10,37 +10,19 @@
             <small [class.hide-for-mobile]="mobileQuery.matches">{{action.label_action}}</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration/actions">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
-            <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
-            </mat-nav-list>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <div *ngIf="action.is_system == true" class="alert alert-danger" role="alert">
                     <b>{{lang.isSytemAction}} !</b> {{lang.doNotModifyUnlessExpert}}</div>
                 <form class="form-horizontal" (ngSubmit)="onSubmit()" #actionsFormUp="ngForm">
diff --git a/apps/maarch_entreprise/Views/actions-administration.component.html b/apps/maarch_entreprise/Views/actions-administration.component.html
index 48e5dcca877efa46765de9649535f9f35d88ef6e..cbdacd547bd3a88b2b97995afcbd9d9bcc708b28 100755
--- a/apps/maarch_entreprise/Views/actions-administration.component.html
+++ b/apps/maarch_entreprise/Views/actions-administration.component.html
@@ -7,30 +7,14 @@
             <small [class.hide-for-mobile]="mobileQuery.matches">{{actions.length}} {{lang.actions}}</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
             <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
+                <h3 mat-subheader>{{lang.actions}}</h3>
                 <a mat-list-item routerLink="/administration/actions/new">
                     <mat-icon color="primary" mat-list-icon class="fa fa-plus"></mat-icon>
                     <p mat-line>
@@ -38,12 +22,14 @@
                     </p>
                 </a>
             </mat-nav-list>
+            <mat-divider></mat-divider>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <div class="row">
                     <div class="col-md-6 col-xs-6">
                         <mat-form-field>
@@ -57,23 +43,23 @@
                 </div>
                 <mat-table #table [dataSource]="dataSource" matSort matSortActive="id" matSortDirection="asc">
                     <ng-container matColumnDef="id">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.id}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/actions/{{element.id}}" style="cursor:pointer;"> {{element.id}} </mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.id}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches"> {{element.id}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="label_action">
                         <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.actionName}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/actions/{{element.id}}" style="cursor:pointer;"> {{element.label_action}} </mat-cell>
+                        <mat-cell *matCellDef="let element"> {{element.label_action}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="history">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.actionHistory}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/actions/{{element.id}}" style="cursor:pointer;">
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.actionHistory}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches">
                             <span *ngIf="element.history == 'N'"> {{lang.no}} </span>
                             <span *ngIf="element.history == 'Y'"> {{lang.yes}} </span>
                         </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="is_folder_action">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.isFolderAction}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/actions/{{element.id}}" style="cursor:pointer;">
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.isFolderAction}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches">
                             <span *ngIf="element.is_folder_action == 'N'"> {{lang.no}} </span>
                             <span *ngIf="element.is_folder_action == 'Y'"> {{lang.yes}} </span>
                         </mat-cell>
@@ -81,13 +67,13 @@
                     <ng-container matColumnDef="actions">
                         <mat-header-cell *matHeaderCellDef></mat-header-cell>
                         <mat-cell *matCellDef="let element" style="text-align:right">
-                            <button mat-icon-button color="warn" [disabled]="element.is_system == 'Y'" matTooltip="{{lang.delete}}" (click)="deleteAction(element)">
+                            <button mat-icon-button color="warn" [disabled]="element.is_system == 'Y'" matTooltip="{{lang.delete}}" (click)="$event.stopPropagation();deleteAction(element)">
                                 <mat-icon class="fa fa-trash fa-2x" aria-hidden="true"></mat-icon>
                             </button>
                         </mat-cell>
                     </ng-container>
                     <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
-                    <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
+                    <mat-row *matRowDef="let row; columns: displayedColumns;" routerLink="/administration/actions/{{row.id}}" style="cursor:pointer;" matTooltip="{{lang.view}}"></mat-row>
                 </mat-table>
             </mat-card>
         </mat-sidenav-content>
diff --git a/apps/maarch_entreprise/Views/administration.component.html b/apps/maarch_entreprise/Views/administration.component.html
index 2863711c8949eb1e6f55d72ec8dbbd251af396b7..2c486fea12a0112ea13d492ab7ec79a51b0691e7 100755
--- a/apps/maarch_entreprise/Views/administration.component.html
+++ b/apps/maarch_entreprise/Views/administration.component.html
@@ -10,31 +10,22 @@
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
-            <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
-            </mat-nav-list>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <div class="row adminArea">
                     <div class="col-md-6 adminArea_1">
                         <div style="font-size: 20px;
                         font-weight: bolder;
                         opacity: 0.09;
                         text-align: center">ORGANISATION</div>
-                        <button class="col-md-4 col-xs-6" mat-button color="primary" matTooltip="{{modService.comment}}" *ngFor="let modService of organisationServices"
+                        <button style="white-space:inherit;height: 130px;" class="col-md-4 col-xs-6" mat-button color="primary" matTooltip="{{modService.comment}}" *ngFor="let modService of organisationServices"
                             (click)="goToSpecifiedAdministration(modService)">
                             <i class="{{modService.style}} fa-4x"></i>
                             <br/>{{modService.name}}</button>
@@ -45,7 +36,7 @@
                         font-weight: bolder;
                         opacity: 0.09;
                         text-align: center">PRODUCTION</div>
-                        <button class="col-md-4 col-xs-6" mat-button color="primary" matTooltip="{{modService.comment}}" *ngFor="let modService of productionServices"
+                        <button style="white-space:inherit;height: 130px;" class="col-md-4 col-xs-6" mat-button color="primary" matTooltip="{{modService.comment}}" *ngFor="let modService of productionServices"
                             (click)="goToSpecifiedAdministration(modService)">
                             <i class="{{modService.style}} fa-4x"></i>
                             <br/>{{modService.name}}</button>
@@ -55,7 +46,7 @@
                         font-weight: bolder;
                         opacity: 0.09;
                         text-align: center">CLASSEMENT</div>
-                        <button class="col-md-4 col-xs-6" mat-button color="primary" matTooltip="{{modService.comment}}" *ngFor="let modService of classementServices"
+                        <button style="white-space:inherit;height: 130px;" class="col-md-4 col-xs-6" mat-button color="primary" matTooltip="{{modService.comment}}" *ngFor="let modService of classementServices"
                             (click)="goToSpecifiedAdministration(modService)">
                             <i class="{{modService.style}} fa-4x"></i>
                             <br/>{{modService.name}}</button>
@@ -66,7 +57,7 @@
                         font-weight: bolder;
                         opacity: 0.09;
                         text-align: center">SUPERVISION</div>
-                        <button class="col-md-4 col-xs-6" mat-button color="primary" matTooltip="{{modService.comment}}" *ngFor="let modService of supervisionServices"
+                        <button style="white-space:inherit;height: 130px;" class="col-md-4 col-xs-6" mat-button color="primary" matTooltip="{{modService.comment}}" *ngFor="let modService of supervisionServices"
                             (click)="goToSpecifiedAdministration(modService)">
                             <i class="{{modService.style}} fa-4x"></i>
                             <br/>{{modService.name}}</button>
diff --git a/apps/maarch_entreprise/Views/basket-administration-settings-modal.component.html b/apps/maarch_entreprise/Views/basket-administration-settings-modal.component.html
index 7e818b151b637935754f9abcd141508facbaf2fb..4a8f01c4e7e9f714f9eebd1da73fbfe97e21224f 100644
--- a/apps/maarch_entreprise/Views/basket-administration-settings-modal.component.html
+++ b/apps/maarch_entreprise/Views/basket-administration-settings-modal.component.html
@@ -20,7 +20,7 @@
                 </mat-option>
             </mat-select>
         </mat-form-field>
-        <mat-tab-group [(selectedIndex)]="selectedTabIndex_1">
+        <mat-tab-group>
             <mat-tab *ngIf="data.action.keyword == 'redirect'||data.action.keyword == 'indexing'">
                 <ng-template mat-tab-label *ngIf="data.action.keyword == 'redirect'">
                     {{lang.redirects}}
diff --git a/apps/maarch_entreprise/Views/basket-administration.component.html b/apps/maarch_entreprise/Views/basket-administration.component.html
index aac56013bcc3f84c8415b4a3c9be0f3046936455..db97952f1aedb33a30f30e72f3bf07d00652a010 100644
--- a/apps/maarch_entreprise/Views/basket-administration.component.html
+++ b/apps/maarch_entreprise/Views/basket-administration.component.html
@@ -14,36 +14,25 @@
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration/baskets">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
-            <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
-                <a mat-list-item *ngIf="!creationMode" (click)="linkGroup()">
+            <mat-nav-list *ngIf="!creationMode">
+                <h3 mat-subheader>{{lang.actions}}</h3>
+                <a mat-list-item (click)="linkGroup()">
                     <mat-icon color="primary" mat-list-icon class="fa fa-link"></mat-icon>
                     <p mat-line>
                         {{lang.linkGroup}}
                     </p>
                 </a>
             </mat-nav-list>
+            <mat-divider></mat-divider>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <mat-tab-group [(selectedIndex)]="selectedTabIndex_1">
                     <mat-tab label="{{lang.informations}}">
                         <form class="form-horizontal" (ngSubmit)="onSubmit()" #basketForm="ngForm">
@@ -54,7 +43,7 @@
                                 <input matInput *ngIf="!creationMode" name="identifier" placeholder="{{lang.id}}" title="{{lang.id}}" [(ngModel)]="basket.id"
                                     required disabled>
                             </mat-form-field>
-                            <div class="col-md-11 col-xs-11">
+                            <div class="col-md-11 col-xs-11" style="padding-left:0px;">
                                 <mat-form-field>
                                     <input matInput name="label" title="{{lang.label}}" placeholder="{{lang.label}}" [(ngModel)]="basket.basket_name" maxlength="255"
                                         [ngStyle]="{'color': basket.color}" required>
@@ -105,23 +94,29 @@
                             <mat-icon color="warn" class="fa fa-unlink" matTooltip="dissocier le groupe de la bannette" (click)="unlinkGroup(i)"></mat-icon>
                         </ng-template>
                         <div class="col-md-6">
-                            <mat-form-field>
-                                <mat-chip-list #chipList class="mat-chip-list-stacked">
-                                    <span *ngFor="let action of group.groupActions">
-                                        <mat-chip color="primary" [ngStyle]="{'font-weight': action.default_action_list == true ? 'bold' : ''}" style="cursor:pointer;margin:5px;border-radius:0px;display:flex;"
-                                            *ngIf="action.checked == true" selectable="true" removable="true" (remove)="unlinkAction(group,action)">
-                                            <mat-checkbox color="primary" [checked]="action.default_action_list == true" (click)="setDefaultAction(group,action)"></mat-checkbox>
-                                            &nbsp;
-                                            <span matTooltip="accéder aux paramètres" (click)="openSettings(group,action)">{{action.label_action}}</span>&nbsp;
-                                            <small *ngIf="action.default_action_list == true">({{lang.default}})</small>
-                                            <span style="flex: 1 1 auto;"></span>
-                                            <mat-icon matTooltip="{{lang.delete}}" matChipRemove color="warn" *ngIf="action.default_action_list != true" class="fa fa-times"></mat-icon>
-                                        </mat-chip>
-                                    </span>
-                                </mat-chip-list>
-                                <input placeholder="Action(s) choisie(s)" [matChipInputFor]="chipList" disabled />
+                            <mat-form-field style="margin-top:5px;">
+                                <mat-select id="actionPages" name="actionPages" placeholder="{{lang.resultPages}}" [(ngModel)]="group.result_page" (change)="updateResultPage(group)">
+                                    <mat-option *ngFor="let page of resultPages" [value]="page.id">
+                                        {{page.label}}
+                                    </mat-option>
+                                </mat-select>
                             </mat-form-field>
-
+                            <h5>Action(s) choisie(s)</h5>
+                            <mat-chip-list #chipList class="mat-chip-list-stacked">
+                                <span *ngFor="let action of group.groupActions">
+                                    <mat-chip color="primary" (click)="openSettings(group,action)" [ngStyle]="{'font-weight': action.default_action_list == true ? 'bold' : ''}"
+                                        style="cursor:pointer;margin:5px;border-radius:0px;display:flex;" *ngIf="action.checked == true"
+                                        selectable="true" removable="true" (remove)="unlinkAction(group,action)">
+                                        &nbsp;
+                                        <span matTooltip="accéder aux paramètres">{{action.label_action}}</span>&nbsp;
+                                        <small *ngIf="action.default_action_list == true">({{lang.default}})</small>
+                                        <span style="flex: 1 1 auto;"></span>
+                                        <button mat-raised-button [disabled]="action.default_action_list" (click)="$event.stopPropagation();setDefaultAction(group,action)">définir par défaut</button>
+                                        <mat-icon matTooltip="{{lang.delete}}" matChipRemove color="warn" *ngIf="action.default_action_list != true" class="fa fa-times"
+                                            (click)="$event.stopPropagation();"></mat-icon>
+                                    </mat-chip>
+                                </span>
+                            </mat-chip-list>
                         </div>
                         <div class="col-md-6">
                             <mat-accordion>
@@ -140,7 +135,7 @@
                                             <ng-container matColumnDef="label_action">
                                                 <mat-header-cell *matHeaderCellDef></mat-header-cell>
                                                 <mat-cell *matCellDef="let element" style="flex:6;">
-                                                    <mat-checkbox color="primary" (change)="addAction(group)" [(ngModel)]="element.checked">{{element.label_action}}</mat-checkbox>
+                                                    <mat-checkbox color="primary" [disabled]="element.default_action_list==true" (change)="addAction(group)" [(ngModel)]="element.checked">{{element.label_action}}</mat-checkbox>
                                                 </mat-cell>
                                             </ng-container>
                                             <ng-container matColumnDef="actions">
diff --git a/apps/maarch_entreprise/Views/baskets-administration.component.html b/apps/maarch_entreprise/Views/baskets-administration.component.html
index 3f80247f44e2eef7b504317e701f250c6a617a57..1e6f1817567d48093ac89f2477ea0f0daf02a7d3 100644
--- a/apps/maarch_entreprise/Views/baskets-administration.component.html
+++ b/apps/maarch_entreprise/Views/baskets-administration.component.html
@@ -11,23 +11,10 @@
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
             <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
+                <h3 mat-subheader>{{lang.actions}}</h3>
                 <a mat-list-item routerLink="/administration/baskets/new">
                     <mat-icon color="primary" mat-list-icon class="fa fa-plus"></mat-icon>
                     <p mat-line>
@@ -41,12 +28,14 @@
                     </p>
                 </a>
             </mat-nav-list>
+            <mat-divider></mat-divider>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <div class="row">
                     <div class="col-md-6 col-xs-6">
                         <mat-form-field>
@@ -60,27 +49,27 @@
                 </div>
                 <mat-table #table [dataSource]="dataSource" matSort matSortActive="basket_id" matSortDirection="asc">
                     <ng-container matColumnDef="basket_id">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.id}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/baskets/{{element.basket_id}}" style="cursor:pointer;"> {{element.basket_id}} </mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.id}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches"> {{element.basket_id}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="basket_name">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header >{{lang.label}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/baskets/{{element.basket_id}}" style="cursor:pointer;"> {{element.basket_name}} </mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.label}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element"> {{element.basket_name}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="basket_desc">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.description}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/baskets/{{element.basket_id}}" style="cursor:pointer;"> {{element.basket_desc}} </mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.description}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches"> {{element.basket_desc}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="actions">
                         <mat-header-cell *matHeaderCellDef></mat-header-cell>
                         <mat-cell *matCellDef="let element" style="text-align: right;">
-                            <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="delete(element)">
+                            <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="$event.stopPropagation();delete(element)">
                                 <mat-icon class="fa fa-trash fa-2x" aria-hidden="true"></mat-icon>
                             </button>
                         </mat-cell>
                     </ng-container>
                     <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
-                    <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
+                    <mat-row *matRowDef="let row; columns: displayedColumns;" routerLink="/administration/baskets/{{row.basket_id}}" style="cursor:pointer;" matTooltip="{{lang.view}}"></mat-row>
                 </mat-table>
             </mat-card>
         </mat-sidenav-content>
diff --git a/apps/maarch_entreprise/Views/diffusionModel-administration.component.html b/apps/maarch_entreprise/Views/diffusionModel-administration.component.html
index 6d33ad19f6adc56943ea28f5e96578d376b9c733..f3a42e5b1e4f376e1ff79e4f92c58939ce144ec0 100644
--- a/apps/maarch_entreprise/Views/diffusionModel-administration.component.html
+++ b/apps/maarch_entreprise/Views/diffusionModel-administration.component.html
@@ -17,39 +17,31 @@
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration/diffusionModels">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
-            <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
-            </mat-nav-list>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
 
                 <mat-tab-group [(selectedIndex)]="selectedTabIndex_1">
                     <mat-tab label="{{lang.informations}}">
-                        <form class="form-horizontal" (ngSubmit)="onSubmit()" #diffusionModelForm="ngForm">
+                        <form class="form-horizontal" (ngSubmit)="updateDiffList()" #diffusionModelForm="ngForm">
+                            <mat-form-field *ngIf="creationMode">
+                                <mat-select id="object_type" name="object_type" placeholder="{{lang.diffusionType}}" [(ngModel)]="diffusionModel.object_type">
+                                    <mat-option *ngFor="let itemType of this.itemTypeList" [value]="itemType.id">
+                                        {{ itemType.label }}
+                                    </mat-option>
+                                </mat-select>
+                            </mat-form-field>                                   
                             <mat-form-field>
                                 <input matInput *ngIf="creationMode" name="object_id" placeholder="{{lang.id}}" [(ngModel)]="diffusionModel.object_id" pattern="^[\w.-]*$"
-                                    maxlength="32" required>
+                                    maxlength="50" required>
                                 <input matInput *ngIf="!creationMode" name="object_id" placeholder="{{lang.id}}" title="{{lang.id}}" [(ngModel)]="diffusionModel.object_id"
-                                    disabled>
+                                    disabled maxlength="50" required>
                             </mat-form-field>
                             <mat-form-field>
                                 <input matInput name="title" title="{{lang.label}}" placeholder="{{lang.label}}" [(ngModel)]="diffusionModel.title" maxlength="255"
@@ -57,7 +49,7 @@
                             </mat-form-field>
                             <mat-form-field>
                                 <textarea matInput name="description" title="{{lang.description}}" placeholder="{{lang.description}}" [(ngModel)]="diffusionModel.description"
-                                        matTextareaAutosize matAutosizeMinRows="1" matAutosizeMaxRows="5"></textarea>
+                                    matTextareaAutosize matAutosizeMinRows="1" matAutosizeMaxRows="5" maxlength="255"></textarea>
                             </mat-form-field>
                             <div class="col-md-12 text-center" style="padding:10px;">
                                 <button mat-raised-button [disabled]="!diffusionModelForm.form.valid" color="primary">{{lang.save}}</button>
@@ -73,19 +65,18 @@
 
             <mat-nav-list>
                 <mat-tab-group>
-                    <mat-tab label="Utilisateur(s) associé(s)" *ngIf="!creationMode">
+                    <mat-tab label="{{lang.diffusionList}}">
                         <div class="row" style="margin:0px;">
                             <div class="col-md-12">
                                 <mat-form-field>
-                                    <input #autocompleteFilter type="text" placeholder="Ajouter une personne" matInput [matAutocomplete]="auto"
-                                        [formControl]="userCtrl">
+                                    <input #autocompleteFilter type="text" placeholder="{{lang.addUser}}" matInput [matAutocomplete]="auto" [formControl]="userCtrl">
                                     <mat-autocomplete #auto="matAutocomplete">
                                         <mat-option *ngFor="let elem of filteredUsers | async" [value]="elem.id" (click)="addElemListModel(elem)">
-                                            <p mat-line>
-                                                <span class="col-sm-1">
-                                                    <i color="primary" class="fa fa-user fa-2x"></i>
+                                            <p mat-line *ngIf="elem.type == 'user'">
+                                                <span class="col-xm-1">
+                                                    <mat-icon color="primary" class="fa fa-user fa-2x" style="margin-right:0px;"></mat-icon>
                                                 </span>
-                                                <span class="col-sm-11">
+                                                <span class="col-xm-11">
                                                     {{ elem.idToDisplay }}
                                                     <small>{{ elem.otherInfo }}</small>
                                                 </span>
@@ -94,22 +85,17 @@
                                     </mat-autocomplete>
                                 </mat-form-field>
                                 <mat-list>
-                                    <span *ngFor="let role of diffusionModel.roles; let i = index">
-                                        <h3 mat-subheader>{{role.label}}</h3>
-                                        <span dnd-sortable-container [dropZones]="['boxers-zone']" [sortableData]="diffusionModel.diffusionList">
-                                            <div style="min-height:30px;">
-                                                <mat-list-item disableRipple="true" *ngFor="let template of diffusionModel.diffusionList; let i = index" title="deplacer"
-                                                    dnd-sortable (onDropSuccess)="updateDiffList(template,role.id)" [sortableIndex]="i">
-                                                    <mat-icon color="primary" mat-list-icon class="fa fa-user"></mat-icon>
-                                                    <p mat-line>{{template.item_id}}
-                                                        <small style="opacity:0.5;"></small>
-                                                    </p>
-                                                    <button matTooltip="{{lang.delete}}" mat-icon-button color="warn" (click)="removeDiffList(i,role.id)">
-                                                        <mat-icon class="fa fa-remove"></mat-icon>
-                                                    </button>
-                                                </mat-list-item>
-                                            </div>
-                                        </span>
+                                    <span dnd-sortable-container [dropZones]="['boxers-zone']" [sortableData]="diffusionModel.diffusionList">
+                                        <mat-list-item disableRipple="true" *ngFor="let template of diffusionModel.diffusionList; let i = index" title="{{lang.move}}" dnd-sortable
+                                            [sortableIndex]="i" (onDropSuccess)="updateDiffList()">
+                                            <mat-icon color="primary" [class]="template.item_mode != 'sign' ? 'fa fa-user' : 'fa fa-certificate'" mat-list-icon></mat-icon>
+                                            <p mat-line>{{template.idToDisplay}}
+                                                <small style="opacity:0.5;">{{template.descriptionToDisplay}}</small>
+                                            </p>
+                                            <button *ngIf="diffusionModel.diffusionList.length > 1" matTooltip="{{lang.delete}}" mat-icon-button color="warn" (click)="removeDiffList(template,i)">
+                                                <mat-icon class="fa fa-remove"></mat-icon>
+                                            </button>
+                                        </mat-list-item>
                                     </span>
                                 </mat-list>
                             </div>
diff --git a/apps/maarch_entreprise/Views/diffusionModels-administration.component.html b/apps/maarch_entreprise/Views/diffusionModels-administration.component.html
index 2c084dceeceffe0dee27c0790ef335a93cb53749..fce8392e1f1a108cca3125c9b76614d9a8492130 100644
--- a/apps/maarch_entreprise/Views/diffusionModels-administration.component.html
+++ b/apps/maarch_entreprise/Views/diffusionModels-administration.component.html
@@ -7,43 +7,29 @@
             <small [class.hide-for-mobile]="mobileQuery.matches">{{listTemplates.length}} {{lang.diffusionModels}}</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
             <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
-                <a mat-list-item routerLink="/administration/groups/new">
+                <h3 mat-subheader>{{lang.actions}}</h3>
+                <a mat-list-item routerLink="/administration/diffusionModels/new">
                     <mat-icon color="primary" mat-list-icon class="fa fa-plus"></mat-icon>
                     <p mat-line>
                         {{lang.add}}
                     </p>
                 </a>
             </mat-nav-list>
+            <mat-divider></mat-divider>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <div class="row" style="margin:0px;">
                     <div class="col-md-6 col-xs-6">
                         <mat-form-field>
@@ -58,29 +44,29 @@
                 <mat-table #table [dataSource]="dataSource" matSort matSortActive="title" matSortDirection="asc">
                     <ng-container matColumnDef="title">
                         <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:2;">{{lang.label}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" style="cursor:pointer;flex:2;" routerLink="/administration/diffusionModels/{{element.id}}">
+                        <mat-cell *matCellDef="let element" style="flex:2;">
                         {{element.title}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="description">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:2;">{{lang.description}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" style="cursor:pointer;flex:2;" routerLink="/administration/diffusionModels/{{element.id}}">
+                        <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:2;" [class.hide-for-mobile]="mobileQuery.matches">{{lang.description}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" style="flex:2;" [class.hide-for-mobile]="mobileQuery.matches">
                         {{element.description}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="object_type">
                         <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:2;">{{lang.type}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" style="cursor:pointer;flex:2;" routerLink="/administration/diffusionModels/{{element.id}}">
+                        <mat-cell *matCellDef="let element" style="flex:2;" >
                         {{element.object_type}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="actions">
                         <mat-header-cell *matHeaderCellDef style="flex:1;"></mat-header-cell>
                         <mat-cell *matCellDef="let element" style="text-align:right;flex:1;">
-                            <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="preDelete(element)">
+                            <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="$event.stopPropagation();delete(element)">
                                 <mat-icon class="fa fa-trash fa-2x" aria-hidden="true"></mat-icon>
                             </button>
                         </mat-cell>
                     </ng-container>
                     <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
-                    <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
+                    <mat-row *matRowDef="let row; columns: displayedColumns;" routerLink="/administration/diffusionModels/{{row.id}}" style="cursor:pointer;" matTooltip="{{lang.view}}"></mat-row>
                 </mat-table>
             </mat-card>
         </mat-sidenav-content>
diff --git a/apps/maarch_entreprise/Views/doctypes-administration.component.html b/apps/maarch_entreprise/Views/doctypes-administration.component.html
index 75e21c457eca71545e362d69297e806540f76c9e..0481f85e6aad0ae62bf1abc46a49a117db884ce3 100644
--- a/apps/maarch_entreprise/Views/doctypes-administration.component.html
+++ b/apps/maarch_entreprise/Views/doctypes-administration.component.html
@@ -14,23 +14,10 @@
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
             <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
+                <h3 mat-subheader>{{lang.actions}}</h3>
                 <a mat-list-item (click)="prepareDoctypeAdd()">
                     <mat-icon color="primary" mat-list-icon class="fa fa-plus"></mat-icon>
                     <p mat-line>
@@ -38,12 +25,14 @@
                     </p>
                 </a>
             </mat-nav-list>
+            <mat-divider></mat-divider>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
 
                 <mat-form-field>
                     <input matInput id="jstree_search" name="jstree_search" type="text" placeholder="{{lang.search}}">
diff --git a/apps/maarch_entreprise/Views/entities-administration.component.html b/apps/maarch_entreprise/Views/entities-administration.component.html
index 2a8c1ea4bbcea34fa0d3a7abdd6823c2db427e47..cd47b83fe91f7827b092b4ca9efdc58288152bab 100644
--- a/apps/maarch_entreprise/Views/entities-administration.component.html
+++ b/apps/maarch_entreprise/Views/entities-administration.component.html
@@ -11,23 +11,10 @@
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
             <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
+                <h3 mat-subheader>{{lang.actions}}</h3>
                 <a mat-list-item (click)="prepareEntityAdd()">
                     <mat-icon color="primary" mat-list-icon class="fa fa-plus"></mat-icon>
                     <p mat-line>
@@ -35,12 +22,14 @@
                     </p>
                 </a>
             </mat-nav-list>
+            <mat-divider></mat-divider>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
 
                 <mat-form-field>
                     <input matInput id="jstree_search" name="jstree_search" type="text" placeholder="{{lang.searchEntities}}">
@@ -133,15 +122,20 @@
                                         </div>
                                     </div>
                                     <div class="form-group">
-                                        <div class="col-sm-6">
+                                        <div class="col-sm-4">
                                             <mat-form-field>
                                                 <input matInput [(ngModel)]="currentEntity.zipcode" name="zipcode" id="zipcode" title="{{lang.zipcode}}" type="text" placeholder="{{lang.zipcode}}"
                                                     maxlength="32">
                                             </mat-form-field>
                                         </div>
-                                        <div class="col-sm-6">
+                                        <div class="col-sm-4">
+                                            <mat-form-field>
+                                                <input matInput [(ngModel)]="currentEntity.city" name="city" id="city" title="{{lang.city}}" type="text" placeholder="{{lang.city}}" maxlength="255">
+                                            </mat-form-field>
+                                        </div>
+                                        <div class="col-sm-4">
                                             <mat-form-field>
-                                                <input matInput [(ngModel)]="currentEntity.country" name="country" id="country" title="{{lang.country}}" type="text" placeholder="{{lang.country}}">
+                                                <input matInput [(ngModel)]="currentEntity.country" name="country" id="country" title="{{lang.country}}" type="text" placeholder="{{lang.country}}" maxlength="255">
                                             </mat-form-field>
                                         </div>
                                     </div>
@@ -210,7 +204,7 @@
                                 </mat-form-field>
                                 <mat-list>
                                     <span *ngFor="let role of currentEntity.roles; let i = index">
-                                        <h3 *ngIf="role.available" mat-subheader style="font-weight:bold;" color="primary">{{role.label}}</h3>
+                                        <h3 *ngIf="role.available" mat-subheader style="font-weight:bold;" color="primary"><mat-slide-toggle [checked]="role.available" color="primary" [ngStyle]="{'opacity': role.available ? '' : '0.5'}">{{role.label}}</mat-slide-toggle></h3>
                                         <span *ngIf="role.available" dnd-sortable-container [dropZones]="['boxers-zone']" [sortableData]="currentEntity.listTemplate[role.id]">
                                             <div style="min-height:30px;">
                                                 <mat-list-item disableRipple="true" *ngFor="let template of currentEntity.listTemplate[role.id]; let i = index" title="{{lang.move}}"
diff --git a/apps/maarch_entreprise/Views/entity-administration.component.html b/apps/maarch_entreprise/Views/entity-administration.component.html
deleted file mode 100644
index c5d204d5c49a4f25f89ed370565edfca335055dc..0000000000000000000000000000000000000000
--- a/apps/maarch_entreprise/Views/entity-administration.component.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<div class="page-header">
-</div>
-<div *ngIf="loading">
-    <mat-spinner style="margin:auto;"></mat-spinner>
-</div>
-<div *ngIf="!loading" class="container-fluid">
-    <div class="row row-eq-height">
-        <div class="col-md-offset-4 col-md-4" style="border-left:solid 1px white;border-right:solid 1px white;background-color: #CEE9F1;border-top: solid 2px #FDD16C;border-bottom: solid 2px #FDD16C;padding:10px;">
-            <h2>Informations</h2>
-        </div>
-    </div>
-</div>
diff --git a/apps/maarch_entreprise/Views/group-administration.component.html b/apps/maarch_entreprise/Views/group-administration.component.html
index 6613152345f52e4d9fca08b5316349e75c9d0b82..f8b1b733ae3691accb1f69a613c40de10ffa08b1 100644
--- a/apps/maarch_entreprise/Views/group-administration.component.html
+++ b/apps/maarch_entreprise/Views/group-administration.component.html
@@ -14,30 +14,15 @@
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration/groups">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
-            <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
-            </mat-nav-list>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <mat-tab-group [(selectedIndex)]="selectedTabIndex_1">
                     <mat-tab label="{{lang.informations}}">
                         <form class="form-horizontal" (ngSubmit)="onSubmit()" #groupForm="ngForm">
@@ -51,17 +36,15 @@
                                 <input matInput name="description" title="{{lang.label}}" placeholder="{{lang.label}}" [(ngModel)]="group.group_desc" maxlength="255"
                                     required>
                             </mat-form-field>
-                            <div class="col-md-12">
-                                <mat-form-field>
-                                    <input matInput name="comment" title="{{lang.description}}" placeholder="{{lang.description}}" [(ngModel)]="group.security.maarch_comment">
-                                </mat-form-field>
-                                <mat-form-field>
-                                    <textarea matInput name="clause" title="{{lang.clauseGroup}}" placeholder="{{lang.clauseGroup}}" [(ngModel)]="group.security.where_clause"
-                                        required matTextareaAutosize matAutosizeMinRows="1" matAutosizeMaxRows="5"></textarea>
-                                    <mat-icon style="cursor:pointer;" color="primary" matSuffix class="fa fa-info-circle" matTooltip="{{lang.keywordHelper}}"
-                                        (click)="snav2.toggle()"></mat-icon>
-                                </mat-form-field>
-                            </div>
+                            <mat-form-field>
+                                <input matInput name="comment" title="{{lang.description}}" placeholder="{{lang.description}}" [(ngModel)]="group.security.maarch_comment">
+                            </mat-form-field>
+                            <mat-form-field>
+                                <textarea matInput name="clause" title="{{lang.clauseGroup}}" placeholder="{{lang.clauseGroup}}" [(ngModel)]="group.security.where_clause"
+                                    required matTextareaAutosize matAutosizeMinRows="1" matAutosizeMaxRows="5"></textarea>
+                                <mat-icon style="cursor:pointer;" color="primary" matSuffix class="fa fa-info-circle" matTooltip="{{lang.keywordHelper}}"
+                                    (click)="snav2.toggle()"></mat-icon>
+                            </mat-form-field>
                             <div class="col-md-12 text-center" style="padding:10px;">
                                 <button mat-raised-button [disabled]="!groupForm.form.valid" color="primary">{{lang.save}}</button>
                             </div>
diff --git a/apps/maarch_entreprise/Views/groups-administration.component.html b/apps/maarch_entreprise/Views/groups-administration.component.html
index 1a0893971f32d0e6611874d5f7a9a253ae78f76a..ff5977c630675b63f888a1ffd348a3f41e2500fb 100644
--- a/apps/maarch_entreprise/Views/groups-administration.component.html
+++ b/apps/maarch_entreprise/Views/groups-administration.component.html
@@ -1,36 +1,20 @@
 <div class="admin-container" [class.admin-is-mobile]="mobileQuery.matches">
     <mat-toolbar color="primary" class="admin-toolbar">
         <button mat-button (click)="snav.toggle()">
-                <mat-icon class="maarchLogo" [svgIcon]="mobileQuery.matches ? 'maarchLogoOnly' : 'maarchLogo'"></mat-icon>
-            </button>
+            <mat-icon class="maarchLogo" [svgIcon]="mobileQuery.matches ? 'maarchLogoOnly' : 'maarchLogo'"></mat-icon>
+        </button>
         <h1 class="admin-toolbar-title">{{lang.administration}} {{lang.groups}}
             <small [class.hide-for-mobile]="mobileQuery.matches">{{groups.length}} {{lang.groups}}</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
             <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
+                <h3 mat-subheader>{{lang.actions}}</h3>
                 <a mat-list-item routerLink="/administration/groups/new">
                     <mat-icon color="primary" mat-list-icon class="fa fa-plus"></mat-icon>
                     <p mat-line>
@@ -38,12 +22,14 @@
                     </p>
                 </a>
             </mat-nav-list>
+            <mat-divider></mat-divider>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <div class="row" style="margin:0px;">
                     <div class="col-md-6 col-xs-6">
                         <mat-form-field>
@@ -57,25 +43,26 @@
                 </div>
                 <mat-table #table [dataSource]="dataSource" matSort matSortActive="group_desc" matSortDirection="asc">
                     <ng-container matColumnDef="group_id">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.id}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" style="cursor:pointer;" routerLink="/administration/groups/{{element.id}}">
-                        {{element.group_id}} </mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.id}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches">
+                            {{element.group_id}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="group_desc">
                         <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:2;">{{lang.description}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" style="cursor:pointer;flex:2;" routerLink="/administration/groups/{{element.id}}">
-                        {{element.group_desc}} </mat-cell>
+                        <mat-cell *matCellDef="let element" style="flex:2;">
+                            {{element.group_desc}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="actions">
                         <mat-header-cell *matHeaderCellDef style="flex:1;"></mat-header-cell>
                         <mat-cell *matCellDef="let element" style="text-align:right;flex:1;">
-                            <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" delay="1000" (click)="preDelete(element)">
+                            <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="$event.stopPropagation();preDelete(element)">
                                 <mat-icon class="fa fa-trash fa-2x" aria-hidden="true"></mat-icon>
                             </button>
                         </mat-cell>
                     </ng-container>
                     <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
-                    <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
+                    <mat-row *matRowDef="let row; columns: displayedColumns;" routerLink="/administration/groups/{{row.id}}" style="cursor:pointer;"
+                        matTooltip="{{lang.view}}"></mat-row>
                 </mat-table>
             </mat-card>
         </mat-sidenav-content>
diff --git a/apps/maarch_entreprise/Views/header.component.html b/apps/maarch_entreprise/Views/header.component.html
deleted file mode 100755
index 8035954cc35b21d12d3d1483d8a4f8db7787a9e0..0000000000000000000000000000000000000000
--- a/apps/maarch_entreprise/Views/header.component.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<md-toolbar color="primary">
-    <button tooltip="Menu" tooltip-delay="1000" mat-button matInput [mdMenuTriggerFor]="mySetting">{{applicationName}}</button>
-    <span id="globalSearch">
-        <form class="example-form">
-            <mat-form-field>
-                <button mat-button mdPrefix [mdMenuTriggerFor]="searchTarget"><i class="fa fa-bars fa-2x"></i></button>                
-                <input type="tel" matInput placeholder="Rechercher dans : global">
-            </mat-form-field>   
-        </form>
-    </span>
-    <span style="flex: 1 1 auto;"></span>
-    <button tooltip="Administration" tooltip-delay="1000" md-icon-button [mdMenuTriggerFor]="myAdmin">
-        <i class="fa fa-cogs fa-2x"></i>
-    </button>
-    <button tooltip="Mes notifications" tooltip-delay="1000" md-icon-button [mdMenuTriggerFor]="myNotif">
-            <i class="fa fa-bell fa-2x"></i>
-            <sub class="badge text-warning">0</sub>
-    </button>
-    <button tooltip="Mes paramètres" tooltip-delay="1000" md-icon-button [mdMenuTriggerFor]="myProfil">
-            <i class="fa fa-user fa-2x"></i>
-    </button>
-    <md-menu #mySetting="mdMenu">
-        <button *ngFor="let menu of menuList" routerLink="{{menu.link}}" md-menu-item>
-            <span><i class="fa {{menu.icon}}"></i> {{menu.label}}</span>
-        </button>
-    </md-menu>
-    <md-menu #myNotif="mdMenu">
-        <button md-menu-item disabled>
-            <span style="opacity:0.5;"><i class="fa fa-times"></i> Aucune notification</span>
-        </button>
-    </md-menu>
-    <md-menu #myProfil="mdMenu">
-        <button *ngFor="let profil of profilList" routerLink="{{profil.link}}" md-menu-item>
-            <span><i class="fa {{profil.style}}"></i> {{profil.label}}</span>
-        </button>
-    </md-menu>
-    <md-menu #myAdmin="mdMenu">
-        <button *ngFor="let admin of adminList" routerLink="{{admin.servicepage}}" tooltip="{{admin.comment}}" tooltip-position="before" tooltip-delay="1000" md-menu-item [disabled]="admin.angular == 'false'">
-            <span><i class="fa {{admin.style}}"></i> {{admin.name}}</span>
-        </button>
-        <button *ngFor="let adminMod of adminListModule" routerLink="{{adminMod.servicepage}}" tooltip="{{adminMod.comment}}" tooltip-position="before" tooltip-delay="1000" md-menu-item [disabled]="adminMod.angular == 'false'">
-            <span><i class="fa {{adminMod.style}}"></i> {{adminMod.name}}</span>
-        </button>
-    </md-menu>
-    <md-menu #searchTarget="mdMenu">
-        <button md-menu-item>
-                <span>Courriers</span>
-            </button>
-        <button md-menu-item>
-                <span>Contacts</span>
-            </button>
-    </md-menu>
-</md-toolbar>
diff --git a/apps/maarch_entreprise/Views/history-administration.component.html b/apps/maarch_entreprise/Views/history-administration.component.html
index ab9153e2b24d1c79588d2b4d209b1ad3e0b7b0b1..674d59a6006a19abff49a16c2fdedf9cc3cd6b3f 100644
--- a/apps/maarch_entreprise/Views/history-administration.component.html
+++ b/apps/maarch_entreprise/Views/history-administration.component.html
@@ -7,37 +7,19 @@
             <small [class.hide-for-mobile]="mobileQuery.matches">{{data.length}} {{lang.entries}}</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
-            <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
-            </mat-nav-list>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <div class="row">
                     <div class="col-md-6 col-xs-6">
                         <mat-form-field>
@@ -55,20 +37,20 @@
                         <mat-cell *matCellDef="let element" style="flex:1;">{{element.event_date | date : "dd/MM/y HH:mm"}}</mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="event_type">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:1;">{{lang.event}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" style="flex:1;"> {{element.event_type}} </mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:1;" [class.hide-for-mobile]="mobileQuery.matches">{{lang.event}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" style="flex:1;" [class.hide-for-mobile]="mobileQuery.matches"> {{element.event_type}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="user_id">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:1;">{{lang.user}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" style="flex:1;"> {{element.user_id}} </mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:1;" [class.hide-for-mobile]="mobileQuery.matches">{{lang.user}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" style="flex:1;" [class.hide-for-mobile]="mobileQuery.matches"> {{element.user_id}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="info">
                         <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:3;">{{lang.description}}</mat-header-cell>
                         <mat-cell *matCellDef="let element" style="flex:3;"> {{element.info}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="remote_ip">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:1;">{{lang.ip}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" style="flex:1;"> {{element.remote_ip}} </mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:1;" [class.hide-for-mobile]="mobileQuery.matches">{{lang.ip}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" style="flex:1;" [class.hide-for-mobile]="mobileQuery.matches"> {{element.remote_ip}} </mat-cell>
                     </ng-container>
                     <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
                     <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
diff --git a/apps/maarch_entreprise/Views/historyBatch-administration.component.html b/apps/maarch_entreprise/Views/historyBatch-administration.component.html
index f28e2653fbf37d85b10420e92d1c0c64903adbf5..4524884d474e9ffc074b256173e76657d9c47d46 100644
--- a/apps/maarch_entreprise/Views/historyBatch-administration.component.html
+++ b/apps/maarch_entreprise/Views/historyBatch-administration.component.html
@@ -7,37 +7,19 @@
             <small [class.hide-for-mobile]="mobileQuery.matches">{{data.length}} {{lang.entries}}</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
-            <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
-            </mat-nav-list>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <div class="row">
                     <div class="col-md-6 col-xs-6">
                         <mat-form-field>
@@ -51,28 +33,28 @@
                 </div>
                 <mat-table #table [dataSource]="dataSource" matSort matSortActive="event_date" matSortDirection="desc">
                     <ng-container matColumnDef="batch_id">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.id}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element">{{element.batch_id}}</mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.id}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches">{{element.batch_id}}</mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="event_date">
                         <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.date}}</mat-header-cell>
                         <mat-cell *matCellDef="let element">{{element.event_date | date : "dd/MM/y HH:mm"}}</mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="total_processed">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.totalProcessed}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element"> {{element.total_processed}} </mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.totalProcessed}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches"> {{element.total_processed}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="total_errors">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.totalErrors}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element"> {{element.total_errors}} </mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.totalErrors}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches"> {{element.total_errors}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="info">
                         <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.description}}</mat-header-cell>
                         <mat-cell *matCellDef="let element"> {{element.info}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="module_name">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.module}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element"> {{element.module_name}} </mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.module}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches"> {{element.module_name}} </mat-cell>
                     </ng-container>
                     <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
                     <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
diff --git a/apps/maarch_entreprise/Views/menu.component.html b/apps/maarch_entreprise/Views/menu.component.html
new file mode 100644
index 0000000000000000000000000000000000000000..2a40dc31571ea633a0d5764662300dca7e1cf12c
--- /dev/null
+++ b/apps/maarch_entreprise/Views/menu.component.html
@@ -0,0 +1,15 @@
+<mat-nav-list>
+    <h3 mat-subheader>{{lang.myMenu}}</h3>
+    <a mat-list-item routerLink="/profile">
+        <mat-icon color="primary" mat-list-icon class="fa fa-user-circle-o"></mat-icon>
+        <p mat-line>
+            {{lang.myProfile}}
+        </p>
+    </a>
+    <a mat-list-item href="index.php?display=true&page=logout&logout=true">
+        <mat-icon color="warn" mat-list-icon class="fa fa-sign-out"></mat-icon>
+        <p mat-line>
+            {{lang.logout}}
+        </p>
+    </a>
+</mat-nav-list>
\ No newline at end of file
diff --git a/apps/maarch_entreprise/Views/menuNav.component.html b/apps/maarch_entreprise/Views/menuNav.component.html
new file mode 100644
index 0000000000000000000000000000000000000000..87e9082db7481541de361c9bc10ffe4856c354c7
--- /dev/null
+++ b/apps/maarch_entreprise/Views/menuNav.component.html
@@ -0,0 +1,21 @@
+<mat-nav-list>
+    <h3 mat-subheader>{{lang.browsing}}</h3>
+    <a mat-list-item href="index.php">
+        <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
+        <p mat-line>
+            {{lang.home}}
+        </p>
+    </a>
+    <a mat-list-item routerLink="/administration">
+        <mat-icon color="primary" mat-list-icon class="fa fa-gears"></mat-icon>
+        <p mat-line>
+            {{lang.administration}}
+        </p>
+    </a>
+    <a mat-list-item (click)="backClicked()" *ngIf="router.url != '/administration'">
+        <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
+        <p mat-line>
+            {{lang.back}}
+        </p>
+    </a>
+</mat-nav-list>
\ No newline at end of file
diff --git a/apps/maarch_entreprise/Views/notification-administration.component.html b/apps/maarch_entreprise/Views/notification-administration.component.html
index 5424f390e96b8d8bf39637582e96bd218ef719ef..7af22db2d28aa32349fe78de416818d00393f54f 100644
--- a/apps/maarch_entreprise/Views/notification-administration.component.html
+++ b/apps/maarch_entreprise/Views/notification-administration.component.html
@@ -4,58 +4,56 @@
             <mat-icon class="maarchLogo" [svgIcon]="mobileQuery.matches ? 'maarchLogoOnly' : 'maarchLogo'"></mat-icon>
         </button>
         <h1 class="admin-toolbar-title" *ngIf="!creationMode">{{lang.notificationModification}}
-            <small [class.hide-for-mobile]="mobileQuery.matches">{{notification.notification_id}}</small>
+            <small [class.hide-for-mobile]="mobileQuery.matches">{{notification.description}} ({{notification.notification_id}})</small>
         </h1>
         <h1 class="admin-toolbar-title" *ngIf="creationMode">{{lang.notificationCreation}}
-            <small [class.hide-for-mobile]="mobileQuery.matches">{{notification.notification_id}}</small>
+            <small [class.hide-for-mobile]="mobileQuery.matches">{{notification.description}} ({{notification.notification_id}})</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
+            <menu-nav></menu-nav>
+            <mat-divider></mat-divider>
             <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
+                <h3 mat-subheader>{{lang.actions}}</h3>
+                <a mat-list-item (click)="createScript()" *ngIf="!creationMode && !loading && !notification.scriptcreated">
+                    <mat-icon color="primary" mat-list-icon class="fa fa-terminal"></mat-icon>
                     <p mat-line>
-                        {{lang.home}}
+                        {{lang.createScriptNotification}}
                     </p>
                 </a>
-                <a mat-list-item routerLink="/administration/notifications">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
+                <a mat-list-item *ngIf="!creationMode && !loading && notification.is_enabled == 'N'" (click)="toggleNotif()">
+                    <mat-icon color="accent" mat-list-icon class="fa fa-play"></mat-icon>
                     <p mat-line>
-                        {{lang.back}}
+                        {{lang.activateNotification}}
                     </p>
                 </a>
-            </mat-nav-list>
-            <mat-divider></mat-divider>
-            <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
-                <a mat-list-item *ngIf="!creationMode && !loading && !notification.scriptcreated" (click)="createScript()">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-terminal"></mat-icon>
+                <a mat-list-item *ngIf="!creationMode && !loading && notification.is_enabled == 'Y'" (click)="toggleNotif()">
+                    <mat-icon color="warn" mat-list-icon class="fa fa-pause"></mat-icon>
                     <p mat-line>
-                        {{lang.createScriptNotification}}
+                        {{lang.suspendNotification}}
                     </p>
                 </a>
             </mat-nav-list>
+            <mat-divider></mat-divider>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
+                <div *ngIf="notification.is_enabled == 'N'" class="text-warning" style="position: absolute;opacity: 0.1;font-size: 120px;transform: rotate(324deg);-webkit-transform: rotate(324deg);margin-left: 25%;margin-top: 90px;">{{lang.suspended}}</div>
                 <form class="form-horizontal" (ngSubmit)="onSubmit()" #notificationsFormUp="ngForm">
                     <div class="form-group">
                         <div class="col-md-12">
                             <mat-form-field>
                                 <input matInput [(ngModel)]="notification.notification_id" required name="notification_id" id="notification_id" title="{{lang.id}}"
-                                    type="text" pattern="^[\w.-]*$" placeholder="{{lang.id}}" maxlength="50">
+                                    type="text" pattern="^[\w.-]*$" placeholder="{{lang.id}}" maxlength="50" [disabled]="!creationMode">
                             </mat-form-field>
                         </div>
-
                     </div>
                     <div class="form-group">
                         <div class="col-md-12">
@@ -64,64 +62,114 @@
                                     type="text" placeholder="{{lang.description}}" maxlength="255">
                             </mat-form-field>
                         </div>
-
-                    </div>
-                    <div class="form-group">
-                        <div class="col-md-12">
-                            <mat-slide-toggle [(ngModel)]="notification.is_enabled" id="is_enabled" name="is_enabled" color="primary" [checked]="notification.is_enabled == 'Y'">
-                                {{lang.NotificationToEnable}}
-                            </mat-slide-toggle>
-                        </div>
-
                     </div>
                     <div class="form-group">
                         <div class="col-md-12">
                             <mat-form-field>
                                 <mat-select id="event_id" name="event_id" title="{{lang.NotificationEvent}}" placeholder="{{lang.NotificationEvent}}" [(ngModel)]="notification.event_id"
-                                    required maxlength="255">
-                                    <mat-option *ngFor="let event of notification.data.event" [value]="event.id">
-                                        {{event.label_action}}
-                                    </mat-option>
+                                    required>
+                                    <mat-optgroup label="{{lang.triggerSystem}} :">
+                                        <ng-container *ngFor="let event of notification.data.event">
+                                            <mat-option *ngIf="!isNumber(event.id)" [value]="event.id">
+                                                <mat-icon class="fa fa-gear" color="primary" style="height:auto;"></mat-icon> {{event.label_action}}
+                                            </mat-option>
+                                        </ng-container>
+                                    </mat-optgroup>
+                                    <mat-optgroup label="{{lang.triggerAction}} :">
+                                        <ng-container *ngFor="let event of notification.data.event">
+                                            <mat-option *ngIf="isNumber(event.id)" [value]="event.id">
+                                                <mat-icon class="fa fa-exchange" color="primary" style="height:auto;"></mat-icon> {{event.label_action}}
+                                            </mat-option>
+                                        </ng-container>
+                                    </mat-optgroup>
                                 </mat-select>
                             </mat-form-field>
                         </div>
 
                     </div>
                     <div class="form-group">
-                        <div class="col-md-12">
+                        <div class="col-md-8">
                             <mat-form-field>
-                                <mat-select id="template_id" name="template_id" title="{{lang.NotificationModel}}" placeholder="{{lang.NotificationModel}}"
-                                    [(ngModel)]="notification.template_id" required maxlength="1">
+                                <mat-select id="template_id" name="template_id" title="{{lang.notificationModel}}" placeholder="{{lang.notificationModel}}"
+                                    [(ngModel)]="notification.template_id" required>
                                     <mat-option *ngFor="let template of notification.data.template" [value]="template.template_id">
                                         {{template.template_label}}
                                     </mat-option>
                                 </mat-select>
                             </mat-form-field>
                         </div>
-
-                    </div>
-                    <div class="form-group">
-                        <div class="col-md-12">
+                        <div class="col-md-4">
                             <mat-form-field>
-                                <mat-select id="diffusion_type" name="diffusion_type" title="{{lang.NotificationDiffusionType}}" placeholder="{{lang.NotificationDiffusionType}}"
-                                    [(ngModel)]="notification.diffusion_type" required maxlength="50">
-                                    <mat-option *ngFor="let diffusionType of notification.data.diffusionType" [value]="diffusionType.id">
-                                        {{diffusionType.label}}
+                                <mat-select id="attachfor_type" name="attachfor_type" title="{{lang.attachment}}" placeholder="{{lang.attachment}}" [(ngModel)]="notification.attachfor_type">
+                                    <mat-option value="">
+                                        {{lang.noAttachment}}
+                                    </mat-option>
+                                    <mat-option value="main_document">
+                                        {{lang.notificationJoinDocument}}
                                     </mat-option>
                                 </mat-select>
                             </mat-form-field>
                         </div>
-
                     </div>
-
                     <div class="form-group">
-                        <div class="col-md-12">
+                        <div class="col-md-4">
                             <mat-form-field>
-                                <mat-select id="attachfor_type" name="attachfor_type" title="{{lang.NotificationJoinDocument}}" placeholder="{{lang.NotificationJoinDocument}}"
-                                    [(ngModel)]="notification.attachfor_type">
-                                    <mat-option value="">Jamais</mat-option>
-                                    <mat-option *ngFor="let diffusionType of notification.data.diffusionType" [value]="diffusionType.id">
-                                        {{diffusionType.label}}
+                                <mat-select id="diffusion_type" name="diffusion_type" title="{{lang.sendTo}}" placeholder="{{lang.sendTo}}"
+                                    [(ngModel)]="notification.diffusion_type" required>
+                                    <mat-optgroup label="{{lang.memberUserDest}} :" *ngIf="notification.event_id != 'baskets'">
+                                        <ng-container *ngFor="let diffusionType of notification.data.diffusionType">
+                                            <mat-option *ngIf="diffusionType.id == 'dest_user'" [value]="diffusionType.id">{{diffusionType.label}}</mat-option>
+                                        </ng-container>
+                                    </mat-optgroup>
+                                    <mat-optgroup label="{{lang.memberUsersCopy}} :" *ngIf="notification.event_id != 'baskets'">
+                                        <ng-container *ngFor="let diffusionType of notification.data.diffusionType">
+                                            <mat-option *ngIf="diffusionType.id == 'copy_list'" [value]="diffusionType.id">{{diffusionType.label}}</mat-option>
+                                        </ng-container>
+                                    </mat-optgroup>
+                                    <mat-optgroup label="{{lang.memberAllUsers}} :">
+                                        <ng-container *ngFor="let diffusionType of notification.data.diffusionType">
+                                            <mat-option *ngIf="diffusionType.id == 'group' || (diffusionType.id == 'entity' && notification.event_id != 'baskets') || (diffusionType.id == 'user' && notification.event_id != 'baskets')" [value]="diffusionType.id">{{diffusionType.label}}</mat-option>
+                                        </ng-container>
+                                    </mat-optgroup>
+                                    <mat-optgroup label="{{lang.others}} :" *ngIf="notification.event_id != 'baskets'">
+                                        <ng-container *ngFor="let diffusionType of notification.data.diffusionType">
+                                            <mat-option *ngIf="diffusionType.id != 'group' && diffusionType.id != 'entity' && diffusionType.id != 'user' && diffusionType.id != 'copy_list' && diffusionType.id != 'group' && diffusionType.id != 'dest_user'"
+                                                [value]="diffusionType.id">{{diffusionType.label}}</mat-option>
+                                        </ng-container>
+                                    </mat-optgroup>
+                                </mat-select>
+                            </mat-form-field>
+                        </div>
+                        <div class="col-md-8">
+                            <mat-form-field *ngIf="notification.diffusion_type == 'group'">
+                                <mat-select id="diffusion_properties" name="diffusion_properties" title="{{lang.memberDiffTypeUsers}}" placeholder="{{lang.memberDiffTypeUsers}}"
+                                    required multiple [(ngModel)]="notification.diffusion_properties">
+                                    <mat-option *ngFor="let group of notification.data.groups" [value]="group.group_id">
+                                        {{group.group_desc}}
+                                    </mat-option>
+                                </mat-select>
+                            </mat-form-field>
+                            <mat-form-field *ngIf="notification.diffusion_type == 'user'">
+                                <mat-select id="diffusion_properties" name="diffusion_properties" title="{{lang.memberDiffTypeUsers}}" placeholder="{{lang.memberDiffTypeUsers}}"
+                                    required multiple [(ngModel)]="notification.diffusion_properties">
+                                    <mat-option *ngFor="let user of notification.data.users" [value]="user.user_id">
+                                        {{user.label}}
+                                    </mat-option>
+                                </mat-select>
+                            </mat-form-field>
+                            <mat-form-field *ngIf="notification.diffusion_type == 'entity'">
+                                <mat-select id="diffusion_properties" name="diffusion_properties" title="{{lang.memberDiffTypeUsers}}" placeholder="{{lang.memberDiffTypeUsers}}"
+                                    required multiple [(ngModel)]="notification.diffusion_properties">
+                                    <mat-option *ngFor="let entity of notification.data.entities" [value]="entity.entity_id">
+                                        {{entity.entity_label}}
+                                    </mat-option>
+                                </mat-select>
+                            </mat-form-field>
+                            <mat-form-field *ngIf="notification.diffusion_type == 'dest_user' || notification.diffusion_type == 'copy_list' || notification.diffusion_type == 'dest_entity' || notification.diffusion_type == 'dest_user_visa' || notification.diffusion_type == 'dest_user_sign'">
+                                <mat-select id="diffusion_properties" name="diffusion_properties" title="{{lang.selectedDocumentStatus}} (optionnel)" placeholder="{{lang.selectedDocumentStatus}} ({{lang.optional}})"
+                                    multiple [(ngModel)]="notification.diffusion_properties">
+                                    <mat-option *ngFor="let status of notification.data.status" [value]="status.id">
+                                        {{status.label_status}}
                                     </mat-option>
                                 </mat-select>
                             </mat-form-field>
diff --git a/apps/maarch_entreprise/Views/notifications-administration.component.html b/apps/maarch_entreprise/Views/notifications-administration.component.html
index e823ac2d4c85648893a2a76828835e94168addb4..127c4d1610067ed7a1e24173497555098458b44b 100644
--- a/apps/maarch_entreprise/Views/notifications-administration.component.html
+++ b/apps/maarch_entreprise/Views/notifications-administration.component.html
@@ -7,49 +7,35 @@
             <small [class.hide-for-mobile]="mobileQuery.matches">{{notifications.length}} {{lang.notifications}}</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
             <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
+                <h3 mat-subheader>{{lang.actions}}</h3>
                 <a mat-list-item routerLink="/administration/notifications/new">
                     <mat-icon color="primary" mat-list-icon class="fa fa-plus"></mat-icon>
                     <p mat-line>
                         {{lang.add}}
                     </p>
                 </a>
-                <a mat-list-item routerLink="/administration/notifications/schedule">
+                <a mat-list-item (click)="loadCron();snav2.toggle();">
                     <mat-icon color="primary" mat-list-icon class="fa fa-clock-o"></mat-icon>
                     <p mat-line>
                         {{lang.toSchedule}}
                     </p>
                 </a>
             </mat-nav-list>
+            <mat-divider></mat-divider>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <div class="row">
                     <div class="col-md-6 col-xs-6">
                         <mat-form-field>
@@ -63,42 +49,120 @@
                 </div>
                 <mat-table #table [dataSource]="dataSource" matSort matSortActive="notification_id" matSortDirection="asc">
                     <ng-container matColumnDef="notification_id">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:1;">{{lang.id}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/notifications/{{element.notification_sid}}"
-                            style="cursor:pointer;flex:1;"> {{element.notification_id}} </mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:1;" [class.hide-for-mobile]="mobileQuery.matches">{{lang.id}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" style="flex:1;" [class.hide-for-mobile]="mobileQuery.matches"> {{element.notification_id}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="description">
                         <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:2;">{{lang.description}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/notifications/{{element.notification_sid}}"
-                            style="cursor:pointer;flex:2;"> {{element.description}} </mat-cell>
+                        <mat-cell *matCellDef="let element" style="flex:2;"> {{element.description}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="is_enabled">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:1;">{{lang.NotificationEnabled}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/notifications/{{element.notification_sid}}"
-                            style="cursor:pointer;flex:1;">
-                            <span *ngIf="element.is_enabled == 'N'"> {{lang.no}} </span>
-                            <span *ngIf="element.is_enabled == 'Y'"> {{lang.yes}} </span>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header style="flex:1;" [class.hide-for-mobile]="mobileQuery.matches">{{lang.status}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" style="flex:1;" [class.hide-for-mobile]="mobileQuery.matches">
+                            <span *ngIf="element.is_enabled == 'Y'" color="primary" class="label">{{lang.active}}</span>
+                            <span *ngIf="element.is_enabled == 'N'" color="warn" class="label">{{lang.suspended}}</span>
                         </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="notifications">
                         <mat-header-cell *matHeaderCellDef style="flex:1;"></mat-header-cell>
                         <mat-cell *matCellDef="let element" style="text-align:right;flex:1;">
-                            <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="deleteNotification(element)">
+                            <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="$event.stopPropagation();deleteNotification(element)">
                                 <mat-icon class="fa fa-trash fa-2x" aria-hidden="true"></mat-icon>
                             </button>
                         </mat-cell>
                     </ng-container>
                     <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
-                    <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
+                    <mat-row *matRowDef="let row; columns: displayedColumns;" routerLink="/administration/notifications/{{row.notification_sid}}"
+                        style="cursor:pointer;" matTooltip="{{lang.view}}"></mat-row>
                 </mat-table>
             </mat-card>
         </mat-sidenav-content>
         <mat-sidenav #snav2 [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             position='end' [opened]="mobileQuery.matches ? false : false">
-
-            <mat-nav-list>
-                <h3 mat-subheader>Actions</h3>
-            </mat-nav-list>
+            <div class="alert alert-info" role="alert" style="margin:15px;">
+                {{lang.NotificationScheduleInfo}}
+            </div>
+            <mat-list>
+                <h3 mat-subheader>{{lang.notificationSchedule}}</h3>
+                <form class="form-horizontal" #notifForm="ngForm" style="overflow:hidden;">
+                    <div class="form-group" style="padding-left:15px;padding-right:15px;">
+                        <div class="col-sm-4">
+                            <mat-form-field>
+                                <mat-select name="hour" id="hour" title="{{lang.hour}}" placeholder="{{lang.hour}}" [(ngModel)]="newCron.h" required>
+                                    <mat-option *ngFor="let hour of hours" [value]="hour.value">
+                                        {{hour.label}}
+                                    </mat-option>
+                                </mat-select>
+                            </mat-form-field>
+                        </div>
+                        <div class="col-sm-4">
+                            <mat-form-field>
+                                <mat-select name="minute" id="minute" title="{{lang.minute}}" placeholder="{{lang.minute}}" [(ngModel)]="newCron.m" required>
+                                    <mat-option *ngFor="let minute of minutes" [value]="minute.value">
+                                        {{minute.label}}
+                                    </mat-option>
+                                </mat-select>
+                            </mat-form-field>
+                        </div>
+                        <div class="col-sm-4">
+                            <mat-form-field>
+                                <mat-select name="day" id="day" title="{{lang.day}}" placeholder="{{lang.day}}" [(ngModel)]="newCron.dow" required>
+                                    <mat-option *ngFor="let day of dow" [value]="day.value">
+                                        {{day.label}}
+                                    </mat-option>
+                                </mat-select>
+                            </mat-form-field>
+                        </div>
+                    </div>
+                    <div class="form-group" style="padding-left:15px;padding-right:15px;">
+                        <div class="col-sm-6">
+                            <mat-form-field>
+                                <mat-select name="month" id="month" title="{{lang.month}}" placeholder="{{lang.month}}" [(ngModel)]="newCron.mon" required>
+                                    <mat-option *ngFor="let month of months" [value]="month.value">
+                                        {{month.label}}
+                                    </mat-option>
+                                </mat-select>
+                            </mat-form-field>
+                        </div>
+                        <div class="col-sm-6">
+                            <mat-form-field>
+                                <mat-select name="dayM" id="dayM" title="{{lang.dayOfMonth}}" placeholder="{{lang.dayOfMonth}}" [(ngModel)]="newCron.dom" required>
+                                    <mat-option *ngFor="let dayM of dom" [value]="dayM.value">
+                                        {{dayM.label}}
+                                    </mat-option>
+                                </mat-select>
+                            </mat-form-field>
+                        </div>
+                        <div class="col-sm-12">
+                            <mat-form-field>
+                                <mat-select name="script" id="script" title="{{lang.script}}" placeholder="{{lang.script}}" [(ngModel)]="newCron.cmd" required>
+                                    <mat-option *ngFor="let notif of authorizedNotification" [value]="notif.path">
+                                        {{notif.description}}
+                                    </mat-option>
+                                </mat-select>
+                            </mat-form-field>
+                        </div>
+                        <div class="col-sm-12 text-center" style="padding:10px;">
+                            <button mat-raised-button [disabled]="!notifForm.form.valid" color="primary" (click)="saveCron()">{{lang.save}}</button>
+                        </div>
+                    </div>
+                </form>
+            </mat-list>
+            <mat-divider></mat-divider>
+            <mat-list>
+                <h3 mat-subheader>{{lang.activeCron}}</h3>
+                <mat-chip-list #chipList class="mat-chip-list-stacked">
+                    <span *ngFor="let notif of crontab;let i = index">
+                        <mat-chip color="primary" *ngIf="notif.state == 'normal'" style="cursor:pointer;margin:5px;border-radius:0px;display:flex;"
+                            selectable="false" removable="true" (remove)="deleteCron(i)">
+                            {{notif.description}}
+                            <span style="flex: 1 1 auto;"></span>
+                            <b>{{notif.m}}&nbsp;&nbsp;{{notif.h}}&nbsp;&nbsp;{{notif.dom}}&nbsp;&nbsp;{{notif.mon}}&nbsp;&nbsp;{{notif.dow}}</b>
+                            <mat-icon matTooltip="{{lang.delete}}" matChipRemove color="warn" class="fa fa-times"></mat-icon>
+                        </mat-chip>
+                    </span>
+                </mat-chip-list>
+            </mat-list>
         </mat-sidenav>
     </mat-sidenav-container>
 </div>
\ No newline at end of file
diff --git a/apps/maarch_entreprise/Views/parameter-administration.component.html b/apps/maarch_entreprise/Views/parameter-administration.component.html
index 2bb7212213c29fcc3290734ab7e7c28b8aa71949..cd064e284851842a35c6e531965008033f95af96 100755
--- a/apps/maarch_entreprise/Views/parameter-administration.component.html
+++ b/apps/maarch_entreprise/Views/parameter-administration.component.html
@@ -10,37 +10,19 @@
             <small [class.hide-for-mobile]="mobileQuery.matches">{{parameter.id}}</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration/parameters">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
-            <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
-            </mat-nav-list>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <form class="form-horizontal" (ngSubmit)="onSubmit()" #parameterForm="ngForm">
                     <div class="form-group">
                         <div class="col-sm-12">
diff --git a/apps/maarch_entreprise/Views/parameters-administration.component.html b/apps/maarch_entreprise/Views/parameters-administration.component.html
index e66ffd541522b133ccb4fd0a654bdc9501955796..e17a0ed4fc476c89e23567b53e6baf3e766974ff 100755
--- a/apps/maarch_entreprise/Views/parameters-administration.component.html
+++ b/apps/maarch_entreprise/Views/parameters-administration.component.html
@@ -7,30 +7,14 @@
             <small [class.hide-for-mobile]="mobileQuery.matches">{{parameters.length}} {{lang.parameters}}</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
             <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
+                <h3 mat-subheader>{{lang.actions}}</h3>
                 <a mat-list-item routerLink="/administration/parameters/new">
                     <mat-icon color="primary" mat-list-icon class="fa fa-plus"></mat-icon>
                     <p mat-line>
@@ -38,12 +22,14 @@
                     </p>
                 </a>
             </mat-nav-list>
+            <mat-divider></mat-divider>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <div class="row">
                     <div class="col-md-6 col-xs-6">
                         <mat-form-field>
@@ -58,29 +44,29 @@
                 <mat-table #table [dataSource]="dataSource" matSort matSortActive="id" matSortDirection="asc">
                     <ng-container matColumnDef="id">
                         <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.id}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/parameters/{{element.id}}" style="cursor:pointer;">
+                        <mat-cell *matCellDef="let element">
                         {{element.id}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="description">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.description}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/parameters/{{element.id}}" style="cursor:pointer;">
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.description}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches">
                         {{element.description}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="value">
                         <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.value}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/parameters/{{element.id}}" style="cursor:pointer;">
+                        <mat-cell *matCellDef="let element">
                         {{element.value}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="actions">
                         <mat-header-cell *matHeaderCellDef></mat-header-cell>
                         <mat-cell *matCellDef="let element" style="text-align:right">
-                            <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="deleteParameter(element.id)">
+                            <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="$event.stopPropagation();deleteParameter(element.id)">
                                 <mat-icon class="fa fa-trash fa-2x" aria-hidden="true"></mat-icon>
                             </button>
                         </mat-cell>
                     </ng-container>
                     <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
-                    <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
+                    <mat-row *matRowDef="let row; columns: displayedColumns;" routerLink="/administration/parameters/{{row.id}}" style="cursor:pointer;" matTooltip="{{lang.view}}"></mat-row>
                 </mat-table>
             </mat-card>
         </mat-sidenav-content>
diff --git a/apps/maarch_entreprise/Views/priorities-administration.component.html b/apps/maarch_entreprise/Views/priorities-administration.component.html
index aeaf7f8e87a72b96eea6904f551c16709d85b1d2..acb52f2f9efe11b6ae9f4d1a41c077636bf2c726 100755
--- a/apps/maarch_entreprise/Views/priorities-administration.component.html
+++ b/apps/maarch_entreprise/Views/priorities-administration.component.html
@@ -7,30 +7,14 @@
             <small [class.hide-for-mobile]="mobileQuery.matches">{{priorities.length}} {{lang.priorities}}</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
             <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
+                <h3 mat-subheader>{{lang.actions}}</h3>
                 <a mat-list-item routerLink="/administration/priorities/new">
                     <mat-icon color="primary" mat-list-icon class="fa fa-plus"></mat-icon>
                     <p mat-line>
@@ -38,12 +22,14 @@
                     </p>
                 </a>
             </mat-nav-list>
+            <mat-divider></mat-divider>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <div class="row">
                     <div class="col-md-6 col-xs-6">
                         <mat-form-field>
@@ -58,12 +44,12 @@
                 <mat-table #table [dataSource]="dataSource" matSort matSortActive="label" matSortDirection="asc">
                     <ng-container matColumnDef="label">
                         <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.label}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/priorities/{{element.id}}" style="cursor:pointer;">
+                        <mat-cell *matCellDef="let element">
                             <input type="color" value="{{element.color}}" style="background:none;border:none;width:45px;" disabled> {{element.label}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="delays">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.processDelay}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/priorities/{{element.id}}" style="cursor:pointer;">
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.processDelay}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches">
                             <span *ngIf="element.delays == null">
                                 <i style="opacity:0.5">{{lang.processDelayDoctype}}</i>
                             </span>
@@ -73,8 +59,8 @@
                         </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="working_days">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.processType}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/priorities/{{element.id}}" style="cursor:pointer;">
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.processType}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches">
                             <span *ngIf="element.delays == null">
                                 <i style="opacity:0.5">{{lang.processDelayDoctype}}</i>
                             </span>
@@ -87,21 +73,21 @@
                         </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="default_priority">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.defaultPriority}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/priorities/{{element.id}}" style="cursor:pointer;">
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.defaultPriority}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches">
                             <span *ngIf="element.default_priority" color="primary" class="fa fa-check fa-2x"></span>
                         </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="actions">
                         <mat-header-cell *matHeaderCellDef></mat-header-cell>
                         <mat-cell *matCellDef="let element" style="text-align: right;">
-                            <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="deletePriority(element.id)">
+                            <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="$event.stopPropagation();deletePriority(element.id)">
                                 <mat-icon class="fa fa-trash fa-2x" aria-hidden="true"></mat-icon>
                             </button>
                         </mat-cell>
                     </ng-container>
                     <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
-                    <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
+                    <mat-row *matRowDef="let row; columns: displayedColumns;" routerLink="/administration/priorities/{{row.id}}" style="cursor:pointer;" matTooltip="{{lang.view}}"></mat-row>
                 </mat-table>
             </mat-card>
         </mat-sidenav-content>
diff --git a/apps/maarch_entreprise/Views/priority-administration.component.html b/apps/maarch_entreprise/Views/priority-administration.component.html
index 4ad8ef60f967601cda23bac7ff949ffe393fad7e..9f0886a058b11aed384c30e6c63f558c1aa38381 100755
--- a/apps/maarch_entreprise/Views/priority-administration.component.html
+++ b/apps/maarch_entreprise/Views/priority-administration.component.html
@@ -10,37 +10,19 @@
             <small [class.hide-for-mobile]="mobileQuery.matches">{{priority.label}}</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration/priorities">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
-            <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
-            </mat-nav-list>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <form class="form-horizontal" (ngSubmit)="onSubmit()" #priorityForm="ngForm">
                     <div class="form-group">
                         <div class="col-md-11 col-xs-11">
diff --git a/apps/maarch_entreprise/Views/reports-administration.component.html b/apps/maarch_entreprise/Views/reports-administration.component.html
index 2f445a27b5f419d4420c03c0c272bf631fbf2cbf..f7c0473be134c8c50282077356d2afa26d67f426 100644
--- a/apps/maarch_entreprise/Views/reports-administration.component.html
+++ b/apps/maarch_entreprise/Views/reports-administration.component.html
@@ -5,41 +5,23 @@
         </button>
         <h1 class="admin-toolbar-title">{{lang.administration}} {{lang.reports}}</h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
-            <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
-            </mat-nav-list>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <mat-tab-group [(selectedIndex)]="selectedTabIndex_2" *ngIf="!creationMode" (selectedTabChange)="loadReports($event.index)">
-                    <mat-tab *ngFor="let group of groups" label="{{group.group_id}}">
+                    <mat-tab *ngFor="let group of groups" label="{{group.group_desc}">
                         <ng-template mat-tab-label>
-                            {{group.group_id}}
+                            {{group.group_desc}}
                         </ng-template>
                         <div *ngIf="loadingOptions">
                             <mat-spinner style="margin:auto;"></mat-spinner>
diff --git a/apps/maarch_entreprise/Views/save-numeric-package.component.html b/apps/maarch_entreprise/Views/save-numeric-package.component.html
new file mode 100644
index 0000000000000000000000000000000000000000..bb850e6207fb8b4e6be508dac85ef15991139736
--- /dev/null
+++ b/apps/maarch_entreprise/Views/save-numeric-package.component.html
@@ -0,0 +1,25 @@
+<div *ngIf="loading">
+    <i class="fa fa-spinner fa-spin fa-5x" style="margin-left: 50%;margin-top: 16%;font-size: 8em"></i>
+</div>
+<div *ngIf="!loading" class="container-fluid">
+    <h1 style="margin-top: 0"><i class="fa fa-file-archive-o fa-2x"></i> Enregistrer un pli numérique</h1>
+    <nav class="navbar navbar-default">
+        <div class="container-fluid">
+            <div class="navbar-header">
+                <a class="navbar-brand" href="index.php" style="cursor: pointer">
+                    <i class="fa fa-arrow-circle-left" title="Retour"></i>
+                </a>
+            </div>
+        </div>
+    </nav>
+    <div class="row row-eq-height">
+        <div class="col-md-4 col-md-offset-4" style="background-color: #CEE9F1;padding:10px;">
+            <h2>Enregistrer un pli numérique</h2>
+            <form class="form-horizontal" (ngSubmit)="submitNumericPackage()" #saveNumericPackageForm="ngForm">
+              <input id="numericPackageFilePath" type="file" name="files[]"(change)="uploadNumericPackage($event)">
+              <br>
+              <input type="submit" class="btn btn-success" [disabled]="!saveNumericPackageForm.form.valid" value="Enregistrer">
+            </form>
+        </div>
+    </div>
+</div>
diff --git a/apps/maarch_entreprise/Views/status-administration.component.html b/apps/maarch_entreprise/Views/status-administration.component.html
index 1729b8ac89c52f0748a748cb3e2ec57770f04373..1154463205148dfe6f340b46f560219cb7f67931 100755
--- a/apps/maarch_entreprise/Views/status-administration.component.html
+++ b/apps/maarch_entreprise/Views/status-administration.component.html
@@ -10,37 +10,19 @@
             <small [class.hide-for-mobile]="mobileQuery.matches">{{status.id}}</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration/statuses">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
-            <mat-nav-list style="width:250px;">
-                <h3 mat-subheader>{{lang.tools}}</h3>
-            </mat-nav-list>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <form class="form-horizontal" (ngSubmit)="submitStatus()" #statusFormUp="ngForm">
                     <div class="form-group">
                         <div class="col-sm-12">
diff --git a/apps/maarch_entreprise/Views/statuses-administration.component.html b/apps/maarch_entreprise/Views/statuses-administration.component.html
index 76f9fbfffe03b15e45892114cce05f7a207e1460..63c144e0f75cdfa1f7d4fa8689329de38f417100 100755
--- a/apps/maarch_entreprise/Views/statuses-administration.component.html
+++ b/apps/maarch_entreprise/Views/statuses-administration.component.html
@@ -7,30 +7,14 @@
             <small [class.hide-for-mobile]="mobileQuery.matches">{{statuses.length}} {{lang.statuses}}</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
             <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
+                <h3 mat-subheader>{{lang.actions}}</h3>
                 <a mat-list-item routerLink="/administration/statuses/new">
                     <mat-icon color="primary" mat-list-icon class="fa fa-plus"></mat-icon>
                     <p mat-line>
@@ -38,12 +22,14 @@
                     </p>
                 </a>
             </mat-nav-list>
+            <mat-divider></mat-divider>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <div class="row">
                     <div class="col-md-6 col-xs-6">
                         <mat-form-field>
@@ -58,32 +44,31 @@
                 <mat-table #table [dataSource]="dataSource" matSort matSortActive="label_status" matSortDirection="asc">
                     <ng-container matColumnDef="img_filename">
                         <mat-header-cell *matHeaderCellDef>{{lang.imgRelated}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" color="primary" matTooltip="{{lang.view}}" routerLink="/administration/statuses/{{element.identifier}}"
-                            style="cursor:pointer;">
+                        <mat-cell *matCellDef="let element" color="primary">
                             <mat-icon class="fm {{element.img_filename}} fm-2x" *ngIf="element.img_filename.indexOf('fm') == 0" aria-hidden="true"></mat-icon>
                             <mat-icon class="fa {{element.img_filename}} fa-2x" *ngIf="element.img_filename.indexOf('fa') == 0" aria-hidden="true"></mat-icon>
                         </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="id">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.id}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/statuses/{{element.identifier}}" style="cursor:pointer;">
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.id}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches">
                         {{element.id}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="label_status">
                         <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.statusName}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" routerLink="/administration/statuses/{{element.identifier}}" style="cursor:pointer;">
+                        <mat-cell *matCellDef="let element">
                         {{element.label_status}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="identifier">
                         <mat-header-cell *matHeaderCellDef></mat-header-cell>
                         <mat-cell *matCellDef="let element" style="text-align:right">
-                            <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="deleteStatus(element)">
+                            <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="$event.stopPropagation();deleteStatus(element)">
                                 <mat-icon class="fa fa-trash fa-2x" aria-hidden="true"></mat-icon>
                             </button>
                         </mat-cell>
                     </ng-container>
                     <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
-                    <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
+                    <mat-row *matRowDef="let row; columns: displayedColumns;" routerLink="/administration/statuses/{{row.identifier}}" style="cursor:pointer;" matTooltip="{{lang.view}}"></mat-row>
                 </mat-table>
             </mat-card>
         </mat-sidenav-content>
diff --git a/apps/maarch_entreprise/Views/update-status-administration.component.html b/apps/maarch_entreprise/Views/update-status-administration.component.html
index f8f33cb84201b311c737b523fe223663d366cb84..6e8b61cc483cb182a9289f5fd168720c7f6c064b 100644
--- a/apps/maarch_entreprise/Views/update-status-administration.component.html
+++ b/apps/maarch_entreprise/Views/update-status-administration.component.html
@@ -6,37 +6,19 @@
         <h1 class="admin-toolbar-title">{{lang.updateStatus}}
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
-            <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
-            </mat-nav-list>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <form class="form-horizontal" (ngSubmit)="onSubmit()" #updateStatusForm="ngForm">
                     <mat-tab-group (selectedTabChange)="resetInput($event)">
                         <mat-tab label="{{lang.chronoNumber}}">
diff --git a/apps/maarch_entreprise/Views/user-administration.component.html b/apps/maarch_entreprise/Views/user-administration.component.html
index 93e2fcf89b70c4eefd55f71d7411093e36c63c6b..9b23efcba3701c3cb49e5652805ad7309527602f 100755
--- a/apps/maarch_entreprise/Views/user-administration.component.html
+++ b/apps/maarch_entreprise/Views/user-administration.component.html
@@ -17,23 +17,10 @@
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration/users">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
             <mat-nav-list style="width:250px;">
-                <h3 mat-subheader>{{lang.tools}}</h3>
+                <h3 mat-subheader>{{lang.actions}}</h3>
                 <a mat-list-item *ngIf="user.status != 'ABS' && !creationMode && !loading" (click)="activateAbsence()">
                     <mat-icon color="warn" mat-list-icon class="fa fa-plane"></mat-icon>
                     <p mat-line>
@@ -53,12 +40,14 @@
                     </p>
                 </a>
             </mat-nav-list>
+            <mat-divider></mat-divider>
+            <menu-app></menu-app>
         </mat-sidenav>
         <mat-sidenav-content>
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <mat-tab-group [(selectedIndex)]="selectedTabIndex" (selectChange)="initService()">
                     <mat-tab label="Informations">
                         <div *ngIf="user.status == 'ABS'" class="text-warning" style="position: absolute;opacity: 0.1;font-size: 120px;transform: rotate(324deg);-webkit-transform: rotate(324deg);margin-left: 35%;margin-top: 90px;">{{user.status}}</div>
@@ -136,7 +125,7 @@
                     </mat-tab>
                     <mat-tab *ngIf="!creationMode" label="Groupe(s)">
                         <mat-nav-list>
-                            <mat-list-item *ngFor="let group of user.allGroups">
+                            <mat-list-item *ngFor="let group of user.allGroups" disableRipple="true">
                                 <mat-slide-toggle id="{{group.group_id}}" color="primary" [checked]="group.disabled == true" (change)="toggleGroup(group)">{{group.group_desc}}</mat-slide-toggle>
                             </mat-list-item>
                         </mat-nav-list>
@@ -274,18 +263,15 @@
                 <h3 mat-subheader>{{lang.baskets}}</h3>
                 <mat-list-item *ngFor="let basket of user.baskets;let i = index">
                     
-                    <mat-icon mat-list-icon color="primary" *ngIf="basket.userToDisplay == '' && basket.enabled"><mat-slide-toggle matTooltip="activer / désactiver la bannette" color="primary" [(ngModel)]="basket.allowed" (change)="toggleBasket(basket)"></mat-slide-toggle>
+                    <mat-icon mat-list-icon color="primary" *ngIf="basket.enabled"><mat-slide-toggle matTooltip="activer / désactiver la bannette" color="primary" [(ngModel)]="basket.allowed" (change)="toggleBasket(basket)" [disabled]="basket.userToDisplay != ''"></mat-slide-toggle>
                     </mat-icon>
-                    <h4 mat-line [ngStyle]="{'opacity': basket.allowed ? '1' : '0.5'}">{{basket.basket_name}}</h4>
+                    <h4 mat-line [ngStyle]="{'opacity': basket.allowed ? '1' : '0.5'}" [attr.color]="basket.userToDisplay != '' ? 'warn': ''">{{basket.basket_name}}</h4>
                     <p mat-line [ngStyle]="{'opacity': basket.allowed ? '1' : '0.5'}">
-                        <i style="cursor:pointer;" *ngIf="basket.userToDisplay != '' && basket.enabled" matTooltip="Supprimer la redirection" class="fa fa-times text-danger"
-                            aria-hidden="true" (click)="delBasketRedirection(i)"></i>
-                        <mat-form-field style="font-size:10px;" *ngIf="basket.allowed">
+                        <mat-form-field style="font-size:10px;" *ngIf="basket.userToDisplay == ''" floatLabel="never">
                             <input matTooltip="Rediriger la banette à une personne lors de l'activation de l'absence" matTooltipPosition="above" type="text"
-                                placeholder="Utilisateur de redirection" matInput [matAutocomplete]="auto" [formControl]="userCtrl"
-                                (change)="addBasketRedirection(i,basket)">
+                                placeholder="Utilisateur de redirection" matInput [matAutocomplete]="auto" [formControl]="userCtrl">
                             <mat-autocomplete #auto="matAutocomplete">
-                                <mat-option *ngFor="let user of filteredUsers | async" [value]="user.id">
+                                <mat-option *ngFor="let user of filteredUsers | async" [value]="user.id" (click)="addBasketRedirection(user.id,basket)">
                                     <p mat-line matTooltip="{{ user.otherInfo }}">
                                         <span class="col-xm-1">
                                             <mat-icon color="primary" class="fa fa-user fa-2x" style="margin-right:0px;"></mat-icon>
@@ -298,6 +284,12 @@
                                 </mat-option>
                             </mat-autocomplete>
                         </mat-form-field>
+                        <mat-form-field>
+                            <input type="text" color="warn" matInput disabled value="Redirigé à {{basket.userToDisplay}}">
+                            <button mat-button color="warn" matSuffix mat-icon-button aria-label="Clear" (click)="delBasketRedirection(basket)" matTooltip="Supprimer la redirection">
+                                <mat-icon color="warn" class="fa fa-times text-danger"></mat-icon>
+                              </button>
+                        </mat-form-field>
                     </p>
                 </mat-list-item>
             </mat-list>
diff --git a/apps/maarch_entreprise/Views/users-administration.component.html b/apps/maarch_entreprise/Views/users-administration.component.html
index 7e88fb8829576ce71ffe57bd02ea512bca5945e8..627bdf702520d436a3d102204b4d72d90f806ab4 100755
--- a/apps/maarch_entreprise/Views/users-administration.component.html
+++ b/apps/maarch_entreprise/Views/users-administration.component.html
@@ -7,30 +7,14 @@
             <small [class.hide-for-mobile]="mobileQuery.matches">{{data.length}} {{lang.users}}</small>
         </h1>
         <span style="flex: 1 1 auto;"></span>
-        <button mat-icon-button (click)="snav2.toggle()">
-            <mat-icon class="fa fa-gear fa-2x"></mat-icon>
-        </button>
     </mat-toolbar>
     <mat-sidenav-container class="admin-sidenav-container" [style.marginTop.px]="mobileQuery.matches ? 56 : 0">
         <mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
             [opened]="mobileQuery.matches ? false : true">
-            <mat-nav-list>
-                <a mat-list-item href="index.php">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-home"></mat-icon>
-                    <p mat-line>
-                        {{lang.home}}
-                    </p>
-                </a>
-                <a mat-list-item routerLink="/administration">
-                    <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon>
-                    <p mat-line>
-                        {{lang.back}}
-                    </p>
-                </a>
-            </mat-nav-list>
+            <menu-nav></menu-nav>
             <mat-divider></mat-divider>
             <mat-nav-list>
-                <h3 mat-subheader>{{lang.tools}}</h3>
+                <h3 mat-subheader>{{lang.actions}}</h3>
                 <a mat-list-item routerLink="/administration/users/new">
                     <mat-icon color="primary" mat-list-icon class="fa fa-plus"></mat-icon>
                     <p mat-line>
@@ -38,6 +22,8 @@
                     </p>
                 </a>
             </mat-nav-list>
+            <mat-divider></mat-divider>
+            <menu-app></menu-app>
             <mat-divider *ngIf="quota.userQuota"></mat-divider>
             <mat-nav-list *ngIf="quota.userQuota">
                 <h3 mat-subheader>{{lang.quota}}</h3>
@@ -50,7 +36,7 @@
             <div *ngIf="loading" style="display:flex;height:100%;">
                 <mat-spinner style="margin:auto;"></mat-spinner>
             </div>
-            <mat-card *ngIf="!loading">
+            <mat-card *ngIf="!loading" class="card-app-content">
                 <div class="row">
                     <div class="col-md-6 col-xs-6">
                         <mat-form-field>
@@ -64,55 +50,56 @@
                 </div>
                 <mat-table #table [dataSource]="dataSource" matSort matSortActive="user_id" matSortDirection="asc">
                     <ng-container matColumnDef="user_id">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.id}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" style="cursor:pointer;" routerLink="/administration/users/{{element.id}}"> {{element.user_id}} </mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.id}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches"> {{element.user_id}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="lastname">
                         <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.lastname}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" style="cursor:pointer;" routerLink="/administration/users/{{element.id}}"> {{element.lastname}} </mat-cell>
+                        <mat-cell *matCellDef="let element"> {{element.lastname}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="firstname">
                         <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.firstname}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" style="cursor:pointer;" routerLink="/administration/users/{{element.id}}"> {{element.firstname}} </mat-cell>
+                        <mat-cell *matCellDef="let element"> {{element.firstname}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="status">
                         <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.status}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" style="cursor:pointer;" routerLink="/administration/users/{{element.id}}">
+                        <mat-cell *matCellDef="let element">
                             <span *ngIf="element.status == 'OK' && element.enabled == 'Y'" color="primary" class="label">{{lang.active}}</span>
                             <span *ngIf="element.enabled == 'N'" color="warn" class="label">{{lang.inactive}}</span>
                             <span *ngIf="element.status == 'ABS'" color="warn" class="label">{{lang.abs}}</span>
                         </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="mail">
-                        <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.email}}</mat-header-cell>
-                        <mat-cell *matCellDef="let element" matTooltip="{{lang.view}}" style="cursor:pointer;" routerLink="/administration/users/{{element.id}}"> {{element.mail}} </mat-cell>
+                        <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.email}}</mat-header-cell>
+                        <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches"> {{element.mail}} </mat-cell>
                     </ng-container>
                     <ng-container matColumnDef="actions">
                         <mat-header-cell *matHeaderCellDef style="text-align: right;padding: 10px">
                         </mat-header-cell>
                         <mat-cell *matCellDef="let element" style="text-align:right">
                             <button mat-icon-button color="primary" *ngIf="element.enabled == 'Y' && element.inDiffListDest == 'Y'" matTooltip="{{lang.suspend}}"
-                                (click)="suspendUser(element)">
+                                (click)="$event.stopPropagation();suspendUser(element)">
                                 <mat-icon class="fa fa-pause fa-2x" aria-hidden="true"></mat-icon>
                             </button>
                             <button mat-icon-button color="primary" *ngIf="element.enabled == 'Y' && element.inDiffListDest == 'N'" matTooltip="{{lang.suspend}}"
-                                (click)="suspendUser(element)">
+                                (click)="$event.stopPropagation();suspendUser(element)">
                                 <mat-icon class="fa fa-pause fa-2x" aria-hidden="true"></mat-icon>
                             </button>
-                            <button mat-icon-button color="accent" *ngIf="element.enabled == 'N'" matTooltip="{{lang.authorize}}" (click)="activateUser(element)">
+                            <button mat-icon-button color="accent" *ngIf="element.enabled == 'N'" matTooltip="{{lang.authorize}}" (click)="$event.stopPropagation();activateUser(element)">
                                 <mat-icon class="fa fa-check fa-2x" aria-hidden="true"></mat-icon>
                             </button>
                             <button mat-icon-button color="warn" *ngIf="element.inDiffListDest == 'Y'" matTooltip="{{lang.delete}}" data-toggle="modal"
-                                data-target="#changeDiffListDest" (click)="deleteUser(element)">
+                                data-target="#changeDiffListDest" (click)="$event.stopPropagation();deleteUser(element)">
                                 <mat-icon class="fa fa-trash fa-2x" aria-hidden="true"></mat-icon>
                             </button>
-                            <button mat-icon-button color="warn" *ngIf="element.inDiffListDest == 'N'" matTooltip="{{lang.delete}}" (click)="deleteUser(element)">
+                            <button mat-icon-button color="warn" *ngIf="element.inDiffListDest == 'N'" matTooltip="{{lang.delete}}" (click)="$event.stopPropagation();deleteUser(element)">
                                 <mat-icon class="fa fa-trash fa-2x" aria-hidden="true"></mat-icon>
                             </button>
                         </mat-cell>
                     </ng-container>
                     <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
-                    <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
+                    <mat-row *matRowDef="let row; columns: displayedColumns;" routerLink="/administration/users/{{row.id}}" style="cursor:pointer;"
+                        matTooltip="{{lang.view}}"></mat-row>
                 </mat-table>
             </mat-card>
         </mat-sidenav-content>
diff --git a/apps/maarch_entreprise/actions/index_mlb.php b/apps/maarch_entreprise/actions/index_mlb.php
index 95de8fe75153bddfa2c654fa1af3c57513e71b08..84cc3838fa7e99ba1100dbe513ba8b4ebf656f31 100755
--- a/apps/maarch_entreprise/actions/index_mlb.php
+++ b/apps/maarch_entreprise/actions/index_mlb.php
@@ -604,9 +604,10 @@ function get_form_txt($values, $pathManageAction,  $actionId, $table, $module, $
     $frmStr .=' <i class="fa fa-user" title="'._SINGLE_CONTACT.'" style="cursor:pointer;color:#009DC5;" id="type_contact_external_icon" onclick="$j(\'#type_contact_external\')[0].click();$j(\'#type_contact_internal_icon\').css(\'color\',\'#666\');$j(\'#type_contact_external_icon\').css(\'color\',\'#009DC5\');$j(\'#type_multi_contact_external_icon\').css(\'color\',\'#666\');"></i>';
 
     $frmStr .=' <i class="fa fa-users" title="'._MULTI_CONTACT.'" style="cursor:pointer;" id="type_multi_contact_external_icon" onclick="$j(\'#type_multi_contact_external\')[0].click();$j(\'#type_contact_internal_icon\').css(\'color\',\'#666\');$j(\'#type_contact_external_icon\').css(\'color\',\'#666\');$j(\'#type_multi_contact_external_icon\').css(\'color\',\'#009DC5\');"></i>';
+    $frmStr .=' <i class="fa fa-tty" title="'. _CONTACT_COMMUNICATION_DEFINE. '"style="visibility:hidden;display:inline;"" id="type_contact_communication_icon"></i>';
     $frmStr .=' <span style="position:relative;"><input type="text" name="contact" onkeyup="erase_contact_external_id(\'contact\', \'contactid\');erase_contact_external_id(\'contact\', \'addressid\');"'
-            . 'id="contact" onblur="clear_error(\'frm_error_' . $actionId . '\');'
-            . 'display_contact_card(\'visible\');if(document.getElementById(\'type_contact_external\').checked == true){check_date_exp(\''.$path_to_script.'\', \''.$path_check_date_link.'\');}" /><div id="show_contacts" '
+        . 'id="contact" onblur="clear_error(\'frm_error_' . $actionId . '\');'
+        . 'display_contact_card(\'visible\');checkCommunication(document.getElementById(\'contactid\').value);if(document.getElementById(\'type_contact_external\').checked == true){check_date_exp(\''.$path_to_script.'\', \''.$path_check_date_link.'\');}" /><div id="show_contacts" '
             . 'class="autocomplete autocompleteIndex" style="width:100%;left:0px;top:17px;"></div><div class="autocomplete autocompleteIndex" id="searching_autocomplete" style="display: none;text-align:left;padding:5px;left:0px;width:100%;top:17px;"><i class="fa fa-spinner fa-spin" aria-hidden="true"></i> chargement ...</div></span></td>';
     $frmStr .= '<td><span class="red_asterisk" id="contact_mandatory" '
             . 'style="display:inline;"><i class="fa fa-star"></i></span>&nbsp;</td>';
diff --git a/apps/maarch_entreprise/admin/contacts/contacts_v2/contacts_v2_list_by_name.php b/apps/maarch_entreprise/admin/contacts/contacts_v2/contacts_v2_list_by_name.php
index 3a7353c5f34d7a68f6f3afff871fbe6ab15d23d8..e2c90942226abb385be1fd6fb0a034203d31363d 100755
--- a/apps/maarch_entreprise/admin/contacts/contacts_v2/contacts_v2_list_by_name.php
+++ b/apps/maarch_entreprise/admin/contacts/contacts_v2/contacts_v2_list_by_name.php
@@ -49,15 +49,17 @@ foreach ($args as $key => $value) {
 }
 echo "<ul id=\"autocomplete_contacts_ul\">";
 //STEP 1 : search with lastname (physical contact)
-    $query = "SELECT contact_type, society, lastname, firstname, function, contact_id, is_corporate_person, society_short FROM contacts_v2 WHERE is_corporate_person = 'N' AND enabled = 'Y' AND enabled = 'Y' ";
+    $query = "SELECT contact_id, contact_type, society, lastname, firstname, function, contact_id, is_corporate_person, society_short FROM contacts_v2 WHERE is_corporate_person = 'N' AND enabled = 'Y' AND enabled = 'Y' ";
     $query.= "AND (LOWER(translate(lastname || ' ' || firstname,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr'))";
     $query.= "LIKE LOWER(translate(?,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')))";
     $query.= "OR (LOWER(translate(firstname || ' ' || lastname,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr'))";
     $query.= "LIKE LOWER(translate(?,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')))";
     $query.= "OR (LOWER(translate(function,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr'))";
     $query.= "LIKE LOWER(translate(?,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')))";
+    $query.= "OR (LOWER(translate(society,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr'))";
+    $query.= "LIKE LOWER(translate(?,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')))";
     $query.= "ORDER BY lastname,firstname ASC";
-    $arrayPDO = array('%'.$_REQUEST['what'].'%','%'.$_REQUEST['what'].'%','%'.$_REQUEST['what'].'%');
+    $arrayPDO = array('%'.$_REQUEST['what'].'%','%'.$_REQUEST['what'].'%','%'.$_REQUEST['what'].'%','%'.$_REQUEST['what'].'%');
     $stmt = $db->query($query, $arrayPDO);
     $nb_step1 = $stmt->rowCount();
     
@@ -71,23 +73,36 @@ echo "<ul id=\"autocomplete_contacts_ul\">";
 
         $res = $stmt->fetchObject();
 
+        $isSociety = false;
         if(!empty($res->society)){
-            $arr_contact_info = array($res->firstname,$res->lastname,'('.$res->society.')');
+            if($res->firstname === '' && $res->lastname === ''){
+                $arr_contact_info = array($res->firstname,$res->lastname,$res->society);
+                $isSociety = true;               
+            } else {
+                $arr_contact_info = array($res->firstname,$res->lastname,'('.$res->society.')');
+                $contact_info = implode(' ', $arr_contact_info);
+            }
         }else{
             $arr_contact_info = array($res->firstname,$res->lastname);
+            $contact_info = implode(' ', $arr_contact_info);
         }
-        $contact_info = implode(' ', $arr_contact_info);
 
         if ($i%2==1) $color = 'LightYellow';
         else $color = 'white';
 
-        echo "<li id='".$res->contact_id."' style='font-size:12px;background-color:$color;'><i class='fa fa-user fa-1x' style='padding:5px;display:table-cell;vertical-align:middle;' title='personne physique'></i> "
+        if($isSociety){
+            echo "<li id='".$res->contact_id."' style='font-size:12px;background-color:$color;'><i class='fa fa-building fa-1x' style='padding:5px;display:table-cell;vertical-align:middle;' title='structure'></i> "
+                . '<span style="display:table-cell;vertical-align:middle;">'. str_replace($args, $args_bold, $res->society) .'</span>'
+            ."</li>";
+        } else {
+            echo "<li id='".$res->contact_id."' style='font-size:12px;background-color:$color;'><i class='fa fa-user fa-1x' style='padding:5px;display:table-cell;vertical-align:middle;' title='personne physique'></i> "
                 . '<span style="display:table-cell;vertical-align:middle;">' . str_replace($args, $args_bold, $contact_info) . '</span>'
             ."</li>";
+        }
     }
 
     //STEP 2 : search with society(physical contact)
-    $query = "SELECT contact_id,firstname,lastname,society FROM contacts_v2 WHERE is_corporate_person = 'N' AND enabled = 'Y' AND (LOWER(translate(society,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')) LIKE LOWER(translate(?,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')) OR LOWER(translate(society_short,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')) LIKE LOWER(translate(?,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr'))) ORDER BY society,lastname,firstname ASC";
+    /*$query = "SELECT contact_id,firstname,lastname,society FROM contacts_v2 WHERE is_corporate_person = 'N' AND enabled = 'Y' AND (LOWER(translate(society,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')) LIKE LOWER(translate(?,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')) OR LOWER(translate(society_short,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')) LIKE LOWER(translate(?,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr'))) ORDER BY society,lastname,firstname ASC";
     $arrayPDO = array('%'.$_REQUEST['what'].'%','%'.$_REQUEST['what'].'%');
     $stmt = $db->query($query, $arrayPDO);
     $nb_step3 = $stmt->rowCount();
@@ -115,11 +130,11 @@ echo "<ul id=\"autocomplete_contacts_ul\">";
         echo "<li id='".$res->contact_id."' style='font-size:12px;background-color:$color;'><i class='fa fa-user fa-1x' style='padding:5px;display:table-cell;vertical-align:middle;' title='personne physique'></i> "
                 . '<span style="display:table-cell;vertical-align:middle;">' . str_replace($args, $args_bold, $contact_info) . '</span>'
             ."</li>";
-    }
+    }*/
     ///////////////////////
 
     //STEP 3 : search with society(corporate contact)
-    $query = "SELECT contact_id, society FROM contacts_v2 WHERE is_corporate_person = 'Y' AND enabled = 'Y' AND (LOWER(translate(society,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')) LIKE LOWER(translate(?,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')) OR LOWER(translate(society_short,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')) LIKE LOWER(translate(?,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr'))) ORDER BY society ASC";
+    /*$query = "SELECT contact_id, society FROM contacts_v2 WHERE is_corporate_person = 'Y' AND enabled = 'Y' AND (LOWER(translate(society,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')) LIKE LOWER(translate(?,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')) OR LOWER(translate(society_short,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr')) LIKE LOWER(translate(?,'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ','aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr'))) ORDER BY society ASC";
     $arrayPDO = array('%'.$_REQUEST['what'].'%','%'.$_REQUEST['what'].'%');
     $stmt = $db->query($query, $arrayPDO);
     $nb_step4 = $stmt->rowCount();
@@ -139,7 +154,7 @@ echo "<ul id=\"autocomplete_contacts_ul\">";
         echo "<li id='".$res->contact_id."' style='font-size:12px;background-color:$color;'><i class='fa fa-building fa-1x' style='padding:5px;display:table-cell;vertical-align:middle;' title='structure'></i> "
                 . '<span style="display:table-cell;vertical-align:middle;">'. str_replace($args, $args_bold, $res->society) .'</span>'
             ."</li>";
-    }
+    }*/
     ///////////////////////
 
     //STEP 4 : search with other informations (physical contact)
diff --git a/apps/maarch_entreprise/class/class_business_app_tools_Abstract.php b/apps/maarch_entreprise/class/class_business_app_tools_Abstract.php
index 59c8b98ecc6de03fff07f61f34f4b09d1a2499c9..7177d2ecdb7c212dee536a75857ce77cd7c917f1 100755
--- a/apps/maarch_entreprise/class/class_business_app_tools_Abstract.php
+++ b/apps/maarch_entreprise/class/class_business_app_tools_Abstract.php
@@ -130,6 +130,7 @@ abstract class business_app_tools_Abstract extends Database
             $_SESSION['tablename']['contact_types']         = (string) $tablename->contact_types;
             $_SESSION['tablename']['contact_purposes']      = (string) $tablename->contact_purposes;
             $_SESSION['tablename']['contact_addresses']     = (string) $tablename->contact_addresses;
+            $_SESSION['tablename']['contact_communication'] = 'contact_communication';
             $_SESSION['tablename']['tags']                  = (string) $tablename->tags;
             
             $_SESSION['config']['tmppath'] = $_SESSION['config']['corepath'] . 'apps' 
diff --git a/apps/maarch_entreprise/class/class_contacts_v2_Abstract.php b/apps/maarch_entreprise/class/class_contacts_v2_Abstract.php
index 8e144e567b3b0ae21b117b773cbf3eafae920615..00d0e9455192d599e8595badf1764a62ed0d5006 100755
--- a/apps/maarch_entreprise/class/class_contacts_v2_Abstract.php
+++ b/apps/maarch_entreprise/class/class_contacts_v2_Abstract.php
@@ -40,6 +40,9 @@ abstract class contacts_v2_Abstract extends Database
     {
         //  return the user information in sessions vars
         $func = new functions();
+        $_SESSION['m_admin']['contact']['IS_EXTERNAL_CONTACT'] =
+            $_REQUEST['is_external'];
+
         $_SESSION['m_admin']['contact']['IS_CORPORATE_PERSON'] =
         $_REQUEST['is_corporate'];
         $controlTarget = "SELECT id FROM contact_types WHERE contact_target = ? or contact_target = 'both' or contact_target is null";
@@ -100,6 +103,18 @@ abstract class contacts_v2_Abstract extends Database
         } else {
             $_SESSION['m_admin']['contact']['SOCIETY_SHORT'] = '';
         }
+        if ($_REQUEST['communication_type'] <> '') {
+            $_SESSION['m_admin']['communication']['TYPE'] = $func->wash(
+                $_REQUEST['communication_type'], 'no', _COMMUNICATION_TYPE . ' ', 'yes', 0, 32
+            );
+        } else {
+            $_SESSION['m_admin']['communication']['TYPE'] = '';
+        }
+        if (!empty($_SESSION['m_admin']['communication']['TYPE'])) {
+            $_SESSION['m_admin']['communication']['VALUE'] = $func->wash(
+                $_REQUEST['communication_value'], 'no', _COMMUNICATION_VALUE . ' ', 'yes', 0, 255
+            );
+        }
 
         $_SESSION['m_admin']['contact']['CONTACT_TYPE'] = $func->wash(
             $_REQUEST['contact_type'], 'no', _CONTACT_TYPE . ' ', 'yes', 0, 255
@@ -274,13 +289,14 @@ abstract class contacts_v2_Abstract extends Database
                     $entity_id = $_SESSION['user']['primaryentity']['id'];
                 }
                 $query = 'INSERT INTO ' . $_SESSION['tablename']['contacts_v2']
-                       . ' ( contact_type, lastname , firstname , society , society_short, function , '
-                       . 'other_data,'
-                       . " title, is_corporate_person, user_id, entity_id, creation_date) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, current_timestamp)";
+                    . ' ( contact_type, lastname , firstname , society , society_short, function , '
+                    . 'other_data,'
+                    . " title, is_corporate_person, is_external_contact, user_id, entity_id, creation_date) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, current_timestamp)";
 
                 $db->query($query, array($_SESSION['m_admin']['contact']['CONTACT_TYPE'], $_SESSION['m_admin']['contact']['LASTNAME'], $_SESSION['m_admin']['contact']['FIRSTNAME']
-                            , $_SESSION['m_admin']['contact']['SOCIETY'], $_SESSION['m_admin']['contact']['SOCIETY_SHORT'], $_SESSION['m_admin']['contact']['FUNCTION'], $_SESSION['m_admin']['contact']['OTHER_DATA']
-                            , $_SESSION['m_admin']['contact']['TITLE'], $_SESSION['m_admin']['contact']['IS_CORPORATE_PERSON'], $_SESSION['user']['UserId'], $entity_id));
+                , $_SESSION['m_admin']['contact']['SOCIETY'], $_SESSION['m_admin']['contact']['SOCIETY_SHORT'], $_SESSION['m_admin']['contact']['FUNCTION'], $_SESSION['m_admin']['contact']['OTHER_DATA']
+                , $_SESSION['m_admin']['contact']['TITLE'], $_SESSION['m_admin']['contact']['IS_CORPORATE_PERSON'], $_SESSION['m_admin']['contact']['IS_EXTERNAL_CONTACT']
+                , $_SESSION['user']['UserId'], $entity_id));
                 if($_SESSION['history']['contactadd'])
                 {
                     $stmt = $db->query("SELECT contact_id, creation_date FROM ".$_SESSION['tablename']['contacts_v2']
@@ -327,7 +343,27 @@ abstract class contacts_v2_Abstract extends Database
                     $res = $stmt->fetchObject();
                     $id = $res->contact_id;
                     $_SESSION['contact']['current_contact_id'] = $id;
-                
+
+                if (!empty($_SESSION['m_admin']['communication']['TYPE']) && !empty($_SESSION['m_admin']['communication']['VALUE'])) {
+                    $query = 'INSERT INTO ' . $_SESSION['tablename']['contact_communication']
+                        . ' ( contact_id, type, value) VALUES (?, ?, ?)';
+
+                    $db->query($query, array($_SESSION['contact']['current_contact_id'], $_SESSION['m_admin']['communication']['TYPE'], $_SESSION['m_admin']['communication']['VALUE']));
+
+                    if($_SESSION['history']['contact_communication_add'])
+                    {
+                        $stmt = $db->query("SELECT id FROM ".$_SESSION['tablename']['contact_communication']
+                            ." WHERE contact_id = ? and type = ? and value = ?"
+                            , array($_SESSION['contact']['current_contact_id'], $_SESSION['m_admin']['communication']['TYPE'], $_SESSION['m_admin']['communication']['VALUE']));
+                        $res = $stmt->fetchObject();
+                        $id = $res->id;
+                        $msg =  _COMMUNICATION_ADDED.' : '.functions::protect_string_db($_SESSION['m_admin']['communication']['TYPE'].' '.$_SESSION['m_admin']['communication']['VALUE']);
+                        require_once('core'.DIRECTORY_SEPARATOR.'class'.DIRECTORY_SEPARATOR.'class_history.php');
+                        $hist = new history();
+                        $hist->add($_SESSION['tablename']['contact_communication'], $id,"ADD",'contacts_communication_add',$msg, $_SESSION['config']['databasetype']);
+                    }
+                }
+
                 $_SESSION['info'] = _CONTACT_ADDED;
                 header("location: ".$path_contacts);
                 exit;
@@ -335,11 +371,11 @@ abstract class contacts_v2_Abstract extends Database
             elseif($mode == "up")
             {
                 $query = "UPDATE ".$_SESSION['tablename']['contacts_v2']
-                    ." SET update_date = current_timestamp, contact_type = ?, lastname = ?, firstname = ?,society = ?,society_short = ?,function = ?, other_data = ?, title = ?, is_corporate_person = ?";
+                    ." SET update_date = current_timestamp, contact_type = ?, lastname = ?, firstname = ?,society = ?,society_short = ?,function = ?, other_data = ?, title = ?, is_corporate_person = ?, is_external_contact = ?";
                 $query .= " WHERE contact_id = ?";
                 $arrayPDO = array($_SESSION['m_admin']['contact']['CONTACT_TYPE'], $_SESSION['m_admin']['contact']['LASTNAME'], $_SESSION['m_admin']['contact']['FIRSTNAME']
-                    , $_SESSION['m_admin']['contact']['SOCIETY'], $_SESSION['m_admin']['contact']['SOCIETY_SHORT'], $_SESSION['m_admin']['contact']['FUNCTION']
-                    , $_SESSION['m_admin']['contact']['OTHER_DATA'], $_SESSION['m_admin']['contact']['TITLE'], $_SESSION['m_admin']['contact']['IS_CORPORATE_PERSON'], $_SESSION['m_admin']['contact']['ID']);
+                , $_SESSION['m_admin']['contact']['SOCIETY'], $_SESSION['m_admin']['contact']['SOCIETY_SHORT'], $_SESSION['m_admin']['contact']['FUNCTION']
+                , $_SESSION['m_admin']['contact']['OTHER_DATA'], $_SESSION['m_admin']['contact']['TITLE'], $_SESSION['m_admin']['contact']['IS_CORPORATE_PERSON'], $_SESSION['m_admin']['contact']['IS_EXTERNAL_CONTACT'],$_SESSION['m_admin']['contact']['ID']);
 
                 $db->query($query, $arrayPDO);
                 if($_SESSION['history']['contactup'])
@@ -356,6 +392,61 @@ abstract class contacts_v2_Abstract extends Database
                     $hist = new history();
                     $hist->add($_SESSION['tablename']['contacts_v2'], $_SESSION['m_admin']['contact']['ID'],"UP",'contacts_v2_up',$msg, $_SESSION['config']['databasetype']);
                 }
+
+                if (!empty($_SESSION['m_admin']['communication']['TYPE']) && !empty($_SESSION['m_admin']['communication']['VALUE'])) {
+                    $stmt = $db->query("SELECT id FROM " . $_SESSION['tablename']['contact_communication']
+                        . " WHERE contact_id = ? AND type = ? AND value = ?"
+                        , array($_SESSION['m_admin']['contact']['ID'], $_SESSION['m_admin']['communication']['TYPE'], $_SESSION['m_admin']['communication']['VALUE']));
+                    $res = $stmt->fetchObject();
+
+                    if($res) {
+                        $query = 'UPDATE ' . $_SESSION['tablename']['contact_communication']
+                            . ' SET type = ?, value = ? WHERE contact_id = ?';
+
+                        $db->query($query, array($_SESSION['m_admin']['communication']['TYPE'], $_SESSION['m_admin']['communication']['VALUE'], $_SESSION['m_admin']['contact']['ID']));
+                        if ($_SESSION['history']['contact_communication_up']) {
+                            $stmt = $db->query("SELECT id FROM " . $_SESSION['tablename']['contact_communication']
+                                . " WHERE contact_id = ? AND type = ? AND value = ?"
+                                , array($_SESSION['m_admin']['contact']['ID'], $_SESSION['m_admin']['communication']['TYPE'], $_SESSION['m_admin']['communication']['VALUE']));
+                            $res = $stmt->fetchObject();
+                            $id = $res->id;
+                            $msg = _COMMUNICATION_MODIFIED . ' : ' . functions::protect_string_db($_SESSION['m_admin']['communication']['TYPE'] . ' ' . $_SESSION['m_admin']['communication']['VALUE']);
+                            require_once('core' . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR . 'class_history.php');
+                            $hist = new history();
+                            $hist->add($_SESSION['tablename']['contact_communication'], $id, "UP", 'contacts_communication_up', $msg, $_SESSION['config']['databasetype']);
+                        }
+                    } else {
+                        $query = 'INSERT INTO ' . $_SESSION['tablename']['contact_communication']
+                            . ' ( contact_id, type, value) VALUES (?, ?, ?)';
+
+                        $db->query($query, array($_SESSION['contact']['current_contact_id'], $_SESSION['m_admin']['communication']['TYPE'], $_SESSION['m_admin']['communication']['VALUE']));
+
+                        if($_SESSION['history']['contact_communication_add'])
+                        {
+                            $stmt = $db->query("SELECT id FROM ".$_SESSION['tablename']['contact_communication']
+                                ." WHERE contact_id = ? and type = ? and value = ?"
+                                , array($_SESSION['contact']['current_contact_id'], $_SESSION['m_admin']['communication']['TYPE'], $_SESSION['m_admin']['communication']['VALUE']));
+                            $res = $stmt->fetchObject();
+                            $id = $res->id;
+                            $msg =  _COMMUNICATION_ADDED.' : '.functions::protect_string_db($_SESSION['m_admin']['communication']['TYPE'].' '.$_SESSION['m_admin']['communication']['VALUE']);
+                            require_once('core'.DIRECTORY_SEPARATOR.'class'.DIRECTORY_SEPARATOR.'class_history.php');
+                            $hist = new history();
+                            $hist->add($_SESSION['tablename']['contact_communication'], $id,"ADD",'contacts_communication_add',$msg, $_SESSION['config']['databasetype']);
+                        }
+                    }
+                } else if (empty($_SESSION['m_admin']['communication']['TYPE']) && empty($_SESSION['m_admin']['communication']['VALUE'])) {
+                    $query = 'DELETE FROM ' . $_SESSION['tablename']['contact_communication']
+                        . ' WHERE contact_id = ?';
+
+                    $db->query($query, array($_SESSION['m_admin']['contact']['ID']));
+                    if ($_SESSION['history']['contact_communication_add']) {
+                        $msg = _COMMUNICATION_DELETED;
+                        require_once('core' . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR . 'class_history.php');
+                        $hist = new history();
+                        $hist->add($_SESSION['tablename']['contact_communication'], '', "DEL", 'contacts_communication_del', $msg, $_SESSION['config']['databasetype']);
+                    }
+                }
+
                 $this->clearcontactinfos();
                 $_SESSION['info'] = _CONTACT_MODIFIED;
                 if (isset($_SESSION['fromContactTree']) && $_SESSION['fromContactTree'] == "yes") {
@@ -412,6 +503,7 @@ abstract class contacts_v2_Abstract extends Database
                 $_SESSION['m_admin']['contact']['FUNCTION']            = functions::show_string($line->function);
                 $_SESSION['m_admin']['contact']['OTHER_DATA']          = functions::show_string($line->other_data);
                 $_SESSION['m_admin']['contact']['IS_CORPORATE_PERSON'] = functions::show_string($line->is_corporate_person);
+                $_SESSION['m_admin']['contact']['IS_EXTERNAL_CONTACT'] = functions::show_string($line->is_external_contact);
                 $_SESSION['m_admin']['contact']['CONTACT_TYPE']        = $line->contact_type;
                 $_SESSION['m_admin']['contact']['OWNER']               = $line->user_id;
                 if($admin && !empty($_SESSION['m_admin']['contact']['OWNER']))
@@ -421,11 +513,23 @@ abstract class contacts_v2_Abstract extends Database
                     $res = $stmt->fetchObject();
                     $_SESSION['m_admin']['contact']['OWNER'] = $res->lastname.', '.$res->firstname.' ('.$_SESSION['m_admin']['contact']['OWNER'].')';
                 }
+
+                $query = "SELECT * FROM ".$_SESSION['tablename']['contact_communication']." WHERE contact_id = ?";
+
+                $stmt = $db->query($query, array($id));
+
+                $_SESSION['m_admin']['communication'] = array();
+                $line = $stmt->fetchObject();
+                $_SESSION['m_admin']['communication']['ID']              = $line->id;
+                $_SESSION['m_admin']['communication']['CONTACT_ID']      = $line->contact_id;
+                $_SESSION['m_admin']['communication']['TYPE']            = functions::show_string($line->type);
+                $_SESSION['m_admin']['communication']['VALUE']           = functions::show_string($line->value);
             }
         }
         else if($mode == 'add' && !isset($_SESSION['m_admin']['contact']['IS_CORPORATE_PERSON']))
         {
             $_SESSION['m_admin']['contact']['IS_CORPORATE_PERSON'] = 'Y';
+            $_SESSION['m_admin']['contact']['IS_EXTERNAL_CONTACT'] = 'N';
         }
         require_once("apps".DIRECTORY_SEPARATOR.$_SESSION['config']['app_id'].DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_business_app_tools.php");
         $business = new business_app_tools();
@@ -462,7 +566,7 @@ abstract class contacts_v2_Abstract extends Database
             echo '</h2>';
         }
         ?>
-        <div id="inner_content_contact" class="clearfix" align="center" style="margin-bottom:15px;width:100% !important;"> 
+        <div id="inner_content_contact" class="clearfix" align="center" style="margin-bottom:15px;width:100% !important;">
             <?php
             if($state == false)
             {
@@ -501,13 +605,23 @@ abstract class contacts_v2_Abstract extends Database
                 <table id="frmcontact_table">
                     <tr>
                         <td>&nbsp;</td>
-                        <td class="indexing_field" style="text-align:center">
-                            <span id="span_corporate">
-                                <input type="radio" class="check" name="is_corporate"  value="Y" <?php if($_SESSION['m_admin']['contact']['IS_CORPORATE_PERSON'] == 'Y'){?> checked="checked"<?php } ?> onclick="javascript:show_admin_contacts( true, '<?php functions::xecho($display_value);?>');setContactType('corporate', '<?php echo ($can_add_contact);?>')" id="corpo_yes"><span onclick="$j('#corpo_yes').click();" onmouseover="this.style.cursor='pointer';"><?php echo _IS_CORPORATE_PERSON;?></span>                        
-                            </span>
-                            <span id="span_no_corporate">
-                                <input type="radio" class="check" name="is_corporate" value="N" <?php if($_SESSION['m_admin']['contact']['IS_CORPORATE_PERSON'] == 'N'){?> checked="checked"<?php } ?> onclick="javascript:show_admin_contacts( false, '<?php functions::xecho($display_value);?>');setContactType('no_corporate', '<?php echo ($can_add_contact);?>')" id="corpo_no"><span onclick="$j('#corpo_no').click();" onmouseover="this.style.cursor='pointer';"><?php echo _INDIVIDUAL;?></span>
-                            </span>
+                        <td class="indexing_field">
+                            <input type="radio"  class="check" name="is_external" value="N" <?php if($_SESSION['m_admin']['contact']['IS_EXTERNAL_CONTACT'] == 'N'){?> checked="checked"<?php } ?> onclick="javascript:show_admin_external_contact( false, '<?php functions::xecho($display_value);?>')" id="external_no"><span onclick="$('external_no').click();" onmouseover="this.style.cursor='pointer';"><?php echo _IS_INTERNAL_CONTACT;?></span>
+                            <input type="radio"  class="check" name="is_external"  value="Y" <?php if($_SESSION['m_admin']['contact']['IS_EXTERNAL_CONTACT'] == 'Y'){?> checked="checked"<?php } ?> onclick="javascript:show_admin_external_contact( true, '<?php functions::xecho($display_value);?>')" id="external_yes"><span onclick="$('external_yes').click();" onmouseover="this.style.cursor='pointer';"><?php echo _IS_EXTERNAL_CONTACT;?></span>
+                        </td>
+                        <td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </td>
+                        <td>&nbsp;</td>
+                    </tr>
+                    <tr id="search_directory" style="display:<?php if($_SESSION['m_admin']['contact']['IS_EXTERNAL_CONTACT'] == 'N'){ echo 'none';}else{ functions::xecho($display_value);}?>">
+                        <td><label for="searchDirectory"><?php echo _SEARCH_DIRECTORY;?> : </label></td>
+                        <td class="indexing_field"><input name="searchDirectory" type="text" onkeyup="this.value=this.value.toUpperCase()" id="lastname" value=""/></td>
+                        <td>&nbsp;</td>
+                    </tr>
+                    <tr>
+                        <td>&nbsp;</td>
+                        <td class="indexing_field">
+                            <input type="radio"  class="check" name="is_corporate"  value="Y" <?php if($_SESSION['m_admin']['contact']['IS_CORPORATE_PERSON'] == 'Y'){?> checked="checked"<?php } ?> onclick="javascript:show_admin_contacts( true, '<?php functions::xecho($display_value);?>');setContactType('corporate', '<?php echo ($can_add_contact);?>')" id="corpo_yes"><span onclick="$('corpo_yes').click();" onmouseover="this.style.cursor='pointer';"><?php echo _IS_CORPORATE_PERSON;?></span>
+                            <input type="radio"  class="check" name="is_corporate" value="N" <?php if($_SESSION['m_admin']['contact']['IS_CORPORATE_PERSON'] == 'N'){?> checked="checked"<?php } ?> onclick="javascript:show_admin_contacts( false, '<?php functions::xecho($display_value);?>');setContactType('no_corporate', '<?php echo ($can_add_contact);?>')" id="corpo_no"><span onclick="$('corpo_no').click();" onmouseover="this.style.cursor='pointer';"><?php echo _INDIVIDUAL;?></span>
                         </td>
                         <td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </td>
                         <td>&nbsp;</td>
@@ -599,6 +713,27 @@ abstract class contacts_v2_Abstract extends Database
                         <td class="indexing_field"><textarea name="comp_data" id="comp_data"><?php if($mode<>'add' && isset($_SESSION['m_admin']['contact']['OTHER_DATA'])){functions::xecho($func->show_str($_SESSION['m_admin']['contact']['OTHER_DATA'])); }?></textarea></td>
                         <td>&nbsp;</td>
                     </tr>
+                        <tr id="communication_type_tr" >
+                            <td><?php echo _COMMUNICATION_TYPE;?> :</td>
+                            <td class="indexing_field">
+                                <select name="communication_type" id="communication_type">
+                                    <option value=""><?php echo _CHOOSE_COMMUNICATION_TYPES;?></option>
+                                    <?php if ($_SESSION['m_admin']['communication']['TYPE'] == "email") { ?>
+                                        <option value="email" selected="selected"><?php echo _EMAIL;?></option>
+                                    <?php } else { ?>
+                                        <option value="email"><?php echo _EMAIL;?></option>
+                                    <?php }
+                                    if ($_SESSION['m_admin']['communication']['TYPE'] == "url") { ?>
+                                        <option value="url" selected="selected"><?php echo _URL;?></option>
+                                    <?php } else { ?>
+                                        <option value="url"><?php echo _URL;?></option>
+                                    <?php } ?>
+                                </select></td>
+                        </tr>
+                        <tr>
+                            <td><?php echo _COMMUNICATION_VALUE;?> :</td>
+                            <td class="indexing_field"><input name="communication_value" type="text"  id="communication_value" value="<?php if(isset($_SESSION['m_admin']['communication']['VALUE'])){ functions::xecho($func->show_str($_SESSION['m_admin']['communication']['VALUE'])); }?>"/></td>
+                        </tr>
                 </table>
                         <input name="mode" type="hidden" value="<?php echo $mode;?>" />
                         <br/>
@@ -817,12 +952,14 @@ abstract class contacts_v2_Abstract extends Database
                     $res = $stmt->fetchObject();
                     $db->query("DELETE FROM " . $_SESSION['tablename']['contacts_v2'] . " WHERE contact_id = ?", array($id));
                     $db->query("DELETE FROM " . $_SESSION['tablename']['contact_addresses'] . " WHERE contact_id = ?", array($id));
+                    $db->query("DELETE FROM " . $_SESSION['tablename']['contact_communication'] . " WHERE contact_id = ?", array($id));
                     if($_SESSION['history']['contactdel'])
                     {
                         require_once('core'.DIRECTORY_SEPARATOR.'class'.DIRECTORY_SEPARATOR.'class_history.php');
                         $hist = new history();
                         $hist->add($_SESSION['tablename']['contacts_v2'], $id,"DEL","contactdel",_CONTACT_DELETED.' : '.$id, $_SESSION['config']['databasetype']);
                         $hist->add($_SESSION['tablename']['contact_addresses'], $id,"DEL","contact_addresses_del", _ADDRESS_DEL." ".strtolower(_NUM).$id."", $_SESSION['config']['databasetype']);
+                        $hist->add($_SESSION['tablename']['contact_communication'], $id,"DEL","contact_communication_del",_COMMUNICATION_DELETED." ".strtolower(_NUM).$id."", $_SESSION['config']['databasetype']);
                     }
                     $_SESSION['info'] = _CONTACT_DELETED;
                 }
@@ -1009,6 +1146,7 @@ abstract class contacts_v2_Abstract extends Database
                     $_SESSION['m_admin']['address']['IS_PRIVATE']         = functions::show_string($line->is_private);
                     $_SESSION['m_admin']['address']['SALUTATION_HEADER']  = functions::show_string($line->salutation_header);
                     $_SESSION['m_admin']['address']['SALUTATION_FOOTER']  = functions::show_string($line->salutation_footer);
+                    $_SESSION['m_admin']['address']['EXTERNAL_CONTACT_ID'] = functions::show_string($line->external_contact_id);
                 } else {
                     unset($_SESSION['address_up_error']);
                 }
@@ -1328,6 +1466,10 @@ abstract class contacts_v2_Abstract extends Database
                             <td><label for="comp_data"><?php echo _COMP_DATA;?>&nbsp;:</label></td>
                             <td><textarea style="margin-left:0px;" class="<?php echo $fieldAddressClass;?>" name="comp_data" id="comp_data"><?php if(isset($_SESSION['m_admin']['address']['OTHER_DATA'])){functions::xecho($func->show_str($_SESSION['m_admin']['address']['OTHER_DATA'])); }?></textarea></td>
                         </tr>
+                        <tr>
+                            <td><label for="external_contact_id"><?php echo _EXTERNAL_CONTACT_ID;?> :</label></td>
+                            <td><input style="margin-left:0px;" class="<?php echo $fieldAddressClass;?>" name="external_contact_id" id="external_contact_id"  type="text" value="<?php if(isset($_SESSION['m_admin']['address']['EXTERNAL_CONTACT_ID'])){ functions::xecho($func->show_str($_SESSION['m_admin']['address']['EXTERNAL_CONTACT_ID']));} ?>" /></td>
+                        </tr>
                         <tr>
                             <td><?php echo _IS_PRIVATE;?>&nbsp;: </td>
                             <td>
@@ -1440,10 +1582,10 @@ abstract class contacts_v2_Abstract extends Database
         $db = new Database();
         // add ou modify users in the database
         $this->addressinfo($mode);
-        $order = $_SESSION['m_admin']['address']['order'];
+        $order       = $_SESSION['m_admin']['address']['order'];
         $order_field = $_SESSION['m_admin']['address']['order_field'];
-        $what = $_SESSION['m_admin']['address']['what'];
-        $start = $_SESSION['m_admin']['address']['start'];
+        $what        = $_SESSION['m_admin']['address']['what'];
+        $start       = $_SESSION['m_admin']['address']['start'];
 
         $path_contacts = $_SESSION['config']['businessappurl']
                        . 'index.php?page=contacts_v2_up&order='
@@ -1550,15 +1692,15 @@ abstract class contacts_v2_Abstract extends Database
                         . 'phone , email , address_num, address_street, '
                         . 'address_complement, address_town, '
                         . 'address_postal_code, address_country, other_data,'
-                        . " title, is_private, website, occupancy, user_id, entity_id, salutation_header, salutation_footer) VALUES (?, ?, 
-                            ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
+                        . " title, is_private, website, occupancy, user_id, entity_id, salutation_header, salutation_footer, external_contact_id) VALUES (?, ?, 
+                            ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
 
                 $arrayPDO = array($_SESSION['contact']['current_contact_id'], $_SESSION['m_admin']['address']['CONTACT_PURPOSE_ID'], $_SESSION['m_admin']['address']['DEPARTEMENT'],
                     $_SESSION['m_admin']['address']['LASTNAME'], $_SESSION['m_admin']['address']['FIRSTNAME'], $_SESSION['m_admin']['address']['FUNCTION'], $_SESSION['m_admin']['address']['PHONE'],
                     $_SESSION['m_admin']['address']['MAIL'], $_SESSION['m_admin']['address']['ADD_NUM'], $_SESSION['m_admin']['address']['ADD_STREET'], $_SESSION['m_admin']['address']['ADD_COMP'],
                     $_SESSION['m_admin']['address']['ADD_TOWN'], $_SESSION['m_admin']['address']['ADD_CP'], $_SESSION['m_admin']['address']['ADD_COUNTRY'], $_SESSION['m_admin']['address']['OTHER_DATA'],
                     $_SESSION['m_admin']['address']['TITLE'], $_SESSION['m_admin']['address']['IS_PRIVATE'], $_SESSION['m_admin']['address']['WEBSITE'], $_SESSION['m_admin']['address']['OCCUPANCY'],
-                    $_SESSION['user']['UserId'], $entity_id, $_SESSION['m_admin']['address']['SALUTATION_HEADER'], $_SESSION['m_admin']['address']['SALUTATION_FOOTER']);
+                    $_SESSION['user']['UserId'], $entity_id, $_SESSION['m_admin']['address']['SALUTATION_HEADER'], $_SESSION['m_admin']['address']['SALUTATION_FOOTER'], $_SESSION['m_admin']['address']['EXTERNAL_CONTACT_ID']);
 
                 $db->query($query, $arrayPDO);
                 if($_SESSION['history']['addressadd'])
@@ -1612,7 +1754,8 @@ abstract class contacts_v2_Abstract extends Database
                         , other_data = ?
                         , is_private = ?
                         , salutation_header = ?
-                        , salutation_footer = ?";
+                        , salutation_footer = ?
+                        , external_contact_id = ?";
 
                 $query .=" WHERE id = ?";
 
@@ -1620,7 +1763,7 @@ abstract class contacts_v2_Abstract extends Database
                     $_SESSION['m_admin']['address']['LASTNAME'], $_SESSION['m_admin']['address']['TITLE'], $_SESSION['m_admin']['address']['FUNCTION'], $_SESSION['m_admin']['address']['PHONE'],
                     $_SESSION['m_admin']['address']['MAIL'], $_SESSION['m_admin']['address']['OCCUPANCY'], $_SESSION['m_admin']['address']['ADD_NUM'], $_SESSION['m_admin']['address']['ADD_STREET'], $_SESSION['m_admin']['address']['ADD_COMP'],
                     $_SESSION['m_admin']['address']['ADD_TOWN'], $_SESSION['m_admin']['address']['ADD_CP'], $_SESSION['m_admin']['address']['ADD_COUNTRY'], $_SESSION['m_admin']['address']['WEBSITE'], 
-                    $_SESSION['m_admin']['address']['OTHER_DATA'], $_SESSION['m_admin']['address']['IS_PRIVATE'], $_SESSION['m_admin']['address']['SALUTATION_HEADER'], $_SESSION['m_admin']['address']['SALUTATION_FOOTER'],
+                    $_SESSION['m_admin']['address']['OTHER_DATA'], $_SESSION['m_admin']['address']['IS_PRIVATE'], $_SESSION['m_admin']['address']['SALUTATION_HEADER'], $_SESSION['m_admin']['address']['SALUTATION_FOOTER'], $_SESSION['m_admin']['address']['EXTERNAL_CONTACT_ID'] ,
                     $_SESSION['m_admin']['address']['ID']);
 
 
@@ -1669,6 +1812,13 @@ abstract class contacts_v2_Abstract extends Database
             $_REQUEST['new_id'], 'no', _CONTACT_PURPOSE . ' ', 'yes', 0, 255
         );
 
+        if ($_REQUEST['external_contact_id'] <> '') {
+            $_SESSION['m_admin']['address']['EXTERNAL_CONTACT_ID'] = $func->wash(
+                $_REQUEST['external_contact_id'], 'no', _EXTERNAL_CONTACT_ID . ' ', 'yes', 0, 255
+            );
+        } else {
+            $_SESSION['m_admin']['address']['EXTERNAL_CONTACT_ID'] = '';
+        }
 
         if ($_REQUEST['departement'] <> '') {
             $_SESSION['m_admin']['address']['DEPARTEMENT'] = $func->wash(
@@ -2219,6 +2369,13 @@ abstract class contacts_v2_Abstract extends Database
                         <td width="45%" class="indexing_field" align="left"><textarea disabled class="readonly" name="comp_data"   id="comp_data"><?php if(isset($_SESSION['m_admin']['contact']['OTHER_DATA'])){functions::xecho($func->show_str($_SESSION['m_admin']['contact']['OTHER_DATA'])); }?></textarea></td>
                         <td width="5%">&nbsp;</td>
                     </tr>
+                    <?php if($_SESSION['m_admin']['contact']['IS_EXTERNAL_CONTACT'] == 'Y'){?>
+                        <tr>
+                            <td width="50%"><label><?php echo _COMMUNICATION_TYPE;?></label>: </td>
+                            <td width="45%" class="indexing_field" align="left"><textarea disabled name="is_external_contact_id" id="is_external_contact_id"><?php if(isset($_SESSION['m_admin']['communication']['VALUE'])){functions::xecho($func->show_str($_SESSION['m_admin']['communication']['VALUE'])); }?></textarea></td>
+                            <td width="5%">&nbsp;</td>
+                        </tr>
+                    <?php } ?>
                 </table>
             </div>
         </form>
@@ -2333,6 +2490,11 @@ abstract class contacts_v2_Abstract extends Database
                         <td>&nbsp;</td>
                         <td class="indexing_field" ><textarea class="contact_field_margin readonly" disabled name="comp_data" id="comp_data"><?php if(isset($_SESSION['m_admin']['address']['OTHER_DATA'])){functions::xecho($func->show_str($_SESSION['m_admin']['address']['OTHER_DATA'])); }?></textarea></td>
                     </tr>
+                    <tr>
+                        <td><label for="external_contact_id"><?php echo _EXTERNAL_CONTACT_ID;?> :<label></td>
+                        <td>&nbsp;</td>
+                        <td class="indexing_field"><input class="contact_field_margin readonly" disabled name="external_contact_id" id="external_contact_id"  type="text" value="<?php if(isset($_SESSION['m_admin']['address']['EXTERNAL_CONTACT_ID'])){ functions::xecho($func->show_str($_SESSION['m_admin']['address']['EXTERNAL_CONTACT_ID']));} ?>" /></td>
+                    </tr>
                     <tr>
                         <td><?php echo _IS_PRIVATE;?>&nbsp;: </td>
                         <td>&nbsp;</td>
diff --git a/apps/maarch_entreprise/css/engine.css b/apps/maarch_entreprise/css/engine.css
index 7f1eb40c75fd51141eebe1a565e1cf94c3cde020..c779df78b235cc3e0831172ce3010ed5da1fcf44 100755
--- a/apps/maarch_entreprise/css/engine.css
+++ b/apps/maarch_entreprise/css/engine.css
@@ -300,4 +300,9 @@ h1.admin-app-name {
     .admin-toolbar-title {
         margin-left: 0px !important;
     }
+}
+.jstree-checkbox { display: none !important; }
+
+.card-app-content {
+    min-height: 100%;
 }
\ No newline at end of file
diff --git a/apps/maarch_entreprise/css/jstree-custom.min.css b/apps/maarch_entreprise/css/jstree-custom.min.css
index 89b68099e7cdf9daa024d9cc198ab7114227ea37..a1195a605e285177d966af91f66bee0c31e91ee5 100644
--- a/apps/maarch_entreprise/css/jstree-custom.min.css
+++ b/apps/maarch_entreprise/css/jstree-custom.min.css
@@ -1 +1 @@
-.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#333;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;-moz-box-shadow:5px 5px 4px -4px #666;-webkit-box-shadow:2px 2px 2px #999;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none;display:inline}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;-moz-text-shadow:1px 1px 0 #fff;-webkit-text-shadow:1px 1px 0 #fff;text-shadow:1px 1px 0 #fff;-moz-border-radius:1px;-webkit-border-radius:1px;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;-moz-box-shadow:0 0 2px #0a6aa1;-webkit-box-shadow:0 0 2px #0a6aa1;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;-moz-box-shadow:0 0 2px #0a6aa1;-webkit-box-shadow:0 0 2px #0a6aa1;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;-moz-text-shadow:0 0 0 transparent;-webkit-text-shadow:0 0 0 transparent;text-shadow:0 0 0 transparent;-moz-box-shadow:0 0 0 transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-proton .jstree-node,.jstree-proton .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-proton .jstree-anchor,.jstree-proton .jstree-wholerow{transition:background-color .15s,box-shadow .15s,color .15s}.jstree-proton .jstree-hovered{background:#76b6ec;color:#fff;border-radius:3px;box-shadow:inset 0 0 1px #76b6ec}.jstree-proton .jstree-clicked{background:#3392e3;color:#fff;border-radius:3px;box-shadow:inset 0 0 1px #3392e3}.jstree-proton .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-proton .jstree-disabled{background:0 0;color:#666}.jstree-proton .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-proton .jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");-webkit-filter:grayscale(100%)}.jstree-proton .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-proton .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-proton.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;color:inherit;box-shadow:none}.jstree-proton.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#76b6ec;color:#fff}.jstree-proton.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0;color:inherit}.jstree-proton.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#76b6ec;color:#fff}.jstree-proton>.jstree-striped{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-proton>.jstree-wholerow-ul .jstree-hovered,.jstree-proton>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-proton .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-proton .jstree-wholerow-hovered{background:#76b6ec}.jstree-proton .jstree-wholerow-clicked{background:#3392e3;background:-moz-linear-gradient(top,#3392e3 0,#3392e3 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#3392e3),color-stop(100%,#3392e3));background:-webkit-linear-gradient(top,#3392e3 0,#3392e3 100%);background:-o-linear-gradient(top,#3392e3 0,#3392e3 100%);background:-ms-linear-gradient(top,#3392e3 0,#3392e3 100%);background:linear-gradient(to bottom,#3392e3 0,#3392e3 100%)}.jstree-proton .jstree-node{min-height:22px;line-height:22px;margin-left:22px;min-width:22px}.jstree-proton .jstree-anchor{line-height:22px;margin:1px 0 2px;height:22px}.jstree-proton .jstree-icon{width:22px;height:22px;line-height:22px}.jstree-proton .jstree-icon:empty{width:22px;height:22px;line-height:22px}.jstree-proton.jstree-rtl .jstree-node{margin-right:22px}.jstree-proton .jstree-wholerow{height:22px}.jstree-proton .jstree-node,.jstree-proton .jstree-icon{background-size:320px 96px;background-image:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png)}.jstree-proton .jstree-node{background-position:-293px -5px;background-repeat:repeat-y}.jstree-proton .jstree-last{background:0 0}.jstree-proton .jstree-open>.jstree-ocl{background-position:-133px -5px}.jstree-proton .jstree-closed>.jstree-ocl{background-position:-101px -5px}.jstree-proton .jstree-leaf>.jstree-ocl{background-position:-69px -5px}.jstree-proton .jstree-themeicon{background-position:-261px -7px}.jstree-proton>.jstree-no-dots .jstree-node,.jstree-proton>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-37px -5px}.jstree-proton>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-5px -5px}.jstree-proton .jstree-disabled{background:0 0}.jstree-proton .jstree-disabled.jstree-hovered{background:0 0}.jstree-proton .jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton .jstree-checkbox{background-position:-165px -5px}.jstree-proton .jstree-checkbox:hover{background-position:-165px -37px}.jstree-proton.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-proton .jstree-checked>.jstree-checkbox{background-position:-229px -5px}.jstree-proton.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-proton .jstree-checked>.jstree-checkbox:hover{background-position:-229px -37px}.jstree-proton .jstree-anchor>.jstree-undetermined{background-position:-197px -5px}.jstree-proton .jstree-anchor>.jstree-undetermined:hover{background-position:-197px -37px}.jstree-proton>.jstree-striped{background-size:auto 44px}.jstree-proton.jstree-rtl .jstree-node{background-size:320px 96px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-proton.jstree-rtl .jstree-last{background:0 0}.jstree-proton.jstree-rtl .jstree-open>.jstree-ocl{background-position:-133px -37px}.jstree-proton.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-101px -37px}.jstree-proton.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-69px -37px}.jstree-proton.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-proton.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-37px -37px}.jstree-proton.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-5px -37px}.jstree-proton .jstree-themeicon-custom{background-color:transparent;background-size:320px 96px;background-image:none;background-position:0 0}.jstree-proton>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/throbber.gif) center center no-repeat}.jstree-proton .jstree-file{background:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png) -101px -69px no-repeat}.jstree-proton .jstree-folder{background:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png) -261px -5px no-repeat}.jstree-proton>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-proton{line-height:22px;padding:0 4px}#jstree-dnd.jstree-proton .jstree-ok,#jstree-dnd.jstree-proton .jstree-er{background-size:320px 96px;background-image:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-proton i{background:0 0;width:22px;height:22px;line-height:22px}#jstree-dnd.jstree-proton .jstree-ok{background-position:-5px -69px}#jstree-dnd.jstree-proton .jstree-er{background-position:-37px -69px}.jstree-proton.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-proton.jstree-rtl .jstree-last{background:0 0}.jstree-proton-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-proton-small .jstree-anchor{line-height:18px;margin:1px 0 2px;height:18px}.jstree-proton-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-proton-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-proton-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-proton-small .jstree-wholerow{height:18px}.jstree-proton-small .jstree-node,.jstree-proton-small .jstree-icon{background-size:320px 96px;background-image:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png)}.jstree-proton-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-proton-small .jstree-last{background:0 0}.jstree-proton-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-proton-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-proton-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-proton-small .jstree-themeicon{background-position:-263px -9px}.jstree-proton-small>.jstree-no-dots .jstree-node,.jstree-proton-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-proton-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-proton-small .jstree-disabled{background:0 0}.jstree-proton-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-proton-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton-small .jstree-checkbox{background-position:-167px -7px}.jstree-proton-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-proton-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-proton-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-proton-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-proton-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-proton-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-proton-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-proton-small>.jstree-striped{background-size:auto 36px}.jstree-proton-small.jstree-rtl .jstree-node{background-size:320px 96px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-proton-small.jstree-rtl .jstree-last{background:0 0}.jstree-proton-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-proton-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-proton-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-proton-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-proton-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-proton-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-proton-small .jstree-themeicon-custom{background-color:transparent;background-size:320px 96px;background-image:none;background-position:0 0}.jstree-proton-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/throbber.gif) center center no-repeat}.jstree-proton-small .jstree-file{background:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png) -103px -71px no-repeat}.jstree-proton-small .jstree-folder{background:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png) -263px -7px no-repeat}.jstree-proton-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-proton-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-proton-small .jstree-ok,#jstree-dnd.jstree-proton-small .jstree-er{background-size:320px 96px;background-image:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-proton-small i{background:0 0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-proton-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-proton-small .jstree-er{background-position:-39px -71px}.jstree-proton-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-proton-small.jstree-rtl .jstree-last{background:0 0}.jstree-proton-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-proton-large .jstree-anchor{line-height:32px;margin:1px 0 2px;height:32px}.jstree-proton-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-proton-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-proton-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-proton-large .jstree-wholerow{height:32px}.jstree-proton-large .jstree-node,.jstree-proton-large .jstree-icon{background-size:320px 96px;background-image:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png)}.jstree-proton-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-proton-large .jstree-last{background:0 0}.jstree-proton-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-proton-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-proton-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-proton-large .jstree-themeicon{background-position:-256px -2px}.jstree-proton-large>.jstree-no-dots .jstree-node,.jstree-proton-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-proton-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-proton-large .jstree-disabled{background:0 0}.jstree-proton-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-proton-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton-large .jstree-checkbox{background-position:-160px 0}.jstree-proton-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-proton-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-proton-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-proton-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-proton-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-proton-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-proton-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-proton-large>.jstree-striped{background-size:auto 64px}.jstree-proton-large.jstree-rtl .jstree-node{background-size:320px 96px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-proton-large.jstree-rtl .jstree-last{background:0 0}.jstree-proton-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-proton-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-proton-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-proton-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-proton-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-proton-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-proton-large .jstree-themeicon-custom{background-color:transparent;background-size:320px 96px;background-image:none;background-position:0 0}.jstree-proton-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/throbber.gif) center center no-repeat}.jstree-proton-large .jstree-file{background:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png) -96px -64px no-repeat}.jstree-proton-large .jstree-folder{background:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png) -256px 0 no-repeat}.jstree-proton-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-proton-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-proton-large .jstree-ok,#jstree-dnd.jstree-proton-large .jstree-er{background-size:320px 96px;background-image:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-proton-large i{background:0 0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-proton-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-proton-large .jstree-er{background-position:-32px -64px}.jstree-proton-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-proton-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:30px;font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0 0;width:30px;height:30px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/30px.png);background-position:0 -150px;background-size:90px 180px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/30px.png);background-position:-30px -150px;background-size:90px 180px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-proton-responsive .jstree-container-ul{overflow:hidden}.jstree-proton-responsive .jstree-icon{background-image:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/30px.png);background-size:90px 180px}.jstree-proton-responsive .jstree-node,.jstree-proton-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-responsive .jstree-node{min-height:30px;line-height:30px;margin-left:30px;min-width:30px;white-space:nowrap}.jstree-proton-responsive .jstree-anchor{line-height:38px;height:38px;margin:0}.jstree-proton-responsive .jstree-icon,.jstree-proton-responsive .jstree-icon:empty{margin-top:4px;width:30px;height:30px;line-height:30px}.jstree-proton-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-proton-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:30px}.jstree-proton-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-proton-responsive .jstree-ocl,.jstree-proton-responsive .jstree-themeicon,.jstree-proton-responsive .jstree-checkbox{background-size:90px 180px}.jstree-proton-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-proton-responsive .jstree-closed>.jstree-ocl{background-position:0 -30px!important}.jstree-proton-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-30px 0!important}.jstree-proton-responsive .jstree-themeicon{background-position:-30px -30px}.jstree-proton-responsive .jstree-checkbox,.jstree-proton-responsive .jstree-checkbox:hover{background-position:-30px -60px}.jstree-proton-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-proton-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-proton-responsive .jstree-checked>.jstree-checkbox,.jstree-proton-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -60px}.jstree-proton-responsive .jstree-anchor>.jstree-undetermined,.jstree-proton-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -90px}.jstree-proton-responsive>.jstree-striped{background:0 0}.jstree-proton-responsive .jstree-wholerow-ul li{position:relative}.jstree-proton-responsive .jstree-wholerow-ul .jstree-wholerow{position:absolute;top:0;left:-1000px;right:-1000px;width:auto;height:100%}.jstree-proton-responsive .jstree-wholerow{border-top:1px solid rgba(0,0,0,.05);background:rgba(0,0,0,.02);height:30px}.jstree-proton-responsive .jstree-wholerow-hovered{background:#76b6ec}.jstree-proton-responsive .jstree-wholerow-clicked{background:#3392e3}.jstree-proton-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-proton-responsive .jstree-node,.jstree-proton-responsive .jstree-icon,.jstree-proton-responsive .jstree-node>.jstree-ocl,.jstree-proton-responsive .jstree-themeicon,.jstree-proton-responsive .jstree-checkbox{background-image:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/30px.png);background-size:90px 180px}.jstree-proton-responsive .jstree-node{background-position:-60px 0;background-repeat:repeat-y}.jstree-proton-responsive .jstree-last{background:0 0}.jstree-proton-responsive .jstree-leaf>.jstree-ocl{background-position:-30px -90px}.jstree-proton-responsive .jstree-last>.jstree-ocl{background-position:-30px -120px}.jstree-proton-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-proton-responsive .jstree-file{background:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/30px.png) 0 -120px no-repeat;background-size:90px 180px}.jstree-proton-responsive .jstree-folder{background:url(../../node_modules/jstree-bootstrap-theme/dist/themes/proton/30px.png) -30px -30px no-repeat;background-size:90px 180px}.jstree-proton-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}}@font-face{font-family:'Titillium Web';src:url(fonts/titillium/titilliumweb-extralight-webfont.eot);src:url(fonts/titillium/titilliumweb-extralight-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/titillium/titilliumweb-extralight-webfont.woff) format('woff'),url(fonts/titillium/titilliumweb-extralight-webfont.ttf) format('truetype'),url(fonts/titillium/titilliumweb-extralight-webfont.svg#titillium_webthin) format('svg');font-weight:300;font-style:normal}@font-face{font-family:'Titillium Web';src:url(fonts/titillium/titilliumweb-regular-webfont.eot);src:url(fonts/titillium/titilliumweb-regular-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/titillium/titilliumweb-regular-webfont.woff) format('woff'),url(fonts/titillium/titilliumweb-regular-webfont.ttf) format('truetype'),url(fonts/titillium/titilliumweb-regular-webfont.svg#titillium_webregular) format('svg');font-weight:400;font-style:normal}@font-face{font-family:'Titillium Web';src:url(fonts/titillium/titilliumweb-bold-webfont.eot);src:url(fonts/titillium/titilliumweb-bold-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/titillium/titilliumweb-bold-webfont.woff) format('woff'),url(fonts/titillium/titilliumweb-bold-webfont.ttf) format('truetype'),url(fonts/titillium/titilliumweb-bold-webfont.svg#titillium_webbold) format('svg');font-weight:700;font-style:normal}@media screen and (-webkit-min-device-pixel-ratio:0){@font-face{font-family:'Titillium Web';src:url(fonts/titillium/titilliumweb-extralight-webfont.svg#titillium_webthin) format('svg');font-weight:300;font-style:normal}@font-face{font-family:'Titillium Web';src:url(fonts/titillium/titilliumweb-regular-webfont.svg#titillium_webregular) format('svg');font-weight:400;font-style:normal}@font-face{font-family:'Titillium Web';src:url(fonts/titillium/titilliumweb-bold-webfont.svg#titillium_webbold) format('svg');font-weight:700;font-style:normal}}.jstree-proton{font-family:'Titillium Web',sans-serif,Arial,sans-serif}
\ No newline at end of file
+.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#333;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;-moz-box-shadow:5px 5px 4px -4px #666;-webkit-box-shadow:2px 2px 2px #999;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none;display:inline}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;-moz-text-shadow:1px 1px 0 #fff;-webkit-text-shadow:1px 1px 0 #fff;text-shadow:1px 1px 0 #fff;-moz-border-radius:1px;-webkit-border-radius:1px;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;-moz-box-shadow:0 0 2px #0a6aa1;-webkit-box-shadow:0 0 2px #0a6aa1;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;-moz-box-shadow:0 0 2px #0a6aa1;-webkit-box-shadow:0 0 2px #0a6aa1;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;-moz-text-shadow:0 0 0 transparent;-webkit-text-shadow:0 0 0 transparent;text-shadow:0 0 0 transparent;-moz-box-shadow:0 0 0 transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-proton .jstree-node,.jstree-proton .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-proton .jstree-anchor,.jstree-proton .jstree-wholerow{transition:background-color .15s,box-shadow .15s,color .15s}.jstree-proton .jstree-hovered{background:#76b6ec;color:#fff;border-radius:3px;box-shadow:inset 0 0 1px #76b6ec}.jstree-proton .jstree-clicked{background:#3392e3;color:#fff;border-radius:3px;box-shadow:inset 0 0 1px #3392e3}.jstree-proton .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-proton .jstree-disabled{background:0 0;color:#666}.jstree-proton .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-proton .jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");-webkit-filter:grayscale(100%)}.jstree-proton .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-proton .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-proton.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;color:inherit;box-shadow:none}.jstree-proton.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#76b6ec;color:#fff}.jstree-proton.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0;color:inherit}.jstree-proton.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#76b6ec;color:#fff}.jstree-proton>.jstree-striped{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-proton>.jstree-wholerow-ul .jstree-hovered,.jstree-proton>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-proton .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-proton .jstree-wholerow-hovered{background:#76b6ec}.jstree-proton .jstree-wholerow-clicked{background:#3392e3;background:-moz-linear-gradient(top,#3392e3 0,#3392e3 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#3392e3),color-stop(100%,#3392e3));background:-webkit-linear-gradient(top,#3392e3 0,#3392e3 100%);background:-o-linear-gradient(top,#3392e3 0,#3392e3 100%);background:-ms-linear-gradient(top,#3392e3 0,#3392e3 100%);background:linear-gradient(to bottom,#3392e3 0,#3392e3 100%)}.jstree-proton .jstree-node{min-height:22px;line-height:22px;margin-left:22px;min-width:22px}.jstree-proton .jstree-anchor{line-height:22px;margin:1px 0 2px;height:22px}.jstree-proton .jstree-icon{width:22px;height:22px;line-height:22px}.jstree-proton .jstree-icon:empty{width:22px;height:22px;line-height:22px}.jstree-proton.jstree-rtl .jstree-node{margin-right:22px}.jstree-proton .jstree-wholerow{height:22px}.jstree-proton .jstree-node,.jstree-proton .jstree-icon{background-size:320px 96px;background-image:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png)}.jstree-proton .jstree-node{background-position:-293px -5px;background-repeat:repeat-y}.jstree-proton .jstree-last{background:0 0}.jstree-proton .jstree-open>.jstree-ocl{background-position:-133px -5px}.jstree-proton .jstree-closed>.jstree-ocl{background-position:-101px -5px}.jstree-proton .jstree-leaf>.jstree-ocl{background-position:-69px -5px}.jstree-proton .jstree-themeicon{background-position:-261px -7px}.jstree-proton>.jstree-no-dots .jstree-node,.jstree-proton>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-37px -5px}.jstree-proton>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-5px -5px}.jstree-proton .jstree-disabled{background:0 0}.jstree-proton .jstree-disabled.jstree-hovered{background:0 0}.jstree-proton .jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton .jstree-checkbox{background-position:-165px -5px}.jstree-proton .jstree-checkbox:hover{background-position:-165px -37px}.jstree-proton.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-proton .jstree-checked>.jstree-checkbox{background-position:-229px -5px}.jstree-proton.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-proton .jstree-checked>.jstree-checkbox:hover{background-position:-229px -37px}.jstree-proton .jstree-anchor>.jstree-undetermined{background-position:-197px -5px}.jstree-proton .jstree-anchor>.jstree-undetermined:hover{background-position:-197px -37px}.jstree-proton>.jstree-striped{background-size:auto 44px}.jstree-proton.jstree-rtl .jstree-node{background-size:320px 96px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-proton.jstree-rtl .jstree-last{background:0 0}.jstree-proton.jstree-rtl .jstree-open>.jstree-ocl{background-position:-133px -37px}.jstree-proton.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-101px -37px}.jstree-proton.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-69px -37px}.jstree-proton.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-proton.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-37px -37px}.jstree-proton.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-5px -37px}.jstree-proton .jstree-themeicon-custom{background-color:transparent;background-size:320px 96px;background-image:none;background-position:0 0}.jstree-proton>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/throbber.gif) center center no-repeat}.jstree-proton .jstree-file{background:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png) -101px -69px no-repeat}.jstree-proton .jstree-folder{background:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png) -261px -5px no-repeat}.jstree-proton>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-proton{line-height:22px;padding:0 4px}#jstree-dnd.jstree-proton .jstree-ok,#jstree-dnd.jstree-proton .jstree-er{background-size:320px 96px;background-image:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-proton i{background:0 0;width:22px;height:22px;line-height:22px}#jstree-dnd.jstree-proton .jstree-ok{background-position:-5px -69px}#jstree-dnd.jstree-proton .jstree-er{background-position:-37px -69px}.jstree-proton.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-proton.jstree-rtl .jstree-last{background:0 0}.jstree-proton-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-proton-small .jstree-anchor{line-height:18px;margin:1px 0 2px;height:18px}.jstree-proton-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-proton-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-proton-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-proton-small .jstree-wholerow{height:18px}.jstree-proton-small .jstree-node,.jstree-proton-small .jstree-icon{background-size:320px 96px;background-image:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png)}.jstree-proton-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-proton-small .jstree-last{background:0 0}.jstree-proton-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-proton-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-proton-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-proton-small .jstree-themeicon{background-position:-263px -9px}.jstree-proton-small>.jstree-no-dots .jstree-node,.jstree-proton-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-proton-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-proton-small .jstree-disabled{background:0 0}.jstree-proton-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-proton-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton-small .jstree-checkbox{background-position:-167px -7px}.jstree-proton-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-proton-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-proton-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-proton-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-proton-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-proton-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-proton-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-proton-small>.jstree-striped{background-size:auto 36px}.jstree-proton-small.jstree-rtl .jstree-node{background-size:320px 96px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-proton-small.jstree-rtl .jstree-last{background:0 0}.jstree-proton-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-proton-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-proton-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-proton-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-proton-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-proton-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-proton-small .jstree-themeicon-custom{background-color:transparent;background-size:320px 96px;background-image:none;background-position:0 0}.jstree-proton-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/throbber.gif) center center no-repeat}.jstree-proton-small .jstree-file{background:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png) -103px -71px no-repeat}.jstree-proton-small .jstree-folder{background:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png) -263px -7px no-repeat}.jstree-proton-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-proton-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-proton-small .jstree-ok,#jstree-dnd.jstree-proton-small .jstree-er{background-size:320px 96px;background-image:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-proton-small i{background:0 0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-proton-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-proton-small .jstree-er{background-position:-39px -71px}.jstree-proton-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-proton-small.jstree-rtl .jstree-last{background:0 0}.jstree-proton-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-proton-large .jstree-anchor{line-height:32px;margin:1px 0 2px;height:32px}.jstree-proton-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-proton-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-proton-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-proton-large .jstree-wholerow{height:32px}.jstree-proton-large .jstree-node,.jstree-proton-large .jstree-icon{background-size:320px 96px;background-image:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png)}.jstree-proton-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-proton-large .jstree-last{background:0 0}.jstree-proton-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-proton-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-proton-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-proton-large .jstree-themeicon{background-position:-256px -2px}.jstree-proton-large>.jstree-no-dots .jstree-node,.jstree-proton-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-proton-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-proton-large .jstree-disabled{background:0 0}.jstree-proton-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-proton-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton-large .jstree-checkbox{background-position:-160px 0}.jstree-proton-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-proton-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-proton-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-proton-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-proton-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-proton-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-proton-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-proton-large>.jstree-striped{background-size:auto 64px}.jstree-proton-large.jstree-rtl .jstree-node{background-size:320px 96px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-proton-large.jstree-rtl .jstree-last{background:0 0}.jstree-proton-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-proton-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-proton-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-proton-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-proton-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-proton-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-proton-large .jstree-themeicon-custom{background-color:transparent;background-size:320px 96px;background-image:none;background-position:0 0}.jstree-proton-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/throbber.gif) center center no-repeat}.jstree-proton-large .jstree-file{background:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png) -96px -64px no-repeat}.jstree-proton-large .jstree-folder{background:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png) -256px 0 no-repeat}.jstree-proton-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-proton-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-proton-large .jstree-ok,#jstree-dnd.jstree-proton-large .jstree-er{background-size:320px 96px;background-image:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-proton-large i{background:0 0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-proton-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-proton-large .jstree-er{background-position:-32px -64px}.jstree-proton-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-proton-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:30px;font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0 0;width:30px;height:30px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/30px.png);background-position:0 -150px;background-size:90px 180px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/30px.png);background-position:-30px -150px;background-size:90px 180px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-proton-responsive .jstree-container-ul{overflow:hidden}.jstree-proton-responsive .jstree-icon{background-image:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/30px.png);background-size:90px 180px}.jstree-proton-responsive .jstree-node,.jstree-proton-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-responsive .jstree-node{min-height:30px;line-height:30px;margin-left:30px;min-width:30px;white-space:nowrap}.jstree-proton-responsive .jstree-anchor{line-height:38px;height:38px;margin:0}.jstree-proton-responsive .jstree-icon,.jstree-proton-responsive .jstree-icon:empty{margin-top:4px;width:30px;height:30px;line-height:30px}.jstree-proton-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-proton-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:30px}.jstree-proton-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-proton-responsive .jstree-ocl,.jstree-proton-responsive .jstree-themeicon,.jstree-proton-responsive .jstree-checkbox{background-size:90px 180px}.jstree-proton-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-proton-responsive .jstree-closed>.jstree-ocl{background-position:0 -30px!important}.jstree-proton-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-30px 0!important}.jstree-proton-responsive .jstree-themeicon{background-position:-30px -30px}.jstree-proton-responsive .jstree-checkbox,.jstree-proton-responsive .jstree-checkbox:hover{background-position:-30px -60px}.jstree-proton-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-proton-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-proton-responsive .jstree-checked>.jstree-checkbox,.jstree-proton-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -60px}.jstree-proton-responsive .jstree-anchor>.jstree-undetermined,.jstree-proton-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -90px}.jstree-proton-responsive>.jstree-striped{background:0 0}.jstree-proton-responsive .jstree-wholerow-ul li{position:relative}.jstree-proton-responsive .jstree-wholerow-ul .jstree-wholerow{position:absolute;top:0;left:-1000px;right:-1000px;width:auto;height:100%}.jstree-proton-responsive .jstree-wholerow{border-top:1px solid rgba(0,0,0,.05);background:rgba(0,0,0,.02);height:30px}.jstree-proton-responsive .jstree-wholerow-hovered{background:#76b6ec}.jstree-proton-responsive .jstree-wholerow-clicked{background:#3392e3}.jstree-proton-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-proton-responsive .jstree-node,.jstree-proton-responsive .jstree-icon,.jstree-proton-responsive .jstree-node>.jstree-ocl,.jstree-proton-responsive .jstree-themeicon,.jstree-proton-responsive .jstree-checkbox{background-image:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/30px.png);background-size:90px 180px}.jstree-proton-responsive .jstree-node{background-position:-60px 0;background-repeat:repeat-y}.jstree-proton-responsive .jstree-last{background:0 0}.jstree-proton-responsive .jstree-leaf>.jstree-ocl{background-position:-30px -90px}.jstree-proton-responsive .jstree-last>.jstree-ocl{background-position:-30px -120px}.jstree-proton-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-proton-responsive .jstree-file{background:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/30px.png) 0 -120px no-repeat;background-size:90px 180px}.jstree-proton-responsive .jstree-folder{background:url(../../../node_modules/jstree-bootstrap-theme/dist/themes/proton/30px.png) -30px -30px no-repeat;background-size:90px 180px}.jstree-proton-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}}@font-face{font-family:'Titillium Web';font-weight:300;font-style:normal}@font-face{font-family:'Titillium Web';font-weight:400;font-style:normal}@font-face{font-family:'Titillium Web';font-weight:700;font-style:normal}@media screen and (-webkit-min-device-pixel-ratio:0){@font-face{font-family:'Titillium Web';font-weight:300;font-style:normal}@font-face{font-family:'Titillium Web';font-weight:400;font-style:normal}@font-face{font-family:'Titillium Web';font-weight:700;font-style:normal}}.jstree-proton{font-family:'Titillium Web',sans-serif,Arial,sans-serif}
\ No newline at end of file
diff --git a/apps/maarch_entreprise/css/maarch-material.css b/apps/maarch_entreprise/css/maarch-material.css
index 6f4b30d33c4ff93c72b0efde2a0111911f7d810c..58fc50db1d9adc181e1ed0cabc89ec2bdea35846 100644
--- a/apps/maarch_entreprise/css/maarch-material.css
+++ b/apps/maarch_entreprise/css/maarch-material.css
@@ -1 +1 @@
-.mat-elevation-z0{box-shadow:0px 0px 0px 0px rgba(0,0,0,0.2),0px 0px 0px 0px rgba(0,0,0,0.14),0px 0px 0px 0px rgba(0,0,0,0.12)}.mat-elevation-z1{box-shadow:0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)}.mat-elevation-z2{box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)}.mat-elevation-z3{box-shadow:0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)}.mat-elevation-z4{box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}.mat-elevation-z5{box-shadow:0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)}.mat-elevation-z6{box-shadow:0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)}.mat-elevation-z7{box-shadow:0px 4px 5px -2px rgba(0,0,0,0.2),0px 7px 10px 1px rgba(0,0,0,0.14),0px 2px 16px 1px rgba(0,0,0,0.12)}.mat-elevation-z8{box-shadow:0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)}.mat-elevation-z9{box-shadow:0px 5px 6px -3px rgba(0,0,0,0.2),0px 9px 12px 1px rgba(0,0,0,0.14),0px 3px 16px 2px rgba(0,0,0,0.12)}.mat-elevation-z10{box-shadow:0px 6px 6px -3px rgba(0,0,0,0.2),0px 10px 14px 1px rgba(0,0,0,0.14),0px 4px 18px 3px rgba(0,0,0,0.12)}.mat-elevation-z11{box-shadow:0px 6px 7px -4px rgba(0,0,0,0.2),0px 11px 15px 1px rgba(0,0,0,0.14),0px 4px 20px 3px rgba(0,0,0,0.12)}.mat-elevation-z12{box-shadow:0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12)}.mat-elevation-z13{box-shadow:0px 7px 8px -4px rgba(0,0,0,0.2),0px 13px 19px 2px rgba(0,0,0,0.14),0px 5px 24px 4px rgba(0,0,0,0.12)}.mat-elevation-z14{box-shadow:0px 7px 9px -4px rgba(0,0,0,0.2),0px 14px 21px 2px rgba(0,0,0,0.14),0px 5px 26px 4px rgba(0,0,0,0.12)}.mat-elevation-z15{box-shadow:0px 8px 9px -5px rgba(0,0,0,0.2),0px 15px 22px 2px rgba(0,0,0,0.14),0px 6px 28px 5px rgba(0,0,0,0.12)}.mat-elevation-z16{box-shadow:0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)}.mat-elevation-z17{box-shadow:0px 8px 11px -5px rgba(0,0,0,0.2),0px 17px 26px 2px rgba(0,0,0,0.14),0px 6px 32px 5px rgba(0,0,0,0.12)}.mat-elevation-z18{box-shadow:0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)}.mat-elevation-z19{box-shadow:0px 9px 12px -6px rgba(0,0,0,0.2),0px 19px 29px 2px rgba(0,0,0,0.14),0px 7px 36px 6px rgba(0,0,0,0.12)}.mat-elevation-z20{box-shadow:0px 10px 13px -6px rgba(0,0,0,0.2),0px 20px 31px 3px rgba(0,0,0,0.14),0px 8px 38px 7px rgba(0,0,0,0.12)}.mat-elevation-z21{box-shadow:0px 10px 13px -6px rgba(0,0,0,0.2),0px 21px 33px 3px rgba(0,0,0,0.14),0px 8px 40px 7px rgba(0,0,0,0.12)}.mat-elevation-z22{box-shadow:0px 10px 14px -6px rgba(0,0,0,0.2),0px 22px 35px 3px rgba(0,0,0,0.14),0px 8px 42px 7px rgba(0,0,0,0.12)}.mat-elevation-z23{box-shadow:0px 11px 14px -7px rgba(0,0,0,0.2),0px 23px 36px 3px rgba(0,0,0,0.14),0px 9px 44px 8px rgba(0,0,0,0.12)}.mat-elevation-z24{box-shadow:0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12)}.mat-h1,.mat-headline,.mat-typography h1{font:400 24px/32px Roboto, "Helvetica Neue", sans-serif;margin:0 0 16px}.mat-h2,.mat-title,.mat-typography h2{font:500 20px/32px Roboto, "Helvetica Neue", sans-serif;margin:0 0 16px}.mat-h3,.mat-subheading-2,.mat-typography h3{font:400 16px/28px Roboto, "Helvetica Neue", sans-serif;margin:0 0 16px}.mat-h4,.mat-subheading-1,.mat-typography h4{font:400 15px/24px Roboto, "Helvetica Neue", sans-serif;margin:0 0 16px}.mat-h5,.mat-typography h5{font:400 11.62px/20px Roboto, "Helvetica Neue", sans-serif;margin:0 0 12px}.mat-h6,.mat-typography h6{font:400 9.38px/20px Roboto, "Helvetica Neue", sans-serif;margin:0 0 12px}.mat-body-strong,.mat-body-2{font:500 14px/24px Roboto, "Helvetica Neue", sans-serif}.mat-body,.mat-body-1,.mat-typography{font:400 14px/20px Roboto, "Helvetica Neue", sans-serif}.mat-body p,.mat-body-1 p,.mat-typography p{margin:0 0 12px}.mat-small,.mat-caption{font:400 12px/20px Roboto, "Helvetica Neue", sans-serif}.mat-display-4,.mat-typography .mat-display-4{font:300 112px/112px Roboto, "Helvetica Neue", sans-serif;margin:0 0 56px;letter-spacing:-0.05em}.mat-display-3,.mat-typography .mat-display-3{font:400 56px/56px Roboto, "Helvetica Neue", sans-serif;margin:0 0 64px;letter-spacing:-0.02em}.mat-display-2,.mat-typography .mat-display-2{font:400 45px/48px Roboto, "Helvetica Neue", sans-serif;margin:0 0 64px;letter-spacing:-0.005em}.mat-display-1,.mat-typography .mat-display-1{font:400 34px/40px Roboto, "Helvetica Neue", sans-serif;margin:0 0 64px}.mat-button,.mat-raised-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button,.mat-fab,.mat-mini-fab{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:14px;font-weight:500}.mat-button-toggle{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-card{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-card-title{font-size:24px;font-weight:400}.mat-card-subtitle,.mat-card-content,.mat-card-header .mat-card-title{font-size:14px}.mat-checkbox{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-checkbox-layout .mat-checkbox-label{line-height:24px}.mat-chip{font-size:13px;line-height:18px}.mat-chip .mat-chip-remove.mat-icon{font-size:18px}.mat-table{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-header-cell{font-size:12px;font-weight:500}.mat-cell{font-size:14px}.mat-calendar{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-calendar-body{font-size:13px}.mat-calendar-body-label,.mat-calendar-period-button{font-size:14px;font-weight:500}.mat-calendar-table-header th{font-size:11px;font-weight:400}.mat-dialog-title{font:500 20px/32px Roboto, "Helvetica Neue", sans-serif}.mat-expansion-panel-header{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:15px;font-weight:400}.mat-expansion-panel-content{font:400 14px/20px Roboto, "Helvetica Neue", sans-serif}.mat-form-field{font-size:inherit;font-weight:400;line-height:1.125;font-family:Roboto, "Helvetica Neue", sans-serif}.mat-form-field-wrapper{padding-bottom:1.25em}.mat-form-field-prefix .mat-icon,.mat-form-field-suffix .mat-icon{font-size:150%;line-height:1.125}.mat-form-field-prefix .mat-icon-button,.mat-form-field-suffix .mat-icon-button{height:1.5em;width:1.5em}.mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-suffix .mat-icon-button .mat-icon{height:1.125em;line-height:1.125}.mat-form-field-infix{padding:.4375em 0;border-top:.84375em solid transparent}.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label,.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label{transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(0.001px);-ms-transform:translateY(-1.28125em) scale(.75);width:133.33333%}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(0.00101px);-ms-transform:translateY(-1.28124em) scale(.75);width:133.33334%}.mat-form-field-can-float .mat-input-server[label]:not(:label-shown)+.mat-form-field-label-wrapper .mat-form-field-label{transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(0.00102px);-ms-transform:translateY(-1.28123em) scale(.75);width:133.33335%}.mat-form-field-label-wrapper{top:-.84375em;padding-top:.84375em}.mat-form-field-label{top:1.28125em}.mat-form-field-underline{bottom:1.25em}.mat-form-field-subscript-wrapper{font-size:75%;margin-top:.54167em;top:calc(100% - 1.66667em)}.mat-grid-tile-header,.mat-grid-tile-footer{font-size:14px}.mat-grid-tile-header .mat-line,.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2),.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:12px}input.mat-input-element{margin-top:-.0625em}.mat-menu-item{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:16px;font-weight:400}.mat-paginator,.mat-paginator-page-size .mat-select-trigger{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:12px}.mat-radio-button{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-select{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-select-trigger{height:1.125em}.mat-slide-toggle-content{font:400 14px/20px Roboto, "Helvetica Neue", sans-serif}.mat-slider-thumb-label-text{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:12px;font-weight:500}.mat-stepper-vertical,.mat-stepper-horizontal{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-step-label{font-size:14px;font-weight:400}.mat-step-label-selected{font-size:14px;font-weight:500}.mat-tab-group{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-tab-label,.mat-tab-link{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:14px;font-weight:500}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font:500 20px/32px Roboto, "Helvetica Neue", sans-serif;margin:0}.mat-tooltip{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:10px;padding-top:6px;padding-bottom:6px}.mat-tooltip-handset{font-size:14px;padding-top:9px;padding-bottom:9px}.mat-list-item{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-list-option{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-list .mat-list-item,.mat-nav-list .mat-list-item,.mat-selection-list .mat-list-item{font-size:16px}.mat-list .mat-list-item .mat-line,.mat-nav-list .mat-list-item .mat-line,.mat-selection-list .mat-list-item .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list .mat-list-item .mat-line:nth-child(n+2),.mat-nav-list .mat-list-item .mat-line:nth-child(n+2),.mat-selection-list .mat-list-item .mat-line:nth-child(n+2){font-size:14px}.mat-list .mat-list-option,.mat-nav-list .mat-list-option,.mat-selection-list .mat-list-option{font-size:16px}.mat-list .mat-list-option .mat-line,.mat-nav-list .mat-list-option .mat-line,.mat-selection-list .mat-list-option .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list .mat-list-option .mat-line:nth-child(n+2),.mat-nav-list .mat-list-option .mat-line:nth-child(n+2),.mat-selection-list .mat-list-option .mat-line:nth-child(n+2){font-size:14px}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:14px;font-weight:500}.mat-list[dense] .mat-list-item,.mat-nav-list[dense] .mat-list-item,.mat-selection-list[dense] .mat-list-item{font-size:12px}.mat-list[dense] .mat-list-item .mat-line,.mat-nav-list[dense] .mat-list-item .mat-line,.mat-selection-list[dense] .mat-list-item .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list[dense] .mat-list-item .mat-line:nth-child(n+2),.mat-nav-list[dense] .mat-list-item .mat-line:nth-child(n+2),.mat-selection-list[dense] .mat-list-item .mat-line:nth-child(n+2){font-size:12px}.mat-list[dense] .mat-list-option,.mat-nav-list[dense] .mat-list-option,.mat-selection-list[dense] .mat-list-option{font-size:12px}.mat-list[dense] .mat-list-option .mat-line,.mat-nav-list[dense] .mat-list-option .mat-line,.mat-selection-list[dense] .mat-list-option .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list[dense] .mat-list-option .mat-line:nth-child(n+2),.mat-nav-list[dense] .mat-list-option .mat-line:nth-child(n+2),.mat-selection-list[dense] .mat-list-option .mat-line:nth-child(n+2){font-size:12px}.mat-list[dense] .mat-subheader,.mat-nav-list[dense] .mat-subheader,.mat-selection-list[dense] .mat-subheader{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:12px;font-weight:500}.mat-option{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:16px}.mat-optgroup-label{font:500 14px/24px Roboto, "Helvetica Neue", sans-serif}.mat-simple-snackbar{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:14px}.mat-simple-snackbar-action{line-height:1;font-family:inherit;font-size:inherit;font-weight:500}.mat-ripple{overflow:hidden}@media screen and (-ms-high-contrast: active){.mat-ripple{display:none}}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(0)}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,0.288)}.cdk-overlay-transparent-backdrop,.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.mat-ripple-element{background-color:rgba(0,0,0,0.1)}.mat-option{color:rgba(0,0,0,0.87)}.mat-option:hover:not(.mat-option-disabled),.mat-option:focus:not(.mat-option-disabled){background:rgba(0,0,0,0.04)}.mat-primary .mat-option.mat-selected:not(.mat-option-disabled){color:#135f7f}.mat-accent .mat-option.mat-selected:not(.mat-option-disabled){color:#006841}.mat-warn .mat-option.mat-selected:not(.mat-option-disabled){color:#8e3e52}.mat-option.mat-selected:not(.mat-option-multiple):not(.mat-option-disabled){background:rgba(0,0,0,0.04)}.mat-option.mat-active{background:rgba(0,0,0,0.04);color:rgba(0,0,0,0.87)}.mat-option.mat-option-disabled{color:rgba(0,0,0,0.38)}.mat-optgroup-label{color:rgba(0,0,0,0.54)}.mat-optgroup-disabled .mat-optgroup-label{color:rgba(0,0,0,0.38)}.mat-pseudo-checkbox{color:rgba(0,0,0,0.54)}.mat-pseudo-checkbox::after{color:#fafafa}.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-indeterminate,.mat-accent .mat-pseudo-checkbox-checked,.mat-accent .mat-pseudo-checkbox-indeterminate{background:#006841}.mat-primary .mat-pseudo-checkbox-checked,.mat-primary .mat-pseudo-checkbox-indeterminate{background:#135f7f}.mat-warn .mat-pseudo-checkbox-checked,.mat-warn .mat-pseudo-checkbox-indeterminate{background:#8e3e52}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background:#b0b0b0}.mat-app-background{background-color:#fafafa;color:rgba(0,0,0,0.87)}.mat-theme-loaded-marker{display:none}.mat-autocomplete-panel{background:#fff;color:rgba(0,0,0,0.87)}.mat-autocomplete-panel .mat-option.mat-selected:not(.mat-active):not(:hover){background:#fff}.mat-autocomplete-panel .mat-option.mat-selected:not(.mat-active):not(:hover):not(.mat-option-disabled){color:rgba(0,0,0,0.87)}.mat-button,.mat-icon-button,.mat-stroked-button{background:transparent}.mat-button.mat-primary .mat-button-focus-overlay,.mat-icon-button.mat-primary .mat-button-focus-overlay,.mat-stroked-button.mat-primary .mat-button-focus-overlay{background-color:rgba(19,95,127,0.12)}.mat-button.mat-accent .mat-button-focus-overlay,.mat-icon-button.mat-accent .mat-button-focus-overlay,.mat-stroked-button.mat-accent .mat-button-focus-overlay{background-color:rgba(0,104,65,0.12)}.mat-button.mat-warn .mat-button-focus-overlay,.mat-icon-button.mat-warn .mat-button-focus-overlay,.mat-stroked-button.mat-warn .mat-button-focus-overlay{background-color:rgba(142,62,82,0.12)}.mat-button[disabled] .mat-button-focus-overlay,.mat-icon-button[disabled] .mat-button-focus-overlay,.mat-stroked-button[disabled] .mat-button-focus-overlay{background-color:transparent}.mat-button.mat-primary,.mat-icon-button.mat-primary,.mat-stroked-button.mat-primary{color:#135f7f}.mat-button.mat-accent,.mat-icon-button.mat-accent,.mat-stroked-button.mat-accent{color:#006841}.mat-button.mat-warn,.mat-icon-button.mat-warn,.mat-stroked-button.mat-warn{color:#8e3e52}.mat-button.mat-primary[disabled],.mat-button.mat-accent[disabled],.mat-button.mat-warn[disabled],.mat-button[disabled][disabled],.mat-icon-button.mat-primary[disabled],.mat-icon-button.mat-accent[disabled],.mat-icon-button.mat-warn[disabled],.mat-icon-button[disabled][disabled],.mat-stroked-button.mat-primary[disabled],.mat-stroked-button.mat-accent[disabled],.mat-stroked-button.mat-warn[disabled],.mat-stroked-button[disabled][disabled]{color:rgba(0,0,0,0.26)}.mat-raised-button,.mat-fab,.mat-mini-fab{color:rgba(0,0,0,0.87);background-color:#fff}.mat-raised-button.mat-primary,.mat-fab.mat-primary,.mat-mini-fab.mat-primary{color:#fff}.mat-raised-button.mat-accent,.mat-fab.mat-accent,.mat-mini-fab.mat-accent{color:#fff}.mat-raised-button.mat-warn,.mat-fab.mat-warn,.mat-mini-fab.mat-warn{color:#fff}.mat-raised-button.mat-primary[disabled],.mat-raised-button.mat-accent[disabled],.mat-raised-button.mat-warn[disabled],.mat-raised-button[disabled][disabled],.mat-fab.mat-primary[disabled],.mat-fab.mat-accent[disabled],.mat-fab.mat-warn[disabled],.mat-fab[disabled][disabled],.mat-mini-fab.mat-primary[disabled],.mat-mini-fab.mat-accent[disabled],.mat-mini-fab.mat-warn[disabled],.mat-mini-fab[disabled][disabled]{color:rgba(0,0,0,0.26)}.mat-raised-button.mat-primary,.mat-fab.mat-primary,.mat-mini-fab.mat-primary{background-color:#135f7f}.mat-raised-button.mat-accent,.mat-fab.mat-accent,.mat-mini-fab.mat-accent{background-color:#006841}.mat-raised-button.mat-warn,.mat-fab.mat-warn,.mat-mini-fab.mat-warn{background-color:#8e3e52}.mat-raised-button.mat-primary[disabled],.mat-raised-button.mat-accent[disabled],.mat-raised-button.mat-warn[disabled],.mat-raised-button[disabled][disabled],.mat-fab.mat-primary[disabled],.mat-fab.mat-accent[disabled],.mat-fab.mat-warn[disabled],.mat-fab[disabled][disabled],.mat-mini-fab.mat-primary[disabled],.mat-mini-fab.mat-accent[disabled],.mat-mini-fab.mat-warn[disabled],.mat-mini-fab[disabled][disabled]{background-color:rgba(0,0,0,0.12)}.mat-raised-button.mat-primary .mat-ripple-element,.mat-fab.mat-primary .mat-ripple-element,.mat-mini-fab.mat-primary .mat-ripple-element{background-color:rgba(255,255,255,0.2)}.mat-raised-button.mat-accent .mat-ripple-element,.mat-fab.mat-accent .mat-ripple-element,.mat-mini-fab.mat-accent .mat-ripple-element{background-color:rgba(255,255,255,0.2)}.mat-raised-button.mat-warn .mat-ripple-element,.mat-fab.mat-warn .mat-ripple-element,.mat-mini-fab.mat-warn .mat-ripple-element{background-color:rgba(255,255,255,0.2)}.mat-button.mat-primary .mat-ripple-element{background-color:rgba(19,95,127,0.1)}.mat-button.mat-accent .mat-ripple-element{background-color:rgba(0,104,65,0.1)}.mat-button.mat-warn .mat-ripple-element{background-color:rgba(142,62,82,0.1)}.mat-flat-button{color:rgba(0,0,0,0.87);background-color:#fff}.mat-flat-button.mat-primary{color:#fff}.mat-flat-button.mat-accent{color:#fff}.mat-flat-button.mat-warn{color:#fff}.mat-flat-button.mat-primary[disabled],.mat-flat-button.mat-accent[disabled],.mat-flat-button.mat-warn[disabled],.mat-flat-button[disabled][disabled]{color:rgba(0,0,0,0.26)}.mat-flat-button.mat-primary{background-color:#135f7f}.mat-flat-button.mat-accent{background-color:#006841}.mat-flat-button.mat-warn{background-color:#8e3e52}.mat-flat-button.mat-primary[disabled],.mat-flat-button.mat-accent[disabled],.mat-flat-button.mat-warn[disabled],.mat-flat-button[disabled][disabled]{background-color:rgba(0,0,0,0.12)}.mat-flat-button.mat-primary .mat-ripple-element{background-color:rgba(255,255,255,0.2)}.mat-flat-button.mat-accent .mat-ripple-element{background-color:rgba(255,255,255,0.2)}.mat-flat-button.mat-warn .mat-ripple-element{background-color:rgba(255,255,255,0.2)}.mat-icon-button.mat-primary .mat-ripple-element{background-color:rgba(19,95,127,0.2)}.mat-icon-button.mat-accent .mat-ripple-element{background-color:rgba(0,104,65,0.2)}.mat-icon-button.mat-warn .mat-ripple-element{background-color:rgba(142,62,82,0.2)}.mat-button-toggle{color:rgba(0,0,0,0.38)}.mat-button-toggle.cdk-focused .mat-button-toggle-focus-overlay{background-color:rgba(0,0,0,0.12)}.mat-button-toggle-checked{background-color:#e0e0e0;color:rgba(0,0,0,0.54)}.mat-button-toggle-disabled{background-color:#eee;color:rgba(0,0,0,0.26)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:#bdbdbd}.mat-card{background:#fff;color:rgba(0,0,0,0.87)}.mat-card-subtitle{color:rgba(0,0,0,0.54)}.mat-checkbox-frame{border-color:rgba(0,0,0,0.54)}.mat-checkbox-checkmark{fill:#fafafa}.mat-checkbox-checkmark-path{stroke:#fafafa !important}.mat-checkbox-mixedmark{background-color:#fafafa}.mat-checkbox-indeterminate.mat-primary .mat-checkbox-background,.mat-checkbox-checked.mat-primary .mat-checkbox-background{background-color:#135f7f}.mat-checkbox-indeterminate.mat-accent .mat-checkbox-background,.mat-checkbox-checked.mat-accent .mat-checkbox-background{background-color:#006841}.mat-checkbox-indeterminate.mat-warn .mat-checkbox-background,.mat-checkbox-checked.mat-warn .mat-checkbox-background{background-color:#8e3e52}.mat-checkbox-disabled.mat-checkbox-checked .mat-checkbox-background,.mat-checkbox-disabled.mat-checkbox-indeterminate .mat-checkbox-background{background-color:#b0b0b0}.mat-checkbox-disabled:not(.mat-checkbox-checked) .mat-checkbox-frame{border-color:#b0b0b0}.mat-checkbox-disabled .mat-checkbox-label{color:#b0b0b0}.mat-checkbox:not(.mat-checkbox-disabled).mat-primary .mat-checkbox-ripple .mat-ripple-element{background-color:rgba(19,95,127,0.26)}.mat-checkbox:not(.mat-checkbox-disabled).mat-accent .mat-checkbox-ripple .mat-ripple-element{background-color:rgba(0,104,65,0.26)}.mat-checkbox:not(.mat-checkbox-disabled).mat-warn .mat-checkbox-ripple .mat-ripple-element{background-color:rgba(142,62,82,0.26)}.mat-chip:not(.mat-basic-chip){background-color:#e0e0e0;color:rgba(0,0,0,0.87)}.mat-chip:not(.mat-basic-chip) .mat-chip-remove{color:rgba(0,0,0,0.87);opacity:0.4}.mat-chip:not(.mat-basic-chip) .mat-chip-remove:hover{opacity:0.54}.mat-chip.mat-chip-selected.mat-primary{background-color:#135f7f;color:#fff}.mat-chip.mat-chip-selected.mat-primary .mat-chip-remove{color:#fff;opacity:0.4}.mat-chip.mat-chip-selected.mat-primary .mat-chip-remove:hover{opacity:0.54}.mat-chip.mat-chip-selected.mat-warn{background-color:#8e3e52;color:#fff}.mat-chip.mat-chip-selected.mat-warn .mat-chip-remove{color:#fff;opacity:0.4}.mat-chip.mat-chip-selected.mat-warn .mat-chip-remove:hover{opacity:0.54}.mat-chip.mat-chip-selected.mat-accent{background-color:#006841;color:#fff}.mat-chip.mat-chip-selected.mat-accent .mat-chip-remove{color:#fff;opacity:0.4}.mat-chip.mat-chip-selected.mat-accent .mat-chip-remove:hover{opacity:0.54}.mat-table{background:#fff}.mat-row,.mat-header-row{border-bottom-color:rgba(0,0,0,0.12)}.mat-header-cell{color:rgba(0,0,0,0.54)}.mat-cell{color:rgba(0,0,0,0.87)}.mat-datepicker-content{background-color:#fff;color:rgba(0,0,0,0.87)}.mat-calendar-arrow{border-top-color:rgba(0,0,0,0.54)}.mat-calendar-next-button,.mat-calendar-previous-button{color:rgba(0,0,0,0.54)}.mat-calendar-table-header{color:rgba(0,0,0,0.38)}.mat-calendar-table-header-divider::after{background:rgba(0,0,0,0.12)}.mat-calendar-body-label{color:rgba(0,0,0,0.54)}.mat-calendar-body-cell-content{color:rgba(0,0,0,0.87);border-color:transparent}.mat-calendar-body-disabled>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){color:rgba(0,0,0,0.38)}:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:rgba(0,0,0,0.04)}.mat-calendar-body-selected{background-color:#135f7f;color:#fff}.mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:rgba(19,95,127,0.4)}.mat-calendar-body-today:not(.mat-calendar-body-selected){border-color:rgba(0,0,0,0.38)}.mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1px #fff}.mat-calendar-body-disabled>.mat-calendar-body-today:not(.mat-calendar-body-selected){border-color:rgba(0,0,0,0.18)}.mat-datepicker-toggle-active{color:#135f7f}.mat-dialog-container{background:#fff;color:rgba(0,0,0,0.87)}.mat-divider{border-top-color:rgba(0,0,0,0.12)}.mat-divider-vertical{border-right-color:rgba(0,0,0,0.12)}.mat-expansion-panel{background:#fff;color:rgba(0,0,0,0.87)}.mat-action-row{border-top-color:rgba(0,0,0,0.12)}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled='true']).cdk-keyboard-focused,.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled='true']).cdk-program-focused,.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled='true']):hover{background:rgba(0,0,0,0.04)}.mat-expansion-panel-header-title{color:rgba(0,0,0,0.87)}.mat-expansion-panel-header-description,.mat-expansion-indicator::after{color:rgba(0,0,0,0.54)}.mat-expansion-panel-header[aria-disabled='true']{color:rgba(0,0,0,0.26)}.mat-expansion-panel-header[aria-disabled='true'] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled='true'] .mat-expansion-panel-header-description{color:inherit}.mat-form-field-label{color:rgba(0,0,0,0.54)}.mat-hint{color:rgba(0,0,0,0.54)}.mat-focused .mat-form-field-label{color:#135f7f}.mat-focused .mat-form-field-label.mat-accent{color:#006841}.mat-focused .mat-form-field-label.mat-warn{color:#8e3e52}.mat-focused .mat-form-field-required-marker{color:#006841}.mat-form-field-underline{background-color:rgba(0,0,0,0.42)}.mat-form-field-disabled .mat-form-field-underline{background-image:linear-gradient(to right, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0.42) 33%, transparent 0%);background-size:4px 1px;background-repeat:repeat-x}.mat-form-field-ripple{background-color:#135f7f}.mat-form-field-ripple.mat-accent{background-color:#006841}.mat-form-field-ripple.mat-warn{background-color:#8e3e52}.mat-form-field-invalid .mat-form-field-label{color:#8e3e52}.mat-form-field-invalid .mat-form-field-label.mat-accent,.mat-form-field-invalid .mat-form-field-label .mat-form-field-required-marker{color:#8e3e52}.mat-form-field-invalid .mat-form-field-ripple{background-color:#8e3e52}.mat-error{color:#8e3e52}.mat-icon.mat-primary{color:#135f7f}.mat-icon.mat-accent{color:#006841}.mat-icon.mat-warn{color:#8e3e52}.mat-input-element:disabled{color:rgba(0,0,0,0.38)}.mat-input-element{caret-color:#135f7f}.mat-input-element::placeholder{color:rgba(0,0,0,0.42)}.mat-input-element::-moz-placeholder{color:rgba(0,0,0,0.42)}.mat-input-element::-webkit-input-placeholder{color:rgba(0,0,0,0.42)}.mat-input-element:-ms-input-placeholder{color:rgba(0,0,0,0.42)}.mat-accent .mat-input-element{caret-color:#006841}.mat-warn .mat-input-element,.mat-form-field-invalid .mat-input-element{caret-color:#8e3e52}.mat-list .mat-list-item,.mat-nav-list .mat-list-item,.mat-selection-list .mat-list-item{color:rgba(0,0,0,0.87)}.mat-list .mat-list-option,.mat-nav-list .mat-list-option,.mat-selection-list .mat-list-option{color:rgba(0,0,0,0.87)}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{color:rgba(0,0,0,0.54)}.mat-list-item-disabled{background-color:#eee}.mat-nav-list .mat-list-item{outline:none}.mat-nav-list .mat-list-item:hover,.mat-nav-list .mat-list-item.mat-list-item-focus{background:rgba(0,0,0,0.04)}.mat-list-option{outline:none}.mat-list-option:hover,.mat-list-option.mat-list-item-focus{background:rgba(0,0,0,0.04)}.mat-menu-panel{background:#fff}.mat-menu-item{background:transparent;color:rgba(0,0,0,0.87)}.mat-menu-item[disabled]{color:rgba(0,0,0,0.38)}.mat-menu-item .mat-icon:not([color]),.mat-menu-item-submenu-trigger::after{color:rgba(0,0,0,0.54)}.mat-menu-item:hover:not([disabled]),.mat-menu-item.cdk-program-focused:not([disabled]),.mat-menu-item.cdk-keyboard-focused:not([disabled]),.mat-menu-item-highlighted:not([disabled]){background:rgba(0,0,0,0.04)}.mat-paginator{background:#fff}.mat-paginator,.mat-paginator-page-size .mat-select-trigger{color:rgba(0,0,0,0.54)}.mat-paginator-decrement,.mat-paginator-increment{border-top:2px solid rgba(0,0,0,0.54);border-right:2px solid rgba(0,0,0,0.54)}.mat-paginator-first,.mat-paginator-last{border-top:2px solid rgba(0,0,0,0.54)}.mat-icon-button[disabled] .mat-paginator-decrement,.mat-icon-button[disabled] .mat-paginator-increment,.mat-icon-button[disabled] .mat-paginator-first,.mat-icon-button[disabled] .mat-paginator-last{border-color:rgba(0,0,0,0.38)}.mat-progress-bar-background{fill:#4e8cae}.mat-progress-bar-buffer{background-color:#4e8cae}.mat-progress-bar-fill::after{background-color:#135f7f}.mat-progress-bar.mat-accent .mat-progress-bar-background{fill:#41976c}.mat-progress-bar.mat-accent .mat-progress-bar-buffer{background-color:#41976c}.mat-progress-bar.mat-accent .mat-progress-bar-fill::after{background-color:#006841}.mat-progress-bar.mat-warn .mat-progress-bar-background{fill:#c16b7e}.mat-progress-bar.mat-warn .mat-progress-bar-buffer{background-color:#c16b7e}.mat-progress-bar.mat-warn .mat-progress-bar-fill::after{background-color:#8e3e52}.mat-progress-spinner circle,.mat-spinner circle{stroke:#135f7f}.mat-progress-spinner.mat-accent circle,.mat-spinner.mat-accent circle{stroke:#006841}.mat-progress-spinner.mat-warn circle,.mat-spinner.mat-warn circle{stroke:#8e3e52}.mat-radio-outer-circle{border-color:rgba(0,0,0,0.54)}.mat-radio-disabled .mat-radio-outer-circle{border-color:rgba(0,0,0,0.38)}.mat-radio-disabled .mat-radio-ripple .mat-ripple-element,.mat-radio-disabled .mat-radio-inner-circle{background-color:rgba(0,0,0,0.38)}.mat-radio-disabled .mat-radio-label-content{color:rgba(0,0,0,0.38)}.mat-radio-button.mat-primary.mat-radio-checked .mat-radio-outer-circle{border-color:#135f7f}.mat-radio-button.mat-primary .mat-radio-inner-circle{background-color:#135f7f}.mat-radio-button.mat-primary .mat-radio-ripple .mat-ripple-element{background-color:rgba(19,95,127,0.26)}.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#006841}.mat-radio-button.mat-accent .mat-radio-inner-circle{background-color:#006841}.mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element{background-color:rgba(0,104,65,0.26)}.mat-radio-button.mat-warn.mat-radio-checked .mat-radio-outer-circle{border-color:#8e3e52}.mat-radio-button.mat-warn .mat-radio-inner-circle{background-color:#8e3e52}.mat-radio-button.mat-warn .mat-radio-ripple .mat-ripple-element{background-color:rgba(142,62,82,0.26)}.mat-select-content,.mat-select-panel-done-animating{background:#fff}.mat-select-value{color:rgba(0,0,0,0.87)}.mat-select-placeholder{color:rgba(0,0,0,0.42)}.mat-select-disabled .mat-select-value{color:rgba(0,0,0,0.38)}.mat-select-arrow{color:rgba(0,0,0,0.54)}.mat-select-panel .mat-option.mat-selected:not(.mat-option-multiple){background:rgba(0,0,0,0.12)}.mat-form-field.mat-focused.mat-primary .mat-select-arrow{color:#135f7f}.mat-form-field.mat-focused.mat-accent .mat-select-arrow{color:#006841}.mat-form-field.mat-focused.mat-warn .mat-select-arrow{color:#8e3e52}.mat-form-field .mat-select.mat-select-invalid .mat-select-arrow{color:#8e3e52}.mat-form-field .mat-select.mat-select-disabled .mat-select-arrow{color:rgba(0,0,0,0.38)}.mat-drawer-container{background-color:#fafafa;color:rgba(0,0,0,0.87)}.mat-drawer{background-color:#fff;color:rgba(0,0,0,0.87)}.mat-drawer.mat-drawer-push{background-color:#fff}.mat-drawer-backdrop.mat-drawer-shown{background-color:rgba(0,0,0,0.6)}.mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb{background-color:#006841}.mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar{background-color:rgba(0,104,65,0.5)}.mat-slide-toggle:not(.mat-checked) .mat-ripple-element{background-color:rgba(0,0,0,0.06)}.mat-slide-toggle .mat-ripple-element{background-color:rgba(0,104,65,0.12)}.mat-slide-toggle.mat-primary.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb{background-color:#135f7f}.mat-slide-toggle.mat-primary.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar{background-color:rgba(19,95,127,0.5)}.mat-slide-toggle.mat-primary:not(.mat-checked) .mat-ripple-element{background-color:rgba(0,0,0,0.06)}.mat-slide-toggle.mat-primary .mat-ripple-element{background-color:rgba(19,95,127,0.12)}.mat-slide-toggle.mat-warn.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb{background-color:#8e3e52}.mat-slide-toggle.mat-warn.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar{background-color:rgba(142,62,82,0.5)}.mat-slide-toggle.mat-warn:not(.mat-checked) .mat-ripple-element{background-color:rgba(0,0,0,0.06)}.mat-slide-toggle.mat-warn .mat-ripple-element{background-color:rgba(142,62,82,0.12)}.mat-disabled .mat-slide-toggle-thumb{background-color:#bdbdbd}.mat-disabled .mat-slide-toggle-bar{background-color:rgba(0,0,0,0.1)}.mat-slide-toggle-thumb{background-color:#fafafa}.mat-slide-toggle-bar{background-color:rgba(0,0,0,0.38)}.mat-slider-track-background{background-color:rgba(0,0,0,0.26)}.mat-primary .mat-slider-track-fill,.mat-primary .mat-slider-thumb,.mat-primary .mat-slider-thumb-label{background-color:#135f7f}.mat-primary .mat-slider-thumb-label-text{color:#fff}.mat-accent .mat-slider-track-fill,.mat-accent .mat-slider-thumb,.mat-accent .mat-slider-thumb-label{background-color:#006841}.mat-accent .mat-slider-thumb-label-text{color:#fff}.mat-warn .mat-slider-track-fill,.mat-warn .mat-slider-thumb,.mat-warn .mat-slider-thumb-label{background-color:#8e3e52}.mat-warn .mat-slider-thumb-label-text{color:#fff}.mat-slider-focus-ring{background-color:rgba(0,104,65,0.2)}.mat-slider:hover .mat-slider-track-background,.cdk-focused .mat-slider-track-background{background-color:rgba(0,0,0,0.38)}.mat-slider-disabled .mat-slider-track-background,.mat-slider-disabled .mat-slider-track-fill,.mat-slider-disabled .mat-slider-thumb{background-color:rgba(0,0,0,0.26)}.mat-slider-disabled:hover .mat-slider-track-background{background-color:rgba(0,0,0,0.26)}.mat-slider-min-value .mat-slider-focus-ring{background-color:rgba(0,0,0,0.12)}.mat-slider-min-value.mat-slider-thumb-label-showing .mat-slider-thumb,.mat-slider-min-value.mat-slider-thumb-label-showing .mat-slider-thumb-label{background-color:rgba(0,0,0,0.87)}.mat-slider-min-value.mat-slider-thumb-label-showing.cdk-focused .mat-slider-thumb,.mat-slider-min-value.mat-slider-thumb-label-showing.cdk-focused .mat-slider-thumb-label{background-color:rgba(0,0,0,0.26)}.mat-slider-min-value:not(.mat-slider-thumb-label-showing) .mat-slider-thumb{border-color:rgba(0,0,0,0.26);background-color:transparent}.mat-slider-min-value:not(.mat-slider-thumb-label-showing):hover .mat-slider-thumb,.mat-slider-min-value:not(.mat-slider-thumb-label-showing).cdk-focused .mat-slider-thumb{border-color:rgba(0,0,0,0.38)}.mat-slider-min-value:not(.mat-slider-thumb-label-showing):hover.mat-slider-disabled .mat-slider-thumb,.mat-slider-min-value:not(.mat-slider-thumb-label-showing).cdk-focused.mat-slider-disabled .mat-slider-thumb{border-color:rgba(0,0,0,0.26)}.mat-slider-has-ticks .mat-slider-wrapper::after{border-color:rgba(0,0,0,0.7)}.mat-slider-horizontal .mat-slider-ticks{background-image:repeating-linear-gradient(to right, rgba(0,0,0,0.7), rgba(0,0,0,0.7) 2px, transparent 0, transparent);background-image:-moz-repeating-linear-gradient(0.0001deg, rgba(0,0,0,0.7), rgba(0,0,0,0.7) 2px, transparent 0, transparent)}.mat-slider-vertical .mat-slider-ticks{background-image:repeating-linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.7) 2px, transparent 0, transparent)}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused,.mat-step-header:hover{background-color:rgba(0,0,0,0.04)}.mat-step-header .mat-step-label,.mat-step-header .mat-step-optional{color:rgba(0,0,0,0.38)}.mat-step-header .mat-step-icon{background-color:#135f7f;color:#fff}.mat-step-header .mat-step-icon-not-touched{background-color:rgba(0,0,0,0.38);color:#fff}.mat-step-header .mat-step-label.mat-step-label-active{color:rgba(0,0,0,0.87)}.mat-stepper-horizontal,.mat-stepper-vertical{background-color:#fff}.mat-stepper-vertical-line::before{border-left-color:rgba(0,0,0,0.12)}.mat-stepper-horizontal-line{border-top-color:rgba(0,0,0,0.12)}.mat-tab-nav-bar,.mat-tab-header{border-bottom:1px solid rgba(0,0,0,0.12)}.mat-tab-group-inverted-header .mat-tab-nav-bar,.mat-tab-group-inverted-header .mat-tab-header{border-top:1px solid rgba(0,0,0,0.12);border-bottom:none}.mat-tab-label,.mat-tab-link{color:rgba(0,0,0,0.87)}.mat-tab-label.mat-tab-disabled,.mat-tab-link.mat-tab-disabled{color:rgba(0,0,0,0.38)}.mat-tab-header-pagination-chevron{border-color:rgba(0,0,0,0.87)}.mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron{border-color:rgba(0,0,0,0.38)}.mat-tab-group[class*='mat-background-'] .mat-tab-header,.mat-tab-nav-bar[class*='mat-background-']{border-bottom:none;border-top:none}.mat-tab-group.mat-primary .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-group.mat-primary .mat-tab-link:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-primary .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-primary .mat-tab-link:not(.mat-tab-disabled):focus{background-color:rgba(78,140,174,0.3)}.mat-tab-group.mat-primary .mat-ink-bar,.mat-tab-nav-bar.mat-primary .mat-ink-bar{background-color:#135f7f}.mat-tab-group.mat-primary.mat-background-primary .mat-ink-bar,.mat-tab-nav-bar.mat-primary.mat-background-primary .mat-ink-bar{background-color:#fff}.mat-tab-group.mat-accent .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-group.mat-accent .mat-tab-link:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-accent .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-accent .mat-tab-link:not(.mat-tab-disabled):focus{background-color:rgba(65,151,108,0.3)}.mat-tab-group.mat-accent .mat-ink-bar,.mat-tab-nav-bar.mat-accent .mat-ink-bar{background-color:#006841}.mat-tab-group.mat-accent.mat-background-accent .mat-ink-bar,.mat-tab-nav-bar.mat-accent.mat-background-accent .mat-ink-bar{background-color:#fff}.mat-tab-group.mat-warn .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-group.mat-warn .mat-tab-link:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-warn .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-warn .mat-tab-link:not(.mat-tab-disabled):focus{background-color:rgba(193,107,126,0.3)}.mat-tab-group.mat-warn .mat-ink-bar,.mat-tab-nav-bar.mat-warn .mat-ink-bar{background-color:#8e3e52}.mat-tab-group.mat-warn.mat-background-warn .mat-ink-bar,.mat-tab-nav-bar.mat-warn.mat-background-warn .mat-ink-bar{background-color:#fff}.mat-tab-group.mat-background-primary .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-group.mat-background-primary .mat-tab-link:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-background-primary .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-background-primary .mat-tab-link:not(.mat-tab-disabled):focus{background-color:rgba(78,140,174,0.3)}.mat-tab-group.mat-background-primary .mat-tab-header,.mat-tab-group.mat-background-primary .mat-tab-links,.mat-tab-nav-bar.mat-background-primary .mat-tab-header,.mat-tab-nav-bar.mat-background-primary .mat-tab-links{background-color:#135f7f}.mat-tab-group.mat-background-primary .mat-tab-label,.mat-tab-group.mat-background-primary .mat-tab-link,.mat-tab-nav-bar.mat-background-primary .mat-tab-label,.mat-tab-nav-bar.mat-background-primary .mat-tab-link{color:#fff}.mat-tab-group.mat-background-primary .mat-tab-label.mat-tab-disabled,.mat-tab-group.mat-background-primary .mat-tab-link.mat-tab-disabled,.mat-tab-nav-bar.mat-background-primary .mat-tab-label.mat-tab-disabled,.mat-tab-nav-bar.mat-background-primary .mat-tab-link.mat-tab-disabled{color:rgba(255,255,255,0.4)}.mat-tab-group.mat-background-primary .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-primary .mat-tab-header-pagination-chevron{border-color:#fff}.mat-tab-group.mat-background-primary .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-primary .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron{border-color:rgba(255,255,255,0.4)}.mat-tab-group.mat-background-primary .mat-ripple-element,.mat-tab-nav-bar.mat-background-primary .mat-ripple-element{background-color:rgba(255,255,255,0.12)}.mat-tab-group.mat-background-accent .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-group.mat-background-accent .mat-tab-link:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-background-accent .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-background-accent .mat-tab-link:not(.mat-tab-disabled):focus{background-color:rgba(65,151,108,0.3)}.mat-tab-group.mat-background-accent .mat-tab-header,.mat-tab-group.mat-background-accent .mat-tab-links,.mat-tab-nav-bar.mat-background-accent .mat-tab-header,.mat-tab-nav-bar.mat-background-accent .mat-tab-links{background-color:#006841}.mat-tab-group.mat-background-accent .mat-tab-label,.mat-tab-group.mat-background-accent .mat-tab-link,.mat-tab-nav-bar.mat-background-accent .mat-tab-label,.mat-tab-nav-bar.mat-background-accent .mat-tab-link{color:#fff}.mat-tab-group.mat-background-accent .mat-tab-label.mat-tab-disabled,.mat-tab-group.mat-background-accent .mat-tab-link.mat-tab-disabled,.mat-tab-nav-bar.mat-background-accent .mat-tab-label.mat-tab-disabled,.mat-tab-nav-bar.mat-background-accent .mat-tab-link.mat-tab-disabled{color:rgba(255,255,255,0.4)}.mat-tab-group.mat-background-accent .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-accent .mat-tab-header-pagination-chevron{border-color:#fff}.mat-tab-group.mat-background-accent .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-accent .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron{border-color:rgba(255,255,255,0.4)}.mat-tab-group.mat-background-accent .mat-ripple-element,.mat-tab-nav-bar.mat-background-accent .mat-ripple-element{background-color:rgba(255,255,255,0.12)}.mat-tab-group.mat-background-warn .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-group.mat-background-warn .mat-tab-link:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-background-warn .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-background-warn .mat-tab-link:not(.mat-tab-disabled):focus{background-color:rgba(193,107,126,0.3)}.mat-tab-group.mat-background-warn .mat-tab-header,.mat-tab-group.mat-background-warn .mat-tab-links,.mat-tab-nav-bar.mat-background-warn .mat-tab-header,.mat-tab-nav-bar.mat-background-warn .mat-tab-links{background-color:#8e3e52}.mat-tab-group.mat-background-warn .mat-tab-label,.mat-tab-group.mat-background-warn .mat-tab-link,.mat-tab-nav-bar.mat-background-warn .mat-tab-label,.mat-tab-nav-bar.mat-background-warn .mat-tab-link{color:#fff}.mat-tab-group.mat-background-warn .mat-tab-label.mat-tab-disabled,.mat-tab-group.mat-background-warn .mat-tab-link.mat-tab-disabled,.mat-tab-nav-bar.mat-background-warn .mat-tab-label.mat-tab-disabled,.mat-tab-nav-bar.mat-background-warn .mat-tab-link.mat-tab-disabled{color:rgba(255,255,255,0.4)}.mat-tab-group.mat-background-warn .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-warn .mat-tab-header-pagination-chevron{border-color:#fff}.mat-tab-group.mat-background-warn .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-warn .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron{border-color:rgba(255,255,255,0.4)}.mat-tab-group.mat-background-warn .mat-ripple-element,.mat-tab-nav-bar.mat-background-warn .mat-ripple-element{background-color:rgba(255,255,255,0.12)}.mat-toolbar{background:#f5f5f5;color:rgba(0,0,0,0.87)}.mat-toolbar.mat-primary{background:#135f7f;color:#fff}.mat-toolbar.mat-accent{background:#006841;color:#fff}.mat-toolbar.mat-warn{background:#8e3e52;color:#fff}.mat-tooltip{background:rgba(97,97,97,0.9)}.mat-snack-bar-container{background:#323232;color:#fff}.mat-simple-snackbar-action{color:#006841}[color=primary]{color:#135f7f}[color=warn]{color:#8e3e52}[color=accent]{color:#006841}.jstree-proton .jstree-clicked{background:#4e8cae !important}.jstree-proton :not(.jstree-disabled).jstree-hovered{background:#4e8cae !important;box-shadow:inset 0 0 1px #135f7f !important}.jstree-proton .jstree-disabled:hover{cursor:not-allowed}.adminArea{display:flex;flex-flow:row wrap}.adminArea_1{overflow:hidden;padding:20px;border-right:dashed 1px #135f7f;border-bottom:dashed 1px #135f7f}.adminArea_2{overflow:hidden;padding:20px;border-left:dashed 1px #135f7f;border-bottom:dashed 1px #135f7f}.adminArea_3{overflow:hidden;padding:20px;border-right:dashed 1px #135f7f;border-top:dashed 1px #135f7f}.adminArea_4{overflow:hidden;padding:20px;border-left:dashed 1px #135f7f;border-top:dashed 1px #135f7f}.dndFile{border:dashed 5px grey;padding:10px;text-align:center;opacity:0.5;font-size:15px;font-weight:bolder;margin-bottom:10px}.dndFileHighlighted{opacity:1 !important;border:dashed 5px #135f7f !important;color:#135f7f}
+.mat-elevation-z0{box-shadow:0px 0px 0px 0px rgba(0,0,0,0.2),0px 0px 0px 0px rgba(0,0,0,0.14),0px 0px 0px 0px rgba(0,0,0,0.12)}.mat-elevation-z1{box-shadow:0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)}.mat-elevation-z2{box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)}.mat-elevation-z3{box-shadow:0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)}.mat-elevation-z4{box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}.mat-elevation-z5{box-shadow:0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)}.mat-elevation-z6{box-shadow:0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)}.mat-elevation-z7{box-shadow:0px 4px 5px -2px rgba(0,0,0,0.2),0px 7px 10px 1px rgba(0,0,0,0.14),0px 2px 16px 1px rgba(0,0,0,0.12)}.mat-elevation-z8{box-shadow:0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)}.mat-elevation-z9{box-shadow:0px 5px 6px -3px rgba(0,0,0,0.2),0px 9px 12px 1px rgba(0,0,0,0.14),0px 3px 16px 2px rgba(0,0,0,0.12)}.mat-elevation-z10{box-shadow:0px 6px 6px -3px rgba(0,0,0,0.2),0px 10px 14px 1px rgba(0,0,0,0.14),0px 4px 18px 3px rgba(0,0,0,0.12)}.mat-elevation-z11{box-shadow:0px 6px 7px -4px rgba(0,0,0,0.2),0px 11px 15px 1px rgba(0,0,0,0.14),0px 4px 20px 3px rgba(0,0,0,0.12)}.mat-elevation-z12{box-shadow:0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12)}.mat-elevation-z13{box-shadow:0px 7px 8px -4px rgba(0,0,0,0.2),0px 13px 19px 2px rgba(0,0,0,0.14),0px 5px 24px 4px rgba(0,0,0,0.12)}.mat-elevation-z14{box-shadow:0px 7px 9px -4px rgba(0,0,0,0.2),0px 14px 21px 2px rgba(0,0,0,0.14),0px 5px 26px 4px rgba(0,0,0,0.12)}.mat-elevation-z15{box-shadow:0px 8px 9px -5px rgba(0,0,0,0.2),0px 15px 22px 2px rgba(0,0,0,0.14),0px 6px 28px 5px rgba(0,0,0,0.12)}.mat-elevation-z16{box-shadow:0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)}.mat-elevation-z17{box-shadow:0px 8px 11px -5px rgba(0,0,0,0.2),0px 17px 26px 2px rgba(0,0,0,0.14),0px 6px 32px 5px rgba(0,0,0,0.12)}.mat-elevation-z18{box-shadow:0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)}.mat-elevation-z19{box-shadow:0px 9px 12px -6px rgba(0,0,0,0.2),0px 19px 29px 2px rgba(0,0,0,0.14),0px 7px 36px 6px rgba(0,0,0,0.12)}.mat-elevation-z20{box-shadow:0px 10px 13px -6px rgba(0,0,0,0.2),0px 20px 31px 3px rgba(0,0,0,0.14),0px 8px 38px 7px rgba(0,0,0,0.12)}.mat-elevation-z21{box-shadow:0px 10px 13px -6px rgba(0,0,0,0.2),0px 21px 33px 3px rgba(0,0,0,0.14),0px 8px 40px 7px rgba(0,0,0,0.12)}.mat-elevation-z22{box-shadow:0px 10px 14px -6px rgba(0,0,0,0.2),0px 22px 35px 3px rgba(0,0,0,0.14),0px 8px 42px 7px rgba(0,0,0,0.12)}.mat-elevation-z23{box-shadow:0px 11px 14px -7px rgba(0,0,0,0.2),0px 23px 36px 3px rgba(0,0,0,0.14),0px 9px 44px 8px rgba(0,0,0,0.12)}.mat-elevation-z24{box-shadow:0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12)}.mat-h1,.mat-headline,.mat-typography h1{font:400 24px/32px Roboto, "Helvetica Neue", sans-serif;margin:0 0 16px}.mat-h2,.mat-title,.mat-typography h2{font:500 20px/32px Roboto, "Helvetica Neue", sans-serif;margin:0 0 16px}.mat-h3,.mat-subheading-2,.mat-typography h3{font:400 16px/28px Roboto, "Helvetica Neue", sans-serif;margin:0 0 16px}.mat-h4,.mat-subheading-1,.mat-typography h4{font:400 15px/24px Roboto, "Helvetica Neue", sans-serif;margin:0 0 16px}.mat-h5,.mat-typography h5{font:400 11.62px/20px Roboto, "Helvetica Neue", sans-serif;margin:0 0 12px}.mat-h6,.mat-typography h6{font:400 9.38px/20px Roboto, "Helvetica Neue", sans-serif;margin:0 0 12px}.mat-body-strong,.mat-body-2{font:500 14px/24px Roboto, "Helvetica Neue", sans-serif}.mat-body,.mat-body-1,.mat-typography{font:400 14px/20px Roboto, "Helvetica Neue", sans-serif}.mat-body p,.mat-body-1 p,.mat-typography p{margin:0 0 12px}.mat-small,.mat-caption{font:400 12px/20px Roboto, "Helvetica Neue", sans-serif}.mat-display-4,.mat-typography .mat-display-4{font:300 112px/112px Roboto, "Helvetica Neue", sans-serif;margin:0 0 56px;letter-spacing:-0.05em}.mat-display-3,.mat-typography .mat-display-3{font:400 56px/56px Roboto, "Helvetica Neue", sans-serif;margin:0 0 64px;letter-spacing:-0.02em}.mat-display-2,.mat-typography .mat-display-2{font:400 45px/48px Roboto, "Helvetica Neue", sans-serif;margin:0 0 64px;letter-spacing:-0.005em}.mat-display-1,.mat-typography .mat-display-1{font:400 34px/40px Roboto, "Helvetica Neue", sans-serif;margin:0 0 64px}.mat-button,.mat-raised-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button,.mat-fab,.mat-mini-fab{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:14px;font-weight:500}.mat-button-toggle{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-card{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-card-title{font-size:24px;font-weight:400}.mat-card-subtitle,.mat-card-content,.mat-card-header .mat-card-title{font-size:14px}.mat-checkbox{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-checkbox-layout .mat-checkbox-label{line-height:24px}.mat-chip{font-size:13px;line-height:18px}.mat-chip .mat-chip-remove.mat-icon{font-size:18px}.mat-table{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-header-cell{font-size:12px;font-weight:500}.mat-cell{font-size:14px}.mat-calendar{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-calendar-body{font-size:13px}.mat-calendar-body-label,.mat-calendar-period-button{font-size:14px;font-weight:500}.mat-calendar-table-header th{font-size:11px;font-weight:400}.mat-dialog-title{font:500 20px/32px Roboto, "Helvetica Neue", sans-serif}.mat-expansion-panel-header{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:15px;font-weight:400}.mat-expansion-panel-content{font:400 14px/20px Roboto, "Helvetica Neue", sans-serif}.mat-form-field{font-size:inherit;font-weight:400;line-height:1.125;font-family:Roboto, "Helvetica Neue", sans-serif}.mat-form-field-wrapper{padding-bottom:1.25em}.mat-form-field-prefix .mat-icon,.mat-form-field-suffix .mat-icon{font-size:150%;line-height:1.125}.mat-form-field-prefix .mat-icon-button,.mat-form-field-suffix .mat-icon-button{height:1.5em;width:1.5em}.mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-suffix .mat-icon-button .mat-icon{height:1.125em;line-height:1.125}.mat-form-field-infix{padding:.4375em 0;border-top:.84375em solid transparent}.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label,.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label{transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(0.001px);-ms-transform:translateY(-1.28125em) scale(.75);width:133.33333%}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(0.00101px);-ms-transform:translateY(-1.28124em) scale(.75);width:133.33334%}.mat-form-field-can-float .mat-input-server[label]:not(:label-shown)+.mat-form-field-label-wrapper .mat-form-field-label{transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(0.00102px);-ms-transform:translateY(-1.28123em) scale(.75);width:133.33335%}.mat-form-field-label-wrapper{top:-.84375em;padding-top:.84375em}.mat-form-field-label{top:1.28125em}.mat-form-field-underline{bottom:1.25em}.mat-form-field-subscript-wrapper{font-size:75%;margin-top:.54167em;top:calc(100% - 1.66667em)}.mat-grid-tile-header,.mat-grid-tile-footer{font-size:14px}.mat-grid-tile-header .mat-line,.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2),.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:12px}input.mat-input-element{margin-top:-.0625em}.mat-menu-item{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:16px;font-weight:400}.mat-paginator,.mat-paginator-page-size .mat-select-trigger{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:12px}.mat-radio-button{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-select{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-select-trigger{height:1.125em}.mat-slide-toggle-content{font:400 14px/20px Roboto, "Helvetica Neue", sans-serif}.mat-slider-thumb-label-text{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:12px;font-weight:500}.mat-stepper-vertical,.mat-stepper-horizontal{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-step-label{font-size:14px;font-weight:400}.mat-step-label-selected{font-size:14px;font-weight:500}.mat-tab-group{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-tab-label,.mat-tab-link{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:14px;font-weight:500}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font:500 20px/32px Roboto, "Helvetica Neue", sans-serif;margin:0}.mat-tooltip{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:10px;padding-top:6px;padding-bottom:6px}.mat-tooltip-handset{font-size:14px;padding-top:9px;padding-bottom:9px}.mat-list-item{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-list-option{font-family:Roboto, "Helvetica Neue", sans-serif}.mat-list .mat-list-item,.mat-nav-list .mat-list-item,.mat-selection-list .mat-list-item{font-size:16px}.mat-list .mat-list-item .mat-line,.mat-nav-list .mat-list-item .mat-line,.mat-selection-list .mat-list-item .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list .mat-list-item .mat-line:nth-child(n+2),.mat-nav-list .mat-list-item .mat-line:nth-child(n+2),.mat-selection-list .mat-list-item .mat-line:nth-child(n+2){font-size:14px}.mat-list .mat-list-option,.mat-nav-list .mat-list-option,.mat-selection-list .mat-list-option{font-size:16px}.mat-list .mat-list-option .mat-line,.mat-nav-list .mat-list-option .mat-line,.mat-selection-list .mat-list-option .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list .mat-list-option .mat-line:nth-child(n+2),.mat-nav-list .mat-list-option .mat-line:nth-child(n+2),.mat-selection-list .mat-list-option .mat-line:nth-child(n+2){font-size:14px}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:14px;font-weight:500}.mat-list[dense] .mat-list-item,.mat-nav-list[dense] .mat-list-item,.mat-selection-list[dense] .mat-list-item{font-size:12px}.mat-list[dense] .mat-list-item .mat-line,.mat-nav-list[dense] .mat-list-item .mat-line,.mat-selection-list[dense] .mat-list-item .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list[dense] .mat-list-item .mat-line:nth-child(n+2),.mat-nav-list[dense] .mat-list-item .mat-line:nth-child(n+2),.mat-selection-list[dense] .mat-list-item .mat-line:nth-child(n+2){font-size:12px}.mat-list[dense] .mat-list-option,.mat-nav-list[dense] .mat-list-option,.mat-selection-list[dense] .mat-list-option{font-size:12px}.mat-list[dense] .mat-list-option .mat-line,.mat-nav-list[dense] .mat-list-option .mat-line,.mat-selection-list[dense] .mat-list-option .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list[dense] .mat-list-option .mat-line:nth-child(n+2),.mat-nav-list[dense] .mat-list-option .mat-line:nth-child(n+2),.mat-selection-list[dense] .mat-list-option .mat-line:nth-child(n+2){font-size:12px}.mat-list[dense] .mat-subheader,.mat-nav-list[dense] .mat-subheader,.mat-selection-list[dense] .mat-subheader{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:12px;font-weight:500}.mat-option{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:16px}.mat-optgroup-label{font:500 14px/24px Roboto, "Helvetica Neue", sans-serif}.mat-simple-snackbar{font-family:Roboto, "Helvetica Neue", sans-serif;font-size:14px}.mat-simple-snackbar-action{line-height:1;font-family:inherit;font-size:inherit;font-weight:500}.mat-ripple{overflow:hidden}@media screen and (-ms-high-contrast: active){.mat-ripple{display:none}}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(0)}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,0.288)}.cdk-overlay-transparent-backdrop,.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.mat-ripple-element{background-color:rgba(0,0,0,0.1)}.mat-option{color:rgba(0,0,0,0.87)}.mat-option:hover:not(.mat-option-disabled),.mat-option:focus:not(.mat-option-disabled){background:rgba(0,0,0,0.04)}.mat-primary .mat-option.mat-selected:not(.mat-option-disabled){color:#135f7f}.mat-accent .mat-option.mat-selected:not(.mat-option-disabled){color:#006841}.mat-warn .mat-option.mat-selected:not(.mat-option-disabled){color:#8e3e52}.mat-option.mat-selected:not(.mat-option-multiple):not(.mat-option-disabled){background:rgba(0,0,0,0.04)}.mat-option.mat-active{background:rgba(0,0,0,0.04);color:rgba(0,0,0,0.87)}.mat-option.mat-option-disabled{color:rgba(0,0,0,0.38)}.mat-optgroup-label{color:rgba(0,0,0,0.54)}.mat-optgroup-disabled .mat-optgroup-label{color:rgba(0,0,0,0.38)}.mat-pseudo-checkbox{color:rgba(0,0,0,0.54)}.mat-pseudo-checkbox::after{color:#fafafa}.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-indeterminate,.mat-accent .mat-pseudo-checkbox-checked,.mat-accent .mat-pseudo-checkbox-indeterminate{background:#006841}.mat-primary .mat-pseudo-checkbox-checked,.mat-primary .mat-pseudo-checkbox-indeterminate{background:#135f7f}.mat-warn .mat-pseudo-checkbox-checked,.mat-warn .mat-pseudo-checkbox-indeterminate{background:#8e3e52}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background:#b0b0b0}.mat-app-background{background-color:#fafafa;color:rgba(0,0,0,0.87)}.mat-theme-loaded-marker{display:none}.mat-autocomplete-panel{background:#fff;color:rgba(0,0,0,0.87)}.mat-autocomplete-panel .mat-option.mat-selected:not(.mat-active):not(:hover){background:#fff}.mat-autocomplete-panel .mat-option.mat-selected:not(.mat-active):not(:hover):not(.mat-option-disabled){color:rgba(0,0,0,0.87)}.mat-button,.mat-icon-button,.mat-stroked-button{background:transparent}.mat-button.mat-primary .mat-button-focus-overlay,.mat-icon-button.mat-primary .mat-button-focus-overlay,.mat-stroked-button.mat-primary .mat-button-focus-overlay{background-color:rgba(19,95,127,0.12)}.mat-button.mat-accent .mat-button-focus-overlay,.mat-icon-button.mat-accent .mat-button-focus-overlay,.mat-stroked-button.mat-accent .mat-button-focus-overlay{background-color:rgba(0,104,65,0.12)}.mat-button.mat-warn .mat-button-focus-overlay,.mat-icon-button.mat-warn .mat-button-focus-overlay,.mat-stroked-button.mat-warn .mat-button-focus-overlay{background-color:rgba(142,62,82,0.12)}.mat-button[disabled] .mat-button-focus-overlay,.mat-icon-button[disabled] .mat-button-focus-overlay,.mat-stroked-button[disabled] .mat-button-focus-overlay{background-color:transparent}.mat-button.mat-primary,.mat-icon-button.mat-primary,.mat-stroked-button.mat-primary{color:#135f7f}.mat-button.mat-accent,.mat-icon-button.mat-accent,.mat-stroked-button.mat-accent{color:#006841}.mat-button.mat-warn,.mat-icon-button.mat-warn,.mat-stroked-button.mat-warn{color:#8e3e52}.mat-button.mat-primary[disabled],.mat-button.mat-accent[disabled],.mat-button.mat-warn[disabled],.mat-button[disabled][disabled],.mat-icon-button.mat-primary[disabled],.mat-icon-button.mat-accent[disabled],.mat-icon-button.mat-warn[disabled],.mat-icon-button[disabled][disabled],.mat-stroked-button.mat-primary[disabled],.mat-stroked-button.mat-accent[disabled],.mat-stroked-button.mat-warn[disabled],.mat-stroked-button[disabled][disabled]{color:rgba(0,0,0,0.26)}.mat-raised-button,.mat-fab,.mat-mini-fab{color:rgba(0,0,0,0.87);background-color:#fff}.mat-raised-button.mat-primary,.mat-fab.mat-primary,.mat-mini-fab.mat-primary{color:#fff}.mat-raised-button.mat-accent,.mat-fab.mat-accent,.mat-mini-fab.mat-accent{color:#fff}.mat-raised-button.mat-warn,.mat-fab.mat-warn,.mat-mini-fab.mat-warn{color:#fff}.mat-raised-button.mat-primary[disabled],.mat-raised-button.mat-accent[disabled],.mat-raised-button.mat-warn[disabled],.mat-raised-button[disabled][disabled],.mat-fab.mat-primary[disabled],.mat-fab.mat-accent[disabled],.mat-fab.mat-warn[disabled],.mat-fab[disabled][disabled],.mat-mini-fab.mat-primary[disabled],.mat-mini-fab.mat-accent[disabled],.mat-mini-fab.mat-warn[disabled],.mat-mini-fab[disabled][disabled]{color:rgba(0,0,0,0.26)}.mat-raised-button.mat-primary,.mat-fab.mat-primary,.mat-mini-fab.mat-primary{background-color:#135f7f}.mat-raised-button.mat-accent,.mat-fab.mat-accent,.mat-mini-fab.mat-accent{background-color:#006841}.mat-raised-button.mat-warn,.mat-fab.mat-warn,.mat-mini-fab.mat-warn{background-color:#8e3e52}.mat-raised-button.mat-primary[disabled],.mat-raised-button.mat-accent[disabled],.mat-raised-button.mat-warn[disabled],.mat-raised-button[disabled][disabled],.mat-fab.mat-primary[disabled],.mat-fab.mat-accent[disabled],.mat-fab.mat-warn[disabled],.mat-fab[disabled][disabled],.mat-mini-fab.mat-primary[disabled],.mat-mini-fab.mat-accent[disabled],.mat-mini-fab.mat-warn[disabled],.mat-mini-fab[disabled][disabled]{background-color:rgba(0,0,0,0.12)}.mat-raised-button.mat-primary .mat-ripple-element,.mat-fab.mat-primary .mat-ripple-element,.mat-mini-fab.mat-primary .mat-ripple-element{background-color:rgba(255,255,255,0.2)}.mat-raised-button.mat-accent .mat-ripple-element,.mat-fab.mat-accent .mat-ripple-element,.mat-mini-fab.mat-accent .mat-ripple-element{background-color:rgba(255,255,255,0.2)}.mat-raised-button.mat-warn .mat-ripple-element,.mat-fab.mat-warn .mat-ripple-element,.mat-mini-fab.mat-warn .mat-ripple-element{background-color:rgba(255,255,255,0.2)}.mat-button.mat-primary .mat-ripple-element{background-color:rgba(19,95,127,0.1)}.mat-button.mat-accent .mat-ripple-element{background-color:rgba(0,104,65,0.1)}.mat-button.mat-warn .mat-ripple-element{background-color:rgba(142,62,82,0.1)}.mat-flat-button{color:rgba(0,0,0,0.87);background-color:#fff}.mat-flat-button.mat-primary{color:#fff}.mat-flat-button.mat-accent{color:#fff}.mat-flat-button.mat-warn{color:#fff}.mat-flat-button.mat-primary[disabled],.mat-flat-button.mat-accent[disabled],.mat-flat-button.mat-warn[disabled],.mat-flat-button[disabled][disabled]{color:rgba(0,0,0,0.26)}.mat-flat-button.mat-primary{background-color:#135f7f}.mat-flat-button.mat-accent{background-color:#006841}.mat-flat-button.mat-warn{background-color:#8e3e52}.mat-flat-button.mat-primary[disabled],.mat-flat-button.mat-accent[disabled],.mat-flat-button.mat-warn[disabled],.mat-flat-button[disabled][disabled]{background-color:rgba(0,0,0,0.12)}.mat-flat-button.mat-primary .mat-ripple-element{background-color:rgba(255,255,255,0.2)}.mat-flat-button.mat-accent .mat-ripple-element{background-color:rgba(255,255,255,0.2)}.mat-flat-button.mat-warn .mat-ripple-element{background-color:rgba(255,255,255,0.2)}.mat-icon-button.mat-primary .mat-ripple-element{background-color:rgba(19,95,127,0.2)}.mat-icon-button.mat-accent .mat-ripple-element{background-color:rgba(0,104,65,0.2)}.mat-icon-button.mat-warn .mat-ripple-element{background-color:rgba(142,62,82,0.2)}.mat-button-toggle{color:rgba(0,0,0,0.38)}.mat-button-toggle.cdk-focused .mat-button-toggle-focus-overlay{background-color:rgba(0,0,0,0.12)}.mat-button-toggle-checked{background-color:#e0e0e0;color:rgba(0,0,0,0.54)}.mat-button-toggle-disabled{background-color:#eee;color:rgba(0,0,0,0.26)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:#bdbdbd}.mat-card{background:#fff;color:rgba(0,0,0,0.87)}.mat-card-subtitle{color:rgba(0,0,0,0.54)}.mat-checkbox-frame{border-color:rgba(0,0,0,0.54)}.mat-checkbox-checkmark{fill:#fafafa}.mat-checkbox-checkmark-path{stroke:#fafafa !important}.mat-checkbox-mixedmark{background-color:#fafafa}.mat-checkbox-indeterminate.mat-primary .mat-checkbox-background,.mat-checkbox-checked.mat-primary .mat-checkbox-background{background-color:#135f7f}.mat-checkbox-indeterminate.mat-accent .mat-checkbox-background,.mat-checkbox-checked.mat-accent .mat-checkbox-background{background-color:#006841}.mat-checkbox-indeterminate.mat-warn .mat-checkbox-background,.mat-checkbox-checked.mat-warn .mat-checkbox-background{background-color:#8e3e52}.mat-checkbox-disabled.mat-checkbox-checked .mat-checkbox-background,.mat-checkbox-disabled.mat-checkbox-indeterminate .mat-checkbox-background{background-color:#b0b0b0}.mat-checkbox-disabled:not(.mat-checkbox-checked) .mat-checkbox-frame{border-color:#b0b0b0}.mat-checkbox-disabled .mat-checkbox-label{color:#b0b0b0}.mat-checkbox:not(.mat-checkbox-disabled).mat-primary .mat-checkbox-ripple .mat-ripple-element{background-color:rgba(19,95,127,0.26)}.mat-checkbox:not(.mat-checkbox-disabled).mat-accent .mat-checkbox-ripple .mat-ripple-element{background-color:rgba(0,104,65,0.26)}.mat-checkbox:not(.mat-checkbox-disabled).mat-warn .mat-checkbox-ripple .mat-ripple-element{background-color:rgba(142,62,82,0.26)}.mat-chip:not(.mat-basic-chip){background-color:#e0e0e0;color:rgba(0,0,0,0.87)}.mat-chip:not(.mat-basic-chip) .mat-chip-remove{color:rgba(0,0,0,0.87);opacity:0.4}.mat-chip:not(.mat-basic-chip) .mat-chip-remove:hover{opacity:0.54}.mat-chip.mat-chip-selected.mat-primary{background-color:#135f7f;color:#fff}.mat-chip.mat-chip-selected.mat-primary .mat-chip-remove{color:#fff;opacity:0.4}.mat-chip.mat-chip-selected.mat-primary .mat-chip-remove:hover{opacity:0.54}.mat-chip.mat-chip-selected.mat-warn{background-color:#8e3e52;color:#fff}.mat-chip.mat-chip-selected.mat-warn .mat-chip-remove{color:#fff;opacity:0.4}.mat-chip.mat-chip-selected.mat-warn .mat-chip-remove:hover{opacity:0.54}.mat-chip.mat-chip-selected.mat-accent{background-color:#006841;color:#fff}.mat-chip.mat-chip-selected.mat-accent .mat-chip-remove{color:#fff;opacity:0.4}.mat-chip.mat-chip-selected.mat-accent .mat-chip-remove:hover{opacity:0.54}.mat-table{background:#fff}.mat-row,.mat-header-row{border-bottom-color:rgba(0,0,0,0.12)}.mat-header-cell{color:rgba(0,0,0,0.54)}.mat-cell{color:rgba(0,0,0,0.87)}.mat-datepicker-content{background-color:#fff;color:rgba(0,0,0,0.87)}.mat-calendar-arrow{border-top-color:rgba(0,0,0,0.54)}.mat-calendar-next-button,.mat-calendar-previous-button{color:rgba(0,0,0,0.54)}.mat-calendar-table-header{color:rgba(0,0,0,0.38)}.mat-calendar-table-header-divider::after{background:rgba(0,0,0,0.12)}.mat-calendar-body-label{color:rgba(0,0,0,0.54)}.mat-calendar-body-cell-content{color:rgba(0,0,0,0.87);border-color:transparent}.mat-calendar-body-disabled>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){color:rgba(0,0,0,0.38)}:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:rgba(0,0,0,0.04)}.mat-calendar-body-selected{background-color:#135f7f;color:#fff}.mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:rgba(19,95,127,0.4)}.mat-calendar-body-today:not(.mat-calendar-body-selected){border-color:rgba(0,0,0,0.38)}.mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1px #fff}.mat-calendar-body-disabled>.mat-calendar-body-today:not(.mat-calendar-body-selected){border-color:rgba(0,0,0,0.18)}.mat-datepicker-toggle-active{color:#135f7f}.mat-dialog-container{background:#fff;color:rgba(0,0,0,0.87)}.mat-divider{border-top-color:rgba(0,0,0,0.12)}.mat-divider-vertical{border-right-color:rgba(0,0,0,0.12)}.mat-expansion-panel{background:#fff;color:rgba(0,0,0,0.87)}.mat-action-row{border-top-color:rgba(0,0,0,0.12)}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled='true']).cdk-keyboard-focused,.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled='true']).cdk-program-focused,.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled='true']):hover{background:rgba(0,0,0,0.04)}.mat-expansion-panel-header-title{color:rgba(0,0,0,0.87)}.mat-expansion-panel-header-description,.mat-expansion-indicator::after{color:rgba(0,0,0,0.54)}.mat-expansion-panel-header[aria-disabled='true']{color:rgba(0,0,0,0.26)}.mat-expansion-panel-header[aria-disabled='true'] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled='true'] .mat-expansion-panel-header-description{color:inherit}.mat-form-field-label{color:rgba(0,0,0,0.54)}.mat-hint{color:rgba(0,0,0,0.54)}.mat-focused .mat-form-field-label{color:#135f7f}.mat-focused .mat-form-field-label.mat-accent{color:#006841}.mat-focused .mat-form-field-label.mat-warn{color:#8e3e52}.mat-focused .mat-form-field-required-marker{color:#006841}.mat-form-field-underline{background-color:rgba(0,0,0,0.42)}.mat-form-field-disabled .mat-form-field-underline{background-image:linear-gradient(to right, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0.42) 33%, transparent 0%);background-size:4px 1px;background-repeat:repeat-x}.mat-form-field-ripple{background-color:#135f7f}.mat-form-field-ripple.mat-accent{background-color:#006841}.mat-form-field-ripple.mat-warn{background-color:#8e3e52}.mat-form-field-invalid .mat-form-field-label{color:#8e3e52}.mat-form-field-invalid .mat-form-field-label.mat-accent,.mat-form-field-invalid .mat-form-field-label .mat-form-field-required-marker{color:#8e3e52}.mat-form-field-invalid .mat-form-field-ripple{background-color:#8e3e52}.mat-error{color:#8e3e52}.mat-icon.mat-primary{color:#135f7f}.mat-icon.mat-accent{color:#006841}.mat-icon.mat-warn{color:#8e3e52}.mat-input-element:disabled{color:rgba(0,0,0,0.38)}.mat-input-element{caret-color:#135f7f}.mat-input-element::placeholder{color:rgba(0,0,0,0.42)}.mat-input-element::-moz-placeholder{color:rgba(0,0,0,0.42)}.mat-input-element::-webkit-input-placeholder{color:rgba(0,0,0,0.42)}.mat-input-element:-ms-input-placeholder{color:rgba(0,0,0,0.42)}.mat-accent .mat-input-element{caret-color:#006841}.mat-warn .mat-input-element,.mat-form-field-invalid .mat-input-element{caret-color:#8e3e52}.mat-list .mat-list-item,.mat-nav-list .mat-list-item,.mat-selection-list .mat-list-item{color:rgba(0,0,0,0.87)}.mat-list .mat-list-option,.mat-nav-list .mat-list-option,.mat-selection-list .mat-list-option{color:rgba(0,0,0,0.87)}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{color:rgba(0,0,0,0.54)}.mat-list-item-disabled{background-color:#eee}.mat-list-option:hover,.mat-list-option.mat-list-item-focus,.mat-nav-list .mat-list-item:hover,.mat-nav-list .mat-list-item.mat-list-item-focus{background:rgba(0,0,0,0.04)}.mat-menu-panel{background:#fff}.mat-menu-item{background:transparent;color:rgba(0,0,0,0.87)}.mat-menu-item[disabled]{color:rgba(0,0,0,0.38)}.mat-menu-item .mat-icon:not([color]),.mat-menu-item-submenu-trigger::after{color:rgba(0,0,0,0.54)}.mat-menu-item:hover:not([disabled]),.mat-menu-item.cdk-program-focused:not([disabled]),.mat-menu-item.cdk-keyboard-focused:not([disabled]),.mat-menu-item-highlighted:not([disabled]){background:rgba(0,0,0,0.04)}.mat-paginator{background:#fff}.mat-paginator,.mat-paginator-page-size .mat-select-trigger{color:rgba(0,0,0,0.54)}.mat-paginator-decrement,.mat-paginator-increment{border-top:2px solid rgba(0,0,0,0.54);border-right:2px solid rgba(0,0,0,0.54)}.mat-paginator-first,.mat-paginator-last{border-top:2px solid rgba(0,0,0,0.54)}.mat-icon-button[disabled] .mat-paginator-decrement,.mat-icon-button[disabled] .mat-paginator-increment,.mat-icon-button[disabled] .mat-paginator-first,.mat-icon-button[disabled] .mat-paginator-last{border-color:rgba(0,0,0,0.38)}.mat-progress-bar-background{fill:#4e8cae}.mat-progress-bar-buffer{background-color:#4e8cae}.mat-progress-bar-fill::after{background-color:#135f7f}.mat-progress-bar.mat-accent .mat-progress-bar-background{fill:#41976c}.mat-progress-bar.mat-accent .mat-progress-bar-buffer{background-color:#41976c}.mat-progress-bar.mat-accent .mat-progress-bar-fill::after{background-color:#006841}.mat-progress-bar.mat-warn .mat-progress-bar-background{fill:#c16b7e}.mat-progress-bar.mat-warn .mat-progress-bar-buffer{background-color:#c16b7e}.mat-progress-bar.mat-warn .mat-progress-bar-fill::after{background-color:#8e3e52}.mat-progress-spinner circle,.mat-spinner circle{stroke:#135f7f}.mat-progress-spinner.mat-accent circle,.mat-spinner.mat-accent circle{stroke:#006841}.mat-progress-spinner.mat-warn circle,.mat-spinner.mat-warn circle{stroke:#8e3e52}.mat-radio-outer-circle{border-color:rgba(0,0,0,0.54)}.mat-radio-disabled .mat-radio-outer-circle{border-color:rgba(0,0,0,0.38)}.mat-radio-disabled .mat-radio-ripple .mat-ripple-element,.mat-radio-disabled .mat-radio-inner-circle{background-color:rgba(0,0,0,0.38)}.mat-radio-disabled .mat-radio-label-content{color:rgba(0,0,0,0.38)}.mat-radio-button.mat-primary.mat-radio-checked .mat-radio-outer-circle{border-color:#135f7f}.mat-radio-button.mat-primary .mat-radio-inner-circle{background-color:#135f7f}.mat-radio-button.mat-primary .mat-radio-ripple .mat-ripple-element{background-color:rgba(19,95,127,0.26)}.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#006841}.mat-radio-button.mat-accent .mat-radio-inner-circle{background-color:#006841}.mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element{background-color:rgba(0,104,65,0.26)}.mat-radio-button.mat-warn.mat-radio-checked .mat-radio-outer-circle{border-color:#8e3e52}.mat-radio-button.mat-warn .mat-radio-inner-circle{background-color:#8e3e52}.mat-radio-button.mat-warn .mat-radio-ripple .mat-ripple-element{background-color:rgba(142,62,82,0.26)}.mat-select-content,.mat-select-panel-done-animating{background:#fff}.mat-select-value{color:rgba(0,0,0,0.87)}.mat-select-placeholder{color:rgba(0,0,0,0.42)}.mat-select-disabled .mat-select-value{color:rgba(0,0,0,0.38)}.mat-select-arrow{color:rgba(0,0,0,0.54)}.mat-select-panel .mat-option.mat-selected:not(.mat-option-multiple){background:rgba(0,0,0,0.12)}.mat-form-field.mat-focused.mat-primary .mat-select-arrow{color:#135f7f}.mat-form-field.mat-focused.mat-accent .mat-select-arrow{color:#006841}.mat-form-field.mat-focused.mat-warn .mat-select-arrow{color:#8e3e52}.mat-form-field .mat-select.mat-select-invalid .mat-select-arrow{color:#8e3e52}.mat-form-field .mat-select.mat-select-disabled .mat-select-arrow{color:rgba(0,0,0,0.38)}.mat-drawer-container{background-color:#fafafa;color:rgba(0,0,0,0.87)}.mat-drawer{background-color:#fff;color:rgba(0,0,0,0.87)}.mat-drawer.mat-drawer-push{background-color:#fff}.mat-drawer-backdrop.mat-drawer-shown{background-color:rgba(0,0,0,0.6)}.mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb{background-color:#006841}.mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar{background-color:rgba(0,104,65,0.5)}.mat-slide-toggle:not(.mat-checked) .mat-ripple-element{background-color:rgba(0,0,0,0.06)}.mat-slide-toggle .mat-ripple-element{background-color:rgba(0,104,65,0.12)}.mat-slide-toggle.mat-primary.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb{background-color:#135f7f}.mat-slide-toggle.mat-primary.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar{background-color:rgba(19,95,127,0.5)}.mat-slide-toggle.mat-primary:not(.mat-checked) .mat-ripple-element{background-color:rgba(0,0,0,0.06)}.mat-slide-toggle.mat-primary .mat-ripple-element{background-color:rgba(19,95,127,0.12)}.mat-slide-toggle.mat-warn.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb{background-color:#8e3e52}.mat-slide-toggle.mat-warn.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar{background-color:rgba(142,62,82,0.5)}.mat-slide-toggle.mat-warn:not(.mat-checked) .mat-ripple-element{background-color:rgba(0,0,0,0.06)}.mat-slide-toggle.mat-warn .mat-ripple-element{background-color:rgba(142,62,82,0.12)}.mat-disabled .mat-slide-toggle-thumb{background-color:#bdbdbd}.mat-disabled .mat-slide-toggle-bar{background-color:rgba(0,0,0,0.1)}.mat-slide-toggle-thumb{background-color:#fafafa}.mat-slide-toggle-bar{background-color:rgba(0,0,0,0.38)}.mat-slider-track-background{background-color:rgba(0,0,0,0.26)}.mat-primary .mat-slider-track-fill,.mat-primary .mat-slider-thumb,.mat-primary .mat-slider-thumb-label{background-color:#135f7f}.mat-primary .mat-slider-thumb-label-text{color:#fff}.mat-accent .mat-slider-track-fill,.mat-accent .mat-slider-thumb,.mat-accent .mat-slider-thumb-label{background-color:#006841}.mat-accent .mat-slider-thumb-label-text{color:#fff}.mat-warn .mat-slider-track-fill,.mat-warn .mat-slider-thumb,.mat-warn .mat-slider-thumb-label{background-color:#8e3e52}.mat-warn .mat-slider-thumb-label-text{color:#fff}.mat-slider-focus-ring{background-color:rgba(0,104,65,0.2)}.mat-slider:hover .mat-slider-track-background,.cdk-focused .mat-slider-track-background{background-color:rgba(0,0,0,0.38)}.mat-slider-disabled .mat-slider-track-background,.mat-slider-disabled .mat-slider-track-fill,.mat-slider-disabled .mat-slider-thumb{background-color:rgba(0,0,0,0.26)}.mat-slider-disabled:hover .mat-slider-track-background{background-color:rgba(0,0,0,0.26)}.mat-slider-min-value .mat-slider-focus-ring{background-color:rgba(0,0,0,0.12)}.mat-slider-min-value.mat-slider-thumb-label-showing .mat-slider-thumb,.mat-slider-min-value.mat-slider-thumb-label-showing .mat-slider-thumb-label{background-color:rgba(0,0,0,0.87)}.mat-slider-min-value.mat-slider-thumb-label-showing.cdk-focused .mat-slider-thumb,.mat-slider-min-value.mat-slider-thumb-label-showing.cdk-focused .mat-slider-thumb-label{background-color:rgba(0,0,0,0.26)}.mat-slider-min-value:not(.mat-slider-thumb-label-showing) .mat-slider-thumb{border-color:rgba(0,0,0,0.26);background-color:transparent}.mat-slider-min-value:not(.mat-slider-thumb-label-showing):hover .mat-slider-thumb,.mat-slider-min-value:not(.mat-slider-thumb-label-showing).cdk-focused .mat-slider-thumb{border-color:rgba(0,0,0,0.38)}.mat-slider-min-value:not(.mat-slider-thumb-label-showing):hover.mat-slider-disabled .mat-slider-thumb,.mat-slider-min-value:not(.mat-slider-thumb-label-showing).cdk-focused.mat-slider-disabled .mat-slider-thumb{border-color:rgba(0,0,0,0.26)}.mat-slider-has-ticks .mat-slider-wrapper::after{border-color:rgba(0,0,0,0.7)}.mat-slider-horizontal .mat-slider-ticks{background-image:repeating-linear-gradient(to right, rgba(0,0,0,0.7), rgba(0,0,0,0.7) 2px, transparent 0, transparent);background-image:-moz-repeating-linear-gradient(0.0001deg, rgba(0,0,0,0.7), rgba(0,0,0,0.7) 2px, transparent 0, transparent)}.mat-slider-vertical .mat-slider-ticks{background-image:repeating-linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.7) 2px, transparent 0, transparent)}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused,.mat-step-header:hover{background-color:rgba(0,0,0,0.04)}.mat-step-header .mat-step-label,.mat-step-header .mat-step-optional{color:rgba(0,0,0,0.38)}.mat-step-header .mat-step-icon{background-color:#135f7f;color:#fff}.mat-step-header .mat-step-icon-not-touched{background-color:rgba(0,0,0,0.38);color:#fff}.mat-step-header .mat-step-label.mat-step-label-active{color:rgba(0,0,0,0.87)}.mat-stepper-horizontal,.mat-stepper-vertical{background-color:#fff}.mat-stepper-vertical-line::before{border-left-color:rgba(0,0,0,0.12)}.mat-stepper-horizontal-line{border-top-color:rgba(0,0,0,0.12)}.mat-tab-nav-bar,.mat-tab-header{border-bottom:1px solid rgba(0,0,0,0.12)}.mat-tab-group-inverted-header .mat-tab-nav-bar,.mat-tab-group-inverted-header .mat-tab-header{border-top:1px solid rgba(0,0,0,0.12);border-bottom:none}.mat-tab-label,.mat-tab-link{color:rgba(0,0,0,0.87)}.mat-tab-label.mat-tab-disabled,.mat-tab-link.mat-tab-disabled{color:rgba(0,0,0,0.38)}.mat-tab-header-pagination-chevron{border-color:rgba(0,0,0,0.87)}.mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron{border-color:rgba(0,0,0,0.38)}.mat-tab-group[class*='mat-background-'] .mat-tab-header,.mat-tab-nav-bar[class*='mat-background-']{border-bottom:none;border-top:none}.mat-tab-group.mat-primary .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-group.mat-primary .mat-tab-link:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-primary .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-primary .mat-tab-link:not(.mat-tab-disabled):focus{background-color:rgba(78,140,174,0.3)}.mat-tab-group.mat-primary .mat-ink-bar,.mat-tab-nav-bar.mat-primary .mat-ink-bar{background-color:#135f7f}.mat-tab-group.mat-primary.mat-background-primary .mat-ink-bar,.mat-tab-nav-bar.mat-primary.mat-background-primary .mat-ink-bar{background-color:#fff}.mat-tab-group.mat-accent .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-group.mat-accent .mat-tab-link:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-accent .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-accent .mat-tab-link:not(.mat-tab-disabled):focus{background-color:rgba(65,151,108,0.3)}.mat-tab-group.mat-accent .mat-ink-bar,.mat-tab-nav-bar.mat-accent .mat-ink-bar{background-color:#006841}.mat-tab-group.mat-accent.mat-background-accent .mat-ink-bar,.mat-tab-nav-bar.mat-accent.mat-background-accent .mat-ink-bar{background-color:#fff}.mat-tab-group.mat-warn .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-group.mat-warn .mat-tab-link:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-warn .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-warn .mat-tab-link:not(.mat-tab-disabled):focus{background-color:rgba(193,107,126,0.3)}.mat-tab-group.mat-warn .mat-ink-bar,.mat-tab-nav-bar.mat-warn .mat-ink-bar{background-color:#8e3e52}.mat-tab-group.mat-warn.mat-background-warn .mat-ink-bar,.mat-tab-nav-bar.mat-warn.mat-background-warn .mat-ink-bar{background-color:#fff}.mat-tab-group.mat-background-primary .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-group.mat-background-primary .mat-tab-link:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-background-primary .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-background-primary .mat-tab-link:not(.mat-tab-disabled):focus{background-color:rgba(78,140,174,0.3)}.mat-tab-group.mat-background-primary .mat-tab-header,.mat-tab-group.mat-background-primary .mat-tab-links,.mat-tab-nav-bar.mat-background-primary .mat-tab-header,.mat-tab-nav-bar.mat-background-primary .mat-tab-links{background-color:#135f7f}.mat-tab-group.mat-background-primary .mat-tab-label,.mat-tab-group.mat-background-primary .mat-tab-link,.mat-tab-nav-bar.mat-background-primary .mat-tab-label,.mat-tab-nav-bar.mat-background-primary .mat-tab-link{color:#fff}.mat-tab-group.mat-background-primary .mat-tab-label.mat-tab-disabled,.mat-tab-group.mat-background-primary .mat-tab-link.mat-tab-disabled,.mat-tab-nav-bar.mat-background-primary .mat-tab-label.mat-tab-disabled,.mat-tab-nav-bar.mat-background-primary .mat-tab-link.mat-tab-disabled{color:rgba(255,255,255,0.4)}.mat-tab-group.mat-background-primary .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-primary .mat-tab-header-pagination-chevron{border-color:#fff}.mat-tab-group.mat-background-primary .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-primary .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron{border-color:rgba(255,255,255,0.4)}.mat-tab-group.mat-background-primary .mat-ripple-element,.mat-tab-nav-bar.mat-background-primary .mat-ripple-element{background-color:rgba(255,255,255,0.12)}.mat-tab-group.mat-background-accent .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-group.mat-background-accent .mat-tab-link:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-background-accent .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-background-accent .mat-tab-link:not(.mat-tab-disabled):focus{background-color:rgba(65,151,108,0.3)}.mat-tab-group.mat-background-accent .mat-tab-header,.mat-tab-group.mat-background-accent .mat-tab-links,.mat-tab-nav-bar.mat-background-accent .mat-tab-header,.mat-tab-nav-bar.mat-background-accent .mat-tab-links{background-color:#006841}.mat-tab-group.mat-background-accent .mat-tab-label,.mat-tab-group.mat-background-accent .mat-tab-link,.mat-tab-nav-bar.mat-background-accent .mat-tab-label,.mat-tab-nav-bar.mat-background-accent .mat-tab-link{color:#fff}.mat-tab-group.mat-background-accent .mat-tab-label.mat-tab-disabled,.mat-tab-group.mat-background-accent .mat-tab-link.mat-tab-disabled,.mat-tab-nav-bar.mat-background-accent .mat-tab-label.mat-tab-disabled,.mat-tab-nav-bar.mat-background-accent .mat-tab-link.mat-tab-disabled{color:rgba(255,255,255,0.4)}.mat-tab-group.mat-background-accent .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-accent .mat-tab-header-pagination-chevron{border-color:#fff}.mat-tab-group.mat-background-accent .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-accent .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron{border-color:rgba(255,255,255,0.4)}.mat-tab-group.mat-background-accent .mat-ripple-element,.mat-tab-nav-bar.mat-background-accent .mat-ripple-element{background-color:rgba(255,255,255,0.12)}.mat-tab-group.mat-background-warn .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-group.mat-background-warn .mat-tab-link:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-background-warn .mat-tab-label:not(.mat-tab-disabled):focus,.mat-tab-nav-bar.mat-background-warn .mat-tab-link:not(.mat-tab-disabled):focus{background-color:rgba(193,107,126,0.3)}.mat-tab-group.mat-background-warn .mat-tab-header,.mat-tab-group.mat-background-warn .mat-tab-links,.mat-tab-nav-bar.mat-background-warn .mat-tab-header,.mat-tab-nav-bar.mat-background-warn .mat-tab-links{background-color:#8e3e52}.mat-tab-group.mat-background-warn .mat-tab-label,.mat-tab-group.mat-background-warn .mat-tab-link,.mat-tab-nav-bar.mat-background-warn .mat-tab-label,.mat-tab-nav-bar.mat-background-warn .mat-tab-link{color:#fff}.mat-tab-group.mat-background-warn .mat-tab-label.mat-tab-disabled,.mat-tab-group.mat-background-warn .mat-tab-link.mat-tab-disabled,.mat-tab-nav-bar.mat-background-warn .mat-tab-label.mat-tab-disabled,.mat-tab-nav-bar.mat-background-warn .mat-tab-link.mat-tab-disabled{color:rgba(255,255,255,0.4)}.mat-tab-group.mat-background-warn .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-warn .mat-tab-header-pagination-chevron{border-color:#fff}.mat-tab-group.mat-background-warn .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron,.mat-tab-nav-bar.mat-background-warn .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron{border-color:rgba(255,255,255,0.4)}.mat-tab-group.mat-background-warn .mat-ripple-element,.mat-tab-nav-bar.mat-background-warn .mat-ripple-element{background-color:rgba(255,255,255,0.12)}.mat-toolbar{background:#f5f5f5;color:rgba(0,0,0,0.87)}.mat-toolbar.mat-primary{background:#135f7f;color:#fff}.mat-toolbar.mat-accent{background:#006841;color:#fff}.mat-toolbar.mat-warn{background:#8e3e52;color:#fff}.mat-tooltip{background:rgba(97,97,97,0.9)}.mat-snack-bar-container{background:#323232;color:#fff}.mat-simple-snackbar-action{color:#006841}[color=primary]{color:#135f7f}[color=warn]{color:#8e3e52}[color=accent]{color:#006841}.jstree-proton .jstree-clicked{background:#4e8cae !important}.jstree-proton :not(.jstree-disabled).jstree-hovered{background:#4e8cae !important;box-shadow:inset 0 0 1px #135f7f !important}.jstree-proton .jstree-disabled:hover{cursor:not-allowed}.adminArea{display:flex;flex-flow:row wrap}.adminArea_1{overflow:hidden;padding:20px;border-right:dashed 1px #135f7f;border-bottom:dashed 1px #135f7f}.adminArea_2{overflow:hidden;padding:20px;border-left:dashed 1px #135f7f;border-bottom:dashed 1px #135f7f}.adminArea_3{overflow:hidden;padding:20px;border-right:dashed 1px #135f7f;border-top:dashed 1px #135f7f}.adminArea_4{overflow:hidden;padding:20px;border-left:dashed 1px #135f7f;border-top:dashed 1px #135f7f}.dndFile{border:dashed 5px grey;padding:10px;text-align:center;opacity:0.5;font-size:15px;font-weight:bolder;margin-bottom:10px}.dndFileHighlighted{opacity:1 !important;border:dashed 5px #135f7f !important;color:#135f7f}
diff --git a/apps/maarch_entreprise/define.php b/apps/maarch_entreprise/define.php
deleted file mode 100755
index e08ee41280d93b6f5783f1b3d8e3a582e328aed9..0000000000000000000000000000000000000000
--- a/apps/maarch_entreprise/define.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-/*
-*    Copyright 2008-2017 Maarch
-*
-*  This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
- * Ce fichier a mettre en paralléle dans le custom, permet de mettre des definitions spécifique au custom (exemple langue ou remplacement de define de ce fichier de base)
- **/
- if(file_exists('apps/maarch_entreprise/define_custom.php')) {
-	require_once 'apps/maarch_entreprise/define_custom.php';
- }
-
-// Variable pour activer les vues V2
-if (!defined('V2_ENABLED')) {
-	define('V2_ENABLED', false);
-}
-if (!defined('PROD_MODE')) {
-	define('PROD_MODE', false);
-}
diff --git a/apps/maarch_entreprise/index.php b/apps/maarch_entreprise/index.php
index 2036aae70a9ef9b0af87b6b2c454f4c5cc134682..4619814a3caa154d35536b3d8fb75ec51e57fcc8 100755
--- a/apps/maarch_entreprise/index.php
+++ b/apps/maarch_entreprise/index.php
@@ -1,22 +1,10 @@
 <?php
-/*
-*   Copyright 2008-2015 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*/
+/**
+ * Copyright Maarch since 2008 under licence GPLv3.
+ * See LICENCE.txt file at the root folder for more details.
+ * This file is part of Maarch software.
+ *
+ */
 
 /****************************************************************************/
 /*                                                                          */
@@ -30,17 +18,12 @@
 * @brief Maarch index page : every php page is loaded with this page
 *
 * @file
-* @author  Claire Figueras  <dev@maarch.org>
-* @author  Laurent Giovannoni <dev@maarch.org>
-* @author  Loic Vinet  <dev@maarch.org>
-* @date $date$
-* @version $Revision$
+* @author <dev@maarch.org>
 * @ingroup apps
 */
 include_once '../../core/class/class_functions.php';
 include_once '../../core/class/class_db_pdo.php';
 include_once '../../core/init.php';
-include_once 'apps/maarch_entreprise/define.php';
 
 if ($_SESSION['config']['usePHPIDS'] == 'true') {
     include 'apps/maarch_entreprise/phpids_control.php';
@@ -372,20 +355,11 @@ if (file_exists($path)) {
     </div>
     </div>
 </body>
-<?php
-if (PROD_MODE) {
-?>
-<!--    <script src="js/angular/main.bundle.min.js"></script>-->
-<?php
-} else {
-    ?>
-    <script src="../../node_modules/systemjs/dist/system.src.js"></script>
-    <script src="js/angular/systemjs.config.js"></script>
-<!--    <script>-->
-<!--        System.import('js/angular/main.js').catch(function(err){ console.error(err); });-->
-<!--    </script>-->
     <?php
-}
-?>
-
+    if ($_SESSION['user']['UserId'] == 'superadmin' && !empty($_REQUEST['administration'])) {
+        ?>
+        <script>triggerAngular(true, '#/administration')</script>
+    <?php
+    }
+    ?>
 </html>
diff --git a/apps/maarch_entreprise/js/angular/app/administration/action-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/action-administration.component.js
old mode 100755
new mode 100644
diff --git a/apps/maarch_entreprise/js/angular/app/administration/action-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/action-administration.component.ts
old mode 100755
new mode 100644
index 7cde5f2254b8484048bdc795b03cba63f413395b..2a8dad012584bf90a022038ffd3d7c31b25cae7c
--- a/apps/maarch_entreprise/js/angular/app/administration/action-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/action-administration.component.ts
@@ -11,7 +11,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["action-administrationView"],
+    templateUrl: "../../../../Views/action-administration.component.html",
     providers: [NotificationService]
 })
 export class ActionAdministrationComponent implements OnInit {
diff --git a/apps/maarch_entreprise/js/angular/app/administration/actions-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/actions-administration.component.js
old mode 100755
new mode 100644
diff --git a/apps/maarch_entreprise/js/angular/app/administration/actions-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/actions-administration.component.ts
old mode 100755
new mode 100644
index ce3b37da47f7e0384f127b753863f80e43adee4d..8ffdb8b7355618299be384cd92c44af483527a2b
--- a/apps/maarch_entreprise/js/angular/app/administration/actions-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/actions-administration.component.ts
@@ -12,7 +12,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["actions-administrationView"],
+    templateUrl: "../../../../Views/actions-administration.component.html",
     providers: [NotificationService]
 })
 
@@ -84,7 +84,7 @@ export class ActionsAdministrationComponent implements OnInit {
         if (r) {
             this.http.delete(this.coreUrl + 'rest/actions/' + action.id)
                 .subscribe((data: any) => {
-                    this.actions = data.action;
+                    this.actions = data.actions;
                     this.dataSource = new MatTableDataSource(this.actions);
                     this.dataSource.paginator = this.paginator;
                     this.dataSource.sort = this.sort;
diff --git a/apps/maarch_entreprise/js/angular/app/administration/administration-routing.module.js b/apps/maarch_entreprise/js/angular/app/administration/administration-routing.module.js
index 3a744f7871c060ca53c72e2b49293c5fab024a4e..cadc321f8f4de28f8e813caa54cd7ceee8cccbc8 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/administration-routing.module.js
+++ b/apps/maarch_entreprise/js/angular/app/administration/administration-routing.module.js
@@ -42,7 +42,7 @@ var AdministrationRoutingModule = /** @class */ (function () {
         core_1.NgModule({
             imports: [
                 router_1.RouterModule.forChild([
-                    { path: 'administration', component: administration_component_1.AdministrationComponent },
+                    { path: '', component: administration_component_1.AdministrationComponent },
                     { path: 'administration/users', component: users_administration_component_1.UsersAdministrationComponent },
                     { path: 'administration/users/new', component: user_administration_component_1.UserAdministrationComponent },
                     { path: 'administration/users/:id', component: user_administration_component_1.UserAdministrationComponent },
@@ -54,6 +54,7 @@ var AdministrationRoutingModule = /** @class */ (function () {
                     { path: 'administration/baskets/:id', component: basket_administration_component_1.BasketAdministrationComponent },
                     { path: 'administration/doctypes', component: doctypes_administration_component_1.DoctypesAdministrationComponent },
                     { path: 'administration/diffusionModels', component: diffusionModels_administration_component_1.DiffusionModelsAdministrationComponent },
+                    { path: 'administration/diffusionModels/new', component: diffusionModel_administration_component_1.DiffusionModelAdministrationComponent },
                     { path: 'administration/diffusionModels/:id', component: diffusionModel_administration_component_1.DiffusionModelAdministrationComponent },
                     { path: 'administration/entities', component: entities_administration_component_1.EntitiesAdministrationComponent },
                     { path: 'administration/entities/new', component: entity_administration_component_1.EntityAdministrationComponent },
diff --git a/apps/maarch_entreprise/js/angular/app/administration/administration-routing.module.ts b/apps/maarch_entreprise/js/angular/app/administration/administration-routing.module.ts
old mode 100755
new mode 100644
index 2e5ee0157c5ee2403bba6eaff381732eec864dc3..cad066a4720a0a205dd7443be59a9f239fd62f62
--- a/apps/maarch_entreprise/js/angular/app/administration/administration-routing.module.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/administration-routing.module.ts
@@ -10,9 +10,8 @@ import { BasketsAdministrationComponent }               from './baskets-administ
 import { BasketAdministrationComponent }                from './basket-administration.component';
 import { DoctypesAdministrationComponent }              from './doctypes-administration.component';
 import { DiffusionModelsAdministrationComponent }       from './diffusionModels-administration.component';
-import { DiffusionModelAdministrationComponent }       from './diffusionModel-administration.component';
+import { DiffusionModelAdministrationComponent }        from './diffusionModel-administration.component';
 import { EntitiesAdministrationComponent }              from './entities-administration.component';
-import { EntityAdministrationComponent }                from './entity-administration.component';
 import { StatusesAdministrationComponent }              from './statuses-administration.component';
 import { StatusAdministrationComponent }                from './status-administration.component';
 import { ActionsAdministrationComponent }               from './actions-administration.component';
@@ -45,10 +44,9 @@ import { UpdateStatusAdministrationComponent }          from './update-status-ad
             { path: 'administration/baskets/:id', component: BasketAdministrationComponent },
             { path: 'administration/doctypes', component: DoctypesAdministrationComponent },
             { path: 'administration/diffusionModels', component: DiffusionModelsAdministrationComponent },
+            { path: 'administration/diffusionModels/new', component: DiffusionModelAdministrationComponent },
             { path: 'administration/diffusionModels/:id', component: DiffusionModelAdministrationComponent },
             { path: 'administration/entities', component: EntitiesAdministrationComponent },
-            { path: 'administration/entities/new', component: EntityAdministrationComponent },
-            { path: 'administration/entities/:id', component: EntityAdministrationComponent },
             { path: 'administration/statuses', component: StatusesAdministrationComponent },
             { path: 'administration/statuses/new', component: StatusAdministrationComponent },
             { path: 'administration/statuses/:identifier', component: StatusAdministrationComponent },
diff --git a/apps/maarch_entreprise/js/angular/app/administration/administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/administration.component.js
old mode 100755
new mode 100644
diff --git a/apps/maarch_entreprise/js/angular/app/administration/administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/administration.component.ts
old mode 100755
new mode 100644
index 28a038877a4bf27acd134d9261fe3e07b1edd279..0781847f7cff84c24c564cd07e2d126026ca19a2
--- a/apps/maarch_entreprise/js/angular/app/administration/administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/administration.component.ts
@@ -10,7 +10,7 @@ declare const angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals.administrationView,
+    templateUrl: "../../../../Views/administration.component.html"
 })
 export class AdministrationComponent implements OnInit {
     mobileQuery: MediaQueryList;
diff --git a/apps/maarch_entreprise/js/angular/app/administration/administration.module.js b/apps/maarch_entreprise/js/angular/app/administration/administration.module.js
index 9c1614b686960760c832c3d5559cf115c4dd5dce..2907e25eda453706b02aa3be0e593ff5bcf50055 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/administration.module.js
+++ b/apps/maarch_entreprise/js/angular/app/administration/administration.module.js
@@ -10,6 +10,8 @@ var core_1 = require("@angular/core");
 var common_1 = require("@angular/common");
 var forms_1 = require("@angular/forms");
 var http_1 = require("@angular/common/http");
+var menu_component_1 = require("../menu/menu.component");
+var menu_nav_component_1 = require("../menu/menu-nav.component");
 var app_material_module_1 = require("../app-material.module");
 var administration_routing_module_1 = require("./administration-routing.module");
 var administration_component_1 = require("./administration.component");
@@ -53,6 +55,8 @@ var AdministrationModule = /** @class */ (function () {
                 administration_routing_module_1.AdministrationRoutingModule
             ],
             declarations: [
+                menu_component_1.MenuComponent,
+                menu_nav_component_1.MenuNavComponent,
                 administration_component_1.AdministrationComponent,
                 users_administration_component_1.UsersAdministrationComponent,
                 user_administration_component_1.UserAdministrationComponent,
diff --git a/apps/maarch_entreprise/js/angular/app/administration/administration.module.ts b/apps/maarch_entreprise/js/angular/app/administration/administration.module.ts
old mode 100755
new mode 100644
index 49f2e145cfe91c4033aced58d7ea35324061d998..8a534348da772411b0f9bdddd20856727324c079
--- a/apps/maarch_entreprise/js/angular/app/administration/administration.module.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/administration.module.ts
@@ -3,6 +3,8 @@ import { CommonModule }                         from '@angular/common';
 import { FormsModule, ReactiveFormsModule }     from '@angular/forms';
 import { HttpClientModule }                     from '@angular/common/http';
 
+import { MenuComponent }                        from '../menu/menu.component';
+import { MenuNavComponent }                     from '../menu/menu-nav.component';
 import { AppMaterialModule }                    from '../app-material.module';
 import { AdministrationRoutingModule }          from './administration-routing.module';
 
@@ -14,7 +16,6 @@ import { GroupAdministrationComponent }                 from './group-administra
 import { BasketsAdministrationComponent }               from './baskets-administration.component';
 import { BasketAdministrationComponent, BasketAdministrationSettingsModalComponent, BasketAdministrationGroupListModalComponent }                from './basket-administration.component';
 import { EntitiesAdministrationComponent, EntitiesAdministrationRedirectModalComponent} from './entities-administration.component';
-import { EntityAdministrationComponent }                from './entity-administration.component';
 import { DiffusionModelsAdministrationComponent }       from './diffusionModels-administration.component';
 import { DiffusionModelAdministrationComponent }        from './diffusionModel-administration.component';
 import { DoctypesAdministrationComponent, DoctypesAdministrationRedirectModalComponent }              from './doctypes-administration.component';
@@ -44,6 +45,8 @@ import { NotificationAdministrationComponent }          from './notification-adm
         AdministrationRoutingModule
     ],
     declarations: [
+        MenuComponent,
+        MenuNavComponent,
         AdministrationComponent,
         UsersAdministrationComponent,
         UserAdministrationComponent,
@@ -53,7 +56,6 @@ import { NotificationAdministrationComponent }          from './notification-adm
         BasketAdministrationComponent,
         DoctypesAdministrationComponent,
         EntitiesAdministrationComponent,
-        EntityAdministrationComponent,
         StatusesAdministrationComponent,
         StatusAdministrationComponent,
         ActionsAdministrationComponent,
diff --git a/apps/maarch_entreprise/js/angular/app/administration/basket-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/basket-administration.component.js
index 5b1442052e9f7d9b1331b0949abaf82d2f439b28..2b30ad0e45f886d180a7ec327fbfb4070cf8851e 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/basket-administration.component.js
+++ b/apps/maarch_entreprise/js/angular/app/administration/basket-administration.component.js
@@ -59,16 +59,6 @@ var BasketAdministrationComponent = /** @class */ (function () {
     BasketAdministrationComponent.prototype.ngOnDestroy = function () {
         this.mobileQuery.removeListener(this._mobileQueryListener);
     };
-    BasketAdministrationComponent.prototype.updateBreadcrumb = function (applicationName) {
-        var breadCrumb = "<a href='index.php?reinit=true'>" + applicationName + "</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>" + this.lang.administration + "</a> > <a onclick='location.hash = \"/administration/baskets\"' style='cursor: pointer'>" + this.lang.baskets + "</a> > ";
-        if (this.creationMode == true) {
-            breadCrumb += this.lang.basketCreation;
-        }
-        else {
-            breadCrumb += this.lang.basketModification;
-        }
-        $j('#ariane')[0].innerHTML = breadCrumb;
-    };
     BasketAdministrationComponent.prototype.ngOnInit = function () {
         var _this = this;
         this.coreUrl = angularGlobals.coreUrl;
@@ -76,13 +66,11 @@ var BasketAdministrationComponent = /** @class */ (function () {
         this.route.params.subscribe(function (params) {
             if (typeof params['id'] == "undefined") {
                 _this.creationMode = true;
-                _this.updateBreadcrumb(angularGlobals.applicationName);
                 _this.basketIdAvailable = false;
                 _this.loading = false;
             }
             else {
                 _this.creationMode = false;
-                _this.updateBreadcrumb(angularGlobals.applicationName);
                 _this.basketIdAvailable = true;
                 _this.id = params['id'];
                 _this.http.get(_this.coreUrl + "rest/baskets/" + _this.id)
@@ -163,16 +151,16 @@ var BasketAdministrationComponent = /** @class */ (function () {
         var _this = this;
         if (this.creationMode) {
             this.http.post(this.coreUrl + "rest/baskets", this.basket)
-                .subscribe(function (data) {
+                .subscribe(function () {
                 _this.notify.success(_this.lang.basketAdded);
-                _this.router.navigate(["/administration/baskets"]);
+                _this.router.navigate(["/administration/baskets/" + _this.basket.id]);
             }, function (err) {
                 _this.notify.error(err.error.errors);
             });
         }
         else {
             this.http.put(this.coreUrl + "rest/baskets/" + this.id, this.basket)
-                .subscribe(function (data) {
+                .subscribe(function () {
                 _this.notify.success(_this.lang.basketUpdated);
                 _this.router.navigate(["/administration/baskets"]);
             }, function (err) {
@@ -195,12 +183,21 @@ var BasketAdministrationComponent = /** @class */ (function () {
         });
         this.addAction(group);
     };
+    BasketAdministrationComponent.prototype.updateResultPage = function (group) {
+        var _this = this;
+        this.http.put(this.coreUrl + "rest/baskets/" + this.id + "/groups/" + group.group_id, { 'result_page': group.result_page, 'groupActions': group.groupActions })
+            .subscribe(function () {
+            _this.notify.success(_this.lang.basketUpdated);
+        }, function (err) {
+            _this.notify.error(err.error.errors);
+        });
+    };
     BasketAdministrationComponent.prototype.unlinkGroup = function (groupIndex) {
         var _this = this;
         var r = confirm(this.lang.unlinkGroup + ' ?');
         if (r) {
             this.http.delete(this.coreUrl + "rest/baskets/" + this.id + "/groups/" + this.basketGroups[groupIndex].group_id)
-                .subscribe(function (data) {
+                .subscribe(function () {
                 _this.allGroups.forEach(function (tmpGroup) {
                     if (tmpGroup.group_id == _this.basketGroups[groupIndex].group_id) {
                         tmpGroup.isUsed = false;
@@ -220,7 +217,7 @@ var BasketAdministrationComponent = /** @class */ (function () {
         this.dialogRef.afterClosed().subscribe(function (result) {
             if (result) {
                 _this.http.post(_this.coreUrl + "rest/baskets/" + _this.id + "/groups", result)
-                    .subscribe(function (data) {
+                    .subscribe(function () {
                     _this.basketGroups.push(result);
                     _this.allGroups.forEach(function (tmpGroup) {
                         if (tmpGroup.group_id == result.group_id) {
@@ -237,10 +234,8 @@ var BasketAdministrationComponent = /** @class */ (function () {
     };
     BasketAdministrationComponent.prototype.addAction = function (group) {
         var _this = this;
-        console.log(group);
         this.http.put(this.coreUrl + "rest/baskets/" + this.id + "/groups/" + group.group_id, { 'result_page': group.result_page, 'groupActions': group.groupActions })
-            .subscribe(function (data) {
-            //this.basketGroups.push(data);
+            .subscribe(function () {
             _this.notify.success(_this.lang.basketUpdated);
         }, function (err) {
             _this.notify.error(err.error.errors);
@@ -248,12 +243,11 @@ var BasketAdministrationComponent = /** @class */ (function () {
     };
     BasketAdministrationComponent.prototype.unlinkAction = function (group, action) {
         var _this = this;
-        var r = confirm(this.lang.unlinkAction + ' ?');
+        var r = confirm(this.lang.unlinkAction + " ?");
         if (r) {
             action.checked = false;
             this.http.put(this.coreUrl + "rest/baskets/" + this.id + "/groups/" + group.group_id, { 'result_page': group.result_page, 'groupActions': group.groupActions })
-                .subscribe(function (data) {
-                //this.basketGroups.push(data);
+                .subscribe(function () {
                 _this.notify.success(_this.lang.basketUpdated);
             }, function (err) {
                 _this.notify.error(err.error.errors);
@@ -362,7 +356,7 @@ var BasketAdministrationSettingsModalComponent = /** @class */ (function (_super
         this.allEntities.forEach(function (entity) {
             entity.state = { "opened": false, "selected": false };
             _this.data.action.redirects.forEach(function (keyword) {
-                if (entity.id == keyword.keyword && keyword.redirect_mode == 'ENTITY') {
+                if ((entity.id == keyword.keyword && keyword.redirect_mode == 'ENTITY') || (entity.id == keyword.entity_id && keyword.redirect_mode == 'ENTITY')) {
                     entity.state = { "opened": true, "selected": true };
                 }
             });
diff --git a/apps/maarch_entreprise/js/angular/app/administration/basket-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/basket-administration.component.ts
index bd212ed1fead2f2fa4183b369782d11147b06b29..3c72a2549fce056cddae3a98cf5faedddd00ea93 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/basket-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/basket-administration.component.ts
@@ -14,7 +14,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["basket-administrationView"],
+    templateUrl: "../../../../Views/basket-administration.component.html",
     providers: [NotificationService]
 })
 export class BasketAdministrationComponent implements OnInit {
@@ -58,16 +58,6 @@ export class BasketAdministrationComponent implements OnInit {
         this.mobileQuery.removeListener(this._mobileQueryListener);
     }
 
-    updateBreadcrumb(applicationName: string) {
-        var breadCrumb = "<a href='index.php?reinit=true'>" + applicationName + "</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>" + this.lang.administration + "</a> > <a onclick='location.hash = \"/administration/baskets\"' style='cursor: pointer'>" + this.lang.baskets + "</a> > ";
-        if (this.creationMode == true) {
-            breadCrumb += this.lang.basketCreation;
-        } else {
-            breadCrumb += this.lang.basketModification;
-        }
-        $j('#ariane')[0].innerHTML = breadCrumb;
-    }
-
     ngOnInit(): void {
         this.coreUrl = angularGlobals.coreUrl;
 
@@ -76,12 +66,10 @@ export class BasketAdministrationComponent implements OnInit {
         this.route.params.subscribe((params) => {
             if (typeof params['id'] == "undefined") {
                 this.creationMode = true;
-                this.updateBreadcrumb(angularGlobals.applicationName);
                 this.basketIdAvailable = false;
                 this.loading = false;
             } else {
                 this.creationMode = false;
-                this.updateBreadcrumb(angularGlobals.applicationName);
                 this.basketIdAvailable = true;
                 this.id = params['id'];
                 this.http.get(this.coreUrl + "rest/baskets/" + this.id)
@@ -165,15 +153,15 @@ export class BasketAdministrationComponent implements OnInit {
     onSubmit() {
         if (this.creationMode) {
             this.http.post(this.coreUrl + "rest/baskets", this.basket)
-                .subscribe((data: any) => {
+                .subscribe(() => {
                     this.notify.success(this.lang.basketAdded);
-                    this.router.navigate(["/administration/baskets"]);
+                    this.router.navigate(["/administration/baskets/" + this.basket.id]);
                 }, (err) => {
                     this.notify.error(err.error.errors);
                 });
         } else {
             this.http.put(this.coreUrl + "rest/baskets/" + this.id, this.basket)
-                .subscribe((data: any) => {
+                .subscribe(() => {
                     this.notify.success(this.lang.basketUpdated);
                     this.router.navigate(["/administration/baskets"]);
                 }, (err) => {
@@ -198,12 +186,21 @@ export class BasketAdministrationComponent implements OnInit {
         this.addAction(group);
     }
 
+    updateResultPage(group: any) {
+        this.http.put(this.coreUrl + "rest/baskets/" + this.id + "/groups/" + group.group_id, { 'result_page': group.result_page, 'groupActions': group.groupActions })
+            .subscribe(() => {
+                this.notify.success(this.lang.basketUpdated);
+            }, (err) => {
+                this.notify.error(err.error.errors);
+            });
+    }
+
     unlinkGroup(groupIndex: any) {
         let r = confirm(this.lang.unlinkGroup + ' ?');
 
         if (r) {
             this.http.delete(this.coreUrl + "rest/baskets/" + this.id + "/groups/" + this.basketGroups[groupIndex].group_id)
-                .subscribe((data: any) => {
+                .subscribe(() => {
                     this.allGroups.forEach((tmpGroup: any) => {
                         if (tmpGroup.group_id == this.basketGroups[groupIndex].group_id) {
                             tmpGroup.isUsed = false;
@@ -223,7 +220,7 @@ export class BasketAdministrationComponent implements OnInit {
         this.dialogRef.afterClosed().subscribe((result: any) => {
             if (result) {
                 this.http.post(this.coreUrl + "rest/baskets/" + this.id + "/groups", result)
-                    .subscribe((data: any) => {
+                    .subscribe(() => {
                         this.basketGroups.push(result);
                         this.allGroups.forEach((tmpGroup: any) => {
                             if (tmpGroup.group_id == result.group_id) {
@@ -240,10 +237,8 @@ export class BasketAdministrationComponent implements OnInit {
     }
 
     addAction(group: any) {
-        console.log(group);
         this.http.put(this.coreUrl + "rest/baskets/" + this.id + "/groups/" + group.group_id, { 'result_page': group.result_page, 'groupActions': group.groupActions })
-            .subscribe((data: any) => {
-                //this.basketGroups.push(data);
+            .subscribe(() => {
                 this.notify.success(this.lang.basketUpdated);
             }, (err) => {
                 this.notify.error(err.error.errors);
@@ -251,14 +246,12 @@ export class BasketAdministrationComponent implements OnInit {
     }
 
     unlinkAction(group: any, action: any) {
-
-        let r = confirm(this.lang.unlinkAction + ' ?');
+        let r = confirm(this.lang.unlinkAction + " ?");
 
         if (r) {
             action.checked = false;
             this.http.put(this.coreUrl + "rest/baskets/" + this.id + "/groups/" + group.group_id, { 'result_page': group.result_page, 'groupActions': group.groupActions })
-            .subscribe((data: any) => {
-                //this.basketGroups.push(data);
+            .subscribe(() => {
                 this.notify.success(this.lang.basketUpdated);
             }, (err) => {
                 this.notify.error(err.error.errors);
@@ -266,8 +259,9 @@ export class BasketAdministrationComponent implements OnInit {
         }
     }
 }
+
 @Component({
-    templateUrl: angularGlobals["basket-administration-settings-modalView"],
+    templateUrl: "../../../../Views/basket-administration-settings-modal.component.html",
     styles: [".mat-dialog-content{height: 65vh;}"]
 })
 export class BasketAdministrationSettingsModalComponent extends AutoCompletePlugin {
@@ -349,9 +343,9 @@ export class BasketAdministrationSettingsModalComponent extends AutoCompletePlug
         this.allEntities.forEach((entity: any) => {
             entity.state = { "opened": false, "selected": false };
             this.data.action.redirects.forEach((keyword: any) => {
-                if (entity.id == keyword.keyword && keyword.redirect_mode == 'ENTITY') {
+                if ((entity.id == keyword.keyword && keyword.redirect_mode == 'ENTITY') || (entity.id == keyword.entity_id && keyword.redirect_mode == 'ENTITY')) {
                     entity.state = { "opened": true, "selected": true };
-                }
+                } 
             });
         });
 
@@ -469,9 +463,8 @@ export class BasketAdministrationSettingsModalComponent extends AutoCompletePlug
     }
 }
 
-import { FormGroup, Validators } from '@angular/forms';
 @Component({
-    templateUrl: angularGlobals["basket-administration-groupList-modalView"],
+    templateUrl: "../../../../Views/basket-administration-groupList-modal.component.html",
     styles: [".mat-dialog-content{height: 65vh;}"]
 })
 export class BasketAdministrationGroupListModalComponent {
diff --git a/apps/maarch_entreprise/js/angular/app/administration/baskets-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/baskets-administration.component.ts
index 7e4fdd1921140f7b04789e9bf39cd1964343bac6..65add83753f5b1b33b580f9235eac91e3e2d4dd9 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/baskets-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/baskets-administration.component.ts
@@ -12,7 +12,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["baskets-administrationView"],
+    templateUrl: "../../../../Views/baskets-administration.component.html",
     providers: [NotificationService]
 })
 export class BasketsAdministrationComponent implements OnInit {
diff --git a/apps/maarch_entreprise/js/angular/app/administration/diffusionModel-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/diffusionModel-administration.component.js
index 55b1d3eed0c7c9024a3e5b673ea0295729ff7880..3531b9cc68bb3794149d9ffcfdbb12bd82d1a93a 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/diffusionModel-administration.component.js
+++ b/apps/maarch_entreprise/js/angular/app/administration/diffusionModel-administration.component.js
@@ -38,6 +38,7 @@ var DiffusionModelAdministrationComponent = /** @class */ (function (_super) {
         _this.lang = translate_component_1.LANG;
         _this.diffusionModel = {};
         _this.loading = false;
+        _this.itemTypeList = [];
         _this.displayedColumns = ['firstname', 'lastname'];
         $j("link[href='merged_css.php']").remove();
         _this.mobileQuery = media.matchMedia('(max-width: 768px)');
@@ -72,6 +73,7 @@ var DiffusionModelAdministrationComponent = /** @class */ (function (_super) {
                 _this.creationMode = true;
                 _this.loading = false;
                 _this.updateBreadcrumb(angularGlobals.applicationName);
+                _this.itemTypeList = [{ "id": "VISA_CIRCUIT", "label": _this.lang.visa }, { "id": "AVIS_CIRCUIT", "label": _this.lang.avis }];
             }
             else {
                 _this.creationMode = false;
@@ -79,10 +81,9 @@ var DiffusionModelAdministrationComponent = /** @class */ (function (_super) {
                     .subscribe(function (data) {
                     _this.updateBreadcrumb(angularGlobals.applicationName);
                     _this.diffusionModel = data['listTemplate'];
-                    _this.diffusionModel.roles = [{
-                            "id": "avis",
-                            "label": "avis"
-                        }];
+                    if (_this.diffusionModel.diffusionList[0]) {
+                        _this.idCircuit = _this.diffusionModel.diffusionList[0].id;
+                    }
                     _this.loading = false;
                     setTimeout(function () {
                         _this.dataSource = new material_1.MatTableDataSource(_this.diffusionModel);
@@ -95,6 +96,156 @@ var DiffusionModelAdministrationComponent = /** @class */ (function (_super) {
             }
         });
     };
+    DiffusionModelAdministrationComponent.prototype.addElemListModel = function (element) {
+        var _this = this;
+        var newDiffList = {
+            "object_id": this.diffusionModel.entity_id,
+            "object_type": this.diffusionModel.object_type,
+            "title": this.diffusionModel.title,
+            "description": this.diffusionModel.description,
+            "items": Array()
+        };
+        if (this.diffusionModel.object_type == 'VISA_CIRCUIT') {
+            var itemMode = 'sign';
+        }
+        else {
+            var itemMode = 'avis';
+        }
+        var newElemListModel = {
+            "id": '',
+            "item_type": 'user_id',
+            "item_mode": itemMode,
+            "item_id": element.id,
+            "sequence": this.diffusionModel.diffusionList.length,
+            "idToDisplay": element.idToDisplay,
+            "descriptionToDisplay": element.otherInfo
+        };
+        this.diffusionModel.diffusionList.forEach(function (listModel, i) {
+            listModel.sequence = i;
+            if (_this.diffusionModel.object_type == 'VISA_CIRCUIT') {
+                listModel.item_mode = "visa";
+            }
+            else {
+                listModel.item_mode = "avis";
+            }
+            newDiffList.items.push({
+                "id": listModel.id,
+                "item_id": listModel.item_id,
+                "item_type": "user_id",
+                "item_mode": listModel.item_mode,
+                "sequence": listModel.sequence
+            });
+        });
+        newDiffList.items.push(newElemListModel);
+        if (this.diffusionModel.diffusionList.length > 0) {
+            this.http.put(this.coreUrl + "rest/listTemplates/" + this.idCircuit, newDiffList)
+                .subscribe(function (data) {
+                _this.idCircuit = data.id;
+                _this.diffusionModel.diffusionList.push(newElemListModel);
+                _this.notify.success(_this.lang.diffusionModelUpdated);
+            }, function (err) {
+                _this.notify.error(err.error.errors);
+            });
+        }
+        else {
+            this.http.post(this.coreUrl + "rest/listTemplates", newDiffList)
+                .subscribe(function (data) {
+                _this.idCircuit = data.id;
+                _this.diffusionModel.diffusionList.push(newElemListModel);
+                _this.notify.success(_this.lang.diffusionModelUpdated);
+            }, function (err) {
+                _this.notify.error(err.error.errors);
+            });
+        }
+        this.userCtrl.setValue('');
+    };
+    DiffusionModelAdministrationComponent.prototype.updateDiffList = function () {
+        var _this = this;
+        var newDiffList = {
+            "object_id": this.diffusionModel.entity_id,
+            "object_type": this.diffusionModel.object_type,
+            "title": this.diffusionModel.title,
+            "description": this.diffusionModel.description,
+            "items": Array()
+        };
+        this.diffusionModel.diffusionList.forEach(function (listModel, i) {
+            listModel.sequence = i;
+            if (_this.diffusionModel.object_type == 'VISA_CIRCUIT') {
+                if (i == (_this.diffusionModel.diffusionList.length - 1)) {
+                    listModel.item_mode = "sign";
+                }
+                else {
+                    listModel.item_mode = "visa";
+                }
+            }
+            else {
+                listModel.item_mode = "avis";
+            }
+            newDiffList.items.push({
+                "id": listModel.id,
+                "item_id": listModel.item_id,
+                "item_type": "user_id",
+                "item_mode": listModel.item_mode,
+                "sequence": listModel.sequence
+            });
+        });
+        this.http.put(this.coreUrl + "rest/listTemplates/" + this.idCircuit, newDiffList)
+            .subscribe(function (data) {
+            _this.idCircuit = data.id;
+            _this.notify.success(_this.lang.diffusionModelUpdated);
+        }, function (err) {
+            _this.notify.error(err.error.errors);
+        });
+    };
+    DiffusionModelAdministrationComponent.prototype.removeDiffList = function (template, i) {
+        var _this = this;
+        this.diffusionModel.diffusionList.splice(i, 1);
+        if (this.diffusionModel.diffusionList.length > 0) {
+            var newDiffList = {
+                "object_id": this.diffusionModel.entity_id,
+                "object_type": this.diffusionModel.object_type,
+                "title": this.diffusionModel.title,
+                "description": this.diffusionModel.description,
+                "items": Array()
+            };
+            this.diffusionModel.diffusionList.forEach(function (listModel, i) {
+                listModel.sequence = i;
+                if (_this.diffusionModel.object_type == 'VISA_CIRCUIT') {
+                    if (i == (_this.diffusionModel.diffusionList.length - 1)) {
+                        listModel.item_mode = "sign";
+                    }
+                    else {
+                        listModel.item_mode = "visa";
+                    }
+                }
+                else {
+                    listModel.item_mode = "avis";
+                }
+                newDiffList.items.push({
+                    "item_id": listModel.item_id,
+                    "item_type": "user_id",
+                    "item_mode": listModel.item_mode,
+                    "sequence": listModel.sequence
+                });
+            });
+            this.http.put(this.coreUrl + "rest/listTemplates/" + this.idCircuit, newDiffList)
+                .subscribe(function (data) {
+                _this.idCircuit = data.id;
+                _this.notify.success(_this.lang.diffusionModelUpdated);
+            }, function (err) {
+                _this.notify.error(err.error.errors);
+            });
+        }
+        else {
+            this.http.delete(this.coreUrl + "rest/listTemplates/" + this.idCircuit)
+                .subscribe(function (data) {
+                _this.idCircuit = null;
+                _this.notify.success(_this.lang.diffusionModelUpdated);
+            }, function (err) {
+                _this.notify.error(err.error.errors);
+            });
+        }
+    };
     __decorate([
         core_1.ViewChild(material_1.MatPaginator),
         __metadata("design:type", material_1.MatPaginator)
diff --git a/apps/maarch_entreprise/js/angular/app/administration/diffusionModel-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/diffusionModel-administration.component.ts
index 4e0d82ab60a082fcf3f4221aae929ea2f1cae905..c99a800f5e181b20c1c4438d6ca329332865b1bb 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/diffusionModel-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/diffusionModel-administration.component.ts
@@ -4,32 +4,34 @@ import { HttpClient } from '@angular/common/http';
 import { ActivatedRoute, Router } from '@angular/router';
 import { LANG } from '../translate.component';
 import { NotificationService } from '../notification.service';
-import { MatPaginator, MatTableDataSource, MatSort} from '@angular/material';
+import { MatPaginator, MatTableDataSource, MatSort } from '@angular/material';
 
 import { AutoCompletePlugin } from '../../plugins/autocomplete.plugin';
 
-declare function $j(selector: any) : any;
+declare function $j(selector: any): any;
 
-declare const angularGlobals : any;
+declare const angularGlobals: any;
 
 
 @Component({
-    templateUrl : angularGlobals["diffusionModel-administrationView"],
-    providers   : [NotificationService]
+    templateUrl: "../../../../Views/diffusionModel-administration.component.html",
+    providers: [NotificationService]
 })
 export class DiffusionModelAdministrationComponent extends AutoCompletePlugin implements OnInit {
     mobileQuery: MediaQueryList;
     private _mobileQueryListener: () => void;
-    coreUrl                     : string;
-    lang                        : any       = LANG;
+    coreUrl: string;
+    lang: any = LANG;
 
-    creationMode                : boolean;
+    creationMode: boolean;
 
-    diffusionModel               : any       = {};
-    loading                     : boolean   = false;
+    diffusionModel: any = {};
+    loading: boolean = false;
+    idCircuit: number;
 
+    itemTypeList:any = [];
     displayedColumns = ['firstname', 'lastname'];
-    dataSource      : any;
+    dataSource: any;
     @ViewChild(MatPaginator) paginator: MatPaginator;
     @ViewChild(MatSort) sort: MatSort;
     applyFilter(filterValue: string) {
@@ -38,7 +40,7 @@ export class DiffusionModelAdministrationComponent extends AutoCompletePlugin im
         this.dataSource.filter = filterValue;
     }
 
-    constructor(changeDetectorRef: ChangeDetectorRef, media: MediaMatcher,public http: HttpClient, private route: ActivatedRoute, private router: Router, private notify: NotificationService) {
+    constructor(changeDetectorRef: ChangeDetectorRef, media: MediaMatcher, public http: HttpClient, private route: ActivatedRoute, private router: Router, private notify: NotificationService) {
         super(http, ['users']);
         $j("link[href='merged_css.php']").remove();
         this.mobileQuery = media.matchMedia('(max-width: 768px)');
@@ -48,7 +50,7 @@ export class DiffusionModelAdministrationComponent extends AutoCompletePlugin im
     ngOnDestroy(): void {
         this.mobileQuery.removeListener(this._mobileQueryListener);
     }
-    
+
     updateBreadcrumb(applicationName: string) {
         var breadCrumb = "<a href='index.php?reinit=true'>" + applicationName + "</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>" + this.lang.administration + "</a> > <a onclick='location.hash = \"/administration/groups\"' style='cursor: pointer'>" + this.lang.groups + "</a> > ";
         if (this.creationMode == true) {
@@ -69,16 +71,16 @@ export class DiffusionModelAdministrationComponent extends AutoCompletePlugin im
                 this.creationMode = true;
                 this.loading = false;
                 this.updateBreadcrumb(angularGlobals.applicationName);
+                this.itemTypeList =[{"id":"VISA_CIRCUIT", "label": this.lang.visa},{"id":"AVIS_CIRCUIT", "label": this.lang.avis}]
             } else {
                 this.creationMode = false;
                 this.http.get(this.coreUrl + "rest/listTemplates/" + params['id'])
-                    .subscribe((data : any) => {
+                    .subscribe((data: any) => {
                         this.updateBreadcrumb(angularGlobals.applicationName);
                         this.diffusionModel = data['listTemplate'];
-                        this.diffusionModel.roles = [{
-                            "id":"avis",
-                            "label":"avis"
-                        }]
+                        if (this.diffusionModel.diffusionList[0]) {
+                            this.idCircuit = this.diffusionModel.diffusionList[0].id;
+                        }
                         this.loading = false;
                         setTimeout(() => {
                             this.dataSource = new MatTableDataSource(this.diffusionModel);
@@ -92,4 +94,156 @@ export class DiffusionModelAdministrationComponent extends AutoCompletePlugin im
             }
         });
     }
+
+    addElemListModel(element: any) {
+        var newDiffList = {
+            "object_id": this.diffusionModel.entity_id,
+            "object_type": this.diffusionModel.object_type,
+            "title": this.diffusionModel.title,
+            "description": this.diffusionModel.description,
+            "items": Array()
+        }
+        
+        if (this.diffusionModel.object_type == 'VISA_CIRCUIT') {
+            var itemMode = 'sign';
+        } else {
+            var itemMode = 'avis';
+        }
+
+        var newElemListModel = {
+            "id": '',
+            "item_type": 'user_id',
+            "item_mode": itemMode,
+            "item_id": element.id,
+            "sequence": this.diffusionModel.diffusionList.length,
+            "idToDisplay": element.idToDisplay,
+            "descriptionToDisplay": element.otherInfo
+        };
+
+        this.diffusionModel.diffusionList.forEach((listModel: any, i: number) => {
+            listModel.sequence = i;
+            if (this.diffusionModel.object_type == 'VISA_CIRCUIT') {
+                listModel.item_mode = "visa";
+            } else {
+                listModel.item_mode = "avis";
+            }  
+            newDiffList.items.push({
+                "id": listModel.id,
+                "item_id": listModel.item_id,
+                "item_type": "user_id",
+                "item_mode": listModel.item_mode,
+                "sequence": listModel.sequence
+            });
+        });
+
+        newDiffList.items.push(newElemListModel);
+
+        if (this.diffusionModel.diffusionList.length > 0) {
+            this.http.put(this.coreUrl + "rest/listTemplates/" + this.idCircuit, newDiffList)
+                .subscribe((data: any) => {
+                    this.idCircuit = data.id;
+                    this.diffusionModel.diffusionList.push(newElemListModel);
+                    this.notify.success(this.lang.diffusionModelUpdated);
+                }, (err) => {
+                    this.notify.error(err.error.errors);
+                });
+        } else {
+            this.http.post(this.coreUrl + "rest/listTemplates", newDiffList)
+                .subscribe((data: any) => {
+                    this.idCircuit = data.id;
+                    this.diffusionModel.diffusionList.push(newElemListModel);
+                    this.notify.success(this.lang.diffusionModelUpdated);
+                }, (err) => {
+                    this.notify.error(err.error.errors);
+                });
+        }
+        this.userCtrl.setValue('');
+    }
+
+    updateDiffList(): any {
+        var newDiffList = {
+            "object_id": this.diffusionModel.entity_id,
+            "object_type": this.diffusionModel.object_type,
+            "title": this.diffusionModel.title,
+            "description": this.diffusionModel.description,
+            "items": Array()
+        }
+        this.diffusionModel.diffusionList.forEach((listModel: any, i: number) => {
+            listModel.sequence = i;
+
+            if (this.diffusionModel.object_type == 'VISA_CIRCUIT') {
+                if (i == (this.diffusionModel.diffusionList.length - 1)) {
+                    listModel.item_mode = "sign";
+                } else {
+                    listModel.item_mode = "visa";
+                }
+            } else {
+                listModel.item_mode = "avis";
+            } 
+
+            newDiffList.items.push({
+                "id": listModel.id,
+                "item_id": listModel.item_id,
+                "item_type": "user_id",
+                "item_mode": listModel.item_mode,
+                "sequence": listModel.sequence
+            });
+        });
+        this.http.put(this.coreUrl + "rest/listTemplates/" + this.idCircuit, newDiffList)
+            .subscribe((data: any) => {
+                this.idCircuit = data.id;
+                this.notify.success(this.lang.diffusionModelUpdated);
+            }, (err) => {
+                this.notify.error(err.error.errors);
+            });
+    }
+
+    removeDiffList(template: any, i: number): any {
+        this.diffusionModel.diffusionList.splice(i, 1);
+
+        if (this.diffusionModel.diffusionList.length > 0) {
+            var newDiffList = {
+                "object_id": this.diffusionModel.entity_id,
+                "object_type": this.diffusionModel.object_type,
+                "title": this.diffusionModel.title,
+                "description": this.diffusionModel.description,
+                "items": Array()
+            }
+
+            this.diffusionModel.diffusionList.forEach((listModel: any, i: number) => {
+                listModel.sequence = i;
+                if (this.diffusionModel.object_type == 'VISA_CIRCUIT') {
+                    if (i == (this.diffusionModel.diffusionList.length - 1)) {
+                        listModel.item_mode = "sign";
+                    } else {
+                        listModel.item_mode = "visa";
+                    }
+                } else {
+                    listModel.item_mode = "avis";
+                } 
+
+                newDiffList.items.push({
+                    "item_id": listModel.item_id,
+                    "item_type": "user_id",
+                    "item_mode": listModel.item_mode,
+                    "sequence": listModel.sequence
+                });
+            });
+            this.http.put(this.coreUrl + "rest/listTemplates/" + this.idCircuit, newDiffList)
+                .subscribe((data: any) => {
+                    this.idCircuit = data.id;
+                    this.notify.success(this.lang.diffusionModelUpdated);
+                }, (err) => {
+                    this.notify.error(err.error.errors);
+                });
+        } else {
+            this.http.delete(this.coreUrl + "rest/listTemplates/" + this.idCircuit)
+                .subscribe((data: any) => {
+                    this.idCircuit = null;
+                    this.notify.success(this.lang.diffusionModelUpdated);
+                }, (err) => {
+                    this.notify.error(err.error.errors);
+                });
+        }
+    }
 }
diff --git a/apps/maarch_entreprise/js/angular/app/administration/diffusionModels-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/diffusionModels-administration.component.js
index c60adbbc2ae196c45d79110c71c8c973db470abb..da1a9c4cf72c35ae40c8bb6087618a7c1562af6d 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/diffusionModels-administration.component.js
+++ b/apps/maarch_entreprise/js/angular/app/administration/diffusionModels-administration.component.js
@@ -52,7 +52,11 @@ var DiffusionModelsAdministrationComponent = /** @class */ (function () {
         this.loading = true;
         this.http.get(this.coreUrl + "rest/listTemplates")
             .subscribe(function (data) {
-            _this.listTemplates = data['listTemplates'];
+            data['listTemplates'].forEach(function (template) {
+                if (template.object_id.indexOf('VISA_CIRCUIT_') != -1 || template.object_id.indexOf('AVIS_CIRCUIT_') != -1) {
+                    _this.listTemplates.push(template);
+                }
+            });
             _this.loading = false;
             setTimeout(function () {
                 _this.dataSource = new material_1.MatTableDataSource(_this.listTemplates);
@@ -65,18 +69,27 @@ var DiffusionModelsAdministrationComponent = /** @class */ (function () {
     };
     DiffusionModelsAdministrationComponent.prototype.delete = function (listTemplate) {
         var _this = this;
-        this.http.delete(this.coreUrl + "rest/listTemplates/" + listTemplate['id'])
-            .subscribe(function (data) {
-            setTimeout(function () {
-                _this.listTemplates = data['listTemplates'];
-                _this.dataSource = new material_1.MatTableDataSource(_this.listTemplates);
-                _this.dataSource.paginator = _this.paginator;
-                _this.dataSource.sort = _this.sort;
-            }, 0);
-            _this.notify.success(_this.lang.groupDeleted);
-        }, function (err) {
-            _this.notify.error(err.error.errors);
-        });
+        var r = confirm(this.lang.confirmAction + ' ' + this.lang.delete + ' « ' + listTemplate.title + ' »');
+        if (r) {
+            this.http.delete(this.coreUrl + "rest/listTemplates/" + listTemplate['id'])
+                .subscribe(function (data) {
+                setTimeout(function () {
+                    var i = 0;
+                    _this.listTemplates.forEach(function (template) {
+                        if (template.id == listTemplate['id']) {
+                            _this.listTemplates.splice(i, 1);
+                        }
+                        i++;
+                    });
+                    _this.dataSource = new material_1.MatTableDataSource(_this.listTemplates);
+                    _this.dataSource.paginator = _this.paginator;
+                    _this.dataSource.sort = _this.sort;
+                }, 0);
+                _this.notify.success(_this.lang.diffusionModelDeleted);
+            }, function (err) {
+                _this.notify.error(err.error.errors);
+            });
+        }
     };
     __decorate([
         core_1.ViewChild(material_1.MatPaginator),
diff --git a/apps/maarch_entreprise/js/angular/app/administration/diffusionModels-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/diffusionModels-administration.component.ts
index 57e7ca0f2b1109d2894a2bd463a8c6532526a757..7f528279925de40589b7c91019325773f3241377 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/diffusionModels-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/diffusionModels-administration.component.ts
@@ -11,7 +11,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["diffusionModels-administrationView"],
+    templateUrl: "../../../../Views/diffusionModels-administration.component.html",
     providers: [NotificationService]
 })
 export class DiffusionModelsAdministrationComponent implements OnInit {
@@ -37,7 +37,7 @@ export class DiffusionModelsAdministrationComponent implements OnInit {
         this.dataSource.filter = filterValue;
     }
 
-    constructor(changeDetectorRef: ChangeDetectorRef, media: MediaMatcher,public http: HttpClient, private notify: NotificationService, public dialog: MatDialog) {
+    constructor(changeDetectorRef: ChangeDetectorRef, media: MediaMatcher, public http: HttpClient, private notify: NotificationService, public dialog: MatDialog) {
         $j("link[href='merged_css.php']").remove();
         this.mobileQuery = media.matchMedia('(max-width: 768px)');
         this._mobileQueryListener = () => changeDetectorRef.detectChanges();
@@ -62,7 +62,11 @@ export class DiffusionModelsAdministrationComponent implements OnInit {
 
         this.http.get(this.coreUrl + "rest/listTemplates")
             .subscribe((data: any) => {
-                this.listTemplates = data['listTemplates'];
+                data['listTemplates'].forEach((template: any) => {
+                    if (template.object_id.indexOf('VISA_CIRCUIT_') != -1 || template.object_id.indexOf('AVIS_CIRCUIT_') != -1) {
+                        this.listTemplates.push(template);
+                    }
+                });
                 this.loading = false;
                 setTimeout(() => {
                     this.dataSource = new MatTableDataSource(this.listTemplates);
@@ -75,18 +79,28 @@ export class DiffusionModelsAdministrationComponent implements OnInit {
     }
 
     delete(listTemplate: any) {
-        this.http.delete(this.coreUrl + "rest/listTemplates/" + listTemplate['id'])
-            .subscribe((data: any) => {
-                setTimeout(() => {
-                    this.listTemplates = data['listTemplates'];
-                    this.dataSource = new MatTableDataSource(this.listTemplates);
-                    this.dataSource.paginator = this.paginator;
-                    this.dataSource.sort = this.sort;
-                }, 0);
-                this.notify.success(this.lang.groupDeleted);
+        let r = confirm(this.lang.confirmAction + ' ' + this.lang.delete + ' « ' + listTemplate.title + ' »');
 
-            }, (err) => {
-                this.notify.error(err.error.errors);
-            });
+        if (r) {
+            this.http.delete(this.coreUrl + "rest/listTemplates/" + listTemplate['id'])
+                .subscribe((data: any) => {
+                    setTimeout(() => {
+                        var i = 0;
+                        this.listTemplates.forEach((template: any) => {
+                            if (template.id == listTemplate['id']) {
+                                this.listTemplates.splice(i, 1);
+                            }
+                            i++;
+                        });
+                        this.dataSource = new MatTableDataSource(this.listTemplates);
+                        this.dataSource.paginator = this.paginator;
+                        this.dataSource.sort = this.sort;
+                    }, 0);
+                    this.notify.success(this.lang.diffusionModelDeleted);
+
+                }, (err) => {
+                    this.notify.error(err.error.errors);
+                });
+        }
     }
 }
\ No newline at end of file
diff --git a/apps/maarch_entreprise/js/angular/app/administration/doctypes-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/doctypes-administration.component.ts
index 040ecea67b31c193ed62d56d1ae8b8fbe30d8339..1e8d7bc878b790b9b54ce8ad01baf837e85eb446 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/doctypes-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/doctypes-administration.component.ts
@@ -10,7 +10,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["doctypes-administrationView"],
+    templateUrl: "../../../../Views/doctypes-administration.component.html",
     providers: [NotificationService]
 })
 
@@ -49,18 +49,11 @@ export class DoctypesAdministrationComponent implements OnInit {
         this.mobileQuery.addListener(this._mobileQueryListener);
     }
 
-    updateBreadcrumb(applicationName: string) {
-        if ($j('#ariane')[0]) {
-            $j('#ariane')[0].innerHTML = "<a href='index.php?reinit=true'>" + applicationName + "</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>Administration</a> > Typologie documentaire";
-        }
-    }
-
     ngOnDestroy(): void {
         this.mobileQuery.removeListener(this._mobileQueryListener);
     }
 
     ngOnInit(): void {
-        this.updateBreadcrumb(angularGlobals.applicationName);
         this.coreUrl = angularGlobals.coreUrl;
 
         this.loading = true;
@@ -371,7 +364,7 @@ export class DoctypesAdministrationComponent implements OnInit {
 
 }
 @Component({
-    templateUrl: angularGlobals["doctypes-administration-redirect-modalView"],
+    templateUrl: "../../../../Views/doctypes-administration-redirect-modal.component.html"
 })
 export class DoctypesAdministrationRedirectModalComponent {
     lang: any = LANG;
diff --git a/apps/maarch_entreprise/js/angular/app/administration/entities-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/entities-administration.component.js
index 61382296de9884a59969283bd3a9e8f19bfbca6e..7d002eac227f032c589d8359612cc6fc74098c08 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/entities-administration.component.js
+++ b/apps/maarch_entreprise/js/angular/app/administration/entities-administration.component.js
@@ -359,7 +359,7 @@ var EntitiesAdministrationComponent = /** @class */ (function (_super) {
         this.isDraggable = true;
         $j('#jstree').jstree('deselect_all');
         for (var i = 0; i < this.entities.length; i++) {
-            if (this.entities[i].allowed == true) {
+            if (this.entities[i].entity_id == this.currentEntity.parent_entity_id) {
                 $j('#jstree').jstree('select_node', this.entities[i]);
                 break;
             }
@@ -416,12 +416,24 @@ var EntitiesAdministrationComponent = /** @class */ (function (_super) {
     EntitiesAdministrationComponent.prototype.prepareEntityAdd = function () {
         this.creationMode = true;
         this.isDraggable = false;
-        this.currentEntity = { "entity_type": this.entityTypeList[0].id };
-        $j('#jstree').jstree('deselect_all');
-        for (var i = 0; i < this.entities.length; i++) {
-            if (this.entities[i].allowed == true) {
-                $j('#jstree').jstree('select_node', this.entities[i]);
-                break;
+        console.log(this.currentEntity.entity_id);
+        if (this.currentEntity.entity_id) {
+            for (var i = 0; i < this.entities.length; i++) {
+                if (this.entities[i].entity_id == this.currentEntity.entity_id) {
+                    this.currentEntity = { "entity_type": this.entityTypeList[0].id };
+                    this.currentEntity.parent_entity_id = this.entities[i].entity_id;
+                    break;
+                }
+            }
+        }
+        else {
+            this.currentEntity = { "entity_type": this.entityTypeList[0].id };
+            $j('#jstree').jstree('deselect_all');
+            for (var i = 0; i < this.entities.length; i++) {
+                if (this.entities[i].allowed == true) {
+                    $j('#jstree').jstree('select_node', this.entities[i]);
+                    break;
+                }
             }
         }
     };
diff --git a/apps/maarch_entreprise/js/angular/app/administration/entities-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/entities-administration.component.ts
index 4403b7a37867a67ef516e67f3986570f935f26a5..474085562402ef2c578f667b8039b6981d26a406 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/entities-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/entities-administration.component.ts
@@ -14,7 +14,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["entities-administrationView"],
+    templateUrl: "../../../../Views/entities-administration.component.html",
     providers: [NotificationService]
 })
 export class EntitiesAdministrationComponent extends AutoCompletePlugin implements OnInit {
@@ -32,7 +32,7 @@ export class EntitiesAdministrationComponent extends AutoCompletePlugin implemen
 
     loading: boolean = false;
     creationMode: boolean = false;
-    idCircuitVisa:number;
+    idCircuitVisa: number;
 
     displayedColumns = ['firstname', 'lastname'];
     dataSource = new MatTableDataSource(this.currentEntity.users);
@@ -55,18 +55,11 @@ export class EntitiesAdministrationComponent extends AutoCompletePlugin implemen
         this.mobileQuery.addListener(this._mobileQueryListener);
     }
 
-    updateBreadcrumb(applicationName: string) {
-        if ($j('#ariane')[0]) {
-            $j('#ariane')[0].innerHTML = "<a href='index.php?reinit=true'>" + applicationName + "</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>Administration</a> > Entités";
-        }
-    }
-
     ngOnDestroy(): void {
         this.mobileQuery.removeListener(this._mobileQueryListener);
     }
 
     ngOnInit(): void {
-        this.updateBreadcrumb(angularGlobals.applicationName);
         this.coreUrl = angularGlobals.coreUrl;
 
         this.loading = true;
@@ -370,7 +363,7 @@ export class EntitiesAdministrationComponent extends AutoCompletePlugin implemen
         this.isDraggable = true;
         $j('#jstree').jstree('deselect_all');
         for (let i = 0; i < this.entities.length; i++) {
-            if (this.entities[i].allowed == true) {
+            if (this.entities[i].entity_id == this.currentEntity.parent_entity_id) {
                 $j('#jstree').jstree('select_node', this.entities[i]);
                 break;
             }
@@ -429,14 +422,26 @@ export class EntitiesAdministrationComponent extends AutoCompletePlugin implemen
     prepareEntityAdd() {
         this.creationMode = true;
         this.isDraggable = false;
-        this.currentEntity = { "entity_type": this.entityTypeList[0].id };
-        $j('#jstree').jstree('deselect_all');
-        for (let i = 0; i < this.entities.length; i++) {
-            if (this.entities[i].allowed == true) {
-                $j('#jstree').jstree('select_node', this.entities[i]);
-                break;
+        console.log(this.currentEntity.entity_id);
+        if (this.currentEntity.entity_id) {
+            for (let i = 0; i < this.entities.length; i++) {
+                if (this.entities[i].entity_id == this.currentEntity.entity_id) {
+                    this.currentEntity = { "entity_type": this.entityTypeList[0].id };
+                    this.currentEntity.parent_entity_id = this.entities[i].entity_id;
+                    break;
+                }
+            }
+        } else {
+            this.currentEntity = { "entity_type": this.entityTypeList[0].id };
+            $j('#jstree').jstree('deselect_all');
+            for (let i = 0; i < this.entities.length; i++) {
+                if (this.entities[i].allowed == true) {
+                    $j('#jstree').jstree('select_node', this.entities[i]);
+                    break;
+                }
             }
         }
+
     }
 
 
@@ -564,7 +569,7 @@ export class EntitiesAdministrationComponent extends AutoCompletePlugin implemen
     }
     removeDiffListVisa(template: any, i: number): any {
         this.currentEntity.visaTemplate.splice(i, 1);
-        
+
         if (this.currentEntity.visaTemplate.length > 0) {
             var newDiffList = {
                 "object_id": this.currentEntity.entity_id,
@@ -573,7 +578,7 @@ export class EntitiesAdministrationComponent extends AutoCompletePlugin implemen
                 "description": this.currentEntity.entity_id,
                 "items": Array()
             }
-    
+
             this.currentEntity.visaTemplate.forEach((listModel: any, i: number) => {
                 listModel.sequence = i;
                 if (i == (this.currentEntity.visaTemplate.length - 1)) {
@@ -588,7 +593,7 @@ export class EntitiesAdministrationComponent extends AutoCompletePlugin implemen
                     "sequence": listModel.sequence
                 });
             });
-    
+
             this.http.put(this.coreUrl + "rest/listTemplates/" + this.idCircuitVisa, newDiffList)
                 .subscribe((data: any) => {
                     this.idCircuitVisa = data.id;
@@ -596,7 +601,7 @@ export class EntitiesAdministrationComponent extends AutoCompletePlugin implemen
                 }, (err) => {
                     this.notify.error(err.error.errors);
                 });
-        }else{
+        } else {
             this.http.delete(this.coreUrl + "rest/listTemplates/" + this.idCircuitVisa)
                 .subscribe((data: any) => {
                     this.idCircuitVisa = null;
@@ -608,7 +613,7 @@ export class EntitiesAdministrationComponent extends AutoCompletePlugin implemen
     }
 }
 @Component({
-    templateUrl: angularGlobals["entities-administration-redirect-modalView"],
+    templateUrl: "../../../../Views/entities-administration-redirect-modal.component.html"
 })
 export class EntitiesAdministrationRedirectModalComponent extends AutoCompletePlugin {
     lang: any = LANG;
diff --git a/apps/maarch_entreprise/js/angular/app/administration/entity-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/entity-administration.component.js
deleted file mode 100644
index 565d521717b4c46dd80196f6c4307f96f8ad1fe1..0000000000000000000000000000000000000000
--- a/apps/maarch_entreprise/js/angular/app/administration/entity-administration.component.js
+++ /dev/null
@@ -1,104 +0,0 @@
-"use strict";
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
-    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
-    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
-    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
-    return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var __metadata = (this && this.__metadata) || function (k, v) {
-    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-var core_1 = require("@angular/core");
-var http_1 = require("@angular/common/http");
-var router_1 = require("@angular/router");
-var translate_component_1 = require("../translate.component");
-var notification_service_1 = require("../notification.service");
-var EntityAdministrationComponent = /** @class */ (function () {
-    function EntityAdministrationComponent(http, route, router, notify) {
-        this.http = http;
-        this.route = route;
-        this.router = router;
-        this.notify = notify;
-        this.lang = translate_component_1.LANG;
-        this.entity = {};
-        this.loading = false;
-    }
-    EntityAdministrationComponent.prototype.updateBreadcrumb = function (applicationName) {
-        if ($j('#ariane')[0]) {
-            $j('#ariane')[0].innerHTML = "<a href='index.php?reinit=true'>" + applicationName + "</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>Administration</a> > <a onclick='location.hash = \"/administration/entities\"' style='cursor: pointer'>Entités</a>";
-        }
-    };
-    EntityAdministrationComponent.prototype.ngOnInit = function () {
-        var _this = this;
-        this.updateBreadcrumb(angularGlobals.applicationName);
-        this.coreUrl = angularGlobals.coreUrl;
-        this.loading = true;
-        this.route.params.subscribe(function (params) {
-            if (typeof params['id'] == "undefined") {
-                _this.creationMode = true;
-                _this.entityIdAvailable = false;
-                _this.loading = false;
-            }
-            else {
-                _this.creationMode = false;
-                _this.entityIdAvailable = true;
-                _this.id = params['id'];
-                _this.http.get(_this.coreUrl + "rest/entities/" + _this.id + "/details")
-                    .subscribe(function (data) {
-                    _this.entity = data.basket;
-                    _this.loading = false;
-                }, function () {
-                    location.href = "index.php";
-                });
-            }
-        });
-    };
-    EntityAdministrationComponent.prototype.isAvailable = function () {
-        var _this = this;
-        if (this.entity.id) {
-            this.http.get(this.coreUrl + "rest/entities/" + this.entity.id)
-                .subscribe(function () {
-                _this.entityIdAvailable = false;
-            }, function (err) {
-                _this.entityIdAvailable = false;
-                if (err.error.errors == "Entity not found") {
-                    _this.entityIdAvailable = true;
-                }
-            });
-        }
-        else {
-            this.entityIdAvailable = false;
-        }
-    };
-    EntityAdministrationComponent.prototype.onSubmit = function () {
-        var _this = this;
-        if (this.creationMode) {
-            this.http.post(this.coreUrl + "rest/entities", this.entity)
-                .subscribe(function (data) {
-                _this.notify.success(_this.lang.entityAdded);
-                _this.router.navigate(["/administration/entities"]);
-            }, function (err) {
-                _this.notify.error(err.error.errors);
-            });
-        }
-        else {
-            this.http.put(this.coreUrl + "rest/entities/" + this.id, this.entity)
-                .subscribe(function (data) {
-                _this.notify.success(_this.lang.entityUpdated);
-                _this.router.navigate(["/administration/entities"]);
-            }, function (err) {
-                _this.notify.error(err.error.errors);
-            });
-        }
-    };
-    EntityAdministrationComponent = __decorate([
-        core_1.Component({
-            templateUrl: angularGlobals["entity-administrationView"],
-            providers: [notification_service_1.NotificationService]
-        }),
-        __metadata("design:paramtypes", [http_1.HttpClient, router_1.ActivatedRoute, router_1.Router, notification_service_1.NotificationService])
-    ], EntityAdministrationComponent);
-    return EntityAdministrationComponent;
-}());
-exports.EntityAdministrationComponent = EntityAdministrationComponent;
diff --git a/apps/maarch_entreprise/js/angular/app/administration/entity-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/entity-administration.component.ts
deleted file mode 100644
index f9d7b3d9e4e4d66d8bc6a0edb10f268e0fead148..0000000000000000000000000000000000000000
--- a/apps/maarch_entreprise/js/angular/app/administration/entity-administration.component.ts
+++ /dev/null
@@ -1,102 +0,0 @@
-import { Component, OnInit} from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import { Router, ActivatedRoute } from '@angular/router';
-import { LANG } from '../translate.component';
-import { NotificationService } from '../notification.service';
-
-declare function $j(selector: any) : any;
-
-declare var angularGlobals : any;
-
-
-@Component({
-    templateUrl : angularGlobals["entity-administrationView"],
-    providers   : [NotificationService]
-})
-export class EntityAdministrationComponent implements OnInit {
-
-    coreUrl             : string;
-    lang                : any       = LANG;
-
-    id                  : string;
-    creationMode        : boolean;
-
-    entity              : any       = {};
-    entityIdAvailable   : boolean;
-
-    loading             : boolean   = false;
-
-
-    constructor(public http: HttpClient, private route: ActivatedRoute, private router: Router, private notify: NotificationService) {
-    }
-
-    updateBreadcrumb(applicationName: string) {
-        if ($j('#ariane')[0]) {
-            $j('#ariane')[0].innerHTML = "<a href='index.php?reinit=true'>" + applicationName + "</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>Administration</a> > <a onclick='location.hash = \"/administration/entities\"' style='cursor: pointer'>Entités</a>";
-        }
-    }
-
-    ngOnInit(): void {
-        this.updateBreadcrumb(angularGlobals.applicationName);
-        this.coreUrl = angularGlobals.coreUrl;
-
-        this.loading = true;
-
-        this.route.params.subscribe((params) => {
-            if (typeof params['id'] == "undefined") {
-                this.creationMode = true;
-                this.entityIdAvailable = false;
-                this.loading = false;
-            } else {
-                this.creationMode = false;
-                this.entityIdAvailable = true;
-                this.id = params['id'];
-                this.http.get(this.coreUrl + "rest/entities/" + this.id + "/details")
-                    .subscribe((data : any) => {
-                        this.entity = data.basket;
-
-                        this.loading = false;
-                    }, () => {
-                        location.href = "index.php";
-                    });
-            }
-        });
-    }
-
-    isAvailable() {
-        if (this.entity.id) {
-            this.http.get(this.coreUrl + "rest/entities/" + this.entity.id)
-                .subscribe(() => {
-                    this.entityIdAvailable = false;
-                }, (err) => {
-                    this.entityIdAvailable = false;
-                    if (err.error.errors == "Entity not found") {
-                        this.entityIdAvailable = true;
-                    }
-                });
-        } else {
-            this.entityIdAvailable = false;
-        }
-    }
-
-    onSubmit() {
-        if (this.creationMode) {
-            this.http.post(this.coreUrl + "rest/entities", this.entity)
-                .subscribe((data : any) => {
-                    this.notify.success(this.lang.entityAdded);
-                    this.router.navigate(["/administration/entities"]);
-                }, (err) => {
-                    this.notify.error(err.error.errors);
-                });
-        } else {
-            this.http.put(this.coreUrl + "rest/entities/" + this.id, this.entity)
-                .subscribe((data : any) => {
-                    this.notify.success(this.lang.entityUpdated);
-                    this.router.navigate(["/administration/entities"]);
-                }, (err) => {
-                    this.notify.error(err.error.errors);
-                });
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/apps/maarch_entreprise/js/angular/app/administration/group-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/group-administration.component.ts
index 4a412b926d3e980c5044df5a049d4685cec35249..24857bf44d80ce5d62bc53695db64806778cb290 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/group-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/group-administration.component.ts
@@ -12,7 +12,7 @@ declare const angularGlobals : any;
 
 
 @Component({
-    templateUrl : angularGlobals["group-administrationView"],
+    templateUrl: "../../../../Views/group-administration.component.html",
     providers   : [NotificationService]
 })
 export class GroupAdministrationComponent implements OnInit {
diff --git a/apps/maarch_entreprise/js/angular/app/administration/groups-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/groups-administration.component.ts
index a5e6ee935552b223ac23b20f465c3f8db2fa633e..57775c06b6797cd5a41c00f88b535e3c25a9b0a2 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/groups-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/groups-administration.component.ts
@@ -11,7 +11,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["groups-administrationView"],
+    templateUrl: "../../../../Views/groups-administration.component.html",
     providers: [NotificationService]
 })
 export class GroupsAdministrationComponent implements OnInit {
@@ -127,7 +127,7 @@ export class GroupsAdministrationComponent implements OnInit {
     }
 }
 @Component({
-    templateUrl: angularGlobals["groups-administration-redirect-modalView"],
+    templateUrl: "../../../../Views/groups-administration-redirect-modal.component.html"
 })
 export class GroupsAdministrationRedirectModalComponent {
     lang: any = LANG;
diff --git a/apps/maarch_entreprise/js/angular/app/administration/history-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/history-administration.component.ts
index 8b652fd4b8345138a307d7330d64f07579172f7a..44d3a536e50f46a5f0d9320ba4083e7e3e939949 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/history-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/history-administration.component.ts
@@ -12,8 +12,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["history-administrationView"],
-    styleUrls: [],
+    templateUrl: "../../../../Views/history-administration.component.html",
     providers: [NotificationService]
 })
 
diff --git a/apps/maarch_entreprise/js/angular/app/administration/historyBatch-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/historyBatch-administration.component.ts
index da837cc0c86ab0966d667eba6730281befe54d80..fb6ef7c1e7584f0697b70f5818e4663b951c2ba5 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/historyBatch-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/historyBatch-administration.component.ts
@@ -12,8 +12,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["historyBatch-administrationView"],
-    styleUrls: [],
+    templateUrl: "../../../../Views/historyBatch-administration.component.html",
     providers: [NotificationService]
 })
 
diff --git a/apps/maarch_entreprise/js/angular/app/administration/notification-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/notification-administration.component.ts
index 62dbc603e5db95140b9f85afb97038a1439a9176..2334f9222c9a3d31adca6163f0fb0ee1965712d0 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/notification-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/notification-administration.component.ts
@@ -11,7 +11,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["notification-administrationView"],
+    templateUrl: "../../../../Views/notification-administration.component.html",
     providers: [NotificationService]
 })
 export class NotificationAdministrationComponent implements OnInit {
@@ -26,7 +26,6 @@ export class NotificationAdministrationComponent implements OnInit {
     loading: boolean = false;
     lang: any = LANG;
 
-
     constructor(changeDetectorRef: ChangeDetectorRef, media: MediaMatcher, public http: HttpClient, private route: ActivatedRoute, private router: Router, private notify: NotificationService) {
         $j("link[href='merged_css.php']").remove();
         this.mobileQuery = media.matchMedia('(max-width: 768px)');
@@ -34,17 +33,6 @@ export class NotificationAdministrationComponent implements OnInit {
         this.mobileQuery.addListener(this._mobileQueryListener);
     }
 
-    updateBreadcrumb(applicationName: string) {
-        var breadCrumb = "<a href='index.php?reinit=true'>" + applicationName + "</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>" + this.lang.administration + "</a> > <a onclick='location.hash = \"/administration/notifications\"' style='cursor: pointer'>" + this.lang.notifications + "</a> > ";
-
-        if (this.creationMode == true) {
-            breadCrumb += this.lang.notificationCreation;
-        } else {
-            breadCrumb += this.lang.notificationModification;
-        }
-        $j('#ariane')[0].innerHTML = breadCrumb;
-    }
-
     ngOnDestroy(): void {
         this.mobileQuery.removeListener(this._mobileQueryListener);
     }
@@ -59,7 +47,7 @@ export class NotificationAdministrationComponent implements OnInit {
                 this.http.get(this.coreUrl + 'rest/administration/notifications/new')
                     .subscribe((data: any) => {
                         this.notification = data.notification;
-
+                        this.notification.attachfor_properties = [];
                         this.loading = false;
                     }, (err) => {
                         this.notify.error(err.error.errors);
@@ -69,6 +57,7 @@ export class NotificationAdministrationComponent implements OnInit {
                 this.http.get(this.coreUrl + 'rest/notifications/' + params['identifier'])
                     .subscribe((data: any) => {
                         this.notification = data.notification;
+                        this.notification.attachfor_properties = [];
                         this.loading = false;
                     }, (err) => {
                         this.notify.error(err.error.errors);
@@ -76,59 +65,25 @@ export class NotificationAdministrationComponent implements OnInit {
             }
         });
 
-        this.updateBreadcrumb(angularGlobals.applicationName);
-
     }
 
     createScript() {
         this.http.post(this.coreUrl + 'rest/scriptNotification', this.notification)
             .subscribe((data: any) => {
                 this.notification.scriptcreated = data;
-                this.notify.success(this.lang.ScriptCreated);
+                this.notify.success(this.lang.scriptCreated);
             }, (err) => {
                 this.notify.error(err.error.errors);
             });
     }
 
-    selectAll(event: any) {
-        var target = event.target.getAttribute("data-target");
-        $j('#' + target + ' option').prop('selected', true);
-        $j('#' + target).trigger('chosen:updated');
-    }
-
-    unselectAll(event: any) {
-        var target = event.target.getAttribute("data-target");
-        $j('#' + target + ' option').prop('selected', false);
-        $j('#' + target).trigger('chosen:updated');
-    }
-
     onSubmit() {
-        if ($j("#groupslist").val()) {
-            this.notification.diffusion_properties = $j("#groupslist").val();
-        } else if ($j("#entitieslist").val()) {
-            this.notification.diffusion_properties = $j("#entitieslist").val();
-        } else if ($j("#statuseslist").val()) {
-            this.notification.diffusion_properties = $j("#statuseslist").val();
-        } else if ($j("#userslist").val()) {
-            this.notification.diffusion_properties = $j("#userslist").val();
-        }
-        if ($j("#joinDocJd").val() == null) {
-            this.notification.attachfor_properties = '';
-        } else if ($j("#groupslistJd").val()) {
-            this.notification.attachfor_properties = $j("#groupslistJd").val();
-        } else if ($j("#entitieslistJd").val()) {
-            this.notification.attachfor_properties = $j("#entitieslistJd").val();
-        } else if ($j("#statuseslistJd").val()) {
-            this.notification.attachfor_properties = $j("#statuseslistJd").val();
-        } else if ($j("#userslistJd").val()) {
-            this.notification.attachfor_properties = $j("#userslistJd").val();
-        }
-
         if (this.creationMode) {
+            this.notification.is_enabled = "Y";
             this.http.post(this.coreUrl + 'rest/notifications', this.notification)
                 .subscribe((data: any) => {
                     this.router.navigate(['/administration/notifications']);
-                    this.notify.success(this.lang.NotificationAdded);
+                    this.notify.success(this.lang.notificationAdded);
                 }, (err) => {
                     this.notify.error(err.error.errors);
                 });
@@ -142,4 +97,20 @@ export class NotificationAdministrationComponent implements OnInit {
                 });
         }
     }
+
+    toggleNotif() {
+        if (this.notification.is_enabled == "Y") {
+            this.notification.is_enabled = "N";
+        } else {
+            this.notification.is_enabled = "Y";
+        }
+        this.http.put(this.coreUrl + 'rest/notifications/' + this.notification.notification_sid, this.notification)
+            .subscribe((data: any) => {
+                this.notify.success(this.lang.notificationUpdated);
+            }, (err) => {
+                this.notify.error(err.error.errors);
+            });
+    }
+
+    isNumber(val:any) { return typeof val === 'number'; }
 }
diff --git a/apps/maarch_entreprise/js/angular/app/administration/notifications-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/notifications-administration.component.ts
index 3d764d2a752e53d6f18a4f2afa441ab896a8ec2a..b4996220ef0b0a41809d13449502de6ac52d48ed 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/notifications-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/notifications-administration.component.ts
@@ -3,7 +3,7 @@ import { MediaMatcher } from '@angular/cdk/layout';
 import { HttpClient } from '@angular/common/http';
 import { LANG } from '../translate.component';
 import { NotificationService } from '../notification.service';
-import { MatPaginator, MatTableDataSource, MatSort, MatDialog, MatDialogConfig, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MatSidenav, MatPaginator, MatTableDataSource, MatSort } from '@angular/material';
 
 
 declare function $j(selector: any): any;
@@ -12,7 +12,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["notifications-administrationView"],
+    templateUrl: "../../../../Views/notifications-administration.component.html",
     providers: [NotificationService]
 })
 export class NotificationsAdministrationComponent implements OnInit {
@@ -24,6 +24,29 @@ export class NotificationsAdministrationComponent implements OnInit {
     loading: boolean = false;
     lang: any = LANG;
 
+    hours : any;
+    minutes : any;
+
+    months : any = [];
+
+    dom : any = [];
+
+    dow : any = []
+
+    newCron: any = {
+        "m" : "",
+        "h" : "",
+        "dom" : "",
+        "mon" : "",
+        "cmd" : "",
+        "state": "normal"
+    }
+
+    authorizedNotification :any;
+    crontab:any;
+
+    @ViewChild('snav2') sidenav: MatSidenav;
+
     displayedColumns = ['notification_id', 'description', 'is_enabled', 'notifications'];
     dataSource = new MatTableDataSource(this.notifications);
     @ViewChild(MatPaginator) paginator: MatPaginator;
@@ -46,8 +69,6 @@ export class NotificationsAdministrationComponent implements OnInit {
     }
 
     ngOnInit(): void {
-        this.updateBreadcrumb(angularGlobals.applicationName);
-
         this.coreUrl = angularGlobals.coreUrl;
         this.loading = true;
 
@@ -65,12 +86,6 @@ export class NotificationsAdministrationComponent implements OnInit {
             });
     }
 
-    updateBreadcrumb(applicationName: string) {
-        if ($j('#ariane')[0]) {
-            $j('#ariane')[0].innerHTML = "<a href='index.php?reinit=true'>" + applicationName + "</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>" + this.lang.administration + "</a> > " + this.lang.notifications;
-        }
-    }
-
     deleteNotification(notification: any) {
         let r = confirm(this.lang.deleteMsg);
 
@@ -83,10 +98,108 @@ export class NotificationsAdministrationComponent implements OnInit {
                         this.dataSource.paginator = this.paginator;
                         this.dataSource.sort = this.sort;
                     }, 0);
+                    this.sidenav.close();
                     this.notify.success(this.lang.notificationDeleted);
                 }, (err) => {
                     this.notify.error(err.error.errors);
                 });
         }
     }
+
+    loadCron() {
+
+        this.hours = [{label:this.lang.eachHour,value:'*'}];
+        this.minutes = [{label:this.lang.eachMinute,value:'*'}];
+
+        this.months = [
+            {label:this.lang.eachMonth,value:'*'},
+            {label:this.lang.january,value:"0"},
+            {label:this.lang.february,value:"1"},
+            {label:this.lang.march,value:"2"},
+            {label:this.lang.april,value:"3"},
+            {label:this.lang.may,value:"4"},
+            {label:this.lang.june,value:"5"},
+            {label:this.lang.july,value:"6"},
+            {label:this.lang.august,value:"7"},
+            {label:this.lang.september,value:"8"},
+            {label:this.lang.october,value:"9"},
+            {label:this.lang.november,value:"10"},
+            {label:this.lang.december,value:"11"}
+        ]
+
+        this.dom = [{label:this.lang.notUsed,value:'*'}];
+
+        this.dow = [
+            {label:this.lang.eachDay,value:'*'},
+            {label:this.lang.monday,value:"0"},
+            {label:this.lang.thuesday,value:"1"},
+            {label:this.lang.wednesday,value:"2"},
+            {label:this.lang.thursday,value:"3"},
+            {label:this.lang.friday,value:"4"},
+            {label:this.lang.saturday,value:"5"},
+            {label:this.lang.sunday,value:"6"}
+        ];
+
+        this.newCron = {
+            "m" : "",
+            "h" : "",
+            "dom" : "",
+            "mon" : "",
+            "cmd" : "",
+            "state": "normal"
+        };
+
+        for (var i = 0; i <= 23; i++) {
+            this.hours.push({label:i,value:String(i)});
+        }
+
+        for (var i = 0; i <= 59; i++) {
+            this.minutes.push({label:i,value:String(i)});
+        }
+
+        for (var i = 0; i <= 31; i++) {
+            this.dom.push({label:i,value:String(i)});
+        }
+
+        this.http.get(this.coreUrl + 'rest/notifications/schedule')
+            .subscribe((data: any) => {
+                this.crontab = data.crontab;
+                this.authorizedNotification = data.authorizedNotification;
+            }, (err) => {
+                this.notify.error(err.error.errors);
+            });
+
+    }
+
+    saveCron() {
+        var description = this.newCron.cmd.split("/");
+        this.newCron.description = description[description.length-1];
+        this.crontab.push(this.newCron);
+        this.http.post(this.coreUrl + 'rest/notifications/schedule', this.crontab)
+            .subscribe((data: any) => {
+                this.newCron = {
+                    "m" : "",
+                    "h" : "",
+                    "dom" : "",
+                    "mon" : "",
+                    "cmd" : "",
+                    "description" : "",
+                    "state": "normal"
+                }
+                this.notify.success(this.lang.notificationScheduleUpdated);
+            }, (err) => {
+                this.crontab.pop();
+                this.notify.error(err.error.errors);
+            });
+    }
+
+    deleteCron(i:number) {
+        this.crontab[i].state = 'deleted';
+        this.http.post(this.coreUrl + 'rest/notifications/schedule', this.crontab)
+            .subscribe((data: any) => {
+                this.notify.success(this.lang.notificationScheduleUpdated);
+            }, (err) => {
+                this.notify.error(err.error.errors);
+            });
+    }
 }
diff --git a/apps/maarch_entreprise/js/angular/app/administration/notifications-schedule-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/notifications-schedule-administration.component.ts
index a3c08aad38e47f0159db1d2040752084af155909..b11c9ef68b5f2e28def03ccfa729eb0c3e1c1097 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/notifications-schedule-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/notifications-schedule-administration.component.ts
@@ -13,7 +13,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["notifications-schedule-administrationView"],
+    templateUrl: "../../../../Views/notifications-schedule-administration.component.html",
     providers: [NotificationService]
 })
 export class NotificationsScheduleAdministrationComponent implements OnInit {
diff --git a/apps/maarch_entreprise/js/angular/app/administration/parameter-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/parameter-administration.component.js
old mode 100755
new mode 100644
index 2003927d9748abc76c002721c9f0a03888462a67..8f046daaf55108b693a8c44ce18a04ef10d7b2c6
--- a/apps/maarch_entreprise/js/angular/app/administration/parameter-administration.component.js
+++ b/apps/maarch_entreprise/js/angular/app/administration/parameter-administration.component.js
@@ -58,7 +58,7 @@ var ParameterAdministrationComponent = /** @class */ (function () {
                     .subscribe(function (data) {
                     _this.parameter = data.parameter;
                     _this.updateBreadcrumb(angularGlobals.applicationName);
-                    if (_this.parameter.param_value_int) {
+                    if (typeof (_this.parameter.param_value_int) == "number") {
                         _this.type = "int";
                     }
                     else if (_this.parameter.param_value_date) {
diff --git a/apps/maarch_entreprise/js/angular/app/administration/parameter-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/parameter-administration.component.ts
old mode 100755
new mode 100644
index 98ea1b024ec9e308afd2c4166b046c114a033356..fdb26500527d6c063f0059d2e405a4d78d7d7ac4
--- a/apps/maarch_entreprise/js/angular/app/administration/parameter-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/parameter-administration.component.ts
@@ -11,7 +11,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals['parameter-administrationView'],
+    templateUrl: "../../../../Views/parameter-administration.component.html",
     providers: [NotificationService]
 })
 export class ParameterAdministrationComponent implements OnInit {
@@ -64,7 +64,7 @@ export class ParameterAdministrationComponent implements OnInit {
                         this.parameter = data.parameter;
                         this.updateBreadcrumb(angularGlobals.applicationName);
 
-                        if (this.parameter.param_value_int) {
+                        if (typeof (this.parameter.param_value_int) == "number") {
                             this.type = "int";
                         } else if (this.parameter.param_value_date) {
                             this.type = "date";
diff --git a/apps/maarch_entreprise/js/angular/app/administration/parameters-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/parameters-administration.component.js
old mode 100755
new mode 100644
diff --git a/apps/maarch_entreprise/js/angular/app/administration/parameters-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/parameters-administration.component.ts
old mode 100755
new mode 100644
index 7897a26e83d9f460ef653983f5c26c28455506ce..5f6fb04e8448737e6c1b1bb7d870c771e94d6a1c
--- a/apps/maarch_entreprise/js/angular/app/administration/parameters-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/parameters-administration.component.ts
@@ -11,7 +11,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["parameters-administrationView"],
+    templateUrl: "../../../../Views/parameters-administration.component.html",
     providers: [NotificationService]
 })
 export class ParametersAdministrationComponent implements OnInit {
diff --git a/apps/maarch_entreprise/js/angular/app/administration/priorities-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/priorities-administration.component.js
old mode 100755
new mode 100644
diff --git a/apps/maarch_entreprise/js/angular/app/administration/priorities-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/priorities-administration.component.ts
old mode 100755
new mode 100644
index f5595a30134a80289720949946557842624b388c..0ee7d78c609653e668c1942ed5d10c85a907a589
--- a/apps/maarch_entreprise/js/angular/app/administration/priorities-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/priorities-administration.component.ts
@@ -10,7 +10,7 @@ declare function $j(selector: any): any;
 declare var angularGlobals: any;
 
 @Component({
-    templateUrl: angularGlobals["priorities-administrationView"],
+    templateUrl: "../../../../Views/priorities-administration.component.html",
     providers: [NotificationService]
 })
 export class PrioritiesAdministrationComponent implements OnInit {
diff --git a/apps/maarch_entreprise/js/angular/app/administration/priority-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/priority-administration.component.js
old mode 100755
new mode 100644
diff --git a/apps/maarch_entreprise/js/angular/app/administration/priority-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/priority-administration.component.ts
old mode 100755
new mode 100644
index 1a0126a087b5271f1d9992d7351ef3be53da5c06..d280642934ddae1022ca956388f709ba0a3e40d7
--- a/apps/maarch_entreprise/js/angular/app/administration/priority-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/priority-administration.component.ts
@@ -11,7 +11,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["priority-administrationView"],
+    templateUrl: "../../../../Views/priority-administration.component.html",
     providers: [NotificationService]
 })
 export class PriorityAdministrationComponent implements OnInit {
diff --git a/apps/maarch_entreprise/js/angular/app/administration/reports-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/reports-administration.component.js
old mode 100755
new mode 100644
diff --git a/apps/maarch_entreprise/js/angular/app/administration/reports-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/reports-administration.component.ts
old mode 100755
new mode 100644
index ce318ab43560f64cbc90e5016ff8da33f6acb080..4243a2aff9f0d87ddf059bf1d59007e694750c05
--- a/apps/maarch_entreprise/js/angular/app/administration/reports-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/reports-administration.component.ts
@@ -10,7 +10,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["reports-administrationView"],
+    templateUrl: "../../../../Views/reports-administration.component.html",
     providers: [NotificationService]
 })
 export class ReportsAdministrationComponent implements OnInit {
diff --git a/apps/maarch_entreprise/js/angular/app/administration/status-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/status-administration.component.js
old mode 100755
new mode 100644
diff --git a/apps/maarch_entreprise/js/angular/app/administration/status-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/status-administration.component.ts
old mode 100755
new mode 100644
index ca16c5b585d791c3c48deae9600d749a780f09a0..0126e8e3a3f0a02bd9df8e5059882e85dced17b0
--- a/apps/maarch_entreprise/js/angular/app/administration/status-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/status-administration.component.ts
@@ -10,8 +10,8 @@ declare function $j(selector: any): any;
 declare var angularGlobals: any;
 
 @Component({
-    templateUrl: angularGlobals['status-administrationView'],
-    styleUrls: ['css/status-administration.component.css'],
+    templateUrl: "../../../../Views/status-administration.component.html",
+    // styleUrls: ['css/status-administration.component.css'],
     providers: [NotificationService]
 })
 export class StatusAdministrationComponent implements OnInit {
diff --git a/apps/maarch_entreprise/js/angular/app/administration/statuses-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/statuses-administration.component.js
old mode 100755
new mode 100644
diff --git a/apps/maarch_entreprise/js/angular/app/administration/statuses-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/statuses-administration.component.ts
old mode 100755
new mode 100644
index 2358397e0af13f81737bf297c747346a85b7f2c9..469e7ebd0821195aa4fb3e60a13b5b92b98f182b
--- a/apps/maarch_entreprise/js/angular/app/administration/statuses-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/statuses-administration.component.ts
@@ -1,7 +1,6 @@
 import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
 import { MediaMatcher } from '@angular/cdk/layout';
 import { HttpClient } from '@angular/common/http';
-import { Router, ActivatedRoute } from '@angular/router';
 import { LANG } from '../translate.component';
 import { NotificationService } from '../notification.service';
 import { MatPaginator, MatTableDataSource, MatSort } from '@angular/material';
@@ -11,8 +10,7 @@ declare function $j(selector: any): any;
 declare var angularGlobals: any;
 
 @Component({
-    templateUrl: angularGlobals['statuses-administrationView'],
-    styleUrls: [],
+    templateUrl: "../../../../Views/statuses-administration.component.html",
     providers: [NotificationService]
 })
 export class StatusesAdministrationComponent implements OnInit {
@@ -21,7 +19,6 @@ export class StatusesAdministrationComponent implements OnInit {
     coreUrl: string;
     lang: any = LANG;
 
-    nbStatus: number;
     statuses: Status[] = [];
 
     loading: boolean = false;
@@ -49,15 +46,11 @@ export class StatusesAdministrationComponent implements OnInit {
 
     ngOnInit(): void {
         this.coreUrl = angularGlobals.coreUrl;
-
-        this.prepareStatus();
-
         this.loading = true;
 
         this.http.get(this.coreUrl + 'rest/statuses')
             .subscribe((data: any) => {
                 this.statuses = data.statuses;
-                this.updateBreadcrumb(angularGlobals.applicationName);
                 this.loading = false;
                 setTimeout(() => {
                     this.dataSource = new MatTableDataSource(this.statuses);
@@ -70,15 +63,6 @@ export class StatusesAdministrationComponent implements OnInit {
             });
     }
 
-    prepareStatus() {
-        $j('#inner_content').remove();
-    }
-
-    updateBreadcrumb(applicationName: string) {
-        $j('#ariane')[0].innerHTML = "<a href='index.php?reinit=true'>" + applicationName + "</a> > " +
-            "<a onclick='location.hash = \"/administration\"' style='cursor: pointer'>" + this.lang.administration + "</a> > " + this.lang.statuses;
-    }
-
     deleteStatus(status: any) {
         var resp = confirm(this.lang.confirmAction + ' ' + this.lang.delete + ' « ' + status.id + ' »');
         if (resp) {
diff --git a/apps/maarch_entreprise/js/angular/app/administration/update-status-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/update-status-administration.component.ts
index f84a8b51d3dda29fb54327e8fd26e7df4bcd8d60..06a7bd0bd3aee2891f66708af8550bb6156a5036 100644
--- a/apps/maarch_entreprise/js/angular/app/administration/update-status-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/update-status-administration.component.ts
@@ -4,11 +4,6 @@ import { HttpClient } from '@angular/common/http';
 import { LANG } from '../translate.component';
 import { NotificationService } from '../notification.service';
 
-import { FormControl } from '@angular/forms';
-import { Observable } from 'rxjs/Observable';
-import { startWith } from 'rxjs/operators/startWith';
-import { map } from 'rxjs/operators/map';
-
 import { AutoCompletePlugin } from '../../plugins/autocomplete.plugin';
 
 declare function $j(selector: any): any;
@@ -17,7 +12,7 @@ declare var angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["update-status-administrationView"],
+    templateUrl: "../../../../Views/update-status-administration.component.html",
     providers: [NotificationService]
 })
 export class UpdateStatusAdministrationComponent extends AutoCompletePlugin implements OnInit {
diff --git a/apps/maarch_entreprise/js/angular/app/administration/user-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/user-administration.component.js
old mode 100755
new mode 100644
diff --git a/apps/maarch_entreprise/js/angular/app/administration/user-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/user-administration.component.ts
old mode 100755
new mode 100644
index a7a64fac76a3795e16806f22633ddd208c11ac4f..e1e2d657d59b4452dba89d5048c3207b373215be
--- a/apps/maarch_entreprise/js/angular/app/administration/user-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/user-administration.component.ts
@@ -13,8 +13,8 @@ declare const angularGlobals: any;
 
 
 @Component({
-    templateUrl: angularGlobals["user-administrationView"],
-    styleUrls: ['css/user-administration.component.css'],
+    templateUrl: "../../../../Views/user-administration.component.html",
+    styleUrls: ['../../../../css/user-administration.component.css'],
     providers: [NotificationService]
 })
 export class UserAdministrationComponent extends AutoCompletePlugin implements OnInit {
@@ -221,7 +221,7 @@ export class UserAdministrationComponent extends AutoCompletePlugin implements O
             this.http.post(this.coreUrl + "rest/users/" + this.serialId + "/groups", groupReq)
                 .subscribe((data: any) => {
                     this.user.groups = data.groups;
-                    this.user.allGroups = data.allGroups;
+                    //this.user.allGroups = data.allGroups;
                     this.user.baskets = data.baskets;
                     this.notify.success(this.lang.groupAdded);
                 }, (err) => {
@@ -231,7 +231,8 @@ export class UserAdministrationComponent extends AutoCompletePlugin implements O
             this.http.delete(this.coreUrl + "rest/users/" + this.serialId + "/groups/" + group.group_id)
                 .subscribe((data: any) => {
                     this.user.groups = data.groups;
-                    this.user.allGroups = data.allGroups;
+                    //this.user.allGroups = data.allGroups;
+                    this.user.baskets = data.baskets;
                     this.notify.success(this.lang.groupDeleted);
                 }, (err) => {
                     this.notify.error(err.error.errors);
@@ -360,26 +361,35 @@ export class UserAdministrationComponent extends AutoCompletePlugin implements O
         }
     }
 
-    addBasketRedirection(i: number, basket: any) {
-        let r = false;
-        if (this.user.status != 'ABS') {
-            let r = confirm(this.lang.confirmAction + ' ' + this.lang.activateAbs);
-        }
+    addBasketRedirection(newUser:any, basket: any) {
 
-        if (r || this.user.status == 'ABS') {
-            this.userAbsenceModel.push({
-                "basketId": this.user.baskets[i].basket_id,
-                "basketName": this.user.baskets[i].basket_name,
-                "virtual": this.user.baskets[i].is_virtual,
-                "basketOwner": this.user.baskets[i].basket_owner,
-                "newUser": this.user.baskets[i].userToDisplay
-            });
-            this.activateAbsence();
+        let r = confirm(this.lang.confirmAction + ' ' + this.lang.redirectBasket);
+
+        if (r) {
+            this.http.post(this.coreUrl + "rest/users/" + this.serialId + "/redirectedBaskets", [{"newUser" : newUser, "basketId":basket.basket_id, "basketOwner":this.user.user_id, "virtual": basket.is_virtual}])
+                .subscribe((data: any) => {
+                    this.userCtrl.setValue('');
+                    this.user.baskets = data["baskets"];
+                    this.notify.success(this.lang.basketUpdated);
+                }, (err) => {
+                    this.notify.error(err.error.errors);
+                });
         }
     }
 
-    delBasketRedirection(i: number) {
-        this.user.baskets[i].userToDisplay = '';
+    delBasketRedirection(basket: any) {
+        let r = confirm(this.lang.confirmAction + ' ' + this.lang.activateAbs);
+
+        if (r) {
+            this.http.delete(this.coreUrl + "rest/users/" + this.serialId + "/redirectedBaskets/"+basket.basket_id)
+                .subscribe((data: any) => {
+                    this.userCtrl.setValue('');
+                    this.user.baskets = data["baskets"];
+                    this.notify.success(this.lang.basketUpdated);
+                }, (err) => {
+                    this.notify.error(err.error.errors);
+                });
+        }
     }
 
     toggleBasket(basket: any) {
diff --git a/apps/maarch_entreprise/js/angular/app/administration/users-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/users-administration.component.js
old mode 100755
new mode 100644
diff --git a/apps/maarch_entreprise/js/angular/app/administration/users-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/users-administration.component.ts
old mode 100755
new mode 100644
index 2e302597e838176b4bcff6c1e225ae92860b1f3e..d3c58910f48bc2073524718cacf586031c31be4f
--- a/apps/maarch_entreprise/js/angular/app/administration/users-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/users-administration.component.ts
@@ -12,8 +12,8 @@ declare function $j(selector: any): any;
 declare var angularGlobals: any;
 
 @Component({
-    templateUrl: angularGlobals["users-administrationView"],
-    styleUrls: ['css/users-administration.component.css'],
+    templateUrl: "../../../../Views/users-administration.component.html",
+    styleUrls: ['../../../../css/users-administration.component.css'],
     providers: [NotificationService]
 })
 export class UsersAdministrationComponent extends AutoCompletePlugin implements OnInit {
@@ -244,7 +244,7 @@ export class UsersAdministrationComponent extends AutoCompletePlugin implements
     }
 }
 @Component({
-    templateUrl: angularGlobals["users-administration-redirect-modalView"],
+    templateUrl: "../../../../Views/users-administration-redirect-modal.component.html"
 })
 export class UsersAdministrationRedirectModalComponent extends AutoCompletePlugin {
     lang: any = LANG;
diff --git a/apps/maarch_entreprise/js/angular/app/app-routing.module.ts b/apps/maarch_entreprise/js/angular/app/app-routing.module.ts
index 8bd3e1821235ce64eabd9ed8f4347fc3073caab5..52fa0a3905cb65704c3c5b31b3b4feb11de5d4e9 100755
--- a/apps/maarch_entreprise/js/angular/app/app-routing.module.ts
+++ b/apps/maarch_entreprise/js/angular/app/app-routing.module.ts
@@ -1,14 +1,16 @@
 import { NgModule }              from '@angular/core';
-import { RouterModule, Routes }  from '@angular/router';
+import { RouterModule }  from '@angular/router';
 
 import { ProfileComponent }                     from './profile.component';
-import { SignatureBookComponent, SafeUrlPipe }  from './signature-book.component';
+import { SignatureBookComponent }  from './signature-book.component';
+import { SaveNumericPackageComponent }  from './save-numeric-package.component';
 
 
 @NgModule({
     imports: [
         RouterModule.forRoot([
             { path: 'profile', component: ProfileComponent },
+            { path: 'saveNumericPackage', component: SaveNumericPackageComponent },
             { path: 'groups/:groupId/baskets/:basketId/signatureBook/:resId', component: SignatureBookComponent },
             { path: '**',   redirectTo: '', pathMatch: 'full' },
         ], { useHash: true }),
diff --git a/apps/maarch_entreprise/js/angular/app/app.component.js b/apps/maarch_entreprise/js/angular/app/app.component.js
index 56c08f3b6cf3550fb2d9eb6a7c00d8161a33a077..5c0b77259144356f93c1310081a6e3c30fb583c3 100755
--- a/apps/maarch_entreprise/js/angular/app/app.component.js
+++ b/apps/maarch_entreprise/js/angular/app/app.component.js
@@ -30,11 +30,10 @@ var AppComponent = /** @class */ (function () {
             template: "<router-outlet></router-outlet>",
             encapsulation: core_1.ViewEncapsulation.None,
             styleUrls: [
-                '../../node_modules/bootstrap/dist/css/bootstrap.min.css',
-                'css/maarch-material.css',
-                'css/engine.css',
-                'css/jstree-custom.min.css',
-                '../../node_modules/ng2-dnd/bundles/style.css'
+                '../../../../../node_modules/bootstrap/dist/css/bootstrap.min.css',
+                '../../../css/maarch-material.css',
+                '../../../css/engine.css',
+                '../../../../../node_modules/ng2-dnd/bundles/style.css'
             ],
             viewProviders: [material_1.MatIconRegistry],
             providers: [
diff --git a/apps/maarch_entreprise/js/angular/app/app.component.ts b/apps/maarch_entreprise/js/angular/app/app.component.ts
index 280be1ec2d3d2d11a9be02d77764fabedf4c0d22..5fa8b78f741be79a1804119eff7e66287ad9045b 100755
--- a/apps/maarch_entreprise/js/angular/app/app.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/app.component.ts
@@ -12,15 +12,14 @@ export const myCustomTooltipDefaults: MatTooltipDefaultOptions = {
 
 @Component({
     selector: 'my-app',
-    //template: `<menu-app></menu-app><router-outlet></router-outlet>`,
     template: `<router-outlet></router-outlet>`,
     encapsulation: ViewEncapsulation.None,
     styleUrls: [
-        '../../node_modules/bootstrap/dist/css/bootstrap.min.css',
-        'css/maarch-material.css',
-        'css/engine.css',
-        'css/jstree-custom.min.css', //treejs module
-        '../../node_modules/ng2-dnd/bundles/style.css'
+        '../../../../../node_modules/bootstrap/dist/css/bootstrap.min.css',
+        '../../../css/maarch-material.css',
+        '../../../css/engine.css',
+        '../../../css/jstree-custom.min.css', //treejs module
+        '../../../../../node_modules/ng2-dnd/bundles/style.css'
 
     ],
     viewProviders: [MatIconRegistry],
diff --git a/apps/maarch_entreprise/js/angular/app/app.module.js b/apps/maarch_entreprise/js/angular/app/app.module.js
index ca5de8c4923870b5ceb7720c4028f94d1c70b527..78283c3ed651ad987ee3bcff2d5e63cf6eca25b7 100755
--- a/apps/maarch_entreprise/js/angular/app/app.module.js
+++ b/apps/maarch_entreprise/js/angular/app/app.module.js
@@ -12,11 +12,13 @@ var animations_1 = require("@angular/platform-browser/animations");
 var forms_1 = require("@angular/forms");
 var http_1 = require("@angular/common/http");
 var app_material_module_1 = require("./app-material.module");
-//import { HeaderComponent }                      from './header.component';
+var header_component_1 = require("./header.component");
 var notification_service_1 = require("./notification.service");
 var app_component_1 = require("./app.component");
 var app_routing_module_1 = require("./app-routing.module");
-var administration_module_1 = require("./administration/administration.module");
+// import { AdministrationModule }                 from './administration/administration.module';
+var menu_component_1 = require("./menu/menu.component");
+var menu_nav_component_1 = require("./menu/menu-nav.component");
 var profile_component_1 = require("./profile.component");
 var signature_book_component_1 = require("./signature-book.component");
 var AppModule = /** @class */ (function () {
@@ -29,14 +31,16 @@ var AppModule = /** @class */ (function () {
                 animations_1.BrowserAnimationsModule,
                 forms_1.FormsModule,
                 http_1.HttpClientModule,
-                administration_module_1.AdministrationModule,
+                // AdministrationModule,
                 app_routing_module_1.AppRoutingModule,
                 app_material_module_1.AppMaterialModule
             ],
             declarations: [
-                //HeaderComponent,
+                header_component_1.HeaderComponent,
                 app_component_1.AppComponent,
                 profile_component_1.ProfileComponent,
+                menu_component_1.MenuComponent,
+                menu_nav_component_1.MenuNavComponent,
                 signature_book_component_1.SignatureBookComponent,
                 signature_book_component_1.SafeUrlPipe,
                 notification_service_1.CustomSnackbarComponent
diff --git a/apps/maarch_entreprise/js/angular/app/app.module.ts b/apps/maarch_entreprise/js/angular/app/app.module.ts
index 9f72f2fcdc252587eddad12c153ca234e59a048f..83de424bcf0dd2bbacd5cba7ec210b33a9f7a521 100755
--- a/apps/maarch_entreprise/js/angular/app/app.module.ts
+++ b/apps/maarch_entreprise/js/angular/app/app.module.ts
@@ -5,7 +5,6 @@ import { FormsModule }                          from '@angular/forms';
 import { HttpClientModule }                     from '@angular/common/http';
 import { AppMaterialModule }                    from './app-material.module';
 
-//import { HeaderComponent }                      from './header.component';
 import { CustomSnackbarComponent }              from './notification.service';
 
 import { AppComponent }                         from './app.component';
@@ -14,6 +13,7 @@ import { AdministrationModule }                 from './administration/administr
 
 import { ProfileComponent }                     from './profile.component';
 import { SignatureBookComponent, SafeUrlPipe }  from './signature-book.component';
+import { SaveNumericPackageComponent }  from './save-numeric-package.component';
 
 @NgModule({
     imports: [
@@ -26,9 +26,9 @@ import { SignatureBookComponent, SafeUrlPipe }  from './signature-book.component
         AppMaterialModule
     ],
     declarations: [
-        //HeaderComponent,
         AppComponent,
         ProfileComponent,
+        SaveNumericPackageComponent,
         SignatureBookComponent,
         SafeUrlPipe,
         CustomSnackbarComponent
diff --git a/apps/maarch_entreprise/js/angular/app/header.component.js b/apps/maarch_entreprise/js/angular/app/header.component.js
deleted file mode 100755
index 2aaf9f65389511ba91890926b12af5ff4f0b3542..0000000000000000000000000000000000000000
--- a/apps/maarch_entreprise/js/angular/app/header.component.js
+++ /dev/null
@@ -1,62 +0,0 @@
-"use strict";
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
-    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
-    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
-    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
-    return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var __metadata = (this && this.__metadata) || function (k, v) {
-    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-var core_1 = require("@angular/core");
-var http_1 = require("@angular/common/http");
-var HeaderComponent = /** @class */ (function () {
-    function HeaderComponent(http) {
-        this.http = http;
-        this.applicationName = "";
-        this.adminList = [];
-        this.adminListModule = [];
-        this.menuList = [];
-        this.profilList = [];
-        this.notifList = [];
-    }
-    HeaderComponent.prototype.prepareHeader = function () {
-        $j('#maarch_content').remove();
-    };
-    HeaderComponent.prototype.ngOnInit = function () {
-        var _this = this;
-        this.prepareHeader();
-        this.coreUrl = angularGlobals.coreUrl;
-        this.http.get(this.coreUrl + 'rest/administration')
-            .subscribe(function (data) {
-            _this.menuList = data.menu.menuList;
-            _this.applicationName = data.menu.applicationName[0];
-            _this.adminList = data.application;
-            _this.adminListModule = data.modules;
-        });
-        this.profilList = [
-            {
-                label: 'Mon profil',
-                link: '/profile',
-                style: 'fa-user'
-            },
-            { label: 'Déconnexion',
-                link: '/logout',
-                style: 'fa-sign-out'
-            }
-        ];
-    };
-    HeaderComponent = __decorate([
-        core_1.Component({
-            selector: 'menu-app',
-            templateUrl: angularGlobals["headerView"],
-            styleUrls: [
-                'css/header.component.css',
-            ]
-        }),
-        __metadata("design:paramtypes", [http_1.HttpClient])
-    ], HeaderComponent);
-    return HeaderComponent;
-}());
-exports.HeaderComponent = HeaderComponent;
diff --git a/apps/maarch_entreprise/js/angular/app/header.component.ts b/apps/maarch_entreprise/js/angular/app/header.component.ts
deleted file mode 100755
index e3015adc8876461f6373608d437f51597f701538..0000000000000000000000000000000000000000
--- a/apps/maarch_entreprise/js/angular/app/header.component.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-
-declare function $j(selector: any) : any;
-
-declare var angularGlobals : any;
-
-
-@Component({
-    selector: 'menu-app',
-    templateUrl :   angularGlobals["headerView"],
-    styleUrls   :   [
-        'css/header.component.css', //load specific custom css
-    ]
-})
-export class HeaderComponent implements OnInit {
-
-    coreUrl                     : string;
-
-    applicationName             : string    = "";
-    adminList                   : any[]     = [];
-    adminListModule             : any[]     = [];
-    menuList                    : any[]     = [];
-    profilList                  : any[]     = [];
-    notifList                   : any[]     = [];
-
-
-    constructor(public http: HttpClient) {
-    }
-
-    prepareHeader() {
-        $j('#maarch_content').remove();
-    }
-
-    ngOnInit(): void {
-        this.prepareHeader();
-        
-        this.coreUrl = angularGlobals.coreUrl;
-
-        this.http.get(this.coreUrl + 'rest/administration')
-        .subscribe((data : any) => {
-            this.menuList = data.menu.menuList;
-            this.applicationName = data.menu.applicationName[0];
-            this.adminList = data.application;
-            this.adminListModule = data.modules;
-        });
-
-        this.profilList = [
-            {   
-                label   : 'Mon profil',
-                link    : '/profile',
-                style    : 'fa-user'
-            },
-            {   label   : 'Déconnexion',
-                link    : '/logout',
-                style    : 'fa-sign-out'
-            }
-        ]
-    }
-}
diff --git a/apps/maarch_entreprise/js/angular/app/menu/menu-nav.component.js b/apps/maarch_entreprise/js/angular/app/menu/menu-nav.component.js
new file mode 100644
index 0000000000000000000000000000000000000000..c2483c2fca73b54155ab555b40017821c21828b4
--- /dev/null
+++ b/apps/maarch_entreprise/js/angular/app/menu/menu-nav.component.js
@@ -0,0 +1,37 @@
+"use strict";
+var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
+    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+    return c > 3 && r && Object.defineProperty(target, key, r), r;
+};
+var __metadata = (this && this.__metadata) || function (k, v) {
+    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var core_1 = require("@angular/core");
+var http_1 = require("@angular/common/http");
+var common_1 = require("@angular/common");
+var translate_component_1 = require("../translate.component");
+var MenuNavComponent = /** @class */ (function () {
+    function MenuNavComponent(http, _location) {
+        this.http = http;
+        this._location = _location;
+        this.lang = translate_component_1.LANG;
+    }
+    MenuNavComponent.prototype.ngOnInit = function () {
+        this.coreUrl = angularGlobals.coreUrl;
+    };
+    MenuNavComponent.prototype.backClicked = function () {
+        this._location.back();
+    };
+    MenuNavComponent = __decorate([
+        core_1.Component({
+            selector: 'menu-nav',
+            templateUrl: "../../../../Views/menuNav.component.html",
+        }),
+        __metadata("design:paramtypes", [http_1.HttpClient, common_1.Location])
+    ], MenuNavComponent);
+    return MenuNavComponent;
+}());
+exports.MenuNavComponent = MenuNavComponent;
diff --git a/apps/maarch_entreprise/js/angular/app/menu/menu-nav.component.ts b/apps/maarch_entreprise/js/angular/app/menu/menu-nav.component.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ccf7e61099d87c6ce20460122ef8012b341f763b
--- /dev/null
+++ b/apps/maarch_entreprise/js/angular/app/menu/menu-nav.component.ts
@@ -0,0 +1,33 @@
+import { Component, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
+import { HttpClient } from '@angular/common/http';
+import {Location} from '@angular/common';
+import { LANG } from '../translate.component';
+
+declare function $j(selector: any) : any;
+
+declare var angularGlobals : any;
+
+
+@Component({
+    selector: 'menu-nav',
+    templateUrl :   "../../../../Views/menuNav.component.html",
+})
+export class MenuNavComponent implements OnInit {
+
+    lang: any = LANG;
+    coreUrl                     : string;
+    router :any;
+
+    constructor(public http: HttpClient, private _location: Location, private _router: Router) {
+        this.router = _router;
+    }
+
+    ngOnInit(): void {      
+        this.coreUrl = angularGlobals.coreUrl;
+    }
+
+    backClicked() {
+        this._location.back();
+    }
+}
diff --git a/apps/maarch_entreprise/js/angular/app/menu/menu.component.js b/apps/maarch_entreprise/js/angular/app/menu/menu.component.js
new file mode 100644
index 0000000000000000000000000000000000000000..988597f9d0cf1caefb7ef52e5034b1d2ec48a90f
--- /dev/null
+++ b/apps/maarch_entreprise/js/angular/app/menu/menu.component.js
@@ -0,0 +1,32 @@
+"use strict";
+var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
+    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+    return c > 3 && r && Object.defineProperty(target, key, r), r;
+};
+var __metadata = (this && this.__metadata) || function (k, v) {
+    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var core_1 = require("@angular/core");
+var http_1 = require("@angular/common/http");
+var translate_component_1 = require("../translate.component");
+var MenuComponent = /** @class */ (function () {
+    function MenuComponent(http) {
+        this.http = http;
+        this.lang = translate_component_1.LANG;
+    }
+    MenuComponent.prototype.ngOnInit = function () {
+        this.coreUrl = angularGlobals.coreUrl;
+    };
+    MenuComponent = __decorate([
+        core_1.Component({
+            selector: 'menu-app',
+            templateUrl: "../../../../Views/menu.component.html",
+        }),
+        __metadata("design:paramtypes", [http_1.HttpClient])
+    ], MenuComponent);
+    return MenuComponent;
+}());
+exports.MenuComponent = MenuComponent;
diff --git a/apps/maarch_entreprise/js/angular/app/menu/menu.component.ts b/apps/maarch_entreprise/js/angular/app/menu/menu.component.ts
new file mode 100644
index 0000000000000000000000000000000000000000..88e69cb979b478b0c37e49ce6240480250f2e227
--- /dev/null
+++ b/apps/maarch_entreprise/js/angular/app/menu/menu.component.ts
@@ -0,0 +1,25 @@
+import { Component, OnInit } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { LANG } from '../translate.component';
+
+declare function $j(selector: any) : any;
+
+declare var angularGlobals : any;
+
+
+@Component({
+    selector: 'menu-app',
+    templateUrl :   "../../../../Views/menu.component.html",
+})
+export class MenuComponent implements OnInit {
+
+    lang: any = LANG;
+    coreUrl                     : string;
+
+    constructor(public http: HttpClient) {
+    }
+
+    ngOnInit(): void {        
+        this.coreUrl = angularGlobals.coreUrl;
+    }
+}
diff --git a/apps/maarch_entreprise/js/angular/app/profile.component.js b/apps/maarch_entreprise/js/angular/app/profile.component.js
index 3c4e59a4ea17867cdbce1455c821aceb7b9bf4af..d3346ff55e1861cb3ca464e48acc2af2ddd8d197 100755
--- a/apps/maarch_entreprise/js/angular/app/profile.component.js
+++ b/apps/maarch_entreprise/js/angular/app/profile.component.js
@@ -110,7 +110,7 @@ var ProfileComponent = /** @class */ (function () {
         this.updateBreadcrumb(angularGlobals.applicationName);
         this.coreUrl = angularGlobals.coreUrl;
         this.loading = true;
-        this.http.get(this.coreUrl + 'rest/currentUser/profile')
+        this.http.get('../../rest/currentUser/profile')
             .subscribe(function (data) {
             _this.user = data;
             _this.user.baskets.forEach(function (value, index) {
@@ -431,8 +431,8 @@ var ProfileComponent = /** @class */ (function () {
     ], ProfileComponent.prototype, "sort", void 0);
     ProfileComponent = __decorate([
         core_1.Component({
-            templateUrl: angularGlobals.profileView,
-            styleUrls: ['../../node_modules/bootstrap/dist/css/bootstrap.min.css', 'css/profile.component.css'],
+            templateUrl: "../../../Views/profile.component.html",
+            styleUrls: ['../../../css/profile.component.css'],
             providers: [notification_service_1.NotificationService]
         }),
         __metadata("design:paramtypes", [http_1.HttpClient, core_1.NgZone, notification_service_1.NotificationService])
diff --git a/apps/maarch_entreprise/js/angular/app/profile.component.ts b/apps/maarch_entreprise/js/angular/app/profile.component.ts
index 8dda25f837d5f239a728f9c9acfb3aea17218f24..16c5fedc05ea46cb296bcee76e321e17d2be399e 100755
--- a/apps/maarch_entreprise/js/angular/app/profile.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/profile.component.ts
@@ -13,8 +13,8 @@ declare var angularGlobals : any;
 
 
 @Component({
-    templateUrl : angularGlobals.profileView,
-    styleUrls   : ['../../node_modules/bootstrap/dist/css/bootstrap.min.css', 'css/profile.component.css'],
+    templateUrl : "../../../Views/profile.component.html",
+    styleUrls   : ['../../../css/profile.component.css'],
     providers   : [NotificationService]
 })
 export class ProfileComponent implements OnInit {
@@ -125,7 +125,7 @@ export class ProfileComponent implements OnInit {
 
         this.loading = true;
 
-        this.http.get(this.coreUrl + 'rest/currentUser/profile')
+        this.http.get('../../rest/currentUser/profile')
             .subscribe((data : any) => {
                 this.user = data;
 
diff --git a/apps/maarch_entreprise/js/angular/app/save-numeric-package.component.js b/apps/maarch_entreprise/js/angular/app/save-numeric-package.component.js
new file mode 100644
index 0000000000000000000000000000000000000000..2dd960620a4a73dcffbfeb75203a548585cdfc8c
--- /dev/null
+++ b/apps/maarch_entreprise/js/angular/app/save-numeric-package.component.js
@@ -0,0 +1,143 @@
+"use strict";
+var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
+    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+    return c > 3 && r && Object.defineProperty(target, key, r), r;
+};
+var __metadata = (this && this.__metadata) || function (k, v) {
+    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var core_1 = require("@angular/core");
+var http_1 = require("@angular/http");
+require("rxjs/add/operator/map");
+var SaveNumericPackageComponent = (function () {
+    function SaveNumericPackageComponent(http, zone) {
+        var _this = this;
+        this.http = http;
+        this.zone = zone;
+        this.numericPackage = {
+            base64: "",
+            name: "",
+            type: "",
+            size: 0,
+            label: "",
+            extension: "",
+        };
+        this.resultInfo = "";
+        this.loading = false;
+        window['angularSaveNumericPackageComponent'] = {
+            componentAfterUpload: function (base64Content) { return _this.processAfterUpload(base64Content); },
+        };
+    }
+    SaveNumericPackageComponent.prototype.preparePage = function () {
+        $j('#inner_content').remove();
+        $j('#menunav').hide();
+        $j('#divList').remove();
+        $j('#magicContactsTable').remove();
+        $j('#manageBasketsOrderTable').remove();
+        $j('#controlParamTechnicTable').remove();
+        $j('#container').width("99%");
+        if ($j('#content h1')[0] && $j('#content h1')[0] != $j('my-app h1')[0]) {
+            $j('#content h1')[0].remove();
+        }
+        if (Prototype.BrowserFeatures.ElementExtensions) {
+            //FIX PROTOTYPE CONFLICT
+            var pluginsToDisable = ['collapse', 'dropdown', 'modal', 'tooltip', 'popover', 'tab'];
+            disablePrototypeJS('show', pluginsToDisable);
+            disablePrototypeJS('hide', pluginsToDisable);
+        }
+    };
+    SaveNumericPackageComponent.prototype.updateBreadcrumb = function (applicationName) {
+        if ($j('#ariane')[0]) {
+            $j('#ariane')[0].innerHTML = "<a href='index.php?reinit=true'>" + applicationName + "</a> > Enregistrer un pli numérique";
+        }
+    };
+    SaveNumericPackageComponent.prototype.ngOnInit = function () {
+        this.preparePage();
+        this.updateBreadcrumb(angularGlobals.applicationName);
+        this.coreUrl = angularGlobals.coreUrl;
+        this.loading = false;
+    };
+    SaveNumericPackageComponent.prototype.processAfterUpload = function (b64Content) {
+        var _this = this;
+        this.zone.run(function () { return _this.resfreshUpload(b64Content); });
+    };
+    SaveNumericPackageComponent.prototype.resfreshUpload = function (b64Content) {
+        this.numericPackage.base64 = b64Content.replace(/^data:.*?;base64,/, "");
+    };
+    SaveNumericPackageComponent.prototype.uploadNumericPackage = function (fileInput) {
+        if (fileInput.target.files && fileInput.target.files[0]) {
+            var reader = new FileReader();
+            this.numericPackage.name = fileInput.target.files[0].name;
+            this.numericPackage.size = fileInput.target.files[0].size;
+            this.numericPackage.type = fileInput.target.files[0].type;
+            this.numericPackage.extension = fileInput.target.files[0].name.split('.').pop();
+            if (this.numericPackage.label == "") {
+                this.numericPackage.label = this.numericPackage.name;
+            }
+            reader.readAsDataURL(fileInput.target.files[0]);
+            reader.onload = function (value) {
+                window['angularSaveNumericPackageComponent'].componentAfterUpload(value.target.result);
+            };
+        }
+    };
+    SaveNumericPackageComponent.prototype.submitNumericPackage = function () {
+        var _this = this;
+        if (this.numericPackage.size != 0) {
+            this.http.post(this.coreUrl + 'rest/saveNumericPackage', this.numericPackage)
+                .map(function (res) { return res.json(); })
+                .subscribe(function (data) {
+                if (data.errors) {
+                    _this.resultInfo = data.errors;
+                    $j('#resultInfo').removeClass().addClass('alert alert-danger alert-dismissible');
+                    $j("#resultInfo").fadeTo(3000, 500).slideUp(500, function () {
+                        $j("#resultInfo").slideUp(500);
+                    });
+                }
+                else {
+                    _this.numericPackage = {
+                        base64: "",
+                        name: "",
+                        type: "",
+                        size: 0,
+                        label: "",
+                        extension: "",
+                    };
+                    $j("#numericPackageFilePath").val(null);
+                    _this.resultInfo = 'Pli numérique correctement importé';
+                    $j('#resultInfo').removeClass().addClass('alert alert-success alert-dismissible');
+                    $j("#resultInfo").fadeTo(3000, 500).slideUp(500, function () {
+                        $j("#resultInfo").slideUp(500);
+                    });
+                    if (data.basketRedirection != null) {
+                        window.location.href = data.basketRedirection;
+                        // action_send_first_request('index.php?display=true&page=manage_action&module=core', 'page',  22, '', 'res_letterbox', 'basket', 'letterbox_coll');
+                    }
+                }
+            });
+        }
+        else {
+            this.numericPackage.name = "";
+            this.numericPackage.size = 0;
+            this.numericPackage.type = "";
+            this.numericPackage.base64 = "";
+            this.numericPackage.extension = "";
+            this.resultInfo = "Aucun pli numérique séléctionné";
+            $j('#resultInfo').removeClass().addClass('alert alert-danger alert-dismissible');
+            $j("#resultInfo").fadeTo(3000, 500).slideUp(500, function () {
+                $j("#resultInfo").slideUp(500);
+            });
+        }
+    };
+    return SaveNumericPackageComponent;
+}());
+SaveNumericPackageComponent = __decorate([
+    core_1.Component({
+        templateUrl: angularGlobals["save-numeric-packageView"],
+        styleUrls: ['../../node_modules/bootstrap/dist/css/bootstrap.min.css', 'css/profile.component.css']
+    }),
+    __metadata("design:paramtypes", [http_1.Http, core_1.NgZone])
+], SaveNumericPackageComponent);
+exports.SaveNumericPackageComponent = SaveNumericPackageComponent;
diff --git a/apps/maarch_entreprise/js/angular/app/save-numeric-package.component.ts b/apps/maarch_entreprise/js/angular/app/save-numeric-package.component.ts
new file mode 100644
index 0000000000000000000000000000000000000000..12f8143ff6b78a7d23825bb77a2bdc04ab709654
--- /dev/null
+++ b/apps/maarch_entreprise/js/angular/app/save-numeric-package.component.ts
@@ -0,0 +1,129 @@
+import { Component, OnInit, NgZone } from '@angular/core';
+import { Http } from '@angular/http';
+import { NotificationService } from './notification.service';
+
+declare function $j(selector: any) : any;
+
+declare var angularGlobals : any;
+
+
+@Component({
+    templateUrl : "../../../Views/save-numeric-package.component.html",
+    // styleUrls   : ['../../node_modules/bootstrap/dist/css/bootstrap.min.css', 'css/profile.component.css']
+})
+export class SaveNumericPackageComponent implements OnInit {
+
+    coreUrl                     : string;
+
+    numericPackage              : any       = {
+        base64                  : "",
+        name                    : "",
+        type                    : "",
+        size                    : 0,
+        label                   : "",
+        extension               : "",
+    };
+
+    loading                     : boolean   = false;
+
+
+    constructor(public http: Http, private zone: NgZone, private notify: NotificationService) {
+        window['angularSaveNumericPackageComponent'] = {
+            componentAfterUpload: (base64Content: any) => this.processAfterUpload(base64Content),
+        };
+    }
+
+    preparePage() {
+        $j('#inner_content').remove();
+        $j('#menunav').hide();
+        $j('#divList').remove();
+        $j('#magicContactsTable').remove();
+        $j('#manageBasketsOrderTable').remove();
+        $j('#controlParamTechnicTable').remove();
+        $j('#container').width("99%");
+        if ($j('#content h1')[0] && $j('#content h1')[0] != $j('my-app h1')[0]) {
+            $j('#content h1')[0].remove();
+        }
+
+    }
+
+    updateBreadcrumb(applicationName: string) {
+        if ($j('#ariane')[0]) {
+            $j('#ariane')[0].innerHTML = "<a href='index.php?reinit=true'>" + applicationName + "</a> > Enregistrer un pli numérique";
+        }
+    }
+
+    ngOnInit(): void {
+        this.preparePage();
+        this.updateBreadcrumb(angularGlobals.applicationName);
+        this.coreUrl = angularGlobals.coreUrl;
+
+        this.loading = false;
+
+    }
+
+    processAfterUpload(b64Content: any) {
+        this.zone.run(() => this.resfreshUpload(b64Content));
+    }
+
+    resfreshUpload(b64Content: any) {
+        this.numericPackage.base64 = b64Content.replace(/^data:.*?;base64,/, "");
+    }
+
+    uploadNumericPackage(fileInput: any) {
+        if (fileInput.target.files && fileInput.target.files[0]) {
+            var reader = new FileReader();
+
+            this.numericPackage.name = fileInput.target.files[0].name;
+            this.numericPackage.size = fileInput.target.files[0].size;
+            this.numericPackage.type = fileInput.target.files[0].type;
+            this.numericPackage.extension = fileInput.target.files[0].name.split('.').pop();
+            if (this.numericPackage.label == "") {
+                this.numericPackage.label = this.numericPackage.name;
+            }
+
+            reader.readAsDataURL(fileInput.target.files[0]);
+
+            reader.onload = function (value: any) {
+                window['angularSaveNumericPackageComponent'].componentAfterUpload(value.target.result);
+            };
+
+        }
+    }
+
+    submitNumericPackage() {
+        if(this.numericPackage.size != 0) {
+            this.http.post(this.coreUrl + 'rest/saveNumericPackage', this.numericPackage)
+                .subscribe((data : any) => {
+                    if (data.errors) {
+                        this.notify.error(data.errors);
+                    } else {
+                        this.numericPackage  = {
+                            base64                  : "",
+                            name                    : "",
+                            type                    : "",
+                            size                    : 0,
+                            label                   : "",
+                            extension               : "",
+                        };
+                        $j("#numericPackageFilePath").val(null);
+                        this.notify.success('Pli numérique correctement importé');
+
+                        if(data.basketRedirection != null){
+                            window.location.href = data.basketRedirection;
+                            // action_send_first_request('index.php?display=true&page=manage_action&module=core', 'page',  22, '', 'res_letterbox', 'basket', 'letterbox_coll');
+                        }
+                    }
+                });
+        } else {
+            this.numericPackage.name        = "";
+            this.numericPackage.size        = 0;
+            this.numericPackage.type        = "";
+            this.numericPackage.base64      = "";
+            this.numericPackage.extension   = "";
+
+            this.notify.error("Aucun pli numérique séléctionné");
+        }
+    }
+
+}
diff --git a/apps/maarch_entreprise/js/angular/app/signature-book.component.js b/apps/maarch_entreprise/js/angular/app/signature-book.component.js
index b33a947855c9390a791c363f0104bbc8bc90d4bf..c8fb2c8ae23f8208a044669b52fd3c8a8c8cce6c 100755
--- a/apps/maarch_entreprise/js/angular/app/signature-book.component.js
+++ b/apps/maarch_entreprise/js/angular/app/signature-book.component.js
@@ -516,7 +516,7 @@ var SignatureBookComponent = /** @class */ (function () {
     };
     SignatureBookComponent = __decorate([
         core_1.Component({
-            templateUrl: angularGlobals["signature-bookView"],
+            templateUrl: "../../../Views/signature-book.component.html",
         }),
         __metadata("design:paramtypes", [http_1.HttpClient, router_1.ActivatedRoute, router_1.Router, core_1.NgZone])
     ], SignatureBookComponent);
diff --git a/apps/maarch_entreprise/js/angular/app/signature-book.component.ts b/apps/maarch_entreprise/js/angular/app/signature-book.component.ts
index fb06d5be39b3d7bf2133bb32f1777e5e50a04318..460199e79bb9dce560d08ceed0ce03d4b3c2179a 100755
--- a/apps/maarch_entreprise/js/angular/app/signature-book.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/signature-book.component.ts
@@ -24,7 +24,7 @@ export class SafeUrlPipe implements PipeTransform {
 }
 
 @Component({
-  templateUrl: angularGlobals["signature-bookView"],
+  templateUrl: "../../../Views/signature-book.component.html",
 })
 export class SignatureBookComponent implements OnInit {
 
diff --git a/apps/maarch_entreprise/js/angular/index.html b/apps/maarch_entreprise/js/angular/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..929a63bd0125de4ecde16d8e17ec5175f83dc9c7
--- /dev/null
+++ b/apps/maarch_entreprise/js/angular/index.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<html lang="en">
+<head>
+  <meta charset="utf-8">
+  <title>MaarchCourrier</title>
+
+  <meta name="viewport" content="width=device-width, initial-scale=1">
+  <link rel="icon" type="image/x-icon" href="favicon.ico">
+</head>
+<body>
+  <app-root></app-root>
+</body>
+</html>
diff --git a/apps/maarch_entreprise/js/angular/lang/lang-en.js b/apps/maarch_entreprise/js/angular/lang/lang-en.js
index 69aa093a98a28ce7da14f79a14d1dcef1f6aba57..74722164459213a71b764deb94ef114df850c296 100755
--- a/apps/maarch_entreprise/js/angular/lang/lang-en.js
+++ b/apps/maarch_entreprise/js/angular/lang/lang-en.js
@@ -47,6 +47,7 @@ exports.LANG_EN = {
     "baskets": "Baskets",
     "basketsOrder": "Manage baskets order",
     "basketUpdated": "Basket updated",
+    "browsing": "Browsing",
     "calDays": "calendar days",
     "canBeModified": "Index modification",
     "canBeSearched": "Searchable",
@@ -60,6 +61,7 @@ exports.LANG_EN = {
     "chooseGroup": "Choose a group",
     "chooseRedirectGroup": "Choose another group",
     "chronoNumber": "Chrono number",
+    "city": "City",
     "clause": "Clause",
     "clickOn": "Click on",
     "color": "Color",
@@ -74,7 +76,12 @@ exports.LANG_EN = {
     "desactivateAbsence": "Deactivate absence",
     "description": "Description",
     "diffusionList": "Diffusion list",
+    "diffusionModelCreation": "Diffusion model creation",
+    "diffusionModelDeleted": "Diffusion model deleted",
+    "diffusionModelModification": "Diffusion model modification",
     "diffusionModels": "Diffusion models",
+    "diffusionModelUpdated": "Diffusion model updated",
+    "diffusionType": "Diffusion type",
     "display": "display",
     "documents": "document(s)",
     "doNotModifyUnlessExpert": "Do not edit this section unless you know what you are doing. Incorrect settings can cause the application to malfunction !",
@@ -141,6 +148,7 @@ exports.LANG_EN = {
     "lastname": "Lastname",
     "life_cycle": "Life cycle",
     "linkGroup": "Link a group",
+    "logout": "Logout",
     "maarchApplication": "Maarch App",
     "manageAbsences": "Manage absences",
     "manageSignatures": "Manage signatures",
@@ -150,6 +158,7 @@ exports.LANG_EN = {
     "modules": "Modules",
     "moreOptions": "More options",
     "move": "Move",
+    "myMenu": "Personal menu",
     "myProfile": "My profile",
     "newAction": "New action",
     "newElement": "New element",
@@ -253,6 +262,7 @@ exports.LANG_EN = {
     "totalProcessed": "Processed element(s)",
     "toUsersEntities": "To users in entities",
     "type": "Type",
+    "unlinkAction": "Unlink action",
     "unlinkGroup": "Unlink group",
     "unselectAll": "Unselect all",
     "update": "Update",
diff --git a/apps/maarch_entreprise/js/angular/lang/lang-en.ts b/apps/maarch_entreprise/js/angular/lang/lang-en.ts
index 44b0a2df48d7b4bfdfc0cd4c35fd10e17ecbfe37..94400b5b4151be9db2235ca1440fdba60a9da4a0 100755
--- a/apps/maarch_entreprise/js/angular/lang/lang-en.ts
+++ b/apps/maarch_entreprise/js/angular/lang/lang-en.ts
@@ -14,7 +14,9 @@ export const LANG_EN = {
     "actions"                   : "Action(s)",
     "actionUpdated"             : "Action updated",
     "activateAbsence"           : "Activate absence",
+    "activateNotification"      : "Activate notification",
     "active"                    : "Active",
+    "activeCron"                : "Active cron",
     "add"                       : "Add",
     "address"                   : "Address",
     "addStatus"                 : "Add a status",
@@ -25,10 +27,13 @@ export const LANG_EN = {
     "administrationServices"    : "Administration services",
     "allActions"                : "All actions",
     "application"               : "Application",
+    "april"                     : "April",
     "archivalAgency"            : "Archival agency",
     "archivalAgreement"         : "Archival agreement",
     "associatedStatus"          : "Associated status",
+    "attachment"                : "Attachment",
     "attachments"               : "Attachments",
+    "august"                    : "August",
     "authorize"                 : "Authorize",
     "autoLogoutAbsence"         : "You are going to be automaticaly disconnected after your redirections",
     "available"                 : "available",
@@ -45,6 +50,7 @@ export const LANG_EN = {
     "baskets"                   : "Baskets",
     "basketsOrder"              : "Manage baskets order",
     "basketUpdated"             : "Basket updated",
+    "browsing"                  : "Browsing",
     "calDays"                   : "calendar days",
     "canBeModified"             : "Index modification",
     "canBeSearched"             : "Searchable",
@@ -58,6 +64,7 @@ export const LANG_EN = {
     "chooseGroup"               : "Choose a group",
     "chooseRedirectGroup"       : "Choose another group",
     "chronoNumber"              : "Chrono number",
+    "city"                      : "City",
     "clause"                    : "Clause",
     "clickOn"                   : "Click on",
     "color"                     : "Color",
@@ -65,6 +72,10 @@ export const LANG_EN = {
     "country"                   : "Country",
     "createScriptNotification"  : "Create the script",
     "currentPsw"                : "Current password",
+    "date"                      : "Date",
+    "day"                       : "Day",
+    "dayOfMonth"                : "Day of month",
+    "december"                  : "December",
     "default"                   : "default",
     "defaultAction"             : "Default action",
     "delete"                    : "Delete",
@@ -72,10 +83,19 @@ export const LANG_EN = {
     "desactivateAbsence"        : "Deactivate absence",
     "description"               : "Description",
     "diffusionList"             : "Diffusion list",
+    "diffusionModelCreation"    : "Diffusion model creation",
+    "diffusionModelDeleted"     : "Diffusion model deleted",
+    "diffusionModelModification" : "Diffusion model modification",
     "diffusionModels"           : "Diffusion models",
+    "diffusionModelUpdated"     : "Diffusion model updated",
+    "diffusionType"             : "Diffusion type",
     "display"                   : "display",
     "documents"                 : "document(s)",
     "doNotModifyUnlessExpert"   : "Do not edit this section unless you know what you are doing. Incorrect settings can cause the application to malfunction !",
+    "eachDay"                   : "Each day",
+    "eachHour"                  : "Each hour",
+    "eachMinute"                : "Each minute",
+    "eachMonth"                 : "Each month",
     "email"                     : "Email",
     "emailSignatures"           : "Email signatures",
     "entities"                  : "Entities",
@@ -87,6 +107,7 @@ export const LANG_EN = {
     "entityUpdated"             : "Entité updated",
     "entityReplacement"         : "Entity replacement",
     "export_seda"               : "Seda export",
+    "february"                  : "February",
     "fileplan"                  : "Fileplan",
     "filterBy"                  : "Filter by",
     "fingerprint"               : "Digital fingerprint",
@@ -94,6 +115,7 @@ export const LANG_EN = {
     "folder"                    : "Folder",
     "folders"                   : "Folders",
     "for"                       : "for",
+    "friday"                    : "Friday",
     "functionnalities"          : "Functionnalities",
     "groupAdded"                : "Group added",
     "groupCreation"             : "Create group",
@@ -105,6 +127,7 @@ export const LANG_EN = {
     "history"                   : "Historique",
     "historyBatch"              : "Historique des batchs",
     "home"                      : "Accueil",
+    "hour"                      : "Hour",
     "id"                        : "Login",
     "imgRelated"                : "Associated image",
     "inactive"                  : "Inactive",
@@ -121,6 +144,9 @@ export const LANG_EN = {
     "isLinkedTo"                : "Is linked to",
     "isSearchBasket"            : "Only search basket",
     "isSytemAction"             : "System action",
+    "january"                   : "January",
+    "july"                      : "July",
+    "june"                      : "June",
     "keyword"                   : "Keyword",
     "keywordHelp"               : "Keyword help",
     "keywordHelpDesc_1"         : "Identifier of logged user",
@@ -139,39 +165,56 @@ export const LANG_EN = {
     "lastname"                  : "Lastname",
     "life_cycle"                : "Life cycle",
     "linkGroup"                 : "Link a group",
+    "logout"                    : "Logout",
     "maarchApplication"         : "Maarch App",
     "manageAbsences"            : "Manage absences",
     "manageSignatures"          : "Manage signatures",
+    "march"                     : "March",
+    "may"                       : "May",
+    "memberAllUsers"            : "All users member",
+    "memberDiffTypeUsers"       : "Diffusion type users member",
+    "memberUserDest"            : "Dest user member",
+    "memberUsersCopy"           : "Copy users member",
     "menus"                     : "Menus",
+    "minute"                    : "Minute",
     "modificationSaved"         : "Modification has been saved",
     "module"                    : "Module",
     "modules"                   : "Modules",
+    "monday"                    : "Monday",
+    "month"                     : "Month",
     "moreOptions"               : "More options",
     "move"                      : "Move",
+    "myMenu"                    : "Personal menu",
     "myProfile"                 : "My profile",
     "newAction"                 : "New action",
     "newElement"                : "New element",
     "newPsw"                    : "New password",
     "newSignature"              : "New signature",
     "no"                        : "No",
+    "noAttachment"              : "No attachment",
     "noReplacement"             : "No replacement",
     "notes"                     : "Notes",
-    "NotificationAdded"             : "Notification added",
+    "notificationAdded"             : "Notification added",
     "notificationCreation"          : "Notification creation",
     "notificationDeleted"           : "Notification deleted",
     "NotificationDiffusionType"     : "Diffusion type",
     "NotificationEnabled"           : "Enabled",
     "NotificationEvent"             : "Event",
-    "NotificationJoinDocument"      : "Join document to notification",
-    "NotificationModel"             : "Model",
+    "notificationJoinDocument"      : "Join document to notification",
+    "notificationModel"             : "Sendmail template",
     "notificationModification"      : "Notification modification",
     "notifications"                 : "Notification(s)",
     "notificationSchedule"          : "Notifications schedule",
-    "NotificationScheduleInfo"      : "This part is used to define when notifications will be sent.\n\nIf you choose * from all the drop-down lists, the notification will be sent every minute 365 days a year.\n\nFrequency example :\n14 30 * * * [courrier] Nouveaux courriers à traiter : La notification sera envoyée tous les jours à 14h30\n9 30 * * Lundi [courrier] Nouveaux courriers à traiter : La notification sera envoyée tous les lundi à 9h30",
-    "NotificationScheduleUpdated"   : "Schedule updated",
+    "NotificationScheduleInfo"      : "As a reminder,\n\ncrontab format : [minute]  [hour]  [day of month]  [month]  [day of week]",
+    "notificationScheduleUpdated"   : "Schedule updated",
     "notificationsSchedule"         : "Notifications schedule",
     "NotificationToEnable"          : "To enable",
     "notificationUpdated"           : "Notification updated",
+    "notUsed"                       : "Not used",
+    "november"                      : "November",
+    "october"                       : "October",
+    "optional"                      : "Optional",
+    "others"                        : "Other(s)",
     "otherActions"                  : "Other(s) action(s)",
     "otherInformations"             : "Other(s) information(s)",
     "otherParameters"           : "Other(s) parameter(s)",
@@ -201,6 +244,7 @@ export const LANG_EN = {
     "record"                    : "element(s)",
     "records"                   : "result(s)",
     "recordsPerPage"            : "result per page",
+    "redirectBasket"            : "Redirect basket",
     "redirects"                 : "Redirections",
     "reinitPassword"            : "Reset password",
     "relatedUsers"              : "Related users",
@@ -210,14 +254,19 @@ export const LANG_EN = {
     "resId"                     : "Res Identifier",
     "resultPages"               : "Rseult pages",
     "role"                      : "Role",
+    "saturday"                  : "Saturday",
     "save"                      : "Save",
+    "september"                 : "September",
     "sbSignatures"              : "Signature Book Signatures",
-    "ScriptCreated"             : "Script created",
+    "script"                    : "Script",
+    "scriptCreated"             : "Script created",
     "search"                    : "Search",
     "searchEntities"            : "Search entity",
     "secondaryEntity"           : "Secondary entity",
     "selectAll"                 : "Select all",
+    "selectedDocumentStatus"    : "Document status selected",
     "sendmail"                  : "Sendmail",
+    "sendTo"                    : "Send to",
     "shortLabel"                : "Short label",
     "signAdded"                 : "Sign added",
     "signDeleted"               : "Sign deleted",
@@ -231,12 +280,18 @@ export const LANG_EN = {
     "statusModification"        : "Status modification",
     "statusName"                : "Status name",
     "statusUpdated"             : "Status updated",
+    "string"                    : "String",
+    "sunday"                    : "Sunday",
     "suspend"                   : "Suspend",
+    "suspended"                 : "Suspended",
+    "suspendNotification"       : "Suspend notification",
     "system"                    : "System",
     "systemParameters"          : "System parameters",
     "tags"                      : "Tags",
     "templates"                 : "Templates",
     "thesaurus"                 : "Thesaurus",
+    "thuesday"                  : "Thuesday",
+    "thursday"                  : "Thursday",
     "to"                        : "to",
     "toDefault"                 : "default",
     "toEntities"                : "To entities",
@@ -250,75 +305,80 @@ export const LANG_EN = {
     "totalErrors"               : "Errors element(s)",
     "totalProcessed"            : "Processed element(s)",
     "toUsersEntities"           : "To users in entities",
+    "triggerAction"                     : "Trigger action",
+    "triggerSystem"                     : "System trigger",
     "type"                      : "Type",
-    "unlinkGroup"               : "Unlink group",
-    "unselectAll"               : "Unselect all",
-    "update"                    : "Update",
-    "updateStatus"              : "Document status modification",
-    "updateStatusInformationsChrono" : "When typing the CHRONO of a document, you will modify its status. The document will be present in the basket depending of the status you have chosen.",
-    "updateStatusInformationsGed"    : "When typing the GED NUMBER of a document, you will modify its status. The document will be present in the basket depending of the status you have chosen.",
-    "uploadSignFile"            : "Upload a sign file",
-    "uploadSignFileInfo"        : "Click to add sign file from your computer",
-    "usedInActionPage"          : "Used in action page",
-    "usedInBasketlist"          : "Used in basket list",
-    "user"                      : "user",
-    "userCreation"              : "User Creation",
-    "userModification"          : "User Modification",
-    "validate"                  : "Validate",
-    "validateAction"            : "Validate action(s)",
-    "value"                     : "value",
-    "view"                      : "View",
-    "visa"                      : "Visa circuit",
-    "whereClauseAction"         : "Where clause condition of action display",
-    "workingDays"               : "Working days",
-    "yes"                       : "Yes",
-    "zipcode"                   : "Zip code",
-    "doctypesAdmin"                       : "Document types",
-    "firstLevelDoctype"                       : "Folder",
-    "secondLevelDoctype"                       : "Sub-folder",
-    "doctype"                       : "Document types",
-    "folderTypeList"                : "Folder types list",
-    "firstLevelAttached"            : "Attach to folder",
-    "secondLevelAttached"           : "Attach to subfolder",
-    "retentionFinalDisposition"     : "Sort final",
-    "retentionRule"                 : "Retention rules",
-    "durationCurrentUse"            : "Duration current use",
-    "processDelayDay"               : "Process delay (in days)",
-    "delay1"                        : "Reminder period 1 before term (in days)",
-    "delay2"                        : "Reminder period 2 after term (in days)",
-    "processMode"                   : "Process modes",
-    "loadedFile"                    : "Loaded file",
-    "generatedFile"                 : "Generated file",
-    "destruction"                   : "Destruction",
-    "conservation"                  : "Retention",
-    "firstLevelAdded"               : "Folder added",
-    "firstLevelUpdated"             : "Folder updated",
-    "firstLevelDeleted"             : "Folder deleted",
-    "secondLevelAdded"              : "Subfolder added",
-    "secondLevelUpdated"            : "Subfolder updated",
-    "secondLevelDeleted"            : "Subfolder deleted",
-    "documentTypeAdded"             : "Document type added",
-    "documentTypeUpdated"           : "Document type updated",
-    "documentTypeDeleted"           : "Document type deleted",
-    "documentTypeReplacement"       : "Document type replacement",
-    "transferToDoctype"             : "Replace by this document type",
-    "complementaryFields"           : "Complementary fields",
-    "archival"                      : "Archival",
-    "field"                         : "Field", 
-    "mandatory"                     : "Mandatory",
-    "fieldType"                     : "Field type",
-    "fieldNature"                   : "Field nature",
-    "databaseColumn"                : "DB column",
-    "used"                          : "Utilisé",
-    "toolTipDeleteDoctype"          : "If mails are attached to this type of document, a reassignment screen will be displayed.",
-    "cantMoveDoctype"               : "The document type can only be moved in a sub-folder",
-    "noDoctypeSelected"             : "No document type selected",
-    "tooltipPriorityDelay"          : "Use this processing time instead of the one defined in the document type",
-    "tooltipPriorityDefault"        : "Set this priority by default when saving a mail",
-    "defaultPriority"           : "Default priority",
-    "chooseColor"               : "Choose a color",
-    'quota'                   : 'Quota',
-    'actives'              : 'Active(s)',
-    'inactives'            : 'Inactive(s)',
-    'quotaExceeded'        : 'Quota exceeded'
+    "unlinkAction"                      : "Unlink action",
+    "unlinkGroup"                       : "Unlink group",
+    "unselectAll"                       : "Unselect all",
+    "update"                            : "Update",
+    "updateStatus"                      : "Document status modification",
+    "updateStatusInformationsChrono"    : "When typing the CHRONO of a document, you will modify its status. The document will be present in the basket depending of the status you have chosen.",
+    "updateStatusInformationsGed"       : "When typing the GED NUMBER of a document, you will modify its status. The document will be present in the basket depending of the status you have chosen.",
+    "uploadSignFile"                    : "Upload a sign file",
+    "uploadSignFileInfo"                : "Click to add sign file from your computer",
+    "usedInActionPage"                  : "Used in action page",
+    "usedInBasketlist"                  : "Used in basket list",
+    "user"                              : "user",
+    "userCreation"                      : "User Creation",
+    "userModification"                  : "User Modification",
+    "validate"                          : "Validate",
+    "validateAction"                    : "Validate action(s)",
+    "value"                             : "value",
+    "view"                              : "View",
+    "visa"                              : "Visa circuit",
+    "whereClauseAction"                 : "Where clause condition of action display",
+    "workingDays"                       : "Working days",
+    "yes"                               : "Yes",
+    "zipcode"                           : "Zip code",
+    "doctypesAdmin"                     : "Document types",
+    "firstLevelDoctype"                 : "Folder",
+    "secondLevelDoctype"                : "Sub-folder",
+    "doctype"                           : "Document types",
+    "folderTypeList"                    : "Folder types list",
+    "firstLevelAttached"                : "Attach to folder",
+    "secondLevelAttached"               : "Attach to subfolder",
+    "retentionFinalDisposition"         : "Sort final",
+    "retentionRule"                     : "Retention rules",
+    "durationCurrentUse"                : "Duration current use",
+    "processDelayDay"                   : "Process delay (in days)",
+    "delay1"                            : "Reminder period 1 before term (in days)",
+    "delay2"                            : "Reminder period 2 after term (in days)",
+    "processMode"                       : "Process modes",
+    "loadedFile"                        : "Loaded file",
+    "generatedFile"                     : "Generated file",
+    "destruction"                       : "Destruction",
+    "conservation"                      : "Retention",
+    "firstLevelAdded"                   : "Folder added",
+    "firstLevelUpdated"                 : "Folder updated",
+    "firstLevelDeleted"                 : "Folder deleted",
+    "secondLevelAdded"                  : "Subfolder added",
+    "secondLevelUpdated"                : "Subfolder updated",
+    "secondLevelDeleted"                : "Subfolder deleted",
+    "documentTypeAdded"                 : "Document type added",
+    "documentTypeUpdated"               : "Document type updated",
+    "documentTypeDeleted"               : "Document type deleted",
+    "documentTypeReplacement"           : "Document type replacement",
+    "transferToDoctype"                 : "Replace by this document type",
+    "complementaryFields"               : "Complementary fields",
+    "archival"                          : "Archival",
+    "field"                             : "Field",
+    "mandatory"                         : "Mandatory",
+    "fieldType"                         : "Field type",
+    "fieldNature"                       : "Field nature",
+    "databaseColumn"                    : "DB column",
+    "used"                              : "Utilisé",
+    "toolTipDeleteDoctype"              : "If mails are attached to this type of document, a reassignment screen will be displayed.",
+    "cantMoveDoctype"                   : "The document type can only be moved in a sub-folder",
+    "noDoctypeSelected"                 : "No document type selected",
+    "tooltipPriorityDelay"              : "Use this processing time instead of the one defined in the document type",
+    "tooltipPriorityDefault"            : "Set this priority by default when saving a mail",
+    "defaultPriority"                   : "Default priority",
+    "chooseColor"                       : "Choose a color",
+    "wednesday"                         : "Wednesday",
+    'quota'                             : 'Quota',
+    'actives'                           : 'Active(s)',
+    'inactives'                         : 'Inactive(s)',
+    'quotaExceeded'                     : 'Quota exceeded'
+
 };
diff --git a/apps/maarch_entreprise/js/angular/lang/lang-fr.js b/apps/maarch_entreprise/js/angular/lang/lang-fr.js
index 3fd8fec7a0e4785409a85c6e1a6fea3ba7258f17..a1e56a18436b02c422419e79ec2bcd2feeea8ce6 100755
--- a/apps/maarch_entreprise/js/angular/lang/lang-fr.js
+++ b/apps/maarch_entreprise/js/angular/lang/lang-fr.js
@@ -33,7 +33,7 @@ exports.LANG_FR = {
     "archivalAgency": "Convention d'archivage",
     "archivalAgreement": "Service d'archive",
     "associatedStatus": "Statut associé",
-    "attachments": "Attachments",
+    "attachments": "Pièces jointes",
     "authorize": "Autoriser",
     "autoLogoutAbsence": "Vous allez être automatiquement déconnecté après avoir défini vos redirections de bannettes",
     "available": "disponible",
@@ -50,6 +50,7 @@ exports.LANG_FR = {
     "baskets": "Bannettes",
     "basketsOrder": "Gérer l'ordre des bannettes",
     "basketUpdated": "Bannette modifiée",
+    "browsing": "Navigation",
     "calDays": "jour(s) calendaire(s)",
     "canBeModified": "Modification des index",
     "canBeSearched": "Recherche",
@@ -64,6 +65,7 @@ exports.LANG_FR = {
     "chooseGroup": "Choisissez un groupe",
     "chooseRedirectGroup": "Choisissez un groupe de remplacement",
     "chronoNumber": "Numéro chrono",
+    "city": "Ville",
     "clauseGroup": "Périmètre documentaire",
     "clause": "Clause",
     "clickOn": "Cliquez sur",
@@ -82,12 +84,17 @@ exports.LANG_FR = {
     "desactivateAbsence": "Désactiver l'absence",
     "description": "Description",
     "diffusionList": "Liste de diffusion",
+    "diffusionModelCreation": "Création d'un modèle de diffusion",
+    "diffusionModelDeleted": "Modèle de diffusion supprimé",
+    "diffusionModelModification": "Modification d'un modèle de diffusion",
     "diffusionModels": "Modèles de diffusion",
+    "diffusionModelUpdated": "Modèle de diffusion mis à jour",
+    "diffusionType": "Type de Modèle",
     "display": "affichage",
     "documents": "document(s)",
     "doNotModifyUnlessExpert": "Ne pas modifier cette section à moins de savoir ce que vous faites. Un mauvais paramètrage peut entrainer des dysfonctionnements de l'application!",
-    "email": "Email",
-    "emailSignatures": "Signatures de mail",
+    "email": "Courriel",
+    "emailSignatures": "Signatures de courriel",
     "entities": "Entités",
     "entityAdded": "Entité ajoutée",
     "entityDeleted": "Entité supprimée",
@@ -143,7 +150,7 @@ exports.LANG_FR = {
     "keywordHelpDesc_10": "Sous-entités immédiates (n-1) des entités données en argument",
     "keywordHelpDesc_11": "Exemple dans la définition de la sécurité d'un groupe (where clause) : accès sur les ressources concernant le service d'appartenance principal de l'utilisateur connecté, ou les sous-services de ce service",
     "keywordHelpDesc_2": "Courriel de l'utilisateur connecté",
-    "keywordHelpDesc_3": "Toutes les entités rattachées à l'utilisateur connecté. N'inclue pas les sous-entités",
+    "keywordHelpDesc_3": "Toutes les entités rattachées à l'utilisateur connecté. N'inclut pas les sous-entités",
     "keywordHelpDesc_4": "Entité primaire de l'utilisateur connecté",
     "keywordHelpDesc_5": "Sous-entités de la liste d'argument, qui peut aussi être @my_entities ou @my_primary_entity",
     "keywordHelpDesc_6": "Entité parente de l'entité en argument",
@@ -156,6 +163,7 @@ exports.LANG_FR = {
     "lastname": "Nom",
     "life_cycle": "Cycle de vie",
     "linkGroup": "Associer un groupe",
+    "logout": "Se déconnecter",
     "maarchApplication": "Application Maarch",
     "manageAbsences": "Rediriger mes bannettes",
     "manageSignatures": "Gérer les signatures",
@@ -164,7 +172,8 @@ exports.LANG_FR = {
     "module": "Module",
     "modules": "Modules",
     "moreOptions": "Plus d'options",
-    "move": "Déplaçer",
+    "move": "Déplacer",
+    "myMenu": "Menu personnel",
     "myProfile": "Mon profil",
     "newAction": "Nouvelle action",
     "newElement": "Nouvel élément",
@@ -235,10 +244,10 @@ exports.LANG_FR = {
     "sbSignatures": "Signatures de parapheur",
     "ScriptCreated": "Script créé",
     "search": "Chercher",
-    "searchEntities": "Rechercher un service",
+    "searchEntities": "Rechercher une entité",
     "secondaryEntity": "Entitté secondaire",
     "selectAll": "Sélectionner tout",
-    "sendmail": "Envoi de mails",
+    "sendmail": "Envoi de courriels",
     "shortLabel": "Libellé court",
     "signAdded": "Signature ajoutée",
     "signDeleted": "Signature supprimée",
@@ -273,6 +282,7 @@ exports.LANG_FR = {
     "totalProcessed": "Élément(s) analysé(s)",
     "toUsersEntities": "Vers les utilisateurs des services",
     "type": "Type",
+    "unlinkAction": "Dissocier l'action",
     "unlinkGroup": "Dissocier le groupe",
     "unselectAll": "Tout désélectionner",
     "update": "Modifier",
@@ -301,7 +311,7 @@ exports.LANG_FR = {
     "workingDays": "jour(s) ouvré(s)",
     "yes": "Oui",
     "zipcode": "Code postal",
-    "doctypesAdmin": "Typologies documentaire",
+    "doctypesAdmin": "Typologie(s) documentaire(s)",
     "firstLevelDoctype": "Chemise",
     "secondLevelDoctype": "Sous-chemise",
     "doctype": "Type de document",
@@ -342,7 +352,7 @@ exports.LANG_FR = {
     "toolTipDeleteDoctype": "Si des courriers sont rattachés à ce type de document, un écran de réaffectation s'affichera",
     "cantMoveDoctype": "Le type de document peut uniquement être déplacé dans une sous-chemise",
     "noDoctypeSelected": "Aucun type de document sélectionné",
-    "tooltipPriorityDelay": "Utiliser ce délai de traitement au lieu de celui définit dans le type document",
+    "tooltipPriorityDelay": "Utiliser ce délai de traitement au lieu de celui défini dans le type document",
     "tooltipPriorityDefault": "Positionner cette priorité par défaut lors de l'enregistrement d'un courrier",
     "defaultPriority": "Priorité par défaut",
     "chooseColor": "Choisissez une couleur",
diff --git a/apps/maarch_entreprise/js/angular/lang/lang-fr.ts b/apps/maarch_entreprise/js/angular/lang/lang-fr.ts
index a7fba185c71b225b642bda9be2ae17eb91ec4c82..c06abf6ebb6be7257705c0bbddce3784aaf49d06 100755
--- a/apps/maarch_entreprise/js/angular/lang/lang-fr.ts
+++ b/apps/maarch_entreprise/js/angular/lang/lang-fr.ts
@@ -17,7 +17,9 @@ export const LANG_FR = {
     "actionUpdated"                 : "Action modifiée",
     "activateAbs"                   : "Activer l'absence",
     "activateAbsence"               : "Activer l'absence",
+    "activateNotification"          : "Activer la notification",
     "active"                        : "Actif",
+    "activeCron"                    : "Tâche(s) active(s)",
     "add"                           : "Ajouter",
     "address"                       : "Adresse",
     "addStatus"                     : "Ajouter un statut",
@@ -28,10 +30,13 @@ export const LANG_FR = {
     "administrationServices"        : "Droits d'administration",
     "allActions"                    : "Toutes les actions",
     "application"                   : "Application",
+    "april"                         : "Avril",
     "archivalAgency"                : "Convention d'archivage",
     "archivalAgreement"             : "Service d'archive",
     "associatedStatus"              : "Statut associé",
-    "attachments"                   : "Attachments",
+    "attachment"                    : "Pièce jointe",
+    "attachments"                   : "Pièces jointes",
+    "august"                        : "Août",
     "authorize"                    : "Autoriser",
     "autoLogoutAbsence"            : "Vous allez être automatiquement déconnecté après avoir défini vos redirections de bannettes",
     "available"                    : "disponible",
@@ -48,6 +53,7 @@ export const LANG_FR = {
     "baskets"                      : "Bannettes",
     "basketsOrder"                 : "Gérer l'ordre des bannettes",
     "basketUpdated"                : "Bannette modifiée",
+    "browsing"                     : "Navigation",
     "calDays"                      : "jour(s) calendaire(s)",
     "canBeModified"                : "Modification des index",
     "canBeSearched"                : "Recherche",
@@ -62,6 +68,7 @@ export const LANG_FR = {
     "chooseGroup"                  : "Choisissez un groupe",
     "chooseRedirectGroup"          : "Choisissez un groupe de remplacement",
     "chronoNumber"                 : "Numéro chrono",
+    "city"                         : "Ville",
     "clauseGroup"                  : "Périmètre documentaire",
     "clause"                       : "Clause",
     "clickOn"                      : "Cliquez sur",
@@ -73,6 +80,9 @@ export const LANG_FR = {
     "currentPsw"                   : "Mot de passe actuel",
     "dataOfMonth"                  : "Données du mois",
     "date"                         : "Date",
+    "day"                          : "Jour",
+    "dayOfMonth"                   : "Jour du mois",
+    "december"                     : "Décembre",
     "default"                      : "par défaut",
     "defaultAction"                : "Action par défaut",
     "delete"                       : "Supprimer",
@@ -80,12 +90,21 @@ export const LANG_FR = {
     "desactivateAbsence"           : "Désactiver l'absence",
     "description"                  : "Description",
     "diffusionList"                : "Liste de diffusion",
+    "diffusionModelCreation"       : "Création d'un modèle de diffusion",
+    "diffusionModelDeleted"         : "Modèle de diffusion supprimé",
+    "diffusionModelModification"   : "Modification d'un modèle de diffusion",
     "diffusionModels"              : "Modèles de diffusion",
+    "diffusionModelUpdated"        : "Modèle de diffusion mis à jour",
+    "diffusionType"                : "Type de Modèle",
     "display"                      : "affichage",
     "documents"                    : "document(s)",
     "doNotModifyUnlessExpert"      : "Ne pas modifier cette section à moins de savoir ce que vous faites. Un mauvais paramètrage peut entrainer des dysfonctionnements de l'application!",
-    "email"                        : "Email",
-    "emailSignatures"              : "Signatures de mail",
+    "eachDay"                      : "Chaque jour",
+    "eachHour"                     : "Toutes les heures",
+    "eachMinute"                   : "Toutes les minutes",
+    "eachMonth"                    : "Chaque mois",
+    "email"                        : "Courriel",
+    "emailSignatures"              : "Signatures de courriel",
     "entities"                     : "Entités",
     "entityAdded"                  : "Entité ajoutée",
     "entityDeleted"                : "Entité supprimée",
@@ -97,6 +116,7 @@ export const LANG_FR = {
     "entries"                      : "entrée(s)",
     "event"                        : "Événement",
     "export_seda"                  : "Export seda",
+    "february"                     : "Février",
     "fileplan"                     : "Plan de classement personnel",
     "filterBy"                     : "Filtrer",
     "filteredFrom"                 : "filtré sur un ensemble de",
@@ -105,6 +125,7 @@ export const LANG_FR = {
     "folder"                       : "Dossier",
     "folders"                      : "Dossiers",
     "for"                          : "pour",
+    "friday"                       : "Vendredi",
     "functionnalities"             : "Fonctionnalités",
     "groupAdded"                   : "Groupe ajouté",
     "groupCreation"                : "Création d'un groupe",
@@ -116,6 +137,7 @@ export const LANG_FR = {
     "history"                      : "Historique",
     "historyBatch"                 : "Historique des batchs",
     "home"                         : "Accueil",
+    "hour"                         : "Heure",
     "id"                           : "Identifiant",
     "imgRelated"                   : "Image associée",
     "inactive"                     : "Inactif",
@@ -135,13 +157,16 @@ export const LANG_FR = {
     "isLinkedTo"                   : "Est associé à",
     "isSearchBasket"               : "Bannette de recherche uniquement",
     "isSytemAction"                : "Action système",
+    "january"                      : "Janvier",
+    "july"                         : "Juillet",
+    "june"                         : "Juin",
     "keyword"                      : "Mot-clé",
     "keywordHelp"                  : "Aide sur les mots-clés",
     "keywordHelpDesc_1"            : "Identifiant de l'utilisateur connecté",
     "keywordHelpDesc_10"           : "Sous-entités immédiates (n-1) des entités données en argument",
     "keywordHelpDesc_11"           : "Exemple dans la définition de la sécurité d'un groupe (where clause) : accès sur les ressources concernant le service d'appartenance principal de l'utilisateur connecté, ou les sous-services de ce service",
     "keywordHelpDesc_2"            : "Courriel de l'utilisateur connecté",
-    "keywordHelpDesc_3"            : "Toutes les entités rattachées à l'utilisateur connecté. N'inclue pas les sous-entités",
+    "keywordHelpDesc_3"            : "Toutes les entités rattachées à l'utilisateur connecté. N'inclut pas les sous-entités",
     "keywordHelpDesc_4"            : "Entité primaire de l'utilisateur connecté",
     "keywordHelpDesc_5"            : "Sous-entités de la liste d'argument, qui peut aussi être @my_entities ou @my_primary_entity",
     "keywordHelpDesc_6"            : "Entité parente de l'entité en argument",
@@ -154,15 +179,26 @@ export const LANG_FR = {
     "lastname"                     : "Nom",
     "life_cycle"                   : "Cycle de vie",
     "linkGroup"                    : "Associer un groupe",
+    "logout"                       : "Se déconnecter",
     "maarchApplication"            : "Application Maarch",
     "manageAbsences"               : "Rediriger mes bannettes",
     "manageSignatures"             : "Gérer les signatures",
+    "march"                        : "Mars",
+    "may"                          : "Mai",
+    "memberAllUsers"               : "Tout les utilisateurs membres",
+    "memberDiffTypeUsers"          : "Personnes membres du type de diffusion",
+    "memberUserDest"               : "Utilisateur destinataire membre",
+    "memberUsersCopy"               : "Utilisateur(s) en copie membre(s)",
     "menus"                        : "Menus",
+    "minute"                       : "Minute",
     "modificationSaved"            : "Modification enregistrée",
     "module"                       : "Module",
     "modules"                      : "Modules",
     "moreOptions"                  : "Plus d'options",
-    "move"                         : "Déplaçer",
+    "monday"                       : "Lundi",
+    "month"                        : "Mois",
+    "move"                         : "Déplacer",
+    "myMenu"                       : "Menu personnel",
     "myProfile"                    : "Mon profil",
     "newAction"                    : "Nouvelle action",
     "newElement"                   : "Nouvel élément",
@@ -170,93 +206,110 @@ export const LANG_FR = {
     "newSignature"                 : "Nouvelle signature",
     "next"                         : "Suivant",
     "no"                           : "Non",
+    "noAttachment"                 : "Sans pièce jointe",
     "noRecord"                     : "Aucun élément",
     "noReplacement"                : "Aucun remplacement",
     "noResult"                     : "Aucun résultat",
     "notes"                        : "Annotations",
-    "NotificationAdded"            : "Notification ajoutée",
+    "notificationAdded"            : "Notification ajoutée",
     "notificationCreation"         : "Création d'une notification",
     "notificationDeleted"          : "Notification supprimée",
     "NotificationDiffusionType"    : "Type de diffusion",
     "NotificationEnabled"          : "Activée",
     "NotificationEvent"            : "Evènement",
-    "NotificationJoinDocument"     : "Joindre le document à la notification",
-    "NotificationModel"            : "Modèle",
+    "notificationJoinDocument"     : "Joindre le document principal",
+    "notificationModel"            : "Modèle du mail d'envoi",
     "notificationModification"     : "Modification de la notification",  
     "notifications"                : "Notification(s)",
     "notificationSchedule"         : "Planifier les notifications",
-    "NotificationScheduleInfo"     : "Cette partie permet de définir quand seront envoyées les notifications.\n\nSi vous choisissez * dans toutes les listes déroulantes, la notification sera envoyée toutes les minutes 365 jours par an.\n\nExemple de fréquence :\n14 30 * * * [courrier] Nouveaux courriers à traiter : La notification sera envoyée tous les jours à 14h30\n9 30 * * Lundi [courrier] Nouveaux courriers à traiter : La notification sera envoyée tous les lundi à 9h30",
-    "NotificationScheduleUpdated"  : "Planification mise à jour",
+    "NotificationScheduleInfo"     : "Pour Rappel,\n\nformat de la crontab : [minute]  [heure]  [jour dans le mois]  [mois]  [jour de la semaine]",
+    "notificationScheduleUpdated"  : "Tâche(s) planifié(s) mise à jour",
     "notificationsSchedule"        : "Planification des notifications",
     "NotificationToEnable"         : "Activer",
     "notificationUpdated"          : "Notification mise à jour",
+    "notUsed"                      : "Non utilisé",
+    "november"                     : "Novembre",
+    "october"                      : "Octobre",
+    "optional"                     : "Optionnel",
+    "others"                       : "Autre(s)",
     "otherActions"                 : "Action(s) supplémentaire(s)",
     "otherInformations"            : "Information(s) complémentaire(s)",
     "otherParameters"              : "Autre(s) paramètre(s)",
     "outOf"                        : "sur",
     "page"                         : "Page",
-    "parameter"                     : "Paramètre",
-    "parameterAdded"                : "Paramètre ajouté",
-    "parameterCreation"             : "Création d'un paramètre",
-    "parameterDeleted"              : "Paramètre supprimé",
-    "parameterModification"         : "Modification d'un paramètre",
-    "parameters"                    : "Paramètres",
-    "parameterUpdated"              : "Paramètre modifié",
-    "phoneNumber"                   : "Numéro de téléphone",
-    "previous"                      : "Précédent",
-    "primaryEntity"                 : "Entité primaire",
-    "priorities"                    : "Priorité(s)",
-    "priorityAdded"                 : "Priorité ajoutée",
-    "priorityCreation"              : "Création d'une priorité",
-    "priorityDeleted"               : "Priorité supprimée",
-    "priorityModification"          : "Modification d'une priorité",
-    "priorityUpdated"               : "Priorité modifiée",
-    "privileges"                    : "Privilèges",
-    "processAction"                 : "Action(s) de traitement",
-    "processDelay"                  : "Délai de traitement",
-    "processDelayDoctype"           : "utilise le délai selon le type de document",
-    "processType"                  : "Type de traitement",
-    "pswReseted"                   : "Mot de passe réinitialisé",
-    "record"                       : "élément(s)",
-    "records"                      : "résultats",
-    "recordsPerPage"               : "résultats par page",
-    "redirects"                    : "Redirections",
-    "reinitPassword"               : "Réinitialiser le mot de passe",
-    "relatedUsers"                 : "Utilisateur(s) associé(s)",
-    "renewPsw"                     : "Retaper le mot de passe",
-    "reports"                      : "Statistiques",
-    "resetPsw"                     : "Réinitialiser le mot de passe",
-    "resId"                        : "Identifiant GED",
-    "resultPages"                  : "Pages de résultat",
-    "role"                         : "Rôle",
-    "save"                         : "Enregistrer",
-    "sbSignatures"                 : "Signatures de parapheur",
-    "ScriptCreated"                 : "Script créé",
-    "search"                       : "Chercher",
-    "searchEntities"               : "Rechercher un service",
-    "secondaryEntity"              : "Entitté secondaire",
-    "selectAll"                    : "Sélectionner tout",
-    "sendmail"                     : "Envoi de mails",
-    "shortLabel"                   : "Libellé court",
-    "signAdded"                    : "Signature ajoutée",
-    "signDeleted"                  : "Signature supprimée",
-    "signUpdated"                  : "Signature modifiée",
-    "siretCode"                    : "Numéro SIRET",
-    "status"                       : "Statut",
-    "statusAdded"                  : "Statut ajouté",
-    "statusCreation"               : "Création d'un statut",
-    "statusDeleted"                : "Statut supprimé",
-    "statuses"                     : "Statut(s)",
-    "statusModification"           : "Modification du statut",
-    "statusName"                   : "Nom du statut",
-    "statusUpdated"                : "Statut mis à jour",
-    "string"                       : "Chaine de caratère",
-    "suspend"                      : "Suspendre",
-    "system"                       : "Système",
-    "systemParameters"             : "paramètres système",
-    "tags"                         : "Mots clés",
-    "templates"                    : "Modèles de documents",
+    "parameter"                         : "Paramètre",
+    "parameterAdded"                    : "Paramètre ajouté",
+    "parameterCreation"                 : "Création d'un paramètre",
+    "parameterDeleted"                  : "Paramètre supprimé",
+    "parameterModification"             : "Modification d'un paramètre",
+    "parameters"                        : "Paramètres",
+    "parameterUpdated"                  : "Paramètre modifié",
+    "phoneNumber"                       : "Numéro de téléphone",
+    "previous"                          : "Précédent",
+    "primaryEntity"                     : "Entité primaire",
+    "priorities"                        : "Priorité(s)",
+    "priorityAdded"                     : "Priorité ajoutée",
+    "priorityCreation"                  : "Création d'une priorité",
+    "priorityDeleted"                   : "Priorité supprimée",
+    "priorityModification"              : "Modification d'une priorité",
+    "priorityUpdated"                   : "Priorité modifiée",
+    "privileges"                        : "Privilèges",
+    "processAction"                     : "Action(s) de traitement",
+    "processDelay"                      : "Délai de traitement",
+    "processDelayDoctype"               : "utilise le délai selon le type de document",
+    "processType"                       : "Type de traitement",
+    "pswReseted"                        : "Mot de passe réinitialisé",
+    "record"                            : "élément(s)",
+    "records"                           : "résultats",
+    "recordsPerPage"                    : "résultats par page",
+    "redirectBasket"                    : "Rediriger la bannette",
+    "redirects"                         : "Redirections",
+    "reinitPassword"                    : "Réinitialiser le mot de passe",
+    "relatedUsers"                      : "Utilisateur(s) associé(s)",
+    "renewPsw"                          : "Retaper le mot de passe",
+    "reports"                           : "Statistiques",
+    "resetPsw"                          : "Réinitialiser le mot de passe",
+    "resId"                             : "Identifiant GED",
+    "resultPages"                       : "Pages de résultat",
+    "role"                              : "Rôle",
+    "saturday"                          : "Samedi",
+    "save"                              : "Enregistrer",
+    "september"                         : "Septembre",
+    "sbSignatures"                      : "Signatures de parapheur",
+    "script"                            : "Script",
+    "scriptCreated"                     : "Script créé",
+    "search"                            : "Chercher",
+    "searchEntities"                    : "Rechercher une entité",
+    "secondaryEntity"                   : "Entitté secondaire",
+    "selectAll"                         : "Sélectionner tout",
+    "selectedDocumentStatus"            : "Statut du document à prendre en compte",
+    "sendmail"                          : "Envoi de courriels",
+    "sendTo"                            : "Envoyer à",
+    "shortLabel"                        : "Libellé court",
+    "signAdded"                         : "Signature ajoutée",
+    "signDeleted"                       : "Signature supprimée",
+    "signUpdated"                       : "Signature modifiée",
+    "siretCode"                         : "Numéro SIRET",
+    "status"                            : "Statut",
+    "statusAdded"                       : "Statut ajouté",
+    "statusCreation"                    : "Création d'un statut",
+    "statusDeleted"                     : "Statut supprimé",
+    "statuses"                          : "Statut(s)",
+    "statusModification"                : "Modification du statut",
+    "statusName"                        : "Nom du statut",
+    "statusUpdated"                     : "Statut mis à jour",
+    "string"                            : "Chaine de caratère",
+    "sunday"                            : "Dimanche",
+    "suspend"                           : "Suspendre",
+    "suspended"                         : "Suspendu",
+    "suspendNotification"               : "Susprendre la notification",
+    "system"                            : "Système",
+    "systemParameters"                  : "paramètres système",
+    "tags"                              : "Mots clés",
+    "templates"                         : "Modèles de documents",
     "thesaurus"                         : "Thésaurus",
+    "thuesday"                          : "Mardi",
+    "thursday"                          : "Jeudi",
     "to"                                : "vers",
     "toDefault"                         : "par défaut",
     "toEntities"                        : "Vers les services",
@@ -270,7 +323,10 @@ export const LANG_FR = {
     "totalErrors"                       : "Élément(s) en erreur",
     "totalProcessed"                    : "Élément(s) analysé(s)",
     "toUsersEntities"                   : "Vers les utilisateurs des services",
+    "triggerAction"                     : "Action Déclencheur",
+    "triggerSystem"                     : "Déclenchement système",
     "type"                              : "Type",
+    "unlinkAction"                      : "Dissocier l'action",
     "unlinkGroup"                       : "Dissocier le groupe",
     "unselectAll"                       : "Tout désélectionner",
     "update"                            : "Modifier",
@@ -299,7 +355,7 @@ export const LANG_FR = {
     "workingDays"                       : "jour(s) ouvré(s)",
     "yes"                               : "Oui",
     "zipcode"                           : "Code postal",
-    "doctypesAdmin"                     : "Typologies documentaire",
+    "doctypesAdmin"                     : "Typologie(s) documentaire(s)",
     "firstLevelDoctype"                 : "Chemise",
     "secondLevelDoctype"                : "Sous-chemise",
     "doctype"                           : "Type de document",
@@ -329,24 +385,24 @@ export const LANG_FR = {
     "documentTypeDeleted"               : "Type de document supprimé",
     "documentTypeReplacement"           : "Remplacement du type de document",
     "transferToDoctype"                 : "Remplacer par le type de document",
-    "complementaryFields"                 : "Champs complémentaires",
-    "archival"                 : "Archivage",
-    "field"                 : "Champ",
-    "mandatory"                 : "Obligatoire",
-    "fieldType"                 : "Type champ",
-    "fieldNature"                 : "Nature champ",
-    "databaseColumn"                 : "Colonne BDD",
-    "used"                 : "Utilisé",
-    "toolTipDeleteDoctype"                 : "Si des courriers sont rattachés à ce type de document, un écran de réaffectation s'affichera",
-    "cantMoveDoctype"                 : "Le type de document peut uniquement être déplacé dans une sous-chemise",
+    "complementaryFields"               : "Champs complémentaires",
+    "archival"                          : "Archivage",
+    "field"                             : "Champ",
+    "mandatory"                         : "Obligatoire",
+    "fieldType"                         : "Type champ",
+    "fieldNature"                       : "Nature champ",
+    "databaseColumn"                    : "Colonne BDD",
+    "used"                              : "Utilisé",
+    "toolTipDeleteDoctype"              : "Si des courriers sont rattachés à ce type de document, un écran de réaffectation s'affichera",
+    "cantMoveDoctype"                   : "Le type de document peut uniquement être déplacé dans une sous-chemise",
     "noDoctypeSelected"                 : "Aucun type de document sélectionné",
-    "tooltipPriorityDelay"                 : "Utiliser ce délai de traitement au lieu de celui définit dans le type document",
-    "tooltipPriorityDefault"                 : "Positionner cette priorité par défaut lors de l'enregistrement d'un courrier",
-    "defaultPriority"                 : "Priorité par défaut",
-    "chooseColor"                 : "Choisissez une couleur",
-    'quota'                   : 'Quota',
-    'actives'              : 'Actif(s)',
-    'inactives'            : 'Inactif(s)',
-    'quotaExceeded'        : 'Quota dépassé'
-
-};
\ No newline at end of file
+    "tooltipPriorityDelay"              : "Utiliser ce délai de traitement au lieu de celui défini dans le type document",
+    "tooltipPriorityDefault"            : "Positionner cette priorité par défaut lors de l'enregistrement d'un courrier",
+    "defaultPriority"                   : "Priorité par défaut",
+    "chooseColor"                       : "Choisissez une couleur",
+    "wednesday"                         : "Mercredi",
+    'quota'                             : 'Quota',
+    'actives'                           : 'Actif(s)',
+    'inactives'                         : 'Inactif(s)',
+    'quotaExceeded'                     : 'Quota dépassé'
+};
diff --git a/apps/maarch_entreprise/js/angular/main.bundle.min.js b/apps/maarch_entreprise/js/angular/main.bundle.min.js
deleted file mode 100755
index 8156e901b6f33745f7ffa3f314eaf16f12ad5ad4..0000000000000000000000000000000000000000
--- a/apps/maarch_entreprise/js/angular/main.bundle.min.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).main=t()}}(function(){return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return i(n||t)},u,u.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("@angular/router"),c=t("../translate.component"),u=t("../notification.service"),p=function(){function t(t,e,n,r,i,o){this.http=n,this.route=r,this.router=i,this.notify=o,this.lang=c.LANG,this.action={},this.statuses=[],this.actionPagesList=[],this.categoriesList=[],this.keywordsList=[],this.loading=!1,$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.updateBreadcrumb=function(t){var e="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>"+this.lang.administration+"</a> > <a onclick='location.hash = \"/administration/actions\"' style='cursor: pointer'>"+this.lang.actions+"</a> > ";1==this.creationMode?e+=this.lang.actionCreation:e+=this.lang.actionModification,$j("#ariane")[0].innerHTML=e},t.prototype.prepareActions=function(){$j("#inner_content").remove()},t.prototype.ngOnInit=function(){var t=this;this.prepareActions(),this.loading=!0,this.coreUrl=angularGlobals.coreUrl,this.route.params.subscribe(function(e){void 0===e.id?(t.creationMode=!0,t.http.get(t.coreUrl+"rest/initAction").subscribe(function(e){t.action=e.action,t.categoriesList=e.categoriesList,t.statuses=e.statuses,t.actionPagesList=e.action_pagesList,t.keywordsList=e.keywordsList,t.loading=!1})):(t.creationMode=!1,t.http.get(t.coreUrl+"rest/actions/"+e.id).subscribe(function(e){t.action=e.action,t.categoriesList=e.categoriesList,t.statuses=e.statuses,t.actionPagesList=e.action_pagesList,t.keywordsList=e.keywordsList,t.loading=!1}))}),this.updateBreadcrumb(angularGlobals.applicationName)},t.prototype.onSubmit=function(){var t=this;this.creationMode?this.http.post(this.coreUrl+"rest/actions",this.action).subscribe(function(e){t.router.navigate(["/administration/actions"]),t.notify.success(t.lang.actionAdded)},function(e){t.notify.error(e.error.errors)}):this.http.put(this.coreUrl+"rest/actions/"+this.action.id,this.action).subscribe(function(e){t.router.navigate(["/administration/actions"]),t.notify.success(t.lang.actionUpdated)},function(e){t.notify.error(e.error.errors)})},t=r([o.Component({templateUrl:angularGlobals["action-administrationView"],providers:[u.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,l.ActivatedRoute,l.Router,u.NotificationService])],t)}();n.ActionAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/router":68}],2:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("../translate.component"),c=t("../notification.service"),u=t("@angular/material"),p=function(){function t(t,e,n,r){this.http=n,this.notify=r,this.lang=l.LANG,this.search=null,this.actions=[],this.titles=[],this.loading=!1,this.displayedColumns=["id","label_action","history","is_folder_action","actions"],this.dataSource=new u.MatTableDataSource(this.actions),$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>"+this.lang.administration+"</a> > "+this.lang.actions)},t.prototype.ngOnInit=function(){var t=this;this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.updateBreadcrumb(angularGlobals.applicationName),$j("#inner_content").remove(),this.http.get(this.coreUrl+"rest/actions").subscribe(function(e){t.actions=e.actions,t.loading=!1,setTimeout(function(){t.dataSource=new u.MatTableDataSource(t.actions),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0)},function(t){console.log(t),location.href="index.php"})},t.prototype.deleteAction=function(t){var e=this;confirm(this.lang.confirmAction+" "+this.lang.delete+" « "+t.label_action+" »")&&this.http.delete(this.coreUrl+"rest/actions/"+t.id).subscribe(function(t){e.actions=t.action,e.dataSource=new u.MatTableDataSource(e.actions),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort,e.notify.success(e.lang.actionDeleted)},function(t){e.notify.error(t.error.errors)})},r([o.ViewChild(u.MatPaginator),i("design:type",u.MatPaginator)],t.prototype,"paginator",void 0),r([o.ViewChild(u.MatSort),i("design:type",u.MatSort)],t.prototype,"sort",void 0),t=r([o.Component({templateUrl:angularGlobals["actions-administrationView"],providers:[c.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,c.NotificationService])],t)}();n.ActionsAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64}],3:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(n,"__esModule",{value:!0});var i=t("@angular/core"),o=t("@angular/router"),a=t("./administration.component"),s=t("./users-administration.component"),l=t("./user-administration.component"),c=t("./groups-administration.component"),u=t("./group-administration.component"),p=t("./baskets-administration.component"),d=t("./basket-administration.component"),h=t("./doctypes-administration.component"),f=t("./diffusionModels-administration.component"),m=t("./diffusionModel-administration.component"),g=t("./entities-administration.component"),y=t("./entity-administration.component"),v=t("./statuses-administration.component"),b=t("./status-administration.component"),_=t("./actions-administration.component"),w=t("./action-administration.component"),C=t("./parameter-administration.component"),x=t("./parameters-administration.component"),S=t("./priorities-administration.component"),E=t("./priority-administration.component"),k=t("./reports-administration.component"),O=t("./notifications-administration.component"),P=t("./notification-administration.component"),A=t("./notifications-schedule-administration.component"),D=t("./history-administration.component"),T=t("./historyBatch-administration.component"),M=t("./update-status-administration.component"),I=function(){function t(){}return t=r([i.NgModule({imports:[o.RouterModule.forChild([{path:"administration",component:a.AdministrationComponent},{path:"administration/users",component:s.UsersAdministrationComponent},{path:"administration/users/new",component:l.UserAdministrationComponent},{path:"administration/users/:id",component:l.UserAdministrationComponent},{path:"administration/groups",component:c.GroupsAdministrationComponent},{path:"administration/groups/new",component:u.GroupAdministrationComponent},{path:"administration/groups/:id",component:u.GroupAdministrationComponent},{path:"administration/baskets",component:p.BasketsAdministrationComponent},{path:"administration/baskets/new",component:d.BasketAdministrationComponent},{path:"administration/baskets/:id",component:d.BasketAdministrationComponent},{path:"administration/doctypes",component:h.DoctypesAdministrationComponent},{path:"administration/diffusionModels",component:f.DiffusionModelsAdministrationComponent},{path:"administration/diffusionModels/:id",component:m.DiffusionModelAdministrationComponent},{path:"administration/entities",component:g.EntitiesAdministrationComponent},{path:"administration/entities/new",component:y.EntityAdministrationComponent},{path:"administration/entities/:id",component:y.EntityAdministrationComponent},{path:"administration/statuses",component:v.StatusesAdministrationComponent},{path:"administration/statuses/new",component:b.StatusAdministrationComponent},{path:"administration/statuses/:identifier",component:b.StatusAdministrationComponent},{path:"administration/parameters",component:x.ParametersAdministrationComponent},{path:"administration/parameters/new",component:C.ParameterAdministrationComponent},{path:"administration/parameters/:id",component:C.ParameterAdministrationComponent},{path:"administration/reports",component:k.ReportsAdministrationComponent},{path:"administration/priorities",component:S.PrioritiesAdministrationComponent},{path:"administration/priorities/new",component:E.PriorityAdministrationComponent},{path:"administration/priorities/:id",component:E.PriorityAdministrationComponent},{path:"administration/actions",component:_.ActionsAdministrationComponent},{path:"administration/actions/new",component:w.ActionAdministrationComponent},{path:"administration/actions/:id",component:w.ActionAdministrationComponent},{path:"administration/notifications",component:O.NotificationsAdministrationComponent},{path:"administration/notifications/new",component:P.NotificationAdministrationComponent},{path:"administration/notifications/schedule",component:A.NotificationsScheduleAdministrationComponent},{path:"administration/notifications/:identifier",component:P.NotificationAdministrationComponent},{path:"administration/history",component:D.HistoryAdministrationComponent},{path:"administration/historyBatch",component:T.HistoryBatchAdministrationComponent},{path:"administration/update-status",component:M.UpdateStatusAdministrationComponent}])],exports:[o.RouterModule]})],t)}();n.AdministrationRoutingModule=I},{"./action-administration.component":1,"./actions-administration.component":2,"./administration.component":4,"./basket-administration.component":6,"./baskets-administration.component":7,"./diffusionModel-administration.component":8,"./diffusionModels-administration.component":9,"./doctypes-administration.component":10,"./entities-administration.component":11,"./entity-administration.component":12,"./group-administration.component":13,"./groups-administration.component":14,"./history-administration.component":15,"./historyBatch-administration.component":16,"./notification-administration.component":17,"./notifications-administration.component":18,"./notifications-schedule-administration.component":19,"./parameter-administration.component":20,"./parameters-administration.component":21,"./priorities-administration.component":22,"./priority-administration.component":23,"./reports-administration.component":24,"./status-administration.component":25,"./statuses-administration.component":26,"./update-status-administration.component":27,"./user-administration.component":28,"./users-administration.component":29,"@angular/core":62,"@angular/router":68}],4:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("@angular/router"),c=t("../translate.component"),u=function(){function t(t,e,n,r){this.http=n,this.router=r,this.lang=c.LANG,this.organisationServices=[],this.productionServices=[],this.classementServices=[],this.supervisionServices=[],this.loading=!1,$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.prepareAdministration=function(){$j("#inner_content").remove(),$j("#menunav").hide(),$j("#divList").remove(),$j("#magicContactsTable").remove(),$j("#manageBasketsOrderTable").remove(),$j("#controlParamTechnicTable").remove(),$j("#container").width("99%"),$j("#content h1")[0]&&$j("#content h1")[0]!=$j("my-app h1")[0]&&$j("#content h1")[0].remove()},t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > Administration")},t.prototype.ngOnInit=function(){var t=this;this.prepareAdministration(),this.updateBreadcrumb(angularGlobals.applicationName),this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.http.get(this.coreUrl+"rest/administration").subscribe(function(e){t.organisationServices=e.administrations.organisation,t.productionServices=e.administrations.production,t.classementServices=e.administrations.classement,t.supervisionServices=e.administrations.supervision,t.loading=!1})},t.prototype.goToSpecifiedAdministration=function(t){"true"==t.angular?this.router.navigate([t.servicepage]):window.location.assign(t.servicepage)},t=r([o.Component({templateUrl:angularGlobals.administrationView}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,l.Router])],t)}();n.AdministrationComponent=u},{"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/router":68}],5:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(n,"__esModule",{value:!0});var i=t("@angular/core"),o=t("@angular/common"),a=t("@angular/forms"),s=t("@angular/common/http"),l=t("../app-material.module"),c=t("./administration-routing.module"),u=t("./administration.component"),p=t("./users-administration.component"),d=t("./groups-administration.component"),h=t("./user-administration.component"),f=t("./group-administration.component"),m=t("./baskets-administration.component"),g=t("./basket-administration.component"),y=t("./entities-administration.component"),v=t("./entity-administration.component"),b=t("./diffusionModels-administration.component"),_=t("./diffusionModel-administration.component"),w=t("./doctypes-administration.component"),C=t("./statuses-administration.component"),x=t("./status-administration.component"),S=t("./actions-administration.component"),E=t("./action-administration.component"),k=t("./parameters-administration.component"),O=t("./parameter-administration.component"),P=t("./priorities-administration.component"),A=t("./priority-administration.component"),D=t("./reports-administration.component"),T=t("./history-administration.component"),M=t("./historyBatch-administration.component"),I=t("./update-status-administration.component"),R=t("./notifications-administration.component"),N=t("./notifications-schedule-administration.component"),L=t("./notification-administration.component"),j=function(){function t(){}return t=r([i.NgModule({imports:[o.CommonModule,a.FormsModule,a.ReactiveFormsModule,s.HttpClientModule,l.AppMaterialModule,c.AdministrationRoutingModule],declarations:[u.AdministrationComponent,p.UsersAdministrationComponent,h.UserAdministrationComponent,d.GroupsAdministrationComponent,f.GroupAdministrationComponent,m.BasketsAdministrationComponent,g.BasketAdministrationComponent,w.DoctypesAdministrationComponent,y.EntitiesAdministrationComponent,v.EntityAdministrationComponent,C.StatusesAdministrationComponent,x.StatusAdministrationComponent,S.ActionsAdministrationComponent,E.ActionAdministrationComponent,k.ParametersAdministrationComponent,O.ParameterAdministrationComponent,P.PrioritiesAdministrationComponent,A.PriorityAdministrationComponent,D.ReportsAdministrationComponent,T.HistoryAdministrationComponent,M.HistoryBatchAdministrationComponent,I.UpdateStatusAdministrationComponent,R.NotificationsAdministrationComponent,N.NotificationsScheduleAdministrationComponent,L.NotificationAdministrationComponent,p.UsersAdministrationRedirectModalComponent,y.EntitiesAdministrationRedirectModalComponent,d.GroupsAdministrationRedirectModalComponent,g.BasketAdministrationSettingsModalComponent,g.BasketAdministrationGroupListModalComponent,w.DoctypesAdministrationRedirectModalComponent,b.DiffusionModelsAdministrationComponent,_.DiffusionModelAdministrationComponent],entryComponents:[p.UsersAdministrationRedirectModalComponent,y.EntitiesAdministrationRedirectModalComponent,d.GroupsAdministrationRedirectModalComponent,g.BasketAdministrationSettingsModalComponent,g.BasketAdministrationGroupListModalComponent,w.DoctypesAdministrationRedirectModalComponent]})],t)}();n.AdministrationModule=j},{"../app-material.module":30,"./action-administration.component":1,"./actions-administration.component":2,"./administration-routing.module":3,"./administration.component":4,"./basket-administration.component":6,"./baskets-administration.component":7,"./diffusionModel-administration.component":8,"./diffusionModels-administration.component":9,"./doctypes-administration.component":10,"./entities-administration.component":11,"./entity-administration.component":12,"./group-administration.component":13,"./groups-administration.component":14,"./history-administration.component":15,"./historyBatch-administration.component":16,"./notification-administration.component":17,"./notifications-administration.component":18,"./notifications-schedule-administration.component":19,"./parameter-administration.component":20,"./parameters-administration.component":21,"./priorities-administration.component":22,"./priority-administration.component":23,"./reports-administration.component":24,"./status-administration.component":25,"./statuses-administration.component":26,"./update-status-administration.component":27,"./user-administration.component":28,"./users-administration.component":29,"@angular/common":60,"@angular/common/http":59,"@angular/core":62,"@angular/forms":63}],6:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}};Object.defineProperty(n,"__esModule",{value:!0});var l=t("@angular/core"),c=t("@angular/cdk/layout"),u=t("@angular/common/http"),p=t("@angular/router"),d=t("../translate.component"),h=t("../notification.service"),f=t("@angular/material"),m=t("../../plugins/autocomplete.plugin"),g=function(){function t(t,e,n,r,i,o,a){this.http=n,this.route=r,this.router=i,this.notify=o,this.dialog=a,this.lang=d.LANG,this.config={},this.basket={},this.basketGroups=[],this.allGroups=[],this.actionsList=[],this.resultPages=[],this.loading=!1,this.displayedColumns=["label_action","actions"],$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.updateBreadcrumb=function(t){var e="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>"+this.lang.administration+"</a> > <a onclick='location.hash = \"/administration/baskets\"' style='cursor: pointer'>"+this.lang.baskets+"</a> > ";1==this.creationMode?e+=this.lang.basketCreation:e+=this.lang.basketModification,$j("#ariane")[0].innerHTML=e},t.prototype.ngOnInit=function(){var t=this;this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.route.params.subscribe(function(e){void 0===e.id?(t.creationMode=!0,t.updateBreadcrumb(angularGlobals.applicationName),t.basketIdAvailable=!1,t.loading=!1):(t.creationMode=!1,t.updateBreadcrumb(angularGlobals.applicationName),t.basketIdAvailable=!0,t.id=e.id,t.http.get(t.coreUrl+"rest/baskets/"+t.id).subscribe(function(e){t.basket=e.basket,t.basket.id=e.basket.basket_id,t.basket.name=e.basket.basket_name,t.basket.description=e.basket.basket_desc,t.basket.clause=e.basket.basket_clause,t.basket.isSearchBasket="Y"!=e.basket.is_visible,t.basket.isFolderBasket="Y"==e.basket.is_folder_basket,t.basket.flagNotif="Y"==e.basket.flag_notif,t.http.get(t.coreUrl+"rest/baskets/"+t.id+"/groups").subscribe(function(e){t.allGroups=e.allGroups,t.allGroups.forEach(function(t){t.isUsed=!1,e.groups.forEach(function(e){t.group_id==e.group_id&&(t.isUsed=!0)})}),e.groups.forEach(function(t){t.groupActions.forEach(function(t){t.used_in_basketlist="Y"==t.used_in_basketlist,t.used_in_action_page="Y"==t.used_in_action_page,t.default_action_list="Y"==t.default_action_list})}),t.basketGroups=e.groups,t.resultPages=e.pages,t.loading=!1},function(){location.href="index.php"})},function(){location.href="index.php"}))})},t.prototype.openSettings=function(t,e){var n=this;this.config={data:{group:t,action:e,pages:this.resultPages}},this.dialogRef=this.dialog.open(y,this.config),this.dialogRef.afterClosed().subscribe(function(t){t&&n.http.put(n.coreUrl+"rest/baskets/"+n.id+"/groups/"+t.group.group_id,{result_page:t.group.result_page,groupActions:t.group.groupActions}).subscribe(function(t){n.notify.success(n.lang.basketUpdated)},function(t){n.notify.error(t.error.errors)}),n.dialogRef=null})},t.prototype.isAvailable=function(){var t=this;this.basket.id?this.http.get(this.coreUrl+"rest/baskets/"+this.basket.id).subscribe(function(){t.basketIdAvailable=!1},function(e){t.basketIdAvailable=!1,"Basket not found"==e.error.errors&&(t.basketIdAvailable=!0)}):this.basketIdAvailable=!1},t.prototype.onSubmit=function(){var t=this;this.creationMode?this.http.post(this.coreUrl+"rest/baskets",this.basket).subscribe(function(e){t.notify.success(t.lang.basketAdded),t.router.navigate(["/administration/baskets"])},function(e){t.notify.error(e.error.errors)}):this.http.put(this.coreUrl+"rest/baskets/"+this.id,this.basket).subscribe(function(e){t.notify.success(t.lang.basketUpdated),t.router.navigate(["/administration/baskets"])},function(e){t.notify.error(e.error.errors)})},t.prototype.initAction=function(t){this.dataSource=new f.MatTableDataSource(this.basketGroups[t].groupActions),this.dataSource.sort=this.sort},t.prototype.setDefaultAction=function(t,e){t.groupActions.forEach(function(t){e.id==t.id?t.default_action_list=!0:t.default_action_list=!1}),this.addAction(t)},t.prototype.unlinkGroup=function(t){var e=this;confirm(this.lang.unlinkGroup+" ?")&&this.http.delete(this.coreUrl+"rest/baskets/"+this.id+"/groups/"+this.basketGroups[t].group_id).subscribe(function(n){e.allGroups.forEach(function(n){n.group_id==e.basketGroups[t].group_id&&(n.isUsed=!1)}),e.basketGroups.splice(t,1),e.notify.success(e.lang.basketUpdated)},function(t){e.notify.error(t.error.errors)})},t.prototype.linkGroup=function(){var t=this;this.config={data:{basketId:this.basket.id,groups:this.allGroups,linkedGroups:this.basketGroups}},this.dialogRef=this.dialog.open(v,this.config),this.dialogRef.afterClosed().subscribe(function(e){e&&t.http.post(t.coreUrl+"rest/baskets/"+t.id+"/groups",e).subscribe(function(n){t.basketGroups.push(e),t.allGroups.forEach(function(t){t.group_id==e.group_id&&(t.isUsed=!0)}),t.notify.success(t.lang.basketUpdated)},function(e){t.notify.error(e.error.errors)}),t.dialogRef=null})},t.prototype.addAction=function(t){var e=this;console.log(t),this.http.put(this.coreUrl+"rest/baskets/"+this.id+"/groups/"+t.group_id,{result_page:t.result_page,groupActions:t.groupActions}).subscribe(function(t){e.notify.success(e.lang.basketUpdated)},function(t){e.notify.error(t.error.errors)})},t.prototype.unlinkAction=function(t,e){var n=this;confirm(this.lang.unlinkAction+" ?")&&(e.checked=!1,this.http.put(this.coreUrl+"rest/baskets/"+this.id+"/groups/"+t.group_id,{result_page:t.result_page,groupActions:t.groupActions}).subscribe(function(t){n.notify.success(n.lang.basketUpdated)},function(t){n.notify.error(t.error.errors)}))},o([l.ViewChild(f.MatPaginator),a("design:type",f.MatPaginator)],t.prototype,"paginator",void 0),o([l.ViewChild(f.MatSort),a("design:type",f.MatSort)],t.prototype,"sort",void 0),t=o([l.Component({templateUrl:angularGlobals["basket-administrationView"],providers:[h.NotificationService]}),a("design:paramtypes",[l.ChangeDetectorRef,c.MediaMatcher,u.HttpClient,p.ActivatedRoute,p.Router,h.NotificationService,f.MatDialog])],t)}();n.BasketAdministrationComponent=g;var y=function(t){function e(e,n,r){var i=t.call(this,e,["users"])||this;return i.http=e,i.data=n,i.dialogRef=r,i.lang=d.LANG,i.allEntities=[],i}return i(e,t),e.prototype.ngOnInit=function(){var t=this;this.http.get(this.coreUrl+"rest/entities").subscribe(function(e){[{id:"ALL_ENTITIES",keyword:"ALL_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:"Toutes les entités"},{id:"ENTITIES_JUST_BELOW",keyword:"ENTITIES_JUST_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:"Immédiatement inférieur à mon entité primaire"},{id:"ENTITIES_BELOW",keyword:"ENTITIES_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:"Inférieur à toutes mes entités"},{id:"ALL_ENTITIES_BELOW",keyword:"ALL_ENTITIES_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:"Inférieur à mon entité primaire"},{id:"MY_ENTITIES",keyword:"MY_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:"Mes entités"},{id:"MY_PRIMARY_ENTITY",keyword:"MY_PRIMARY_ENTITY",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:"Mon entité primaire"},{id:"SAME_LEVEL_ENTITIES",keyword:"SAME_LEVEL_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:"Même niveau de mon entité primaire"}].forEach(function(e){t.allEntities.push(e)}),e.entities.forEach(function(e){t.allEntities.push(e)})},function(){location.href="index.php"}),this.http.get(this.coreUrl+"rest/statuses").subscribe(function(e){t.statuses=e.statuses})},e.prototype.initService=function(){var t=this;this.allEntities.forEach(function(e){e.state={opened:!1,selected:!1},t.data.action.redirects.forEach(function(t){e.id==t.keyword&&"ENTITY"==t.redirect_mode&&(e.state={opened:!0,selected:!0})})}),$j("#jstree").jstree({checkbox:{three_state:!1},core:{themes:{name:"proton",responsive:!0},data:this.allEntities},plugins:["checkbox","search"]}),$j("#jstree").on("select_node.jstree",function(e,n){n.node.original.keyword?t.data.action.redirects.push({action_id:t.data.action.id,entity_id:"",keyword:n.node.id,redirect_mode:"ENTITY"}):t.data.action.redirects.push({action_id:t.data.action.id,entity_id:n.node.id,keyword:"",redirect_mode:"ENTITY"})}).on("deselect_node.jstree",function(e,n){t.data.action.redirects.forEach(function(e){if(n.node.original.keyword){if(e.keyword==n.node.original.keyword){var r=t.data.action.redirects.indexOf(e);t.data.action.redirects.splice(r,1)}}else if(e.entity_id==n.node.id){r=t.data.action.redirects.indexOf(e);t.data.action.redirects.splice(r,1)}})}).jstree();var e=!1;$j("#jstree_search").keyup(function(){e&&clearTimeout(e),e=setTimeout(function(){var t=$j("#jstree_search").val();$j("#jstree").jstree(!0).search(t)},250)})},e.prototype.initService2=function(){var t=this;this.allEntities.forEach(function(e){e.state={opened:!1,selected:!1},t.data.action.redirects.forEach(function(t){e.id==t.keyword&&"USERS"==t.redirect_mode&&(e.state={opened:!0,selected:!0})})}),$j("#jstree2").jstree({checkbox:{three_state:!1},core:{themes:{name:"proton",responsive:!0},data:this.allEntities},plugins:["checkbox","search"]}),$j("#jstree2").on("select_node.jstree",function(e,n){n.node.original.keyword?t.data.action.redirects.push({action_id:t.data.action.id,entity_id:"",keyword:n.node.id,redirect_mode:"USERS"}):t.data.action.redirects.push({action_id:t.data.action.id,entity_id:n.node.id,keyword:"",redirect_mode:"USERS"})}).on("deselect_node.jstree",function(e,n){t.data.action.redirects.forEach(function(e){if(n.node.original.keyword){if(e.keyword==n.node.original.keyword){var r=t.data.action.redirects.indexOf(e);t.data.action.redirects.splice(r,1)}}else if(e.entity_id==n.node.id){r=t.data.action.redirects.indexOf(e);t.data.action.redirects.splice(r,1)}})}).jstree();var e=!1;$j("#jstree_search2").keyup(function(){e&&clearTimeout(e),e=setTimeout(function(){var t=$j("#jstree_search2").val();$j("#jstree2").jstree(!0).search(t)},250)})},e=o([l.Component({templateUrl:angularGlobals["basket-administration-settings-modalView"],styles:[".mat-dialog-content{height: 65vh;}"]}),s(1,l.Inject(f.MAT_DIALOG_DATA)),a("design:paramtypes",[u.HttpClient,Object,f.MatDialogRef])],e)}(m.AutoCompletePlugin);n.BasketAdministrationSettingsModalComponent=y;var v=function(){function t(t,e,n){this.http=t,this.data=e,this.dialogRef=n,this.lang=d.LANG,this.actionAll=[],this.newBasketGroup={}}return t.prototype.ngOnInit=function(){var t=this;this.coreUrl=angularGlobals.coreUrl,this.http.get(this.coreUrl+"rest/actions").subscribe(function(e){e.actions.forEach(function(e){e.where_clause="",e.used_in_basketlist=!1,e.default_action_list=!1,e.used_in_action_page=!0,e.statuses=[],e.redirects=[],e.checked=!1,t.actionAll.push(e)})},function(t){location.href="index.php"}),this.data.groups.forEach(function(e){t.data.linkedGroups.forEach(function(n){if(e.group_id==n.group_id){var r=t.data.groups.indexOf(e);t.data.groups.splice(r,1)}})})},t.prototype.validateForm=function(t){0==this.data.linkedGroups.length?(this.newBasketGroup.result_page="list_with_attachments",this.actionAll[0].used_in_action_page=!0,this.actionAll[0].default_action_list=!0,this.actionAll[0].checked=!0,this.newBasketGroup.groupActions=this.actionAll):this.newBasketGroup=JSON.parse(JSON.stringify(this.data.linkedGroups[this.data.linkedGroups.length-1])),this.newBasketGroup.group_id=t.group_id,this.dialogRef.close(this.newBasketGroup)},t=o([l.Component({templateUrl:angularGlobals["basket-administration-groupList-modalView"],styles:[".mat-dialog-content{height: 65vh;}"]}),s(1,l.Inject(f.MAT_DIALOG_DATA)),a("design:paramtypes",[u.HttpClient,Object,f.MatDialogRef])],t)}();n.BasketAdministrationGroupListModalComponent=v},{"../../plugins/autocomplete.plugin":42,"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64,"@angular/router":68}],7:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("../translate.component"),c=t("../notification.service"),u=t("@angular/material"),p=function(){function t(t,e,n,r){this.http=n,this.notify=r,this.lang=l.LANG,this.baskets=[],this.basketsOrder=[],this.loading=!1,this.displayedColumns=["basket_id","basket_name","basket_desc","actions"],$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>Administration</a> > Bannettes")},t.prototype.ngOnInit=function(){var t=this;this.updateBreadcrumb(angularGlobals.applicationName),this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.http.get(this.coreUrl+"rest/baskets").subscribe(function(e){t.baskets=e.baskets,t.loading=!1,setTimeout(function(){t.http.get(t.coreUrl+"rest/sortedBaskets").subscribe(function(e){t.basketsOrder=e.baskets},function(){location.href="index.php"}),t.dataSource=new u.MatTableDataSource(t.baskets),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0)},function(){location.href="index.php"})},t.prototype.delete=function(t){var e=this;confirm(this.lang.confirmAction+" "+this.lang.delete+" « "+t.basket_name+" »")&&this.http.delete(this.coreUrl+"rest/baskets/"+t.basket_id).subscribe(function(t){e.notify.success(e.lang.basketDeleted),e.baskets=t.baskets,e.dataSource=new u.MatTableDataSource(e.baskets),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort},function(t){e.notify.error(t.error.errors)})},t.prototype.updateBasketOrder=function(t){var e=this;this.http.put(this.coreUrl+"rest/sortedBaskets/"+t.basket_id,this.basketsOrder).subscribe(function(t){e.baskets=t.baskets,e.notify.success(e.lang.modificationSaved)},function(t){e.notify.error(t.error.errors)})},r([o.ViewChild("snav2"),i("design:type",u.MatSidenav)],t.prototype,"sidenav",void 0),r([o.ViewChild(u.MatPaginator),i("design:type",u.MatPaginator)],t.prototype,"paginator",void 0),r([o.ViewChild(u.MatSort),i("design:type",u.MatSort)],t.prototype,"sort",void 0),t=r([o.Component({templateUrl:angularGlobals["baskets-administrationView"],providers:[c.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,c.NotificationService])],t)}();n.BasketsAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64}],8:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var s=t("@angular/core"),l=t("@angular/cdk/layout"),c=t("@angular/common/http"),u=t("@angular/router"),p=t("../translate.component"),d=t("../notification.service"),h=t("@angular/material"),f=function(t){function e(e,n,r,i,o,a){var s=t.call(this,r,["users"])||this;return s.http=r,s.route=i,s.router=o,s.notify=a,s.lang=p.LANG,s.diffusionModel={},s.loading=!1,s.displayedColumns=["firstname","lastname"],$j("link[href='merged_css.php']").remove(),s.mobileQuery=n.matchMedia("(max-width: 768px)"),s._mobileQueryListener=function(){return e.detectChanges()},s.mobileQuery.addListener(s._mobileQueryListener),s}return i(e,t),e.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},e.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},e.prototype.updateBreadcrumb=function(t){var e="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>"+this.lang.administration+"</a> > <a onclick='location.hash = \"/administration/groups\"' style='cursor: pointer'>"+this.lang.groups+"</a> > ";1==this.creationMode?e+=this.lang.groupCreation:e+=this.lang.groupModification,$j("#ariane")[0].innerHTML=e},e.prototype.ngOnInit=function(){var t=this;this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.route.params.subscribe(function(e){void 0===e.id?(t.creationMode=!0,t.loading=!1,t.updateBreadcrumb(angularGlobals.applicationName)):(t.creationMode=!1,t.http.get(t.coreUrl+"rest/listTemplates/"+e.id).subscribe(function(e){t.updateBreadcrumb(angularGlobals.applicationName),t.diffusionModel=e.listTemplate,t.diffusionModel.roles=[{id:"avis",label:"avis"}],t.loading=!1,setTimeout(function(){t.dataSource=new h.MatTableDataSource(t.diffusionModel),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0)},function(){location.href="index.php"}))})},o([s.ViewChild(h.MatPaginator),a("design:type",h.MatPaginator)],e.prototype,"paginator",void 0),o([s.ViewChild(h.MatSort),a("design:type",h.MatSort)],e.prototype,"sort",void 0),e=o([s.Component({templateUrl:angularGlobals["diffusionModel-administrationView"],providers:[d.NotificationService]}),a("design:paramtypes",[s.ChangeDetectorRef,l.MediaMatcher,c.HttpClient,u.ActivatedRoute,u.Router,d.NotificationService])],e)}(t("../../plugins/autocomplete.plugin").AutoCompletePlugin);n.DiffusionModelAdministrationComponent=f},{"../../plugins/autocomplete.plugin":42,"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64,"@angular/router":68}],9:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("../translate.component"),c=t("../notification.service"),u=t("@angular/material"),p=function(){function t(t,e,n,r,i){this.http=n,this.notify=r,this.dialog=i,this.config={},this.lang=l.LANG,this.listTemplates=[],this.listTemplatesForAssign=[],this.loading=!1,this.displayedColumns=["title","description","object_type","actions"],this.dataSource=new u.MatTableDataSource(this.listTemplates),$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>Administration</a> > Groupes")},t.prototype.ngOnInit=function(){var t=this;this.updateBreadcrumb(angularGlobals.applicationName),this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.http.get(this.coreUrl+"rest/listTemplates").subscribe(function(e){t.listTemplates=e.listTemplates,t.loading=!1,setTimeout(function(){t.dataSource=new u.MatTableDataSource(t.listTemplates),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0)},function(){location.href="index.php"})},t.prototype.delete=function(t){var e=this;this.http.delete(this.coreUrl+"rest/listTemplates/"+t.id).subscribe(function(t){setTimeout(function(){e.listTemplates=t.listTemplates,e.dataSource=new u.MatTableDataSource(e.listTemplates),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort},0),e.notify.success(e.lang.groupDeleted)},function(t){e.notify.error(t.error.errors)})},r([o.ViewChild(u.MatPaginator),i("design:type",u.MatPaginator)],t.prototype,"paginator",void 0),r([o.ViewChild(u.MatSort),i("design:type",u.MatSort)],t.prototype,"sort",void 0),t=r([o.Component({templateUrl:angularGlobals["diffusionModels-administrationView"],providers:[c.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,c.NotificationService,u.MatDialog])],t)}();n.DiffusionModelsAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64}],10:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}};Object.defineProperty(n,"__esModule",{value:!0});var a=t("@angular/core"),s=t("@angular/cdk/layout"),l=t("@angular/common/http"),c=t("../translate.component"),u=t("../notification.service"),p=t("@angular/material"),d=function(){function t(t,e,n,r,i){this.http=n,this.notify=r,this.dialog=i,this.config={},this.lang=c.LANG,this.doctypes=[],this.currentType=!1,this.currentSecondLevel=!1,this.currentFirstLevel=!1,this.firstLevels=!1,this.folderTypes=!1,this.types=!1,this.secondLevels=!1,this.processModes=!1,this.models=!1,this.loading=!1,this.creationMode=!1,this.newSecondLevel=!1,this.displayedColumns=["label","use","mandatory","column"],this.dataSource=new p.MatTableDataSource(this.currentType.indexes),$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>Administration</a> > Typologie documentaire")},t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.ngOnInit=function(){var t=this;this.updateBreadcrumb(angularGlobals.applicationName),this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.http.get(this.coreUrl+"rest/doctypes").subscribe(function(e){t.doctypes=e.structure,setTimeout(function(){$j("#jstree").jstree({checkbox:{three_state:!1},core:{themes:{name:"proton",responsive:!0},data:t.doctypes,check_callback:!0},plugins:["search","dnd","contextmenu"]});var e=!1;$j("#jstree_search").keyup(function(){e&&clearTimeout(e),e=setTimeout(function(){var t=$j("#jstree_search").val();$j("#jstree").jstree(!0).search(t)},250)}),$j("#jstree").on("select_node.jstree",function(e,n){t.loadDoctype(n,!1)}).on("move_node.jstree",function(e,n){t.loadDoctype(n,!0)}).jstree()},0),$j("#jstree").jstree("select_node",t.doctypes[0]),t.loading=!1},function(){location.href="index.php"})},t.prototype.loadDoctype=function(t,e){var n=this;this.creationMode=!1,t.node.original.type_id?(this.currentFirstLevel=!1,this.currentSecondLevel=!1,this.http.get(this.coreUrl+"rest/doctypes/types/"+t.node.original.type_id).subscribe(function(r){n.currentType=r.doctype,n.secondLevels=r.secondLevel,n.processModes=r.processModes,n.models=r.models,n.loadIndexesTable(),e&&(n.currentType?(n.newSecondLevel=t.parent.replace("secondlevel_",""),!isNaN(parseFloat(n.newSecondLevel))&&isFinite(n.newSecondLevel)?n.currentType.doctypes_second_level_id!=n.newSecondLevel&&(n.currentType.doctypes_second_level_id=n.newSecondLevel,n.saveType()):alert(n.lang.cantMoveDoctype)):alert(n.lang.noDoctypeSelected))},function(t){n.notify.error(t.error.errors)})):t.node.original.doctypes_second_level_id?(this.currentFirstLevel=!1,this.currentType=!1,this.http.get(this.coreUrl+"rest/doctypes/secondLevel/"+t.node.original.doctypes_second_level_id).subscribe(function(t){n.currentSecondLevel=t.secondLevel,n.firstLevels=t.firstLevel},function(t){n.notify.error(t.error.errors)})):(this.currentSecondLevel=!1,this.currentType=!1,this.http.get(this.coreUrl+"rest/doctypes/firstLevel/"+t.node.original.doctypes_first_level_id).subscribe(function(t){n.currentFirstLevel=t.firstLevel,n.folderTypes=t.folderTypes},function(t){n.notify.error(t.error.errors)}))},t.prototype.loadIndexesTable=function(){this.dataSource=new p.MatTableDataSource(this.currentType.indexes),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort},t.prototype.resetDatas=function(){this.currentFirstLevel=!1,this.currentSecondLevel=!1,this.currentType=!1},t.prototype.refreshTree=function(){$j("#jstree").jstree(!0).settings.core.data=this.doctypes,$j("#jstree").jstree("refresh")},t.prototype.saveFirstLevel=function(){var t=this;this.creationMode?this.http.post(this.coreUrl+"rest/doctypes/firstLevel",this.currentFirstLevel).subscribe(function(e){t.resetDatas(),t.readMode(),t.doctypes=e.doctypeTree,t.refreshTree(),t.notify.success(t.lang.firstLevelAdded)},function(e){t.notify.error(e.error.errors)}):this.http.put(this.coreUrl+"rest/doctypes/firstLevel/"+this.currentFirstLevel.doctypes_first_level_id,this.currentFirstLevel).subscribe(function(e){t.doctypes=e.doctypeTree,t.refreshTree(),t.notify.success(t.lang.firstLevelUpdated)},function(e){t.notify.error(e.error.errors)})},t.prototype.saveSecondLevel=function(){var t=this;this.creationMode?this.http.post(this.coreUrl+"rest/doctypes/secondLevel",this.currentSecondLevel).subscribe(function(e){t.resetDatas(),t.readMode(),t.doctypes=e.doctypeTree,t.refreshTree(),t.notify.success(t.lang.secondLevelAdded)},function(e){t.notify.error(e.error.errors)}):this.http.put(this.coreUrl+"rest/doctypes/secondLevel/"+this.currentSecondLevel.doctypes_second_level_id,this.currentSecondLevel).subscribe(function(e){t.doctypes=e.doctypeTree,t.refreshTree(),t.notify.success(t.lang.secondLevelUpdated)},function(e){t.notify.error(e.error.errors)})},t.prototype.saveType=function(){var t=this;this.creationMode?this.http.post(this.coreUrl+"rest/doctypes/types",this.currentType).subscribe(function(e){t.resetDatas(),t.readMode(),t.doctypes=e.doctypeTree,t.refreshTree(),t.notify.success(t.lang.documentTypeAdded)},function(e){t.notify.error(e.error.errors)}):this.http.put(this.coreUrl+"rest/doctypes/types/"+this.currentType.type_id,this.currentType).subscribe(function(e){t.doctypes=e.doctypeTree,t.refreshTree(),t.notify.success(t.lang.documentTypeUpdated)},function(e){t.notify.error(e.error.errors)})},t.prototype.readMode=function(){this.creationMode=!1,$j("#jstree").jstree("deselect_all"),$j("#jstree").jstree("select_node",this.doctypes[0])},t.prototype.removeFirstLevel=function(){var t=this;confirm(this.lang.confirmAction+" "+this.lang.delete+" « "+this.currentFirstLevel.doctypes_first_level_label+" »")&&this.http.delete(this.coreUrl+"rest/doctypes/firstLevel/"+this.currentFirstLevel.doctypes_first_level_id).subscribe(function(e){t.resetDatas(),t.readMode(),t.doctypes=e.doctypeTree,t.refreshTree(),$j("#jstree").jstree("select_node",t.doctypes[0]),t.notify.success(t.lang.firstLevelDeleted)},function(e){t.notify.error(e.error.errors)})},t.prototype.removeSecondLevel=function(){var t=this;confirm(this.lang.confirmAction+" "+this.lang.delete+" « "+this.currentSecondLevel.doctypes_second_level_label+" »")&&this.http.delete(this.coreUrl+"rest/doctypes/secondLevel/"+this.currentSecondLevel.doctypes_second_level_id).subscribe(function(e){t.resetDatas(),t.readMode(),t.doctypes=e.doctypeTree,t.refreshTree(),$j("#jstree").jstree("select_node",t.doctypes[0]),t.notify.success(t.lang.secondLevelDeleted)},function(e){t.notify.error(e.error.errors)})},t.prototype.removeType=function(){var t=this;confirm(this.lang.confirmAction+" "+this.lang.delete+" « "+this.currentType.description+" »")&&this.http.delete(this.coreUrl+"rest/doctypes/types/"+this.currentType.type_id).subscribe(function(e){0==e.deleted?(t.resetDatas(),t.readMode(),t.doctypes=e.doctypeTree,t.refreshTree(),$j("#jstree").jstree("select_node",t.doctypes[0]),t.notify.success(t.lang.documentTypeDeleted)):(t.config={data:{count:e.deleted,types:e.doctypes}},t.dialogRef=t.dialog.open(h,t.config),t.dialogRef.afterClosed().subscribe(function(e){e&&t.http.put(t.coreUrl+"rest/doctypes/types/"+t.currentType.type_id+"/redirect",e).subscribe(function(e){t.resetDatas(),t.readMode(),t.doctypes=e.doctypeTree,t.refreshTree(),$j("#jstree").jstree("select_node",t.doctypes[0]),t.notify.success(t.lang.documentTypeDeleted)},function(e){t.notify.error(e.error.errors)}),t.dialogRef=null}))},function(e){t.notify.error(e.error.errors)})},t.prototype.prepareDoctypeAdd=function(){var t=this;this.currentFirstLevel={},this.currentSecondLevel={},this.currentType={},$j("#jstree").jstree("deselect_all"),this.http.get(this.coreUrl+"rest/administration/doctypes/new").subscribe(function(e){t.folderTypes=e.folderTypes,t.firstLevels=e.firstLevel,t.secondLevels=e.secondLevel,t.processModes=e.processModes,t.models=e.models,t.currentType.indexes=e.indexes,t.loadIndexesTable()},function(e){t.notify.error(e.error.errors)}),this.creationMode=!0},t.prototype.selectIndexesUse=function(t,e){this.currentType.indexes[e].use=t.checked},t.prototype.selectIndexesMandatory=function(t,e){this.currentType.indexes[e].mandatory=t.checked},r([a.ViewChild(p.MatPaginator),i("design:type",p.MatPaginator)],t.prototype,"paginator",void 0),r([a.ViewChild(p.MatSort),i("design:type",p.MatSort)],t.prototype,"sort",void 0),t=r([a.Component({templateUrl:angularGlobals["doctypes-administrationView"],providers:[u.NotificationService]}),i("design:paramtypes",[a.ChangeDetectorRef,s.MediaMatcher,l.HttpClient,u.NotificationService,p.MatDialog])],t)}();n.DoctypesAdministrationComponent=d;var h=function(){function t(t,e,n){this.http=t,this.data=e,this.dialogRef=n,this.lang=c.LANG}return t=r([a.Component({templateUrl:angularGlobals["doctypes-administration-redirect-modalView"]}),o(1,a.Inject(p.MAT_DIALOG_DATA)),i("design:paramtypes",[l.HttpClient,Object,p.MatDialogRef])],t)}();n.DoctypesAdministrationRedirectModalComponent=h},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64}],11:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}};Object.defineProperty(n,"__esModule",{value:!0});var l=t("@angular/core"),c=t("@angular/cdk/layout"),u=t("@angular/common/http"),p=t("../translate.component"),d=t("../notification.service"),h=t("@angular/material"),f=t("../../plugins/autocomplete.plugin"),m=function(t){function e(e,n,r,i,o){var a=t.call(this,r,["usersAndEntities","visaUsers"])||this;return a.http=r,a.notify=i,a.dialog=o,a.lang=p.LANG,a.isDraggable=!0,a.entities=[],a.currentEntity={},a.config={},a.loading=!1,a.creationMode=!1,a.displayedColumns=["firstname","lastname"],a.dataSource=new h.MatTableDataSource(a.currentEntity.users),$j("link[href='merged_css.php']").remove(),a.mobileQuery=n.matchMedia("(max-width: 768px)"),a._mobileQueryListener=function(){return e.detectChanges()},a.mobileQuery.addListener(a._mobileQueryListener),a}return i(e,t),e.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},e.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>Administration</a> > Entités")},e.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},e.prototype.ngOnInit=function(){var t=this;this.updateBreadcrumb(angularGlobals.applicationName),this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.http.get(this.coreUrl+"rest/entityTypes").subscribe(function(e){t.entityTypeList=e.types},function(e){t.notify.error(e.error.errors)}),this.http.get(this.coreUrl+"rest/entities").subscribe(function(e){t.entities=e.entities,setTimeout(function(){$j("#jstree").jstree({checkbox:{deselect_all:!0,three_state:!1},core:{themes:{name:"proton",responsive:!0},multiple:!1,data:t.entities,check_callback:function(t,e,n,r,i){if("move_node"==t)return!!n.original.allowed}},dnd:{is_draggable:function(t){for(var e=0,n=t.length;e<n;e++)if(!t[e].original.allowed)return!1;return!0}},plugins:["checkbox","search","dnd","sort"]}),$j("#jstree").jstree("select_node",t.entities[0]);var e=!1;$j("#jstree_search").keyup(function(){e&&clearTimeout(e),e=setTimeout(function(){var t=$j("#jstree_search").val();$j("#jstree").jstree(!0).search(t)},250)}),$j("#jstree").on("select_node.jstree",function(e,n){0==t.sidenav.opened&&t.sidenav.open(),1==t.creationMode?t.currentEntity.parent_entity_id=n.node.id:t.loadEntity(n.node.id)}).on("deselect_node.jstree",function(e,n){t.sidenav.close()}).on("move_node.jstree",function(e,n){t.currentEntity.parent_entity_id!=t.currentEntity.entity_id&&(t.currentEntity.parent_entity_id=n.parent),t.moveEntity()}).jstree(),$j(document).on("dnd_start.vakata",function(t,e){$j("#jstree").jstree("deselect_all"),$j("#jstree").jstree("select_node",e.data.nodes[0])})},0),t.loading=!1},function(){location.href="index.php"})},e.prototype.loadEntity=function(t){var e=this;this.http.get(this.coreUrl+"rest/entities/"+t+"/details").subscribe(function(t){e.currentEntity=t.entity,e.currentEntity.visaTemplate[0]&&(e.idCircuitVisa=e.currentEntity.visaTemplate[0].id),e.dataSource=new h.MatTableDataSource(e.currentEntity.users),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort},function(t){e.notify.error(t.error.errors)})},e.prototype.addElemListModel=function(t){var e=this,n={object_id:this.currentEntity.entity_id,object_type:"entity_id",title:this.currentEntity.entity_id,description:this.currentEntity.entity_id,items:Array()},r=!1,i={};if(this.currentEntity.roles.forEach(function(i){1==i.available&&e.currentEntity.listTemplate[i.id]&&e.currentEntity.listTemplate[i.id].forEach(function(e){n.items.push({item_type:e.item_type,item_mode:i.id,item_id:e.item_id,sequence:e.sequence}),e.item_id==t.id&&(r=!0)})}),!r){if(0==this.currentEntity.listTemplate.dest.length&&"user"==t.type)i={item_type:"user_id",item_id:t.id,labelToDisplay:t.idToDisplay,descriptionToDisplay:t.otherInfo,item_mode:"dest",sequence:0},this.currentEntity.listTemplate.dest.unshift(i),n.items.push({item_type:"user_id",item_mode:"dest",item_id:i.item_id,sequence:i.sequence});else{i={item_type:"user"==t.type?"user_id":"entity_id",item_id:t.id,labelToDisplay:t.idToDisplay,descriptionToDisplay:t.otherInfo,item_mode:"cc",sequence:0},this.currentEntity.listTemplate.cc.unshift(i),n.items.push({item_type:i.item_type,item_mode:"cc",item_id:i.item_id,sequence:0})}this.currentEntity.listTemplate.id?this.http.put(this.coreUrl+"rest/listTemplates/"+this.currentEntity.listTemplate.id,n).subscribe(function(t){e.currentEntity.listTemplate.id=t.id,e.notify.success(e.lang.entityUpdated)},function(t){e.notify.error(t.error.errors)}):this.http.post(this.coreUrl+"rest/listTemplates",n).subscribe(function(t){e.currentEntity.listTemplate.id=t.id,e.notify.success(e.lang.entityUpdated)},function(t){e.notify.error(t.error.errors)})}this.elementCtrl.setValue("")},e.prototype.addElemListModelVisa=function(t){var e=this,n={object_id:this.currentEntity.entity_id,object_type:"VISA_CIRCUIT",title:this.currentEntity.entity_id,description:this.currentEntity.entity_id,items:Array()},r={id:"",item_type:"user_id",item_mode:"sign",item_id:t.id,sequence:this.currentEntity.visaTemplate.length,idToDisplay:t.idToDisplay,descriptionToDisplay:t.otherInfo};this.currentEntity.visaTemplate.forEach(function(t,e){t.sequence=e,t.item_mode="visa",n.items.push({id:t.id,item_id:t.item_id,item_type:"user_id",item_mode:t.item_mode,sequence:t.sequence})}),n.items.push(r),this.currentEntity.visaTemplate.length>0?this.http.put(this.coreUrl+"rest/listTemplates/"+this.idCircuitVisa,n).subscribe(function(t){e.idCircuitVisa=t.id,e.currentEntity.visaTemplate.push(r),e.notify.success(e.lang.entityUpdated)},function(t){e.notify.error(t.error.errors)}):this.http.post(this.coreUrl+"rest/listTemplates",n).subscribe(function(t){e.idCircuitVisa=t.id,e.currentEntity.visaTemplate.push(r),e.notify.success(e.lang.entityUpdated)},function(t){e.notify.error(t.error.errors)}),this.userCtrl.setValue("")},e.prototype.saveEntity=function(){var t=this;"#"==this.currentEntity.parent_entity_id&&(this.currentEntity.parent_entity_id=""),this.creationMode?this.http.post(this.coreUrl+"rest/entities",this.currentEntity).subscribe(function(e){t.entities=e.entities,$j("#jstree").jstree(!0).settings.core.data=t.entities,$j("#jstree").jstree("refresh"),t.notify.success(t.lang.entityAdded),t.creationMode=!1},function(e){t.notify.error(e.error.errors)}):this.http.put(this.coreUrl+"rest/entities/"+this.currentEntity.entity_id,this.currentEntity).subscribe(function(e){t.entities=e.entities,$j("#jstree").jstree(!0).settings.core.data=t.entities,$j("#jstree").jstree("refresh"),t.notify.success(t.lang.entityUpdated)},function(e){t.notify.error(e.error.errors)})},e.prototype.moveEntity=function(){var t=this;this.http.put(this.coreUrl+"rest/entities/"+this.currentEntity.entity_id,this.currentEntity).subscribe(function(e){t.notify.success(t.lang.entityUpdated)},function(e){t.notify.error(e.error.errors)})},e.prototype.readMode=function(){this.creationMode=!1,this.isDraggable=!0,$j("#jstree").jstree("deselect_all");for(var t=0;t<this.entities.length;t++)if(1==this.entities[t].allowed){$j("#jstree").jstree("select_node",this.entities[t]);break}},e.prototype.removeEntity=function(){var t=this;this.currentEntity.documents>0||this.currentEntity.redirects>0||this.currentEntity.instances>0||this.currentEntity.users.length>0?(this.config={data:{entity:this.currentEntity}},this.dialogRef=this.dialog.open(g,this.config),this.dialogRef.afterClosed().subscribe(function(e){console.log(e),e&&t.http.put(t.coreUrl+"rest/entities/"+e.entity_id+"/reassign/"+e.redirectEntity,{}).subscribe(function(e){t.entities=e.entities,$j("#jstree").jstree(!0).settings.core.data=t.entities,$j("#jstree").jstree("refresh"),t.notify.success(t.lang.entityDeleted);for(var n=0;n<t.entities.length;n++)if(1==t.entities[n].allowed){$j("#jstree").jstree("select_node",t.entities[n]);break}},function(e){t.notify.error(e.error.errors)}),t.dialogRef=null})):confirm(this.lang.confirmAction+" "+this.lang.delete+" « "+this.currentEntity.entity_label+" »")&&this.http.delete(this.coreUrl+"rest/entities/"+this.currentEntity.entity_id).subscribe(function(e){t.entities=e.entities,$j("#jstree").jstree(!0).settings.core.data=t.entities,$j("#jstree").jstree("refresh"),t.notify.success(t.lang.entityDeleted);for(var n=0;n<t.entities.length;n++)if(1==t.entities[n].allowed){$j("#jstree").jstree("select_node",t.entities[n]);break}},function(e){t.notify.error(e.error.errors)})},e.prototype.prepareEntityAdd=function(){this.creationMode=!0,this.isDraggable=!1,this.currentEntity={entity_type:this.entityTypeList[0].id},$j("#jstree").jstree("deselect_all");for(var t=0;t<this.entities.length;t++)if(1==this.entities[t].allowed){$j("#jstree").jstree("select_node",this.entities[t]);break}},e.prototype.updateStatus=function(t,e){var n=this;this.http.put(this.coreUrl+"rest/entities/"+t.entity_id+"/status",{method:e}).subscribe(function(t){n.notify.success("")},function(t){n.notify.error(t.error.errors)})},e.prototype.updateDiffList=function(t,e){var n=this,r={object_id:this.currentEntity.entity_id,object_type:"entity_id",title:this.currentEntity.entity_id,description:this.currentEntity.entity_id,items:Array()};"dest"==e&&this.currentEntity.listTemplate.dest.length>0&&(this.currentEntity.listTemplate.dest.forEach(function(e){e.item_id!=t.item_id&&n.currentEntity.listTemplate.cc.push(e)}),this.currentEntity.listTemplate.dest=[t]),this.currentEntity.roles.forEach(function(t){1==t.available&&n.currentEntity.listTemplate[t.id]&&n.currentEntity.listTemplate[t.id].forEach(function(e){r.items.push({item_id:e.item_id,item_type:e.item_type,item_mode:t.id,sequence:e.sequence})})}),this.currentEntity.listTemplate.id?this.http.put(this.coreUrl+"rest/listTemplates/"+this.currentEntity.listTemplate.id,r).subscribe(function(t){n.currentEntity.listTemplate.id=t.id,n.notify.success(n.lang.entityUpdated)},function(t){n.notify.error(t.error.errors)}):this.http.post(this.coreUrl+"rest/listTemplates",r).subscribe(function(t){n.currentEntity.listTemplate.id=t.id,n.notify.success(n.lang.entityUpdated)},function(t){n.notify.error(t.error.errors)})},e.prototype.updateDiffListVisa=function(t){var e=this,n={object_id:this.currentEntity.entity_id,object_type:"VISA_CIRCUIT",title:this.currentEntity.entity_id,description:this.currentEntity.entity_id,items:Array()};this.currentEntity.visaTemplate.forEach(function(t,r){t.sequence=r,r==e.currentEntity.visaTemplate.length-1?t.item_mode="sign":t.item_mode="visa",n.items.push({id:t.id,item_id:t.item_id,item_type:"user_id",item_mode:t.item_mode,sequence:t.sequence})}),this.http.put(this.coreUrl+"rest/listTemplates/"+this.idCircuitVisa,n).subscribe(function(t){e.idCircuitVisa=t.id,e.notify.success(e.lang.entityUpdated)},function(t){e.notify.error(t.error.errors)})},e.prototype.removeDiffList=function(t,e){var n=this;this.currentEntity.listTemplate[e].splice(t,1);var r={object_id:this.currentEntity.entity_id,object_type:"entity_id",title:this.currentEntity.entity_id,description:this.currentEntity.entity_id,items:Array()};this.currentEntity.roles.forEach(function(t){1==t.available&&n.currentEntity.listTemplate[t.id]&&n.currentEntity.listTemplate[t.id].forEach(function(e){r.items.push({item_id:e.item_id,item_type:e.item_type,item_mode:t.id,sequence:e.sequence})})}),this.http.put(this.coreUrl+"rest/listTemplates/"+this.currentEntity.listTemplate.id,r).subscribe(function(t){n.currentEntity.listTemplate.id=t.id,n.notify.success(n.lang.entityUpdated)},function(t){n.notify.error(t.error.errors)})},e.prototype.removeDiffListVisa=function(t,e){var n=this;if(this.currentEntity.visaTemplate.splice(e,1),this.currentEntity.visaTemplate.length>0){var r={object_id:this.currentEntity.entity_id,object_type:"VISA_CIRCUIT",title:this.currentEntity.entity_id,description:this.currentEntity.entity_id,items:Array()};this.currentEntity.visaTemplate.forEach(function(t,e){t.sequence=e,e==n.currentEntity.visaTemplate.length-1?t.item_mode="sign":t.item_mode="visa",r.items.push({item_id:t.item_id,item_type:"user_id",item_mode:t.item_mode,sequence:t.sequence})}),this.http.put(this.coreUrl+"rest/listTemplates/"+this.idCircuitVisa,r).subscribe(function(t){n.idCircuitVisa=t.id,n.notify.success(n.lang.entityUpdated)},function(t){n.notify.error(t.error.errors)})}else this.http.delete(this.coreUrl+"rest/listTemplates/"+this.idCircuitVisa).subscribe(function(t){n.idCircuitVisa=null,n.notify.success(n.lang.entityUpdated)},function(t){n.notify.error(t.error.errors)})},o([l.ViewChild("snav2"),a("design:type",h.MatSidenav)],e.prototype,"sidenav",void 0),o([l.ViewChild(h.MatPaginator),a("design:type",h.MatPaginator)],e.prototype,"paginator",void 0),o([l.ViewChild(h.MatSort),a("design:type",h.MatSort)],e.prototype,"sort",void 0),e=o([l.Component({templateUrl:angularGlobals["entities-administrationView"],providers:[d.NotificationService]}),a("design:paramtypes",[l.ChangeDetectorRef,c.MediaMatcher,u.HttpClient,d.NotificationService,h.MatDialog])],e)}(f.AutoCompletePlugin);n.EntitiesAdministrationComponent=m;var g=function(t){function e(e,n,r){var i=t.call(this,e,["entities"])||this;return i.http=e,i.data=n,i.dialogRef=r,i.lang=p.LANG,i}return i(e,t),e=o([l.Component({templateUrl:angularGlobals["entities-administration-redirect-modalView"]}),s(1,l.Inject(h.MAT_DIALOG_DATA)),a("design:paramtypes",[u.HttpClient,Object,h.MatDialogRef])],e)}(f.AutoCompletePlugin);n.EntitiesAdministrationRedirectModalComponent=g},{"../../plugins/autocomplete.plugin":42,"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64}],12:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/common/http"),s=t("@angular/router"),l=t("../translate.component"),c=t("../notification.service"),u=function(){function t(t,e,n,r){this.http=t,this.route=e,this.router=n,this.notify=r,this.lang=l.LANG,this.entity={},this.loading=!1}return t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>Administration</a> > <a onclick='location.hash = \"/administration/entities\"' style='cursor: pointer'>Entités</a>")},t.prototype.ngOnInit=function(){var t=this;this.updateBreadcrumb(angularGlobals.applicationName),this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.route.params.subscribe(function(e){void 0===e.id?(t.creationMode=!0,t.entityIdAvailable=!1,t.loading=!1):(t.creationMode=!1,t.entityIdAvailable=!0,t.id=e.id,t.http.get(t.coreUrl+"rest/entities/"+t.id+"/details").subscribe(function(e){t.entity=e.basket,t.loading=!1},function(){location.href="index.php"}))})},t.prototype.isAvailable=function(){var t=this;this.entity.id?this.http.get(this.coreUrl+"rest/entities/"+this.entity.id).subscribe(function(){t.entityIdAvailable=!1},function(e){t.entityIdAvailable=!1,"Entity not found"==e.error.errors&&(t.entityIdAvailable=!0)}):this.entityIdAvailable=!1},t.prototype.onSubmit=function(){var t=this;this.creationMode?this.http.post(this.coreUrl+"rest/entities",this.entity).subscribe(function(e){t.notify.success(t.lang.entityAdded),t.router.navigate(["/administration/entities"])},function(e){t.notify.error(e.error.errors)}):this.http.put(this.coreUrl+"rest/entities/"+this.id,this.entity).subscribe(function(e){t.notify.success(t.lang.entityUpdated),t.router.navigate(["/administration/entities"])},function(e){t.notify.error(e.error.errors)})},t=r([o.Component({templateUrl:angularGlobals["entity-administrationView"],providers:[c.NotificationService]}),i("design:paramtypes",[a.HttpClient,s.ActivatedRoute,s.Router,c.NotificationService])],t)}();n.EntityAdministrationComponent=u},{"../notification.service":35,"../translate.component":38,"@angular/common/http":59,"@angular/core":62,"@angular/router":68}],13:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("@angular/router"),c=t("../translate.component"),u=t("../notification.service"),p=t("@angular/material"),d=function(){function t(t,e,n,r,i,o){this.http=n,this.route=r,this.router=i,this.notify=o,this.lang=c.LANG,this.group={security:{}},this.loading=!1,this.displayedColumns=["firstname","lastname"],$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.updateBreadcrumb=function(t){var e="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>"+this.lang.administration+"</a> > <a onclick='location.hash = \"/administration/groups\"' style='cursor: pointer'>"+this.lang.groups+"</a> > ";1==this.creationMode?e+=this.lang.groupCreation:e+=this.lang.groupModification,$j("#ariane")[0].innerHTML=e},t.prototype.ngOnInit=function(){var t=this;this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.route.params.subscribe(function(e){void 0===e.id?(t.creationMode=!0,t.loading=!1,t.updateBreadcrumb(angularGlobals.applicationName)):(t.creationMode=!1,t.http.get(t.coreUrl+"rest/groups/"+e.id+"/details").subscribe(function(e){t.updateBreadcrumb(angularGlobals.applicationName),t.group=e.group,t.loading=!1,setTimeout(function(){t.dataSource=new p.MatTableDataSource(t.group.users),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0)},function(){location.href="index.php"}))})},t.prototype.onSubmit=function(){var t=this;this.creationMode?this.http.post(this.coreUrl+"rest/groups",this.group).subscribe(function(e){t.notify.success(t.lang.groupAdded),t.router.navigate(["/administration/groups/"+e.group])},function(e){t.notify.error(e.error.errors)}):this.http.put(this.coreUrl+"rest/groups/"+this.group.id,{description:this.group.group_desc,security:this.group.security}).subscribe(function(e){t.notify.success(t.lang.groupUpdated)},function(e){t.notify.error(e.error.errors)})},t.prototype.updateService=function(t){var e=this;this.http.put(this.coreUrl+"rest/groups/"+this.group.id+"/services/"+t.id,t).subscribe(function(t){e.notify.success(e.lang.groupUpdated)},function(n){t.checked=!t.checked,e.notify.error(n.error.errors)})},r([o.ViewChild(p.MatPaginator),i("design:type",p.MatPaginator)],t.prototype,"paginator",void 0),r([o.ViewChild(p.MatSort),i("design:type",p.MatSort)],t.prototype,"sort",void 0),t=r([o.Component({templateUrl:angularGlobals["group-administrationView"],providers:[u.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,l.ActivatedRoute,l.Router,u.NotificationService])],t)}();n.GroupAdministrationComponent=d},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64,"@angular/router":68}],14:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}};Object.defineProperty(n,"__esModule",{value:!0});var a=t("@angular/core"),s=t("@angular/cdk/layout"),l=t("@angular/common/http"),c=t("../translate.component"),u=t("../notification.service"),p=t("@angular/material"),d=function(){function t(t,e,n,r,i){this.http=n,this.notify=r,this.dialog=i,this.config={},this.lang=c.LANG,this.groups=[],this.groupsForAssign=[],this.loading=!1,this.displayedColumns=["group_id","group_desc","actions"],this.dataSource=new p.MatTableDataSource(this.groups),$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>Administration</a> > Groupes")},t.prototype.ngOnInit=function(){var t=this;this.updateBreadcrumb(angularGlobals.applicationName),this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.http.get(this.coreUrl+"rest/groups").subscribe(function(e){t.groups=e.groups,t.loading=!1,setTimeout(function(){t.dataSource=new p.MatTableDataSource(t.groups),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0)},function(){location.href="index.php"})},t.prototype.preDelete=function(t){var e=this;0==t.users.length?confirm("Etes vous sûr de vouloir supprimer ce groupe ?")&&this.deleteGroup(t):(this.groupsForAssign=[],this.groups.forEach(function(n){t.group_id!=n.group_id&&e.groupsForAssign.push(n)}),this.config={data:{id:t.id,group_desc:t.group_desc,groupsForAssign:this.groupsForAssign,users:t.users}},this.dialogRef=this.dialog.open(h,this.config),this.dialogRef.afterClosed().subscribe(function(n){n&&("_NO_REPLACEMENT"==n?e.deleteGroup(t):e.http.put(e.coreUrl+"rest/groups/"+t.id+"/reassign/"+n,{}).subscribe(function(n){e.deleteGroup(t)},function(t){e.notify.error(t.error.errors)})),e.dialogRef=null}))},t.prototype.deleteGroup=function(t){var e=this;this.http.delete(this.coreUrl+"rest/groups/"+t.id).subscribe(function(t){setTimeout(function(){e.groups=t.groups,e.dataSource=new p.MatTableDataSource(e.groups),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort},0),e.notify.success(e.lang.groupDeleted)},function(t){e.notify.error(t.error.errors)})},r([a.ViewChild(p.MatPaginator),i("design:type",p.MatPaginator)],t.prototype,"paginator",void 0),r([a.ViewChild(p.MatSort),i("design:type",p.MatSort)],t.prototype,"sort",void 0),t=r([a.Component({templateUrl:angularGlobals["groups-administrationView"],providers:[u.NotificationService]}),i("design:paramtypes",[a.ChangeDetectorRef,s.MediaMatcher,l.HttpClient,u.NotificationService,p.MatDialog])],t)}();n.GroupsAdministrationComponent=d;var h=function(){function t(t,e,n){this.http=t,this.data=e,this.dialogRef=n,this.lang=c.LANG}return t=r([a.Component({templateUrl:angularGlobals["groups-administration-redirect-modalView"]}),o(1,a.Inject(p.MAT_DIALOG_DATA)),i("design:paramtypes",[l.HttpClient,Object,p.MatDialogRef])],t)}();n.GroupsAdministrationRedirectModalComponent=h},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64}],15:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("../translate.component"),c=t("../notification.service"),u=t("@angular/material"),p=function(){function t(t,e,n,r){this.http=n,this.notify=r,this.lang=l.LANG,this.loading=!1,this.data=[],this.CurrentYear=(new Date).getFullYear(),this.currentMonth=(new Date).getMonth()+1,this.minDate=new Date,this.displayedColumns=["event_date","event_type","user_id","info","remote_ip"],this.dataSource=new u.MatTableDataSource(this.data),$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>"+this.lang.administration+"</a> > "+this.lang.history)},t.prototype.ngOnInit=function(){var t=this;this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.updateBreadcrumb(angularGlobals.applicationName),$j("#inner_content").remove(),this.minDate=new Date(this.CurrentYear+"-"+this.currentMonth+"-01"),this.http.get(this.coreUrl+"rest/administration/history/eventDate/"+this.minDate.toJSON()).subscribe(function(e){t.data=e.historyList,t.loading=!1,setTimeout(function(){t.dataSource=new u.MatTableDataSource(t.data),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0)},function(t){console.log(t),location.href="index.php"})},t.prototype.refreshHistory=function(t){var e=this;this.http.get(this.coreUrl+"rest/administration/history/eventDate/"+this.minDate.toJSON()).subscribe(function(t){e.data=t.historyList,e.dataSource=new u.MatTableDataSource(e.data),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort},function(t){console.log(t),location.href="index.php"})},r([o.ViewChild(u.MatPaginator),i("design:type",u.MatPaginator)],t.prototype,"paginator",void 0),r([o.ViewChild(u.MatSort),i("design:type",u.MatSort)],t.prototype,"sort",void 0),t=r([o.Component({templateUrl:angularGlobals["history-administrationView"],styleUrls:[],providers:[c.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,c.NotificationService])],t)}();n.HistoryAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64}],16:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("../translate.component"),c=t("../notification.service"),u=t("@angular/material"),p=function(){function t(t,e,n,r){this.http=n,this.notify=r,this.lang=l.LANG,this.loading=!1,this.data=[],this.CurrentYear=(new Date).getFullYear(),this.currentMonth=(new Date).getMonth()+1,this.minDate=new Date,this.displayedColumns=["batch_id","event_date","total_processed","total_errors","info","module_name"],this.dataSource=new u.MatTableDataSource(this.data),$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>"+this.lang.administration+"</a> > "+this.lang.historyBatch)},t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.ngOnInit=function(){var t=this;this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.updateBreadcrumb(angularGlobals.applicationName),$j("#inner_content").remove(),this.minDate=new Date(this.CurrentYear+"-"+this.currentMonth+"-01"),this.http.get(this.coreUrl+"rest/administration/historyBatch/eventDate/"+this.minDate.toJSON()).subscribe(function(e){t.data=e.historyList,t.loading=!1,setTimeout(function(){t.dataSource=new u.MatTableDataSource(t.data),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0)},function(t){console.log(t),location.href="index.php"})},t.prototype.refreshHistory=function(){var t=this;this.http.get(this.coreUrl+"rest/administration/historyBatch/eventDate/"+this.minDate.toJSON()).subscribe(function(e){t.data=e.historyList,t.dataSource=new u.MatTableDataSource(t.data),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},function(t){console.log(t),location.href="index.php"})},r([o.ViewChild(u.MatPaginator),i("design:type",u.MatPaginator)],t.prototype,"paginator",void 0),r([o.ViewChild(u.MatSort),i("design:type",u.MatSort)],t.prototype,"sort",void 0),t=r([o.Component({templateUrl:angularGlobals["historyBatch-administrationView"],styleUrls:[],providers:[c.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,c.NotificationService])],t)}();n.HistoryBatchAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64}],17:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("@angular/router"),c=t("../translate.component"),u=t("../notification.service"),p=function(){function t(t,e,n,r,i,o){this.http=n,this.route=r,this.router=i,this.notify=o,this.notification={diffusionType_label:null},this.loading=!1,this.lang=c.LANG,$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.updateBreadcrumb=function(t){var e="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>"+this.lang.administration+"</a> > <a onclick='location.hash = \"/administration/notifications\"' style='cursor: pointer'>"+this.lang.notifications+"</a> > ";1==this.creationMode?e+=this.lang.notificationCreation:e+=this.lang.notificationModification,$j("#ariane")[0].innerHTML=e},t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.ngOnInit=function(){var t=this;this.loading=!0,this.coreUrl=angularGlobals.coreUrl,this.route.params.subscribe(function(e){void 0===e.identifier?(t.creationMode=!0,t.http.get(t.coreUrl+"rest/administration/notifications/new").subscribe(function(e){t.notification=e.notification,t.loading=!1},function(e){t.notify.error(e.error.errors)})):(t.creationMode=!1,t.http.get(t.coreUrl+"rest/notifications/"+e.identifier).subscribe(function(e){t.notification=e.notification,t.loading=!1},function(e){t.notify.error(e.error.errors)}))}),this.updateBreadcrumb(angularGlobals.applicationName)},t.prototype.createScript=function(){var t=this;this.http.post(this.coreUrl+"rest/scriptNotification",this.notification).subscribe(function(e){t.notification.scriptcreated=e,t.notify.success(t.lang.ScriptCreated)},function(e){t.notify.error(e.error.errors)})},t.prototype.selectAll=function(t){var e=t.target.getAttribute("data-target");$j("#"+e+" option").prop("selected",!0),$j("#"+e).trigger("chosen:updated")},t.prototype.unselectAll=function(t){var e=t.target.getAttribute("data-target");$j("#"+e+" option").prop("selected",!1),$j("#"+e).trigger("chosen:updated")},t.prototype.onSubmit=function(){var t=this;$j("#groupslist").val()?this.notification.diffusion_properties=$j("#groupslist").val():$j("#entitieslist").val()?this.notification.diffusion_properties=$j("#entitieslist").val():$j("#statuseslist").val()?this.notification.diffusion_properties=$j("#statuseslist").val():$j("#userslist").val()&&(this.notification.diffusion_properties=$j("#userslist").val()),null==$j("#joinDocJd").val()?this.notification.attachfor_properties="":$j("#groupslistJd").val()?this.notification.attachfor_properties=$j("#groupslistJd").val():$j("#entitieslistJd").val()?this.notification.attachfor_properties=$j("#entitieslistJd").val():$j("#statuseslistJd").val()?this.notification.attachfor_properties=$j("#statuseslistJd").val():$j("#userslistJd").val()&&(this.notification.attachfor_properties=$j("#userslistJd").val()),this.creationMode?this.http.post(this.coreUrl+"rest/notifications",this.notification).subscribe(function(e){t.router.navigate(["/administration/notifications"]),t.notify.success(t.lang.NotificationAdded)},function(e){t.notify.error(e.error.errors)}):this.http.put(this.coreUrl+"rest/notifications/"+this.notification.notification_sid,this.notification).subscribe(function(e){t.router.navigate(["/administration/notifications"]),t.notify.success(t.lang.notificationUpdated)},function(e){t.notify.error(e.error.errors)})},t=r([o.Component({templateUrl:angularGlobals["notification-administrationView"],providers:[u.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,l.ActivatedRoute,l.Router,u.NotificationService])],t)}();n.NotificationAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/router":68}],18:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("../translate.component"),c=t("../notification.service"),u=t("@angular/material"),p=function(){function t(t,e,n,r){this.http=n,this.notify=r,this.notifications=[],this.loading=!1,this.lang=l.LANG,this.displayedColumns=["notification_id","description","is_enabled","notifications"],this.dataSource=new u.MatTableDataSource(this.notifications),$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.ngOnInit=function(){var t=this;this.updateBreadcrumb(angularGlobals.applicationName),this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.http.get(this.coreUrl+"rest/notifications").subscribe(function(e){t.notifications=e.notifications,t.loading=!1,setTimeout(function(){t.dataSource=new u.MatTableDataSource(t.notifications),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0)},function(e){t.notify.error(e.error.errors)})},t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>"+this.lang.administration+"</a> > "+this.lang.notifications)},t.prototype.deleteNotification=function(t){var e=this;confirm(this.lang.deleteMsg)&&this.http.delete(this.coreUrl+"rest/notifications/"+t.notification_sid).subscribe(function(t){e.notifications=t.notifications,setTimeout(function(){e.dataSource=new u.MatTableDataSource(e.notifications),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort},0),e.notify.success(e.lang.notificationDeleted)},function(t){e.notify.error(t.error.errors)})},r([o.ViewChild(u.MatPaginator),i("design:type",u.MatPaginator)],t.prototype,"paginator",void 0),r([o.ViewChild(u.MatSort),i("design:type",u.MatSort)],t.prototype,"sort",void 0),t=r([o.Component({templateUrl:angularGlobals["notifications-administrationView"],providers:[c.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,c.NotificationService])],t)}();n.NotificationsAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64}],19:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("@angular/router"),c=t("../translate.component"),u=t("../notification.service"),p=function(){function t(t,e,n,r,i){this.http=n,this.router=r,this.notify=i,this.crontab=[],this.authorizedNotification=[],this.loading=!1,this.lang=c.LANG,$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.ngOnInit=function(){var t=this;this.updateBreadcrumb(angularGlobals.applicationName),this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.http.get(this.coreUrl+"rest/notifications/schedule").subscribe(function(e){t.crontab=e.crontab,t.authorizedNotification=e.authorizedNotification,t.loading=!1},function(e){t.notify.error(e.error.errors)})},t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>"+this.lang.administration+"</a> > <a onclick='location.hash = \"/administration/notifications\"' style='cursor: pointer'>"+this.lang.notifications+"</a> > "+this.lang.notificationsSchedule)},t.prototype.onSubmit=function(){var t=this;this.http.post(this.coreUrl+"rest/notifications/schedule",this.crontab).subscribe(function(e){t.router.navigate(["/administration/notifications"]),t.notify.success(t.lang.NotificationScheduleUpdated)},function(e){t.notify.error(e.error.errors)})},t=r([o.Component({templateUrl:angularGlobals["notifications-schedule-administrationView"],providers:[u.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,l.Router,u.NotificationService])],t)}();n.NotificationsScheduleAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/router":68}],20:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("@angular/router"),c=t("../translate.component"),u=t("../notification.service"),p=function(){function t(t,e,n,r,i,o){this.http=n,this.route=r,this.router=i,this.notify=o,this.lang=c.LANG,this.parameter={},this.loading=!1,$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.updateBreadcrumb=function(t){var e="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>"+this.lang.administration+"</a> > <a onclick='location.hash = \"/administration/parameters\"' style='cursor: pointer'>"+this.lang.parameters+"</a> > ";1==this.creationMode?e+=this.lang.parameterCreation:e+=this.lang.parameterModification,$j("#ariane")[0].innerHTML=e},t.prototype.ngOnInit=function(){var t=this;this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.route.params.subscribe(function(e){void 0===e.id?(t.creationMode=!0,t.updateBreadcrumb(angularGlobals.applicationName),t.loading=!1):(t.creationMode=!1,t.http.get(t.coreUrl+"rest/parameters/"+e.id).subscribe(function(e){t.parameter=e.parameter,t.updateBreadcrumb(angularGlobals.applicationName),t.parameter.param_value_int?t.type="int":t.parameter.param_value_date?t.type="date":t.type="string",t.loading=!1},function(){location.href="index.php"}))})},t.prototype.onSubmit=function(){var t=this;"date"==this.type?(this.parameter.param_value_int=null,this.parameter.param_value_string=null):"int"==this.type?(this.parameter.param_value_date=null,this.parameter.param_value_string=null):"string"==this.type&&(this.parameter.param_value_date=null,this.parameter.param_value_int=null),1==this.creationMode?this.http.post(this.coreUrl+"rest/parameters",this.parameter).subscribe(function(e){t.router.navigate(["administration/parameters"]),t.notify.success(t.lang.parameterAdded)},function(e){t.notify.error(e.error.errors)}):0==this.creationMode&&this.http.put(this.coreUrl+"rest/parameters/"+this.parameter.id,this.parameter).subscribe(function(e){t.router.navigate(["administration/parameters"]),t.notify.success(t.lang.parameterUpdated)},function(e){t.notify.error(e.error.errors)})},t=r([o.Component({templateUrl:angularGlobals["parameter-administrationView"],providers:[u.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,l.ActivatedRoute,l.Router,u.NotificationService])],t)}();n.ParameterAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/router":68}],21:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("../translate.component"),c=t("../notification.service"),u=t("@angular/material"),p=function(){function t(t,e,n,r){this.http=n,this.notify=r,this.lang=l.LANG,this.parameters={},this.loading=!1,this.displayedColumns=["id","description","value","actions"],$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>"+this.lang.administration+"</a> > "+this.lang.parameters)},t.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},t.prototype.ngOnInit=function(){var t=this;this.updateBreadcrumb(angularGlobals.applicationName),this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.http.get(this.coreUrl+"rest/parameters").subscribe(function(e){t.parameters=e.parameters,setTimeout(function(){t.dataSource=new u.MatTableDataSource(t.parameters),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0),t.loading=!1})},t.prototype.deleteParameter=function(t){var e=this;confirm(this.lang.deleteMsg)&&this.http.delete(this.coreUrl+"rest/parameters/"+t).subscribe(function(t){e.parameters=t.parameters,e.dataSource=new u.MatTableDataSource(e.parameters),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort,e.notify.success(e.lang.parameterDeleted)},function(t){e.notify.error(t.error.errors)})},r([o.ViewChild(u.MatPaginator),i("design:type",u.MatPaginator)],t.prototype,"paginator",void 0),r([o.ViewChild(u.MatSort),i("design:type",u.MatSort)],t.prototype,"sort",void 0),t=r([o.Component({templateUrl:angularGlobals["parameters-administrationView"],providers:[c.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,c.NotificationService])],t)}();n.ParametersAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64}],22:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("../translate.component"),c=t("../notification.service"),u=t("@angular/material"),p=function(){function t(t,e,n,r){this.http=n,this.notify=r,this.lang=l.LANG,this.loading=!1,this.priorities=[],this.displayedColumns=["label","delays","working_days","default_priority","actions"],$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.ngOnInit=function(){var t=this;this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.http.get(this.coreUrl+"rest/priorities").subscribe(function(e){t.priorities=e.priorities,t.loading=!1,setTimeout(function(){t.dataSource=new u.MatTableDataSource(t.priorities),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0)},function(){location.href="index.php"})},t.prototype.deletePriority=function(t){var e=this;confirm(this.lang.deleteMsg)&&this.http.delete(this.coreUrl+"rest/priorities/"+t).subscribe(function(t){e.priorities=t.priorities,e.dataSource=new u.MatTableDataSource(e.priorities),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort,e.notify.success(e.lang.priorityDeleted)},function(t){e.notify.error(t.error.errors)})},r([o.ViewChild(u.MatPaginator),i("design:type",u.MatPaginator)],t.prototype,"paginator",void 0),r([o.ViewChild(u.MatSort),i("design:type",u.MatSort)],t.prototype,"sort",void 0),t=r([o.Component({templateUrl:angularGlobals["priorities-administrationView"],providers:[c.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,c.NotificationService])],t)}();n.PrioritiesAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64}],23:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("@angular/router"),c=t("../translate.component"),u=t("../notification.service"),p=function(){function t(t,e,n,r,i,o){this.http=n,this.route=r,this.router=i,this.notify=o,this.lang=c.LANG,this.loading=!1,this.priority={useDoctypeDelay:!1,color:"#135f7f",delays:"0",working_days:"false",default_priority:!1},$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.ngOnInit=function(){var t=this;this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.route.params.subscribe(function(e){void 0===e.id?(t.creationMode=!0,t.loading=!1):(t.creationMode=!1,t.id=e.id,t.http.get(t.coreUrl+"rest/priorities/"+t.id).subscribe(function(e){t.priority=e.priority,t.priority.useDoctypeDelay=null!=t.priority.delays,!0===t.priority.working_days?t.priority.working_days="true":t.priority.working_days="false",t.loading=!1},function(){location.href="index.php"}))})},t.prototype.onSubmit=function(){var t=this;0==this.priority.useDoctypeDelay&&(this.priority.delays=null),this.priority.working_days="true"==this.priority.working_days,this.creationMode?this.http.post(this.coreUrl+"rest/priorities",this.priority).subscribe(function(){t.notify.success(t.lang.priorityAdded),t.router.navigate(["/administration/priorities"])},function(e){t.notify.error(e.error.errors)}):this.http.put(this.coreUrl+"rest/priorities/"+this.id,this.priority).subscribe(function(){t.notify.success(t.lang.priorityUpdated),t.router.navigate(["/administration/priorities"])},function(e){t.notify.error(e.error.errors)})},t=r([o.Component({templateUrl:angularGlobals["priority-administrationView"],providers:[u.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,l.ActivatedRoute,l.Router,u.NotificationService])],t)}();n.PriorityAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/router":68}],24:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("../translate.component"),c=t("../notification.service"),u=function(){function t(t,e,n,r){this.http=n,this.notify=r,this.lang=l.LANG,this.groups=[],this.reports=[],this.selectedGroup="",this.loading=!1,this.loadingOptions=!1,$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>Administration</a> > "+this.lang.reports)},t.prototype.ngOnInit=function(){var t=this;this.updateBreadcrumb(angularGlobals.applicationName),this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.http.get(this.coreUrl+"rest/reports/groups").subscribe(function(e){t.groups=e.groups,t.loadReports(0),t.loading=!1},function(){location.href="index.php"})},t.prototype.loadReports=function(t){var e=this;this.selectedGroup=this.groups[t].group_id,this.loadingOptions=!0,this.http.get(this.coreUrl+"rest/reports/groups/"+this.groups[t].group_id).subscribe(function(t){e.reports=t.reports,e.loadingOptions=!1},function(t){e.notify.error(t.error.errors)})},t.prototype.saveReport=function(){var t=this;this.http.put(this.coreUrl+"rest/reports/groups/"+this.selectedGroup,this.reports).subscribe(function(){t.notify.success(t.lang.modificationSaved)},function(e){t.notify.error(e.error.errors)})},t=r([o.Component({templateUrl:angularGlobals["reports-administrationView"],providers:[c.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,c.NotificationService])],t)}();n.ReportsAdministrationComponent=u},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62}],25:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("@angular/router"),c=t("../translate.component"),u=t("../notification.service"),p=function(){function t(t,e,n,r,i,o){this.http=n,this.route=r,this.router=i,this.notify=o,this.lang=c.LANG,this.status={id:null,label_status:null,can_be_searched:null,can_be_modified:null,is_folder_status:null,img_filename:null},this.statusImages="",this.loading=!1,$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.ngOnInit=function(){var t=this;this.loading=!0,this.coreUrl=angularGlobals.coreUrl,this.prepareStatus(),this.route.params.subscribe(function(e){void 0===e.identifier?(t.http.get(t.coreUrl+"rest/administration/statuses/new").subscribe(function(e){t.status.img_filename="fm-letter",t.status.can_be_searched=!0,t.status.can_be_modified=!0,t.statusImages=e.statusImages,t.creationMode=!0,t.loading=!1}),t.statusIdAvailable=!1):(t.creationMode=!1,t.statusIdentifier=e.identifier,t.getStatusInfos(t.statusIdentifier),t.statusIdAvailable=!0,t.loading=!1),t.updateBreadcrumb(angularGlobals.applicationName)})},t.prototype.prepareStatus=function(){$j("#inner_content").remove()},t.prototype.updateBreadcrumb=function(t){var e="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>"+this.lang.administration+"</a> > <a onclick='location.hash = \"/administration/statuses\"' style='cursor: pointer'>"+this.lang.statuses+"</a> > ";1==this.creationMode?e+=this.lang.statusCreation:e+=this.lang.statusModification,$j("#ariane")[0].innerHTML=e},t.prototype.getStatusInfos=function(t){var e=this;this.http.get(this.coreUrl+"rest/statuses/"+t).subscribe(function(t){e.status=t.status[0],"Y"==e.status.can_be_searched?e.status.can_be_searched=!0:e.status.can_be_searched=!1,"Y"==e.status.can_be_modified?e.status.can_be_modified=!0:e.status.can_be_modified=!1,"Y"==e.status.is_folder_status?e.status.is_folder_status=!0:e.status.is_folder_status=!1,e.statusImages=t.statusImages},function(t){e.notify.error(t.error.errors)})},t.prototype.isAvailable=function(){var t=this;this.status.id?this.http.get(this.coreUrl+"rest/status/"+this.status.id).subscribe(function(){t.statusIdAvailable=!1},function(e){t.statusIdAvailable=!1,"id not found"==e.error.errors&&(t.statusIdAvailable=!0)}):this.statusIdAvailable=!1},t.prototype.submitStatus=function(){var t=this;1==this.creationMode?this.http.post(this.coreUrl+"rest/statuses",this.status).subscribe(function(e){t.notify.success(t.lang.statusAdded),t.router.navigate(["administration/statuses"])},function(e){t.notify.error(e.error.errors)}):0==this.creationMode&&this.http.put(this.coreUrl+"rest/statuses/"+this.statusIdentifier,this.status).subscribe(function(e){t.notify.success(t.lang.statusUpdated),t.router.navigate(["administration/statuses"])},function(e){t.notify.error(e.error.errors)})},t=r([o.Component({templateUrl:angularGlobals["status-administrationView"],styleUrls:["css/status-administration.component.css"],providers:[u.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,l.ActivatedRoute,l.Router,u.NotificationService])],t)}();n.StatusAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/router":68}],26:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/cdk/layout"),s=t("@angular/common/http"),l=t("../translate.component"),c=t("../notification.service"),u=t("@angular/material"),p=function(){function t(t,e,n,r){this.http=n,this.notify=r,this.lang=l.LANG,this.statuses=[],this.loading=!1,this.displayedColumns=["img_filename","id","label_status","identifier"],this.dataSource=new u.MatTableDataSource(this.statuses),$j("link[href='merged_css.php']").remove(),this.mobileQuery=e.matchMedia("(max-width: 768px)"),this._mobileQueryListener=function(){return t.detectChanges()},this.mobileQuery.addListener(this._mobileQueryListener)}return t.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},t.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},t.prototype.ngOnInit=function(){var t=this;this.coreUrl=angularGlobals.coreUrl,this.prepareStatus(),this.loading=!0,this.http.get(this.coreUrl+"rest/statuses").subscribe(function(e){t.statuses=e.statuses,t.updateBreadcrumb(angularGlobals.applicationName),t.loading=!1,setTimeout(function(){t.dataSource=new u.MatTableDataSource(t.statuses),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0)},function(e){t.notify.error(e.error.errors)})},t.prototype.prepareStatus=function(){$j("#inner_content").remove()},t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>"+this.lang.administration+"</a> > "+this.lang.statuses},t.prototype.deleteStatus=function(t){var e=this;confirm(this.lang.confirmAction+" "+this.lang.delete+" « "+t.id+" »")&&this.http.delete(this.coreUrl+"rest/statuses/"+t.identifier).subscribe(function(t){e.statuses=t.statuses,e.dataSource=new u.MatTableDataSource(e.statuses),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort,e.notify.success(e.lang.statusDeleted)},function(t){e.notify.error(t.error.errors)})},r([o.ViewChild(u.MatPaginator),i("design:type",u.MatPaginator)],t.prototype,"paginator",void 0),r([o.ViewChild(u.MatSort),i("design:type",u.MatSort)],t.prototype,"sort",void 0),t=r([o.Component({templateUrl:angularGlobals["statuses-administrationView"],styleUrls:[],providers:[c.NotificationService]}),i("design:paramtypes",[o.ChangeDetectorRef,a.MediaMatcher,s.HttpClient,c.NotificationService])],t)}();n.StatusesAdministrationComponent=p},{"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64}],27:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var s=t("@angular/core"),l=t("@angular/cdk/layout"),c=t("@angular/common/http"),u=t("../translate.component"),p=t("../notification.service"),d=function(t){function e(e,n,r,i){var o=t.call(this,r,["statuses"])||this;return o.http=r,o.notify=i,o.lang=u.LANG,o.statuses=[],o.statusId="",o.resId="",o.chrono="",o.loading=!1,$j("link[href='merged_css.php']").remove(),o.mobileQuery=n.matchMedia("(max-width: 768px)"),o._mobileQueryListener=function(){return e.detectChanges()},o.mobileQuery.addListener(o._mobileQueryListener),o}return i(e,t),e.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},e.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > <a onclick='location.hash = \"/administration\"' style='cursor: pointer'>Administration</a> > Changement du statut")},e.prototype.ngOnInit=function(){this.loading=!0,this.updateBreadcrumb(angularGlobals.applicationName),this.coreUrl=angularGlobals.coreUrl,this.loading=!1},e.prototype.onSubmit=function(){var t=this,e={status:this.statusId};""!=this.resId?e.resId=this.resId:""!=this.chrono&&(e.chrono=this.chrono),this.http.put(this.coreUrl+"rest/res/resource/status",e).subscribe(function(){t.resId="",t.chrono="",t.statusId="",t.notify.success(t.lang.modificationSaved)},function(e){t.notify.error(e.error.errors)})},e.prototype.resetInput=function(t){0==t.index?this.resId="":this.chrono=""},e=o([s.Component({templateUrl:angularGlobals["update-status-administrationView"],providers:[p.NotificationService]}),a("design:paramtypes",[s.ChangeDetectorRef,l.MediaMatcher,c.HttpClient,p.NotificationService])],e)}(t("../../plugins/autocomplete.plugin").AutoCompletePlugin);n.UpdateStatusAdministrationComponent=d},{"../../plugins/autocomplete.plugin":42,"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62}],28:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var s=t("@angular/core"),l=t("@angular/cdk/layout"),c=t("@angular/common/http"),u=t("@angular/router"),p=t("../translate.component"),d=t("../notification.service"),h=t("@angular/material"),f=function(t){function e(e,n,r,i,o,a,s){var l=t.call(this,r,["users"])||this;return l.http=r,l.route=i,l.router=o,l.zone=a,l.notify=s,l.lang=p.LANG,l._search="",l.user={},l.signatureModel={base64:"",base64ForJs:"",name:"",type:"",size:0,label:""},l.userAbsenceModel=[],l.userList=[],l.selectedSignature=-1,l.selectedSignatureLabel="",l.data=[],l.CurrentYear=(new Date).getFullYear(),l.currentMonth=(new Date).getMonth()+1,l.minDate=new Date,l.loading=!1,l.displayedColumns=["event_date","event_type","info","remote_ip"],l.dataSource=new h.MatTableDataSource(l.data),$j("link[href='merged_css.php']").remove(),l.mobileQuery=n.matchMedia("(max-width: 768px)"),l._mobileQueryListener=function(){return e.detectChanges()},l.mobileQuery.addListener(l._mobileQueryListener),window.angularUserAdministrationComponent={componentAfterUpload:function(t){return l.processAfterUpload(t)}},l}return i(e,t),e.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},e.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},e.prototype.ngOnInit=function(){var t=this;this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.route.params.subscribe(function(e){void 0===e.id?(t.creationMode=!0,t.loading=!1):(t.creationMode=!1,t.serialId=e.id,t.http.get(t.coreUrl+"rest/users/"+t.serialId+"/details").subscribe(function(e){t.user=e,t.data=e.history,t.userId=e.user_id,t.minDate=new Date(t.CurrentYear+"-"+t.currentMonth+"-01"),t.loading=!1,setTimeout(function(){t.dataSource=new h.MatTableDataSource(t.data),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0)},function(){location.href="index.php"}))})},e.prototype.toogleRedirect=function(t){$j("#redirectUser_"+t.group_id+"_"+t.basket_id).toggle(),this.http.get(this.coreUrl+"rest/users").subscribe(function(t){},function(){location.href="index.php"})},e.prototype.initService=function(){var t=this;if(0==$j(".jstree-container-ul").length){$j("#jstree").jstree({checkbox:{three_state:!1},core:{themes:{name:"proton",responsive:!0},data:this.user.allEntities},plugins:["checkbox","search"]}),$j("#jstree").on("select_node.jstree",function(e,n){t.addEntity(n.node.id)}).on("deselect_node.jstree",function(e,n){t.deleteEntity(n.node.id)}).jstree();var e=!1;$j("#jstree_search").keyup(function(){e&&clearTimeout(e),e=setTimeout(function(){var t=$j("#jstree_search").val();$j("#jstree").jstree(!0).search(t)},250)})}},e.prototype.processAfterUpload=function(t){var e=this;this.zone.run(function(){return e.resfreshUpload(t)})},e.prototype.resfreshUpload=function(t){this.signatureModel.size<=2e6?(this.signatureModel.base64=t.replace(/^data:.*?;base64,/,""),this.signatureModel.base64ForJs=t):(this.signatureModel.name="",this.signatureModel.size=0,this.signatureModel.type="",this.signatureModel.base64="",this.signatureModel.base64ForJs="",this.notify.error("Taille maximum de fichier dépassée (2 MB)"))},e.prototype.clickOnUploader=function(t){$j("#"+t).click()},e.prototype.uploadSignatureTrigger=function(t){var e=this;if(t.target.files&&t.target.files[0]){var n=new FileReader;this.signatureModel.name=t.target.files[0].name,this.signatureModel.size=t.target.files[0].size,this.signatureModel.type=t.target.files[0].type,""==this.signatureModel.label&&(this.signatureModel.label=this.signatureModel.name),n.readAsDataURL(t.target.files[0]),n.onload=function(t){window.angularUserAdministrationComponent.componentAfterUpload(t.target.result),e.submitSignature()}}},e.prototype.displaySignatureEditionForm=function(t){this.selectedSignature=t,this.selectedSignatureLabel=this.user.signatures[t].signature_label},e.prototype.resetPassword=function(t){var e=this;confirm(this.lang.confirmAction+" "+this.lang.resetPsw)&&this.http.put(this.coreUrl+"rest/users/"+this.serialId+"/password",{}).subscribe(function(t){e.notify.success(e.lang.pswReseted)},function(t){e.notify.error(t.error.errors)})},e.prototype.toggleGroup=function(t){var e=this;if(1==$j("#"+t.group_id+"-input").is(":checked")){var n={groupId:t.group_id,role:t.role};this.http.post(this.coreUrl+"rest/users/"+this.serialId+"/groups",n).subscribe(function(t){e.user.groups=t.groups,e.user.allGroups=t.allGroups,e.user.baskets=t.baskets,e.notify.success(e.lang.groupAdded)},function(t){e.notify.error(t.error.errors)})}else this.http.delete(this.coreUrl+"rest/users/"+this.serialId+"/groups/"+t.group_id).subscribe(function(t){e.user.groups=t.groups,e.user.allGroups=t.allGroups,e.notify.success(e.lang.groupDeleted)},function(t){e.notify.error(t.error.errors)})},e.prototype.updateGroup=function(t){var e=this;this.http.put(this.coreUrl+"rest/users/"+this.serialId+"/groups/"+t.group_id,t).subscribe(function(t){e.notify.success(e.lang.groupUpdated)},function(t){e.notify.error(t.error.errors)})},e.prototype.addEntity=function(t){var e=this,n={entityId:t,role:""};this.http.post(this.coreUrl+"rest/users/"+this.serialId+"/entities",n).subscribe(function(t){e.user.entities=t.entities,e.user.allEntities=t.allEntities,e.notify.success(e.lang.entityAdded)},function(t){e.notify.error(t.error.errors)})},e.prototype.updateEntity=function(t){var e=this;this.http.put(this.coreUrl+"rest/users/"+this.serialId+"/entities/"+t.entity_id,t).subscribe(function(t){e.notify.success(e.lang.entityUpdated)},function(t){e.notify.error(t.error.errors)})},e.prototype.updatePrimaryEntity=function(t){var e=this;this.http.put(this.coreUrl+"rest/users/"+this.serialId+"/entities/"+t.entity_id+"/primaryEntity",{}).subscribe(function(n){e.user.entities=n.entities,e.notify.success(e.lang.entityTooglePrimary+" « "+t.entity_id+" »")},function(t){e.notify.error(t.error.errors)})},e.prototype.deleteEntity=function(t){var e=this;this.http.delete(this.coreUrl+"rest/users/"+this.serialId+"/entities/"+t).subscribe(function(t){e.user.entities=t.entities,e.user.allEntities=t.allEntities,e.notify.success(e.lang.entityDeleted)},function(t){e.notify.error(t.error.errors)})},e.prototype.submitSignature=function(){var t=this;this.http.post(this.coreUrl+"rest/users/"+this.serialId+"/signatures",this.signatureModel).subscribe(function(e){t.user.signatures=e.signatures,t.notify.success(t.lang.signAdded),t.signatureModel={base64:"",base64ForJs:"",name:"",type:"",size:0,label:""}},function(e){t.notify.error(e.error.errors)})},e.prototype.updateSignature=function(t){var e=this,n=this.user.signatures[t].id,r=this.user.signatures[t].signature_label;this.http.put(this.coreUrl+"rest/users/"+this.serialId+"/signatures/"+n,{label:r}).subscribe(function(n){e.user.signatures[t].signature_label=n.signature.signature_label,e.notify.success(e.lang.signUpdated)},function(t){e.notify.error(t.error.errors)})},e.prototype.deleteSignature=function(t){var e=this;confirm(this.lang.confirmAction+" "+this.lang.delete+" « "+t.signature_label+" »")&&this.http.delete(this.coreUrl+"rest/users/"+this.serialId+"/signatures/"+t.id).subscribe(function(t){e.user.signatures=t.signatures,e.notify.success(e.lang.signDeleted)},function(t){e.notify.error(t.error.errors)})},e.prototype.test=function(t){var e=this;if(t.mouseEvent.dataTransfer.files&&t.mouseEvent.dataTransfer.files[0]){var n=new FileReader;this.signatureModel.name=t.mouseEvent.dataTransfer.files[0].name,this.signatureModel.size=t.mouseEvent.dataTransfer.files[0].size,this.signatureModel.type=t.mouseEvent.dataTransfer.files[0].type,""==this.signatureModel.label&&(this.signatureModel.label=this.signatureModel.name),n.readAsDataURL(t.mouseEvent.dataTransfer.files[0]),n.onload=function(t){window.angularUserAdministrationComponent.componentAfterUpload(t.target.result),e.submitSignature()}}},e.prototype.addBasketRedirection=function(t,e){if("ABS"!=this.user.status)confirm(this.lang.confirmAction+" "+this.lang.activateAbs);"ABS"==this.user.status&&(this.userAbsenceModel.push({basketId:this.user.baskets[t].basket_id,basketName:this.user.baskets[t].basket_name,virtual:this.user.baskets[t].is_virtual,basketOwner:this.user.baskets[t].basket_owner,newUser:this.user.baskets[t].userToDisplay}),this.activateAbsence())},e.prototype.delBasketRedirection=function(t){this.user.baskets[t].userToDisplay=""},e.prototype.activateAbsence=function(){var t=this;this.http.put(this.coreUrl+"rest/users/"+this.serialId+"/status",{status:"ABS"}).subscribe(function(e){t.user.status=e.user.status,t.userAbsenceModel=[],t.notify.success(t.lang.absOn)},function(e){t.notify.error(e.error.errors)})},e.prototype.desactivateAbsence=function(){var t=this;this.http.put(this.coreUrl+"rest/users/"+this.serialId+"/status",{status:"OK"}).subscribe(function(e){for(var n in t.user.status=e.user.status,t.user.baskets)t.user.baskets[n].userToDisplay="";t.notify.success(t.lang.absOff)},function(e){t.notify.error(e.error.errors)})},e.prototype.onSubmit=function(){var t=this;this.creationMode?this.http.post(this.coreUrl+"rest/users",this.user).subscribe(function(e){t.notify.success(t.lang.userAdded),t.router.navigate(["/administration/users/"+e.user.id])},function(e){t.notify.error(e.error.errors)}):this.http.put(this.coreUrl+"rest/users/"+this.serialId,this.user).subscribe(function(e){t.notify.success(t.lang.userUpdated)},function(e){t.notify.error(e.error.errors)})},o([s.ViewChild(h.MatPaginator),a("design:type",h.MatPaginator)],e.prototype,"paginator",void 0),o([s.ViewChild(h.MatSort),a("design:type",h.MatSort)],e.prototype,"sort",void 0),e=o([s.Component({templateUrl:angularGlobals["user-administrationView"],styleUrls:["css/user-administration.component.css"],providers:[d.NotificationService]}),a("design:paramtypes",[s.ChangeDetectorRef,l.MediaMatcher,c.HttpClient,u.ActivatedRoute,u.Router,s.NgZone,d.NotificationService])],e)}(t("../../plugins/autocomplete.plugin").AutoCompletePlugin);n.UserAdministrationComponent=f},{"../../plugins/autocomplete.plugin":42,"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64,"@angular/router":68}],29:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}};Object.defineProperty(n,"__esModule",{value:!0});var l=t("@angular/core"),c=t("@angular/cdk/layout"),u=t("@angular/common/http"),p=t("../translate.component"),d=t("../notification.service"),h=t("@angular/material"),f=t("../../plugins/autocomplete.plugin"),m=function(t){function e(e,n,r,i,o){var a=t.call(this,r,["users"])||this;return a.http=r,a.notify=i,a.dialog=o,a.lang=p.LANG,a.loading=!1,a.data=[],a.config={},a.userDestRedirect={},a.userDestRedirectModels=[],a.dataSource=new h.MatTableDataSource(a.data),a.displayedColumns=["user_id","lastname","firstname","status","mail","actions"],$j("link[href='merged_css.php']").remove(),a.mobileQuery=n.matchMedia("(max-width: 768px)"),a._mobileQueryListener=function(){return e.detectChanges()},a.mobileQuery.addListener(a._mobileQueryListener),a}return i(e,t),e.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},e.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener)},e.prototype.ngOnInit=function(){var t=this;this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.http.get(this.coreUrl+"rest/users").subscribe(function(e){t.data=e.users,t.loading=!1,setTimeout(function(){t.dataSource=new h.MatTableDataSource(t.data),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0)},function(){location.href="index.php"})},e.prototype.suspendUser=function(t){var e=this;"Y"==t.inDiffListDest?(this.userDestRedirect=t,this.http.get(this.coreUrl+"rest/listTemplates/entityDest/itemId/"+t.user_id).subscribe(function(n){e.userDestRedirectModels=n.listTemplates,e.config={data:{userDestRedirect:e.userDestRedirect,userDestRedirectModels:e.userDestRedirectModels}},e.dialogRef=e.dialog.open(g,e.config),e.dialogRef.afterClosed().subscribe(function(n){n&&(t.enabled="N",t.redirectListModels=n,e.http.put(e.coreUrl+"rest/listTemplates/entityDest/itemId/"+t.user_id,t).subscribe(function(n){n.errors?(t.enabled="Y",e.notify.error(n.errors)):e.http.put(e.coreUrl+"rest/users/"+t.id,t).subscribe(function(){t.inDiffListDest="N",e.notify.success(e.lang.userSuspended)},function(n){t.enabled="Y",e.notify.error(n.error.errors)})},function(t){e.notify.error(t.error.errors)})),e.dialogRef=null})},function(t){console.log(t),location.href="index.php"})):confirm(this.lang.confirmAction+" "+this.lang.suspend+" « "+t.user_id+" »")&&(t.enabled="N",this.http.put(this.coreUrl+"rest/users/"+t.id,t).subscribe(function(){e.notify.success(e.lang.userSuspended)},function(n){t.enabled="Y",e.notify.error(n.error.errors)}))},e.prototype.activateUser=function(t){var e=this;confirm(this.lang.confirmAction+" "+this.lang.authorize+" « "+t.user_id+" »")&&(t.enabled="Y",this.http.put(this.coreUrl+"rest/users/"+t.id,t).subscribe(function(){e.notify.success(e.lang.userAuthorized)},function(n){t.enabled="N",e.notify.error(n.error.errors)}))},e.prototype.deleteUser=function(t){var e=this;"Y"==t.inDiffListDest?(this.userDestRedirect=t,this.http.get(this.coreUrl+"rest/listTemplates/entityDest/itemId/"+t.user_id).subscribe(function(n){e.userDestRedirectModels=n.listTemplates,e.config={data:{userDestRedirect:e.userDestRedirect,userDestRedirectModels:e.userDestRedirectModels}},e.dialogRef=e.dialog.open(g,e.config),e.dialogRef.afterClosed().subscribe(function(n){n&&(t.redirectListModels=n,e.http.put(e.coreUrl+"rest/listTemplates/entityDest/itemId/"+t.user_id,t).subscribe(function(n){n.errors?e.notify.error(n.errors):e.http.delete(e.coreUrl+"rest/users/"+t.id).subscribe(function(){for(var n in e.data)e.data[n].id==t.id&&e.data.splice(Number(n),1);e.dataSource=new h.MatTableDataSource(e.data),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort,e.notify.success(e.lang.userDeleted+" « "+t.user_id+" »")},function(t){e.notify.error(t.error.errors)})},function(t){e.notify.error(t.error.errors)}))})},function(t){e.notify.error(t.error.errors)})):confirm(this.lang.confirmAction+" "+this.lang.delete+" « "+t.user_id+" »")&&this.http.delete(this.coreUrl+"rest/users/"+t.id,t).subscribe(function(){for(var n in e.data)e.data[n].id==t.id&&e.data.splice(Number(n),1);e.dataSource=new h.MatTableDataSource(e.data),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort,e.notify.success(e.lang.userDeleted)},function(t){e.notify.error(t.error.errors)})},o([l.ViewChild(h.MatPaginator),a("design:type",h.MatPaginator)],e.prototype,"paginator",void 0),o([l.ViewChild(h.MatSort),a("design:type",h.MatSort)],e.prototype,"sort",void 0),e=o([l.Component({templateUrl:angularGlobals["users-administrationView"],styleUrls:["css/users-administration.component.css"],providers:[d.NotificationService]}),a("design:paramtypes",[l.ChangeDetectorRef,c.MediaMatcher,u.HttpClient,d.NotificationService,h.MatDialog])],e)}(f.AutoCompletePlugin);n.UsersAdministrationComponent=m;var g=function(t){function e(e,n,r){var i=t.call(this,e,["users"])||this;return i.http=e,i.data=n,i.dialogRef=r,i.lang=p.LANG,i}return i(e,t),e.prototype.sendFunction=function(){var t=!0;return this.data.userDestRedirectModels.each(function(e){e.redirectUserId||(t=!1)}),t},e=o([l.Component({templateUrl:angularGlobals["users-administration-redirect-modalView"]}),s(1,l.Inject(h.MAT_DIALOG_DATA)),a("design:paramtypes",[u.HttpClient,Object,h.MatDialogRef])],e)}(f.AutoCompletePlugin);n.UsersAdministrationRedirectModalComponent=g},{"../../plugins/autocomplete.plugin":42,"../notification.service":35,"../translate.component":38,"@angular/cdk/layout":51,"@angular/common/http":59,"@angular/core":62,"@angular/material":64}],30:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(n,"__esModule",{value:!0});var a=t("@angular/material"),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.parse=function(t){if("string"==typeof t&&t.indexOf("/")>-1){var e=t.split("/"),n=Number(e[2]),r=Number(e[1])-1,i=Number(e[0]);return new Date(n,r,i)}var o="number"==typeof t?t:Date.parse(t);return isNaN(o)?null:new Date(o)},e.prototype.format=function(t,e){if("input"==e){var n=t.getDate(),r=t.getMonth()+1,i=t.getFullYear();return this._to2digit(n)+"/"+this._to2digit(r)+"/"+i}return t.toDateString()},e.prototype._to2digit=function(t){return("00"+t).slice(-2)},e}(a.NativeDateAdapter);n.AppDateAdapter=s,n.APP_DATE_FORMATS={parse:{dateInput:{month:"short",year:"numeric",day:"numeric"}},display:{dateInput:"input",monthYearLabel:{month:"short",year:"numeric",day:"numeric"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}};var l=t("@angular/core"),c=t("ng2-dnd"),u=t("@angular/material"),p=t("./french-paginator-intl"),d=function(){function t(){}return t=o([l.NgModule({imports:[u.MatCheckboxModule,u.MatSelectModule,u.MatSlideToggleModule,u.MatInputModule,u.MatTooltipModule,u.MatTabsModule,u.MatSidenavModule,u.MatButtonModule,u.MatCardModule,u.MatButtonToggleModule,u.MatProgressSpinnerModule,u.MatToolbarModule,u.MatMenuModule,u.MatGridListModule,u.MatTableModule,u.MatPaginatorModule,u.MatSortModule,u.MatDatepickerModule,u.MatNativeDateModule,u.MatExpansionModule,u.MatAutocompleteModule,u.MatSnackBarModule,u.MatIconModule,u.MatDialogModule,u.MatListModule,u.MatChipsModule,u.MatStepperModule,u.MatRadioModule,u.MatSliderModule,c.DndModule.forRoot()],exports:[u.MatCheckboxModule,u.MatSelectModule,u.MatSlideToggleModule,u.MatInputModule,u.MatTooltipModule,u.MatTabsModule,u.MatSidenavModule,u.MatButtonModule,u.MatCardModule,u.MatButtonToggleModule,u.MatProgressSpinnerModule,u.MatToolbarModule,u.MatMenuModule,u.MatGridListModule,u.MatTableModule,u.MatPaginatorModule,u.MatSortModule,u.MatDatepickerModule,u.MatNativeDateModule,u.MatExpansionModule,u.MatAutocompleteModule,u.MatSnackBarModule,u.MatIconModule,u.MatDialogModule,u.MatListModule,u.MatChipsModule,u.MatStepperModule,u.MatRadioModule,u.MatSliderModule,c.DndModule],providers:[{provide:u.MatPaginatorIntl,useValue:p.getFrenchPaginatorIntl()},{provide:a.DateAdapter,useClass:s},{provide:a.MAT_DATE_FORMATS,useValue:n.APP_DATE_FORMATS},{provide:a.MAT_DATE_LOCALE,useValue:"fr-FR"}]})],t)}();n.AppMaterialModule=d},{"./french-paginator-intl":34,"@angular/core":62,"@angular/material":64,"ng2-dnd":69}],31:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(n,"__esModule",{value:!0});var i=t("@angular/core"),o=t("@angular/router"),a=t("./profile.component"),s=t("./signature-book.component"),l=function(){function t(){}return t=r([i.NgModule({imports:[o.RouterModule.forRoot([{path:"profile",component:a.ProfileComponent},{path:"groups/:groupId/baskets/:basketId/signatureBook/:resId",component:s.SignatureBookComponent},{path:"**",redirectTo:"",pathMatch:"full"}],{useHash:!0})],exports:[o.RouterModule]})],t)}();n.AppRoutingModule=l},{"./profile.component":36,"./signature-book.component":37,"@angular/core":62,"@angular/router":68}],32:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/platform-browser"),s=t("@angular/material"),l=t("@angular/material");n.myCustomTooltipDefaults={showDelay:500,hideDelay:0,touchendHideDelay:0};var c=function(){function t(t,e){t.addSvgIcon("maarchLogo",e.bypassSecurityTrustResourceUrl("img/logo_white.svg")).addSvgIcon("maarchLogoOnly",e.bypassSecurityTrustResourceUrl("img/logo_only_white.svg"))}return t=r([o.Component({selector:"my-app",template:"<router-outlet></router-outlet>",encapsulation:o.ViewEncapsulation.None,styleUrls:["../../node_modules/bootstrap/dist/css/bootstrap.min.css","css/maarch-material.css","css/engine.css","css/jstree-custom.min.css","../../node_modules/ng2-dnd/bundles/style.css"],viewProviders:[s.MatIconRegistry],providers:[{provide:l.MAT_TOOLTIP_DEFAULT_OPTIONS,useValue:n.myCustomTooltipDefaults}]}),i("design:paramtypes",[s.MatIconRegistry,a.DomSanitizer])],t)}();n.AppComponent=c},{"@angular/core":62,"@angular/material":64,"@angular/platform-browser":67}],33:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(n,"__esModule",{value:!0});var i=t("@angular/core"),o=t("@angular/platform-browser"),a=t("@angular/platform-browser/animations"),s=t("@angular/forms"),l=t("@angular/common/http"),c=t("./app-material.module"),u=t("./notification.service"),p=t("./app.component"),d=t("./app-routing.module"),h=t("./administration/administration.module"),f=t("./profile.component"),m=t("./signature-book.component"),g=function(){function t(){}return t=r([i.NgModule({imports:[o.BrowserModule,a.BrowserAnimationsModule,s.FormsModule,l.HttpClientModule,h.AdministrationModule,d.AppRoutingModule,c.AppMaterialModule],declarations:[p.AppComponent,f.ProfileComponent,m.SignatureBookComponent,m.SafeUrlPipe,u.CustomSnackbarComponent],entryComponents:[u.CustomSnackbarComponent],bootstrap:[p.AppComponent]})],t)}();n.AppModule=g},{"./administration/administration.module":5,"./app-material.module":30,"./app-routing.module":31,"./app.component":32,"./notification.service":35,"./profile.component":36,"./signature-book.component":37,"@angular/common/http":59,"@angular/core":62,"@angular/forms":63,"@angular/platform-browser":67,"@angular/platform-browser/animations":66}],34:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("@angular/material"),i=function(t,e,n){if(0==n||0==e)return"0 de "+n;var r=t*e;r<(n=Math.max(n,0))&&Math.min(r+e,n);return"Page "+(t+1)+" / "+Math.ceil(n/e)};n.getFrenchPaginatorIntl=function(){var t=new r.MatPaginatorIntl;return t.itemsPerPageLabel="Afficher:",t.nextPageLabel="Page suivante",t.previousPageLabel="Page précédente",t.getRangeLabel=i,t}},{"@angular/material":64}],35:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}};Object.defineProperty(n,"__esModule",{value:!0});var a=t("@angular/material"),s=t("@angular/core"),l=t("@angular/material"),c=function(){function t(t){this.data=t}return t=r([s.Component({selector:"custom-snackbar",template:'<mat-grid-list cols="4" rowHeight="1:1"><mat-grid-tile colspan="1"><mat-icon class="fa fa-{{data.icon}} fa-2x"></mat-icon></mat-grid-tile><mat-grid-tile colspan="3">{{data.message}}</mat-grid-tile></mat-grid-list>'}),o(0,s.Inject(l.MAT_SNACK_BAR_DATA)),i("design:paramtypes",[Object])],t)}();n.CustomSnackbarComponent=c;var u=function(){function t(t){this.snackBar=t}return t.prototype.success=function(t){this.snackBar.openFromComponent(c,{duration:2e3,data:{message:t,icon:"info-circle"}})},t.prototype.error=function(t){this.snackBar.openFromComponent(c,{duration:2e3,data:{message:t,icon:"exclamation-triangle"}})},t=r([s.Injectable(),i("design:paramtypes",[a.MatSnackBar])],t)}();n.NotificationService=u},{"@angular/core":62,"@angular/material":64}],36:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/common/http"),s=t("./translate.component"),l=t("./notification.service"),c=t("@angular/material"),u=function(){function t(t,e,n){var r=this;this.http=t,this.zone=e,this.notify=n,this.lang=s.LANG,this.user={baskets:[]},this.histories=[],this.passwordModel={currentPassword:"",newPassword:"",reNewPassword:""},this.signatureModel={base64:"",base64ForJs:"",name:"",type:"",size:0,label:""},this.mailSignatureModel={selected:0,htmlBody:"",title:""},this.userAbsenceModel=[],this.basketsToRedirect=[],this.showPassword=!1,this.selectedSignature=-1,this.selectedSignatureLabel="",this.loading=!1,this.displayAbsenceButton=!1,this.displayedColumns=["event_date","info"],this.dataSource=new c.MatTableDataSource(this.histories),window.angularProfileComponent={componentAfterUpload:function(t){return r.processAfterUpload(t)}}}return t.prototype.applyFilter=function(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t},t.prototype.prepareProfile=function(){$j("#inner_content").remove(),$j("#menunav").hide(),$j("#divList").remove(),$j("#magicContactsTable").remove(),$j("#manageBasketsOrderTable").remove(),$j("#controlParamTechnicTable").remove(),$j("#container").width("99%"),$j("#content h1")[0]&&$j("#content h1")[0]!=$j("my-app h1")[0]&&$j("#content h1")[0].remove(),tinymce.baseURL="../../node_modules/tinymce",tinymce.suffix=".min",tinymce.init({selector:"textarea#emailSignature",statusbar:!1,language:"fr_FR",language_url:"tools/tinymce/langs/fr_FR.js",height:"200",plugins:["textcolor"],external_plugins:{bdesk_photo:"../../apps/maarch_entreprise/tools/tinymce/bdesk_photo/plugin.min.js"},menubar:!1,toolbar:"undo | bold italic underline | alignleft aligncenter alignright | bdesk_photo | forecolor",theme_buttons1_add:"fontselect,fontsizeselect",theme_buttons2_add_before:"cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",theme_buttons2_add:"separator,insertdate,inserttime,preview,separator,forecolor,backcolor",theme_buttons3_add_before:"tablecontrols,separator",theme_buttons3_add:"separator,print,separator,ltr,rtl,separator,fullscreen,separator,insertlayer,moveforward,movebackward,absolut",theme_toolbar_align:"left",theme_advanced_toolbar_location:"top",theme_styles:"Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1"})},t.prototype.updateBreadcrumb=function(t){$j("#ariane")[0]&&($j("#ariane")[0].innerHTML="<a href='index.php?reinit=true'>"+t+"</a> > Profil")},t.prototype.ngOnInit=function(){var t=this;this.prepareProfile(),this.updateBreadcrumb(angularGlobals.applicationName),this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.http.get(this.coreUrl+"rest/currentUser/profile").subscribe(function(e){t.user=e,t.user.baskets.forEach(function(e,n){t.user.baskets[n].disabled=!1,t.user.redirectedBaskets.forEach(function(r){e.basket_id==r.basket_id&&e.basket_owner==r.basket_owner&&(t.user.baskets[n].disabled=!0)})}),setTimeout(function(){$j("#absenceUser").typeahead({order:"asc",display:"formattedUser",templateValue:"{{user_id}}",source:{ajax:{type:"GET",dataType:"json",url:t.coreUrl+"rest/users/autocompleter"}}})},0),t.loading=!1})},t.prototype.processAfterUpload=function(t){var e=this;this.zone.run(function(){return e.resfreshUpload(t)})},t.prototype.resfreshUpload=function(t){this.signatureModel.size<=2e6?(this.signatureModel.base64=t.replace(/^data:.*?;base64,/,""),this.signatureModel.base64ForJs=t):(this.signatureModel.name="",this.signatureModel.size=0,this.signatureModel.type="",this.signatureModel.base64="",this.signatureModel.base64ForJs="",errorNotification("Taille maximum de fichier dépassée (2 MB)"))},t.prototype.displayPassword=function(){this.showPassword=!this.showPassword},t.prototype.clickOnUploader=function(t){$j("#"+t).click()},t.prototype.uploadSignatureTrigger=function(t){if(t.target.files&&t.target.files[0]){var e=new FileReader;this.signatureModel.name=t.target.files[0].name,this.signatureModel.size=t.target.files[0].size,this.signatureModel.type=t.target.files[0].type,""==this.signatureModel.label&&(this.signatureModel.label=this.signatureModel.name),e.readAsDataURL(t.target.files[0]),e.onload=function(t){window.angularProfileComponent.componentAfterUpload(t.target.result)}}},t.prototype.displaySignatureEditionForm=function(t){this.selectedSignature=t,this.selectedSignatureLabel=this.user.signatures[t].signature_label},t.prototype.changeEmailSignature=function(){var t=$j("#emailSignaturesSelect").prop("selectedIndex");this.mailSignatureModel.selected=t,t>0?(tinymce.get("emailSignature").setContent(this.user.emailSignatures[t-1].html_body),this.mailSignatureModel.title=this.user.emailSignatures[t-1].title):(tinymce.get("emailSignature").setContent(""),this.mailSignatureModel.title="")},t.prototype.addBasketRedirection=function(){var t=this;if(void 0!==this.basketsToRedirect[0]&&$j("#absenceUser")[0].value){var e=[];this.basketsToRedirect.forEach(function(n){e.push({basketId:t.user.baskets[n].basket_id,basketName:t.user.baskets[n].basket_name,virtual:t.user.baskets[n].is_virtual,basketOwner:t.user.baskets[n].basket_owner,newUser:$j("#absenceUser")[0].value})}),this.http.post(this.coreUrl+"rest/users/"+this.user.id+"/redirectedBaskets",e).subscribe(function(e){$j("#selectBasketAbsenceUser option").prop("selected",!1),$j("#absenceUser")[0].value="",t.basketsToRedirect=[],t.user.redirectedBaskets=e.redirectedBaskets,t.user.baskets.forEach(function(e,n){t.user.baskets[n].disabled=!1,t.user.redirectedBaskets.forEach(function(r){e.basket_id==r.basket_id&&e.basket_owner==r.basket_owner&&(t.user.baskets[n].disabled=!0)})})},function(e){t.notify.error(e.error.errors)})}else this.notify.error("Veuillez sélectionner au moins une bannette et un utilisateur")},t.prototype.delBasketRedirection=function(t){var e=this;this.http.delete(this.coreUrl+"rest/users/"+this.user.id+"/redirectedBaskets/"+t.basket_id).subscribe(function(t){e.user.redirectedBaskets=t.redirectedBaskets,e.user.baskets.forEach(function(t,n){e.user.baskets[n].disabled=!1,e.user.redirectedBaskets.forEach(function(r){t.basket_id==r.basket_id&&t.basket_owner==r.basket_owner&&(e.user.baskets[n].disabled=!0)})}),e.notify.success(e.lang.modificationSaved)},function(t){e.notify.error(t.error.errors)})},t.prototype.updateBasketColor=function(t,e){var n=this;this.http.put(this.coreUrl+"rest/currentUser/groups/"+this.user.regroupedBaskets[t].groupId+"/baskets/"+this.user.regroupedBaskets[t].baskets[e].basket_id,{color:this.user.regroupedBaskets[t].baskets[e].color}).subscribe(function(t){n.user.regroupedBaskets=t.userBaskets},function(t){n.notify.error(t.error.errors)})},t.prototype.activateAbsence=function(){var t=this;confirm("Voulez-vous vraiment activer votre absence ? Vous serez automatiquement déconnecté.")&&this.http.put(this.coreUrl+"rest/users/"+this.user.id+"/status",{status:"ABS"}).subscribe(function(){location.hash="",location.search="?display=true&page=logout&abs_mode"},function(e){t.notify.error(e.error.errors)})},t.prototype.askRedirectBasket=function(){confirm("Voulez-vous rediriger vos bannettes avant de vous mettre en absence ?")?(this.displayAbsenceButton=!0,$j("#redirectBasketCard").click()):this.activateAbsence()},t.prototype.updatePassword=function(){var t=this;this.http.put(this.coreUrl+"rest/currentUser/password",this.passwordModel).subscribe(function(e){t.showPassword=!1,t.passwordModel={currentPassword:"",newPassword:"",reNewPassword:""},successNotification(e.success)},function(t){errorNotification(t.error.errors)})},t.prototype.submitEmailSignature=function(){var t=this;this.mailSignatureModel.htmlBody=tinymce.get("emailSignature").getContent(),this.http.post(this.coreUrl+"rest/currentUser/emailSignature",this.mailSignatureModel).subscribe(function(e){e.errors?errorNotification(e.errors):(t.user.emailSignatures=e.emailSignatures,t.mailSignatureModel={selected:0,htmlBody:"",title:""},tinymce.get("emailSignature").setContent(""),successNotification(e.success))})},t.prototype.updateEmailSignature=function(){var t=this;this.mailSignatureModel.htmlBody=tinymce.get("emailSignature").getContent();var e=this.user.emailSignatures[this.mailSignatureModel.selected-1].id;this.http.put(this.coreUrl+"rest/currentUser/emailSignature/"+e,this.mailSignatureModel).subscribe(function(e){e.errors?errorNotification(e.errors):(t.user.emailSignatures[t.mailSignatureModel.selected-1].title=e.emailSignature.title,t.user.emailSignatures[t.mailSignatureModel.selected-1].html_body=e.emailSignature.html_body,successNotification(e.success))})},t.prototype.deleteEmailSignature=function(){var t=this;if(confirm("Voulez-vous vraiment supprimer la signature de mail ?")){var e=this.user.emailSignatures[this.mailSignatureModel.selected-1].id;this.http.delete(this.coreUrl+"rest/currentUser/emailSignature/"+e).subscribe(function(e){e.errors?errorNotification(e.errors):(t.user.emailSignatures=e.emailSignatures,t.mailSignatureModel={selected:0,htmlBody:"",title:""},tinymce.get("emailSignature").setContent(""),successNotification(e.success))})}},t.prototype.submitSignature=function(){var t=this;this.http.post(this.coreUrl+"rest/users/"+this.user.id+"/signatures",this.signatureModel).subscribe(function(e){t.user.signatures=e.signatures,t.signatureModel={base64:"",base64ForJs:"",name:"",type:"",size:0,label:""},successNotification(e.success)},function(t){errorNotification(t.error.errors)})},t.prototype.updateSignature=function(){var t=this,e=this.user.signatures[this.selectedSignature].id;this.http.put(this.coreUrl+"rest/users/"+this.user.id+"/signatures/"+e,{label:this.selectedSignatureLabel}).subscribe(function(e){t.user.signatures[t.selectedSignature].signature_label=e.signature.signature_label,t.selectedSignature=-1,t.selectedSignatureLabel="",successNotification(e.success)},function(t){errorNotification(t.error.errors)})},t.prototype.deleteSignature=function(t){var e=this;confirm("Voulez-vous vraiment supprimer la signature ?")&&this.http.delete(this.coreUrl+"rest/users/"+this.user.id+"/signatures/"+t).subscribe(function(t){e.user.signatures=t.signatures,successNotification(t.success)},function(t){errorNotification(t.error.errors)})},t.prototype.getHistories=function(){var t=this;0==this.histories.length&&this.http.get(this.coreUrl+"rest/histories/users/"+this.user.id).subscribe(function(e){t.histories=e.histories,setTimeout(function(){t.dataSource=new c.MatTableDataSource(t.histories),t.dataSource.paginator=t.paginator,t.dataSource.sort=t.sort},0)},function(e){t.notify.error(e.error.errors)})},t.prototype.onSubmit=function(){var t=this;this.http.put(this.coreUrl+"rest/currentUser/profile",this.user).subscribe(function(){t.notify.success(t.lang.modificationSaved)},function(e){t.notify.error(e.error.errors)})},r([o.ViewChild(c.MatPaginator),i("design:type",c.MatPaginator)],t.prototype,"paginator",void 0),r([o.ViewChild(c.MatSort),i("design:type",c.MatSort)],t.prototype,"sort",void 0),t=r([o.Component({templateUrl:angularGlobals.profileView,styleUrls:["../../node_modules/bootstrap/dist/css/bootstrap.min.css","css/profile.component.css"],providers:[l.NotificationService]}),i("design:paramtypes",[a.HttpClient,o.NgZone,l.NotificationService])],t)}();n.ProfileComponent=u},{"./notification.service":35,"./translate.component":38,"@angular/common/http":59,"@angular/core":62,"@angular/material":64}],37:[function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(n,"__esModule",{value:!0});var o=t("@angular/core"),a=t("@angular/common/http"),s=t("@angular/platform-browser"),l=t("@angular/router"),c=function(){function t(t){this.sanitizer=t}return t.prototype.transform=function(t){return this.sanitizer.bypassSecurityTrustResourceUrl(t)},t=r([o.Pipe({name:"safeUrl"}),i("design:paramtypes",[s.DomSanitizer])],t)}();n.SafeUrlPipe=c;var u=function(){function t(t,e,n,r){var i=this;this.http=t,this.route=e,this.router=n,this.zone=r,this.signatureBook={currentAction:{},consigne:"",documents:[],attachments:[],resList:[],resListIndex:0,lang:{}},this.rightSelectedThumbnail=0,this.leftSelectedThumbnail=0,this.rightViewerLink="",this.leftViewerLink="",this.headerTab=1,this.showTopRightPanel=!1,this.showTopLeftPanel=!1,this.showResLeftPanel=!0,this.showLeftPanel=!0,this.showRightPanel=!0,this.showAttachmentPanel=!1,this.showSignaturesPanel=!1,this.loading=!1,this.loadingSign=!1,this.leftContentWidth="44%",this.rightContentWidth="44%",this.notesViewerLink="",this.visaViewerLink="",this.histViewerLink="",this.linksViewerLink="",this.attachmentsViewerLink="",window.angularSignatureBookComponent={componentAfterAttach:function(t){return i.processAfterAttach(t)},componentAfterAction:function(){return i.processAfterAction()},componentAfterNotes:function(){return i.processAfterNotes()},componentAfterLinks:function(){return i.processAfterLinks()}}}return t.prototype.prepareSignatureBook=function(){$j("#inner_content").remove(),$j("#header").remove(),$j("#viewBasketsTitle").remove(),$j("#homePageWelcomeTitle").remove(),$j("#footer").remove(),$j("#container").width("99%")},t.prototype.ngOnInit=function(){var t=this;this.prepareSignatureBook(),this.coreUrl=angularGlobals.coreUrl,this.loading=!0,this.route.params.subscribe(function(e){t.resId=+e.resId,t.basketId=e.basketId,t.groupId=e.groupId,t.signatureBook.resList=[],lockDocument(t.resId),setInterval(function(){lockDocument(t.resId)},5e4),t.http.get(t.coreUrl+"rest/groups/"+t.groupId+"/baskets/"+t.basketId+"/signatureBook/"+t.resId).subscribe(function(e){if(e.error)return location.hash="",void(location.search="");t.signatureBook=e,t.headerTab=1,t.leftSelectedThumbnail=0,t.rightSelectedThumbnail=0,t.leftViewerLink="",t.rightViewerLink="",t.showLeftPanel=!0,t.showRightPanel=!0,t.showResLeftPanel=!0,t.showTopLeftPanel=!1,t.showTopRightPanel=!1,t.showAttachmentPanel=!1,t.notesViewerLink="index.php?display=true&module=notes&page=notes&identifier="+t.resId+"&origin=document&coll_id=letterbox_coll&load&size=full",t.visaViewerLink="index.php?display=true&page=show_visa_tab&module=visa&resId="+t.resId+"&collId=letterbox_coll&visaStep=true",t.histViewerLink="index.php?display=true&page=show_history_tab&resId="+t.resId+"&collId=letterbox_coll",t.linksViewerLink="index.php?display=true&page=show_links_tab&id="+t.resId,t.attachmentsViewerLink="index.php?display=true&module=attachments&page=frame_list_attachments&resId="+t.resId+"&noModification=true&template_selected=documents_list_attachments_simple&load&attach_type_exclude=converted_pdf,print_folder",t.leftContentWidth="44%",t.rightContentWidth="44%",t.signatureBook.documents[0]&&(t.leftViewerLink=t.signatureBook.documents[0].viewerLink,"outgoing"==t.signatureBook.documents[0].category_id&&(t.headerTab=3)),t.signatureBook.attachments[0]&&(t.rightViewerLink=t.signatureBook.attachments[0].viewerLink),t.displayPanel("RESLEFT"),t.loading=!1,setTimeout(function(){$j("#rightPanelContent").niceScroll({touchbehavior:!1,cursorcolor:"#666",cursoropacitymax:.6,cursorwidth:4}),0==$j(".tooltipstered").length&&$j("#obsVersion").tooltipster({interactive:!0})},0)},function(e){errorNotification(JSON.parse(e._body).errors),setTimeout(function(){t.backToBasket()},2e3)})})},t.prototype.ngOnDestroy=function(){delete window.angularSignatureBookComponent},t.prototype.processAfterAttach=function(t){var e=this;this.zone.run(function(){return e.refreshAttachments(t)})},t.prototype.processAfterNotes=function(){var t=this;this.zone.run(function(){return t.refreshNotes()})},t.prototype.processAfterLinks=function(){var t=this;this.zone.run(function(){return t.refreshLinks()})},t.prototype.processAfterAction=function(){for(var t=this,e=-1,n=this.signatureBook.resList.length,r=0;r<n;r++)this.signatureBook.resList[r].res_id==this.resId&&(this.signatureBook.resList[r+1]?e=this.signatureBook.resList[r+1].res_id:r>0&&(e=this.signatureBook.resList[r-1].res_id));n>0&&(unlockDocument(this.resId),e>=0?($j("#send").removeAttr("disabled"),$j("#send").css("opacity","1"),this.zone.run(function(){return t.changeLocation(e,"action")})):this.zone.run(function(){return t.backToBasket()}))},t.prototype.changeSignatureBookLeftContent=function(t){this.headerTab=t,this.showTopLeftPanel=!1},t.prototype.changeRightViewer=function(t){this.showAttachmentPanel=!1,this.signatureBook.attachments[t]?this.rightViewerLink=this.signatureBook.attachments[t].viewerLink:this.rightViewerLink="",this.rightSelectedThumbnail=t},t.prototype.changeLeftViewer=function(t){this.leftViewerLink=this.signatureBook.documents[t].viewerLink,this.leftSelectedThumbnail=t},t.prototype.displayPanel=function(t){var e=this;"TOPRIGHT"==t?this.showTopRightPanel=!this.showTopRightPanel:"TOPLEFT"==t?this.showTopLeftPanel=!this.showTopLeftPanel:"LEFT"==t?(this.showLeftPanel=!this.showLeftPanel,this.showResLeftPanel=!1,this.showLeftPanel?(this.rightContentWidth="48%",this.leftContentWidth="48%",$j("#hideLeftContent").css("background","#CEE9F1")):(this.rightContentWidth="96%",$j("#hideLeftContent").css("background","none"))):"RESLEFT"==t?(this.showResLeftPanel=!this.showResLeftPanel,this.showResLeftPanel?(this.rightContentWidth="44%",this.leftContentWidth="44%",0!=this.signatureBook.resList.length&&null!=this.signatureBook.resList[0].allSigned||this.http.get(this.coreUrl+"rest/"+this.basketId+"/signatureBook/resList/details").subscribe(function(t){e.signatureBook.resList=t.resList,e.signatureBook.resList.forEach(function(t,n){t.res_id==e.resId&&(e.signatureBook.resListIndex=n)}),setTimeout(function(){$j("#resListContent").niceScroll({touchbehavior:!1,cursorcolor:"#666",cursoropacitymax:.6,cursorwidth:4}),$j("#resListContent").scrollTop(0),$j("#resListContent").scrollTop($j(".resListContentFrameSelected").offset().top-42)},0)})):(this.rightContentWidth="48%",this.leftContentWidth="48%")):"MIDDLE"==t&&(this.showRightPanel=!this.showRightPanel,this.showResLeftPanel=!1,this.showRightPanel?(this.rightContentWidth="48%",this.leftContentWidth="48%",$j("#contentLeft").css("border-right","solid 1px")):(this.leftContentWidth="96%",$j("#contentLeft").css("border-right","none")))},t.prototype.displayAttachmentPanel=function(){this.showAttachmentPanel=!this.showAttachmentPanel,this.rightSelectedThumbnail=0,this.signatureBook.attachments[0]&&(this.rightViewerLink=this.signatureBook.attachments[0].viewerLink)},t.prototype.refreshAttachments=function(t){var e=this;"rightContent"==t?this.http.get(this.coreUrl+"rest/signatureBook/"+this.resId+"/incomingMailAttachments").subscribe(function(t){e.signatureBook.documents=t}):this.http.get(this.coreUrl+"rest/signatureBook/"+this.resId+"/attachments").subscribe(function(n){var r=0;if("add"==t){var i=!1;n.forEach(function(t,n){i||e.signatureBook.attachments[n]&&t.res_id==e.signatureBook.attachments[n].res_id||(r=n,i=!0)})}else if("edit"==t){var o=e.signatureBook.attachments[e.rightSelectedThumbnail].res_id;n.forEach(function(t,e){t.res_id==o&&(r=e)})}e.signatureBook.attachments=n,"add"==t||"edit"==t?e.changeRightViewer(r):"del"==t&&e.changeRightViewer(0)})},t.prototype.addAttachmentIframe=function(){showAttachmentsForm("index.php?display=true&module=attachments&page=attachments_content&docId="+this.resId)},t.prototype.editAttachmentIframe=function(t){var e;t.canModify&&"SIGN"!=t.status&&(0==t.res_id?e=t.res_id_version:0==t.res_id_version&&(e=t.res_id),modifyAttachmentsForm("index.php?display=true&module=attachments&page=attachments_content&id="+e+"&relation="+t.relation+"&docId="+this.resId,"98%","auto"))},t.prototype.delAttachment=function(t){var e=this;if(t.canDelete){if(this.signatureBook.attachments.length<=1)var n=confirm("Attention, ceci est votre dernière pièce jointe pour ce courrier, voulez-vous vraiment la supprimer ?");else n=confirm("Voulez-vous vraiment supprimer la pièce jointe ?");var r;if(n)0==t.res_id?r=t.res_id_version:0==t.res_id_version&&(r=t.res_id),this.http.get("index.php?display=true&module=attachments&page=del_attachment&id="+r+"&relation="+t.relation+"&rest=true").subscribe(function(){e.refreshAttachments("del")})}},t.prototype.refreshNotes=function(){var t=this;this.http.get(this.coreUrl+"rest/res/"+this.resId+"/notes/count").subscribe(function(e){t.signatureBook.nbNotes=e})},t.prototype.refreshLinks=function(){var t=this;this.http.get(this.coreUrl+"rest/links/resId/"+this.resId).subscribe(function(e){t.signatureBook.nbLinks=e.length})},t.prototype.signFile=function(t,e){var n=this;if(!this.loadingSign&&this.signatureBook.canSign){this.loadingSign=!0;var r="index.php?display=true&module=visa&page=sign_file&collId=letterbox_coll&resIdMaster="+this.resId+"&signatureId="+e.id;0==t.res_id?"outgoing_mail"==t.attachment_type&&"outgoing"==this.signatureBook.documents[0].category_id?r+="&isVersion&isOutgoing&id="+t.res_id_version:r+="&isVersion&id="+t.res_id_version:0==t.res_id_version&&("outgoing_mail"==t.attachment_type&&"outgoing"==this.signatureBook.documents[0].category_id?r+="&isOutgoing&id="+t.res_id:r+="&id="+t.res_id),this.http.get(r,e).subscribe(function(t){if(0==t.status){n.rightViewerLink="index.php?display=true&module=attachments&page=view_attachment&res_id_master="+n.resId+"&id="+t.new_id+"&isVersion=false",n.signatureBook.attachments[n.rightSelectedThumbnail].viewerLink=n.rightViewerLink,n.signatureBook.attachments[n.rightSelectedThumbnail].status="SIGN",n.signatureBook.attachments[n.rightSelectedThumbnail].idToDl=t.new_id;var e=!0;n.signatureBook.attachments.forEach(function(t){t.sign&&"SIGN"!=t.status&&(e=!1)}),n.signatureBook.resList.length>0&&(n.signatureBook.resList[n.signatureBook.resListIndex].allSigned=e),3==n.headerTab&&(n.changeSignatureBookLeftContent(0),setTimeout(function(){n.changeSignatureBookLeftContent(3)},0))}else alert(t.error);n.showSignaturesPanel=!1,n.loadingSign=!1})}},t.prototype.unsignFile=function(t){var e,n,r,i=this;0==t.res_id?(n=t.res_id_version,e="res_version_attachments",r="true"):0==t.res_id_version&&(n=t.res_id,e="res_attachments",r="false"),this.http.put(this.coreUrl+"rest/"+e+"/"+n+"/unsign",{}).subscribe(function(){i.rightViewerLink="index.php?display=true&module=attachments&page=view_attachment&res_id_master="+i.resId+"&id="+t.viewerNoSignId+"&isVersion="+r,i.signatureBook.attachments[i.rightSelectedThumbnail].viewerLink=i.rightViewerLink,i.signatureBook.attachments[i.rightSelectedThumbnail].status="A_TRA",i.signatureBook.attachments[i.rightSelectedThumbnail].idToDl=n,i.signatureBook.resList.length>0&&(i.signatureBook.resList[i.signatureBook.resListIndex].allSigned=!1),3==i.headerTab&&(i.changeSignatureBookLeftContent(0),setTimeout(function(){i.changeSignatureBookLeftContent(3)},0))})},t.prototype.backToBasket=function(){unlockDocument(this.resId),location.hash="",location.reload()},t.prototype.backToDetails=function(){unlockDocument(this.resId),location.hash="",location.search="?page=details&dir=indexing_searching&id="+this.resId},t.prototype.changeLocation=function(t,e){var n=this;this.http.get(this.coreUrl+"rest/res/"+t+"/lock").subscribe(function(r){if(r.lock)"view"==e?alert("Courrier verrouillé par "+r.lockBy):"action"==e&&(alert("Courrier suivant verrouillé par "+r.lockBy),n.backToBasket());else{var i="/groups/"+n.groupId+"/baskets/"+n.basketId+"/signatureBook/"+t;n.router.navigate([i])}})},t.prototype.validForm=function(){var t=this;""!=$j("#signatureBookActions option:selected")[0].value?1==this.signatureBook.listinstance.requested_signature?this.http.get(this.coreUrl+"rest/listinstance/"+this.signatureBook.listinstance.listinstance_id).subscribe(function(e){var n=!0;0==e.signatory&&(n=confirm("Vous n’avez signé aucun document. Êtes-vous sûr de vouloir continuer ?")),n&&t.sendActionForm()}):this.sendActionForm():alert("Aucune action choisie")},t.prototype.sendActionForm=function(){var t=this;unlockDocument(this.resId),0==this.signatureBook.resList.length?this.http.get(this.coreUrl+"rest/"+this.basketId+"/signatureBook/resList").subscribe(function(e){t.signatureBook.resList=e.resList,valid_action_form("empty","index.php?display=true&page=manage_action&module=core",t.signatureBook.currentAction.id,t.resId,"res_letterbox","null","letterbox_coll","page",!1,[$j("#signatureBookActions option:selected")[0].value])}):valid_action_form("empty","index.php?display=true&page=manage_action&module=core",this.signatureBook.currentAction.id,this.resId,"res_letterbox","null","letterbox_coll","page",!1,[$j("#signatureBookActions option:selected")[0].value])},t=r([o.Component({templateUrl:angularGlobals["signature-bookView"]}),i("design:paramtypes",[a.HttpClient,l.ActivatedRoute,l.Router,o.NgZone])],t)}();n.SignatureBookComponent=u},{"@angular/common/http":59,"@angular/core":62,"@angular/platform-browser":67,"@angular/router":68}],38:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("../lang/lang-en"),i=t("../lang/lang-fr"),o={};"en"==angularGlobals.lang?o=r.LANG_EN:"fr"==angularGlobals.lang&&(o=i.LANG_FR),n.LANG=o},{"../lang/lang-en":39,"../lang/lang-fr":40}],39:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LANG_EN={abs:"Absent",action:"Action",actionAdded:"Action added",actionAvailable:"Availables actions",actionCreation:"Action creation",actionDeleted:"Action deleted",actionHistory:"Log action in history",actionHistoryDesc:"Lets you plot this action in the document history. It is strongly recommended to check this option",actionModification:"Action modification",actionName:"Action name",actionPage:"Result page of the action",actionParameters:"Action parameters",actions:"Action(s)",actionUpdated:"Action updated",activateAbsence:"Activate absence",active:"Active",add:"Add",address:"Address",addStatus:"Add a status",addUser:"Add a user",addUserOrEntity:"Add a user / an entity",addVisaSignUser:"Add a visa / sign user",administration:"Administration",administrationServices:"Administration services",allActions:"All actions",application:"Application",archivalAgency:"Archival agency",archivalAgreement:"Archival agreement",associatedStatus:"Associated status",attachments:"Attachments",authorize:"Authorize",autoLogoutAbsence:"You are going to be automaticaly disconnected after your redirections",available:"available",availableGroups:"Available groups",availableStatuses:"Available statuses",avis:"Avis circuit",back:"Back",basket:"Basket",basketAdded:"Basket added",basketCreation:"Basket creation",basketDeleted:"Basket deleted",basketModification:"Basket modification",basketNotification:"Toggle notification for this basket",baskets:"Baskets",basketsOrder:"Manage baskets order",basketUpdated:"Basket updated",calDays:"calendar days",canBeModified:"Index modification",canBeSearched:"Searchable",cancel:"Cancel",cases:"Cases",changeMyPassword:"Change my password",chooseBasket:"Choose a basket",chooseCategoryAssociation:"Choose one or some associatedd categories",chooseDefaultAction:"Choose main action",chooseEntity:"Choose a entity",chooseGroup:"Choose a group",chooseRedirectGroup:"Choose another group",chronoNumber:"Chrono number",clause:"Clause",clickOn:"Click on",color:"Color",content_management:"Ressource revision",country:"Country",createScriptNotification:"Create the script",currentPsw:"Current password",default:"default",defaultAction:"Default action",delete:"Delete",deleteMsg:"Do you really want to delete this element",desactivateAbsence:"Deactivate absence",description:"Description",diffusionList:"Diffusion list",diffusionModels:"Diffusion models",display:"display",documents:"document(s)",doNotModifyUnlessExpert:"Do not edit this section unless you know what you are doing. Incorrect settings can cause the application to malfunction !",email:"Email",emailSignatures:"Email signatures",entities:"Entities",entityAdded:"Entité added",entityDeleted:"Entité deleted",entityFullName:"Full name",entityTooglePrimary:"Pass to primary entity",entityType:"Entity type",entityUpdated:"Entité updated",entityReplacement:"Entity replacement",export_seda:"Seda export",fileplan:"Fileplan",filterBy:"Filter by",fingerprint:"Digital fingerprint",firstname:"Firstname",folder:"Folder",folders:"Folders",for:"for",functionnalities:"Functionnalities",groupAdded:"Group added",groupCreation:"Create group",groupDeleted:"Group deleted",groupModification:"Modify group",groupRedirect:"Group change",groups:"Groups",groupUpdated:"Group updated",history:"Historique",historyBatch:"Historique des batchs",home:"Accueil",id:"Login",imgRelated:"Associated image",inactive:"Inactive",indexing:"Indexing",informations:"Informations",initials:"Initials",isAssociatedTo:"is associated to",isCopyTo:"is in copy to",isDestTo:"is in destination to",isFolderAction:"Folder action",isFolderActionDesc:"Use this action in a folder folder",isFolderBasket:"Folder basket",isFolderStatus:"Folder status",isLinkedTo:"Is linked to",isSearchBasket:"Only search basket",isSytemAction:"System action",keyword:"Keyword",keywordHelp:"Keyword help",keywordHelpDesc_1:"Identifier of logged user",keywordHelpDesc_10:"Immediate sub-entities (n-1) of entities passed in argument",keywordHelpDesc_11:"Example of security definition for a group (where clause) : access of main entity of logged user or sub-entity of this entity",keywordHelpDesc_2:"Email of logged user",keywordHelpDesc_3:"All entities linked to logged user. Sub-entities are excludes",keywordHelpDesc_4:"Primary entity of logged user",keywordHelpDesc_5:"Sub-entities of argument list, can be @my_entities or @my_primary_entity",keywordHelpDesc_6:"Parent entity passed to argument",keywordHelpDesc_7:"All entities to the same level of entity in argument",keywordHelpDesc_8:"All entities with de same type passed in argument",keywordHelpDesc_9:"All entities (enabled)",keywordHelper:"Hide / Display keyword help",label:"Label",lastname:"Lastname",life_cycle:"Life cycle",linkGroup:"Link a group",maarchApplication:"Maarch App",manageAbsences:"Manage absences",manageSignatures:"Manage signatures",menus:"Menus",modificationSaved:"Modification has been saved",module:"Module",modules:"Modules",moreOptions:"More options",move:"Move",myProfile:"My profile",newAction:"New action",newElement:"New element",newPsw:"New password",newSignature:"New signature",no:"No",noReplacement:"No replacement",notes:"Notes",NotificationAdded:"Notification added",notificationCreation:"Notification creation",notificationDeleted:"Notification deleted",NotificationDiffusionType:"Diffusion type",NotificationEnabled:"Enabled",NotificationEvent:"Event",NotificationJoinDocument:"Join document to notification",NotificationModel:"Model",notificationModification:"Notification modification",notifications:"Notification(s)",notificationSchedule:"Notifications schedule",NotificationScheduleInfo:"This part is used to define when notifications will be sent.\n\nIf you choose * from all the drop-down lists, the notification will be sent every minute 365 days a year.\n\nFrequency example :\n14 30 * * * [courrier] Nouveaux courriers à traiter : La notification sera envoyée tous les jours à 14h30\n9 30 * * Lundi [courrier] Nouveaux courriers à traiter : La notification sera envoyée tous les lundi à 9h30",NotificationScheduleUpdated:"Schedule updated",notificationsSchedule:"Notifications schedule",NotificationToEnable:"To enable",notificationUpdated:"Notification updated",otherActions:"Other(s) action(s)",otherInformations:"Other(s) information(s)",otherParameters:"Other(s) parameter(s)",outOf:"of",page:"Page",parameter:"Parameter",parameterAdded:"Parameter added",parameterCreation:"Parameter creation",parameterDeleted:"Parameter deleted",parameterModification:"Parameter modification",parameters:"Parameters",parameterUpdated:"Parameter updated",phoneNumber:"Phone number",primaryEntity:"Primary entity",priorities:"Priorities",priorityAdded:"Priority added",priorityCreation:"Priority creation",priorityDeleted:"Priority deleted",priorityModification:"Priority modification",priorityUpdated:"Priority updated",privileges:"Privileges",processAction:"Process action(s)",processDelay:"Process delay",processDelayDoctype:"doctype delay is used",processType:"Process type",pswReseted:"Password reseted",record:"element(s)",records:"result(s)",recordsPerPage:"result per page",redirects:"Redirections",reinitPassword:"Reset password",relatedUsers:"Related users",renewPsw:"Enter the password again",reports:"Reports",resetPsw:"Reset password",resId:"Res Identifier",resultPages:"Rseult pages",role:"Role",save:"Save",sbSignatures:"Signature Book Signatures",ScriptCreated:"Script created",search:"Search",searchEntities:"Search entity",secondaryEntity:"Secondary entity",selectAll:"Select all",sendmail:"Sendmail",shortLabel:"Short label",signAdded:"Sign added",signDeleted:"Sign deleted",signUpdated:"Sign updated",siretCode:"SIRET code",status:"Status",statusAdded:"Status added",statusCreation:"Status creation",statusDeleted:"Status deleted",statuses:"Statuses",statusModification:"Status modification",statusName:"Status name",statusUpdated:"Status updated",suspend:"Suspend",system:"System",systemParameters:"System parameters",tags:"Tags",templates:"Templates",thesaurus:"Thesaurus",to:"to",toDefault:"default",toEntities:"To entities",tools:"Tools",tooltipFolderStatus:"If checked, status can be used for folder baskets",tooltipIndexStatus:"If checked, you can edit metadatas of the documents having this status",tooltipSearchStatus:"If checked, the status will be offered in the search criteria STATUS of the advanced search",toSchedule:"To schedule",toStatuses:"To statuses",toStatusesDesc:"You cannot choose a status, a default status has been chosen for this action.",totalErrors:"Errors element(s)",totalProcessed:"Processed element(s)",toUsersEntities:"To users in entities",type:"Type",unlinkGroup:"Unlink group",unselectAll:"Unselect all",update:"Update",updateStatus:"Document status modification",updateStatusInformationsChrono:"When typing the CHRONO of a document, you will modify its status. The document will be present in the basket depending of the status you have chosen.",updateStatusInformationsGed:"When typing the GED NUMBER of a document, you will modify its status. The document will be present in the basket depending of the status you have chosen.",uploadSignFile:"Upload a sign file",uploadSignFileInfo:"Click to add sign file from your computer",usedInActionPage:"Used in action page",usedInBasketlist:"Used in basket list",user:"user",userCreation:"User Creation",userModification:"User Modification",validate:"Validate",validateAction:"Validate action(s)",value:"value",view:"View",visa:"Visa circuit",whereClauseAction:"Where clause condition of action display",workingDays:"Working days",yes:"Yes",zipcode:"Zip code",doctypesAdmin:"Document types",firstLevelDoctype:"Folder",secondLevelDoctype:"Sub-folder",doctype:"Document types",folderTypeList:"Folder types list",firstLevelAttached:"Attach to folder",secondLevelAttached:"Attach to subfolder",retentionFinalDisposition:"Sort final",retentionRule:"Retention rules",durationCurrentUse:"Duration current use",processDelayDay:"Process delay (in days)",delay1:"Reminder period 1 before term (in days)",delay2:"Reminder period 2 after term (in days)",processMode:"Process modes",loadedFile:"Loaded file",generatedFile:"Generated file",destruction:"Destruction",conservation:"Retention",firstLevelAdded:"Folder added",firstLevelUpdated:"Folder updated",firstLevelDeleted:"Folder deleted",secondLevelAdded:"Subfolder added",secondLevelUpdated:"Subfolder updated",secondLevelDeleted:"Subfolder deleted",documentTypeAdded:"Document type added",documentTypeUpdated:"Document type updated",documentTypeDeleted:"Document type deleted",documentTypeReplacement:"Document type replacement",transferToDoctype:"Replace by this document type",complementaryFields:"Complementary fields",archival:"Archival",field:"Field",mandatory:"Mandatory",fieldType:"Field type",fieldNature:"Field nature",databaseColumn:"DB column",used:"Utilisé",toolTipDeleteDoctype:"If mails are attached to this type of document, a reassignment screen will be displayed.",cantMoveDoctype:"The document type can only be moved in a sub-folder",noDoctypeSelected:"No document type selected",tooltipPriorityDelay:"Use this processing time instead of the one defined in the document type",tooltipPriorityDefault:"Set this priority by default when saving a mail",defaultPriority:"Default priority"}},{}],40:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LANG_FR={abs:"Absent",absOff:"Absence désactivée",absOn:"Absence activée",action:"Action",actionAdded:"Action ajoutée",actionAvailable:"Actions disponibles",actionCreation:"Création d'une action",actionDeleted:"Action supprimée",actionHistory:"Tracer l'action",actionHistoryDesc:"Permet tracer cette action dans l'historique du document. Il est fortement recommandé de cocher cette option.",actionModification:"Modification de l'action",actionName:"Nom de l'action",actionPage:"Page de résultat de l'action",actionParameters:"Paramétrage d'action",actions:"Action(s)",actionUpdated:"Action modifiée",activateAbs:"Activer l'absence",activateAbsence:"Activer l'absence",active:"Actif",add:"Ajouter",address:"Adresse",addStatus:"Ajouter un statut",addUser:"Ajouter un utilisateur",addUserOrEntity:"Ajouter un utilisateur / une entité",addVisaSignUser:"Ajouter un viseur / signataire",administration:"Administration",administrationServices:"Droits d'administration",allActions:"Toutes les actions",application:"Application",archivalAgency:"Convention d'archivage",archivalAgreement:"Service d'archive",associatedStatus:"Statut associé",attachments:"Attachments",authorize:"Autoriser",autoLogoutAbsence:"Vous allez être automatiquement déconnecté après avoir défini vos redirections de bannettes",available:"disponible",availableGroups:"Groupes disponibles",availableStatuses:"Statuts disponibles",avis:"Circuit d'avis",back:"Retour",basket:"Bannette",basketAdded:"Bannette ajoutée",basketCreation:"Création d'une bannette",basketDeleted:"Bannette supprimée",basketModification:"Modification d'une bannette",basketNotification:"Activer / désactiver la notification de cette bannette",baskets:"Bannettes",basketsOrder:"Gérer l'ordre des bannettes",basketUpdated:"Bannette modifiée",calDays:"jour(s) calendaire(s)",canBeModified:"Modification des index",canBeSearched:"Recherche",cancel:"Annuler",cases:"Affaires",changeMyPassword:"Modifier mon mot de passe",chooseBasket:"Choisissez une banette",chooseCategoryAssociation:"Choisissez une ou plusieurs catégories associée",chooseCategoryAssociationHelp:"Si aucune catégorie sélectionnée alors l'action est valable pour toutes les catégories",chooseDefaultAction:"Choisissez une action principale",chooseEntity:"Choisissez une entité",chooseGroup:"Choisissez un groupe",chooseRedirectGroup:"Choisissez un groupe de remplacement",chronoNumber:"Numéro chrono",clauseGroup:"Périmètre documentaire",clause:"Clause",clickOn:"Cliquez sur",color:"Couleur",confirmAction:"Voulez-vous vraiment effectuer cette action ?",content_management:"Versionning de document",country:"Pays",createScriptNotification:"Créer le script",currentPsw:"Mot de passe actuel",dataOfMonth:"Données du mois",date:"Date",default:"par défaut",defaultAction:"Action par défaut",delete:"Supprimer",deleteMsg:"Voulez-vous vraiment supprimer cet élément ?",desactivateAbsence:"Désactiver l'absence",description:"Description",diffusionList:"Liste de diffusion",diffusionModels:"Modèles de diffusion",display:"affichage",documents:"document(s)",doNotModifyUnlessExpert:"Ne pas modifier cette section à moins de savoir ce que vous faites. Un mauvais paramètrage peut entrainer des dysfonctionnements de l'application!",email:"Email",emailSignatures:"Signatures de mail",entities:"Entités",entityAdded:"Entité ajoutée",entityDeleted:"Entité supprimée",entityFullName:"Bloc arborescence",entityTooglePrimary:"Passage en entité primaire",entityType:"Type d'entité",entityUpdated:"Entité modifiée",entityReplacement:"Remplacement de l'entité",entries:"entrée(s)",event:"Événement",export_seda:"Export seda",fileplan:"Plan de classement personnel",filterBy:"Filtrer",filteredFrom:"filtré sur un ensemble de",fingerprint:"Empreinte numérique",firstname:"Prénom",folder:"Dossier",folders:"Dossiers",for:"pour",functionnalities:"Fonctionnalités",groupAdded:"Groupe ajouté",groupCreation:"Création d'un groupe",groupDeleted:"Groupe supprimé",groupModification:"Modification d'un groupe",groupRedirect:"Changement de groupe",groups:"Groupes",groupUpdated:"Groupe modifié",history:"Historique",historyBatch:"Historique des batchs",home:"Accueil",id:"Identifiant",imgRelated:"Image associée",inactive:"Inactif",indexing:"Indexations",informations:"Informations",infosActions:"Vous devez choisir au moins un statut et / ou un script.",initials:"Initiales",integer:"Entier",ip:"Adresse IP",isAssociatedTo:"est associé à",isCopyTo:"est en copie de",isDestTo:"est en destination de",isFolderAction:"Action de dossier",isFolderActionDesc:"Permet d'utiliser cette action dans une bannette de dossier",isFolderBasket:"Bannette de dossier",isFolderStatus:"Statut de dossier",isLinkedTo:"Est associé à",isSearchBasket:"Bannette de recherche uniquement",isSytemAction:"Action système",keyword:"Mot-clé",keywordHelp:"Aide sur les mots-clés",keywordHelpDesc_1:"Identifiant de l'utilisateur connecté",keywordHelpDesc_10:"Sous-entités immédiates (n-1) des entités données en argument",keywordHelpDesc_11:"Exemple dans la définition de la sécurité d'un groupe (where clause) : accès sur les ressources concernant le service d'appartenance principal de l'utilisateur connecté, ou les sous-services de ce service",keywordHelpDesc_2:"Courriel de l'utilisateur connecté",keywordHelpDesc_3:"Toutes les entités rattachées à l'utilisateur connecté. N'inclue pas les sous-entités",keywordHelpDesc_4:"Entité primaire de l'utilisateur connecté",keywordHelpDesc_5:"Sous-entités de la liste d'argument, qui peut aussi être @my_entities ou @my_primary_entity",keywordHelpDesc_6:"Entité parente de l'entité en argument",keywordHelpDesc_7:"Toutes les entités du même niveau que l'entité en argument",keywordHelpDesc_8:"Toutes les entités du même type mis en argument",keywordHelpDesc_9:"Toutes les entités (actives)",keywordHelper:"Afficher / Cacher l'aide sur les mots-clés",label:"Libellé",last:"dernier",lastname:"Nom",life_cycle:"Cycle de vie",linkGroup:"Associer un groupe",maarchApplication:"Application Maarch",manageAbsences:"Rediriger mes bannettes",manageSignatures:"Gérer les signatures",menus:"Menus",modificationSaved:"Modification enregistrée",module:"Module",modules:"Modules",moreOptions:"Plus d'options",move:"Déplaçer",myProfile:"Mon profil",newAction:"Nouvelle action",newElement:"Nouvel élément",newPsw:"Nouveau mot de passe",newSignature:"Nouvelle signature",next:"Suivant",no:"Non",noRecord:"Aucun élément",noReplacement:"Aucun remplacement",noResult:"Aucun résultat",notes:"Annotations",NotificationAdded:"Notification ajoutée",notificationCreation:"Création d'une notification",notificationDeleted:"Notification supprimée",NotificationDiffusionType:"Type de diffusion",NotificationEnabled:"Activée",NotificationEvent:"Evènement",NotificationJoinDocument:"Joindre le document à la notification",NotificationModel:"Modèle",notificationModification:"Modification de la notification",notifications:"Notification(s)",notificationSchedule:"Planifier les notifications",NotificationScheduleInfo:"Cette partie permet de définir quand seront envoyées les notifications.\n\nSi vous choisissez * dans toutes les listes déroulantes, la notification sera envoyée toutes les minutes 365 jours par an.\n\nExemple de fréquence :\n14 30 * * * [courrier] Nouveaux courriers à traiter : La notification sera envoyée tous les jours à 14h30\n9 30 * * Lundi [courrier] Nouveaux courriers à traiter : La notification sera envoyée tous les lundi à 9h30",NotificationScheduleUpdated:"Planification mise à jour",notificationsSchedule:"Planification des notifications",NotificationToEnable:"Activer",notificationUpdated:"Notification mise à jour",otherActions:"Action(s) supplémentaire(s)",otherInformations:"Information(s) complémentaire(s)",otherParameters:"Autre(s) paramètre(s)",outOf:"sur",page:"Page",parameter:"Paramètre",parameterAdded:"Paramètre ajouté",parameterCreation:"Création d'un paramètre",parameterDeleted:"Paramètre supprimé",parameterModification:"Modification d'un paramètre",parameters:"Paramètres",parameterUpdated:"Paramètre modifié",phoneNumber:"Numéro de téléphone",previous:"Précédent",primaryEntity:"Entité primaire",priorities:"Priorité(s)",priorityAdded:"Priorité ajoutée",priorityCreation:"Création d'une priorité",priorityDeleted:"Priorité supprimée",priorityModification:"Modification d'une priorité",priorityUpdated:"Priorité modifiée",privileges:"Privilèges",processAction:"Action(s) de traitement",processDelay:"Délai de traitement",processDelayDoctype:"utilise le délai selon le type de document",processType:"Type de traitement",pswReseted:"Mot de passe réinitialisé",record:"élément(s)",records:"résultats",recordsPerPage:"résultats par page",redirects:"Redirections",reinitPassword:"Réinitialiser le mot de passe",relatedUsers:"Utilisateur(s) associé(s)",renewPsw:"Retaper le mot de passe",reports:"Statistiques",resetPsw:"Réinitialiser le mot de passe",resId:"Identifiant GED",resultPages:"Pages de résultat",role:"Rôle",save:"Enregistrer",sbSignatures:"Signatures de parapheur",ScriptCreated:"Script créé",search:"Chercher",searchEntities:"Rechercher un service",secondaryEntity:"Entitté secondaire",selectAll:"Sélectionner tout",sendmail:"Envoi de mails",shortLabel:"Libellé court",signAdded:"Signature ajoutée",signDeleted:"Signature supprimée",signUpdated:"Signature modifiée",siretCode:"Numéro SIRET",status:"Statut",statusAdded:"Statut ajouté",statusCreation:"Création d'un statut",statusDeleted:"Statut supprimé",statuses:"Statut(s)",statusModification:"Modification du statut",statusName:"Nom du statut",statusUpdated:"Statut mis à jour",string:"Chaine de caratère",suspend:"Suspendre",system:"Système",systemParameters:"paramètres système",tags:"Mots clés",templates:"Modèles de documents",thesaurus:"Thésaurus",to:"vers",toDefault:"par défaut",toEntities:"Vers les services",tools:"Outils",tooltipFolderStatus:"Si coché, le statut pourra être utilisé pour des bannettes de dossiers",tooltipIndexStatus:"Si coché, vous pourrez modifier les meta-données des documents ayant ce statut",tooltipSearchStatus:"Si coché, le statut vous sera proposé dans le critère de recherche STATUTS de la recherche avancée",toSchedule:"Planifier",toStatuses:"Vers les statuts",toStatusesDesc:"Vous ne pouvez pas choisir de statut, un statut est dèja pré-définit pour cette action.",totalErrors:"Élément(s) en erreur",totalProcessed:"Élément(s) analysé(s)",toUsersEntities:"Vers les utilisateurs des services",type:"Type",unlinkGroup:"Dissocier le groupe",unselectAll:"Tout désélectionner",update:"Modifier",updateStatus:"Changement de statut de courrier",updateStatusInformationsChrono:"En saisissant le NUMÉRO CHRONO du document, vous modifierez le statut du courrier. Le courrier sera disponible dans la bannette des utilisateurs auquel il était affecté suivant le statut que vous aurez défini.",updateStatusInformationsGed:"En saisissant l'IDENTIFIANT GED du document, vous modifierez le statut du courrier. Le courrier sera disponible dans la bannette des utilisateurs auquel il était affecté suivant le statut que vous aurez défini.",uploadSignFile:"Déposer une signature",uploadSignFileInfo:"Cliquer pour ajouter une signature depuis votre poste",usedInActionPage:"Action sur la page d'action",usedInBasketlist:"Action sur la liste de résultat",user:"utilisateur",userAdded:"Utilisateur ajouté",userAuthorized:"Utilisateur autorisé",userCreation:"Création d'un utilisateur",userDeleted:"Utilisateur supprimé",userModification:"Modification de l'utilisateur",users:"Utilisateur(s)",userSuspended:"Utilisateur suspendu",userUpdated:"Utilisateur modifié",validate:"Valider",validateAction:"Action(s) de qualification",value:"valeur",view:"Consulter",visa:"Circuit de visa",whereClauseAction:"Condition d'apparition de l'action (where clause)",workingDays:"jour(s) ouvré(s)",yes:"Oui",zipcode:"Code postal",doctypesAdmin:"Typologies documentaire",firstLevelDoctype:"Chemise",secondLevelDoctype:"Sous-chemise",doctype:"Type de document",folderTypeList:"Liste des types de dossier",firstLevelAttached:"Rattacher à la chemise",secondLevelAttached:"Rattacher à la sous-chemise",retentionFinalDisposition:"Sort final",retentionRule:"Règle de conservation",durationCurrentUse:"Durée d'utilité courante",processDelayDay:"Délai de traitement (en jours)",delay1:"Délai relance 1 avant terme (en jours)",delay2:"Délai relance 2 après terme (en jours)",processMode:"Mode de traitement",loadedFile:"Fichier importé",generatedFile:"Fichier généré",destruction:"Destruction",conservation:"Conservation",firstLevelAdded:"Chemise créée",firstLevelUpdated:"Chemise mise à jour",firstLevelDeleted:"Chemise supprimée",secondLevelAdded:"Sous-chemise créée",secondLevelUpdated:"Sous-chemise mise à jour",secondLevelDeleted:"Sous-chemise supprimée",chooseModel:"Choisissez un modèle",documentTypeAdded:"Type de document ajouté",documentTypeUpdated:"Type de document mis à jour",documentTypeDeleted:"Type de document supprimé",documentTypeReplacement:"Remplacement du type de document",transferToDoctype:"Remplacer par le type de document",complementaryFields:"Champs complémentaires",archival:"Archivage",field:"Champ",mandatory:"Obligatoire",fieldType:"Type champ",fieldNature:"Nature champ",databaseColumn:"Colonne BDD",used:"Utilisé",toolTipDeleteDoctype:"Si des courriers sont rattachés à ce type de document, un écran de réaffectation s'affichera",cantMoveDoctype:"Le type de document peut uniquement être déplacé dans une sous-chemise",noDoctypeSelected:"Aucun type de document sélectionné",tooltipPriorityDelay:"Utiliser ce délai de traitement au lieu de celui définit dans le type document",tooltipPriorityDefault:"Positionner cette priorité par défaut lors de l'enregistrement d'un courrier",defaultPriority:"Priorité par défaut",chooseColor:"Choisissez une couleur"}},{}],41:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("@angular/platform-browser-dynamic"),i=t("@angular/core"),o=t("./app/app.module");i.enableProdMode(),r.platformBrowserDynamic().bootstrapModule(o.AppModule)},{"./app/app.module":33,"@angular/core":62,"@angular/platform-browser-dynamic":65}],42:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("@angular/forms"),i=t("rxjs/operators/startWith"),o=t("rxjs/operators/map"),a=function(){function t(t,e){var n=this;this.http=t,this.userList=[],this.elemList=[],this.statusesList=[],this.coreUrl=angularGlobals.coreUrl,-1!=e.indexOf("users")&&(this.userCtrl=new r.FormControl,this.http.get(this.coreUrl+"rest/autocomplete/users").subscribe(function(t){n.userList=t,n.filteredUsers=n.userCtrl.valueChanges.pipe(i.startWith(""),o.map(function(t){return t?n.autocompleteFilterUser(t):n.userList.slice()}))},function(){location.href="index.php"})),-1!=e.indexOf("statuses")&&(this.statusCtrl=new r.FormControl,this.http.get(this.coreUrl+"rest/autocomplete/statuses").subscribe(function(t){n.statusesList=t,n.filteredStatuses=n.statusCtrl.valueChanges.pipe(i.startWith(""),o.map(function(t){return t?n.autocompleteFilterStatuses(t):n.statusesList.slice()}))},function(){location.href="index.php"})),-1!=e.indexOf("usersAndEntities")&&(this.elementCtrl=new r.FormControl,this.elemList=[],this.http.get(this.coreUrl+"rest/autocomplete/users").subscribe(function(t){n.elemList=t,n.http.get(n.coreUrl+"rest/autocomplete/entities").subscribe(function(t){n.elemList=n.elemList.concat(t),n.filteredElements=n.elementCtrl.valueChanges.pipe(i.startWith(""),o.map(function(t){return t?n.autocompleteFilterElements(t):n.elemList.slice()}))},function(){location.href="index.php"})},function(){location.href="index.php"})),-1!=e.indexOf("entities")?(this.elementCtrl=new r.FormControl,this.elemList=[],this.http.get(this.coreUrl+"rest/autocomplete/entities").subscribe(function(t){n.elemList=t,n.filteredElements=n.elementCtrl.valueChanges.pipe(i.startWith(""),o.map(function(t){return t?n.autocompleteFilterElements(t):n.elemList.slice()}))},function(){location.href="index.php"})):-1!=e.indexOf("visaUsers")&&(this.userCtrl=new r.FormControl,this.http.get(this.coreUrl+"rest/autocomplete/users/visa").subscribe(function(t){n.userList=t,n.filteredUsers=n.userCtrl.valueChanges.pipe(i.startWith(""),o.map(function(t){return t?n.autocompleteFilterUser(t):n.userList.slice()}))},function(){location.href="index.php"}))}return t.prototype.autocompleteFilterUser=function(t){return this.userList.filter(function(e){return e.idToDisplay.toLowerCase().indexOf(t.toLowerCase())>=0})},t.prototype.autocompleteFilterStatuses=function(t){return this.statusesList.filter(function(e){return e.idToDisplay.toLowerCase().indexOf(t.toLowerCase())>=0})},t.prototype.autocompleteFilterElements=function(t){return this.elemList.filter(function(e){return e.idToDisplay.toLowerCase().indexOf(t.toLowerCase())>=0})},t}();n.AutoCompletePlugin=a},{"@angular/forms":63,"rxjs/operators/map":134,"rxjs/operators/startWith":143}],43:[function(t,e,n){var r,i;r=this,i=function(t,e){"use strict";var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function r(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function o(t){switch(t.length){case 0:return new e.NoopAnimationPlayer;case 1:return t[0];default:return new e.ɵAnimationGroupPlayer(t)}}function a(t,n,r,i,o,a){void 0===o&&(o={}),void 0===a&&(a={});var s=[],l=[],c=-1,u=null;if(i.forEach(function(t){var r=t.offset,i=r==c,p=i&&u||{};Object.keys(t).forEach(function(r){var i=r,l=t[r];if("offset"!==r)switch(i=n.normalizePropertyName(i,s),l){case e.ɵPRE_STYLE:l=o[r];break;case e.AUTO_STYLE:l=a[r];break;default:l=n.normalizeStyleValue(r,i,l,s)}p[i]=l}),i||l.push(p),u=p,c=r}),s.length){throw new Error("Unable to animate due to the following errors:\n - "+s.join("\n - "))}return l}function s(t,e,n,r){switch(e){case"start":t.onStart(function(){return r(n&&l(n,"start",t.totalTime))});break;case"done":t.onDone(function(){return r(n&&l(n,"done",t.totalTime))});break;case"destroy":t.onDestroy(function(){return r(n&&l(n,"destroy",t.totalTime))})}}function l(t,e,n){var r=c(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==n?t.totalTime:n),i=t._data;return null!=i&&(r._data=i),r}function c(t,e,n,r,i,o){return void 0===i&&(i=""),void 0===o&&(o=0),{element:t,triggerName:e,fromState:n,toState:r,phaseName:i,totalTime:o}}function u(t,e,n){var r;return t instanceof Map?(r=t.get(e))||t.set(e,r=n):(r=t[e])||(r=t[e]=n),r}function p(t){var e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}var d=function(t,e){return!1},h=function(t,e){return!1},f=function(t,e,n){return[]};if("undefined"!=typeof Element){if(d=function(t,e){return t.contains(e)},Element.prototype.matches)h=function(t,e){return t.matches(e)};else{var m=Element.prototype,g=m.matchesSelector||m.mozMatchesSelector||m.msMatchesSelector||m.oMatchesSelector||m.webkitMatchesSelector;g&&(h=function(t,e){return g.apply(t,[e])})}f=function(t,e,n){var r=[];if(n)r.push.apply(r,t.querySelectorAll(e));else{var i=t.querySelector(e);i&&r.push(i)}return r}}var y=null,v=!1;function b(t){y||(y=_()||{},v=!!y.style&&"WebkitAppearance"in y.style);var e=!0;y.style&&"ebkit"!=t.substring(1,6)&&(!(e=t in y.style)&&v&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in y.style));return e}function _(){return"undefined"!=typeof document?document.body:null}var w=h,C=d,x=f,S=function(){function t(){}return t.prototype.validateStyleProperty=function(t){return b(t)},t.prototype.matchesElement=function(t,e){return w(t,e)},t.prototype.containsElement=function(t,e){return C(t,e)},t.prototype.query=function(t,e,n){return x(t,e,n)},t.prototype.computeStyle=function(t,e,n){return n||""},t.prototype.animate=function(t,n,r,i,o,a){return void 0===a&&(a=[]),new e.NoopAnimationPlayer},t}(),E=function(){function t(){}return t.NOOP=new S,t}(),k=1e3,O="ng-enter",P="ng-leave",A="ng-trigger",D=".ng-trigger",T="ng-animating",M=".ng-animating";function I(t){if("number"==typeof t)return t;var e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:R(parseFloat(e[1]),e[2])}function R(t,e){switch(e){case"s":return t*k;default:return t}}function N(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){var r,i=0,o="";if("string"==typeof t){var a=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return e.push('The provided timing value "'+t+'" is invalid.'),{duration:0,delay:0,easing:""};r=R(parseFloat(a[1]),a[2]);var s=a[3];null!=s&&(i=R(Math.floor(parseFloat(s)),a[4]));var l=a[5];l&&(o=l)}else r=t;if(!n){var c=!1,u=e.length;r<0&&(e.push("Duration values below 0 are not allowed for this animation step."),c=!0),i<0&&(e.push("Delay values below 0 are not allowed for this animation step."),c=!0),c&&e.splice(u,0,'The provided timing value "'+t+'" is invalid.')}return{duration:r,delay:i,easing:o}}(t,e,n)}function L(t,e){return void 0===e&&(e={}),Object.keys(t).forEach(function(n){e[n]=t[n]}),e}function j(t){var e={};return Array.isArray(t)?t.forEach(function(t){return F(t,!1,e)}):F(t,!1,e),e}function F(t,e,n){if(void 0===n&&(n={}),e)for(var r in t)n[r]=t[r];else L(t,n);return n}function V(t,e){t.style&&Object.keys(e).forEach(function(n){var r=Y(n);t.style[r]=e[n]})}function B(t,e){t.style&&Object.keys(e).forEach(function(e){var n=Y(e);t.style[n]=""})}function U(t){return Array.isArray(t)?1==t.length?t[0]:e.sequence(t):t}var H=new RegExp("{{\\s*(.+?)\\s*}}","g");function z(t){var e=[];if("string"==typeof t){for(var n=t.toString(),r=void 0;r=H.exec(n);)e.push(r[1]);H.lastIndex=0}return e}function G(t,e,n){var r=t.toString(),i=r.replace(H,function(t,r){var i=e[r];return e.hasOwnProperty(r)||(n.push("Please provide a value for the animation param "+r),i=""),i.toString()});return i==r?t:i}function W(t){for(var e=[],n=t.next();!n.done;)e.push(n.value),n=t.next();return e}var q=/-+([a-z0-9])/g;function Y(t){return t.replace(q,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t[1].toUpperCase()})}function $(t,e,n){switch(e.type){case 7:return t.visitTrigger(e,n);case 0:return t.visitState(e,n);case 1:return t.visitTransition(e,n);case 2:return t.visitSequence(e,n);case 3:return t.visitGroup(e,n);case 4:return t.visitAnimate(e,n);case 5:return t.visitKeyframes(e,n);case 6:return t.visitStyle(e,n);case 8:return t.visitReference(e,n);case 9:return t.visitAnimateChild(e,n);case 10:return t.visitAnimateRef(e,n);case 11:return t.visitQuery(e,n);case 12:return t.visitStagger(e,n);default:throw new Error("Unable to resolve animation metadata node #"+e.type)}}var K="*";function Q(t,e){var n=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(function(t){return function(t,e,n){if(":"==t[0]){var r=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return function(t,e){return parseFloat(e)>parseFloat(t)};case":decrement":return function(t,e){return parseFloat(e)<parseFloat(t)};default:return e.push('The transition alias value "'+t+'" is not supported'),"* => *"}}(t,n);if("function"==typeof r)return void e.push(r);t=r}var i=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push('The provided transition expression "'+t+'" is not supported'),e;var o=i[1],a=i[2],s=i[3];e.push(J(o,s));var l=o==K&&s==K;"<"!=a[0]||l||e.push(J(s,o))}(t,n,e)}):n.push(t),n}var X=new Set(["true","1"]),Z=new Set(["false","0"]);function J(t,e){var n=X.has(t)||Z.has(t),r=X.has(e)||Z.has(e);return function(i,o){var a=t==K||t==i,s=e==K||e==o;return!a&&n&&"boolean"==typeof i&&(a=i?X.has(t):Z.has(t)),!s&&r&&"boolean"==typeof o&&(s=o?X.has(e):Z.has(e)),a&&s}}var tt=":self",et=new RegExp("s*"+tt+"s*,?","g");function nt(t,e,n){return new rt(t).build(e,n)}var rt=function(){function t(t){this._driver=t}return t.prototype.build=function(t,e){var n=new it(e);return this._resetContextStyleTimingState(n),$(this,U(t),n)},t.prototype._resetContextStyleTimingState=function(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0},t.prototype.visitTrigger=function(t,e){var n=this,r=e.queryCount=0,i=e.depCount=0,o=[],a=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(function(t){if(n._resetContextStyleTimingState(e),0==t.type){var s=t,l=s.name;l.split(/\s*,\s*/).forEach(function(t){s.name=t,o.push(n.visitState(s,e))}),s.name=l}else if(1==t.type){var c=n.visitTransition(t,e);r+=c.queryCount,i+=c.depCount,a.push(c)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:o,transitions:a,queryCount:r,depCount:i,options:null}},t.prototype.visitState=function(t,e){var n=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(n.containsDynamicStyles){var i=new Set,o=r||{};if(n.styles.forEach(function(t){if(ot(t)){var e=t;Object.keys(e).forEach(function(t){z(e[t]).forEach(function(t){o.hasOwnProperty(t)||i.add(t)})})}}),i.size){var a=W(i.values());e.errors.push('state("'+t.name+'", ...) must define default values for all the following style substitutions: '+a.join(", "))}}return{type:0,name:t.name,style:n,options:r?{params:r}:null}},t.prototype.visitTransition=function(t,e){e.queryCount=0,e.depCount=0;var n=$(this,U(t.animation),e);return{type:1,matchers:Q(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:at(t.options)}},t.prototype.visitSequence=function(t,e){var n=this;return{type:2,steps:t.steps.map(function(t){return $(n,t,e)}),options:at(t.options)}},t.prototype.visitGroup=function(t,e){var n=this,r=e.currentTime,i=0,o=t.steps.map(function(t){e.currentTime=r;var o=$(n,t,e);return i=Math.max(i,e.currentTime),o});return e.currentTime=i,{type:3,steps:o,options:at(t.options)}},t.prototype.visitAnimate=function(t,n){var r,i=function(t,e){var n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t){var r=N(t,e).duration;return st(r,0,"")}var i=t;if(i.split(/\s+/).some(function(t){return"{"==t.charAt(0)&&"{"==t.charAt(1)})){var o=st(0,0,"");return o.dynamic=!0,o.strValue=i,o}return st((n=n||N(i,e)).duration,n.delay,n.easing)}(t.timings,n.errors);n.currentAnimateTimings=i;var o=t.styles?t.styles:e.style({});if(5==o.type)r=this.visitKeyframes(o,n);else{var a=t.styles,s=!1;if(!a){s=!0;var l={};i.easing&&(l.easing=i.easing),a=e.style(l)}n.currentTime+=i.duration+i.delay;var c=this.visitStyle(a,n);c.isEmptyStep=s,r=c}return n.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}},t.prototype.visitStyle=function(t,e){var n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n},t.prototype._makeStyleAst=function(t,n){var r=[];Array.isArray(t.styles)?t.styles.forEach(function(t){"string"==typeof t?t==e.AUTO_STYLE?r.push(t):n.errors.push("The provided style string value "+t+" is not allowed."):r.push(t)}):r.push(t.styles);var i=!1,o=null;return r.forEach(function(t){if(ot(t)){var e=t,n=e.easing;if(n&&(o=n,delete e.easing),!i)for(var r in e){if(e[r].toString().indexOf("{{")>=0){i=!0;break}}}}),{type:6,styles:r,easing:o,offset:t.offset,containsDynamicStyles:i,options:null}},t.prototype._validateStyleAst=function(t,e){var n=this,r=e.currentAnimateTimings,i=e.currentTime,o=e.currentTime;r&&o>0&&(o-=r.duration+r.delay),t.styles.forEach(function(t){"string"!=typeof t&&Object.keys(t).forEach(function(r){if(n._driver.validateStyleProperty(r)){var a,s,l,c,u,p=e.collectedStyles[e.currentQuerySelector],d=p[r],h=!0;d&&(o!=i&&o>=d.startTime&&i<=d.endTime&&(e.errors.push('The CSS property "'+r+'" that exists between the times of "'+d.startTime+'ms" and "'+d.endTime+'ms" is also being animated in a parallel animation between the times of "'+o+'ms" and "'+i+'ms"'),h=!1),o=d.startTime),h&&(p[r]={startTime:o,endTime:i}),e.options&&(a=t[r],s=e.options,l=e.errors,c=s.params||{},(u=z(a)).length&&u.forEach(function(t){c.hasOwnProperty(t)||l.push("Unable to resolve the local animation param "+t+" in the given list of values")}))}else e.errors.push('The provided animation property "'+r+'" is not a supported CSS property for animations')})})},t.prototype.visitKeyframes=function(t,e){var n=this,r={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),r;var i=0,o=[],a=!1,s=!1,l=0,c=t.steps.map(function(t){var r=n._makeStyleAst(t,e),c=null!=r.offset?r.offset:function(t){if("string"==typeof t)return null;var e=null;if(Array.isArray(t))t.forEach(function(t){if(ot(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}});else if(ot(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}return e}(r.styles),u=0;return null!=c&&(i++,u=r.offset=c),s=s||u<0||u>1,a=a||u<l,l=u,o.push(u),r});s&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),a&&e.errors.push("Please ensure that all keyframe offsets are in order");var u=t.steps.length,p=0;i>0&&i<u?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==i&&(p=1/(u-1));var d=u-1,h=e.currentTime,f=e.currentAnimateTimings,m=f.duration;return c.forEach(function(t,i){var a=p>0?i==d?1:p*i:o[i],s=a*m;e.currentTime=h+f.delay+s,f.duration=s,n._validateStyleAst(t,e),t.offset=a,r.styles.push(t)}),r},t.prototype.visitReference=function(t,e){return{type:8,animation:$(this,U(t.animation),e),options:at(t.options)}},t.prototype.visitAnimateChild=function(t,e){return e.depCount++,{type:9,options:at(t.options)}},t.prototype.visitAnimateRef=function(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:at(t.options)}},t.prototype.visitQuery=function(t,e){var n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;var i=function(t){var e=!!t.split(/\s*,\s*/).find(function(t){return t==tt});e&&(t=t.replace(et,""));return[t=t.replace(/@\*/g,D).replace(/@\w+/g,function(t){return D+"-"+t.substr(1)}).replace(/:animating/g,M),e]}(t.selector),o=i[0],a=i[1];e.currentQuerySelector=n.length?n+" "+o:o,u(e.collectedStyles,e.currentQuerySelector,{});var s=$(this,U(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:a,animation:s,originalSelector:t.selector,options:at(t.options)}},t.prototype.visitStagger=function(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");var n="full"===t.timings?{duration:0,delay:0,easing:"full"}:N(t.timings,e.errors,!0);return{type:12,animation:$(this,U(t.animation),e),timings:n,options:null}},t}();var it=function(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null};function ot(t){return!Array.isArray(t)&&"object"==typeof t}function at(t){var e;return t?(t=L(t)).params&&(t.params=(e=t.params)?L(e):null):t={},t}function st(t,e,n){return{duration:t,delay:e,easing:n}}function lt(t,e,n,r,i,o,a,s){return void 0===a&&(a=null),void 0===s&&(s=!1),{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:r,duration:i,delay:o,totalTime:i+o,easing:a,subTimeline:s}}var ct=function(){function t(){this._map=new Map}return t.prototype.consume=function(t){var e=this._map.get(t);return e?this._map.delete(t):e=[],e},t.prototype.append=function(t,e){var n=this._map.get(t);n||this._map.set(t,n=[]),n.push.apply(n,e)},t.prototype.has=function(t){return this._map.has(t)},t.prototype.clear=function(){this._map.clear()},t}(),ut=new RegExp(":enter","g"),pt=new RegExp(":leave","g");function dt(t,e,n,r,i,o,a,s,l,c){return void 0===o&&(o={}),void 0===a&&(a={}),void 0===c&&(c=[]),(new ht).buildKeyframes(t,e,n,r,i,o,a,s,l,c)}var ht=function(){function t(){}return t.prototype.buildKeyframes=function(t,e,n,r,i,o,a,s,l,c){void 0===c&&(c=[]),l=l||new ct;var u=new mt(t,e,l,r,i,c,[]);u.options=s,u.currentTimeline.setStyles([o],null,u.errors,s),$(this,n,u);var p=u.timelines.filter(function(t){return t.containsAnimation()});if(p.length&&Object.keys(a).length){var d=p[p.length-1];d.allowOnlyTimelineStyles()||d.setStyles([a],null,u.errors,s)}return p.length?p.map(function(t){return t.buildKeyframes()}):[lt(e,[],[],[],0,0,"",!1)]},t.prototype.visitTrigger=function(t,e){},t.prototype.visitState=function(t,e){},t.prototype.visitTransition=function(t,e){},t.prototype.visitAnimateChild=function(t,e){var n=e.subInstructions.consume(e.element);if(n){var r=e.createSubContext(t.options),i=e.currentTimeline.currentTime,o=this._visitSubInstructions(n,r,r.options);i!=o&&e.transformIntoNewTimeline(o)}e.previousNode=t},t.prototype.visitAnimateRef=function(t,e){var n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t},t.prototype._visitSubInstructions=function(t,e,n){var r=e.currentTimeline.currentTime,i=null!=n.duration?I(n.duration):null,o=null!=n.delay?I(n.delay):null;return 0!==i&&t.forEach(function(t){var n=e.appendInstructionToTimeline(t,i,o);r=Math.max(r,n.duration+n.delay)}),r},t.prototype.visitReference=function(t,e){e.updateOptions(t.options,!0),$(this,t.animation,e),e.previousNode=t},t.prototype.visitSequence=function(t,e){var n=this,r=e.subContextCount,i=e,o=t.options;if(o&&(o.params||o.delay)&&((i=e.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=ft);var a=I(o.delay);i.delayNextStep(a)}t.steps.length&&(t.steps.forEach(function(t){return $(n,t,i)}),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),e.previousNode=t},t.prototype.visitGroup=function(t,e){var n=this,r=[],i=e.currentTimeline.currentTime,o=t.options&&t.options.delay?I(t.options.delay):0;t.steps.forEach(function(a){var s=e.createSubContext(t.options);o&&s.delayNextStep(o),$(n,a,s),i=Math.max(i,s.currentTimeline.currentTime),r.push(s.currentTimeline)}),r.forEach(function(t){return e.currentTimeline.mergeTimelineCollectedStyles(t)}),e.transformIntoNewTimeline(i),e.previousNode=t},t.prototype._visitTiming=function(t,e){if(t.dynamic){var n=t.strValue;return N(e.params?G(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}},t.prototype.visitAnimate=function(t,e){var n=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),r.snapshotCurrentStyles());var i=t.style;5==i.type?this.visitKeyframes(i,e):(e.incrementTime(n.duration),this.visitStyle(i,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t},t.prototype.visitStyle=function(t,e){var n=e.currentTimeline,r=e.currentAnimateTimings;!r&&n.getCurrentStyleProperties().length&&n.forwardFrame();var i=r&&r.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(i):n.setStyles(t.styles,i,e.errors,e.options),e.previousNode=t},t.prototype.visitKeyframes=function(t,e){var n=e.currentAnimateTimings,r=e.currentTimeline.duration,i=n.duration,o=e.createSubContext().currentTimeline;o.easing=n.easing,t.styles.forEach(function(t){var n=t.offset||0;o.forwardTime(n*i),o.setStyles(t.styles,t.easing,e.errors,e.options),o.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(o),e.transformIntoNewTimeline(r+i),e.previousNode=t},t.prototype.visitQuery=function(t,e){var n=this,r=e.currentTimeline.currentTime,i=t.options||{},o=i.delay?I(i.delay):0;o&&(6===e.previousNode.type||0==r&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=ft);var a=r,s=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=s.length;var l=null;s.forEach(function(r,i){e.currentQueryIndex=i;var s=e.createSubContext(t.options,r);o&&s.delayNextStep(o),r===e.element&&(l=s.currentTimeline),$(n,t.animation,s),s.currentTimeline.applyStylesToKeyframe();var c=s.currentTimeline.currentTime;a=Math.max(a,c)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(a),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t},t.prototype.visitStagger=function(t,e){var n=e.parentContext,r=e.currentTimeline,i=t.timings,o=Math.abs(i.duration),a=o*(e.currentQueryTotal-1),s=o*e.currentQueryIndex;switch(i.duration<0?"reverse":i.easing){case"reverse":s=a-s;break;case"full":s=n.currentStaggerTime}var l=e.currentTimeline;s&&l.delayNextStep(s);var c=l.currentTime;$(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-c+(r.startTime-n.currentTimeline.startTime)},t}(),ft={},mt=function(){function t(t,e,n,r,i,o,a,s){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=i,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=ft,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=s||new gt(this._driver,e,0),a.push(this.currentTimeline)}return Object.defineProperty(t.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),t.prototype.updateOptions=function(t,e){var n=this;if(t){var r=t,i=this.options;null!=r.duration&&(i.duration=I(r.duration)),null!=r.delay&&(i.delay=I(r.delay));var o=r.params;if(o){var a=i.params;a||(a=this.options.params={}),Object.keys(o).forEach(function(t){e&&a.hasOwnProperty(t)||(a[t]=G(o[t],a,n.errors))})}}},t.prototype._copyOptions=function(){var t={};if(this.options){var e=this.options.params;if(e){var n=t.params={};Object.keys(e).forEach(function(t){n[t]=e[t]})}}return t},t.prototype.createSubContext=function(e,n,r){void 0===e&&(e=null);var i=n||this.element,o=new t(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o},t.prototype.transformIntoNewTimeline=function(t){return this.previousNode=ft,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline},t.prototype.appendInstructionToTimeline=function(t,e,n){var r={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},i=new yt(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(i),r},t.prototype.incrementTime=function(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)},t.prototype.delayNextStep=function(t){t>0&&this.currentTimeline.delayNextStep(t)},t.prototype.invokeQuery=function(t,e,n,r,i,o){var a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(ut,"."+this._enterClassName)).replace(pt,"."+this._leaveClassName);var s=1!=n,l=this._driver.query(this.element,t,s);0!==n&&(l=n<0?l.slice(l.length+n,l.length):l.slice(0,n)),a.push.apply(a,l)}return i||0!=a.length||o.push('`query("'+e+'")` returned zero elements. (Use `query("'+e+'", { optional: true })` if you wish to allow this.)'),a},t}(),gt=function(){function t(t,e,n,r){this._driver=t,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}return t.prototype.containsAnimation=function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}},t.prototype.getCurrentStyleProperties=function(){return Object.keys(this._currentKeyframe)},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.startTime+this.duration},enumerable:!0,configurable:!0}),t.prototype.delayNextStep=function(t){var e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t},t.prototype.fork=function(e,n){return this.applyStylesToKeyframe(),new t(this._driver,e,n||this.currentTime,this._elementTimelineStylesLookup)},t.prototype._loadKeyframe=function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))},t.prototype.forwardFrame=function(){this.duration+=1,this._loadKeyframe()},t.prototype.forwardTime=function(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()},t.prototype._updateStyle=function(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}},t.prototype.allowOnlyTimelineStyles=function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe},t.prototype.applyEmptyStep=function(t){var n=this;t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(function(t){n._backFill[t]=n._globalTimelineStyles[t]||e.AUTO_STYLE,n._currentKeyframe[t]=e.AUTO_STYLE}),this._currentEmptyStepKeyframe=this._currentKeyframe},t.prototype.setStyles=function(t,n,r,i){var o=this;n&&(this._previousKeyframe.easing=n);var a,s,l,c,u=i&&i.params||{},p=(a=t,s=this._globalTimelineStyles,c={},a.forEach(function(t){"*"===t?(l=l||Object.keys(s)).forEach(function(t){c[t]=e.AUTO_STYLE}):F(t,!1,c)}),c);Object.keys(p).forEach(function(t){var n=G(p[t],u,r);o._pendingStyles[t]=n,o._localTimelineStyles.hasOwnProperty(t)||(o._backFill[t]=o._globalTimelineStyles.hasOwnProperty(t)?o._globalTimelineStyles[t]:e.AUTO_STYLE),o._updateStyle(t,n)})},t.prototype.applyStylesToKeyframe=function(){var t=this,e=this._pendingStyles,n=Object.keys(e);0!=n.length&&(this._pendingStyles={},n.forEach(function(n){var r=e[n];t._currentKeyframe[n]=r}),Object.keys(this._localTimelineStyles).forEach(function(e){t._currentKeyframe.hasOwnProperty(e)||(t._currentKeyframe[e]=t._localTimelineStyles[e])}))},t.prototype.snapshotCurrentStyles=function(){var t=this;Object.keys(this._localTimelineStyles).forEach(function(e){var n=t._localTimelineStyles[e];t._pendingStyles[e]=n,t._updateStyle(e,n)})},t.prototype.getFinalKeyframe=function(){return this._keyframes.get(this.duration)},Object.defineProperty(t.prototype,"properties",{get:function(){var t=[];for(var e in this._currentKeyframe)t.push(e);return t},enumerable:!0,configurable:!0}),t.prototype.mergeTimelineCollectedStyles=function(t){var e=this;Object.keys(t._styleSummary).forEach(function(n){var r=e._styleSummary[n],i=t._styleSummary[n];(!r||i.time>r.time)&&e._updateStyle(n,i.value)})},t.prototype.buildKeyframes=function(){var t=this;this.applyStylesToKeyframe();var n=new Set,r=new Set,i=1===this._keyframes.size&&0===this.duration,o=[];this._keyframes.forEach(function(a,s){var l=F(a,!0);Object.keys(l).forEach(function(t){var i=l[t];i==e.ɵPRE_STYLE?n.add(t):i==e.AUTO_STYLE&&r.add(t)}),i||(l.offset=s/t.duration),o.push(l)});var a=n.size?W(n.values()):[],s=r.size?W(r.values()):[];if(i){var l=o[0],c=L(l);l.offset=0,c.offset=1,o=[l,c]}return lt(this.element,o,a,s,this.duration,this.startTime,this.easing,!1)},t}(),yt=function(t){function e(e,n,r,i,o,a,s){void 0===s&&(s=!1);var l=t.call(this,e,n,a.delay)||this;return l.element=n,l.keyframes=r,l.preStyleProps=i,l.postStyleProps=o,l._stretchStartingKeyframe=s,l.timings={duration:a.duration,delay:a.delay,easing:a.easing},l}return r(e,t),e.prototype.containsAnimation=function(){return this.keyframes.length>1},e.prototype.buildKeyframes=function(){var t=this.keyframes,e=this.timings,n=e.delay,r=e.duration,i=e.easing;if(this._stretchStartingKeyframe&&n){var o=[],a=r+n,s=n/a,l=F(t[0],!1);l.offset=0,o.push(l);var c=F(t[0],!1);c.offset=vt(s),o.push(c);for(var u=t.length-1,p=1;p<=u;p++){var d=F(t[p],!1),h=n+d.offset*r;d.offset=vt(h/a),o.push(d)}r=a,n=0,i="",t=o}return lt(this.element,t,this.preStyleProps,this.postStyleProps,r,n,i,!0)},e}(gt);function vt(t,e){void 0===e&&(e=3);var n=Math.pow(10,e-1);return Math.round(t*n)/n}var bt,_t,wt=function(){function t(t,e){this._driver=t;var n=[],r=nt(t,e,n);if(n.length){var i="animation validation failed:\n"+n.join("\n");throw new Error(i)}this._animationAst=r}return t.prototype.buildTimelines=function(t,e,n,r,i){var o=Array.isArray(e)?j(e):e,a=Array.isArray(n)?j(n):n,s=[];i=i||new ct;var l=dt(this._driver,t,this._animationAst,O,P,o,a,r,i,s);if(s.length){var c="animation building failed:\n"+s.join("\n");throw new Error(c)}return l},t}(),Ct=function(){},xt=function(){function t(){}return t.prototype.normalizePropertyName=function(t,e){return t},t.prototype.normalizeStyleValue=function(t,e,n,r){return n},t}(),St=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.normalizePropertyName=function(t,e){return Y(t)},e.prototype.normalizeStyleValue=function(t,e,n,r){var i="",o=n.toString().trim();if(Et[e]&&0!==n&&"0"!==n)if("number"==typeof n)i="px";else{var a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push("Please provide a CSS unit value for "+t+":"+n)}return o+i},e}(Ct),Et=(bt="width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(","),_t={},bt.forEach(function(t){return _t[t]=!0}),_t);function kt(t,e,n,r,i,o,a,s,l,c,u,p){return{type:0,element:t,triggerName:e,isRemovalTransition:i,fromState:n,fromStyles:o,toState:r,toStyles:a,timelines:s,queriedElements:l,preStyleProps:c,postStyleProps:u,errors:p}}var Ot={},Pt=function(){function t(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}return t.prototype.match=function(t,e){return n=this.ast.matchers,r=t,i=e,n.some(function(t){return t(r,i)});var n,r,i},t.prototype.buildStyles=function(t,e,n){var r=this._stateStyles["*"],i=this._stateStyles[t],o=r?r.buildStyles(e,n):{};return i?i.buildStyles(e,n):o},t.prototype.build=function(t,e,n,r,o,a,s,l,c){var p=[],d=this.ast.options&&this.ast.options.params||Ot,h=s&&s.params||Ot,f=this.buildStyles(n,h,p),m=l&&l.params||Ot,g=this.buildStyles(r,m,p),y=new Set,v=new Map,b=new Map,_="void"===r,w={params:i({},d,m)},C=dt(t,e,this.ast.animation,o,a,f,g,w,c,p);if(p.length)return kt(e,this._triggerName,n,r,_,f,g,[],[],v,b,p);C.forEach(function(t){var n=t.element,r=u(v,n,{});t.preStyleProps.forEach(function(t){return r[t]=!0});var i=u(b,n,{});t.postStyleProps.forEach(function(t){return i[t]=!0}),n!==e&&y.add(n)});var x=W(y.values());return kt(e,this._triggerName,n,r,_,f,g,C,x,v,b)},t}();var At=function(){function t(t,e){this.styles=t,this.defaultParams=e}return t.prototype.buildStyles=function(t,e){var n={},r=L(this.defaultParams);return Object.keys(t).forEach(function(e){var n=t[e];null!=n&&(r[e]=n)}),this.styles.styles.forEach(function(t){if("string"!=typeof t){var i=t;Object.keys(i).forEach(function(t){var o=i[t];o.length>1&&(o=G(o,r,e)),n[t]=o})}}),n},t}();var Dt=function(){function t(t,e){var n,r,i=this;this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(function(t){var e=t.options&&t.options.params||{};i.states[t.name]=new At(t.style,e)}),Tt(this.states,"true","1"),Tt(this.states,"false","0"),e.transitions.forEach(function(e){i.transitionFactories.push(new Pt(t,e,i.states))}),this.fallbackTransition=(n=t,r=this.states,new Pt(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(t,e){return!0}],options:null,queryCount:0,depCount:0},r))}return Object.defineProperty(t.prototype,"containsQueries",{get:function(){return this.ast.queryCount>0},enumerable:!0,configurable:!0}),t.prototype.matchTransition=function(t,e){return this.transitionFactories.find(function(n){return n.match(t,e)})||null},t.prototype.matchStyles=function(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)},t}();function Tt(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}var Mt=new ct,It=function(){function t(t,e){this._driver=t,this._normalizer=e,this._animations={},this._playersById={},this.players=[]}return t.prototype.register=function(t,e){var n=[],r=nt(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[t]=r},t.prototype._buildPlayer=function(t,e,n){var r=t.element,i=a(this._driver,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(r,i,t.duration,t.delay,t.easing,[])},t.prototype.create=function(t,n,r){var i=this;void 0===r&&(r={});var a,s=[],l=this._animations[t],c=new Map;if(l?(a=dt(this._driver,n,l,O,P,{},{},r,Mt,s)).forEach(function(t){var e=u(c,t.element,{});t.postStyleProps.forEach(function(t){return e[t]=null})}):(s.push("The requested animation doesn't exist or has already been destroyed"),a=[]),s.length)throw new Error("Unable to create the animation due to the following errors: "+s.join("\n"));c.forEach(function(t,n){Object.keys(t).forEach(function(r){t[r]=i._driver.computeStyle(n,r,e.AUTO_STYLE)})});var p=o(a.map(function(t){var e=c.get(t.element);return i._buildPlayer(t,{},e)}));return this._playersById[t]=p,p.onDestroy(function(){return i.destroy(t)}),this.players.push(p),p},t.prototype.destroy=function(t){var e=this._getPlayer(t);e.destroy(),delete this._playersById[t];var n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)},t.prototype._getPlayer=function(t){var e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e},t.prototype.listen=function(t,e,n,r){var i=c(e,"","","");return s(this._getPlayer(t),n,i,r),function(){}},t.prototype.command=function(t,e,n,r){if("register"!=n)if("create"!=n){var i=this._getPlayer(t);switch(n){case"play":i.play();break;case"pause":i.pause();break;case"reset":i.reset();break;case"restart":i.restart();break;case"finish":i.finish();break;case"init":i.init();break;case"setPosition":i.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}else{var o=r[0]||{};this.create(t,e,o)}else this.register(t,r[0])},t}(),Rt="ng-animate-queued",Nt="ng-animate-disabled",Lt=".ng-animate-disabled",jt=[],Ft={namespaceId:"",setForRemoval:null,hasAnimation:!1,removedBeforeQueried:!1},Vt={namespaceId:"",setForRemoval:null,hasAnimation:!1,removedBeforeQueried:!0},Bt="__ng_removed",Ut=function(){function t(t,e){void 0===e&&(e=""),this.namespaceId=e;var n,r=t&&t.hasOwnProperty("value"),i=r?t.value:t;if(this.value=null!=(n=i)?n:null,r){var o=L(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}return Object.defineProperty(t.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),t.prototype.absorbOptions=function(t){var e=t.params;if(e){var n=this.options.params;Object.keys(e).forEach(function(t){null==n[t]&&(n[t]=e[t])})}},t}(),Ht="void",zt=new Ut(Ht),Gt=new Ut("DELETED"),Wt=function(){function t(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Jt(e,this._hostClassName)}return t.prototype.listen=function(t,e,n,r){var i,o=this;if(!this._triggers.hasOwnProperty(e))throw new Error('Unable to listen on the animation trigger event "'+n+'" because the animation trigger "'+e+"\" doesn't exist!");if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'+e+'" because the provided event is undefined!');if("start"!=(i=n)&&"done"!=i)throw new Error('The provided animation trigger event "'+n+'" for the animation trigger "'+e+'" is not supported!');var a=u(this._elementListeners,t,[]),s={name:e,phase:n,callback:r};a.push(s);var l=u(this._engine.statesByElement,t,{});return l.hasOwnProperty(e)||(Jt(t,A),Jt(t,A+"-"+e),l[e]=zt),function(){o._engine.afterFlush(function(){var t=a.indexOf(s);t>=0&&a.splice(t,1),o._triggers[e]||delete l[e]})}},t.prototype.register=function(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)},t.prototype._getTrigger=function(t){var e=this._triggers[t];if(!e)throw new Error('The provided animation trigger "'+t+'" has not been registered!');return e},t.prototype.trigger=function(t,e,n,r){var i=this;void 0===r&&(r=!0);var o=this._getTrigger(e),a=new Yt(this.id,e,t),s=this._engine.statesByElement.get(t);s||(Jt(t,A),Jt(t,A+"-"+e),this._engine.statesByElement.set(t,s={}));var l=s[e],c=new Ut(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),s[e]=c,l){if(l===Gt)return a}else l=zt;if(c.value===Ht||l.value!==c.value){var p=u(this._engine.playersByElement,t,[]);p.forEach(function(t){t.namespaceId==i.id&&t.triggerName==e&&t.queued&&t.destroy()});var d=o.matchTransition(l.value,c.value),h=!1;if(!d){if(!r)return;d=o.fallbackTransition,h=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:d,fromState:l,toState:c,player:a,isFallbackTransition:h}),h||(Jt(t,Rt),a.onStart(function(){te(t,Rt)})),a.onDone(function(){var e=i.players.indexOf(a);e>=0&&i.players.splice(e,1);var n=i._engine.playersByElement.get(t);if(n){var r=n.indexOf(a);r>=0&&n.splice(r,1)}}),this.players.push(a),p.push(a),a}if(!function(t,e){var n=Object.keys(t),r=Object.keys(e);if(n.length!=r.length)return!1;for(var i=0;i<n.length;i++){var o=n[i];if(!e.hasOwnProperty(o)||t[o]!==e[o])return!1}return!0}(l.params,c.params)){var f=[],m=o.matchStyles(l.value,l.params,f),g=o.matchStyles(c.value,c.params,f);f.length?this._engine.reportError(f):this._engine.afterFlush(function(){B(t,m),V(t,g)})}},t.prototype.deregister=function(t){var e=this;delete this._triggers[t],this._engine.statesByElement.forEach(function(e,n){delete e[t]}),this._elementListeners.forEach(function(n,r){e._elementListeners.set(r,n.filter(function(e){return e.name!=t}))})},t.prototype.clearElementCache=function(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);var e=this._engine.playersByElement.get(t);e&&(e.forEach(function(t){return t.destroy()}),this._engine.playersByElement.delete(t))},t.prototype._signalRemovalForInnerTriggers=function(t,e,n){var r=this;void 0===n&&(n=!1),this._engine.driver.query(t,D,!0).forEach(function(t){if(!t[Bt]){var n=r._engine.fetchNamespacesByElement(t);n.size?n.forEach(function(n){return n.triggerLeaveAnimation(t,e,!1,!0)}):r.clearElementCache(t)}})},t.prototype.triggerLeaveAnimation=function(t,e,n,r){var i=this,a=this._engine.statesByElement.get(t);if(a){var s=[];if(Object.keys(a).forEach(function(e){if(i._triggers[e]){var n=i.trigger(t,e,Ht,r);n&&s.push(n)}}),s.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&o(s).onDone(function(){return i._engine.processLeaveNode(t)}),!0}return!1},t.prototype.prepareLeaveAnimationListeners=function(t){var e=this,n=this._elementListeners.get(t);if(n){var r=new Set;n.forEach(function(n){var i=n.name;if(!r.has(i)){r.add(i);var o=e._triggers[i].fallbackTransition,a=e._engine.statesByElement.get(t)[i]||zt,s=new Ut(Ht),l=new Yt(e.id,i,t);e._engine.totalQueuedPlayers++,e._queue.push({element:t,triggerName:i,transition:o,fromState:a,toState:s,player:l,isFallbackTransition:!0})}})}},t.prototype.removeNode=function(t,e){var n=this,r=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e,!0),!this.triggerLeaveAnimation(t,e,!0)){var i=!1;if(r.totalAnimations){var o=r.players.length?r.playersByQueriedElement.get(t):[];if(o&&o.length)i=!0;else for(var a=t;a=a.parentNode;){if(r.statesByElement.get(a)){i=!0;break}}}this.prepareLeaveAnimationListeners(t),i?r.markElementAsRemoved(this.id,t,!1,e):(r.afterFlush(function(){return n.clearElementCache(t)}),r.destroyInnerAnimations(t),r._onRemovalComplete(t,e))}},t.prototype.insertNode=function(t,e){Jt(t,this._hostClassName)},t.prototype.drainQueuedTransitions=function(t){var e=this,n=[];return this._queue.forEach(function(r){var i=r.player;if(!i.destroyed){var o=r.element,a=e._elementListeners.get(o);a&&a.forEach(function(e){if(e.name==r.triggerName){var n=c(o,r.triggerName,r.fromState.value,r.toState.value);n._data=t,s(r.player,e.phase,n,e.callback)}}),i.markedForDestroy?e._engine.afterFlush(function(){i.destroy()}):n.push(r)}}),this._queue=[],n.sort(function(t,n){var r=t.transition.ast.depCount,i=n.transition.ast.depCount;return 0==r||0==i?r-i:e._engine.driver.containsElement(t.element,n.element)?1:-1})},t.prototype.destroy=function(t){this.players.forEach(function(t){return t.destroy()}),this._signalRemovalForInnerTriggers(this.hostElement,t)},t.prototype.elementContainsData=function(t){var e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(function(e){return e.element===t})||e},t}(),qt=function(){function t(t,e){this.driver=t,this._normalizer=e,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=function(t,e){}}return t.prototype._onRemovalComplete=function(t,e){this.onRemovalComplete(t,e)},Object.defineProperty(t.prototype,"queuedPlayers",{get:function(){var t=[];return this._namespaceList.forEach(function(e){e.players.forEach(function(e){e.queued&&t.push(e)})}),t},enumerable:!0,configurable:!0}),t.prototype.createNamespace=function(t,e){var n=new Wt(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n},t.prototype._balanceNamespaceList=function(t,e){var n=this._namespaceList.length-1;if(n>=0){for(var r=!1,i=n;i>=0;i--){var o=this._namespaceList[i];if(this.driver.containsElement(o.hostElement,e)){this._namespaceList.splice(i+1,0,t),r=!0;break}}r||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t},t.prototype.register=function(t,e){var n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n},t.prototype.registerTrigger=function(t,e,n){var r=this._namespaceLookup[t];r&&r.register(e,n)&&this.totalAnimations++},t.prototype.destroy=function(t,e){var n=this;if(t){var r=this._fetchNamespace(t);this.afterFlush(function(){n.namespacesByHostElement.delete(r.hostElement),delete n._namespaceLookup[t];var e=n._namespaceList.indexOf(r);e>=0&&n._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(function(){return r.destroy(e)})}},t.prototype._fetchNamespace=function(t){return this._namespaceLookup[t]},t.prototype.fetchNamespacesByElement=function(t){var e=new Set,n=this.statesByElement.get(t);if(n)for(var r=Object.keys(n),i=0;i<r.length;i++){var o=n[r[i]].namespaceId;if(o){var a=this._fetchNamespace(o);a&&e.add(a)}}return e},t.prototype.trigger=function(t,e,n,r){return!!$t(e)&&(this._fetchNamespace(t).trigger(e,n,r),!0)},t.prototype.insertNode=function(t,e,n,r){if($t(e)){var i=e[Bt];i&&i.setForRemoval&&(i.setForRemoval=!1),t&&this._fetchNamespace(t).insertNode(e,n),r&&this.collectEnterElement(e)}},t.prototype.collectEnterElement=function(t){this.collectedEnterElements.push(t)},t.prototype.markElementAsDisabled=function(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Jt(t,Nt)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),te(t,Nt))},t.prototype.removeNode=function(t,e,n){if($t(e)){var r=t?this._fetchNamespace(t):null;r?r.removeNode(e,n):this.markElementAsRemoved(t,e,!1,n)}else this._onRemovalComplete(e,n)},t.prototype.markElementAsRemoved=function(t,e,n,r){this.collectedLeaveElements.push(e),e[Bt]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}},t.prototype.listen=function(t,e,n,r,i){return $t(e)?this._fetchNamespace(t).listen(e,n,r,i):function(){}},t.prototype._buildInstruction=function(t,e,n,r){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,r,t.fromState.options,t.toState.options,e)},t.prototype.destroyInnerAnimations=function(t){var e=this,n=this.driver.query(t,D,!0);n.forEach(function(t){return e.destroyActiveAnimationsForElement(t)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,M,!0)).forEach(function(t){return e.finishActiveQueriedAnimationOnElement(t)})},t.prototype.destroyActiveAnimationsForElement=function(t){var e=this.playersByElement.get(t);e&&e.forEach(function(t){t.queued?t.markedForDestroy=!0:t.destroy()});var n=this.statesByElement.get(t);n&&Object.keys(n).forEach(function(t){return n[t]=Gt})},t.prototype.finishActiveQueriedAnimationOnElement=function(t){var e=this.playersByQueriedElement.get(t);e&&e.forEach(function(t){return t.finish()})},t.prototype.whenRenderingDone=function(){var t=this;return new Promise(function(e){if(t.players.length)return o(t.players).onDone(function(){return e()});e()})},t.prototype.processLeaveNode=function(t){var e=this,n=t[Bt];if(n&&n.setForRemoval){if(t[Bt]=Ft,n.namespaceId){this.destroyInnerAnimations(t);var r=this._fetchNamespace(n.namespaceId);r&&r.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}this.driver.matchesElement(t,Lt)&&this.markElementAsDisabled(t,!1),this.driver.query(t,Lt,!0).forEach(function(n){e.markElementAsDisabled(t,!1)})},t.prototype.flush=function(t){var e=this;void 0===t&&(t=-1);var n=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(t,n){return e._balanceNamespaceList(t,n)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var r=0;r<this.collectedEnterElements.length;r++){Jt(this.collectedEnterElements[r],"ng-star-inserted")}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){var i=[];try{n=this._flushAnimations(i,t)}finally{for(r=0;r<i.length;r++)i[r]()}}else for(r=0;r<this.collectedLeaveElements.length;r++){var a=this.collectedLeaveElements[r];this.processLeaveNode(a)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(function(t){return t()}),this._flushFns=[],this._whenQuietFns.length){var s=this._whenQuietFns;this._whenQuietFns=[],n.length?o(n).onDone(function(){s.forEach(function(t){return t()})}):s.forEach(function(t){return t()})}},t.prototype.reportError=function(t){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+t.join("\n"))},t.prototype._flushAnimations=function(t,n){var r=this,a=new ct,s=[],l=new Map,c=[],p=new Map,d=new Map,h=new Map,f=new Set;this.disabledNodes.forEach(function(t){f.add(t);for(var e=r.driver.query(t,".ng-animate-queued",!0),n=0;n<e.length;n++)f.add(e[n])});var m=_(),g=Array.from(this.statesByElement.keys()),y=Xt(g,this.collectedEnterElements),v=new Map,b=0;y.forEach(function(t,e){var n=O+b++;v.set(e,n),t.forEach(function(t){return Jt(t,n)})});for(var w=[],C=new Set,x=new Set,S=0;S<this.collectedLeaveElements.length;S++){(q=(W=this.collectedLeaveElements[S])[Bt])&&q.setForRemoval&&(w.push(W),C.add(W),q.hasAnimation?this.driver.query(W,".ng-star-inserted",!0).forEach(function(t){return C.add(t)}):x.add(W))}var E=new Map,k=Xt(g,Array.from(C));k.forEach(function(t,e){var n=P+b++;E.set(e,n),t.forEach(function(t){return Jt(t,n)})}),t.push(function(){y.forEach(function(t,e){var n=v.get(e);t.forEach(function(t){return te(t,n)})}),k.forEach(function(t,e){var n=E.get(e);t.forEach(function(t){return te(t,n)})}),w.forEach(function(t){r.processLeaveNode(t)})});for(var A=[],D=[],T=this._namespaceList.length-1;T>=0;T--){this._namespaceList[T].drainQueuedTransitions(n).forEach(function(t){var e=t.player;A.push(e);var n=t.element;if(m&&r.driver.containsElement(m,n)){var i=E.get(n),o=v.get(n),l=r._buildInstruction(t,a,o,i);if(l.errors&&l.errors.length)D.push(l);else{if(t.isFallbackTransition)return e.onStart(function(){return B(n,l.fromStyles)}),e.onDestroy(function(){return V(n,l.toStyles)}),void s.push(e);l.timelines.forEach(function(t){return t.stretchStartingKeyframe=!0}),a.append(n,l.timelines);var f={instruction:l,player:e,element:n};c.push(f),l.queriedElements.forEach(function(t){return u(p,t,[]).push(e)}),l.preStyleProps.forEach(function(t,e){var n=Object.keys(t);if(n.length){var r=d.get(e);r||d.set(e,r=new Set),n.forEach(function(t){return r.add(t)})}}),l.postStyleProps.forEach(function(t,e){var n=Object.keys(t),r=h.get(e);r||h.set(e,r=new Set),n.forEach(function(t){return r.add(t)})})}}else e.destroy()})}if(D.length){var I=[];D.forEach(function(t){I.push("@"+t.triggerName+" has failed due to:\n"),t.errors.forEach(function(t){return I.push("- "+t+"\n")})}),A.forEach(function(t){return t.destroy()}),this.reportError(I)}var R=new Map,N=new Map;c.forEach(function(t){var e=t.element;a.has(e)&&(N.set(e,e),r._beforeAnimationBuild(t.player.namespaceId,t.instruction,R))}),s.forEach(function(t){var e=t.element;r._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(function(t){u(R,e,[]).push(t),t.destroy()})});var L=w.filter(function(t){return ne(t,d,h)}),j=new Map;Qt(j,this.driver,x,h,e.AUTO_STYLE).forEach(function(t){ne(t,d,h)&&L.push(t)});var F=new Map;y.forEach(function(t,n){Qt(F,r.driver,new Set(t),d,e.ɵPRE_STYLE)}),L.forEach(function(t){var e=j.get(t),n=F.get(t);j.set(t,i({},e,n))});var U=[],H=[],z={};c.forEach(function(t){var e=t.element,n=t.player,i=t.instruction;if(a.has(e)){if(f.has(e))return n.onDestroy(function(){return V(e,i.toStyles)}),void s.push(n);var c=z;if(N.size>1){for(var u=e,p=[];u=u.parentNode;){var d=N.get(u);if(d){c=d;break}p.push(u)}p.forEach(function(t){return N.set(t,c)})}var h=r._buildAnimation(n.namespaceId,i,R,l,F,j);if(n.setRealPlayer(h),c===z)U.push(n);else{var m=r.playersByElement.get(c);m&&m.length&&(n.parentPlayer=o(m)),s.push(n)}}else B(e,i.fromStyles),n.onDestroy(function(){return V(e,i.toStyles)}),H.push(n),f.has(e)&&s.push(n)}),H.forEach(function(t){var e=l.get(t.element);if(e&&e.length){var n=o(e);t.setRealPlayer(n)}}),s.forEach(function(t){t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(var G=0;G<w.length;G++){var W,q=(W=w[G])[Bt];if(te(W,P),!q||!q.hasAnimation){var Y=[];if(p.size){var $=p.get(W);$&&$.length&&Y.push.apply(Y,$);for(var K=this.driver.query(W,M,!0),Q=0;Q<K.length;Q++){var X=p.get(K[Q]);X&&X.length&&Y.push.apply(Y,X)}}var Z=Y.filter(function(t){return!t.destroyed});Z.length?ee(this,W,Z):this.processLeaveNode(W)}}return w.length=0,U.forEach(function(t){r.players.push(t),t.onDone(function(){t.destroy();var e=r.players.indexOf(t);r.players.splice(e,1)}),t.play()}),U},t.prototype.elementContainsData=function(t,e){var n=!1,r=e[Bt];return r&&r.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n},t.prototype.afterFlush=function(t){this._flushFns.push(t)},t.prototype.afterFlushAnimationsDone=function(t){this._whenQuietFns.push(t)},t.prototype._getPreviousPlayers=function(t,e,n,r,i){var o=[];if(e){var a=this.playersByQueriedElement.get(t);a&&(o=a)}else{var s=this.playersByElement.get(t);if(s){var l=!i||i==Ht;s.forEach(function(t){t.queued||(l||t.triggerName==r)&&o.push(t)})}}return(n||r)&&(o=o.filter(function(t){return(!n||n==t.namespaceId)&&(!r||r==t.triggerName)})),o},t.prototype._beforeAnimationBuild=function(t,e,n){for(var r=e.triggerName,i=e.element,o=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:r,s=function(t){var r=t.element,s=r!==i,c=u(n,r,[]);l._getPreviousPlayers(r,s,o,a,e.toState).forEach(function(t){var e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),c.push(t)})},l=this,c=0,p=e.timelines;c<p.length;c++){s(p[c])}B(i,e.fromStyles)},t.prototype._buildAnimation=function(t,n,r,i,s,l){var c=this,p=n.triggerName,d=n.element,h=[],f=new Set,m=new Set,g=n.timelines.map(function(n){var o=n.element;f.add(o);var u=o[Bt];if(u&&u.removedBeforeQueried)return new e.NoopAnimationPlayer;var g,y,v=o!==d,b=(g=(r.get(o)||jt).map(function(t){return t.getRealPlayer()}),y=[],function t(n,r){for(var i=0;i<n.length;i++){var o=n[i];o instanceof e.ɵAnimationGroupPlayer?t(o.players,r):r.push(o)}}(g,y),y).filter(function(t){var e=t;return!!e.element&&e.element===o}),_=s.get(o),w=l.get(o),C=a(c.driver,c._normalizer,0,n.keyframes,_,w),x=c._buildPlayer(n,C,b);if(n.subTimeline&&i&&m.add(o),v){var S=new Yt(t,p,o);S.setRealPlayer(x),h.push(S)}return x});h.forEach(function(t){u(c.playersByQueriedElement,t.element,[]).push(t),t.onDone(function(){return function(t,e,n){var r;if(t instanceof Map){if(r=t.get(e)){if(r.length){var i=r.indexOf(n);r.splice(i,1)}0==r.length&&t.delete(e)}}else if(r=t[e]){if(r.length){var i=r.indexOf(n);r.splice(i,1)}0==r.length&&delete t[e]}return r}(c.playersByQueriedElement,t.element,t)})}),f.forEach(function(t){return Jt(t,T)});var y=o(g);return y.onDestroy(function(){f.forEach(function(t){return te(t,T)}),V(d,n.toStyles)}),m.forEach(function(t){u(i,t,[]).push(y)}),y},t.prototype._buildPlayer=function(t,n,r){return n.length>0?this.driver.animate(t.element,n,t.duration,t.delay,t.easing,r):new e.NoopAnimationPlayer},t}(),Yt=function(){function t(t,n,r){this.namespaceId=t,this.triggerName=n,this.element=r,this._player=new e.NoopAnimationPlayer,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.queued=!0}return t.prototype.setRealPlayer=function(t){var e=this;this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(function(n){e._queuedCallbacks[n].forEach(function(e){return s(t,n,void 0,e)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.queued=!1)},t.prototype.getRealPlayer=function(){return this._player},t.prototype.syncPlayerEvents=function(t){var e=this,n=this._player;n.triggerCallback&&t.onStart(function(){return n.triggerCallback("start")}),t.onDone(function(){return e.finish()}),t.onDestroy(function(){return e.destroy()})},t.prototype._queueEvent=function(t,e){u(this._queuedCallbacks,t,[]).push(e)},t.prototype.onDone=function(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)},t.prototype.onStart=function(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)},t.prototype.onDestroy=function(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)},t.prototype.init=function(){this._player.init()},t.prototype.hasStarted=function(){return!this.queued&&this._player.hasStarted()},t.prototype.play=function(){!this.queued&&this._player.play()},t.prototype.pause=function(){!this.queued&&this._player.pause()},t.prototype.restart=function(){!this.queued&&this._player.restart()},t.prototype.finish=function(){this._player.finish()},t.prototype.destroy=function(){this.destroyed=!0,this._player.destroy()},t.prototype.reset=function(){!this.queued&&this._player.reset()},t.prototype.setPosition=function(t){this.queued||this._player.setPosition(t)},t.prototype.getPosition=function(){return this.queued?0:this._player.getPosition()},Object.defineProperty(t.prototype,"totalTime",{get:function(){return this._player.totalTime},enumerable:!0,configurable:!0}),t.prototype.triggerCallback=function(t){var e=this._player;e.triggerCallback&&e.triggerCallback(t)},t}();function $t(t){return t&&1===t.nodeType}function Kt(t,e){var n=t.style.display;return t.style.display=null!=e?e:"none",n}function Qt(t,e,n,r,i){var o=[];n.forEach(function(t){return o.push(Kt(t))});var a=[];r.forEach(function(n,r){var o={};n.forEach(function(t){var n=o[t]=e.computeStyle(r,t,i);n&&0!=n.length||(r[Bt]=Vt,a.push(r))}),t.set(r,o)});var s=0;return n.forEach(function(t){return Kt(t,o[s++])}),a}function Xt(t,e){var n=new Map;if(t.forEach(function(t){return n.set(t,[])}),0==e.length)return n;var r=1,i=new Set(e),o=new Map;return e.forEach(function(t){var e=function t(e){if(!e)return r;var a=o.get(e);if(a)return a;var s=e.parentNode;return a=n.has(s)?s:i.has(s)?r:t(s),o.set(e,a),a}(t);e!==r&&n.get(e).push(t)}),n}var Zt="$$classes";function Jt(t,e){if(t.classList)t.classList.add(e);else{var n=t[Zt];n||(n=t[Zt]={}),n[e]=!0}}function te(t,e){if(t.classList)t.classList.remove(e);else{var n=t[Zt];n&&delete n[e]}}function ee(t,e,n){o(n).onDone(function(){return t.processLeaveNode(e)})}function ne(t,e,n){var r=n.get(t);if(!r)return!1;var i=e.get(t);return i?r.forEach(function(t){return i.add(t)}):e.set(t,r),n.delete(t),!0}var re=function(){function t(t,e){var n=this;this._driver=t,this._triggerCache={},this.onRemovalComplete=function(t,e){},this._transitionEngine=new qt(t,e),this._timelineEngine=new It(t,e),this._transitionEngine.onRemovalComplete=function(t,e){return n.onRemovalComplete(t,e)}}return t.prototype.registerTrigger=function(t,e,n,r,i){var o=t+"-"+r,a=this._triggerCache[o];if(!a){var s=[],l=nt(this._driver,i,s);if(s.length)throw new Error('The animation trigger "'+r+'" has failed to build due to the following errors:\n - '+s.join("\n - "));a=new Dt(r,l),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(e,r,a)},t.prototype.register=function(t,e){this._transitionEngine.register(t,e)},t.prototype.destroy=function(t,e){this._transitionEngine.destroy(t,e)},t.prototype.onInsert=function(t,e,n,r){this._transitionEngine.insertNode(t,e,n,r)},t.prototype.onRemove=function(t,e,n){this._transitionEngine.removeNode(t,e,n)},t.prototype.disableAnimations=function(t,e){this._transitionEngine.markElementAsDisabled(t,e)},t.prototype.process=function(t,e,n,r){if("@"==n.charAt(0)){var i=p(n),o=i[0],a=i[1],s=r;this._timelineEngine.command(o,e,a,s)}else this._transitionEngine.trigger(t,e,n,r)},t.prototype.listen=function(t,e,n,r,i){if("@"==n.charAt(0)){var o=p(n),a=o[0],s=o[1];return this._timelineEngine.listen(a,e,s,i)}return this._transitionEngine.listen(t,e,n,r,i)},t.prototype.flush=function(t){void 0===t&&(t=-1),this._transitionEngine.flush(t)},Object.defineProperty(t.prototype,"players",{get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)},enumerable:!0,configurable:!0}),t.prototype.whenRenderingDone=function(){return this._transitionEngine.whenRenderingDone()},t}(),ie=function(){function t(t,e,n,r){void 0===r&&(r=[]);var i,o,a=this;this.element=t,this.keyframes=e,this.options=n,this.previousPlayers=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.previousStyles={},this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay,i=this._duration,o=this._delay,(0===i||0===o)&&r.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return a.previousStyles[t]=e[t]})})}return t.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])},t.prototype.init=function(){this._buildPlayer(),this._preparePlayerBeforeStart()},t.prototype._buildPlayer=function(){var t=this;if(!this._initialized){this._initialized=!0;var e=this.keyframes.map(function(t){return F(t,!1)}),n=Object.keys(this.previousStyles);if(n.length&&e.length){var r=e[0],i=[];if(n.forEach(function(e){r.hasOwnProperty(e)||i.push(e),r[e]=t.previousStyles[e]}),i.length)for(var o=this,a=function(){var t=e[s];i.forEach(function(e){t[e]=oe(o.element,e)})},s=1;s<e.length;s++)a()}this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",function(){return t._onFinish()})}},t.prototype._preparePlayerBeforeStart=function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()},t.prototype._triggerWebAnimation=function(t,e,n){return t.animate(e,n)},t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.play=function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[],this._started=!0),this.domPlayer.play()},t.prototype.pause=function(){this.init(),this.domPlayer.pause()},t.prototype.finish=function(){this.init(),this._onFinish(),this.domPlayer.finish()},t.prototype.reset=function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1},t.prototype._resetDomPlayerState=function(){this.domPlayer&&this.domPlayer.cancel()},t.prototype.restart=function(){this.reset(),this.play()},t.prototype.hasStarted=function(){return this._started},t.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype.setPosition=function(t){this.domPlayer.currentTime=t*this.time},t.prototype.getPosition=function(){return this.domPlayer.currentTime/this.time},Object.defineProperty(t.prototype,"totalTime",{get:function(){return this._delay+this._duration},enumerable:!0,configurable:!0}),t.prototype.beforeDestroy=function(){var t=this,e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(n){"offset"!=n&&(e[n]=t._finished?t._finalKeyframe[n]:oe(t.element,n))}),this.currentSnapshot=e},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t}();function oe(t,e){return window.getComputedStyle(t)[e]}var ae=function(){function t(){}return t.prototype.validateStyleProperty=function(t){return b(t)},t.prototype.matchesElement=function(t,e){return w(t,e)},t.prototype.containsElement=function(t,e){return C(t,e)},t.prototype.query=function(t,e,n){return x(t,e,n)},t.prototype.computeStyle=function(t,e,n){return window.getComputedStyle(t)[e]},t.prototype.animate=function(t,e,n,r,i,o){void 0===o&&(o=[]);var a={duration:n,delay:r,fill:0==r?"both":"forwards"};i&&(a.easing=i);var s=o.filter(function(t){return t instanceof ie});return new ie(t,e,a,s)},t}();t.AnimationDriver=E,t.ɵAnimation=wt,t.ɵAnimationStyleNormalizer=Ct,t.ɵNoopAnimationStyleNormalizer=xt,t.ɵWebAnimationsStyleNormalizer=St,t.ɵNoopAnimationDriver=S,t.ɵAnimationEngine=re,t.ɵWebAnimationsDriver=ae,t.ɵsupportsWebAnimations=function(){return"undefined"!=typeof Element&&"function"==typeof Element.prototype.animate},t.ɵWebAnimationsPlayer=ie,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/animations")):i((r.ng=r.ng||{},r.ng.animations=r.ng.animations||{},r.ng.animations.browser={}),r.ng.animations)},{"@angular/animations":44}],44:[function(t,e,n){var r;r=this,function(t){"use strict";var e=function(){},n=function(){};function r(t){Promise.resolve(null).then(t)}var i=function(){function t(){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=0}return t.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])},t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.hasStarted=function(){return this._started},t.prototype.init=function(){},t.prototype.play=function(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0},t.prototype.triggerMicrotask=function(){var t=this;r(function(){return t._onFinish()})},t.prototype._onStart=function(){this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[]},t.prototype.pause=function(){},t.prototype.restart=function(){},t.prototype.finish=function(){this._onFinish()},t.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype.reset=function(){},t.prototype.setPosition=function(t){},t.prototype.getPosition=function(){return 0},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t}(),o=function(){function t(t){var e=this;this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;var n=0,i=0,o=0,a=this.players.length;0==a?r(function(){return e._onFinish()}):this.players.forEach(function(t){t.onDone(function(){++n==a&&e._onFinish()}),t.onDestroy(function(){++i==a&&e._onDestroy()}),t.onStart(function(){++o==a&&e._onStart()})}),this.totalTime=this.players.reduce(function(t,e){return Math.max(t,e.totalTime)},0)}return t.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])},t.prototype.init=function(){this.players.forEach(function(t){return t.init()})},t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype._onStart=function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[])},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.hasStarted=function(){return this._started},t.prototype.play=function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(function(t){return t.play()})},t.prototype.pause=function(){this.players.forEach(function(t){return t.pause()})},t.prototype.restart=function(){this.players.forEach(function(t){return t.restart()})},t.prototype.finish=function(){this._onFinish(),this.players.forEach(function(t){return t.finish()})},t.prototype.destroy=function(){this._onDestroy()},t.prototype._onDestroy=function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(function(t){return t.destroy()}),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype.reset=function(){this.players.forEach(function(t){return t.reset()}),this._destroyed=!1,this._finished=!1,this._started=!1},t.prototype.setPosition=function(t){var e=t*this.totalTime;this.players.forEach(function(t){var n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})},t.prototype.getPosition=function(){var t=0;return this.players.forEach(function(e){var n=e.getPosition();t=Math.min(n,t)}),t},t.prototype.beforeDestroy=function(){this.players.forEach(function(t){t.beforeDestroy&&t.beforeDestroy()})},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t}();t.AnimationBuilder=e,t.AnimationFactory=n,t.AUTO_STYLE="*",t.animate=function(t,e){return void 0===e&&(e=null),{type:4,styles:e,timings:t}},t.animateChild=function(t){return void 0===t&&(t=null),{type:9,options:t}},t.animation=function(t,e){return void 0===e&&(e=null),{type:8,animation:t,options:e}},t.group=function(t,e){return void 0===e&&(e=null),{type:3,steps:t,options:e}},t.keyframes=function(t){return{type:5,steps:t}},t.query=function(t,e,n){return void 0===n&&(n=null),{type:11,selector:t,animation:e,options:n}},t.sequence=function(t,e){return void 0===e&&(e=null),{type:2,steps:t,options:e}},t.stagger=function(t,e){return{type:12,timings:t,animation:e}},t.state=function(t,e,n){return{type:0,name:t,styles:e,options:n}},t.style=function(t){return{type:6,styles:t,offset:null}},t.transition=function(t,e,n){return void 0===n&&(n=null),{type:1,expr:t,animation:e,options:n}},t.trigger=function(t,e){return{type:7,name:t,definitions:e,options:{}}},t.useAnimation=function(t,e){return void 0===e&&(e=null),{type:10,animation:t,options:e}},t.NoopAnimationPlayer=i,t.ɵAnimationGroupPlayer=o,t.ɵPRE_STYLE="!",Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r.ng=r.ng||{},r.ng.animations={}))},{}],45:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i,o,a,s,l,c,u,p,d,h){"use strict";var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function m(t,e){function n(){this.constructor=t}f(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var g=function(){function t(t){this._platform=t}return t.prototype.isDisabled=function(t){return t.hasAttribute("disabled")},t.prototype.isVisible=function(t){return!!((e=t).offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)&&"visible"===getComputedStyle(t).visibility;var e},t.prototype.isTabbable=function(t){if(!this._platform.isBrowser)return!1;var e=function(t){try{return t.frameElement}catch(t){return null}}(t.ownerDocument.defaultView||window);if(e){var n=e&&e.nodeName.toLowerCase();if(-1===v(e))return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&"object"===n)return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&!this.isVisible(e))return!1}var r,i,o,a=t.nodeName.toLowerCase(),s=v(t);if(t.hasAttribute("contenteditable"))return-1!==s;if("iframe"===a)return!1;if("audio"===a){if(!t.hasAttribute("controls"))return!1;if(this._platform.BLINK)return!0}if("video"===a){if(!t.hasAttribute("controls")&&this._platform.TRIDENT)return!1;if(this._platform.BLINK||this._platform.FIREFOX)return!0}return("object"!==a||!this._platform.BLINK&&!this._platform.WEBKIT)&&((!this._platform.WEBKIT||!this._platform.IOS||(i=(r=t).nodeName.toLowerCase(),"text"===(o="input"===i&&r.type)||"password"===o||"select"===i||"textarea"===i))&&t.tabIndex>=0)},t.prototype.isFocusable=function(t){return function(t){if(e=t,n=e,"input"==n.nodeName.toLowerCase()&&"hidden"==e.type)return!1;var e,n;return o=t,a=o.nodeName.toLowerCase(),"input"===a||"select"===a||"button"===a||"textarea"===a||(r=t,i=r,"a"==i.nodeName.toLowerCase()&&r.hasAttribute("href"))||t.hasAttribute("contenteditable")||y(t);var r,i;var o,a}(t)&&!this.isDisabled(t)&&this.isVisible(t)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:i.Platform}]},t}();function y(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;var e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function v(t){if(!y(t))return null;var e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}var b=function(){function t(t,e,n,r,i){void 0===i&&(i=!1),this._element=t,this._checker=e,this._ngZone=n,this._document=r,this._enabled=!0,i||this.attachAnchors()}return Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},set:function(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._startAnchor.tabIndex=this._endAnchor.tabIndex=this._enabled?0:-1)},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this._startAnchor&&this._startAnchor.parentNode&&this._startAnchor.parentNode.removeChild(this._startAnchor),this._endAnchor&&this._endAnchor.parentNode&&this._endAnchor.parentNode.removeChild(this._endAnchor),this._startAnchor=this._endAnchor=null},t.prototype.attachAnchors=function(){var t=this;this._startAnchor||(this._startAnchor=this._createAnchor()),this._endAnchor||(this._endAnchor=this._createAnchor()),this._ngZone.runOutsideAngular(function(){t._startAnchor.addEventListener("focus",function(){t.focusLastTabbableElement()}),t._endAnchor.addEventListener("focus",function(){t.focusFirstTabbableElement()}),t._element.parentNode&&(t._element.parentNode.insertBefore(t._startAnchor,t._element),t._element.parentNode.insertBefore(t._endAnchor,t._element.nextSibling))})},t.prototype.focusInitialElementWhenReady=function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusInitialElement())})})},t.prototype.focusFirstTabbableElementWhenReady=function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusFirstTabbableElement())})})},t.prototype.focusLastTabbableElementWhenReady=function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusLastTabbableElement())})})},t.prototype._getRegionBoundary=function(t){for(var e=this._element.querySelectorAll("[cdk-focus-region-"+t+"], [cdkFocusRegion"+t+"], [cdk-focus-"+t+"]"),n=0;n<e.length;n++)e[n].hasAttribute("cdk-focus-"+t)?console.warn("Found use of deprecated attribute 'cdk-focus-"+t+"', use 'cdkFocusRegion"+t+"' instead.",e[n]):e[n].hasAttribute("cdk-focus-region-"+t)&&console.warn("Found use of deprecated attribute 'cdk-focus-region-"+t+"', use 'cdkFocusRegion"+t+"' instead.",e[n]);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)},t.prototype.focusInitialElement=function(){var t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");return this._element.hasAttribute("cdk-focus-initial")&&console.warn("Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead.",this._element),t?(t.focus(),!0):this.focusFirstTabbableElement()},t.prototype.focusFirstTabbableElement=function(){var t=this._getRegionBoundary("start");return t&&t.focus(),!!t},t.prototype.focusLastTabbableElement=function(){var t=this._getRegionBoundary("end");return t&&t.focus(),!!t},t.prototype._getFirstTabbableElement=function(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;for(var e=t.children||t.childNodes,n=0;n<e.length;n++){var r=e[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[n]):null;if(r)return r}return null},t.prototype._getLastTabbableElement=function(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;for(var e=t.children||t.childNodes,n=e.length-1;n>=0;n--){var r=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(r)return r}return null},t.prototype._createAnchor=function(){var t=this._document.createElement("div");return t.tabIndex=this._enabled?0:-1,t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t},t.prototype._executeOnStable=function(t){this._ngZone.isStable?t():this._ngZone.onStable.asObservable().pipe(r.take(1)).subscribe(t)},t}(),_=function(){function t(t,e,n){this._checker=t,this._ngZone=e,this._document=n}return t.prototype.create=function(t,e){return void 0===e&&(e=!1),new b(t,this._checker,this._ngZone,this._document,e)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:g},{type:e.NgZone},{type:void 0,decorators:[{type:e.Inject,args:[o.DOCUMENT]}]}]},t}(),w=function(){function t(t,e){this._elementRef=t,this._focusTrapFactory=e,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return!this.focusTrap.enabled},set:function(t){this.focusTrap.enabled=!n.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.focusTrap.destroy()},t.prototype.ngAfterContentInit=function(){this.focusTrap.attachAnchors()},t.decorators=[{type:e.Directive,args:[{selector:"cdk-focus-trap"}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:_}]},t.propDecorators={disabled:[{type:e.Input}]},t}(),C=function(){function t(t,e,n){this._elementRef=t,this._focusTrapFactory=e,this._previouslyFocusedElement=null,this._document=n,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}return Object.defineProperty(t.prototype,"enabled",{get:function(){return this.focusTrap.enabled},set:function(t){this.focusTrap.enabled=n.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoCapture",{get:function(){return this._autoCapture},set:function(t){this._autoCapture=n.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)},t.prototype.ngAfterContentInit=function(){this.focusTrap.attachAnchors(),this.autoCapture&&(this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady())},t.decorators=[{type:e.Directive,args:[{selector:"[cdkTrapFocus]",exportAs:"cdkTrapFocus"}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:_},{type:void 0,decorators:[{type:e.Inject,args:[o.DOCUMENT]}]}]},t.propDecorators={enabled:[{type:e.Input,args:["cdkTrapFocus"]}],autoCapture:[{type:e.Input,args:["cdkTrapFocusAutoCapture"]}]},t}(),x=" ";function S(t,e){return(t.getAttribute(e)||"").match(/\S+/g)||[]}var E="cdk-describedby-message-container",k="cdk-describedby-message",O="cdk-describedby-host",P=0,A=new Map,D=null,T=function(){function t(t){this._document=t}return t.prototype.describe=function(t,e){this._canBeDescribed(t,e)&&(A.has(e)||this._createMessageElement(e),this._isElementDescribedByMessage(t,e)||this._addMessageReference(t,e))},t.prototype.removeDescription=function(t,e){if(this._canBeDescribed(t,e)){this._isElementDescribedByMessage(t,e)&&this._removeMessageReference(t,e);var n=A.get(e);n&&0===n.referenceCount&&this._deleteMessageElement(e),D&&0===D.childNodes.length&&this._deleteMessagesContainer()}},t.prototype.ngOnDestroy=function(){for(var t=this._document.querySelectorAll("["+O+"]"),e=0;e<t.length;e++)this._removeCdkDescribedByReferenceIds(t[e]),t[e].removeAttribute(O);D&&this._deleteMessagesContainer(),A.clear()},t.prototype._createMessageElement=function(t){var e=this._document.createElement("div");e.setAttribute("id",k+"-"+P++),e.appendChild(this._document.createTextNode(t)),D||this._createMessagesContainer(),D.appendChild(e),A.set(t,{messageElement:e,referenceCount:0})},t.prototype._deleteMessageElement=function(t){var e=A.get(t),n=e&&e.messageElement;D&&n&&D.removeChild(n),A.delete(t)},t.prototype._createMessagesContainer=function(){(D=this._document.createElement("div")).setAttribute("id",E),D.setAttribute("aria-hidden","true"),D.style.display="none",this._document.body.appendChild(D)},t.prototype._deleteMessagesContainer=function(){D&&D.parentNode&&(D.parentNode.removeChild(D),D=null)},t.prototype._removeCdkDescribedByReferenceIds=function(t){var e=S(t,"aria-describedby").filter(function(t){return 0!=t.indexOf(k)});t.setAttribute("aria-describedby",e.join(" "))},t.prototype._addMessageReference=function(t,e){var n,r,i,o,a=A.get(e);n=t,r="aria-describedby",i=a.messageElement.id,(o=S(n,r)).some(function(t){return t.trim()==i.trim()})||(o.push(i.trim()),n.setAttribute(r,o.join(x))),t.setAttribute(O,""),a.referenceCount++},t.prototype._removeMessageReference=function(t,e){var n,r,i,o,a=A.get(e);a.referenceCount--,n=t,r="aria-describedby",i=a.messageElement.id,o=S(n,r).filter(function(t){return t!=i.trim()}),n.setAttribute(r,o.join(x)),t.removeAttribute(O)},t.prototype._isElementDescribedByMessage=function(t,e){var n=S(t,"aria-describedby"),r=A.get(e),i=r&&r.messageElement.id;return!!i&&-1!=n.indexOf(i)},t.prototype._canBeDescribed=function(t,e){return t.nodeType===this._document.ELEMENT_NODE&&null!=e&&!!(""+e).trim()},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[o.DOCUMENT]}]}]},t}();function M(t,e){return t||new T(e)}var I={provide:T,deps:[[new e.Optional,new e.SkipSelf,T],o.DOCUMENT],useFactory:M},R=function(){function t(t){var e=this;this._items=t,this._activeItemIndex=-1,this._wrap=!1,this._letterKeyStream=new a.Subject,this._typeaheadSubscription=s.Subscription.EMPTY,this._vertical=!0,this._pressedLetters=[],this.tabOut=new a.Subject,this.change=new a.Subject,t.changes.subscribe(function(t){if(e._activeItem){var n=t.toArray().indexOf(e._activeItem);n>-1&&n!==e._activeItemIndex&&(e._activeItemIndex=n)}})}return t.prototype.withWrap=function(){return this._wrap=!0,this},t.prototype.withVerticalOrientation=function(t){return void 0===t&&(t=!0),this._vertical=t,this},t.prototype.withHorizontalOrientation=function(t){return this._horizontal=t,this},t.prototype.withTypeAhead=function(t){var e=this;if(void 0===t&&(t=200),this._items.length&&this._items.some(function(t){return"function"!=typeof t.getLabel}))throw Error("ListKeyManager items in typeahead mode must implement the `getLabel` method.");return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(d.tap(function(t){return e._pressedLetters.push(t)}),c.debounceTime(t),u.filter(function(){return e._pressedLetters.length>0}),p.map(function(){return e._pressedLetters.join("")})).subscribe(function(t){for(var n=e._items.toArray(),r=1;r<n.length+1;r++){var i=(e._activeItemIndex+r)%n.length,o=n[i];if(!o.disabled&&0===o.getLabel().toUpperCase().trim().indexOf(t)){e.setActiveItem(i);break}}e._pressedLetters=[]}),this},t.prototype.setActiveItem=function(t){var e=this._activeItemIndex;this._activeItemIndex=t,this._activeItem=this._items.toArray()[t],this._activeItemIndex!==e&&this.change.next(t)},t.prototype.onKeydown=function(t){var e=t.keyCode;switch(e){case l.TAB:return void this.tabOut.next();case l.DOWN_ARROW:if(this._vertical){this.setNextItemActive();break}return;case l.UP_ARROW:if(this._vertical){this.setPreviousItemActive();break}return;case l.RIGHT_ARROW:if("ltr"===this._horizontal){this.setNextItemActive();break}if("rtl"===this._horizontal){this.setPreviousItemActive();break}return;case l.LEFT_ARROW:if("ltr"===this._horizontal){this.setPreviousItemActive();break}if("rtl"===this._horizontal){this.setNextItemActive();break}return;default:return void(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=l.A&&e<=l.Z||e>=l.ZERO&&e<=l.NINE)&&this._letterKeyStream.next(String.fromCharCode(e)))}this._pressedLetters=[],t.preventDefault()},Object.defineProperty(t.prototype,"activeItemIndex",{get:function(){return this._activeItemIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeItem",{get:function(){return this._activeItem},enumerable:!0,configurable:!0}),t.prototype.setFirstItemActive=function(){this._setActiveItemByIndex(0,1)},t.prototype.setLastItemActive=function(){this._setActiveItemByIndex(this._items.length-1,-1)},t.prototype.setNextItemActive=function(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)},t.prototype.setPreviousItemActive=function(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)},t.prototype.updateActiveItemIndex=function(t){this._activeItemIndex=t},t.prototype._setActiveItemByDelta=function(t,e){void 0===e&&(e=this._items.toArray()),this._wrap?this._setActiveInWrapMode(t,e):this._setActiveInDefaultMode(t,e)},t.prototype._setActiveInWrapMode=function(t,e){for(var n=1;n<=e.length;n++){var r=(this._activeItemIndex+t*n+e.length)%e.length;if(!e[r].disabled)return void this.setActiveItem(r)}},t.prototype._setActiveInDefaultMode=function(t,e){this._setActiveItemByIndex(this._activeItemIndex+t,t,e)},t.prototype._setActiveItemByIndex=function(t,e,n){if(void 0===n&&(n=this._items.toArray()),n[t]){for(;n[t].disabled;)if(!n[t+=e])return;this.setActiveItem(t)}},t}(),N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.setActiveItem=function(e){this.activeItem&&this.activeItem.setInactiveStyles(),t.prototype.setActiveItem.call(this,e),this.activeItem&&this.activeItem.setActiveStyles()},e}(R),L=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._origin="program",e}return m(e,t),e.prototype.setFocusOrigin=function(t){return this._origin=t,this},e.prototype.setActiveItem=function(e){t.prototype.setActiveItem.call(this,e),this.activeItem&&this.activeItem.focus(this._origin)},e}(R),j=new e.InjectionToken("liveAnnouncerElement"),F=function(){function t(t,e){this._document=e,this._liveElement=t||this._createLiveElement()}return t.prototype.announce=function(t,e){var n=this;return void 0===e&&(e="polite"),this._liveElement.textContent="",this._liveElement.setAttribute("aria-live",e),new Promise(function(e){setTimeout(function(){n._liveElement.textContent=t,e()},100)})},t.prototype.ngOnDestroy=function(){this._liveElement&&this._liveElement.parentNode&&this._liveElement.parentNode.removeChild(this._liveElement)},t.prototype._createLiveElement=function(){var t=this._document.createElement("div");return t.classList.add("cdk-visually-hidden"),t.setAttribute("aria-atomic","true"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),t},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[j]}]},{type:void 0,decorators:[{type:e.Inject,args:[o.DOCUMENT]}]}]},t}();function V(t,e,n){return t||new F(e,n)}var B={provide:F,deps:[[new e.Optional,new e.SkipSelf,F],[new e.Optional,new e.Inject(j)],o.DOCUMENT],useFactory:V},U=function(){function t(t,e){this._ngZone=t,this._platform=e,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._unregisterGlobalListeners=function(){},this._monitoredElementCount=0}return t.prototype.monitor=function(t,n,r){var i=this;if(n instanceof e.Renderer2||(r=n),r=!!r,!this._platform.isBrowser)return h.of(null);if(this._elementInfo.has(t)){var o=this._elementInfo.get(t);return o.checkChildren=r,o.subject.asObservable()}var s={unlisten:function(){},checkChildren:r,subject:new a.Subject};this._elementInfo.set(t,s),this._incrementMonitoredElementCount();var l=function(e){return i._onFocus(e,t)},c=function(e){return i._onBlur(e,t)};return this._ngZone.runOutsideAngular(function(){t.addEventListener("focus",l,!0),t.addEventListener("blur",c,!0)}),s.unlisten=function(){t.removeEventListener("focus",l,!0),t.removeEventListener("blur",c,!0)},s.subject.asObservable()},t.prototype.stopMonitoring=function(t){var e=this._elementInfo.get(t);e&&(e.unlisten(),e.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._decrementMonitoredElementCount())},t.prototype.focusVia=function(t,e){this._setOriginForCurrentEventQueue(e),t.focus()},t.prototype.ngOnDestroy=function(){var t=this;this._elementInfo.forEach(function(e,n){return t.stopMonitoring(n)})},t.prototype._registerGlobalListeners=function(){var t=this;if(this._platform.isBrowser){var e=function(){t._lastTouchTarget=null,t._setOriginForCurrentEventQueue("keyboard")},n=function(){t._lastTouchTarget||t._setOriginForCurrentEventQueue("mouse")},r=function(e){null!=t._touchTimeoutId&&clearTimeout(t._touchTimeoutId),t._lastTouchTarget=e.target,t._touchTimeoutId=setTimeout(function(){return t._lastTouchTarget=null},650)},o=function(){t._windowFocused=!0,t._windowFocusTimeoutId=setTimeout(function(){return t._windowFocused=!1},0)};this._ngZone.runOutsideAngular(function(){document.addEventListener("keydown",e,!0),document.addEventListener("mousedown",n,!0),document.addEventListener("touchstart",r,!i.supportsPassiveEventListeners()||{passive:!0,capture:!0}),window.addEventListener("focus",o)}),this._unregisterGlobalListeners=function(){document.removeEventListener("keydown",e,!0),document.removeEventListener("mousedown",n,!0),document.removeEventListener("touchstart",r,!i.supportsPassiveEventListeners()||{passive:!0,capture:!0}),window.removeEventListener("focus",o),clearTimeout(t._windowFocusTimeoutId),clearTimeout(t._touchTimeoutId),clearTimeout(t._originTimeoutId)}}},t.prototype._toggleClass=function(t,e,n){n?t.classList.add(e):t.classList.remove(e)},t.prototype._setClasses=function(t,e){this._elementInfo.get(t)&&(this._toggleClass(t,"cdk-focused",!!e),this._toggleClass(t,"cdk-touch-focused","touch"===e),this._toggleClass(t,"cdk-keyboard-focused","keyboard"===e),this._toggleClass(t,"cdk-mouse-focused","mouse"===e),this._toggleClass(t,"cdk-program-focused","program"===e))},t.prototype._setOriginForCurrentEventQueue=function(t){var e=this;this._origin=t,this._originTimeoutId=setTimeout(function(){return e._origin=null},0)},t.prototype._wasCausedByTouch=function(t){var e=t.target;return this._lastTouchTarget instanceof Node&&e instanceof Node&&(e===this._lastTouchTarget||e.contains(this._lastTouchTarget))},t.prototype._onFocus=function(t,e){var n=this._elementInfo.get(e);n&&(n.checkChildren||e===t.target)&&(this._origin||(this._windowFocused&&this._lastFocusOrigin?this._origin=this._lastFocusOrigin:this._wasCausedByTouch(t)?this._origin="touch":this._origin="program"),this._setClasses(e,this._origin),n.subject.next(this._origin),this._lastFocusOrigin=this._origin,this._origin=null)},t.prototype._onBlur=function(t,e){var n=this._elementInfo.get(e);!n||n.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),n.subject.next(null))},t.prototype._incrementMonitoredElementCount=function(){1==++this._monitoredElementCount&&this._registerGlobalListeners()},t.prototype._decrementMonitoredElementCount=function(){--this._monitoredElementCount||(this._unregisterGlobalListeners(),this._unregisterGlobalListeners=function(){})},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:e.NgZone},{type:i.Platform}]},t}(),H=function(){function t(t,n){var r=this;this._elementRef=t,this._focusMonitor=n,this.cdkFocusChange=new e.EventEmitter,this._monitorSubscription=this._focusMonitor.monitor(this._elementRef.nativeElement,this._elementRef.nativeElement.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(function(t){return r.cdkFocusChange.emit(t)})}return t.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement),this._monitorSubscription.unsubscribe()},t.decorators=[{type:e.Directive,args:[{selector:"[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]"}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:U}]},t.propDecorators={cdkFocusChange:[{type:e.Output}]},t}();function z(t,e,n){return t||new U(e,n)}var G={provide:U,deps:[[new e.Optional,new e.SkipSelf,U],e.NgZone,i.Platform],useFactory:z};var W=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[o.CommonModule,i.PlatformModule],declarations:[C,w,H],exports:[C,w,H],providers:[g,_,T,B,I,G]}]}],t.ctorParameters=function(){return[]},t}();t.FocusTrapDirective=C,t.MESSAGES_CONTAINER_ID=E,t.CDK_DESCRIBEDBY_ID_PREFIX=k,t.CDK_DESCRIBEDBY_HOST_ATTRIBUTE=O,t.AriaDescriber=T,t.ARIA_DESCRIBER_PROVIDER_FACTORY=M,t.ARIA_DESCRIBER_PROVIDER=I,t.ActiveDescendantKeyManager=N,t.FocusKeyManager=L,t.ListKeyManager=R,t.FocusTrap=b,t.FocusTrapFactory=_,t.FocusTrapDeprecatedDirective=w,t.CdkTrapFocus=C,t.InteractivityChecker=g,t.LIVE_ANNOUNCER_ELEMENT_TOKEN=j,t.LiveAnnouncer=F,t.LIVE_ANNOUNCER_PROVIDER_FACTORY=V,t.LIVE_ANNOUNCER_PROVIDER=B,t.TOUCH_BUFFER_MS=650,t.FocusMonitor=U,t.CdkMonitorFocus=H,t.FOCUS_MONITOR_PROVIDER_FACTORY=z,t.FOCUS_MONITOR_PROVIDER=G,t.isFakeMousedownFromScreenReader=function(t){return 0===t.buttons},t.A11yModule=W,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core"),t("@angular/cdk/coercion"),t("rxjs/operators/take"),t("@angular/cdk/platform"),t("@angular/common"),t("rxjs/Subject"),t("rxjs/Subscription"),t("@angular/cdk/keycodes"),t("rxjs/operators/debounceTime"),t("rxjs/operators/filter"),t("rxjs/operators/map"),t("rxjs/operators/tap"),t("rxjs/observable/of")):i((r.ng=r.ng||{},r.ng.cdk=r.ng.cdk||{},r.ng.cdk.a11y=r.ng.cdk.a11y||{}),r.ng.core,r.ng.cdk.coercion,r.Rx.operators,r.ng.cdk.platform,r.ng.common,r.Rx,r.Rx,r.ng.cdk.keycodes,r.Rx.operators,r.Rx.operators,r.Rx.operators,r.Rx.operators,r.Rx.Observable)},{"@angular/cdk/coercion":48,"@angular/cdk/keycodes":50,"@angular/cdk/platform":54,"@angular/common":60,"@angular/core":62,"rxjs/Subject":77,"rxjs/Subscription":80,"rxjs/observable/of":105,"rxjs/operators/debounceTime":126,"rxjs/operators/filter":130,"rxjs/operators/map":134,"rxjs/operators/take":145,"rxjs/operators/tap":148}],46:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r){"use strict";var i=0,o=function(){function t(){this.id="cdk-accordion-"+i++,this._multi=!1}return Object.defineProperty(t.prototype,"multi",{get:function(){return this._multi},set:function(t){this._multi=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.decorators=[{type:e.Directive,args:[{selector:"cdk-accordion, [cdkAccordion]",exportAs:"cdkAccordion"}]}],t.ctorParameters=function(){return[]},t.propDecorators={multi:[{type:e.Input}]},t}(),a=0,s=function(){function t(t,n,r){var i=this;this.accordion=t,this._changeDetectorRef=n,this._expansionDispatcher=r,this.closed=new e.EventEmitter,this.opened=new e.EventEmitter,this.destroyed=new e.EventEmitter,this.expandedChange=new e.EventEmitter,this.id="cdk-accordion-child-"+a++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=function(){},this._removeUniqueSelectionListener=r.listen(function(t,e){i.accordion&&!i.accordion.multi&&i.accordion.id===e&&i.id!==t&&(i.expanded=!1)})}return Object.defineProperty(t.prototype,"expanded",{get:function(){return this._expanded},set:function(t){if(t=r.coerceBooleanProperty(t),this._expanded!==t){if(this._expanded=t,this.expandedChange.emit(t),t){this.opened.emit();var e=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,e)}else this.closed.emit();this._changeDetectorRef.markForCheck()}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.destroyed.emit(),this._removeUniqueSelectionListener()},t.prototype.toggle=function(){this.disabled||(this.expanded=!this.expanded)},t.prototype.close=function(){this.disabled||(this.expanded=!1)},t.prototype.open=function(){this.disabled||(this.expanded=!0)},t.decorators=[{type:e.Directive,args:[{selector:"cdk-accordion-item",exportAs:"cdkAccordionItem"}]}],t.ctorParameters=function(){return[{type:o,decorators:[{type:e.Optional}]},{type:e.ChangeDetectorRef},{type:n.UniqueSelectionDispatcher}]},t.propDecorators={closed:[{type:e.Output}],opened:[{type:e.Output}],destroyed:[{type:e.Output}],expandedChange:[{type:e.Output}],expanded:[{type:e.Input}],disabled:[{type:e.Input}]},t}(),l=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{exports:[o,s],declarations:[o,s],providers:[n.UNIQUE_SELECTION_DISPATCHER_PROVIDER]}]}],t.ctorParameters=function(){return[]},t}();t.CdkAccordionItem=s,t.CdkAccordion=o,t.CdkAccordionModule=l,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core"),t("@angular/cdk/collections"),t("@angular/cdk/coercion")):i((r.ng=r.ng||{},r.ng.cdk=r.ng.cdk||{},r.ng.cdk.accordion=r.ng.cdk.accordion||{}),r.ng.core,r.ng.cdk.collections,r.ng.cdk.coercion)},{"@angular/cdk/coercion":48,"@angular/cdk/collections":49,"@angular/core":62}],47:[function(t,e,n){var r,i;r=this,i=function(t,e,n){"use strict";var r=new e.InjectionToken("cdk-dir-doc"),i=function(){function t(t){if(this.value="ltr",this.change=new e.EventEmitter,t){var n=t.body?t.body.dir:null,r=t.documentElement?t.documentElement.dir:null;this.value=n||r||"ltr"}}return t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[r]}]}]},t}(),o=function(){function t(){this._dir="ltr",this._isInitialized=!1,this.change=new e.EventEmitter}return Object.defineProperty(t.prototype,"dir",{get:function(){return this._dir},set:function(t){var e=this._dir;this._dir=t,e!==this._dir&&this._isInitialized&&this.change.emit(this._dir)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.dir},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._isInitialized=!0},t.prototype.ngOnDestroy=function(){this.change.complete()},t.decorators=[{type:e.Directive,args:[{selector:"[dir]",providers:[{provide:i,useExisting:t}],host:{"[dir]":"dir"},exportAs:"dir"}]}],t.ctorParameters=function(){return[]},t.propDecorators={change:[{type:e.Output,args:["dirChange"]}],dir:[{type:e.Input}]},t}(),a=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{exports:[o],declarations:[o],providers:[{provide:r,useExisting:n.DOCUMENT},i]}]}],t.ctorParameters=function(){return[]},t}();t.Directionality=i,t.DIR_DOCUMENT=r,t.Dir=o,t.BidiModule=a,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core"),t("@angular/common")):i((r.ng=r.ng||{},r.ng.cdk=r.ng.cdk||{},r.ng.cdk.bidi=r.ng.cdk.bidi||{}),r.ng.core,r.ng.common)},{"@angular/common":60,"@angular/core":62}],48:[function(t,e,n){var r;r=this,function(t){"use strict";function e(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}t.coerceBooleanProperty=function(t){return null!=t&&""+t!="false"},t.coerceNumberProperty=function(t,n){return void 0===n&&(n=0),e(t)?Number(t):n},t._isNumberValue=e,t.coerceArray=function(t){return Array.isArray(t)?t:[t]},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r.ng=r.ng||{},r.ng.cdk=r.ng.cdk||{},r.ng.cdk.coercion=r.ng.cdk.coercion||{}))},{}],49:[function(t,e,n){var r,i;r=this,i=function(t,e,n){"use strict";var r=function(){},i=function(){function t(t,n,r){void 0===t&&(t=!1),void 0===r&&(r=!0);var i=this;this._multiple=t,this._emitChanges=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.onChange=this._emitChanges?new e.Subject:null,n&&n.length&&(t?n.forEach(function(t){return i._markSelected(t)}):this._markSelected(n[0]),this._selectedToEmit.length=0)}return Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected},enumerable:!0,configurable:!0}),t.prototype.select=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._verifyValueAssignment(e),e.forEach(function(e){return t._markSelected(e)}),this._emitChangeEvent()},t.prototype.deselect=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._verifyValueAssignment(e),e.forEach(function(e){return t._unmarkSelected(e)}),this._emitChangeEvent()},t.prototype.toggle=function(t){this.isSelected(t)?this.deselect(t):this.select(t)},t.prototype.clear=function(){this._unmarkAll(),this._emitChangeEvent()},t.prototype.isSelected=function(t){return this._selection.has(t)},t.prototype.isEmpty=function(){return 0===this._selection.size},t.prototype.hasValue=function(){return!this.isEmpty()},t.prototype.sort=function(t){this._multiple&&this._selected&&this._selected.sort(t)},t.prototype._emitChangeEvent=function(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.onChange&&this.onChange.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])},t.prototype._markSelected=function(t){this.isSelected(t)||(this._multiple||this._unmarkAll(),this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))},t.prototype._unmarkSelected=function(t){this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))},t.prototype._unmarkAll=function(){var t=this;this.isEmpty()||this._selection.forEach(function(e){return t._unmarkSelected(e)})},t.prototype._verifyValueAssignment=function(t){if(t.length>1&&!this._multiple)throw o()},t}();function o(){return Error("Cannot pass multiple values into SelectionModel with single-value mode.")}var a=function(){function t(){this._listeners=[]}return t.prototype.notify=function(t,e){for(var n=0,r=this._listeners;n<r.length;n++){(0,r[n])(t,e)}},t.prototype.listen=function(t){var e=this;return this._listeners.push(t),function(){e._listeners=e._listeners.filter(function(e){return t!==e})}},t.prototype.ngOnDestroy=function(){this._listeners=[]},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[]},t}();function s(t){return t||new a}var l={provide:a,deps:[[new n.Optional,new n.SkipSelf,a]],useFactory:s};t.UniqueSelectionDispatcher=a,t.UNIQUE_SELECTION_DISPATCHER_PROVIDER=l,t.DataSource=r,t.SelectionModel=i,t.getMultipleValuesInSingleSelectionError=o,t.ɵa=s,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("rxjs/Subject"),t("@angular/core")):i((r.ng=r.ng||{},r.ng.cdk=r.ng.cdk||{},r.ng.cdk.collections=r.ng.cdk.collections||{}),r.Rx,r.ng.core)},{"@angular/core":62,"rxjs/Subject":77}],50:[function(t,e,n){var r;r=this,function(t){"use strict";t.UP_ARROW=38,t.DOWN_ARROW=40,t.RIGHT_ARROW=39,t.LEFT_ARROW=37,t.PAGE_UP=33,t.PAGE_DOWN=34,t.HOME=36,t.END=35,t.ENTER=13,t.SPACE=32,t.TAB=9,t.ESCAPE=27,t.BACKSPACE=8,t.DELETE=46,t.A=65,t.Z=90,t.ZERO=48,t.NINE=57,t.COMMA=188,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r.ng=r.ng||{},r.ng.cdk=r.ng.cdk||{},r.ng.cdk.keycodes=r.ng.cdk.keycodes||{}))},{}],51:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i,o,a,s,l,c){"use strict";var u=new Map,p=function(){function t(t){this.platform=t,this._matchMedia=this.platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):d}return t.prototype.matchMedia=function(t){return this.platform.WEBKIT&&function(t){if(!u.has(t))try{var e=document.createElement("style");if(e.setAttribute("type","text/css"),!e.sheet){var n="@media "+t+" {.fx-query-test{ }}";e.appendChild(document.createTextNode(n))}document.getElementsByTagName("head")[0].appendChild(e),u.set(t,e)}catch(t){console.error(t)}}(t),this._matchMedia(t)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:n.Platform}]},t}();function d(t){return{matches:"all"===t||""===t,media:t,addListener:function(){},removeListener:function(){}}}var h=function(){function t(t,e){this.mediaMatcher=t,this.zone=e,this._queries=new Map,this._destroySubject=new r.Subject}return t.prototype.ngOnDestroy=function(){this._destroySubject.next(),this._destroySubject.complete()},t.prototype.isMatched=function(t){var e=this;return s.coerceArray(t).some(function(t){return e._registerQuery(t).mql.matches})},t.prototype.observe=function(t){var e=this,n=s.coerceArray(t).map(function(t){return e._registerQuery(t).observable});return l.combineLatest(n,function(t,e){return{matches:!!(t&&t.matches||e&&e.matches)}})},t.prototype._registerQuery=function(t){var e=this;if(this._queries.has(t))return this._queries.get(t);var n=this.mediaMatcher.matchMedia(t),r={observable:c.fromEventPattern(function(t){n.addListener(function(n){return e.zone.run(function(){return t(n)})})},function(t){n.removeListener(function(n){return e.zone.run(function(){return t(n)})})}).pipe(a.takeUntil(this._destroySubject),o.startWith(n),i.map(function(t){return{matches:t.matches}})),mql:n};return this._queries.set(t,r),r},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:p},{type:e.NgZone}]},t}(),f=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{providers:[h,p],imports:[n.PlatformModule]}]}],t.ctorParameters=function(){return[]},t}();t.LayoutModule=f,t.BreakpointObserver=h,t.Breakpoints={XSmall:"(max-width: 599px)",Small:"(min-width: 600px) and (max-width: 959px)",Medium:"(min-width: 960px) and (max-width: 1279px)",Large:"(min-width: 1280px) and (max-width: 1919px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599px) and (orientation: portrait), (max-width: 959px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"},t.MediaMatcher=p,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core"),t("@angular/cdk/platform"),t("rxjs/Subject"),t("rxjs/operators/map"),t("rxjs/operators/startWith"),t("rxjs/operators/takeUntil"),t("@angular/cdk/coercion"),t("rxjs/observable/combineLatest"),t("rxjs/observable/fromEventPattern")):i((r.ng=r.ng||{},r.ng.cdk=r.ng.cdk||{},r.ng.cdk.layout=r.ng.cdk.layout||{}),r.ng.core,r.ng.cdk.platform,r.Rx,r.Rx.operators,r.Rx.operators,r.Rx.operators,r.ng.cdk.coercion,r.Rx.Observable,r.Rx.Observable)},{"@angular/cdk/coercion":48,"@angular/cdk/platform":54,"@angular/core":62,"rxjs/Subject":77,"rxjs/observable/combineLatest":95,"rxjs/observable/fromEventPattern":102,"rxjs/operators/map":134,"rxjs/operators/startWith":143,"rxjs/operators/takeUntil":147}],52:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i){"use strict";var o=function(){function t(){}return t.prototype.create=function(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}(),a=function(){function t(t,n,i){this._mutationObserverFactory=t,this._elementRef=n,this._ngZone=i,this._disabled=!1,this.event=new e.EventEmitter,this._debouncer=new r.Subject}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=n.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this.debounce>0?this._ngZone.runOutsideAngular(function(){t._debouncer.pipe(i.debounceTime(t.debounce)).subscribe(function(e){return t.event.emit(e)})}):this._debouncer.subscribe(function(e){return t.event.emit(e)}),this._observer=this._ngZone.runOutsideAngular(function(){return t._mutationObserverFactory.create(function(e){t._debouncer.next(e)})}),this.disabled||this._enable()},t.prototype.ngOnChanges=function(t){t.disabled&&(t.disabled.currentValue?this._disable():this._enable())},t.prototype.ngOnDestroy=function(){this._disable(),this._debouncer.complete()},t.prototype._disable=function(){this._observer&&this._observer.disconnect()},t.prototype._enable=function(){this._observer&&this._observer.observe(this._elementRef.nativeElement,{characterData:!0,childList:!0,subtree:!0})},t.decorators=[{type:e.Directive,args:[{selector:"[cdkObserveContent]",exportAs:"cdkObserveContent"}]}],t.ctorParameters=function(){return[{type:o},{type:e.ElementRef},{type:e.NgZone}]},t.propDecorators={event:[{type:e.Output,args:["cdkObserveContent"]}],disabled:[{type:e.Input,args:["cdkObserveContentDisabled"]}],debounce:[{type:e.Input}]},t}(),s=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{exports:[a],declarations:[a],providers:[o]}]}],t.ctorParameters=function(){return[]},t}();t.ObserveContent=a,t.MutationObserverFactory=o,t.CdkObserveContent=a,t.ObserversModule=s,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core"),t("@angular/cdk/coercion"),t("rxjs/Subject"),t("rxjs/operators/debounceTime")):i((r.ng=r.ng||{},r.ng.cdk=r.ng.cdk||{},r.ng.cdk.observers=r.ng.cdk.observers||{}),r.ng.core,r.ng.cdk.coercion,r.Rx,r.Rx.operators)},{"@angular/cdk/coercion":48,"@angular/core":62,"rxjs/Subject":77,"rxjs/operators/debounceTime":126}],53:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i,o,a,s,l,c,u,p,d){"use strict";var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};var f=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},m=function(){function t(){}return t.prototype.enable=function(){},t.prototype.disable=function(){},t.prototype.attach=function(){},t}(),g=function(t){var e=this;this.scrollStrategy=new m,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.direction="ltr",t&&Object.keys(t).filter(function(e){return void 0!==t[e]}).forEach(function(n){return e[n]=t[n]})},y=function(t,e,n,r){this.offsetX=n,this.offsetY=r,this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY},v=function(){},b=function(){function t(t,e){this.connectionPair=t,this.scrollableViewProperties=e}return t.ctorParameters=function(){return[{type:y},{type:v,decorators:[{type:e.Optional}]}]},t}();function _(){return Error("Scroll strategy has already been attached.")}var w=function(){function t(t,e,n,r){var i=this;this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=n,this._config=r,this._scrollSubscription=null,this._detach=function(){i.disable(),i._overlayRef.hasAttached()&&i._ngZone.run(function(){return i._overlayRef.detach()})}}return t.prototype.attach=function(t){if(this._overlayRef)throw _();this._overlayRef=t},t.prototype.enable=function(){var t=this;if(!this._scrollSubscription){var e=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(function(){var e=t._viewportRuler.getViewportScrollPosition().top;Math.abs(e-t._initialScrollPosition)>t._config.threshold?t._detach():t._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}},t.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},t}(),C=function(){function t(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}return t.prototype.attach=function(){},t.prototype.enable=function(){if(this._canBeEnabled()){var t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=-this._previousScrollPosition.left+"px",t.style.top=-this._previousScrollPosition.top+"px",t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}},t.prototype.disable=function(){if(this._isEnabled){var t=this._document.documentElement,e=this._document.body,n=t.style.scrollBehavior||"",r=e.style.scrollBehavior||"";this._isEnabled=!1,t.style.left=this._previousHTMLStyles.left,t.style.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),t.style.scrollBehavior=e.style.scrollBehavior="auto",window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),t.style.scrollBehavior=n,e.style.scrollBehavior=r}},t.prototype._canBeEnabled=function(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;var t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width},t}();function x(t,e){return e.some(function(e){var n=t.bottom<e.top,r=t.top>e.bottom,i=t.right<e.left,o=t.left>e.right;return n||r||i||o})}function S(t,e){return e.some(function(e){var n=t.top<e.top,r=t.bottom>e.bottom,i=t.left<e.left,o=t.right>e.right;return n||r||i||o})}var E=function(){function t(t,e,n,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this._config=r,this._scrollSubscription=null}return t.prototype.attach=function(t){if(this._overlayRef)throw _();this._overlayRef=t},t.prototype.enable=function(){var t=this;if(!this._scrollSubscription){var e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(function(){if(t._overlayRef.updatePosition(),t._config&&t._config.autoClose){var e=t._overlayRef.overlayElement.getBoundingClientRect(),n=t._viewportRuler.getViewportSize(),r=n.width,i=n.height;x(e,[{width:r,height:i,bottom:i,right:r,top:0,left:0}])&&(t.disable(),t._ngZone.run(function(){return t._overlayRef.detach()}))}})}},t.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},t}(),k=function(){function t(t,e,n,r){var i=this;this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this.noop=function(){return new m},this.close=function(t){return new w(i._scrollDispatcher,i._ngZone,i._viewportRuler,t)},this.block=function(){return new C(i._viewportRuler,i._document)},this.reposition=function(t){return new E(i._scrollDispatcher,i._viewportRuler,i._ngZone,t)},this._document=r}return t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:n.ScrollDispatcher},{type:n.ViewportRuler},{type:e.NgZone},{type:void 0,decorators:[{type:e.Inject,args:[r.DOCUMENT]}]}]},t}(),O=function(){function t(t,e,n,r,i,o){this._portalOutlet=t,this._pane=e,this._config=n,this._ngZone=r,this._keyboardDispatcher=i,this._document=o,this._backdropElement=null,this._backdropClick=new s.Subject,this._attachments=new s.Subject,this._detachments=new s.Subject,this._keydownEvents=new s.Subject,n.scrollStrategy&&n.scrollStrategy.attach(this)}return Object.defineProperty(t.prototype,"overlayElement",{get:function(){return this._pane},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backdropElement",{get:function(){return this._backdropElement},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){var e=this,n=this._portalOutlet.attach(t);return this._config.positionStrategy&&this._config.positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._config.scrollStrategy&&this._config.scrollStrategy.enable(),this._ngZone.onStable.asObservable().pipe(a.take(1)).subscribe(function(){e.hasAttached()&&e.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&(Array.isArray(this._config.panelClass)?this._config.panelClass.forEach(function(t){return e._pane.classList.add(t)}):this._pane.classList.add(this._config.panelClass)),this._attachments.next(),this._keyboardDispatcher.add(this),n},t.prototype.detach=function(){if(this.hasAttached()){this.detachBackdrop(),this._togglePointerEvents(!1),this._config.positionStrategy&&this._config.positionStrategy.detach&&this._config.positionStrategy.detach(),this._config.scrollStrategy&&this._config.scrollStrategy.disable();var t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),t}},t.prototype.dispose=function(){var t=this.hasAttached();this._config.positionStrategy&&this._config.positionStrategy.dispose(),this._config.scrollStrategy&&this._config.scrollStrategy.disable(),this.detachBackdrop(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),t&&this._detachments.next(),this._detachments.complete()},t.prototype.hasAttached=function(){return this._portalOutlet.hasAttached()},t.prototype.backdropClick=function(){return this._backdropClick.asObservable()},t.prototype.attachments=function(){return this._attachments.asObservable()},t.prototype.detachments=function(){return this._detachments.asObservable()},t.prototype.keydownEvents=function(){return this._keydownEvents.asObservable()},t.prototype.getConfig=function(){return this._config},t.prototype.updatePosition=function(){this._config.positionStrategy&&this._config.positionStrategy.apply()},t.prototype.updateSize=function(t){this._config=f({},this._config,t),this._updateElementSize()},t.prototype.setDirection=function(t){this._config=f({},this._config,{direction:t}),this._updateElementDirection()},t.prototype._updateElementDirection=function(){this._pane.setAttribute("dir",this._config.direction)},t.prototype._updateElementSize=function(){(this._config.width||0===this._config.width)&&(this._pane.style.width=P(this._config.width)),(this._config.height||0===this._config.height)&&(this._pane.style.height=P(this._config.height)),(this._config.minWidth||0===this._config.minWidth)&&(this._pane.style.minWidth=P(this._config.minWidth)),(this._config.minHeight||0===this._config.minHeight)&&(this._pane.style.minHeight=P(this._config.minHeight)),(this._config.maxWidth||0===this._config.maxWidth)&&(this._pane.style.maxWidth=P(this._config.maxWidth)),(this._config.maxHeight||0===this._config.maxHeight)&&(this._pane.style.maxHeight=P(this._config.maxHeight))},t.prototype._togglePointerEvents=function(t){this._pane.style.pointerEvents=t?"auto":"none"},t.prototype._attachBackdrop=function(){var t=this,e="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._backdropElement.classList.add(this._config.backdropClass),this._pane.parentElement.insertBefore(this._backdropElement,this._pane),this._backdropElement.addEventListener("click",function(e){return t._backdropClick.next(e)}),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){t._backdropElement&&t._backdropElement.classList.add(e)})}):this._backdropElement.classList.add(e)},t.prototype._updateStackingOrder=function(){this._pane.nextSibling&&this._pane.parentNode.appendChild(this._pane)},t.prototype.detachBackdrop=function(){var t=this,e=this._backdropElement;if(e){var n=function(){e&&e.parentNode&&e.parentNode.removeChild(e),t._backdropElement==e&&(t._backdropElement=null)};e.classList.remove("cdk-overlay-backdrop-showing"),this._config.backdropClass&&e.classList.remove(this._config.backdropClass),e.addEventListener("transitionend",n),e.style.pointerEvents="none",this._ngZone.runOutsideAngular(function(){setTimeout(n,500)})}},t}();function P(t){return"string"==typeof t?t:t+"px"}var A=function(){function t(t,e,n,r,i){this._connectedTo=n,this._viewportRuler=r,this._document=i,this._dir="ltr",this._offsetX=0,this._offsetY=0,this.scrollables=[],this._resizeSubscription=l.Subscription.EMPTY,this._preferredPositions=[],this._applied=!1,this._positionLocked=!1,this._onPositionChange=new s.Subject,this._origin=this._connectedTo.nativeElement,this.withFallbackPosition(t,e)}return Object.defineProperty(t.prototype,"_isRtl",{get:function(){return"rtl"===this._dir},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onPositionChange",{get:function(){return this._onPositionChange.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"positions",{get:function(){return this._preferredPositions},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){var e=this;this._pane=t.overlayElement,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(function(){return e.apply()})},t.prototype.dispose=function(){this._applied=!1,this._resizeSubscription.unsubscribe(),this._onPositionChange.complete()},t.prototype.detach=function(){this._applied=!1,this._resizeSubscription.unsubscribe()},t.prototype.apply=function(){if(this._applied&&this._positionLocked&&this._lastConnectedPosition)this.recalculateLastPosition();else{this._applied=!0;for(var t,e,n=this._pane,r=this._origin.getBoundingClientRect(),i=n.getBoundingClientRect(),o=this._viewportRuler.getViewportSize(),a=0,s=this._preferredPositions;a<s.length;a++){var l=s[a],c=this._getOriginConnectionPoint(r,l),u=this._getOverlayPoint(c,i,o,l);if(u.fitsInViewport)return this._setElementPosition(n,i,u,l),void(this._lastConnectedPosition=l);(!t||t.visibleArea<u.visibleArea)&&(t=u,e=l)}this._setElementPosition(n,i,t,e)}},t.prototype.recalculateLastPosition=function(){if(this._lastConnectedPosition){var t=this._origin.getBoundingClientRect(),e=this._pane.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),r=this._lastConnectedPosition||this._preferredPositions[0],i=this._getOriginConnectionPoint(t,r),o=this._getOverlayPoint(i,e,n,r);this._setElementPosition(this._pane,e,o,r)}},t.prototype.withScrollableContainers=function(t){this.scrollables=t},t.prototype.withFallbackPosition=function(t,e,n,r){var i=new y(t,e,n,r);return this._preferredPositions.push(i),this},t.prototype.withDirection=function(t){return this._dir=t,this},t.prototype.withOffsetX=function(t){return this._offsetX=t,this},t.prototype.withOffsetY=function(t){return this._offsetY=t,this},t.prototype.withLockedPosition=function(t){return this._positionLocked=t,this},t.prototype.withPositions=function(t){return this._preferredPositions=t.slice(),this},t.prototype.setOrigin=function(t){return this._origin=t.nativeElement,this},t.prototype._getStartX=function(t){return this._isRtl?t.right:t.left},t.prototype._getEndX=function(t){return this._isRtl?t.left:t.right},t.prototype._getOriginConnectionPoint=function(t,e){var n=this._getStartX(t),r=this._getEndX(t);return{x:"center"==e.originX?n+t.width/2:"start"==e.originX?n:r,y:"center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom}},t.prototype._getOverlayPoint=function(t,e,n,r){var i,o;i="center"==r.overlayX?-e.width/2:"start"===r.overlayX?this._isRtl?-e.width:0:this._isRtl?0:-e.width,o="center"==r.overlayY?-e.height/2:"top"==r.overlayY?0:-e.height;var a=void 0===r.offsetX?this._offsetX:r.offsetX,s=void 0===r.offsetY?this._offsetY:r.offsetY,l=t.x+i+a,c=t.y+o+s,u=0-l,p=l+e.width-n.width,d=0-c,h=c+e.height-n.height,f=this._subtractOverflows(e.width,u,p)*this._subtractOverflows(e.height,d,h);return{x:l,y:c,fitsInViewport:e.width*e.height===f,visibleArea:f}},t.prototype._getScrollVisibility=function(t){var e=this._origin.getBoundingClientRect(),n=t.getBoundingClientRect(),r=this.scrollables.map(function(t){return t.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:S(e,r),isOriginOutsideView:x(e,r),isOverlayClipped:S(n,r),isOverlayOutsideView:x(n,r)}},t.prototype._setElementPosition=function(t,e,n,r){var i,o="bottom"===r.overlayY?"bottom":"top",a="top"===o?n.y:this._document.documentElement.clientHeight-(n.y+e.height),s="left"===(i="rtl"===this._dir?"end"===r.overlayX?"left":"right":"end"===r.overlayX?"right":"left")?n.x:this._document.documentElement.clientWidth-(n.x+e.width);["top","bottom","left","right"].forEach(function(e){return t.style[e]=null}),t.style[o]=a+"px",t.style[i]=s+"px";var l=this._getScrollVisibility(t),c=new b(r,l);this._onPositionChange.next(c)},t.prototype._subtractOverflows=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(t,e){return t-Math.max(e,0)},t)},t}(),D=function(){function t(t){this._document=t,this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height="",this._wrapper=null}return t.prototype.attach=function(t){var e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height})},t.prototype.top=function(t){return void 0===t&&(t=""),this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this},t.prototype.left=function(t){return void 0===t&&(t=""),this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this},t.prototype.bottom=function(t){return void 0===t&&(t=""),this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this},t.prototype.right=function(t){return void 0===t&&(t=""),this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this},t.prototype.width=function(t){return void 0===t&&(t=""),this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this},t.prototype.height=function(t){return void 0===t&&(t=""),this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this},t.prototype.centerHorizontally=function(t){return void 0===t&&(t=""),this.left(t),this._justifyContent="center",this},t.prototype.centerVertically=function(t){return void 0===t&&(t=""),this.top(t),this._alignItems="center",this},t.prototype.apply=function(){if(this._overlayRef.hasAttached()){var t=this._overlayRef.overlayElement;!this._wrapper&&t.parentNode&&(this._wrapper=this._document.createElement("div"),this._wrapper.classList.add("cdk-global-overlay-wrapper"),t.parentNode.insertBefore(this._wrapper,t),this._wrapper.appendChild(t));var e=t.style,n=t.parentNode.style,r=this._overlayRef.getConfig();e.position=this._cssPosition,e.marginLeft="100%"===r.width?"0":this._leftOffset,e.marginTop="100%"===r.height?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=this._rightOffset,n.justifyContent="100%"===r.width?"flex-start":this._justifyContent,n.alignItems="100%"===r.height?"flex-start":this._alignItems}},t.prototype.dispose=function(){this._wrapper&&this._wrapper.parentNode&&(this._wrapper.parentNode.removeChild(this._wrapper),this._wrapper=null)},t}(),T=function(){function t(t,e){this._viewportRuler=t,this._document=e}return t.prototype.global=function(){return new D(this._document)},t.prototype.connectedTo=function(t,e,n){return new A(e,n,t,this._viewportRuler,this._document)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:n.ViewportRuler},{type:void 0,decorators:[{type:e.Inject,args:[r.DOCUMENT]}]}]},t}(),M=function(){function t(t){this._document=t,this._attachedOverlays=[]}return t.prototype.ngOnDestroy=function(){this._unsubscribeFromKeydownEvents()},t.prototype.add=function(t){this._keydownEventSubscription||this._subscribeToKeydownEvents(),this._attachedOverlays.push(t)},t.prototype.remove=function(t){var e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this._unsubscribeFromKeydownEvents()},t.prototype._subscribeToKeydownEvents=function(){var t=this,e=u.fromEvent(this._document.body,"keydown",!0);this._keydownEventSubscription=e.pipe(c.filter(function(){return!!t._attachedOverlays.length})).subscribe(function(e){t._selectOverlayFromEvent(e)._keydownEvents.next(e)})},t.prototype._unsubscribeFromKeydownEvents=function(){this._keydownEventSubscription&&(this._keydownEventSubscription.unsubscribe(),this._keydownEventSubscription=null)},t.prototype._selectOverlayFromEvent=function(t){return this._attachedOverlays.find(function(e){return e.overlayElement===t.target||e.overlayElement.contains(t.target)})||this._attachedOverlays[this._attachedOverlays.length-1]},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[r.DOCUMENT]}]}]},t}();function I(t,e){return t||new M(e)}var R={provide:M,deps:[[new e.Optional,new e.SkipSelf,M],r.DOCUMENT],useFactory:I},N=function(){function t(t){this._document=t}return t.prototype.ngOnDestroy=function(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)},t.prototype.getContainerElement=function(){return this._containerElement||this._createContainer(),this._containerElement},t.prototype._createContainer=function(){var t=this._document.createElement("div");t.classList.add("cdk-overlay-container"),this._document.body.appendChild(t),this._containerElement=t},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[r.DOCUMENT]}]}]},t}();function L(t,e){return t||new N(e)}var j={provide:N,deps:[[new e.Optional,new e.SkipSelf,N],r.DOCUMENT],useFactory:L},F=0,V=function(){function t(t,e,n,r,i,o,a,s,l){this.scrollStrategies=t,this._overlayContainer=e,this._componentFactoryResolver=n,this._positionBuilder=r,this._keyboardDispatcher=i,this._appRef=o,this._injector=a,this._ngZone=s,this._document=l}return t.prototype.create=function(t){var e=this._createPaneElement(),n=this._createPortalOutlet(e);return new O(n,e,new g(t),this._ngZone,this._keyboardDispatcher,this._document)},t.prototype.position=function(){return this._positionBuilder},t.prototype._createPaneElement=function(){var t=this._document.createElement("div");return t.id="cdk-overlay-"+F++,t.classList.add("cdk-overlay-pane"),this._overlayContainer.getContainerElement().appendChild(t),t},t.prototype._createPortalOutlet=function(t){return new o.DomPortalOutlet(t,this._componentFactoryResolver,this._appRef,this._injector)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:k},{type:N},{type:e.ComponentFactoryResolver},{type:T},{type:M},{type:e.ApplicationRef},{type:e.Injector},{type:e.NgZone},{type:void 0,decorators:[{type:e.Inject,args:[r.DOCUMENT]}]}]},t}(),B=[new y({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}),new y({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"}),new y({originX:"end",originY:"top"},{overlayX:"end",overlayY:"bottom"}),new y({originX:"end",originY:"bottom"},{overlayX:"end",overlayY:"top"})],U=new e.InjectionToken("cdk-connected-overlay-scroll-strategy");function H(t){return function(){return t.scrollStrategies.reposition()}}var z={provide:U,deps:[V],useFactory:H},G=function(){function t(t){this.elementRef=t}return t.decorators=[{type:e.Directive,args:[{selector:"[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]",exportAs:"cdkOverlayOrigin"}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t}(),W=function(){function t(t,n,r,i,a){this._overlay=t,this._scrollStrategy=i,this._dir=a,this._hasBackdrop=!1,this._lockPosition=!1,this._backdropSubscription=l.Subscription.EMPTY,this._offsetX=0,this._offsetY=0,this.scrollStrategy=this._scrollStrategy(),this.open=!1,this.backdropClick=new e.EventEmitter,this.positionChange=new e.EventEmitter,this.attach=new e.EventEmitter,this.detach=new e.EventEmitter,this._templatePortal=new o.TemplatePortal(n,r)}return Object.defineProperty(t.prototype,"offsetX",{get:function(){return this._offsetX},set:function(t){this._offsetX=t,this._position&&this._position.withOffsetX(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offsetY",{get:function(){return this._offsetY},set:function(t){this._offsetY=t,this._position&&this._position.withOffsetY(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasBackdrop",{get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=p.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lockPosition",{get:function(){return this._lockPosition},set:function(t){this._lockPosition=p.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_deprecatedOrigin",{get:function(){return this.origin},set:function(t){this.origin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_deprecatedPositions",{get:function(){return this.positions},set:function(t){this.positions=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_deprecatedOffsetX",{get:function(){return this.offsetX},set:function(t){this.offsetX=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_deprecatedOffsetY",{get:function(){return this.offsetY},set:function(t){this.offsetY=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_deprecatedWidth",{get:function(){return this.width},set:function(t){this.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_deprecatedHeight",{get:function(){return this.height},set:function(t){this.height=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_deprecatedMinWidth",{get:function(){return this.minWidth},set:function(t){this.minWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_deprecatedMinHeight",{get:function(){return this.minHeight},set:function(t){this.minHeight=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_deprecatedBackdropClass",{get:function(){return this.backdropClass},set:function(t){this.backdropClass=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_deprecatedScrollStrategy",{get:function(){return this.scrollStrategy},set:function(t){this.scrollStrategy=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_deprecatedOpen",{get:function(){return this.open},set:function(t){this.open=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_deprecatedHasBackdrop",{get:function(){return this.hasBackdrop},set:function(t){this.hasBackdrop=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"overlayRef",{get:function(){return this._overlayRef},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dir",{get:function(){return this._dir?this._dir.value:"ltr"},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this._destroyOverlay()},t.prototype.ngOnChanges=function(t){this._position&&((t.positions||t._deprecatedPositions)&&this._position.withPositions(this.positions),t.lockPosition&&this._position.withLockedPosition(this.lockPosition),(t.origin||t._deprecatedOrigin)&&(this._position.setOrigin(this.origin.elementRef),this.open&&this._position.apply())),(t.open||t._deprecatedOpen)&&(this.open?this._attachOverlay():this._detachOverlay())},t.prototype._createOverlay=function(){this.positions&&this.positions.length||(this.positions=B),this._overlayRef=this._overlay.create(this._buildConfig())},t.prototype._buildConfig=function(){var t=this._position=this._createPositionStrategy(),e=new g({positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(e.width=this.width),(this.height||0===this.height)&&(e.height=this.height),(this.minWidth||0===this.minWidth)&&(e.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(e.minHeight=this.minHeight),this.backdropClass&&(e.backdropClass=this.backdropClass),e},t.prototype._createPositionStrategy=function(){for(var t=this,e=this.positions[0],n={originX:e.originX,originY:e.originY},r={overlayX:e.overlayX,overlayY:e.overlayY},i=this._overlay.position().connectedTo(this.origin.elementRef,n,r).withOffsetX(this.offsetX).withOffsetY(this.offsetY).withLockedPosition(this.lockPosition),o=1;o<this.positions.length;o++)i.withFallbackPosition({originX:this.positions[o].originX,originY:this.positions[o].originY},{overlayX:this.positions[o].overlayX,overlayY:this.positions[o].overlayY});return i.onPositionChange.subscribe(function(e){return t.positionChange.emit(e)}),i},t.prototype._attachOverlay=function(){var t=this;this._overlayRef?this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}):(this._createOverlay(),this._overlayRef.keydownEvents().subscribe(function(e){e.keyCode===d.ESCAPE&&t._detachOverlay()})),this._position.withDirection(this.dir),this._overlayRef.setDirection(this.dir),this._overlayRef.hasAttached()||(this._overlayRef.attach(this._templatePortal),this.attach.emit()),this.hasBackdrop&&(this._backdropSubscription=this._overlayRef.backdropClick().subscribe(function(e){t.backdropClick.emit(e)}))},t.prototype._detachOverlay=function(){this._overlayRef&&(this._overlayRef.detach(),this.detach.emit()),this._backdropSubscription.unsubscribe()},t.prototype._destroyOverlay=function(){this._overlayRef&&this._overlayRef.dispose(),this._backdropSubscription.unsubscribe()},t.decorators=[{type:e.Directive,args:[{selector:"[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",exportAs:"cdkConnectedOverlay"}]}],t.ctorParameters=function(){return[{type:V},{type:e.TemplateRef},{type:e.ViewContainerRef},{type:void 0,decorators:[{type:e.Inject,args:[U]}]},{type:i.Directionality,decorators:[{type:e.Optional}]}]},t.propDecorators={origin:[{type:e.Input,args:["cdkConnectedOverlayOrigin"]}],positions:[{type:e.Input,args:["cdkConnectedOverlayPositions"]}],offsetX:[{type:e.Input,args:["cdkConnectedOverlayOffsetX"]}],offsetY:[{type:e.Input,args:["cdkConnectedOverlayOffsetY"]}],width:[{type:e.Input,args:["cdkConnectedOverlayWidth"]}],height:[{type:e.Input,args:["cdkConnectedOverlayHeight"]}],minWidth:[{type:e.Input,args:["cdkConnectedOverlayMinWidth"]}],minHeight:[{type:e.Input,args:["cdkConnectedOverlayMinHeight"]}],backdropClass:[{type:e.Input,args:["cdkConnectedOverlayBackdropClass"]}],scrollStrategy:[{type:e.Input,args:["cdkConnectedOverlayScrollStrategy"]}],open:[{type:e.Input,args:["cdkConnectedOverlayOpen"]}],hasBackdrop:[{type:e.Input,args:["cdkConnectedOverlayHasBackdrop"]}],lockPosition:[{type:e.Input,args:["cdkConnectedOverlayLockPosition"]}],_deprecatedOrigin:[{type:e.Input,args:["origin"]}],_deprecatedPositions:[{type:e.Input,args:["positions"]}],_deprecatedOffsetX:[{type:e.Input,args:["offsetX"]}],_deprecatedOffsetY:[{type:e.Input,args:["offsetY"]}],_deprecatedWidth:[{type:e.Input,args:["width"]}],_deprecatedHeight:[{type:e.Input,args:["height"]}],_deprecatedMinWidth:[{type:e.Input,args:["minWidth"]}],_deprecatedMinHeight:[{type:e.Input,args:["minHeight"]}],_deprecatedBackdropClass:[{type:e.Input,args:["backdropClass"]}],_deprecatedScrollStrategy:[{type:e.Input,args:["scrollStrategy"]}],_deprecatedOpen:[{type:e.Input,args:["open"]}],_deprecatedHasBackdrop:[{type:e.Input,args:["hasBackdrop"]}],backdropClick:[{type:e.Output}],positionChange:[{type:e.Output}],attach:[{type:e.Output}],detach:[{type:e.Output}]},t}(),q=[V,T,R,n.VIEWPORT_RULER_PROVIDER,j,z],Y=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[i.BidiModule,o.PortalModule,n.ScrollDispatchModule],exports:[W,G,n.ScrollDispatchModule],declarations:[W,G],providers:[q,k]}]}],t.ctorParameters=function(){return[]},t}(),$=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(n,t),n.prototype._createContainer=function(){var e=this;t.prototype._createContainer.call(this),this._adjustParentForFullscreenChange(),this._addFullscreenChangeListener(function(){return e._adjustParentForFullscreenChange()})},n.prototype._adjustParentForFullscreenChange=function(){this._containerElement&&(this.getFullscreenElement()||document.body).appendChild(this._containerElement)},n.prototype._addFullscreenChangeListener=function(t){document.fullscreenEnabled?document.addEventListener("fullscreenchange",t):document.webkitFullscreenEnabled?document.addEventListener("webkitfullscreenchange",t):document.mozFullScreenEnabled?document.addEventListener("mozfullscreenchange",t):document.msFullscreenEnabled&&document.addEventListener("MSFullscreenChange",t)},n.prototype.getFullscreenElement=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||null},n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[]},n}(N);t.Overlay=V,t.OverlayContainer=N,t.CdkOverlayOrigin=G,t.CdkConnectedOverlay=W,t.FullscreenOverlayContainer=$,t.OverlayRef=O,t.ViewportRuler=n.ViewportRuler,t.OverlayKeyboardDispatcher=M,t.OverlayPositionBuilder=T,t.GlobalPositionStrategy=D,t.ConnectedPositionStrategy=A,t.VIEWPORT_RULER_PROVIDER=n.VIEWPORT_RULER_PROVIDER,t.ConnectedOverlayDirective=W,t.OverlayOrigin=G,t.OverlayConfig=g,t.ConnectionPositionPair=y,t.ScrollingVisibility=v,t.ConnectedOverlayPositionChange=b,t.CdkScrollable=n.CdkScrollable,t.ScrollDispatcher=n.ScrollDispatcher,t.ScrollStrategyOptions=k,t.RepositionScrollStrategy=E,t.CloseScrollStrategy=w,t.NoopScrollStrategy=m,t.BlockScrollStrategy=C,t.OVERLAY_PROVIDERS=q,t.OverlayModule=Y,t.ɵg=R,t.ɵf=I,t.ɵb=j,t.ɵa=L,t.ɵc=U,t.ɵe=z,t.ɵd=H,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core"),t("@angular/cdk/scrolling"),t("@angular/common"),t("@angular/cdk/bidi"),t("@angular/cdk/portal"),t("rxjs/operators/take"),t("rxjs/Subject"),t("rxjs/Subscription"),t("rxjs/operators/filter"),t("rxjs/observable/fromEvent"),t("@angular/cdk/coercion"),t("@angular/cdk/keycodes")):i((r.ng=r.ng||{},r.ng.cdk=r.ng.cdk||{},r.ng.cdk.overlay=r.ng.cdk.overlay||{}),r.ng.core,r.ng.cdk.scrolling,r.ng.common,r.ng.cdk.bidi,r.ng.cdk.portal,r.Rx.operators,r.Rx,r.Rx,r.Rx.operators,r.Rx.Observable,r.ng.cdk.coercion,r.ng.cdk.keycodes)},{"@angular/cdk/bidi":47,"@angular/cdk/coercion":48,"@angular/cdk/keycodes":50,"@angular/cdk/portal":55,"@angular/cdk/scrolling":56,"@angular/common":60,"@angular/core":62,"rxjs/Subject":77,"rxjs/Subscription":80,"rxjs/observable/fromEvent":101,"rxjs/operators/filter":130,"rxjs/operators/take":145}],54:[function(t,e,n){var r,i;r=this,i=function(t,e){"use strict";var n,r,i="undefined"!=typeof Intl&&Intl.v8BreakIterator,o=function(){function t(){this.isBrowser="object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!i)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}return t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}();var a=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];var s=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{providers:[o]}]}],t.ctorParameters=function(){return[]},t}();t.Platform=o,t.supportsPassiveEventListeners=function(){if(null==n&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return n=!0}}))}finally{n=n||!1}return n},t.getSupportedInputTypes=function(){if(r)return r;if("object"!=typeof document||!document)return r=new Set(a);var t=document.createElement("input");return r=new Set(a.filter(function(e){return t.setAttribute("type",e),t.type===e}))},t.PlatformModule=s,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core")):i((r.ng=r.ng||{},r.ng.cdk=r.ng.cdk||{},r.ng.cdk.platform=r.ng.cdk.platform||{}),r.ng.core)},{"@angular/core":62}],55:[function(t,e,n){var r,i;r=this,i=function(t,e){"use strict";var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function r(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function i(){throw Error("Host already has a portal attached")}var o=function(){function t(){}return t.prototype.attach=function(t){return null==t&&function(){throw Error("Attempting to attach a portal to a null PortalOutlet")}(),t.hasAttached()&&i(),this._attachedHost=t,t.attach(this)},t.prototype.detach=function(){var t=this._attachedHost;null==t?function(){throw Error("Attempting to detach a portal that is not attached to a host")}():(this._attachedHost=null,t.detach())},Object.defineProperty(t.prototype,"isAttached",{get:function(){return null!=this._attachedHost},enumerable:!0,configurable:!0}),t.prototype.setAttachedHost=function(t){this._attachedHost=t},t}(),a=function(t){function e(e,n,r){var i=t.call(this)||this;return i.component=e,i.viewContainerRef=n,i.injector=r,i}return r(e,t),e}(o),s=function(t){function e(e,n,r){var i=t.call(this)||this;return i.templateRef=e,i.viewContainerRef=n,i.context=r,i}return r(e,t),Object.defineProperty(e.prototype,"origin",{get:function(){return this.templateRef.elementRef},enumerable:!0,configurable:!0}),e.prototype.attach=function(e,n){return void 0===n&&(n=this.context),this.context=n,t.prototype.attach.call(this,e)},e.prototype.detach=function(){return this.context=void 0,t.prototype.detach.call(this)},e}(o),l=function(){function t(){this._isDisposed=!1}return t.prototype.hasAttached=function(){return!!this._attachedPortal},t.prototype.attach=function(t){return t||function(){throw Error("Must provide a portal to attach")}(),this.hasAttached()&&i(),this._isDisposed&&function(){throw Error("This PortalOutlet has already been disposed")}(),t instanceof a?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof s?(this._attachedPortal=t,this.attachTemplatePortal(t)):void function(){throw Error("Attempting to attach an unknown Portal type. BasePortalOutlet accepts either a ComponentPortal or a TemplatePortal.")}()},t.prototype.detach=function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()},t.prototype.dispose=function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0},t.prototype.setDisposeFn=function(t){this._disposeFn=t},t.prototype._invokeDisposeFn=function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)},t}(),c=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.outletElement=e,o._componentFactoryResolver=n,o._appRef=r,o._defaultInjector=i,o}return r(e,t),e.prototype.attachComponentPortal=function(t){var e,n=this,r=this._componentFactoryResolver.resolveComponentFactory(t.component);return t.viewContainerRef?(e=t.viewContainerRef.createComponent(r,t.viewContainerRef.length,t.injector||t.viewContainerRef.parentInjector),this.setDisposeFn(function(){return e.destroy()})):(e=r.create(t.injector||this._defaultInjector),this._appRef.attachView(e.hostView),this.setDisposeFn(function(){n._appRef.detachView(e.hostView),e.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(e)),e},e.prototype.attachTemplatePortal=function(t){var e=this,n=t.viewContainerRef,r=n.createEmbeddedView(t.templateRef,t.context);return r.detectChanges(),r.rootNodes.forEach(function(t){return e.outletElement.appendChild(t)}),this.setDisposeFn(function(){var t=n.indexOf(r);-1!==t&&n.remove(t)}),r},e.prototype.dispose=function(){t.prototype.dispose.call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)},e.prototype._getComponentRootNode=function(t){return t.hostView.rootNodes[0]},e}(l),u=function(t){function n(e,n){return t.call(this,e,n)||this}return r(n,t),n.decorators=[{type:e.Directive,args:[{selector:"[cdk-portal], [cdkPortal], [portal]",exportAs:"cdkPortal"}]}],n.ctorParameters=function(){return[{type:e.TemplateRef},{type:e.ViewContainerRef}]},n}(s),p=function(t){function n(n,r){var i=t.call(this)||this;return i._componentFactoryResolver=n,i._viewContainerRef=r,i._isInitialized=!1,i.attached=new e.EventEmitter,i}return r(n,t),Object.defineProperty(n.prototype,"_deprecatedPortal",{get:function(){return this.portal},set:function(t){this.portal=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_deprecatedPortalHost",{get:function(){return this.portal},set:function(t){this.portal=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"portal",{get:function(){return this._attachedPortal},set:function(e){(!this.hasAttached()||e||this._isInitialized)&&(this.hasAttached()&&t.prototype.detach.call(this),e&&t.prototype.attach.call(this,e),this._attachedPortal=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"attachedRef",{get:function(){return this._attachedRef},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){this._isInitialized=!0},n.prototype.ngOnDestroy=function(){t.prototype.dispose.call(this),this._attachedPortal=null,this._attachedRef=null},n.prototype.attachComponentPortal=function(e){e.setAttachedHost(this);var n=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,r=this._componentFactoryResolver.resolveComponentFactory(e.component),i=n.createComponent(r,n.length,e.injector||n.parentInjector);return t.prototype.setDisposeFn.call(this,function(){return i.destroy()}),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i},n.prototype.attachTemplatePortal=function(e){var n=this;e.setAttachedHost(this);var r=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context);return t.prototype.setDisposeFn.call(this,function(){return n._viewContainerRef.clear()}),this._attachedPortal=e,this._attachedRef=r,this.attached.emit(r),r},n.decorators=[{type:e.Directive,args:[{selector:"[cdkPortalOutlet], [cdkPortalHost], [portalHost]",exportAs:"cdkPortalOutlet, cdkPortalHost",inputs:["portal: cdkPortalOutlet"]}]}],n.ctorParameters=function(){return[{type:e.ComponentFactoryResolver},{type:e.ViewContainerRef}]},n.propDecorators={_deprecatedPortal:[{type:e.Input,args:["portalHost"]}],_deprecatedPortalHost:[{type:e.Input,args:["cdkPortalHost"]}],attached:[{type:e.Output,args:["attached"]}]},n}(l),d=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{exports:[u,p],declarations:[u,p]}]}],t.ctorParameters=function(){return[]},t}(),h=function(){function t(t,e){this._parentInjector=t,this._customTokens=e}return t.prototype.get=function(t,e){var n=this._customTokens.get(t);return void 0!==n?n:this._parentInjector.get(t,e)},t}();t.DomPortalHost=c,t.PortalHostDirective=p,t.TemplatePortalDirective=u,t.BasePortalHost=l,t.Portal=o,t.ComponentPortal=a,t.TemplatePortal=s,t.BasePortalOutlet=l,t.DomPortalOutlet=c,t.CdkPortal=u,t.CdkPortalOutlet=p,t.PortalModule=d,t.PortalInjector=h,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core")):i((r.ng=r.ng||{},r.ng.cdk=r.ng.cdk||{},r.ng.cdk.portal=r.ng.cdk.portal||{}),r.ng.core)},{"@angular/core":62}],56:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i,o,a,s,l,c){"use strict";var u=function(){function t(t,e){this._ngZone=t,this._platform=e,this._scrolled=new r.Subject,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map}return t.prototype.register=function(t){var e=this,n=t.elementScrolled().subscribe(function(){return e._scrolled.next(t)});this.scrollContainers.set(t,n)},t.prototype.deregister=function(t){var e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))},t.prototype.scrolled=function(t){var e=this;return void 0===t&&(t=20),this._platform.isBrowser?i.Observable.create(function(n){e._globalSubscription||e._addGlobalListener();var r=t>0?e._scrolled.pipe(s.auditTime(t)).subscribe(n):e._scrolled.subscribe(n);return e._scrolledCount++,function(){r.unsubscribe(),e._scrolledCount--,e._scrolledCount||e._removeGlobalListener()}}):o.of()},t.prototype.ngOnDestroy=function(){var t=this;this._removeGlobalListener(),this.scrollContainers.forEach(function(e,n){return t.deregister(n)})},t.prototype.ancestorScrolled=function(t,e){var n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(l.filter(function(t){return!t||n.indexOf(t)>-1}))},t.prototype.getAncestorScrollContainers=function(t){var e=this,n=[];return this.scrollContainers.forEach(function(r,i){e._scrollableContainsElement(i,t)&&n.push(i)}),n},t.prototype._scrollableContainsElement=function(t,e){var n=e.nativeElement,r=t.getElementRef().nativeElement;do{if(n==r)return!0}while(n=n.parentElement);return!1},t.prototype._addGlobalListener=function(){var t=this;this._globalSubscription=this._ngZone.runOutsideAngular(function(){return a.fromEvent(window.document,"scroll").subscribe(function(){return t._scrolled.next()})})},t.prototype._removeGlobalListener=function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:e.NgZone},{type:n.Platform}]},t}();function p(t,e,n){return t||new u(e,n)}var d={provide:u,deps:[[new e.Optional,new e.SkipSelf,u],e.NgZone,n.Platform],useFactory:p},h=function(){function t(t,e,n){var i=this;this._elementRef=t,this._scroll=e,this._ngZone=n,this._elementScrolled=new r.Subject,this._scrollListener=function(t){return i._elementScrolled.next(t)}}return t.prototype.ngOnInit=function(){var t=this;this._ngZone.runOutsideAngular(function(){t.getElementRef().nativeElement.addEventListener("scroll",t._scrollListener)}),this._scroll.register(this)},t.prototype.ngOnDestroy=function(){this._scroll.deregister(this),this._scrollListener&&this.getElementRef().nativeElement.removeEventListener("scroll",this._scrollListener)},t.prototype.elementScrolled=function(){return this._elementScrolled.asObservable()},t.prototype.getElementRef=function(){return this._elementRef},t.decorators=[{type:e.Directive,args:[{selector:"[cdk-scrollable], [cdkScrollable]"}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:u},{type:e.NgZone}]},t}(),f=function(){function t(t,e){var n=this;this._platform=t,this._change=t.isBrowser?e.runOutsideAngular(function(){return c.merge(a.fromEvent(window,"resize"),a.fromEvent(window,"orientationchange"))}):o.of(),this._invalidateCache=this.change().subscribe(function(){return n._updateViewportSize()})}return t.prototype.ngOnDestroy=function(){this._invalidateCache.unsubscribe()},t.prototype.getViewportSize=function(){this._viewportSize||this._updateViewportSize();var t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t},t.prototype.getViewportRect=function(){var t=this.getViewportScrollPosition(),e=this.getViewportSize(),n=e.width,r=e.height;return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+n,height:r,width:n}},t.prototype.getViewportScrollPosition=function(){if(!this._platform.isBrowser)return{top:0,left:0};var t=document.documentElement.getBoundingClientRect();return{top:-t.top||document.body.scrollTop||window.scrollY||document.documentElement.scrollTop||0,left:-t.left||document.body.scrollLeft||window.scrollX||document.documentElement.scrollLeft||0}},t.prototype.change=function(t){return void 0===t&&(t=20),t>0?this._change.pipe(s.auditTime(t)):this._change},t.prototype._updateViewportSize=function(){this._viewportSize=this._platform.isBrowser?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:n.Platform},{type:e.NgZone}]},t}();function m(t,e,n){return t||new f(e,n)}var g={provide:f,deps:[[new e.Optional,new e.SkipSelf,f],n.Platform,e.NgZone],useFactory:m},y=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[n.PlatformModule],exports:[h],declarations:[h],providers:[d]}]}],t.ctorParameters=function(){return[]},t}();t.DEFAULT_SCROLL_TIME=20,t.ScrollDispatcher=u,t.SCROLL_DISPATCHER_PROVIDER_FACTORY=p,t.SCROLL_DISPATCHER_PROVIDER=d,t.CdkScrollable=h,t.DEFAULT_RESIZE_TIME=20,t.ViewportRuler=f,t.VIEWPORT_RULER_PROVIDER_FACTORY=m,t.VIEWPORT_RULER_PROVIDER=g,t.ScrollDispatchModule=y,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core"),t("@angular/cdk/platform"),t("rxjs/Subject"),t("rxjs/Observable"),t("rxjs/observable/of"),t("rxjs/observable/fromEvent"),t("rxjs/operators/auditTime"),t("rxjs/operators/filter"),t("rxjs/observable/merge")):i((r.ng=r.ng||{},r.ng.cdk=r.ng.cdk||{},r.ng.cdk.scrolling=r.ng.cdk.scrolling||{}),r.ng.core,r.ng.cdk.platform,r.Rx,r.Rx,r.Rx.Observable,r.Rx.Observable,r.Rx.operators,r.Rx.operators,r.Rx.Observable)},{"@angular/cdk/platform":54,"@angular/core":62,"rxjs/Observable":73,"rxjs/Subject":77,"rxjs/observable/fromEvent":101,"rxjs/observable/merge":104,"rxjs/observable/of":105,"rxjs/operators/auditTime":121,"rxjs/operators/filter":130}],57:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i,o,a,s){"use strict";var l=function(){function t(t){this.template=t}return t.decorators=[{type:e.Directive,args:[{selector:"[cdkStepLabel]"}]}],t.ctorParameters=function(){return[{type:e.TemplateRef}]},t}(),c=0,u=function(){},p=function(){function t(t){this._stepper=t,this.interacted=!1,this._editable=!0,this._optional=!1,this._customCompleted=null}return Object.defineProperty(t.prototype,"editable",{get:function(){return this._editable},set:function(t){this._editable=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"optional",{get:function(){return this._optional},set:function(t){this._optional=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"completed",{get:function(){return null==this._customCompleted?this._defaultCompleted:this._customCompleted},set:function(t){this._customCompleted=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_defaultCompleted",{get:function(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted},enumerable:!0,configurable:!0}),t.prototype.select=function(){this._stepper.selected=this},t.prototype.reset=function(){this.interacted=!1,null!=this._customCompleted&&(this._customCompleted=!1),this.stepControl&&this.stepControl.reset()},t.prototype.ngOnChanges=function(){this._stepper._stateChanged()},t.decorators=[{type:e.Component,args:[{selector:"cdk-step",exportAs:"cdkStep",template:"<ng-template><ng-content></ng-content></ng-template>",encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:d,decorators:[{type:e.Inject,args:[e.forwardRef(function(){return d})]}]}]},t.propDecorators={stepLabel:[{type:e.ContentChild,args:[l]}],content:[{type:e.ViewChild,args:[e.TemplateRef]}],stepControl:[{type:e.Input}],label:[{type:e.Input}],editable:[{type:e.Input}],optional:[{type:e.Input}],completed:[{type:e.Input}]},t}(),d=function(){function t(t,n){this._dir=t,this._changeDetectorRef=n,this._destroyed=new a.Subject,this._linear=!1,this._selectedIndex=0,this.selectionChange=new e.EventEmitter,this._focusIndex=0,this._orientation="horizontal",this._groupId=c++}return Object.defineProperty(t.prototype,"linear",{get:function(){return this._linear},set:function(t){this._linear=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(t){if(this._steps){if(t<0||t>this._steps.length-1)throw Error("cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.");this._anyControlsInvalidOrPending(t)||t<this._selectedIndex&&!this._steps.toArray()[t].editable?this._stepHeader.toArray()[t].nativeElement.blur():this._selectedIndex!=t&&(this._emitStepperSelectionEvent(t),this._focusIndex=this._selectedIndex)}else this._selectedIndex=this._focusIndex=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._steps.toArray()[this.selectedIndex]},set:function(t){this.selectedIndex=this._steps.toArray().indexOf(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete()},t.prototype.next=function(){this.selectedIndex=Math.min(this._selectedIndex+1,this._steps.length-1)},t.prototype.previous=function(){this.selectedIndex=Math.max(this._selectedIndex-1,0)},t.prototype.reset=function(){this.selectedIndex=0,this._steps.forEach(function(t){return t.reset()}),this._stateChanged()},t.prototype._getStepLabelId=function(t){return"cdk-step-label-"+this._groupId+"-"+t},t.prototype._getStepContentId=function(t){return"cdk-step-content-"+this._groupId+"-"+t},t.prototype._stateChanged=function(){this._changeDetectorRef.markForCheck()},t.prototype._getAnimationDirection=function(t){var e=t-this._selectedIndex;return e<0?"rtl"===this._layoutDirection()?"next":"previous":e>0?"rtl"===this._layoutDirection()?"previous":"next":"current"},t.prototype._getIndicatorType=function(t){var e=this._steps.toArray()[t];return e.completed&&this._selectedIndex!=t?e.editable?"edit":"done":"number"},t.prototype._emitStepperSelectionEvent=function(t){var e=this._steps.toArray();this.selectionChange.emit({selectedIndex:t,previouslySelectedIndex:this._selectedIndex,selectedStep:e[t],previouslySelectedStep:e[this._selectedIndex]}),this._selectedIndex=t,this._stateChanged()},t.prototype._onKeydown=function(t){var e=t.keyCode;e===n.RIGHT_ARROW&&("rtl"===this._layoutDirection()?this._focusPreviousStep():this._focusNextStep(),t.preventDefault()),e===n.LEFT_ARROW&&("rtl"===this._layoutDirection()?this._focusNextStep():this._focusPreviousStep(),t.preventDefault()),"vertical"!==this._orientation||e!==n.UP_ARROW&&e!==n.DOWN_ARROW||(e===n.UP_ARROW?this._focusPreviousStep():this._focusNextStep(),t.preventDefault()),e!==n.SPACE&&e!==n.ENTER||(this.selectedIndex=this._focusIndex,t.preventDefault()),e===n.HOME&&(this._focusStep(0),t.preventDefault()),e===n.END&&(this._focusStep(this._steps.length-1),t.preventDefault())},t.prototype._focusNextStep=function(){this._focusStep((this._focusIndex+1)%this._steps.length)},t.prototype._focusPreviousStep=function(){this._focusStep((this._focusIndex+this._steps.length-1)%this._steps.length)},t.prototype._focusStep=function(t){this._focusIndex=t,this._stepHeader.toArray()[this._focusIndex].nativeElement.focus()},t.prototype._anyControlsInvalidOrPending=function(t){var e=this._steps.toArray();return e[this._selectedIndex].interacted=!0,!!(this._linear&&t>=0)&&e.slice(0,t).some(function(t){var e=t.stepControl;return(e?e.invalid||e.pending||!t.interacted:!t.completed)&&!t.optional})},t.prototype._layoutDirection=function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},t.decorators=[{type:e.Directive,args:[{selector:"[cdkStepper]",exportAs:"cdkStepper"}]}],t.ctorParameters=function(){return[{type:o.Directionality,decorators:[{type:e.Optional}]},{type:e.ChangeDetectorRef}]},t.propDecorators={_steps:[{type:e.ContentChildren,args:[p]}],linear:[{type:e.Input}],selectedIndex:[{type:e.Input}],selected:[{type:e.Input}],selectionChange:[{type:e.Output}]},t}(),h=function(){function t(t){this._stepper=t,this.type="submit"}return t.decorators=[{type:e.Directive,args:[{selector:"button[cdkStepperNext]",host:{"(click)":"_stepper.next()","[type]":"type"}}]}],t.ctorParameters=function(){return[{type:d}]},t.propDecorators={type:[{type:e.Input}]},t}(),f=function(){function t(t){this._stepper=t,this.type="button"}return t.decorators=[{type:e.Directive,args:[{selector:"button[cdkStepperPrevious]",host:{"(click)":"_stepper.previous()","[type]":"type"}}]}],t.ctorParameters=function(){return[{type:d}]},t.propDecorators={type:[{type:e.Input}]},t}(),m=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[o.BidiModule,s.CommonModule],exports:[p,d,l,h,f],declarations:[p,d,l,h,f]}]}],t.ctorParameters=function(){return[]},t}();t.StepperSelectionEvent=u,t.CdkStep=p,t.CdkStepper=d,t.CdkStepLabel=l,t.CdkStepperNext=h,t.CdkStepperPrevious=f,t.CdkStepperModule=m,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core"),t("@angular/cdk/keycodes"),t("@angular/cdk/coercion"),t("@angular/forms"),t("@angular/cdk/bidi"),t("rxjs/Subject"),t("@angular/common")):i((r.ng=r.ng||{},r.ng.cdk=r.ng.cdk||{},r.ng.cdk.stepper=r.ng.cdk.stepper||{}),r.ng.core,r.ng.cdk.keycodes,r.ng.cdk.coercion,r.ng.forms,r.ng.cdk.bidi,r.Rx,r.ng.common)},{"@angular/cdk/bidi":47,"@angular/cdk/coercion":48,"@angular/cdk/keycodes":50,"@angular/common":60,"@angular/core":62,"@angular/forms":63,"rxjs/Subject":77}],58:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i,o,a,s,l){"use strict";var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function u(t,e){function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var p="<ng-container cdkCellOutlet></ng-container>",d=function(){function t(t,e){this.template=t,this._differs=e}return t.prototype.ngOnChanges=function(t){var e=t.columns.currentValue||[];this._columnsDiffer||(this._columnsDiffer=this._differs.find(e).create(),this._columnsDiffer.diff(e))},t.prototype.getColumnsDiff=function(){return this._columnsDiffer.diff(this.columns)},t}(),h=function(t){function n(e,n){return t.call(this,e,n)||this}return u(n,t),n.decorators=[{type:e.Directive,args:[{selector:"[cdkHeaderRowDef]",inputs:["columns: cdkHeaderRowDef"]}]}],n.ctorParameters=function(){return[{type:e.TemplateRef},{type:e.IterableDiffers}]},n}(d),f=function(t){function n(e,n){return t.call(this,e,n)||this}return u(n,t),n.decorators=[{type:e.Directive,args:[{selector:"[cdkRowDef]",inputs:["columns: cdkRowDefColumns","when: cdkRowDefWhen"]}]}],n.ctorParameters=function(){return[{type:e.TemplateRef},{type:e.IterableDiffers}]},n}(d),m=function(){function t(e){this._viewContainer=e,t.mostRecentCellOutlet=this}return t.mostRecentCellOutlet=null,t.decorators=[{type:e.Directive,args:[{selector:"[cdkCellOutlet]"}]}],t.ctorParameters=function(){return[{type:e.ViewContainerRef}]},t}(),g=function(){function t(){}return t.decorators=[{type:e.Component,args:[{selector:"cdk-header-row",template:p,host:{class:"cdk-header-row",role:"row"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[]},t}(),y=function(){function t(){}return t.decorators=[{type:e.Component,args:[{selector:"cdk-row",template:p,host:{class:"cdk-row",role:"row"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[]},t}(),v=function(){function t(t){this.template=t}return t.decorators=[{type:e.Directive,args:[{selector:"[cdkCellDef]"}]}],t.ctorParameters=function(){return[{type:e.TemplateRef}]},t}(),b=function(){function t(t){this.template=t}return t.decorators=[{type:e.Directive,args:[{selector:"[cdkHeaderCellDef]"}]}],t.ctorParameters=function(){return[{type:e.TemplateRef}]},t}(),_=function(){function t(){}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(t){t&&(this._name=t,this.cssClassFriendlyName=t.replace(/[^a-z0-9_-]/gi,"-"))},enumerable:!0,configurable:!0}),t.decorators=[{type:e.Directive,args:[{selector:"[cdkColumnDef]"}]}],t.ctorParameters=function(){return[]},t.propDecorators={name:[{type:e.Input,args:["cdkColumnDef"]}],cell:[{type:e.ContentChild,args:[v]}],headerCell:[{type:e.ContentChild,args:[b]}]},t}(),w=function(){function t(t,e){e.nativeElement.classList.add("cdk-column-"+t.cssClassFriendlyName)}return t.decorators=[{type:e.Directive,args:[{selector:"cdk-header-cell",host:{class:"cdk-header-cell",role:"columnheader"}}]}],t.ctorParameters=function(){return[{type:_},{type:e.ElementRef}]},t}(),C=function(){function t(t,e){e.nativeElement.classList.add("cdk-column-"+t.cssClassFriendlyName)}return t.decorators=[{type:e.Directive,args:[{selector:"cdk-cell",host:{class:"cdk-cell",role:"gridcell"}}]}],t.ctorParameters=function(){return[{type:_},{type:e.ElementRef}]},t}();function x(t){return Error('Could not find column with id "'+t+'".')}var S=function(){function t(t){this.viewContainer=t}return t.decorators=[{type:e.Directive,args:[{selector:"[rowPlaceholder]"}]}],t.ctorParameters=function(){return[{type:e.ViewContainerRef}]},t}(),E=function(){function t(t){this.viewContainer=t}return t.decorators=[{type:e.Directive,args:[{selector:"[headerRowPlaceholder]"}]}],t.ctorParameters=function(){return[{type:e.ViewContainerRef}]},t}(),k="\n  <ng-container headerRowPlaceholder></ng-container>\n  <ng-container rowPlaceholder></ng-container>",O=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}u(e,t)}(e.EmbeddedViewRef),function(){function t(t,e,n,r){this._differs=t,this._changeDetectorRef=e,this._onDestroy=new o.Subject,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._headerRowDefChanged=!1,this.viewChange=new i.BehaviorSubject({start:0,end:Number.MAX_VALUE}),r||n.nativeElement.setAttribute("role","grid")}return Object.defineProperty(t.prototype,"trackBy",{get:function(){return this._trackByFn},set:function(t){e.isDevMode()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn("trackBy must be a function, but received "+JSON.stringify(t)+"."),this._trackByFn=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataSource",{get:function(){return this._dataSource},set:function(t){this._dataSource!==t&&this._switchDataSource(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._dataDiffer=this._differs.find([]).create(this._trackByFn),this._headerRowDef&&(this._headerRowDefChanged=!0)},t.prototype.ngAfterContentChecked=function(){if(this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDef&&!this._rowDefs.length)throw Error("Missing definitions for header and row, cannot determine which columns should be rendered.");this._renderUpdatedColumns(),this._headerRowDefChanged&&(this._renderHeaderRow(),this._headerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription&&this._observeRenderChanges()},t.prototype.ngOnDestroy=function(){this._rowPlaceholder.viewContainer.clear(),this._headerRowPlaceholder.viewContainer.clear(),this._onDestroy.next(),this._onDestroy.complete(),this.dataSource instanceof n.DataSource&&this.dataSource.disconnect(this)},t.prototype.renderRows=function(){var t=this,e=this._dataDiffer.diff(this._data);if(e){var n=this._rowPlaceholder.viewContainer;e.forEachOperation(function(e,r,i){if(null==e.previousIndex)t._insertRow(e.item,i);else if(null==i)n.remove(r);else{var o=n.get(r);n.move(o,i)}}),this._updateRowIndexContext(),e.forEachIdentityChange(function(t){n.get(t.currentIndex).context.$implicit=t.item})}},t.prototype.setHeaderRowDef=function(t){this._headerRowDef=t,this._headerRowDefChanged=!0},t.prototype.addColumnDef=function(t){this._customColumnDefs.add(t)},t.prototype.removeColumnDef=function(t){this._customColumnDefs.delete(t)},t.prototype.addRowDef=function(t){this._customRowDefs.add(t)},t.prototype.removeRowDef=function(t){this._customRowDefs.delete(t)},t.prototype._cacheColumnDefs=function(){var t=this;this._columnDefsByName.clear();var e=this._contentColumnDefs?this._contentColumnDefs.toArray():[];this._customColumnDefs.forEach(function(t){return e.push(t)}),e.forEach(function(e){if(t._columnDefsByName.has(e.name))throw n=e.name,Error('Duplicate column definition name provided: "'+n+'".');var n;t._columnDefsByName.set(e.name,e)})},t.prototype._cacheRowDefs=function(){var t=this;this._rowDefs=this._contentRowDefs?this._contentRowDefs.toArray():[],this._customRowDefs.forEach(function(e){return t._rowDefs.push(e)});var e=this._rowDefs.filter(function(t){return!t.when});if(e.length>1)throw Error("There can only be one default row without a when predicate function.");this._defaultRowDef=e[0]},t.prototype._renderUpdatedColumns=function(){var t=this;this._rowDefs.forEach(function(e){e.getColumnsDiff()&&(t._dataDiffer.diff([]),t._rowPlaceholder.viewContainer.clear(),t.renderRows())}),this._headerRowDef&&this._headerRowDef.getColumnsDiff()&&this._renderHeaderRow()},t.prototype._switchDataSource=function(t){this._data=[],this.dataSource instanceof n.DataSource&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),t||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowPlaceholder.viewContainer.clear()),this._dataSource=t},t.prototype._observeRenderChanges=function(){var t=this;if(this.dataSource){var e;if(this.dataSource.connect instanceof Function?e=this.dataSource.connect(this):this.dataSource instanceof a.Observable?e=this.dataSource:Array.isArray(this.dataSource)&&(e=s.of(this.dataSource)),void 0===e)throw Error("Provided data source did not match an array, Observable, or DataSource");this._renderChangeSubscription=e.pipe(r.takeUntil(this._onDestroy)).subscribe(function(e){t._data=e,t.renderRows()})}},t.prototype._renderHeaderRow=function(){this._headerRowPlaceholder.viewContainer.length>0&&this._headerRowPlaceholder.viewContainer.clear();var t=this._getHeaderCellTemplatesForRow(this._headerRowDef);t.length&&(this._headerRowPlaceholder.viewContainer.createEmbeddedView(this._headerRowDef.template,{cells:t}),t.forEach(function(t){m.mostRecentCellOutlet&&m.mostRecentCellOutlet._viewContainer.createEmbeddedView(t.template,{})}),this._changeDetectorRef.markForCheck())},t.prototype._getRowDef=function(t,e){if(1==this._rowDefs.length)return this._rowDefs[0];var n=this._rowDefs.find(function(n){return n.when&&n.when(e,t)})||this._defaultRowDef;if(!n)throw Error("Could not find a matching row definition for the provided row data.");return n},t.prototype._insertRow=function(t,e){var n=this._getRowDef(t,e),r={$implicit:t};this._rowPlaceholder.viewContainer.createEmbeddedView(n.template,r,e),this._getCellTemplatesForRow(n).forEach(function(t){m.mostRecentCellOutlet&&m.mostRecentCellOutlet._viewContainer.createEmbeddedView(t.template,r)}),this._changeDetectorRef.markForCheck()},t.prototype._updateRowIndexContext=function(){for(var t=this._rowPlaceholder.viewContainer,e=0,n=t.length;e<n;e++){var r=t.get(e);r.context.index=e,r.context.count=n,r.context.first=0===e,r.context.last=e===n-1,r.context.even=e%2==0,r.context.odd=!r.context.even}},t.prototype._getHeaderCellTemplatesForRow=function(t){var e=this;return t&&t.columns?t.columns.map(function(t){var n=e._columnDefsByName.get(t);if(!n)throw x(t);return n.headerCell}):[]},t.prototype._getCellTemplatesForRow=function(t){var e=this;return t.columns?t.columns.map(function(t){var n=e._columnDefsByName.get(t);if(!n)throw x(t);return n.cell}):[]},t.decorators=[{type:e.Component,args:[{selector:"cdk-table",exportAs:"cdkTable",template:k,host:{class:"cdk-table"},encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.IterableDiffers},{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["role"]}]}]},t.propDecorators={trackBy:[{type:e.Input}],dataSource:[{type:e.Input}],_rowPlaceholder:[{type:e.ViewChild,args:[S]}],_headerRowPlaceholder:[{type:e.ViewChild,args:[E]}],_contentColumnDefs:[{type:e.ContentChildren,args:[_]}],_contentRowDefs:[{type:e.ContentChildren,args:[f]}],_headerRowDef:[{type:e.ContentChild,args:[h]}]},t}()),P=[O,f,v,m,b,_,C,y,w,g,h,S,E],A=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[l.CommonModule],exports:[P],declarations:[P]}]}],t.ctorParameters=function(){return[]},t}();t.DataSource=n.DataSource,t.RowPlaceholder=S,t.HeaderRowPlaceholder=E,t.CDK_TABLE_TEMPLATE=k,t.CdkTable=O,t.CdkCellDef=v,t.CdkHeaderCellDef=b,t.CdkColumnDef=_,t.CdkHeaderCell=w,t.CdkCell=C,t.CDK_ROW_TEMPLATE=p,t.BaseRowDef=d,t.CdkHeaderRowDef=h,t.CdkRowDef=f,t.CdkCellOutlet=m,t.CdkHeaderRow=g,t.CdkRow=y,t.CdkTableModule=A,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core"),t("@angular/cdk/collections"),t("rxjs/operators/takeUntil"),t("rxjs/BehaviorSubject"),t("rxjs/Subject"),t("rxjs/Observable"),t("rxjs/observable/of"),t("@angular/common")):i((r.ng=r.ng||{},r.ng.cdk=r.ng.cdk||{},r.ng.cdk.table=r.ng.cdk.table||{}),r.ng.core,r.ng.cdk.collections,r.Rx.operators,r.Rx,r.Rx,r.Rx,r.Rx.Observable,r.ng.common)},{"@angular/cdk/collections":49,"@angular/common":60,"@angular/core":62,"rxjs/BehaviorSubject":70,"rxjs/Observable":73,"rxjs/Subject":77,"rxjs/observable/of":105,"rxjs/operators/takeUntil":147}],59:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i,o,a,s,l){"use strict";var c=function(){},u=function(){},p=function(){function t(t){var e=this;this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?function(){e.headers=new Map,t.split("\n").forEach(function(t){var n=t.indexOf(":");if(n>0){var r=t.slice(0,n),i=r.toLowerCase(),o=t.slice(n+1).trim();e.maybeSetNormalizedName(r,i),e.headers.has(i)?e.headers.get(i).push(o):e.headers.set(i,[o])}})}:function(){e.headers=new Map,Object.keys(t).forEach(function(n){var r=t[n],i=n.toLowerCase();"string"==typeof r&&(r=[r]),r.length>0&&(e.headers.set(i,r),e.maybeSetNormalizedName(n,i))})}:this.headers=new Map}return t.prototype.has=function(t){return this.init(),this.headers.has(t.toLowerCase())},t.prototype.get=function(t){this.init();var e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null},t.prototype.keys=function(){return this.init(),Array.from(this.normalizedNames.values())},t.prototype.getAll=function(t){return this.init(),this.headers.get(t.toLowerCase())||null},t.prototype.append=function(t,e){return this.clone({name:t,value:e,op:"a"})},t.prototype.set=function(t,e){return this.clone({name:t,value:e,op:"s"})},t.prototype.delete=function(t,e){return this.clone({name:t,value:e,op:"d"})},t.prototype.maybeSetNormalizedName=function(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)},t.prototype.init=function(){var e=this;this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(function(t){return e.applyUpdate(t)}),this.lazyUpdate=null))},t.prototype.copyFrom=function(t){var e=this;t.init(),Array.from(t.headers.keys()).forEach(function(n){e.headers.set(n,t.headers.get(n)),e.normalizedNames.set(n,t.normalizedNames.get(n))})},t.prototype.clone=function(e){var n=new t;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([e]),n},t.prototype.applyUpdate=function(t){var e=t.name.toLowerCase();switch(t.op){case"a":case"s":var n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);var r=("a"===t.op?this.headers.get(e):void 0)||[];r.push.apply(r,n),this.headers.set(e,r);break;case"d":var i=t.value;if(i){var o=this.headers.get(e);if(!o)return;0===(o=o.filter(function(t){return-1===i.indexOf(t)})).length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,o)}else this.headers.delete(e),this.normalizedNames.delete(e)}},t.prototype.forEach=function(t){var e=this;this.init(),Array.from(this.normalizedNames.keys()).forEach(function(n){return t(e.normalizedNames.get(n),e.headers.get(n))})},t}(),d=function(){function t(){}return t.prototype.encodeKey=function(t){return h(t)},t.prototype.encodeValue=function(t){return h(t)},t.prototype.decodeKey=function(t){return decodeURIComponent(t)},t.prototype.decodeValue=function(t){return decodeURIComponent(t)},t}();function h(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var f=function(){function t(t){void 0===t&&(t={});var e,n,r,i=this;if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new d,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=(e=t.fromString,n=this.encoder,r=new Map,e.length>0&&e.split("&").forEach(function(t){var e=t.indexOf("="),i=-1==e?[n.decodeKey(t),""]:[n.decodeKey(t.slice(0,e)),n.decodeValue(t.slice(e+1))],o=i[0],a=i[1],s=r.get(o)||[];s.push(a),r.set(o,s)}),r)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(function(e){var n=t.fromObject[e];i.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}return t.prototype.has=function(t){return this.init(),this.map.has(t)},t.prototype.get=function(t){this.init();var e=this.map.get(t);return e?e[0]:null},t.prototype.getAll=function(t){return this.init(),this.map.get(t)||null},t.prototype.keys=function(){return this.init(),Array.from(this.map.keys())},t.prototype.append=function(t,e){return this.clone({param:t,value:e,op:"a"})},t.prototype.set=function(t,e){return this.clone({param:t,value:e,op:"s"})},t.prototype.delete=function(t,e){return this.clone({param:t,value:e,op:"d"})},t.prototype.toString=function(){var t=this;return this.init(),this.keys().map(function(e){var n=t.encoder.encodeKey(e);return t.map.get(e).map(function(e){return n+"="+t.encoder.encodeValue(e)}).join("&")}).join("&")},t.prototype.clone=function(e){var n=new t({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([e]),n},t.prototype.init=function(){var t=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(function(e){return t.map.set(e,t.cloneFrom.map.get(e))}),this.updates.forEach(function(e){switch(e.op){case"a":case"s":var n=("a"===e.op?t.map.get(e.param):void 0)||[];n.push(e.value),t.map.set(e.param,n);break;case"d":if(void 0===e.value){t.map.delete(e.param);break}var r=t.map.get(e.param)||[],i=r.indexOf(e.value);-1!==i&&r.splice(i,1),r.length>0?t.map.set(e.param,r):t.map.delete(e.param)}}),this.cloneFrom=null)},t}();function m(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function g(t){return"undefined"!=typeof Blob&&t instanceof Blob}function y(t){return"undefined"!=typeof FormData&&t instanceof FormData}var v=function(){function t(t,e,n,r){var i;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==n?n:null,i=r):i=n,i&&(this.reportProgress=!!i.reportProgress,this.withCredentials=!!i.withCredentials,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.params&&(this.params=i.params)),this.headers||(this.headers=new p),this.params){var o=this.params.toString();if(0===o.length)this.urlWithParams=e;else{var a=e.indexOf("?"),s=-1===a?"?":a<e.length-1?"&":"";this.urlWithParams=e+s+o}}else this.params=new f,this.urlWithParams=e}return t.prototype.serializeBody=function(){return null===this.body?null:m(this.body)||g(this.body)||y(this.body)||"string"==typeof this.body?this.body:this.body instanceof f?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()},t.prototype.detectContentTypeHeader=function(){return null===this.body?null:y(this.body)?null:g(this.body)?this.body.type||null:m(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof f?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null},t.prototype.clone=function(e){void 0===e&&(e={});var n=e.method||this.method,r=e.url||this.url,i=e.responseType||this.responseType,o=void 0!==e.body?e.body:this.body,a=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,s=void 0!==e.reportProgress?e.reportProgress:this.reportProgress,l=e.headers||this.headers,c=e.params||this.params;return void 0!==e.setHeaders&&(l=Object.keys(e.setHeaders).reduce(function(t,n){return t.set(n,e.setHeaders[n])},l)),e.setParams&&(c=Object.keys(e.setParams).reduce(function(t,n){return t.set(n,e.setParams[n])},c)),new t(n,r,o,{params:c,headers:l,reportProgress:s,responseType:i,withCredentials:a})},t}(),b={Sent:0,UploadProgress:1,ResponseHeader:2,DownloadProgress:3,Response:4,User:5};b[b.Sent]="Sent",b[b.UploadProgress]="UploadProgress",b[b.ResponseHeader]="ResponseHeader",b[b.DownloadProgress]="DownloadProgress",b[b.Response]="Response",b[b.User]="User";var _=function(t,e,n){void 0===e&&(e=200),void 0===n&&(n="OK"),this.headers=t.headers||new p,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300},w=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.type=b.ResponseHeader,n}return a.__extends(e,t),e.prototype.clone=function(t){return void 0===t&&(t={}),new e({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})},e}(_),C=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.type=b.Response,n.body=void 0!==e.body?e.body:null,n}return a.__extends(e,t),e.prototype.clone=function(t){return void 0===t&&(t={}),new e({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})},e}(_),x=function(t){function e(e){var n=t.call(this,e,0,"Unknown Error")||this;return n.name="HttpErrorResponse",n.ok=!1,n.status>=200&&n.status<300?n.message="Http failure during parsing for "+(e.url||"(unknown url)"):n.message="Http failure response for "+(e.url||"(unknown url)")+": "+e.status+" "+e.statusText,n.error=e.error||null,n}return a.__extends(e,t),e}(_);function S(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}var E=function(){function t(t){this.handler=t}return t.prototype.request=function(t,e,a){var s,l=this;if(void 0===a&&(a={}),t instanceof v)s=t;else{var c=void 0;c=a.headers instanceof p?a.headers:new p(a.headers);var u=void 0;a.params&&(u=a.params instanceof f?a.params:new f({fromObject:a.params})),s=new v(t,e,void 0!==a.body?a.body:null,{headers:c,params:u,reportProgress:a.reportProgress,responseType:a.responseType||"json",withCredentials:a.withCredentials})}var d=r.concatMap.call(n.of(s),function(t){return l.handler.handle(t)});if(t instanceof v||"events"===a.observe)return d;var h=i.filter.call(d,function(t){return t instanceof C});switch(a.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return o.map.call(h,function(t){if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body});case"blob":return o.map.call(h,function(t){if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body});case"text":return o.map.call(h,function(t){if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body});case"json":default:return o.map.call(h,function(t){return t.body})}case"response":return h;default:throw new Error("Unreachable: unhandled observe type "+a.observe+"}")}},t.prototype.delete=function(t,e){return void 0===e&&(e={}),this.request("DELETE",t,e)},t.prototype.get=function(t,e){return void 0===e&&(e={}),this.request("GET",t,e)},t.prototype.head=function(t,e){return void 0===e&&(e={}),this.request("HEAD",t,e)},t.prototype.jsonp=function(t,e){return this.request("JSONP",t,{params:(new f).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})},t.prototype.options=function(t,e){return void 0===e&&(e={}),this.request("OPTIONS",t,e)},t.prototype.patch=function(t,e,n){return void 0===n&&(n={}),this.request("PATCH",t,S(n,e))},t.prototype.post=function(t,e,n){return void 0===n&&(n={}),this.request("POST",t,S(n,e))},t.prototype.put=function(t,e,n){return void 0===n&&(n={}),this.request("PUT",t,S(n,e))},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:c}]},t}(),k=function(){function t(t,e){this.next=t,this.interceptor=e}return t.prototype.handle=function(t){return this.interceptor.intercept(t,this.next)},t}(),O=new e.InjectionToken("HTTP_INTERCEPTORS"),P=function(){function t(){}return t.prototype.intercept=function(t,e){return e.handle(t)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}(),A=0,D=function(){},T=function(){function t(t,e){this.callbackMap=t,this.document=e}return t.prototype.nextCallback=function(){return"ng_jsonp_callback_"+A++},t.prototype.handle=function(t){var e=this;if("JSONP"!==t.method)throw new Error("JSONP requests must use JSONP request method.");if("json"!==t.responseType)throw new Error("JSONP requests must use Json response type.");return new l.Observable(function(n){var r=e.nextCallback(),i=t.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/,"="+r+"$1"),o=e.document.createElement("script");o.src=i;var a=null,s=!1,l=!1;e.callbackMap[r]=function(t){delete e.callbackMap[r],l||(a=t,s=!0)};var c=function(){o.parentNode&&o.parentNode.removeChild(o),delete e.callbackMap[r]},u=function(t){l||(c(),s?(n.next(new C({body:a,status:200,statusText:"OK",url:i})),n.complete()):n.error(new x({url:i,status:0,statusText:"JSONP Error",error:new Error("JSONP injected script did not invoke callback.")})))},p=function(t){l||(c(),n.error(new x({error:t,status:0,statusText:"JSONP Error",url:i})))};return o.addEventListener("load",u),o.addEventListener("error",p),e.document.body.appendChild(o),n.next({type:b.Sent}),function(){l=!0,o.removeEventListener("load",u),o.removeEventListener("error",p),c()}})},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:D},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},t}(),M=function(){function t(t){this.jsonp=t}return t.prototype.intercept=function(t,e){return"JSONP"===t.method?this.jsonp.handle(t):e.handle(t)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:T}]},t}(),I=/^\)\]\}',?\n/;var R=function(){},N=function(){function t(){}return t.prototype.build=function(){return new XMLHttpRequest},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}(),L=function(){function t(t){this.xhrFactory=t}return t.prototype.handle=function(t){var e=this;if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new l.Observable(function(n){var r=e.xhrFactory.build();if(r.open(t.method,t.urlWithParams),t.withCredentials&&(r.withCredentials=!0),t.headers.forEach(function(t,e){return r.setRequestHeader(t,e.join(","))}),t.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){var i=t.detectContentTypeHeader();null!==i&&r.setRequestHeader("Content-Type",i)}if(t.responseType){var o=t.responseType.toLowerCase();r.responseType="json"!==o?o:"text"}var a=t.serializeBody(),s=null,l=function(){if(null!==s)return s;var e,n=1223===r.status?204:r.status,i=r.statusText||"OK",o=new p(r.getAllResponseHeaders()),a=("responseURL"in(e=r)&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null)||t.url;return s=new w({headers:o,status:n,statusText:i,url:a})},c=function(){var e=l(),i=e.headers,o=e.status,a=e.statusText,s=e.url,c=null;204!==o&&(c=void 0===r.response?r.responseText:r.response),0===o&&(o=c?200:0);var u=o>=200&&o<300;if("json"===t.responseType&&"string"==typeof c){var p=c;c=c.replace(I,"");try{c=""!==c?JSON.parse(c):null}catch(t){c=p,u&&(u=!1,c={error:t,text:c})}}u?(n.next(new C({body:c,headers:i,status:o,statusText:a,url:s||void 0})),n.complete()):n.error(new x({error:c,headers:i,status:o,statusText:a,url:s||void 0}))},u=function(t){var e=new x({error:t,status:r.status||0,statusText:r.statusText||"Unknown Error"});n.error(e)},d=!1,h=function(e){d||(n.next(l()),d=!0);var i={type:b.DownloadProgress,loaded:e.loaded};e.lengthComputable&&(i.total=e.total),"text"===t.responseType&&r.responseText&&(i.partialText=r.responseText),n.next(i)},f=function(t){var e={type:b.UploadProgress,loaded:t.loaded};t.lengthComputable&&(e.total=t.total),n.next(e)};return r.addEventListener("load",c),r.addEventListener("error",u),t.reportProgress&&(r.addEventListener("progress",h),null!==a&&r.upload&&r.upload.addEventListener("progress",f)),r.send(a),n.next({type:b.Sent}),function(){r.removeEventListener("error",u),r.removeEventListener("load",c),t.reportProgress&&(r.removeEventListener("progress",h),null!==a&&r.upload&&r.upload.removeEventListener("progress",f)),r.abort()}})},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:R}]},t}(),j=new e.InjectionToken("XSRF_COOKIE_NAME"),F=new e.InjectionToken("XSRF_HEADER_NAME"),V=function(){},B=function(){function t(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return t.prototype.getToken=function(){if("server"===this.platform)return null;var t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=s.ɵparseCookieValue(t,this.cookieName),this.lastCookieString=t),this.lastToken},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]},{type:void 0,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]},{type:void 0,decorators:[{type:e.Inject,args:[j]}]}]},t}(),U=function(){function t(t,e){this.tokenService=t,this.headerName=e}return t.prototype.intercept=function(t,e){var n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);var r=this.tokenService.getToken();return null===r||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,r)})),e.handle(t)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:V},{type:void 0,decorators:[{type:e.Inject,args:[F]}]}]},t}(),H=function(){function t(t,e){this.backend=t,this.injector=e,this.chain=null}return t.prototype.handle=function(t){if(null===this.chain){var e=this.injector.get(O,[]);this.chain=e.reduceRight(function(t,e){return new k(t,e)},this.backend)}return this.chain.handle(t)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:u},{type:e.Injector}]},t}();function z(){return"object"==typeof window?window:{}}var G=function(){function t(){}return t.disable=function(){return{ngModule:t,providers:[{provide:U,useClass:P}]}},t.withOptions=function(e){return void 0===e&&(e={}),{ngModule:t,providers:[e.cookieName?{provide:j,useValue:e.cookieName}:[],e.headerName?{provide:F,useValue:e.headerName}:[]]}},t.decorators=[{type:e.NgModule,args:[{providers:[U,{provide:O,useExisting:U,multi:!0},{provide:V,useClass:B},{provide:j,useValue:"XSRF-TOKEN"},{provide:F,useValue:"X-XSRF-TOKEN"}]}]}],t.ctorParameters=function(){return[]},t}(),W=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[G.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})],providers:[E,{provide:c,useClass:H},L,{provide:u,useExisting:L},N,{provide:R,useExisting:N}]}]}],t.ctorParameters=function(){return[]},t}(),q=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{providers:[T,{provide:D,useFactory:z},{provide:O,useClass:M,multi:!0}]}]}],t.ctorParameters=function(){return[]},t}();t.HttpBackend=u,t.HttpHandler=c,t.HttpClient=E,t.HttpHeaders=p,t.HTTP_INTERCEPTORS=O,t.JsonpClientBackend=T,t.JsonpInterceptor=M,t.HttpClientJsonpModule=q,t.HttpClientModule=W,t.HttpClientXsrfModule=G,t.ɵinterceptingHandler=function(t,e){return void 0===e&&(e=[]),e?e.reduceRight(function(t,e){return new k(t,e)},t):t},t.HttpParams=f,t.HttpUrlEncodingCodec=d,t.HttpRequest=v,t.HttpErrorResponse=x,t.HttpEventType=b,t.HttpHeaderResponse=w,t.HttpResponse=C,t.HttpResponseBase=_,t.HttpXhrBackend=L,t.XhrFactory=R,t.HttpXsrfTokenExtractor=V,t.ɵa=P,t.ɵb=D,t.ɵc=H,t.ɵd=z,t.ɵe=N,t.ɵh=B,t.ɵi=U,t.ɵf=j,t.ɵg=F,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core"),t("rxjs/observable/of"),t("rxjs/operator/concatMap"),t("rxjs/operator/filter"),t("rxjs/operator/map"),t("tslib"),t("@angular/common"),t("rxjs/Observable")):i((r.ng=r.ng||{},r.ng.common=r.ng.common||{},r.ng.common.http={}),r.ng.core,r.Rx.Observable,r.Rx.Observable.prototype,r.Rx.Observable.prototype,r.Rx.Observable.prototype,r.tslib,r.ng.common,r.Rx)},{"@angular/common":60,"@angular/core":62,"rxjs/Observable":73,"rxjs/observable/of":105,"rxjs/operator/concatMap":110,"rxjs/operator/filter":112,"rxjs/operator/map":115,tslib:176}],60:[function(t,e,n){var r,i;r=this,i=function(t,e){"use strict";var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function r(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o=function(){},a=new e.InjectionToken("Location Initialized"),s=function(){},l=new e.InjectionToken("appBaseHref"),c=function(){function t(n){var r=this;this._subject=new e.EventEmitter,this._platformStrategy=n;var i=this._platformStrategy.getBaseHref();this._baseHref=t.stripTrailingSlash(u(i)),this._platformStrategy.onPopState(function(t){r._subject.emit({url:r.path(!0),pop:!0,type:t.type})})}return t.prototype.path=function(t){return void 0===t&&(t=!1),this.normalize(this._platformStrategy.path(t))},t.prototype.isCurrentPathEqualTo=function(e,n){return void 0===n&&(n=""),this.path()==this.normalize(e+t.normalizeQueryParams(n))},t.prototype.normalize=function(e){return t.stripTrailingSlash((n=this._baseHref,r=u(e),n&&r.startsWith(n)?r.substring(n.length):r));var n,r},t.prototype.prepareExternalUrl=function(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)},t.prototype.go=function(t,e){void 0===e&&(e=""),this._platformStrategy.pushState(null,"",t,e)},t.prototype.replaceState=function(t,e){void 0===e&&(e=""),this._platformStrategy.replaceState(null,"",t,e)},t.prototype.forward=function(){this._platformStrategy.forward()},t.prototype.back=function(){this._platformStrategy.back()},t.prototype.subscribe=function(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})},t.normalizeQueryParams=function(t){return t&&"?"!==t[0]?"?"+t:t},t.joinWithSlash=function(t,e){if(0==t.length)return e;if(0==e.length)return t;var n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e},t.stripTrailingSlash=function(t){var e=t.match(/#|\?|$/),n=e&&e.index||t.length,r=n-("/"===t[n-1]?1:0);return t.slice(0,r)+t.slice(n)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:s}]},t}();function u(t){return t.replace(/\/index.html$/,"")}var p=function(t){function n(e,n){var r=t.call(this)||this;return r._platformLocation=e,r._baseHref="",null!=n&&(r._baseHref=n),r}return r(n,t),n.prototype.onPopState=function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)},n.prototype.getBaseHref=function(){return this._baseHref},n.prototype.path=function(t){void 0===t&&(t=!1);var e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e},n.prototype.prepareExternalUrl=function(t){var e=c.joinWithSlash(this._baseHref,t);return e.length>0?"#"+e:e},n.prototype.pushState=function(t,e,n,r){var i=this.prepareExternalUrl(n+c.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(t,e,i)},n.prototype.replaceState=function(t,e,n,r){var i=this.prepareExternalUrl(n+c.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,i)},n.prototype.forward=function(){this._platformLocation.forward()},n.prototype.back=function(){this._platformLocation.back()},n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[{type:o},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[l]}]}]},n}(s),d=function(t){function n(e,n){var r=t.call(this)||this;if(r._platformLocation=e,null==n&&(n=r._platformLocation.getBaseHrefFromDOM()),null==n)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return r._baseHref=n,r}return r(n,t),n.prototype.onPopState=function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)},n.prototype.getBaseHref=function(){return this._baseHref},n.prototype.prepareExternalUrl=function(t){return c.joinWithSlash(this._baseHref,t)},n.prototype.path=function(t){void 0===t&&(t=!1);var e=this._platformLocation.pathname+c.normalizeQueryParams(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?""+e+n:e},n.prototype.pushState=function(t,e,n,r){var i=this.prepareExternalUrl(n+c.normalizeQueryParams(r));this._platformLocation.pushState(t,e,i)},n.prototype.replaceState=function(t,e,n,r){var i=this.prepareExternalUrl(n+c.normalizeQueryParams(r));this._platformLocation.replaceState(t,e,i)},n.prototype.forward=function(){this._platformLocation.forward()},n.prototype.back=function(){this._platformLocation.back()},n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[{type:o},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[l]}]}]},n}(s),h={AOA:[,"Kz"],ARS:[,"$"],AUD:["A$","$"],BAM:[,"KM"],BBD:[,"$"],BDT:[,"৳"],BMD:[,"$"],BND:[,"$"],BOB:[,"Bs"],BRL:["R$"],BSD:[,"$"],BWP:[,"P"],BYN:[,"р."],BZD:[,"$"],CAD:["CA$","$"],CLP:[,"$"],CNY:["CN¥","¥"],COP:[,"$"],CRC:[,"₡"],CUC:[,"$"],CUP:[,"$"],CZK:[,"Kč"],DKK:[,"kr"],DOP:[,"$"],EGP:[,"E£"],ESP:[,"₧"],EUR:["€"],FJD:[,"$"],FKP:[,"£"],GBP:["£"],GEL:[,"₾"],GIP:[,"£"],GNF:[,"FG"],GTQ:[,"Q"],GYD:[,"$"],HKD:["HK$","$"],HNL:[,"L"],HRK:[,"kn"],HUF:[,"Ft"],IDR:[,"Rp"],ILS:["₪"],INR:["₹"],ISK:[,"kr"],JMD:[,"$"],JPY:["¥"],KHR:[,"៛"],KMF:[,"CF"],KPW:[,"₩"],KRW:["₩"],KYD:[,"$"],KZT:[,"₸"],LAK:[,"₭"],LBP:[,"L£"],LKR:[,"Rs"],LRD:[,"$"],LTL:[,"Lt"],LVL:[,"Ls"],MGA:[,"Ar"],MMK:[,"K"],MNT:[,"₮"],MUR:[,"Rs"],MXN:["MX$","$"],MYR:[,"RM"],NAD:[,"$"],NGN:[,"₦"],NIO:[,"C$"],NOK:[,"kr"],NPR:[,"Rs"],NZD:["NZ$","$"],PHP:[,"₱"],PKR:[,"Rs"],PLN:[,"zł"],PYG:[,"₲"],RON:[,"lei"],RUB:[,"₽"],RUR:[,"р."],RWF:[,"RF"],SBD:[,"$"],SEK:[,"kr"],SGD:[,"$"],SHP:[,"£"],SRD:[,"$"],SSP:[,"£"],STD:[,"Db"],SYP:[,"£"],THB:[,"฿"],TOP:[,"T$"],TRY:[,"₺"],TTD:[,"$"],TWD:["NT$","$"],UAH:[,"₴"],USD:["$"],UYU:[,"$"],VEF:[,"Bs"],VND:["₫"],XAF:["FCFA"],XCD:["EC$","$"],XOF:["CFA"],XPF:["CFPF"],ZAR:[,"R"],ZMW:[,"ZK"]};var f=["en",[["a","p"],["AM","PM"]],[["AM","PM"],,],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",,"{1} 'at' {0}"],[".",",",";","%","+","-","E","×","‰","∞","NaN",":"],["#,##0.###","#,##0%","¤#,##0.00","#E0"],"$","US Dollar",function(t){var e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}],m={};function g(t,e,n){"string"!=typeof e&&(n=e,e=t[0]),e=e.toLowerCase().replace(/_/g,"-"),m[e]=t,n&&(m[e][18]=n)}var y={Decimal:0,Percent:1,Currency:2,Scientific:3};y[y.Decimal]="Decimal",y[y.Percent]="Percent",y[y.Currency]="Currency",y[y.Scientific]="Scientific";var v={Zero:0,One:1,Two:2,Few:3,Many:4,Other:5};v[v.Zero]="Zero",v[v.One]="One",v[v.Two]="Two",v[v.Few]="Few",v[v.Many]="Many",v[v.Other]="Other";var b={Format:0,Standalone:1};b[b.Format]="Format",b[b.Standalone]="Standalone";var _={Narrow:0,Abbreviated:1,Wide:2,Short:3};_[_.Narrow]="Narrow",_[_.Abbreviated]="Abbreviated",_[_.Wide]="Wide",_[_.Short]="Short";var w={Short:0,Medium:1,Long:2,Full:3};w[w.Short]="Short",w[w.Medium]="Medium",w[w.Long]="Long",w[w.Full]="Full";var C={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};C[C.Decimal]="Decimal",C[C.Group]="Group",C[C.List]="List",C[C.PercentSign]="PercentSign",C[C.PlusSign]="PlusSign",C[C.MinusSign]="MinusSign",C[C.Exponential]="Exponential",C[C.SuperscriptingExponent]="SuperscriptingExponent",C[C.PerMille]="PerMille",C[C.Infinity]="Infinity",C[C.NaN]="NaN",C[C.TimeSeparator]="TimeSeparator",C[C.CurrencyDecimal]="CurrencyDecimal",C[C.CurrencyGroup]="CurrencyGroup";var x={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6};function S(t){return B(t)[0]}function E(t,e,n){var r=B(t);return F(F([r[1],r[2]],e),n)}function k(t,e,n){var r=B(t);return F(F([r[3],r[4]],e),n)}function O(t,e,n){var r=B(t);return F(F([r[5],r[6]],e),n)}function P(t,e){return F(B(t)[7],e)}function A(t,e){return F(B(t)[10],e)}function D(t,e){return F(B(t)[11],e)}function T(t,e){return F(B(t)[12],e)}function M(t,e){var n=B(t),r=n[13][e];if(void 0===r){if(e===C.CurrencyDecimal)return n[13][C.Decimal];if(e===C.CurrencyGroup)return n[13][C.Group]}return r}function I(t,e){return B(t)[14][e]}function R(t){return B(t)[17]}function N(t){if(!t[18])throw new Error('Missing extra locale data for the locale "'+t[0]+'". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.')}function L(t){var e=B(t);return N(e),(e[18][2]||[]).map(function(t){return"string"==typeof t?V(t):[V(t[0]),V(t[1])]})}function j(t,e,n){var r=B(t);return N(r),F(F([r[18][0],r[18][1]],e)||[],n)||[]}function F(t,e){for(var n=e;n>-1;n--)if(void 0!==t[n])return t[n];throw new Error("Locale data API: locale data undefined")}function V(t){var e=t.split(":");return{hours:+e[0],minutes:+e[1]}}function B(t){var e=t.toLowerCase().replace(/_/g,"-"),n=m[e];if(n)return n;var r=e.split("-")[0];if(n=m[r])return n;if("en"===r)return f;throw new Error('Missing locale data for the locale "'+t+'".')}function U(t,e){var n=h[t]||[],r=n[1];return"narrow"===e&&"string"==typeof r?r:n[0]||t}x[x.Sunday]="Sunday",x[x.Monday]="Monday",x[x.Tuesday]="Tuesday",x[x.Wednesday]="Wednesday",x[x.Thursday]="Thursday",x[x.Friday]="Friday",x[x.Saturday]="Saturday";var H=new e.InjectionToken("UseV4Plurals"),z=function(){};function G(t,e,n,r){var i="="+t;if(e.indexOf(i)>-1)return i;if(i=n.getPluralCategory(t,r),e.indexOf(i)>-1)return i;if(e.indexOf("other")>-1)return"other";throw new Error('No plural message found for value "'+t+'"')}var W=function(t){function n(e,n){var r=t.call(this)||this;return r.locale=e,r.deprecatedPluralFn=n,r}return r(n,t),n.prototype.getPluralCategory=function(t,e){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(e||this.locale,t):R(e||this.locale)(t)){case v.Zero:return"zero";case v.One:return"one";case v.Two:return"two";case v.Few:return"few";case v.Many:return"many";default:return"other"}},n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[e.LOCALE_ID]}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[H]}]}]},n}(z);function q(t,e){"string"==typeof e&&(e=parseInt(e,10));var n=e,r=n.toString().replace(/^[^.]*\.?/,""),i=Math.floor(Math.abs(n)),o=r.length,a=parseInt(r,10),s=parseInt(n.toString().replace(/^[^.]*\.?|0+$/g,""),10)||0;switch(t.split("-")[0].toLowerCase()){case"af":case"asa":case"az":case"bem":case"bez":case"bg":case"brx":case"ce":case"cgg":case"chr":case"ckb":case"ee":case"el":case"eo":case"es":case"eu":case"fo":case"fur":case"gsw":case"ha":case"haw":case"hu":case"jgo":case"jmc":case"ka":case"kk":case"kkj":case"kl":case"ks":case"ksb":case"ky":case"lb":case"lg":case"mas":case"mgo":case"ml":case"mn":case"nb":case"nd":case"ne":case"nn":case"nnh":case"nyn":case"om":case"or":case"os":case"ps":case"rm":case"rof":case"rwk":case"saq":case"seh":case"sn":case"so":case"sq":case"ta":case"te":case"teo":case"tk":case"tr":case"ug":case"uz":case"vo":case"vun":case"wae":case"xog":return 1===n?v.One:v.Other;case"ak":case"ln":case"mg":case"pa":case"ti":return n===Math.floor(n)&&n>=0&&n<=1?v.One:v.Other;case"am":case"as":case"bn":case"fa":case"gu":case"hi":case"kn":case"mr":case"zu":return 0===i||1===n?v.One:v.Other;case"ar":return 0===n?v.Zero:1===n?v.One:2===n?v.Two:n%100===Math.floor(n%100)&&n%100>=3&&n%100<=10?v.Few:n%100===Math.floor(n%100)&&n%100>=11&&n%100<=99?v.Many:v.Other;case"ast":case"ca":case"de":case"en":case"et":case"fi":case"fy":case"gl":case"it":case"nl":case"sv":case"sw":case"ur":case"yi":return 1===i&&0===o?v.One:v.Other;case"be":return n%10==1&&n%100!=11?v.One:n%10===Math.floor(n%10)&&n%10>=2&&n%10<=4&&!(n%100>=12&&n%100<=14)?v.Few:n%10==0||n%10===Math.floor(n%10)&&n%10>=5&&n%10<=9||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=14?v.Many:v.Other;case"br":return n%10==1&&n%100!=11&&n%100!=71&&n%100!=91?v.One:n%10==2&&n%100!=12&&n%100!=72&&n%100!=92?v.Two:n%10===Math.floor(n%10)&&(n%10>=3&&n%10<=4||n%10==9)&&!(n%100>=10&&n%100<=19||n%100>=70&&n%100<=79||n%100>=90&&n%100<=99)?v.Few:0!==n&&n%1e6==0?v.Many:v.Other;case"bs":case"hr":case"sr":return 0===o&&i%10==1&&i%100!=11||a%10==1&&a%100!=11?v.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)||a%10===Math.floor(a%10)&&a%10>=2&&a%10<=4&&!(a%100>=12&&a%100<=14)?v.Few:v.Other;case"cs":case"sk":return 1===i&&0===o?v.One:i===Math.floor(i)&&i>=2&&i<=4&&0===o?v.Few:0!==o?v.Many:v.Other;case"cy":return 0===n?v.Zero:1===n?v.One:2===n?v.Two:3===n?v.Few:6===n?v.Many:v.Other;case"da":return 1===n||0!==s&&(0===i||1===i)?v.One:v.Other;case"dsb":case"hsb":return 0===o&&i%100==1||a%100==1?v.One:0===o&&i%100==2||a%100==2?v.Two:0===o&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||a%100===Math.floor(a%100)&&a%100>=3&&a%100<=4?v.Few:v.Other;case"ff":case"fr":case"hy":case"kab":return 0===i||1===i?v.One:v.Other;case"fil":return 0===o&&(1===i||2===i||3===i)||0===o&&i%10!=4&&i%10!=6&&i%10!=9||0!==o&&a%10!=4&&a%10!=6&&a%10!=9?v.One:v.Other;case"ga":return 1===n?v.One:2===n?v.Two:n===Math.floor(n)&&n>=3&&n<=6?v.Few:n===Math.floor(n)&&n>=7&&n<=10?v.Many:v.Other;case"gd":return 1===n||11===n?v.One:2===n||12===n?v.Two:n===Math.floor(n)&&(n>=3&&n<=10||n>=13&&n<=19)?v.Few:v.Other;case"gv":return 0===o&&i%10==1?v.One:0===o&&i%10==2?v.Two:0!==o||i%100!=0&&i%100!=20&&i%100!=40&&i%100!=60&&i%100!=80?0!==o?v.Many:v.Other:v.Few;case"he":return 1===i&&0===o?v.One:2===i&&0===o?v.Two:0!==o||n>=0&&n<=10||n%10!=0?v.Other:v.Many;case"is":return 0===s&&i%10==1&&i%100!=11||0!==s?v.One:v.Other;case"ksh":return 0===n?v.Zero:1===n?v.One:v.Other;case"kw":case"naq":case"se":case"smn":return 1===n?v.One:2===n?v.Two:v.Other;case"lag":return 0===n?v.Zero:0!==i&&1!==i||0===n?v.Other:v.One;case"lt":return n%10!=1||n%100>=11&&n%100<=19?n%10===Math.floor(n%10)&&n%10>=2&&n%10<=9&&!(n%100>=11&&n%100<=19)?v.Few:0!==a?v.Many:v.Other:v.One;case"lv":case"prg":return n%10==0||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19||2===o&&a%100===Math.floor(a%100)&&a%100>=11&&a%100<=19?v.Zero:n%10==1&&n%100!=11||2===o&&a%10==1&&a%100!=11||2!==o&&a%10==1?v.One:v.Other;case"mk":return 0===o&&i%10==1||a%10==1?v.One:v.Other;case"mt":return 1===n?v.One:0===n||n%100===Math.floor(n%100)&&n%100>=2&&n%100<=10?v.Few:n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19?v.Many:v.Other;case"pl":return 1===i&&0===o?v.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?v.Few:0===o&&1!==i&&i%10===Math.floor(i%10)&&i%10>=0&&i%10<=1||0===o&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||0===o&&i%100===Math.floor(i%100)&&i%100>=12&&i%100<=14?v.Many:v.Other;case"pt":return n===Math.floor(n)&&n>=0&&n<=2&&2!==n?v.One:v.Other;case"ro":return 1===i&&0===o?v.One:0!==o||0===n||1!==n&&n%100===Math.floor(n%100)&&n%100>=1&&n%100<=19?v.Few:v.Other;case"ru":case"uk":return 0===o&&i%10==1&&i%100!=11?v.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?v.Few:0===o&&i%10==0||0===o&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||0===o&&i%100===Math.floor(i%100)&&i%100>=11&&i%100<=14?v.Many:v.Other;case"shi":return 0===i||1===n?v.One:n===Math.floor(n)&&n>=2&&n<=10?v.Few:v.Other;case"si":return 0===n||1===n||0===i&&1===a?v.One:v.Other;case"sl":return 0===o&&i%100==1?v.One:0===o&&i%100==2?v.Two:0===o&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||0!==o?v.Few:v.Other;case"tzm":return n===Math.floor(n)&&n>=0&&n<=1||n===Math.floor(n)&&n>=11&&n<=99?v.One:v.Other;default:return v.Other}}var Y=function(){function t(t,e,n,r){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=r,this._initialClasses=[]}return Object.defineProperty(t.prototype,"klass",{set:function(t){this._applyInitialClasses(!0),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyInitialClasses(!1),this._applyClasses(this._rawClass,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClass",{set:function(t){this._cleanupClasses(this._rawClass),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(e.ɵisListLikeIterable(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(this._iterableDiffer){var t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){var e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}},t.prototype._cleanupClasses=function(t){this._applyClasses(t,!0),this._applyInitialClasses(!1)},t.prototype._applyKeyValueChanges=function(t){var e=this;t.forEachAddedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachChangedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachRemovedItem(function(t){t.previousValue&&e._toggleClass(t.key,!1)})},t.prototype._applyIterableChanges=function(t){var n=this;t.forEachAddedItem(function(t){if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+e.ɵstringify(t.item));n._toggleClass(t.item,!0)}),t.forEachRemovedItem(function(t){return n._toggleClass(t.item,!1)})},t.prototype._applyInitialClasses=function(t){var e=this;this._initialClasses.forEach(function(n){return e._toggleClass(n,!t)})},t.prototype._applyClasses=function(t,e){var n=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return n._toggleClass(t,!e)}):Object.keys(t).forEach(function(r){null!=t[r]&&n._toggleClass(r,!e)}))},t.prototype._toggleClass=function(t,e){var n=this;(t=t.trim())&&t.split(/\s+/g).forEach(function(t){e?n._renderer.addClass(n._ngEl.nativeElement,t):n._renderer.removeClass(n._ngEl.nativeElement,t)})},t.decorators=[{type:e.Directive,args:[{selector:"[ngClass]"}]}],t.ctorParameters=function(){return[{type:e.IterableDiffers},{type:e.KeyValueDiffers},{type:e.ElementRef},{type:e.Renderer2}]},t.propDecorators={klass:[{type:e.Input,args:["class"]}],ngClass:[{type:e.Input}]},t}(),$=function(){function t(t){this._viewContainerRef=t,this._componentRef=null,this._moduleRef=null}return t.prototype.ngOnChanges=function(t){if(this._viewContainerRef.clear(),this._componentRef=null,this.ngComponentOutlet){var n=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;if(t.ngComponentOutletNgModuleFactory)if(this._moduleRef&&this._moduleRef.destroy(),this.ngComponentOutletNgModuleFactory){var r=n.get(e.NgModuleRef);this._moduleRef=this.ngComponentOutletNgModuleFactory.create(r.injector)}else this._moduleRef=null;var i=(this._moduleRef?this._moduleRef.componentFactoryResolver:n.get(e.ComponentFactoryResolver)).resolveComponentFactory(this.ngComponentOutlet);this._componentRef=this._viewContainerRef.createComponent(i,this._viewContainerRef.length,n,this.ngComponentOutletContent)}},t.prototype.ngOnDestroy=function(){this._moduleRef&&this._moduleRef.destroy()},t.decorators=[{type:e.Directive,args:[{selector:"[ngComponentOutlet]"}]}],t.ctorParameters=function(){return[{type:e.ViewContainerRef}]},t.propDecorators={ngComponentOutlet:[{type:e.Input}],ngComponentOutletInjector:[{type:e.Input}],ngComponentOutletContent:[{type:e.Input}],ngComponentOutletNgModuleFactory:[{type:e.Input}]},t}(),K=function(){function t(t,e,n,r){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=r}return Object.defineProperty(t.prototype,"first",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return this.index===this.count-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"even",{get:function(){return this.index%2==0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"odd",{get:function(){return!this.even},enumerable:!0,configurable:!0}),t}(),Q=function(){function t(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._differ=null}return Object.defineProperty(t.prototype,"ngForTrackBy",{get:function(){return this._trackByFn},set:function(t){e.isDevMode()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn("trackBy must be a function, but received "+JSON.stringify(t)+". See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information."),this._trackByFn=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTemplate",{set:function(t){t&&(this._template=t)},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){if("ngForOf"in t){var e=t.ngForOf.currentValue;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(t){throw new Error("Cannot find a differ supporting object '"+e+"' of type '"+((n=e).name||typeof n)+"'. NgFor only supports binding to Iterables such as Arrays.")}}var n},t.prototype.ngDoCheck=function(){if(this._differ){var t=this._differ.diff(this.ngForOf);t&&this._applyChanges(t)}},t.prototype._applyChanges=function(t){var e=this,n=[];t.forEachOperation(function(t,r,i){if(null==t.previousIndex){var o=e._viewContainer.createEmbeddedView(e._template,new K(null,e.ngForOf,-1,-1),i),a=new X(t,o);n.push(a)}else if(null==i)e._viewContainer.remove(r);else{o=e._viewContainer.get(r);e._viewContainer.move(o,i);a=new X(t,o);n.push(a)}});for(var r=0;r<n.length;r++)this._perViewChange(n[r].view,n[r].record);r=0;for(var i=this._viewContainer.length;r<i;r++){var o=this._viewContainer.get(r);o.context.index=r,o.context.count=i}t.forEachIdentityChange(function(t){e._viewContainer.get(t.currentIndex).context.$implicit=t.item})},t.prototype._perViewChange=function(t,e){t.context.$implicit=e.item},t.decorators=[{type:e.Directive,args:[{selector:"[ngFor][ngForOf]"}]}],t.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:e.TemplateRef},{type:e.IterableDiffers}]},t.propDecorators={ngForOf:[{type:e.Input}],ngForTrackBy:[{type:e.Input}],ngForTemplate:[{type:e.Input}]},t}(),X=function(t,e){this.record=t,this.view=e};var Z=function(){function t(t,e){this._viewContainer=t,this._context=new J,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}return Object.defineProperty(t.prototype,"ngIf",{set:function(t){this._context.$implicit=this._context.ngIf=t,this._updateView()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngIfThen",{set:function(t){this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngIfElse",{set:function(t){this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()},enumerable:!0,configurable:!0}),t.prototype._updateView=function(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))},t.decorators=[{type:e.Directive,args:[{selector:"[ngIf]"}]}],t.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:e.TemplateRef}]},t.propDecorators={ngIf:[{type:e.Input}],ngIfThen:[{type:e.Input}],ngIfElse:[{type:e.Input}]},t}(),J=function(){this.$implicit=null,this.ngIf=null},tt=function(){function t(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}return t.prototype.create=function(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)},t.prototype.destroy=function(){this._created=!1,this._viewContainerRef.clear()},t.prototype.enforceState=function(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()},t}(),et=function(){function t(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}return Object.defineProperty(t.prototype,"ngSwitch",{set:function(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)},enumerable:!0,configurable:!0}),t.prototype._addCase=function(){return this._caseCount++},t.prototype._addDefault=function(t){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(t)},t.prototype._matchCase=function(t){var e=t==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||e,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),e},t.prototype._updateDefaultCases=function(t){if(this._defaultViews&&t!==this._defaultUsed){this._defaultUsed=t;for(var e=0;e<this._defaultViews.length;e++){this._defaultViews[e].enforceState(t)}}},t.decorators=[{type:e.Directive,args:[{selector:"[ngSwitch]"}]}],t.ctorParameters=function(){return[]},t.propDecorators={ngSwitch:[{type:e.Input}]},t}(),nt=function(){function t(t,e,n){this.ngSwitch=n,n._addCase(),this._view=new tt(t,e)}return t.prototype.ngDoCheck=function(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))},t.decorators=[{type:e.Directive,args:[{selector:"[ngSwitchCase]"}]}],t.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:e.TemplateRef},{type:et,decorators:[{type:e.Host}]}]},t.propDecorators={ngSwitchCase:[{type:e.Input}]},t}(),rt=function(){function t(t,e,n){n._addDefault(new tt(t,e))}return t.decorators=[{type:e.Directive,args:[{selector:"[ngSwitchDefault]"}]}],t.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:e.TemplateRef},{type:et,decorators:[{type:e.Host}]}]},t}(),it=function(){function t(t){this._localization=t,this._caseViews={}}return Object.defineProperty(t.prototype,"ngPlural",{set:function(t){this._switchValue=t,this._updateView()},enumerable:!0,configurable:!0}),t.prototype.addCase=function(t,e){this._caseViews[t]=e},t.prototype._updateView=function(){this._clearViews();var t=Object.keys(this._caseViews),e=G(this._switchValue,t,this._localization);this._activateView(this._caseViews[e])},t.prototype._clearViews=function(){this._activeView&&this._activeView.destroy()},t.prototype._activateView=function(t){t&&(this._activeView=t,this._activeView.create())},t.decorators=[{type:e.Directive,args:[{selector:"[ngPlural]"}]}],t.ctorParameters=function(){return[{type:z}]},t.propDecorators={ngPlural:[{type:e.Input}]},t}(),ot=function(){function t(t,e,n,r){this.value=t;var i=!isNaN(Number(t));r.addCase(i?"="+t:t,new tt(n,e))}return t.decorators=[{type:e.Directive,args:[{selector:"[ngPluralCase]"}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["ngPluralCase"]}]},{type:e.TemplateRef},{type:e.ViewContainerRef},{type:it,decorators:[{type:e.Host}]}]},t}(),at=function(){function t(t,e,n){this._differs=t,this._ngEl=e,this._renderer=n}return Object.defineProperty(t.prototype,"ngStyle",{set:function(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(this._differ){var t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}},t.prototype._applyChanges=function(t){var e=this;t.forEachRemovedItem(function(t){return e._setStyle(t.key,null)}),t.forEachAddedItem(function(t){return e._setStyle(t.key,t.currentValue)}),t.forEachChangedItem(function(t){return e._setStyle(t.key,t.currentValue)})},t.prototype._setStyle=function(t,e){var n=t.split("."),r=n[0],i=n[1];null!=(e=null!=e&&i?""+e+i:e)?this._renderer.setStyle(this._ngEl.nativeElement,r,e):this._renderer.removeStyle(this._ngEl.nativeElement,r)},t.decorators=[{type:e.Directive,args:[{selector:"[ngStyle]"}]}],t.ctorParameters=function(){return[{type:e.KeyValueDiffers},{type:e.ElementRef},{type:e.Renderer2}]},t.propDecorators={ngStyle:[{type:e.Input}]},t}(),st=function(){function t(t){this._viewContainerRef=t}return t.prototype.ngOnChanges=function(t){this._shouldRecreateView(t)?(this._viewRef&&this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._viewRef)),this.ngTemplateOutlet&&(this._viewRef=this._viewContainerRef.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext))):this._viewRef&&this.ngTemplateOutletContext&&this._updateExistingContext(this.ngTemplateOutletContext)},t.prototype._shouldRecreateView=function(t){var e=t.ngTemplateOutletContext;return!!t.ngTemplateOutlet||e&&this._hasContextShapeChanged(e)},t.prototype._hasContextShapeChanged=function(t){var e=Object.keys(t.previousValue||{}),n=Object.keys(t.currentValue||{});if(e.length===n.length){for(var r=0,i=n;r<i.length;r++){var o=i[r];if(-1===e.indexOf(o))return!0}return!1}return!0},t.prototype._updateExistingContext=function(t){for(var e=0,n=Object.keys(t);e<n.length;e++){var r=n[e];this._viewRef.context[r]=this.ngTemplateOutletContext[r]}},t.decorators=[{type:e.Directive,args:[{selector:"[ngTemplateOutlet]"}]}],t.ctorParameters=function(){return[{type:e.ViewContainerRef}]},t.propDecorators={ngTemplateOutletContext:[{type:e.Input}],ngTemplateOutlet:[{type:e.Input}]},t}(),lt=[Y,$,Q,Z,st,at,et,nt,rt,it,ot],ct={},ut=/((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,pt={Short:0,ShortGMT:1,Long:2,Extended:3};pt[pt.Short]="Short",pt[pt.ShortGMT]="ShortGMT",pt[pt.Long]="Long",pt[pt.Extended]="Extended";var dt={FullYear:0,Month:1,Date:2,Hours:3,Minutes:4,Seconds:5,Milliseconds:6,Day:7};dt[dt.FullYear]="FullYear",dt[dt.Month]="Month",dt[dt.Date]="Date",dt[dt.Hours]="Hours",dt[dt.Minutes]="Minutes",dt[dt.Seconds]="Seconds",dt[dt.Milliseconds]="Milliseconds",dt[dt.Day]="Day";var ht={DayPeriods:0,Days:1,Months:2,Eras:3};function ft(t,e,n,r){e=function t(e,n){var r=S(e);ct[r]=ct[r]||{};if(ct[r][n])return ct[r][n];var i="";switch(n){case"shortDate":i=A(e,w.Short);break;case"mediumDate":i=A(e,w.Medium);break;case"longDate":i=A(e,w.Long);break;case"fullDate":i=A(e,w.Full);break;case"shortTime":i=D(e,w.Short);break;case"mediumTime":i=D(e,w.Medium);break;case"longTime":i=D(e,w.Long);break;case"fullTime":i=D(e,w.Full);break;case"short":var o=t(e,"shortTime"),a=t(e,"shortDate");i=mt(T(e,w.Short),[o,a]);break;case"medium":var s=t(e,"mediumTime"),l=t(e,"mediumDate");i=mt(T(e,w.Medium),[s,l]);break;case"long":var c=t(e,"longTime"),u=t(e,"longDate");i=mt(T(e,w.Long),[c,u]);break;case"full":var p=t(e,"fullTime"),d=t(e,"fullDate");i=mt(T(e,w.Full),[p,d])}i&&(ct[r][n]=i);return i}(n,e)||e;for(var i,o=[];e;){if(!(i=ut.exec(e))){o.push(e);break}var a=(o=o.concat(i.slice(1))).pop();if(!a)break;e=a}var s,l,c,u,p,d,h,f=t.getTimezoneOffset();r&&(f=St(r,f),l=r,c=!0?-1:1,u=(s=t).getTimezoneOffset(),p=St(l,u),d=s,h=c*(p-u),(d=new Date(d.getTime())).setMinutes(d.getMinutes()+h),t=d);var m="";return o.forEach(function(e){var r=function(t){if(xt[t])return xt[t];var e;switch(t){case"G":case"GG":case"GGG":e=vt(ht.Eras,_.Abbreviated);break;case"GGGG":e=vt(ht.Eras,_.Wide);break;case"GGGGG":e=vt(ht.Eras,_.Narrow);break;case"y":e=yt(dt.FullYear,1,0,!1,!0);break;case"yy":e=yt(dt.FullYear,2,0,!0,!0);break;case"yyy":e=yt(dt.FullYear,3,0,!1,!0);break;case"yyyy":e=yt(dt.FullYear,4,0,!1,!0);break;case"M":case"L":e=yt(dt.Month,1,1);break;case"MM":case"LL":e=yt(dt.Month,2,1);break;case"MMM":e=vt(ht.Months,_.Abbreviated);break;case"MMMM":e=vt(ht.Months,_.Wide);break;case"MMMMM":e=vt(ht.Months,_.Narrow);break;case"LLL":e=vt(ht.Months,_.Abbreviated,b.Standalone);break;case"LLLL":e=vt(ht.Months,_.Wide,b.Standalone);break;case"LLLLL":e=vt(ht.Months,_.Narrow,b.Standalone);break;case"w":e=Ct(1);break;case"ww":e=Ct(2);break;case"W":e=Ct(1,!0);break;case"d":e=yt(dt.Date,1);break;case"dd":e=yt(dt.Date,2);break;case"E":case"EE":case"EEE":e=vt(ht.Days,_.Abbreviated);break;case"EEEE":e=vt(ht.Days,_.Wide);break;case"EEEEE":e=vt(ht.Days,_.Narrow);break;case"EEEEEE":e=vt(ht.Days,_.Short);break;case"a":case"aa":case"aaa":e=vt(ht.DayPeriods,_.Abbreviated);break;case"aaaa":e=vt(ht.DayPeriods,_.Wide);break;case"aaaaa":e=vt(ht.DayPeriods,_.Narrow);break;case"b":case"bb":case"bbb":e=vt(ht.DayPeriods,_.Abbreviated,b.Standalone,!0);break;case"bbbb":e=vt(ht.DayPeriods,_.Wide,b.Standalone,!0);break;case"bbbbb":e=vt(ht.DayPeriods,_.Narrow,b.Standalone,!0);break;case"B":case"BB":case"BBB":e=vt(ht.DayPeriods,_.Abbreviated,b.Format,!0);break;case"BBBB":e=vt(ht.DayPeriods,_.Wide,b.Format,!0);break;case"BBBBB":e=vt(ht.DayPeriods,_.Narrow,b.Format,!0);break;case"h":e=yt(dt.Hours,1,-12);break;case"hh":e=yt(dt.Hours,2,-12);break;case"H":e=yt(dt.Hours,1);break;case"HH":e=yt(dt.Hours,2);break;case"m":e=yt(dt.Minutes,1);break;case"mm":e=yt(dt.Minutes,2);break;case"s":e=yt(dt.Seconds,1);break;case"ss":e=yt(dt.Seconds,2);break;case"S":e=yt(dt.Milliseconds,1);break;case"SS":e=yt(dt.Milliseconds,2);break;case"SSS":e=yt(dt.Milliseconds,3);break;case"Z":case"ZZ":case"ZZZ":e=bt(pt.Short);break;case"ZZZZZ":e=bt(pt.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=bt(pt.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=bt(pt.Long);break;default:return null}return xt[t]=e,e}(e);m+=r?r(t,n,f):"''"===e?"'":e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),m}function mt(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(t,n){return null!=e&&n in e?e[n]:t})),t}function gt(t,e,n,r,i){void 0===n&&(n="-");var o="";(t<0||i&&t<=0)&&(i?t=1-t:(t=-t,o=n));for(var a=""+t;a.length<e;)a="0"+a;return r&&(a=a.substr(a.length-e)),o+a}function yt(t,e,n,r,i){return void 0===n&&(n=0),void 0===r&&(r=!1),void 0===i&&(i=!1),function(o,a){var s=function(t,e,n){switch(t){case dt.FullYear:return e.getFullYear();case dt.Month:return e.getMonth();case dt.Date:return e.getDate();case dt.Hours:return e.getHours();case dt.Minutes:return e.getMinutes();case dt.Seconds:return e.getSeconds();case dt.Milliseconds:var r=1===n?100:2===n?10:1;return Math.round(e.getMilliseconds()/r);case dt.Day:return e.getDay();default:throw new Error('Unknown DateType value "'+t+'".')}}(t,o,e);return(n>0||s>-n)&&(s+=n),t===dt.Hours&&0===s&&-12===n&&(s=12),gt(s,e,M(a,C.MinusSign),r,i)}}function vt(t,e,n,r){return void 0===n&&(n=b.Format),void 0===r&&(r=!1),function(i,o){return function(t,e,n,r,i,o){switch(n){case ht.Months:return O(e,i,r)[t.getMonth()];case ht.Days:return k(e,i,r)[t.getDay()];case ht.DayPeriods:var a=t.getHours(),s=t.getMinutes();if(o){var l,c=L(e),u=j(e,i,r);if(c.forEach(function(t,e){if(Array.isArray(t)){var n=t[0],r=n.hours,i=n.minutes,o=t[1],c=o.hours,p=o.minutes;a>=r&&s>=i&&(a<c||a===c&&s<p)&&(l=u[e])}else{var d=t.hours,h=t.minutes;d===a&&h===s&&(l=u[e])}}),l)return l}return E(e,i,r)[a<12?0:1];case ht.Eras:return P(e,r)[t.getFullYear()<=0?0:1];default:var p=n;throw new Error("unexpected translation type "+p)}}(i,o,t,e,n,r)}}function bt(t){return function(e,n,r){var i=-1*r,o=M(n,C.MinusSign),a=i>0?Math.floor(i/60):Math.ceil(i/60);switch(t){case pt.Short:return(i>=0?"+":"")+gt(a,2,o)+gt(Math.abs(i%60),2,o);case pt.ShortGMT:return"GMT"+(i>=0?"+":"")+gt(a,1,o);case pt.Long:return"GMT"+(i>=0?"+":"")+gt(a,2,o)+":"+gt(Math.abs(i%60),2,o);case pt.Extended:return 0===r?"Z":(i>=0?"+":"")+gt(a,2,o)+":"+gt(Math.abs(i%60),2,o);default:throw new Error('Unknown zone width "'+t+'"')}}}ht[ht.DayPeriods]="DayPeriods",ht[ht.Days]="Days",ht[ht.Months]="Months",ht[ht.Eras]="Eras";var _t=0,wt=4;function Ct(t,e){return void 0===e&&(e=!1),function(n,r){var i,o,a,s;if(e){var l=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,c=n.getDate();i=1+Math.floor((c+l)/7)}else{var u=(a=n.getFullYear(),s=new Date(a,_t,1).getDay(),new Date(a,0,1+(s<=wt?wt:wt+7)-s)),p=(o=n,new Date(o.getFullYear(),o.getMonth(),o.getDate()+(wt-o.getDay()))).getTime()-u.getTime();i=1+Math.round(p/6048e5)}return gt(i,t,M(r,C.MinusSign))}}var xt={};function St(t,e){t=t.replace(/:/g,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function Et(t,n){return Error("InvalidPipeArgument: '"+n+"' for pipe '"+e.ɵstringify(t)+"'")}var kt=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Ot=function(){function t(t){this.locale=t}return t.prototype.transform=function(e,n,r,i){if(void 0===n&&(n="mediumDate"),null==e||""===e||e!=e)return null;var o,a;if("string"==typeof e&&(e=e.trim()),At(e))o=e;else if(isNaN(e-parseFloat(e)))if("string"==typeof e&&/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){var s=e.split("-").map(function(t){return+t}),l=s[0],c=s[1],u=s[2];o=new Date(l,c-1,u)}else o="string"==typeof e&&(a=e.match(kt))?Pt(a):new Date(e);else o=new Date(parseFloat(e));if(!At(o))throw Et(t,e);return ft(o,n,i||this.locale,r)},t.decorators=[{type:e.Pipe,args:[{name:"date",pure:!0}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[e.LOCALE_ID]}]}]},t}();function Pt(t){var e=new Date(0),n=0,r=0,i=t[8]?e.setUTCFullYear:e.setFullYear,o=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=+(t[9]+t[10]),r=+(t[9]+t[11])),i.call(e,+t[1],+t[2]-1,+t[3]);var a=+(t[4]||"0")-n,s=+(t[5]||"0")-r,l=+(t[6]||"0"),c=Math.round(1e3*parseFloat("0."+(t[7]||0)));return o.call(e,a,s,l,c),e}function At(t){return t instanceof Date&&!isNaN(t.valueOf())}var Dt,Tt=function(){function t(){}return t.format=function(t,e,n,r){void 0===r&&(r={});var i=r.minimumIntegerDigits,o=r.minimumFractionDigits,a=r.maximumFractionDigits,s=r.currency,l=r.currencyAsSymbol,c=void 0!==l&&l,u={minimumIntegerDigits:i,minimumFractionDigits:o,maximumFractionDigits:a,style:y[n].toLowerCase()};return n==y.Currency&&(u.currency="string"==typeof s?s:void 0,u.currencyDisplay=c?"symbol":"code"),new Intl.NumberFormat(e,u).format(t)},t}(),Mt=/((?:[^yMLdHhmsazZEwGjJ']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|J+|j+|m+|s+|a|z|Z|G+|w+))(.*)/,It={yMMMdjms:zt(Ht([Bt("year",1),Ut("month",3),Bt("day",1),Bt("hour",1),Bt("minute",1),Bt("second",1)])),yMdjm:zt(Ht([Bt("year",1),Bt("month",1),Bt("day",1),Bt("hour",1),Bt("minute",1)])),yMMMMEEEEd:zt(Ht([Bt("year",1),Ut("month",4),Ut("weekday",4),Bt("day",1)])),yMMMMd:zt(Ht([Bt("year",1),Ut("month",4),Bt("day",1)])),yMMMd:zt(Ht([Bt("year",1),Ut("month",3),Bt("day",1)])),yMd:zt(Ht([Bt("year",1),Bt("month",1),Bt("day",1)])),jms:zt(Ht([Bt("hour",1),Bt("second",1),Bt("minute",1)])),jm:zt(Ht([Bt("hour",1),Bt("minute",1)]))},Rt={yyyy:zt(Bt("year",4)),yy:zt(Bt("year",2)),y:zt(Bt("year",1)),MMMM:zt(Ut("month",4)),MMM:zt(Ut("month",3)),MM:zt(Bt("month",2)),M:zt(Bt("month",1)),LLLL:zt(Ut("month",4)),L:zt(Ut("month",1)),dd:zt(Bt("day",2)),d:zt(Bt("day",1)),HH:Nt(Lt(zt(Vt(Bt("hour",2),!1)))),H:Lt(zt(Vt(Bt("hour",1),!1))),hh:Nt(Lt(zt(Vt(Bt("hour",2),!0)))),h:Lt(zt(Vt(Bt("hour",1),!0))),jj:zt(Bt("hour",2)),j:zt(Bt("hour",1)),mm:Nt(zt(Bt("minute",2))),m:zt(Bt("minute",1)),ss:Nt(zt(Bt("second",2))),s:zt(Bt("second",1)),sss:zt(Bt("second",3)),EEEE:zt(Ut("weekday",4)),EEE:zt(Ut("weekday",3)),EE:zt(Ut("weekday",2)),E:zt(Ut("weekday",1)),a:(Dt=zt(Vt(Bt("hour",1),!0)),function(t,e){return Dt(t,e).split(" ")[1]}),Z:Ft("short"),z:Ft("long"),ww:zt({}),w:zt({}),G:zt(Ut("era",1)),GG:zt(Ut("era",2)),GGG:zt(Ut("era",3)),GGGG:zt(Ut("era",4))};function Nt(t){return function(e,n){var r=t(e,n);return 1==r.length?"0"+r:r}}function Lt(t){return function(e,n){return t(e,n).split(" ")[0]}}function jt(t,e,n){return new Intl.DateTimeFormat(e,n).format(t).replace(/[\u200e\u200f]/g,"")}function Ft(t){var e={hour:"2-digit",hour12:!1,timeZoneName:t};return function(t,n){var r=jt(t,n,e);return r?r.substring(3):""}}function Vt(t,e){return t.hour12=e,t}function Bt(t,e){var n={};return n[t]=2===e?"2-digit":"numeric",n}function Ut(t,e){var n={};return n[t]=e<4?e>1?"short":"narrow":"long",n}function Ht(t){return t.reduce(function(t,e){return i({},t,e)},{})}function zt(t){return function(e,n){return jt(e,n,t)}}var Gt=new Map;var Wt=function(){function t(){}return t.format=function(t,e,n){return function(t,e,n){var r=It[t];if(r)return r(e,n);var i=t,o=Gt.get(i);if(!o){o=[];var a=void 0;Mt.exec(t);for(var s=t;s;)(a=Mt.exec(s))?s=(o=o.concat(a.slice(1))).pop():(o.push(s),s=null);Gt.set(i,o)}return o.reduce(function(t,r){var i,o=Rt[r];return t+(o?o(e,n):"''"===(i=r)?"'":i.replace(/(^'|'$)/g,"").replace(/''/g,"'"))},"")}(n,t,e)},t}(),qt=function(){function t(t){this._locale=t}return t.prototype.transform=function(e,n){if(void 0===n&&(n="mediumDate"),null==e||""===e||e!=e)return null;var r;if("string"==typeof e&&(e=e.trim()),Yt(e))r=e;else if(isNaN(e-parseFloat(e)))if("string"==typeof e&&/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){var i=e.split("-").map(function(t){return parseInt(t,10)}),o=i[0],a=i[1],s=i[2];r=new Date(o,a-1,s)}else r=new Date(e);else r=new Date(parseFloat(e));if(!Yt(r)){var l=void 0;if("string"!=typeof e||!(l=e.match(kt)))throw Et(t,e);r=Pt(l)}return Wt.format(r,this._locale,t._ALIASES[n]||n)},t._ALIASES={medium:"yMMMdjms",short:"yMdjm",fullDate:"yMMMMEEEEd",longDate:"yMMMMd",mediumDate:"yMMMd",shortDate:"yMd",mediumTime:"jms",shortTime:"jm"},t.decorators=[{type:e.Pipe,args:[{name:"date",pure:!0}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[e.LOCALE_ID]}]}]},t}();function Yt(t){return t instanceof Date&&!isNaN(t.valueOf())}var $t=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Kt=22,Qt=".",Xt="0",Zt=";",Jt=",",te="#",ee="¤",ne="%";function re(t,e,n,r,i){void 0===i&&(i=null);var o,a={str:null},s=I(e,n);if("string"!=typeof t||isNaN(+t-parseFloat(t))){if("number"!=typeof t)return a.error=t+" is not a number",a;o=t}else o=+t;var l=function(t,e){void 0===e&&(e="-");var n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},r=t.split(Zt),i=r[0],o=r[1],a=-1!==i.indexOf(Qt)?i.split(Qt):[i.substring(0,i.lastIndexOf(Xt)+1),i.substring(i.lastIndexOf(Xt)+1)],s=a[0],l=a[1]||"";n.posPre=s.substr(0,s.indexOf(te));for(var c=0;c<l.length;c++){var u=l.charAt(c);u===Xt?n.minFrac=n.maxFrac=c+1:u===te?n.maxFrac=c+1:n.posSuf+=u}var p=s.split(Jt);if(n.gSize=p[1]?p[1].length:0,n.lgSize=p[2]||p[1]?(p[2]||p[1]).length:0,o){var d=i.length-n.posPre.length-n.posSuf.length,h=o.indexOf(te);n.negPre=o.substr(0,h).replace(/'/g,""),n.negSuf=o.substr(h+d).replace(/'/g,"")}else n.negPre=e+n.posPre,n.negSuf=n.posSuf;return n}(s,M(e,C.MinusSign)),c="",u=!1;if(isFinite(o)){var p=function(t){var e,n,r,i,o,a=Math.abs(t)+"",s=0;(n=a.indexOf(Qt))>-1&&(a=a.replace(Qt,""));(r=a.search(/e/i))>0?(n<0&&(n=r),n+=+a.slice(r+1),a=a.substring(0,r)):n<0&&(n=a.length);for(r=0;a.charAt(r)===Xt;r++);if(r===(o=a.length))e=[0],n=1;else{for(o--;a.charAt(o)===Xt;)o--;for(n-=r,e=[],i=0;r<=o;r++,i++)e[i]=+a.charAt(r)}n>Kt&&(e=e.splice(0,Kt-1),s=n-1,n=1);return{digits:e,exponent:s,integerLen:n}}(o);n===y.Percent&&(p=function(t){if(0===t.digits[0])return t;var e=t.digits.length-t.integerLen;t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2);return t}(p));var d=l.minInt,h=l.minFrac,f=l.maxFrac;if(r){var m=r.match($t);if(null===m)return a.error=r+" is not a valid digit info",a;var g=m[1],v=m[3],b=m[5];null!=g&&(d=ie(g)),null!=v&&(h=ie(v)),null!=b?f=ie(b):null!=v&&h>f&&(f=h)}!function(t,e,n){if(e>n)throw new Error("The minimum number of digits after fraction ("+e+") is higher than the maximum ("+n+").");var r=t.digits,i=r.length-t.integerLen,o=Math.min(Math.max(e,i),n),a=o+t.integerLen,s=r[a];if(a>0){r.splice(Math.max(t.integerLen,a));for(var l=a;l<r.length;l++)r[l]=0}else{i=Math.max(0,i),t.integerLen=1,r.length=Math.max(1,a=o+1),r[0]=0;for(var c=1;c<a;c++)r[c]=0}if(s>=5)if(a-1<0){for(var u=0;u>a;u--)r.unshift(0),t.integerLen++;r.unshift(1),t.integerLen++}else r[a-1]++;for(;i<Math.max(0,o);i++)r.push(0);var p=0!==o,d=e+t.integerLen,h=r.reduceRight(function(t,e,n,r){return e+=t,r[n]=e<10?e:e-10,p&&(0===r[n]&&n>=d?r.pop():p=!1),e>=10?1:0},0);h&&(r.unshift(h),t.integerLen++)}(p,h,f);var _=p.digits,w=p.integerLen,x=p.exponent,S=[];for(u=_.every(function(t){return!t});w<d;w++)_.unshift(0);for(;w<0;w++)_.unshift(0);w>0?S=_.splice(w,_.length):(S=_,_=[0]);var E=[];for(_.length>=l.lgSize&&E.unshift(_.splice(-l.lgSize,_.length).join(""));_.length>l.gSize;)E.unshift(_.splice(-l.gSize,_.length).join(""));_.length&&E.unshift(_.join(""));var k=i?C.CurrencyGroup:C.Group;if(c=E.join(M(e,k)),S.length)c+=M(e,i?C.CurrencyDecimal:C.Decimal)+S.join("");x&&(c+=M(e,C.Exponential)+"+"+x)}else c=M(e,C.Infinity);return c=o<0&&!u?l.negPre+c+l.negSuf:l.posPre+c+l.posSuf,n===y.Currency&&null!==i?(a.str=c.replace(ee,i).replace(ee,""),a):n===y.Percent?(a.str=c.replace(new RegExp(ne,"g"),M(e,C.PercentSign)),a):(a.str=c,a)}function ie(t){var e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}function oe(t,e,n,r,i,o,a){if(void 0===o&&(o=null),void 0===a&&(a=!1),null==n)return null;if("number"!=typeof(n="string"!=typeof n||isNaN(+n-parseFloat(n))?n:+n))throw Et(t,n);var s,l,c;if(r!==y.Currency&&(s=1,l=0,c=3),i){var u=i.match($t);if(null===u)throw new Error(i+" is not a valid digit info for number pipes");null!=u[1]&&(s=ie(u[1])),null!=u[3]&&(l=ie(u[3])),null!=u[5]&&(c=ie(u[5]))}return Tt.format(n,e,r,{minimumIntegerDigits:s,minimumFractionDigits:l,maximumFractionDigits:c,currency:o,currencyAsSymbol:a})}var ae=function(){function t(t){this._locale=t}return t.prototype.transform=function(e,n){return oe(t,this._locale,e,y.Decimal,n)},t.decorators=[{type:e.Pipe,args:[{name:"number"}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[e.LOCALE_ID]}]}]},t}(),se=function(){function t(t){this._locale=t}return t.prototype.transform=function(e,n){return oe(t,this._locale,e,y.Percent,n)},t.decorators=[{type:e.Pipe,args:[{name:"percent"}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[e.LOCALE_ID]}]}]},t}(),le=function(){function t(t){this._locale=t}return t.prototype.transform=function(e,n,r,i){return void 0===n&&(n="USD"),void 0===r&&(r=!1),oe(t,this._locale,e,y.Currency,i,n,r)},t.decorators=[{type:e.Pipe,args:[{name:"currency"}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[e.LOCALE_ID]}]}]},t}(),ce=[ae,se,le,qt],ue=function(){function t(){}return t.prototype.createSubscription=function(t,e){return t.subscribe({next:e,error:function(t){throw t}})},t.prototype.dispose=function(t){t.unsubscribe()},t.prototype.onDestroy=function(t){t.unsubscribe()},t}(),pe=new(function(){function t(){}return t.prototype.createSubscription=function(t,e){return t.then(e,function(t){throw t})},t.prototype.dispose=function(t){},t.prototype.onDestroy=function(t){},t}()),de=new ue,he=function(){function t(t){this._ref=t,this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._strategy=null}return t.prototype.ngOnDestroy=function(){this._subscription&&this._dispose()},t.prototype.transform=function(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,e.WrappedValue.wrap(this._latestValue)):(t&&this._subscribe(t),this._latestReturnedValue=this._latestValue,this._latestValue)},t.prototype._subscribe=function(t){var e=this;this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,function(n){return e._updateLatestValue(t,n)})},t.prototype._selectStrategy=function(n){if(e.ɵisPromise(n))return pe;if(e.ɵisObservable(n))return de;throw Et(t,n)},t.prototype._dispose=function(){this._strategy.dispose(this._subscription),this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null},t.prototype._updateLatestValue=function(t,e){t===this._obj&&(this._latestValue=e,this._ref.markForCheck())},t.decorators=[{type:e.Pipe,args:[{name:"async",pure:!1}]}],t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},t}(),fe=function(){function t(){}return t.prototype.transform=function(e){if(!e)return e;if("string"!=typeof e)throw Et(t,e);return e.toLowerCase()},t.decorators=[{type:e.Pipe,args:[{name:"lowercase"}]}],t.ctorParameters=function(){return[]},t}();var me=function(){function t(){}return t.prototype.transform=function(e){if(!e)return e;if("string"!=typeof e)throw Et(t,e);return e.split(/\b/g).map(function(t){return(e=t)?e[0].toUpperCase()+e.substr(1).toLowerCase():e;var e}).join("")},t.decorators=[{type:e.Pipe,args:[{name:"titlecase"}]}],t.ctorParameters=function(){return[]},t}(),ge=function(){function t(){}return t.prototype.transform=function(e){if(!e)return e;if("string"!=typeof e)throw Et(t,e);return e.toUpperCase()},t.decorators=[{type:e.Pipe,args:[{name:"uppercase"}]}],t.ctorParameters=function(){return[]},t}(),ye=/#/g,ve=function(){function t(t){this._localization=t}return t.prototype.transform=function(e,n,r){if(null==e)return"";if("object"!=typeof n||null===n)throw Et(t,n);return n[G(e,Object.keys(n),this._localization,r)].replace(ye,e.toString())},t.decorators=[{type:e.Pipe,args:[{name:"i18nPlural",pure:!0}]}],t.ctorParameters=function(){return[{type:z}]},t}(),be=function(){function t(){}return t.prototype.transform=function(e,n){if(null==e)return"";if("object"!=typeof n||"string"!=typeof e)throw Et(t,n);return n.hasOwnProperty(e)?n[e]:n.hasOwnProperty("other")?n.other:""},t.decorators=[{type:e.Pipe,args:[{name:"i18nSelect",pure:!0}]}],t.ctorParameters=function(){return[]},t}(),_e=function(){function t(){}return t.prototype.transform=function(t){return JSON.stringify(t,null,2)},t.decorators=[{type:e.Pipe,args:[{name:"json",pure:!1}]}],t.ctorParameters=function(){return[]},t}(),we=function(){function t(t){this._locale=t}return t.prototype.transform=function(e,n,r){if(Se(e))return null;var i=re(e,r=r||this._locale,y.Decimal,n),o=i.str,a=i.error;if(a)throw Et(t,a);return o},t.decorators=[{type:e.Pipe,args:[{name:"number"}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[e.LOCALE_ID]}]}]},t}(),Ce=function(){function t(t){this._locale=t}return t.prototype.transform=function(e,n,r){if(Se(e))return null;var i=re(e,r=r||this._locale,y.Percent,n),o=i.str,a=i.error;if(a)throw Et(t,a);return o},t.decorators=[{type:e.Pipe,args:[{name:"percent"}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[e.LOCALE_ID]}]}]},t}(),xe=function(){function t(t){this._locale=t}return t.prototype.transform=function(e,n,r,i,o){if(void 0===r&&(r="symbol"),Se(e))return null;o=o||this._locale,"boolean"==typeof r&&(console&&console.warn&&console.warn('Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".'),r=r?"symbol":"code");var a=n||"USD";"code"!==r&&(a=U(a,"symbol"===r?"wide":"narrow"));var s=re(e,o,y.Currency,i,a),l=s.str,c=s.error;if(c)throw Et(t,c);return l},t.decorators=[{type:e.Pipe,args:[{name:"currency"}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[e.LOCALE_ID]}]}]},t}();function Se(t){return null==t||""===t||t!=t}var Ee=function(){function t(){}return t.prototype.transform=function(e,n,r){if(null==e)return e;if(!this.supports(e))throw Et(t,e);return e.slice(n,r)},t.prototype.supports=function(t){return"string"==typeof t||Array.isArray(t)},t.decorators=[{type:e.Pipe,args:[{name:"slice",pure:!1}]}],t.ctorParameters=function(){return[]},t}(),ke=[he,ge,fe,_e,Ee,we,Ce,me,xe,Ot,ve,be],Oe=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[lt,ke],exports:[lt,ke],providers:[{provide:z,useClass:W}]}]}],t.ctorParameters=function(){return[]},t}(),Pe=q,Ae=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[ce],exports:[ce],providers:[{provide:H,useValue:Pe}]}]}],t.ctorParameters=function(){return[]},t}(),De=new e.InjectionToken("DocumentToken"),Te="browser",Me="server",Ie="browserWorkerApp",Re="browserWorkerUi";var Ne=new e.Version("5.2.6");t.ɵregisterLocaleData=g,t.NgLocaleLocalization=W,t.NgLocalization=z,t.registerLocaleData=g,t.Plural=v,t.NumberFormatStyle=y,t.FormStyle=b,t.TranslationWidth=_,t.FormatWidth=w,t.NumberSymbol=C,t.WeekDay=x,t.getCurrencySymbol=U,t.getLocaleDayPeriods=E,t.getLocaleDayNames=k,t.getLocaleMonthNames=O,t.getLocaleId=S,t.getLocaleEraNames=P,t.getLocaleWeekEndRange=function(t){return B(t)[9]},t.getLocaleFirstDayOfWeek=function(t){return B(t)[8]},t.getLocaleDateFormat=A,t.getLocaleDateTimeFormat=T,t.getLocaleExtraDayPeriodRules=L,t.getLocaleExtraDayPeriods=j,t.getLocalePluralCase=R,t.getLocaleTimeFormat=D,t.getLocaleNumberSymbol=M,t.getLocaleNumberFormat=I,t.getLocaleCurrencyName=function(t){return B(t)[16]||null},t.getLocaleCurrencySymbol=function(t){return B(t)[15]||null},t.ɵparseCookieValue=function(t,e){e=encodeURIComponent(e);for(var n=0,r=t.split(";");n<r.length;n++){var i=r[n],o=i.indexOf("="),a=-1==o?[i,""]:[i.slice(0,o),i.slice(o+1)],s=a[1];if(a[0].trim()===e)return decodeURIComponent(s)}return null},t.CommonModule=Oe,t.DeprecatedI18NPipesModule=Ae,t.NgClass=Y,t.NgForOf=Q,t.NgForOfContext=K,t.NgIf=Z,t.NgIfContext=J,t.NgPlural=it,t.NgPluralCase=ot,t.NgStyle=at,t.NgSwitch=et,t.NgSwitchCase=nt,t.NgSwitchDefault=rt,t.NgTemplateOutlet=st,t.NgComponentOutlet=$,t.DOCUMENT=De,t.AsyncPipe=he,t.DatePipe=Ot,t.I18nPluralPipe=ve,t.I18nSelectPipe=be,t.JsonPipe=_e,t.LowerCasePipe=fe,t.CurrencyPipe=xe,t.DecimalPipe=we,t.PercentPipe=Ce,t.SlicePipe=Ee,t.UpperCasePipe=ge,t.TitleCasePipe=me,t.DeprecatedDatePipe=qt,t.DeprecatedCurrencyPipe=le,t.DeprecatedDecimalPipe=ae,t.DeprecatedPercentPipe=se,t.ɵPLATFORM_BROWSER_ID=Te,t.ɵPLATFORM_SERVER_ID=Me,t.ɵPLATFORM_WORKER_APP_ID=Ie,t.ɵPLATFORM_WORKER_UI_ID=Re,t.isPlatformBrowser=function(t){return t===Te},t.isPlatformServer=function(t){return t===Me},t.isPlatformWorkerApp=function(t){return t===Ie},t.isPlatformWorkerUi=function(t){return t===Re},t.VERSION=Ne,t.PlatformLocation=o,t.LOCATION_INITIALIZED=a,t.LocationStrategy=s,t.APP_BASE_HREF=l,t.HashLocationStrategy=p,t.PathLocationStrategy=d,t.Location=c,t.ɵe=lt,t.ɵd=B,t.ɵa=H,t.ɵb=q,t.ɵg=ce,t.ɵf=ke,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core")):i((r.ng=r.ng||{},r.ng.common={}),r.ng.core)},{"@angular/core":62}],61:[function(t,e,n){var r;r=this,function(t){"use strict";var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function n(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};var i=T("Inject",function(t){return{token:t}}),o=T("InjectionToken",function(t){return{_desc:t}});var a=T("Attribute",function(t){return{attributeName:t}});var s=T("ContentChildren",function(t,e){return void 0===e&&(e={}),r({selector:t,first:!1,isViewQuery:!1,descendants:!1},e)}),l=T("ContentChild",function(t,e){return void 0===e&&(e={}),r({selector:t,first:!0,isViewQuery:!1,descendants:!0},e)}),c=T("ViewChildren",function(t,e){return void 0===e&&(e={}),r({selector:t,first:!1,isViewQuery:!0,descendants:!0},e)}),u=T("ViewChild",function(t,e){return r({selector:t,first:!0,isViewQuery:!0,descendants:!0},e)});var p=T("Directive",function(t){return void 0===t&&(t={}),t});var d={Emulated:0,Native:1,None:2};d[d.Emulated]="Emulated",d[d.Native]="Native",d[d.None]="None";var h={OnPush:0,Default:1};h[h.OnPush]="OnPush",h[h.Default]="Default";var f=T("Component",function(t){return void 0===t&&(t={}),r({changeDetection:h.Default},t)});var m=T("Pipe",function(t){return r({pure:!0},t)});var g=T("Input",function(t){return{bindingPropertyName:t}});var y=T("Output",function(t){return{bindingPropertyName:t}});var v=T("HostBinding",function(t){return{hostPropertyName:t}});var b=T("HostListener",function(t,e){return{eventName:t,args:e}});var _=T("NgModule",function(t){return t});var w={name:"custom-elements"},C={name:"no-errors-schema"},x=T("Optional"),S=T("Injectable"),E=T("Self"),k=T("SkipSelf"),O=T("Host"),P=Function,A={NONE:0,HTML:1,STYLE:2,SCRIPT:3,URL:4,RESOURCE_URL:5};A[A.NONE]="NONE",A[A.HTML]="HTML",A[A.STYLE]="STYLE",A[A.SCRIPT]="SCRIPT",A[A.URL]="URL",A[A.RESOURCE_URL]="RESOURCE_URL";var D={Error:0,Warning:1,Ignore:2};function T(t,e){var n=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=e?e.apply(void 0,n):{};return r({ngMetadataName:t},o)};return n.isTypeOf=function(e){return e&&e.ngMetadataName===t},n.ngMetadataName=t,n}D[D.Error]="Error",D[D.Warning]="Warning",D[D.Ignore]="Ignore";var M=Object.freeze({Inject:function(){},createInject:i,createInjectionToken:o,Attribute:function(){},createAttribute:a,Query:function(){},createContentChildren:s,createContentChild:l,createViewChildren:c,createViewChild:u,Directive:function(){},createDirective:p,Component:function(){},ViewEncapsulation:d,ChangeDetectionStrategy:h,createComponent:f,Pipe:function(){},createPipe:m,Input:function(){},createInput:g,Output:function(){},createOutput:y,HostBinding:function(){},createHostBinding:v,HostListener:function(){},createHostListener:b,NgModule:function(){},createNgModule:_,ModuleWithProviders:function(){},SchemaMetadata:function(){},CUSTOM_ELEMENTS_SCHEMA:w,NO_ERRORS_SCHEMA:C,createOptional:x,createInjectable:S,createSelf:E,createSkipSelf:k,createHost:O,Type:P,SecurityContext:A,NodeFlags:{None:0,TypeElement:1,TypeText:2,ProjectedTemplate:4,CatRenderNode:3,TypeNgContent:8,TypePipe:16,TypePureArray:32,TypePureObject:64,TypePurePipe:128,CatPureExpression:224,TypeValueProvider:256,TypeClassProvider:512,TypeFactoryProvider:1024,TypeUseExistingProvider:2048,LazyProvider:4096,PrivateProvider:8192,TypeDirective:16384,Component:32768,CatProviderNoDirective:3840,CatProvider:20224,OnInit:65536,OnDestroy:131072,DoCheck:262144,OnChanges:524288,AfterContentInit:1048576,AfterContentChecked:2097152,AfterViewInit:4194304,AfterViewChecked:8388608,EmbeddedViews:16777216,ComponentView:33554432,TypeContentQuery:67108864,TypeViewQuery:134217728,StaticQuery:268435456,DynamicQuery:536870912,CatQuery:201326592,Types:201347067},DepFlags:{None:0,SkipSelf:1,Optional:2,Value:8},ArgumentType:{Inline:0,Dynamic:1},BindingFlags:{TypeElementAttribute:1,TypeElementClass:2,TypeElementStyle:4,TypeProperty:8,SyntheticProperty:16,SyntheticHostProperty:32,CatSyntheticProperty:48,Types:15},QueryBindingType:{First:0,All:1},QueryValueType:{ElementRef:0,RenderElement:1,TemplateRef:2,ViewContainerRef:3,Provider:4},ViewFlags:{None:0,OnPush:2},MissingTranslationStrategy:D,MetadataFactory:function(){},Route:function(){}}),I=/-+([a-z0-9])/g;function R(t,e){return N(t,":",e)}function N(t,e,n){var r=t.indexOf(e);return-1==r?n:[t.slice(0,r).trim(),t.slice(r+1).trim()]}function L(t,e,n){return Array.isArray(t)?e.visitArray(t,n):"object"==typeof(r=t)&&null!==r&&Object.getPrototypeOf(r)===Y?e.visitStringMap(t,n):null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t?e.visitPrimitive(t,n):e.visitOther(t,n);var r}function j(t){return null!=t}function F(t){return void 0===t?null:t}var V=function(){function t(){}return t.prototype.visitArray=function(t,e){var n=this;return t.map(function(t){return L(t,n,e)})},t.prototype.visitStringMap=function(t,e){var n=this,r={};return Object.keys(t).forEach(function(i){r[i]=L(t[i],n,e)}),r},t.prototype.visitPrimitive=function(t,e){return t},t.prototype.visitOther=function(t,e){return t},t}(),B=function(t){if(X(t))throw new Error("Illegal state: value cannot be a promise");return t},U=function(t,e){return X(t)?t.then(e):e(t)},H=function(t){return t.some(X)?Promise.all(t):t};function z(t,e){var n=Error(t);return n[G]=!0,e&&(n[W]=e),n}var G="ngSyntaxError",W="ngParseErrors";function q(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}var Y=Object.getPrototypeOf({});function $(t){for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r>=55296&&r<=56319&&t.length>n+1){var i=t.charCodeAt(n+1);i>=56320&&i<=57343&&(n++,r=(r-55296<<10)+i-56320+65536)}r<=127?e+=String.fromCharCode(r):r<=2047?e+=String.fromCharCode(r>>6&31|192,63&r|128):r<=65535?e+=String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128):r<=2097151&&(e+=String.fromCharCode(r>>18&7|240,r>>12&63|128,r>>6&63|128,63&r|128))}return e}function K(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(K).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;var e=t.toString();if(null==e)return""+e;var n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function Q(t){return"function"==typeof t&&t.hasOwnProperty("__forward_ref__")?t():t}function X(t){return!!t&&"function"==typeof t.then}var Z=function(t){this.full=t;var e=t.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")},J=new Z("5.2.6"),tt=function(){function t(t,e,n){this.value=t,this.ngContentIndex=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitText(this,e)},t}(),et=function(){function t(t,e,n){this.value=t,this.ngContentIndex=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitBoundText(this,e)},t}(),nt=function(){function t(t,e,n){this.name=t,this.value=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitAttr(this,e)},t}(),rt=function(){function t(t,e,n,r,i,o){this.name=t,this.type=e,this.securityContext=n,this.value=r,this.unit=i,this.sourceSpan=o,this.isAnimation=this.type===ft.Animation}return t.prototype.visit=function(t,e){return t.visitElementProperty(this,e)},t}(),it=function(){function t(e,n,r,i,o){this.name=e,this.target=n,this.phase=r,this.handler=i,this.sourceSpan=o,this.fullName=t.calcFullName(this.name,this.target,this.phase),this.isAnimation=!!this.phase}return t.calcFullName=function(t,e,n){return e?e+":"+t:n?"@"+t+"."+n:t},t.prototype.visit=function(t,e){return t.visitEvent(this,e)},t}(),ot=function(){function t(t,e,n){this.name=t,this.value=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitReference(this,e)},t}(),at=function(){function t(t,e,n){this.name=t,this.value=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitVariable(this,e)},t}(),st=function(){function t(t,e,n,r,i,o,a,s,l,c,u,p,d){this.name=t,this.attrs=e,this.inputs=n,this.outputs=r,this.references=i,this.directives=o,this.providers=a,this.hasViewContainer=s,this.queryMatches=l,this.children=c,this.ngContentIndex=u,this.sourceSpan=p,this.endSourceSpan=d}return t.prototype.visit=function(t,e){return t.visitElement(this,e)},t}(),lt=function(){function t(t,e,n,r,i,o,a,s,l,c,u){this.attrs=t,this.outputs=e,this.references=n,this.variables=r,this.directives=i,this.providers=o,this.hasViewContainer=a,this.queryMatches=s,this.children=l,this.ngContentIndex=c,this.sourceSpan=u}return t.prototype.visit=function(t,e){return t.visitEmbeddedTemplate(this,e)},t}(),ct=function(){function t(t,e,n,r){this.directiveName=t,this.templateName=e,this.value=n,this.sourceSpan=r}return t.prototype.visit=function(t,e){return t.visitDirectiveProperty(this,e)},t}(),ut=function(){function t(t,e,n,r,i,o){this.directive=t,this.inputs=e,this.hostProperties=n,this.hostEvents=r,this.contentQueryStartId=i,this.sourceSpan=o}return t.prototype.visit=function(t,e){return t.visitDirective(this,e)},t}(),pt=function(){function t(t,e,n,r,i,o,a){this.token=t,this.multiProvider=e,this.eager=n,this.providers=r,this.providerType=i,this.lifecycleHooks=o,this.sourceSpan=a}return t.prototype.visit=function(t,e){return null},t}(),dt={PublicService:0,PrivateService:1,Component:2,Directive:3,Builtin:4};dt[dt.PublicService]="PublicService",dt[dt.PrivateService]="PrivateService",dt[dt.Component]="Component",dt[dt.Directive]="Directive",dt[dt.Builtin]="Builtin";var ht=function(){function t(t,e,n){this.index=t,this.ngContentIndex=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitNgContent(this,e)},t}(),ft={Property:0,Attribute:1,Class:2,Style:3,Animation:4};ft[ft.Property]="Property",ft[ft.Attribute]="Attribute",ft[ft.Class]="Class",ft[ft.Style]="Style",ft[ft.Animation]="Animation";var mt=function(){function t(){}return t.prototype.visitNgContent=function(t,e){},t.prototype.visitEmbeddedTemplate=function(t,e){},t.prototype.visitElement=function(t,e){},t.prototype.visitReference=function(t,e){},t.prototype.visitVariable=function(t,e){},t.prototype.visitEvent=function(t,e){},t.prototype.visitElementProperty=function(t,e){},t.prototype.visitAttr=function(t,e){},t.prototype.visitBoundText=function(t,e){},t.prototype.visitText=function(t,e){},t.prototype.visitDirective=function(t,e){},t.prototype.visitDirectiveProperty=function(t,e){},t}(),gt=function(t){function e(){return t.call(this)||this}return n(e,t),e.prototype.visitEmbeddedTemplate=function(t,e){return this.visitChildren(e,function(e){e(t.attrs),e(t.references),e(t.variables),e(t.directives),e(t.providers),e(t.children)})},e.prototype.visitElement=function(t,e){return this.visitChildren(e,function(e){e(t.attrs),e(t.inputs),e(t.outputs),e(t.references),e(t.directives),e(t.providers),e(t.children)})},e.prototype.visitDirective=function(t,e){return this.visitChildren(e,function(e){e(t.inputs),e(t.hostProperties),e(t.hostEvents)})},e.prototype.visitChildren=function(t,e){var n=[],r=this;return e(function(e){e&&e.length&&n.push(yt(r,e,t))}),[].concat.apply([],n)},e}(mt);function yt(t,e,n){void 0===n&&(n=null);var r=[],i=t.visit?function(e){return t.visit(e,n)||e.visit(t,n)}:function(e){return e.visit(t,n)};return e.forEach(function(t){var e=i(t);e&&r.push(e)}),r}var vt=function(t){var e=void 0===t?{}:t,n=e.defaultEncapsulation,r=void 0===n?d.Emulated:n,i=e.useJit,o=void 0===i||i,a=e.jitDevMode,s=void 0!==a&&a,l=e.missingTranslation,c=void 0===l?null:l,u=e.enableLegacyTemplate,p=e.preserveWhitespaces,h=e.strictInjectionParameters;this.defaultEncapsulation=r,this.useJit=!!o,this.jitDevMode=!!s,this.missingTranslation=c,this.enableLegacyTemplate=!0===u,this.preserveWhitespaces=bt(F(p)),this.strictInjectionParameters=!0===h};function bt(t,e){return void 0===e&&(e=!0),null===t?e:t}var _t=function(){function t(t,e,n){this.filePath=t,this.name=e,this.members=n}return t.prototype.assertNoMembers=function(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got "+JSON.stringify(this)+".")},t}(),wt=function(){function t(){this.cache=new Map}return t.prototype.get=function(t,e,n){var r='"'+t+'".'+e+((n=n||[]).length?"."+n.join("."):""),i=this.cache.get(r);return i||(i=new _t(t,e,n),this.cache.set(r,i)),i},t}(),Ct=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function xt(t){return t.replace(/\W/g,"_")}var St=0;function Et(t){if(!t||!t.reference)return null;var e=t.reference;if(e instanceof _t)return e.name;if(e.__anonymousType)return e.__anonymousType;var n=K(e);return n.indexOf("(")>=0?(n="anonymous_"+St++,e.__anonymousType=n):n=xt(n),n}function kt(t){var e=t.reference;return e instanceof _t?e.filePath:"./"+K(e)}function Ot(t,e){return"View_"+Et({reference:t})+"_"+e}function Pt(t){return"RenderType_"+Et({reference:t})}function At(t){return"HostView_"+Et({reference:t})}function Dt(t){return Et({reference:t})+"NgFactory"}var Tt={Pipe:0,Directive:1,NgModule:2,Injectable:3};function Mt(t){return null!=t.value?xt(t.value):Et(t.identifier)}function It(t){return null!=t.identifier?t.identifier.reference:t.value}Tt[Tt.Pipe]="Pipe",Tt[Tt.Directive]="Directive",Tt[Tt.NgModule]="NgModule",Tt[Tt.Injectable]="Injectable";var Rt=function(t){var e=void 0===t?{}:t,n=e.moduleUrl,r=e.styles,i=e.styleUrls;this.moduleUrl=n||null,this.styles=Bt(r),this.styleUrls=Bt(i)},Nt=function(){function t(t){var e=t.encapsulation,n=t.template,r=t.templateUrl,i=t.htmlAst,o=t.styles,a=t.styleUrls,s=t.externalStylesheets,l=t.animations,c=t.ngContentSelectors,u=t.interpolation,p=t.isInline,d=t.preserveWhitespaces;if(this.encapsulation=e,this.template=n,this.templateUrl=r,this.htmlAst=i,this.styles=Bt(o),this.styleUrls=Bt(a),this.externalStylesheets=Bt(s),this.animations=l?Ht(l):[],this.ngContentSelectors=c||[],u&&2!=u.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=u,this.isInline=p,this.preserveWhitespaces=d}return t.prototype.toSummary=function(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation}},t}(),Lt=function(){function t(t){var e=t.isHost,n=t.type,r=t.isComponent,i=t.selector,o=t.exportAs,a=t.changeDetection,s=t.inputs,l=t.outputs,c=t.hostListeners,u=t.hostProperties,p=t.hostAttributes,d=t.providers,h=t.viewProviders,f=t.queries,m=t.guards,g=t.viewQueries,y=t.entryComponents,v=t.template,b=t.componentViewType,_=t.rendererType,w=t.componentFactory;this.isHost=!!e,this.type=n,this.isComponent=r,this.selector=i,this.exportAs=o,this.changeDetection=a,this.inputs=s,this.outputs=l,this.hostListeners=c,this.hostProperties=u,this.hostAttributes=p,this.providers=Bt(d),this.viewProviders=Bt(h),this.queries=Bt(f),this.guards=m,this.viewQueries=Bt(g),this.entryComponents=Bt(y),this.template=v,this.componentViewType=b,this.rendererType=_,this.componentFactory=w}return t.create=function(e){var n=e.isHost,r=e.type,i=e.isComponent,o=e.selector,a=e.exportAs,s=e.changeDetection,l=e.inputs,c=e.outputs,u=e.host,p=e.providers,d=e.viewProviders,h=e.queries,f=e.guards,m=e.viewQueries,g=e.entryComponents,y=e.template,v=e.componentViewType,b=e.rendererType,_=e.componentFactory,w={},C={},x={};null!=u&&Object.keys(u).forEach(function(t){var e=u[t],n=t.match(Ct);null===n?x[t]=e:null!=n[1]?C[n[1]]=e:null!=n[2]&&(w[n[2]]=e)});var S={};null!=l&&l.forEach(function(t){var e=R(t,[t,t]);S[e[0]]=e[1]});var E={};return null!=c&&c.forEach(function(t){var e=R(t,[t,t]);E[e[0]]=e[1]}),new t({isHost:n,type:r,isComponent:!!i,selector:o,exportAs:a,changeDetection:s,inputs:S,outputs:E,hostListeners:w,hostProperties:C,hostAttributes:x,providers:p,viewProviders:d,queries:h,guards:f,viewQueries:m,entryComponents:g,template:y,componentViewType:v,rendererType:b,componentFactory:_})},t.prototype.toSummary=function(){return{summaryKind:Tt.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.viewQueries,entryComponents:this.entryComponents,changeDetection:this.changeDetection,template:this.template&&this.template.toSummary(),componentViewType:this.componentViewType,rendererType:this.rendererType,componentFactory:this.componentFactory}},t}(),jt=function(){function t(t){var e=t.type,n=t.name,r=t.pure;this.type=e,this.name=n,this.pure=!!r}return t.prototype.toSummary=function(){return{summaryKind:Tt.Pipe,type:this.type,name:this.name,pure:this.pure}},t}(),Ft=function(){function t(t){var e=t.type,n=t.providers,r=t.declaredDirectives,i=t.exportedDirectives,o=t.declaredPipes,a=t.exportedPipes,s=t.entryComponents,l=t.bootstrapComponents,c=t.importedModules,u=t.exportedModules,p=t.schemas,d=t.transitiveModule,h=t.id;this.type=e||null,this.declaredDirectives=Bt(r),this.exportedDirectives=Bt(i),this.declaredPipes=Bt(o),this.exportedPipes=Bt(a),this.providers=Bt(n),this.entryComponents=Bt(s),this.bootstrapComponents=Bt(l),this.importedModules=Bt(c),this.exportedModules=Bt(u),this.schemas=Bt(p),this.id=h||null,this.transitiveModule=d||null}return t.prototype.toSummary=function(){var t=this.transitiveModule;return{summaryKind:Tt.NgModule,type:this.type,entryComponents:t.entryComponents,providers:t.providers,modules:t.modules,exportedDirectives:t.exportedDirectives,exportedPipes:t.exportedPipes}},t}(),Vt=function(){function t(){this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}return t.prototype.addProvider=function(t,e){this.providers.push({provider:t,module:e})},t.prototype.addDirective=function(t){this.directivesSet.has(t.reference)||(this.directivesSet.add(t.reference),this.directives.push(t))},t.prototype.addExportedDirective=function(t){this.exportedDirectivesSet.has(t.reference)||(this.exportedDirectivesSet.add(t.reference),this.exportedDirectives.push(t))},t.prototype.addPipe=function(t){this.pipesSet.has(t.reference)||(this.pipesSet.add(t.reference),this.pipes.push(t))},t.prototype.addExportedPipe=function(t){this.exportedPipesSet.has(t.reference)||(this.exportedPipesSet.add(t.reference),this.exportedPipes.push(t))},t.prototype.addModule=function(t){this.modulesSet.has(t.reference)||(this.modulesSet.add(t.reference),this.modules.push(t))},t.prototype.addEntryComponent=function(t){this.entryComponentsSet.has(t.componentType)||(this.entryComponentsSet.add(t.componentType),this.entryComponents.push(t))},t}();function Bt(t){return t||[]}var Ut=function(t,e){var n=e.useClass,r=e.useValue,i=e.useExisting,o=e.useFactory,a=e.deps,s=e.multi;this.token=t,this.useClass=n||null,this.useValue=r,this.useExisting=i,this.useFactory=o||null,this.dependencies=a||null,this.multi=!!s};function Ht(t){return t.reduce(function(t,e){var n=Array.isArray(e)?Ht(e):e;return t.concat(n)},[])}function zt(t){return t.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}function Gt(t,e,n){var r;return r=n.isInline?e.type.reference instanceof _t?e.type.reference.filePath+"."+e.type.reference.name+".html":Et(t)+"/"+Et(e.type)+".html":n.templateUrl,e.type.reference instanceof _t?r:zt(r)}function Wt(t,e){var n=t.moduleUrl.split(/\/\\/g);return zt("css/"+e+n[n.length-1]+".ngstyle.js")}function qt(t){return zt(Et(t.type)+"/module.ngfactory.js")}function Yt(t,e){return zt(Et(t)+"/"+Et(e.type)+".ngfactory.js")}var $t=function(){function t(t,e){void 0===e&&(e=-1),this.path=t,this.position=e}return Object.defineProperty(t.prototype,"empty",{get:function(){return!this.path||!this.path.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"head",{get:function(){return this.path[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tail",{get:function(){return this.path[this.path.length-1]},enumerable:!0,configurable:!0}),t.prototype.parentOf=function(t){return t&&this.path[this.path.indexOf(t)-1]},t.prototype.childOf=function(t){return this.path[this.path.indexOf(t)+1]},t.prototype.first=function(t){for(var e=this.path.length-1;e>=0;e--){var n=this.path[e];if(n instanceof t)return n}},t.prototype.push=function(t){this.path.push(t)},t.prototype.pop=function(){return this.path.pop()},t}(),Kt=function(){function t(t,e){this.value=t,this.sourceSpan=e}return t.prototype.visit=function(t,e){return t.visitText(this,e)},t}(),Qt=function(){function t(t,e,n,r,i){this.switchValue=t,this.type=e,this.cases=n,this.sourceSpan=r,this.switchValueSourceSpan=i}return t.prototype.visit=function(t,e){return t.visitExpansion(this,e)},t}(),Xt=function(){function t(t,e,n,r,i){this.value=t,this.expression=e,this.sourceSpan=n,this.valueSourceSpan=r,this.expSourceSpan=i}return t.prototype.visit=function(t,e){return t.visitExpansionCase(this,e)},t}(),Zt=function(){function t(t,e,n,r){this.name=t,this.value=e,this.sourceSpan=n,this.valueSpan=r}return t.prototype.visit=function(t,e){return t.visitAttribute(this,e)},t}(),Jt=function(){function t(t,e,n,r,i,o){void 0===i&&(i=null),void 0===o&&(o=null),this.name=t,this.attrs=e,this.children=n,this.sourceSpan=r,this.startSourceSpan=i,this.endSourceSpan=o}return t.prototype.visit=function(t,e){return t.visitElement(this,e)},t}(),te=function(){function t(t,e){this.value=t,this.sourceSpan=e}return t.prototype.visit=function(t,e){return t.visitComment(this,e)},t}();function ee(t,e,n){void 0===n&&(n=null);var r=[],i=t.visit?function(e){return t.visit(e,n)||e.visit(t,n)}:function(e){return e.visit(t,n)};return e.forEach(function(t){var e=i(t);e&&r.push(e)}),r}var ne=function(){function t(){}return t.prototype.visitElement=function(t,e){this.visitChildren(e,function(e){e(t.attrs),e(t.children)})},t.prototype.visitAttribute=function(t,e){},t.prototype.visitText=function(t,e){},t.prototype.visitComment=function(t,e){},t.prototype.visitExpansion=function(t,e){return this.visitChildren(e,function(e){e(t.cases)})},t.prototype.visitExpansionCase=function(t,e){},t.prototype.visitChildren=function(t,e){var n=[],r=this;return e(function(e){e&&n.push(ee(r,e,t))}),[].concat.apply([],n)},t}();function re(t,e){if(null!=e){if(!Array.isArray(e))throw new Error("Expected '"+t+"' to be an array of strings.");for(var n=0;n<e.length;n+=1)if("string"!=typeof e[n])throw new Error("Expected '"+t+"' to be an array of strings.")}}var ie=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function oe(t,e){if(!(null==e||Array.isArray(e)&&2==e.length))throw new Error("Expected '"+t+"' to be an array, [start, end].");if(null!=e){var n=e[0],r=e[1];ie.forEach(function(t){if(t.test(n)||t.test(r))throw new Error("['"+n+"', '"+r+"'] contains unusable interpolation symbol.")})}}var ae=function(){function t(t,e){this.start=t,this.end=e}return t.fromArray=function(e){return e?(oe("interpolation",e),new t(e[0],e[1])):se},t}(),se=new ae("{{","}}"),le=function(t,e){this.style=t,this.styleUrls=e};function ce(t){if(null==t||0===t.length||"/"==t[0])return!1;var e=t.match(de);return null===e||"package"==e[1]||"asset"==e[1]}var ue=/@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g,pe=/\/\*(?!#\s*(?:sourceURL|sourceMappingURL)=)[\s\S]+?\*\//g,de=/^([^:/?#]+):/,he={RAW_TEXT:0,ESCAPABLE_RAW_TEXT:1,PARSABLE_DATA:2};function fe(t){if(":"!=t[0])return[null,t];var e=t.indexOf(":",1);if(-1==e)throw new Error('Unsupported format "'+t+'" expecting ":namespace:name"');return[t.slice(1,e),t.slice(e+1)]}function me(t){return"ng-container"===fe(t)[1]}function ge(t){return"ng-content"===fe(t)[1]}function ye(t){return"ng-template"===fe(t)[1]}function ve(t){return null===t?null:fe(t)[0]}function be(t,e){return t?":"+t+":"+e:e}he[he.RAW_TEXT]="RAW_TEXT",he[he.ESCAPABLE_RAW_TEXT]="ESCAPABLE_RAW_TEXT",he[he.PARSABLE_DATA]="PARSABLE_DATA";var _e={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",alefsym:"ℵ",Alpha:"Α",alpha:"α",amp:"&",and:"∧",ang:"∠",apos:"'",Aring:"Å",aring:"å",asymp:"≈",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",bdquo:"„",Beta:"Β",beta:"β",brvbar:"¦",bull:"•",cap:"∩",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",Chi:"Χ",chi:"χ",circ:"ˆ",clubs:"♣",cong:"≅",copy:"©",crarr:"↵",cup:"∪",curren:"¤",dagger:"†",Dagger:"‡",darr:"↓",dArr:"⇓",deg:"°",Delta:"Δ",delta:"δ",diams:"♦",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",empty:"∅",emsp:" ",ensp:" ",Epsilon:"Ε",epsilon:"ε",equiv:"≡",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",exist:"∃",fnof:"ƒ",forall:"∀",frac12:"½",frac14:"¼",frac34:"¾",frasl:"⁄",Gamma:"Γ",gamma:"γ",ge:"≥",gt:">",harr:"↔",hArr:"⇔",hearts:"♥",hellip:"…",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",image:"ℑ",infin:"∞",int:"∫",Iota:"Ι",iota:"ι",iquest:"¿",isin:"∈",Iuml:"Ï",iuml:"ï",Kappa:"Κ",kappa:"κ",Lambda:"Λ",lambda:"λ",lang:"⟨",laquo:"«",larr:"←",lArr:"⇐",lceil:"⌈",ldquo:"“",le:"≤",lfloor:"⌊",lowast:"∗",loz:"◊",lrm:"‎",lsaquo:"‹",lsquo:"‘",lt:"<",macr:"¯",mdash:"—",micro:"µ",middot:"·",minus:"−",Mu:"Μ",mu:"μ",nabla:"∇",nbsp:" ",ndash:"–",ne:"≠",ni:"∋",not:"¬",notin:"∉",nsub:"⊄",Ntilde:"Ñ",ntilde:"ñ",Nu:"Ν",nu:"ν",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",OElig:"Œ",oelig:"œ",Ograve:"Ò",ograve:"ò",oline:"‾",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",oplus:"⊕",or:"∨",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",otimes:"⊗",Ouml:"Ö",ouml:"ö",para:"¶",permil:"‰",perp:"⊥",Phi:"Φ",phi:"φ",Pi:"Π",pi:"π",piv:"ϖ",plusmn:"±",pound:"£",prime:"′",Prime:"″",prod:"∏",prop:"∝",Psi:"Ψ",psi:"ψ",quot:'"',radic:"√",rang:"⟩",raquo:"»",rarr:"→",rArr:"⇒",rceil:"⌉",rdquo:"”",real:"ℜ",reg:"®",rfloor:"⌋",Rho:"Ρ",rho:"ρ",rlm:"‏",rsaquo:"›",rsquo:"’",sbquo:"‚",Scaron:"Š",scaron:"š",sdot:"⋅",sect:"§",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sim:"∼",spades:"♠",sub:"⊂",sube:"⊆",sum:"∑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supe:"⊇",szlig:"ß",Tau:"Τ",tau:"τ",there4:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thinsp:" ",THORN:"Þ",thorn:"þ",tilde:"˜",times:"×",trade:"™",Uacute:"Ú",uacute:"ú",uarr:"↑",uArr:"⇑",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",Uuml:"Ü",uuml:"ü",weierp:"℘",Xi:"Ξ",xi:"ξ",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ",Yuml:"Ÿ",Zeta:"Ζ",zeta:"ζ",zwj:"‍",zwnj:"‌"},we="";_e.ngsp=we;var Ce="select",xe="link",Se="rel",Ee="href",ke="stylesheet",Oe="style",Pe="script",Ae="ngNonBindable",De="ngProjectAs";function Te(t){var e=null,n=null,r=null,i=!1,o=null;t.attrs.forEach(function(t){var a=t.name.toLowerCase();a==Ce?e=t.value:a==Ee?n=t.value:a==Se?r=t.value:t.name==Ae?i=!0:t.name==De&&t.value.length>0&&(o=t.value)}),e=function(t){if(null===t||0===t.length)return"*";return t}(e);var a=t.name.toLowerCase(),s=Me.OTHER;return ge(a)?s=Me.NG_CONTENT:a==Oe?s=Me.STYLE:a==Pe?s=Me.SCRIPT:a==xe&&r==ke&&(s=Me.STYLESHEET),new Ie(s,e,n,i,o)}var Me={NG_CONTENT:0,STYLE:1,STYLESHEET:2,SCRIPT:3,OTHER:4};Me[Me.NG_CONTENT]="NG_CONTENT",Me[Me.STYLE]="STYLE",Me[Me.STYLESHEET]="STYLESHEET",Me[Me.SCRIPT]="SCRIPT",Me[Me.OTHER]="OTHER";var Ie=function(t,e,n,r,i){this.type=t,this.selectAttr=e,this.hrefAttr=n,this.nonBindable=r,this.projectAs=i};var Re=function(){function t(t,e,n,r){this._resourceLoader=t,this._urlResolver=e,this._htmlParser=n,this._config=r,this._resourceLoaderCache=new Map}return t.prototype.clearCache=function(){this._resourceLoaderCache.clear()},t.prototype.clearCacheFor=function(t){var e=this;if(t.isComponent){var n=t.template;this._resourceLoaderCache.delete(n.templateUrl),n.externalStylesheets.forEach(function(t){e._resourceLoaderCache.delete(t.moduleUrl)})}},t.prototype._fetch=function(t){var e=this._resourceLoaderCache.get(t);return e||(e=this._resourceLoader.get(t),this._resourceLoaderCache.set(t,e)),e},t.prototype.normalizeTemplate=function(t){var e=this;if(j(t.template)){if(j(t.templateUrl))throw z("'"+K(t.componentType)+"' component cannot define both template and templateUrl");if("string"!=typeof t.template)throw z("The template specified for component "+K(t.componentType)+" is not a string")}else{if(!j(t.templateUrl))throw z("No template specified for component "+K(t.componentType));if("string"!=typeof t.templateUrl)throw z("The templateUrl specified for component "+K(t.componentType)+" is not a string")}if(j(t.preserveWhitespaces)&&"boolean"!=typeof t.preserveWhitespaces)throw z("The preserveWhitespaces option for component "+K(t.componentType)+" must be a boolean");return U(this._preParseTemplate(t),function(n){return e._normalizeTemplateMetadata(t,n)})},t.prototype._preParseTemplate=function(t){var e,n,r=this;return null!=t.template?(e=t.template,n=t.moduleUrl):(n=this._urlResolver.resolve(t.moduleUrl,t.templateUrl),e=this._fetch(n)),U(e,function(e){return r._preparseLoadedTemplate(t,e,n)})},t.prototype._preparseLoadedTemplate=function(t,e,n){var r=!!t.template,i=ae.fromArray(t.interpolation),o=this._htmlParser.parse(e,Gt({reference:t.ngModuleType},{type:{reference:t.componentType}},{isInline:r,templateUrl:n}),!0,i);if(o.errors.length>0)throw z("Template parse errors:\n"+o.errors.join("\n"));var a=this._normalizeStylesheet(new Rt({styles:t.styles,moduleUrl:t.moduleUrl})),s=new Ne;ee(s,o.rootNodes);var l=this._normalizeStylesheet(new Rt({styles:s.styles,styleUrls:s.styleUrls,moduleUrl:n}));return{template:e,templateUrl:n,isInline:r,htmlAst:o,styles:a.styles.concat(l.styles),inlineStyleUrls:a.styleUrls.concat(l.styleUrls),styleUrls:this._normalizeStylesheet(new Rt({styleUrls:t.styleUrls,moduleUrl:t.moduleUrl})).styleUrls,ngContentSelectors:s.ngContentSelectors}},t.prototype._normalizeTemplateMetadata=function(t,e){var n=this;return U(this._loadMissingExternalStylesheets(e.styleUrls.concat(e.inlineStyleUrls)),function(r){return n._normalizeLoadedTemplateMetadata(t,e,r)})},t.prototype._normalizeLoadedTemplateMetadata=function(t,e,n){var r=this,i=e.styles.slice();this._inlineStyles(e.inlineStyleUrls,n,i);var o=e.styleUrls,a=o.map(function(t){var e=n.get(t),i=e.styles.slice();return r._inlineStyles(e.styleUrls,n,i),new Rt({moduleUrl:t,styles:i})}),s=t.encapsulation;return null==s&&(s=this._config.defaultEncapsulation),s===d.Emulated&&0===i.length&&0===o.length&&(s=d.None),new Nt({encapsulation:s,template:e.template,templateUrl:e.templateUrl,htmlAst:e.htmlAst,styles:i,styleUrls:o,ngContentSelectors:e.ngContentSelectors,animations:t.animations,interpolation:t.interpolation,isInline:e.isInline,externalStylesheets:a,preserveWhitespaces:bt(t.preserveWhitespaces,this._config.preserveWhitespaces)})},t.prototype._inlineStyles=function(t,e,n){var r=this;t.forEach(function(t){var i=e.get(t);i.styles.forEach(function(t){return n.push(t)}),r._inlineStyles(i.styleUrls,e,n)})},t.prototype._loadMissingExternalStylesheets=function(t,e){var n=this;return void 0===e&&(e=new Map),U(H(t.filter(function(t){return!e.has(t)}).map(function(t){return U(n._fetch(t),function(r){var i=n._normalizeStylesheet(new Rt({styles:[r],moduleUrl:t}));return e.set(t,i),n._loadMissingExternalStylesheets(i.styleUrls,e)})})),function(t){return e})},t.prototype._normalizeStylesheet=function(t){var e=this,n=t.moduleUrl,r=t.styleUrls.filter(ce).map(function(t){return e._urlResolver.resolve(n,t)}),i=t.styles.map(function(t){var i,o,a,s,l=(i=e._urlResolver,o=n,a=[],s=t.replace(pe,"").replace(ue,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[1]||t[2];return ce(n)?(a.push(i.resolve(o,n)),""):t[0]}),new le(s,a));return r.push.apply(r,l.styleUrls),l.style});return new Rt({styles:i,styleUrls:r,moduleUrl:n})},t}(),Ne=function(){function t(){this.ngContentSelectors=[],this.styles=[],this.styleUrls=[],this.ngNonBindableStackCount=0}return t.prototype.visitElement=function(t,e){var n=Te(t);switch(n.type){case Me.NG_CONTENT:0===this.ngNonBindableStackCount&&this.ngContentSelectors.push(n.selectAttr);break;case Me.STYLE:var r="";t.children.forEach(function(t){t instanceof Kt&&(r+=t.value)}),this.styles.push(r);break;case Me.STYLESHEET:this.styleUrls.push(n.hrefAttr)}return n.nonBindable&&this.ngNonBindableStackCount++,ee(this,t.children),n.nonBindable&&this.ngNonBindableStackCount--,null},t.prototype.visitExpansion=function(t,e){ee(this,t.cases)},t.prototype.visitExpansionCase=function(t,e){ee(this,t.expression)},t.prototype.visitComment=function(t,e){return null},t.prototype.visitAttribute=function(t,e){return null},t.prototype.visitText=function(t,e){return null},t}(),Le=[u,c,l,s],je=function(){function t(t){this._reflector=t}return t.prototype.isDirective=function(t){var e=this._reflector.annotations(Q(t));return e&&e.some(Fe)},t.prototype.resolve=function(t,e){void 0===e&&(e=!0);var n=this._reflector.annotations(Q(t));if(n){var r=Ve(n,Fe);if(r){var i=this._reflector.propMetadata(t),o=this._reflector.guards(t);return this._mergeWithPropertyMetadata(r,i,o,t)}}if(e)throw new Error("No Directive annotation found on "+K(t));return null},t.prototype._mergeWithPropertyMetadata=function(t,e,n,r){var i=[],o=[],a={},s={};return Object.keys(e).forEach(function(t){var n=Ve(e[t],function(t){return g.isTypeOf(t)});n&&(n.bindingPropertyName?i.push(t+": "+n.bindingPropertyName):i.push(t));var r=Ve(e[t],function(t){return y.isTypeOf(t)});r&&(r.bindingPropertyName?o.push(t+": "+r.bindingPropertyName):o.push(t)),e[t].filter(function(t){return v.isTypeOf(t)}).forEach(function(e){if(e.hostPropertyName){var n=e.hostPropertyName[0];if("("===n)throw new Error("@HostBinding can not bind to events. Use @HostListener instead.");if("["===n)throw new Error("@HostBinding parameter should be a property name, 'class.<name>', or 'attr.<name>'.");a["["+e.hostPropertyName+"]"]=t}else a["["+t+"]"]=t}),e[t].filter(function(t){return b.isTypeOf(t)}).forEach(function(e){var n=e.args||[];a["("+e.eventName+")"]=t+"("+n.join(",")+")"});var l=Ve(e[t],function(t){return Le.some(function(e){return e.isTypeOf(t)})});l&&(s[t]=l)}),this._merge(t,i,o,a,s,n,r)},t.prototype._extractPublicName=function(t){return R(t,[null,t])[1].trim()},t.prototype._dedupeBindings=function(t){for(var e=new Set,n=new Set,r=[],i=t.length-1;i>=0;i--){var o=t[i],a=this._extractPublicName(o);n.add(a),e.has(a)||(e.add(a),r.push(o))}return r.reverse()},t.prototype._merge=function(t,e,n,i,o,a,s){var l=this._dedupeBindings(t.inputs?t.inputs.concat(e):e),c=this._dedupeBindings(t.outputs?t.outputs.concat(n):n),u=t.host?r({},t.host,i):i,d=t.queries?r({},t.queries,o):o;if(f.isTypeOf(t)){var h=t;return f({selector:h.selector,inputs:l,outputs:c,host:u,exportAs:h.exportAs,moduleId:h.moduleId,queries:d,changeDetection:h.changeDetection,providers:h.providers,viewProviders:h.viewProviders,entryComponents:h.entryComponents,template:h.template,templateUrl:h.templateUrl,styles:h.styles,styleUrls:h.styleUrls,encapsulation:h.encapsulation,animations:h.animations,interpolation:h.interpolation,preserveWhitespaces:t.preserveWhitespaces})}return p({selector:t.selector,inputs:l,outputs:c,host:u,exportAs:t.exportAs,queries:d,providers:t.providers,guards:a})},t}();function Fe(t){return p.isTypeOf(t)||f.isTypeOf(t)}function Ve(t,e){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return t[n];return null}var Be=0,Ue=9,He=10,ze=11,Ge=12,We=13,qe=32,Ye=34,$e=36,Ke=39,Qe=43,Xe=45,Ze=47,Je=59,tn=61,en=62,nn=48,rn=57,on=65,an=69,sn=70,ln=90,cn=95,un=97,pn=101,dn=102,hn=110,fn=114,mn=116,gn=118,yn=122,vn=123,bn=160,_n=96;function wn(t){return t>=Ue&&t<=qe||t==bn}function Cn(t){return nn<=t&&t<=rn}function xn(t){return t>=un&&t<=yn||t>=on&&t<=ln}var Sn={Character:0,Identifier:1,Keyword:2,String:3,Operator:4,Number:5,Error:6};Sn[Sn.Character]="Character",Sn[Sn.Identifier]="Identifier",Sn[Sn.Keyword]="Keyword",Sn[Sn.String]="String",Sn[Sn.Operator]="Operator",Sn[Sn.Number]="Number",Sn[Sn.Error]="Error";var En=["var","let","as","null","undefined","true","false","if","else","this"],kn=function(){function t(){}return t.prototype.tokenize=function(t){for(var e=new Tn(t),n=[],r=e.scanToken();null!=r;)n.push(r),r=e.scanToken();return n},t}(),On=function(){function t(t,e,n,r){this.index=t,this.type=e,this.numValue=n,this.strValue=r}return t.prototype.isCharacter=function(t){return this.type==Sn.Character&&this.numValue==t},t.prototype.isNumber=function(){return this.type==Sn.Number},t.prototype.isString=function(){return this.type==Sn.String},t.prototype.isOperator=function(t){return this.type==Sn.Operator&&this.strValue==t},t.prototype.isIdentifier=function(){return this.type==Sn.Identifier},t.prototype.isKeyword=function(){return this.type==Sn.Keyword},t.prototype.isKeywordLet=function(){return this.type==Sn.Keyword&&"let"==this.strValue},t.prototype.isKeywordAs=function(){return this.type==Sn.Keyword&&"as"==this.strValue},t.prototype.isKeywordNull=function(){return this.type==Sn.Keyword&&"null"==this.strValue},t.prototype.isKeywordUndefined=function(){return this.type==Sn.Keyword&&"undefined"==this.strValue},t.prototype.isKeywordTrue=function(){return this.type==Sn.Keyword&&"true"==this.strValue},t.prototype.isKeywordFalse=function(){return this.type==Sn.Keyword&&"false"==this.strValue},t.prototype.isKeywordThis=function(){return this.type==Sn.Keyword&&"this"==this.strValue},t.prototype.isError=function(){return this.type==Sn.Error},t.prototype.toNumber=function(){return this.type==Sn.Number?this.numValue:-1},t.prototype.toString=function(){switch(this.type){case Sn.Character:case Sn.Identifier:case Sn.Keyword:case Sn.Operator:case Sn.String:case Sn.Error:return this.strValue;case Sn.Number:return this.numValue.toString();default:return null}},t}();function Pn(t,e){return new On(t,Sn.Character,e,String.fromCharCode(e))}function An(t,e){return new On(t,Sn.Operator,0,e)}var Dn=new On(-1,Sn.Character,0,""),Tn=function(){function t(t){this.input=t,this.peek=0,this.index=-1,this.length=t.length,this.advance()}return t.prototype.advance=function(){this.peek=++this.index>=this.length?Be:this.input.charCodeAt(this.index)},t.prototype.scanToken=function(){for(var t=this.input,e=this.length,n=this.peek,r=this.index;n<=qe;){if(++r>=e){n=Be;break}n=t.charCodeAt(r)}if(this.peek=n,this.index=r,r>=e)return null;if(Mn(n))return this.scanIdentifier();if(Cn(n))return this.scanNumber(r);var i=r;switch(n){case 46:return this.advance(),Cn(this.peek)?this.scanNumber(i):Pn(i,46);case 40:case 41:case vn:case 125:case 91:case 93:case 44:case 58:case Je:return this.scanCharacter(i,n);case Ke:case Ye:return this.scanString();case 35:case Qe:case Xe:case 42:case Ze:case 37:case 94:return this.scanOperator(i,String.fromCharCode(n));case 63:return this.scanComplexOperator(i,"?",46,".");case 60:case en:return this.scanComplexOperator(i,String.fromCharCode(n),tn,"=");case 33:case tn:return this.scanComplexOperator(i,String.fromCharCode(n),tn,"=",tn,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case bn:for(;wn(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error("Unexpected character ["+String.fromCharCode(n)+"]",0)},t.prototype.scanCharacter=function(t,e){return this.advance(),Pn(t,e)},t.prototype.scanOperator=function(t,e){return this.advance(),An(t,e)},t.prototype.scanComplexOperator=function(t,e,n,r,i,o){this.advance();var a=e;return this.peek==n&&(this.advance(),a+=r),null!=i&&this.peek==i&&(this.advance(),a+=o),An(t,a)},t.prototype.scanIdentifier=function(){var t=this.index;for(this.advance();Rn(this.peek);)this.advance();var e,n,r=this.input.substring(t,this.index);return En.indexOf(r)>-1?(n=r,new On(t,Sn.Keyword,0,n)):(e=r,new On(t,Sn.Identifier,0,e))},t.prototype.scanNumber=function(t){var e,n,r=this.index===t;for(this.advance();;){if(Cn(this.peek));else if(46==this.peek)r=!1;else{if((n=this.peek)!=pn&&n!=an)break;if(this.advance(),((e=this.peek)==Xe||e==Qe)&&this.advance(),!Cn(this.peek))return this.error("Invalid exponent",-1);r=!1}this.advance()}var i,o=this.input.substring(t,this.index),a=r?function(t){var e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}(o):parseFloat(o);return i=a,new On(t,Sn.Number,i,"")},t.prototype.scanString=function(){var t=this.index,e=this.peek;this.advance();for(var n="",r=this.index,i=this.input;this.peek!=e;)if(92==this.peek){n+=i.substring(r,this.index),this.advance();var o=void 0;if(this.peek=this.peek,117==this.peek){var a=i.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(a))return this.error("Invalid unicode escape [\\u"+a+"]",0);o=parseInt(a,16);for(var s=0;s<5;s++)this.advance()}else o=Ln(this.peek),this.advance();n+=String.fromCharCode(o),r=this.index}else{if(this.peek==Be)return this.error("Unterminated quote",0);this.advance()}var l,c=i.substring(r,this.index);return this.advance(),l=n+c,new On(t,Sn.String,0,l)},t.prototype.error=function(t,e){var n,r,i=this.index+e;return n=i,r="Lexer Error: "+t+" at column "+i+" in expression ["+this.input+"]",new On(n,Sn.Error,0,r)},t}();function Mn(t){return un<=t&&t<=yn||on<=t&&t<=ln||t==cn||t==$e}function In(t){if(0==t.length)return!1;var e=new Tn(t);if(!Mn(e.peek))return!1;for(e.advance();e.peek!==Be;){if(!Rn(e.peek))return!1;e.advance()}return!0}function Rn(t){return xn(t)||Cn(t)||t==cn||t==$e}function Nn(t){return t===Ke||t===Ye||t===_n}function Ln(t){switch(t){case hn:return He;case dn:return Ge;case fn:return We;case mn:return Ue;case gn:return ze;default:return t}}var jn=function(t,e,n,r){this.input=e,this.errLocation=n,this.ctxLocation=r,this.message="Parser Error: "+t+" "+n+" ["+e+"] in "+r},Fn=function(t,e){this.start=t,this.end=e},Vn=function(){function t(t){this.span=t}return t.prototype.visit=function(t,e){return void 0===e&&(e=null),null},t.prototype.toString=function(){return"AST"},t}(),Bn=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.prefix=n,o.uninterpretedExpression=r,o.location=i,o}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitQuote(this,e)},e.prototype.toString=function(){return"Quote"},e}(Vn),Un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.visit=function(t,e){void 0===e&&(e=null)},e}(Vn),Hn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitImplicitReceiver(this,e)},e}(Vn),zn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.expressions=n,r}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitChain(this,e)},e}(Vn),Gn=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.condition=n,o.trueExp=r,o.falseExp=i,o}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitConditional(this,e)},e}(Vn),Wn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.receiver=n,i.name=r,i}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPropertyRead(this,e)},e}(Vn),qn=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.receiver=n,o.name=r,o.value=i,o}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPropertyWrite(this,e)},e}(Vn),Yn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.receiver=n,i.name=r,i}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitSafePropertyRead(this,e)},e}(Vn),$n=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.obj=n,i.key=r,i}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitKeyedRead(this,e)},e}(Vn),Kn=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.obj=n,o.key=r,o.value=i,o}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitKeyedWrite(this,e)},e}(Vn),Qn=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.exp=n,o.name=r,o.args=i,o}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPipe(this,e)},e}(Vn),Xn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitLiteralPrimitive(this,e)},e}(Vn),Zn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.expressions=n,r}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitLiteralArray(this,e)},e}(Vn),Jn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keys=n,i.values=r,i}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitLiteralMap(this,e)},e}(Vn),tr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.strings=n,i.expressions=r,i}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitInterpolation(this,e)},e}(Vn),er=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.operation=n,o.left=r,o.right=i,o}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitBinary(this,e)},e}(Vn),nr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.expression=n,r}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPrefixNot(this,e)},e}(Vn),rr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.expression=n,r}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitNonNullAssert(this,e)},e}(Vn),ir=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.receiver=n,o.name=r,o.args=i,o}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitMethodCall(this,e)},e}(Vn),or=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.receiver=n,o.name=r,o.args=i,o}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitSafeMethodCall(this,e)},e}(Vn),ar=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.target=n,i.args=r,i}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitFunctionCall(this,e)},e}(Vn),sr=function(t){function e(e,n,r,i){var o=t.call(this,new Fn(0,null==n?0:n.length))||this;return o.ast=e,o.source=n,o.location=r,o.errors=i,o}return n(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),this.ast.visit(t,e)},e.prototype.toString=function(){return this.source+" in "+this.location},e}(Vn),lr=function(t,e,n,r,i){this.span=t,this.key=e,this.keyIsVar=n,this.name=r,this.expression=i},cr=function(){function t(){}return t.prototype.visitBinary=function(t,e){},t.prototype.visitChain=function(t,e){},t.prototype.visitConditional=function(t,e){},t.prototype.visitFunctionCall=function(t,e){},t.prototype.visitImplicitReceiver=function(t,e){},t.prototype.visitInterpolation=function(t,e){},t.prototype.visitKeyedRead=function(t,e){},t.prototype.visitKeyedWrite=function(t,e){},t.prototype.visitLiteralArray=function(t,e){},t.prototype.visitLiteralMap=function(t,e){},t.prototype.visitLiteralPrimitive=function(t,e){},t.prototype.visitMethodCall=function(t,e){},t.prototype.visitPipe=function(t,e){},t.prototype.visitPrefixNot=function(t,e){},t.prototype.visitNonNullAssert=function(t,e){},t.prototype.visitPropertyRead=function(t,e){},t.prototype.visitPropertyWrite=function(t,e){},t.prototype.visitQuote=function(t,e){},t.prototype.visitSafeMethodCall=function(t,e){},t.prototype.visitSafePropertyRead=function(t,e){},t}(),ur=function(){function t(){}return t.prototype.visitBinary=function(t,e){return t.left.visit(this),t.right.visit(this),null},t.prototype.visitChain=function(t,e){return this.visitAll(t.expressions,e)},t.prototype.visitConditional=function(t,e){return t.condition.visit(this),t.trueExp.visit(this),t.falseExp.visit(this),null},t.prototype.visitPipe=function(t,e){return t.exp.visit(this),this.visitAll(t.args,e),null},t.prototype.visitFunctionCall=function(t,e){return t.target.visit(this),this.visitAll(t.args,e),null},t.prototype.visitImplicitReceiver=function(t,e){return null},t.prototype.visitInterpolation=function(t,e){return this.visitAll(t.expressions,e)},t.prototype.visitKeyedRead=function(t,e){return t.obj.visit(this),t.key.visit(this),null},t.prototype.visitKeyedWrite=function(t,e){return t.obj.visit(this),t.key.visit(this),t.value.visit(this),null},t.prototype.visitLiteralArray=function(t,e){return this.visitAll(t.expressions,e)},t.prototype.visitLiteralMap=function(t,e){return this.visitAll(t.values,e)},t.prototype.visitLiteralPrimitive=function(t,e){return null},t.prototype.visitMethodCall=function(t,e){return t.receiver.visit(this),this.visitAll(t.args,e)},t.prototype.visitPrefixNot=function(t,e){return t.expression.visit(this),null},t.prototype.visitNonNullAssert=function(t,e){return t.expression.visit(this),null},t.prototype.visitPropertyRead=function(t,e){return t.receiver.visit(this),null},t.prototype.visitPropertyWrite=function(t,e){return t.receiver.visit(this),t.value.visit(this),null},t.prototype.visitSafePropertyRead=function(t,e){return t.receiver.visit(this),null},t.prototype.visitSafeMethodCall=function(t,e){return t.receiver.visit(this),this.visitAll(t.args,e)},t.prototype.visitAll=function(t,e){var n=this;return t.forEach(function(t){return t.visit(n,e)}),null},t.prototype.visitQuote=function(t,e){return null},t}(),pr=function(){function t(){}return t.prototype.visitImplicitReceiver=function(t,e){return t},t.prototype.visitInterpolation=function(t,e){return new tr(t.span,t.strings,this.visitAll(t.expressions))},t.prototype.visitLiteralPrimitive=function(t,e){return new Xn(t.span,t.value)},t.prototype.visitPropertyRead=function(t,e){return new Wn(t.span,t.receiver.visit(this),t.name)},t.prototype.visitPropertyWrite=function(t,e){return new qn(t.span,t.receiver.visit(this),t.name,t.value.visit(this))},t.prototype.visitSafePropertyRead=function(t,e){return new Yn(t.span,t.receiver.visit(this),t.name)},t.prototype.visitMethodCall=function(t,e){return new ir(t.span,t.receiver.visit(this),t.name,this.visitAll(t.args))},t.prototype.visitSafeMethodCall=function(t,e){return new or(t.span,t.receiver.visit(this),t.name,this.visitAll(t.args))},t.prototype.visitFunctionCall=function(t,e){return new ar(t.span,t.target.visit(this),this.visitAll(t.args))},t.prototype.visitLiteralArray=function(t,e){return new Zn(t.span,this.visitAll(t.expressions))},t.prototype.visitLiteralMap=function(t,e){return new Jn(t.span,t.keys,this.visitAll(t.values))},t.prototype.visitBinary=function(t,e){return new er(t.span,t.operation,t.left.visit(this),t.right.visit(this))},t.prototype.visitPrefixNot=function(t,e){return new nr(t.span,t.expression.visit(this))},t.prototype.visitNonNullAssert=function(t,e){return new rr(t.span,t.expression.visit(this))},t.prototype.visitConditional=function(t,e){return new Gn(t.span,t.condition.visit(this),t.trueExp.visit(this),t.falseExp.visit(this))},t.prototype.visitPipe=function(t,e){return new Qn(t.span,t.exp.visit(this),t.name,this.visitAll(t.args))},t.prototype.visitKeyedRead=function(t,e){return new $n(t.span,t.obj.visit(this),t.key.visit(this))},t.prototype.visitKeyedWrite=function(t,e){return new Kn(t.span,t.obj.visit(this),t.key.visit(this),t.value.visit(this))},t.prototype.visitAll=function(t){for(var e=new Array(t.length),n=0;n<t.length;++n)e[n]=t[n].visit(this);return e},t.prototype.visitChain=function(t,e){return new zn(t.span,this.visitAll(t.expressions))},t.prototype.visitQuote=function(t,e){return new Bn(t.span,t.prefix,t.uninterpretedExpression,t.location)},t}();var dr=function(t,e,n){this.strings=t,this.expressions=e,this.offsets=n},hr=function(t,e,n){this.templateBindings=t,this.warnings=e,this.errors=n};function fr(t){var e=q(t.start)+"([\\s\\S]*?)"+q(t.end);return new RegExp(e,"g")}var mr=function(){function t(t){this._lexer=t,this.errors=[]}return t.prototype.parseAction=function(t,e,n){void 0===n&&(n=se),this._checkNoInterpolation(t,e,n);var r=this._stripComments(t),i=this._lexer.tokenize(this._stripComments(t)),o=new gr(t,e,i,r.length,!0,this.errors,t.length-r.length).parseChain();return new sr(o,t,e,this.errors)},t.prototype.parseBinding=function(t,e,n){void 0===n&&(n=se);var r=this._parseBindingAst(t,e,n);return new sr(r,t,e,this.errors)},t.prototype.parseSimpleBinding=function(t,e,n){void 0===n&&(n=se);var r=this._parseBindingAst(t,e,n),i=yr.check(r);return i.length>0&&this._reportError("Host binding expression cannot contain "+i.join(" "),t,e),new sr(r,t,e,this.errors)},t.prototype._reportError=function(t,e,n,r){this.errors.push(new jn(t,e,n,r))},t.prototype._parseBindingAst=function(t,e,n){var r=this._parseQuote(t,e);if(null!=r)return r;this._checkNoInterpolation(t,e,n);var i=this._stripComments(t),o=this._lexer.tokenize(i);return new gr(t,e,o,i.length,!1,this.errors,t.length-i.length).parseChain()},t.prototype._parseQuote=function(t,e){if(null==t)return null;var n=t.indexOf(":");if(-1==n)return null;var r=t.substring(0,n).trim();if(!In(r))return null;var i=t.substring(n+1);return new Bn(new Fn(0,t.length),r,i,e)},t.prototype.parseTemplateBindings=function(t,e,n){var r=this._lexer.tokenize(e);if(t){var i=this._lexer.tokenize(t).map(function(t){return t.index=0,t});r.unshift.apply(r,i)}return new gr(e,n,r,e.length,!1,this.errors,0).parseTemplateBindings()},t.prototype.parseInterpolation=function(t,e,n){void 0===n&&(n=se);var r=this.splitInterpolation(t,e,n);if(null==r)return null;for(var i=[],o=0;o<r.expressions.length;++o){var a=r.expressions[o],s=this._stripComments(a),l=this._lexer.tokenize(s),c=new gr(t,e,l,s.length,!1,this.errors,r.offsets[o]+(a.length-s.length)).parseChain();i.push(c)}return new sr(new tr(new Fn(0,null==t?0:t.length),r.strings,i),t,e,this.errors)},t.prototype.splitInterpolation=function(t,e,n){void 0===n&&(n=se);var r=fr(n),i=t.split(r);if(i.length<=1)return null;for(var o=[],a=[],s=[],l=0,c=0;c<i.length;c++){var u=i[c];c%2==0?(o.push(u),l+=u.length):u.trim().length>0?(l+=n.start.length,a.push(u),s.push(l),l+=u.length+n.end.length):(this._reportError("Blank expressions are not allowed in interpolated strings",t,"at column "+this._findInterpolationErrorColumn(i,c,n)+" in",e),a.push("$implict"),s.push(l))}return new dr(o,a,s)},t.prototype.wrapLiteralPrimitive=function(t,e){return new sr(new Xn(new Fn(0,null==t?0:t.length),t),t,e,this.errors)},t.prototype._stripComments=function(t){var e=this._commentStart(t);return null!=e?t.substring(0,e).trim():t},t.prototype._commentStart=function(t){for(var e=null,n=0;n<t.length-1;n++){var r=t.charCodeAt(n),i=t.charCodeAt(n+1);if(r===Ze&&i==Ze&&null==e)return n;e===r?e=null:null==e&&Nn(r)&&(e=r)}return null},t.prototype._checkNoInterpolation=function(t,e,n){var r=fr(n),i=t.split(r);i.length>1&&this._reportError("Got interpolation ("+n.start+n.end+") where expression was expected",t,"at column "+this._findInterpolationErrorColumn(i,1,n)+" in",e)},t.prototype._findInterpolationErrorColumn=function(t,e,n){for(var r="",i=0;i<e;i++)r+=i%2==0?t[i]:""+n.start+t[i]+n.end;return r.length},t}(),gr=function(){function t(t,e,n,r,i,o,a){this.input=t,this.location=e,this.tokens=n,this.inputLength=r,this.parseAction=i,this.errors=o,this.offset=a,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.index=0}return t.prototype.peek=function(t){var e=this.index+t;return e<this.tokens.length?this.tokens[e]:Dn},Object.defineProperty(t.prototype,"next",{get:function(){return this.peek(0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputIndex",{get:function(){return this.index<this.tokens.length?this.next.index+this.offset:this.inputLength+this.offset},enumerable:!0,configurable:!0}),t.prototype.span=function(t){return new Fn(t,this.inputIndex)},t.prototype.advance=function(){this.index++},t.prototype.optionalCharacter=function(t){return!!this.next.isCharacter(t)&&(this.advance(),!0)},t.prototype.peekKeywordLet=function(){return this.next.isKeywordLet()},t.prototype.peekKeywordAs=function(){return this.next.isKeywordAs()},t.prototype.expectCharacter=function(t){this.optionalCharacter(t)||this.error("Missing expected "+String.fromCharCode(t))},t.prototype.optionalOperator=function(t){return!!this.next.isOperator(t)&&(this.advance(),!0)},t.prototype.expectOperator=function(t){this.optionalOperator(t)||this.error("Missing expected operator "+t)},t.prototype.expectIdentifierOrKeyword=function(){var t=this.next;return t.isIdentifier()||t.isKeyword()?(this.advance(),t.toString()):(this.error("Unexpected token "+t+", expected identifier or keyword"),"")},t.prototype.expectIdentifierOrKeywordOrString=function(){var t=this.next;return t.isIdentifier()||t.isKeyword()||t.isString()?(this.advance(),t.toString()):(this.error("Unexpected token "+t+", expected identifier, keyword, or string"),"")},t.prototype.parseChain=function(){for(var t=[],e=this.inputIndex;this.index<this.tokens.length;){var n=this.parsePipe();if(t.push(n),this.optionalCharacter(Je))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.optionalCharacter(Je););else this.index<this.tokens.length&&this.error("Unexpected token '"+this.next+"'")}return 0==t.length?new Un(this.span(e)):1==t.length?t[0]:new zn(this.span(e),t)},t.prototype.parsePipe=function(){var t=this.parseExpression();if(this.optionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{for(var e=this.expectIdentifierOrKeyword(),n=[];this.optionalCharacter(58);)n.push(this.parseExpression());t=new Qn(this.span(t.span.start),t,e,n)}while(this.optionalOperator("|"))}return t},t.prototype.parseExpression=function(){return this.parseConditional()},t.prototype.parseConditional=function(){var t=this.inputIndex,e=this.parseLogicalOr();if(this.optionalOperator("?")){var n=this.parsePipe(),r=void 0;if(this.optionalCharacter(58))r=this.parsePipe();else{var i=this.inputIndex,o=this.input.substring(t,i);this.error("Conditional expression "+o+" requires all 3 expressions"),r=new Un(this.span(t))}return new Gn(this.span(t),e,n,r)}return e},t.prototype.parseLogicalOr=function(){for(var t=this.parseLogicalAnd();this.optionalOperator("||");){var e=this.parseLogicalAnd();t=new er(this.span(t.span.start),"||",t,e)}return t},t.prototype.parseLogicalAnd=function(){for(var t=this.parseEquality();this.optionalOperator("&&");){var e=this.parseEquality();t=new er(this.span(t.span.start),"&&",t,e)}return t},t.prototype.parseEquality=function(){for(var t=this.parseRelational();this.next.type==Sn.Operator;){var e=this.next.strValue;switch(e){case"==":case"===":case"!=":case"!==":this.advance();var n=this.parseRelational();t=new er(this.span(t.span.start),e,t,n);continue}break}return t},t.prototype.parseRelational=function(){for(var t=this.parseAdditive();this.next.type==Sn.Operator;){var e=this.next.strValue;switch(e){case"<":case">":case"<=":case">=":this.advance();var n=this.parseAdditive();t=new er(this.span(t.span.start),e,t,n);continue}break}return t},t.prototype.parseAdditive=function(){for(var t=this.parseMultiplicative();this.next.type==Sn.Operator;){var e=this.next.strValue;switch(e){case"+":case"-":this.advance();var n=this.parseMultiplicative();t=new er(this.span(t.span.start),e,t,n);continue}break}return t},t.prototype.parseMultiplicative=function(){for(var t=this.parsePrefix();this.next.type==Sn.Operator;){var e=this.next.strValue;switch(e){case"*":case"%":case"/":this.advance();var n=this.parsePrefix();t=new er(this.span(t.span.start),e,t,n);continue}break}return t},t.prototype.parsePrefix=function(){if(this.next.type==Sn.Operator){var t=this.inputIndex,e=this.next.strValue,n=void 0;switch(e){case"+":return this.advance(),n=this.parsePrefix(),new er(this.span(t),"-",n,new Xn(new Fn(t,t),0));case"-":return this.advance(),n=this.parsePrefix(),new er(this.span(t),e,new Xn(new Fn(t,t),0),n);case"!":return this.advance(),n=this.parsePrefix(),new nr(this.span(t),n)}}return this.parseCallChain()},t.prototype.parseCallChain=function(){for(var t=this.parsePrimary();;)if(this.optionalCharacter(46))t=this.parseAccessMemberOrMethodCall(t,!1);else if(this.optionalOperator("?."))t=this.parseAccessMemberOrMethodCall(t,!0);else if(this.optionalCharacter(91)){this.rbracketsExpected++;var e=this.parsePipe();if(this.rbracketsExpected--,this.expectCharacter(93),this.optionalOperator("=")){var n=this.parseConditional();t=new Kn(this.span(t.span.start),t,e,n)}else t=new $n(this.span(t.span.start),t,e)}else if(this.optionalCharacter(40)){this.rparensExpected++;var r=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),t=new ar(this.span(t.span.start),t,r)}else{if(!this.optionalOperator("!"))return t;t=new rr(this.span(t.span.start),t)}},t.prototype.parsePrimary=function(){var t=this.inputIndex;if(this.optionalCharacter(40)){this.rparensExpected++;var e=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),e}if(this.next.isKeywordNull())return this.advance(),new Xn(this.span(t),null);if(this.next.isKeywordUndefined())return this.advance(),new Xn(this.span(t),void 0);if(this.next.isKeywordTrue())return this.advance(),new Xn(this.span(t),!0);if(this.next.isKeywordFalse())return this.advance(),new Xn(this.span(t),!1);if(this.next.isKeywordThis())return this.advance(),new Hn(this.span(t));if(this.optionalCharacter(91)){this.rbracketsExpected++;var n=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new Zn(this.span(t),n)}if(this.next.isCharacter(vn))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new Hn(this.span(t)),!1);if(this.next.isNumber()){var r=this.next.toNumber();return this.advance(),new Xn(this.span(t),r)}if(this.next.isString()){var i=this.next.toString();return this.advance(),new Xn(this.span(t),i)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new Un(this.span(t))):(this.error("Unexpected token "+this.next),new Un(this.span(t)))},t.prototype.parseExpressionList=function(t){var e=[];if(!this.next.isCharacter(t))for(;e.push(this.parsePipe()),this.optionalCharacter(44););return e},t.prototype.parseLiteralMap=function(){var t=[],e=[],n=this.inputIndex;if(this.expectCharacter(vn),!this.optionalCharacter(125)){this.rbracesExpected++;do{var r=this.next.isString(),i=this.expectIdentifierOrKeywordOrString();t.push({key:i,quoted:r}),this.expectCharacter(58),e.push(this.parsePipe())}while(this.optionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new Jn(this.span(n),t,e)},t.prototype.parseAccessMemberOrMethodCall=function(t,e){void 0===e&&(e=!1);var n=t.span.start,r=this.expectIdentifierOrKeyword();if(this.optionalCharacter(40)){this.rparensExpected++;var i=this.parseCallArguments();this.expectCharacter(41),this.rparensExpected--;var o=this.span(n);return e?new or(o,t,r,i):new ir(o,t,r,i)}if(e)return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new Un(this.span(n))):new Yn(this.span(n),t,r);if(this.optionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new Un(this.span(n));var a=this.parseConditional();return new qn(this.span(n),t,r,a)}return new Wn(this.span(n),t,r)},t.prototype.parseCallArguments=function(){if(this.next.isCharacter(41))return[];for(var t=[];t.push(this.parsePipe()),this.optionalCharacter(44););return t},t.prototype.expectTemplateBindingKey=function(){for(var t="",e=!1;t+=this.expectIdentifierOrKeywordOrString(),(e=this.optionalOperator("-"))&&(t+="-"),e;);return t.toString()},t.prototype.parseTemplateBindings=function(){for(var t=[],e=null;this.index<this.tokens.length;){var n=this.inputIndex,r=this.peekKeywordLet();r&&this.advance();var i=this.expectTemplateBindingKey(),o=i;r||(null==e?e=o:o=e+o[0].toUpperCase()+o.substring(1)),this.optionalCharacter(58);var a=null,s=null;if(r)a=this.optionalOperator("=")?this.expectTemplateBindingKey():"$implicit";else if(this.peekKeywordAs()){var l=this.inputIndex;this.advance(),a=i,o=this.expectTemplateBindingKey(),r=!0}else if(this.next!==Dn&&!this.peekKeywordLet()){var c=this.inputIndex,u=this.parsePipe(),p=this.input.substring(c-this.offset,this.inputIndex-this.offset);s=new sr(u,p,this.location,this.errors)}if(t.push(new lr(this.span(n),o,r,a,s)),this.peekKeywordAs()&&!r){l=this.inputIndex;this.advance();var d=this.expectTemplateBindingKey();t.push(new lr(this.span(l),d,!0,o,null))}this.optionalCharacter(Je)||this.optionalCharacter(44)}return new hr(t,[],this.errors)},t.prototype.error=function(t,e){void 0===e&&(e=null),this.errors.push(new jn(t,this.input,this.locationText(e),this.location)),this.skip()},t.prototype.locationText=function(t){return void 0===t&&(t=null),null==t&&(t=this.index),t<this.tokens.length?"at column "+(this.tokens[t].index+1)+" in":"at the end of the expression"},t.prototype.skip=function(){for(var t=this.next;this.index<this.tokens.length&&!t.isCharacter(Je)&&(this.rparensExpected<=0||!t.isCharacter(41))&&(this.rbracesExpected<=0||!t.isCharacter(125))&&(this.rbracketsExpected<=0||!t.isCharacter(93));)this.next.isError()&&this.errors.push(new jn(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),t=this.next},t}(),yr=function(){function t(){this.errors=[]}return t.check=function(e){var n=new t;return e.visit(n),n.errors},t.prototype.visitImplicitReceiver=function(t,e){},t.prototype.visitInterpolation=function(t,e){},t.prototype.visitLiteralPrimitive=function(t,e){},t.prototype.visitPropertyRead=function(t,e){},t.prototype.visitPropertyWrite=function(t,e){},t.prototype.visitSafePropertyRead=function(t,e){},t.prototype.visitMethodCall=function(t,e){},t.prototype.visitSafeMethodCall=function(t,e){},t.prototype.visitFunctionCall=function(t,e){},t.prototype.visitLiteralArray=function(t,e){this.visitAll(t.expressions)},t.prototype.visitLiteralMap=function(t,e){this.visitAll(t.values)},t.prototype.visitBinary=function(t,e){},t.prototype.visitPrefixNot=function(t,e){},t.prototype.visitNonNullAssert=function(t,e){},t.prototype.visitConditional=function(t,e){},t.prototype.visitPipe=function(t,e){this.errors.push("pipes")},t.prototype.visitKeyedRead=function(t,e){},t.prototype.visitKeyedWrite=function(t,e){},t.prototype.visitAll=function(t){var e=this;return t.map(function(t){return t.visit(e)})},t.prototype.visitChain=function(t,e){},t.prototype.visitQuote=function(t,e){},t}(),vr=function(){function t(t,e,n,r){this.file=t,this.offset=e,this.line=n,this.col=r}return t.prototype.toString=function(){return null!=this.offset?this.file.url+"@"+this.line+":"+this.col:this.file.url},t.prototype.moveBy=function(e){for(var n=this.file.content,r=n.length,i=this.offset,o=this.line,a=this.col;i>0&&e<0;){if(i--,e++,(l=n.charCodeAt(i))==He){o--;var s=n.substr(0,i-1).lastIndexOf(String.fromCharCode(He));a=s>0?i-s:i}else a--}for(;i<r&&e>0;){var l=n.charCodeAt(i);i++,e--,l==He?(o++,a=0):a++}return new t(this.file,i,o,a)},t.prototype.getContext=function(t,e){var n=this.file.content,r=this.offset;if(null!=r){r>n.length-1&&(r=n.length-1);for(var i=r,o=0,a=0;o<t&&r>0&&(o++,"\n"!=n[--r]||++a!=e););for(o=0,a=0;o<t&&i<n.length-1&&(o++,"\n"!=n[++i]||++a!=e););return{before:n.substring(r,this.offset),after:n.substring(this.offset,i+1)}}return null},t}(),br=function(t,e){this.content=t,this.url=e},_r=function(){function t(t,e,n){void 0===n&&(n=null),this.start=t,this.end=e,this.details=n}return t.prototype.toString=function(){return this.start.file.content.substring(this.start.offset,this.end.offset)},t}(),wr={WARNING:0,ERROR:1};wr[wr.WARNING]="WARNING",wr[wr.ERROR]="ERROR";var Cr=function(){function t(t,e,n){void 0===n&&(n=wr.ERROR),this.span=t,this.msg=e,this.level=n}return t.prototype.contextualMessage=function(){var t=this.span.start.getContext(100,3);return t?this.msg+' ("'+t.before+"["+wr[this.level]+" ->]"+t.after+'")':this.msg},t.prototype.toString=function(){var t=this.span.details?", "+this.span.details:"";return this.contextualMessage()+": "+this.span.start+t},t}();function xr(t,e){var n=kt(e),r=null!=n?"in "+t+" "+Et(e)+" in "+n:"in "+t+" "+Et(e),i=new br("",r);return new _r(new vr(i,-1,-1,-1),new vr(i,-1,-1,-1))}var Sr={TAG_OPEN_START:0,TAG_OPEN_END:1,TAG_OPEN_END_VOID:2,TAG_CLOSE:3,TEXT:4,ESCAPABLE_RAW_TEXT:5,RAW_TEXT:6,COMMENT_START:7,COMMENT_END:8,CDATA_START:9,CDATA_END:10,ATTR_NAME:11,ATTR_VALUE:12,DOC_TYPE:13,EXPANSION_FORM_START:14,EXPANSION_CASE_VALUE:15,EXPANSION_CASE_EXP_START:16,EXPANSION_CASE_EXP_END:17,EXPANSION_FORM_END:18,EOF:19};Sr[Sr.TAG_OPEN_START]="TAG_OPEN_START",Sr[Sr.TAG_OPEN_END]="TAG_OPEN_END",Sr[Sr.TAG_OPEN_END_VOID]="TAG_OPEN_END_VOID",Sr[Sr.TAG_CLOSE]="TAG_CLOSE",Sr[Sr.TEXT]="TEXT",Sr[Sr.ESCAPABLE_RAW_TEXT]="ESCAPABLE_RAW_TEXT",Sr[Sr.RAW_TEXT]="RAW_TEXT",Sr[Sr.COMMENT_START]="COMMENT_START",Sr[Sr.COMMENT_END]="COMMENT_END",Sr[Sr.CDATA_START]="CDATA_START",Sr[Sr.CDATA_END]="CDATA_END",Sr[Sr.ATTR_NAME]="ATTR_NAME",Sr[Sr.ATTR_VALUE]="ATTR_VALUE",Sr[Sr.DOC_TYPE]="DOC_TYPE",Sr[Sr.EXPANSION_FORM_START]="EXPANSION_FORM_START",Sr[Sr.EXPANSION_CASE_VALUE]="EXPANSION_CASE_VALUE",Sr[Sr.EXPANSION_CASE_EXP_START]="EXPANSION_CASE_EXP_START",Sr[Sr.EXPANSION_CASE_EXP_END]="EXPANSION_CASE_EXP_END",Sr[Sr.EXPANSION_FORM_END]="EXPANSION_FORM_END",Sr[Sr.EOF]="EOF";var Er=function(t,e,n){this.type=t,this.parts=e,this.sourceSpan=n},kr=function(t){function e(e,n,r){var i=t.call(this,r,e)||this;return i.tokenType=n,i}return n(e,t),e}(Cr),Or=function(t,e){this.tokens=t,this.errors=e};var Pr=/\r\n?/g;function Ar(t){return'Unexpected character "'+(t===Be?"EOF":String.fromCharCode(t))+'"'}function Dr(t){return'Unknown entity "'+t+'" - use the "&#<decimal>;" or  "&#x<hex>;" syntax'}var Tr=function(t){this.error=t},Mr=function(){function t(t,e,n,r){void 0===r&&(r=se),this._file=t,this._getTagDefinition=e,this._tokenizeIcu=n,this._interpolationConfig=r,this._peek=-1,this._nextPeek=-1,this._index=-1,this._line=0,this._column=-1,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._input=t.content,this._length=t.content.length,this._advance()}return t.prototype._processCarriageReturns=function(t){return t.replace(Pr,"\n")},t.prototype.tokenize=function(){for(;this._peek!==Be;){var t=this._getLocation();try{this._attemptCharCode(60)?this._attemptCharCode(33)?this._attemptCharCode(91)?this._consumeCdata(t):this._attemptCharCode(Xe)?this._consumeComment(t):this._consumeDocType(t):this._attemptCharCode(Ze)?this._consumeTagClose(t):this._consumeTagOpen(t):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(t){if(!(t instanceof Tr))throw t;this.errors.push(t.error)}}return this._beginToken(Sr.EOF),this._endToken([]),new Or(function(t){for(var e=[],n=void 0,r=0;r<t.length;r++){var i=t[r];n&&n.type==Sr.TEXT&&i.type==Sr.TEXT?(n.parts[0]+=i.parts[0],n.sourceSpan.end=i.sourceSpan.end):(n=i,e.push(n))}return e}(this.tokens),this.errors)},t.prototype._tokenizeExpansionForm=function(){if(jr(this._input,this._index,this._interpolationConfig))return this._consumeExpansionFormStart(),!0;if(((t=this._peek)===tn||xn(t)||Cn(t))&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;var t;if(125===this._peek){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1},t.prototype._getLocation=function(){return new vr(this._file,this._index,this._line,this._column)},t.prototype._getSpan=function(t,e){return void 0===t&&(t=this._getLocation()),void 0===e&&(e=this._getLocation()),new _r(t,e)},t.prototype._beginToken=function(t,e){void 0===e&&(e=this._getLocation()),this._currentTokenStart=e,this._currentTokenType=t},t.prototype._endToken=function(t,e){void 0===e&&(e=this._getLocation());var n=new Er(this._currentTokenType,t,new _r(this._currentTokenStart,e));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n},t.prototype._createError=function(t,e){this._isInExpansionForm()&&(t+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var n=new kr(t,this._currentTokenType,e);return this._currentTokenStart=null,this._currentTokenType=null,new Tr(n)},t.prototype._advance=function(){if(this._index>=this._length)throw this._createError(Ar(Be),this._getSpan());this._peek===He?(this._line++,this._column=0):this._peek!==He&&this._peek!==We&&this._column++,this._index++,this._peek=this._index>=this._length?Be:this._input.charCodeAt(this._index),this._nextPeek=this._index+1>=this._length?Be:this._input.charCodeAt(this._index+1)},t.prototype._attemptCharCode=function(t){return this._peek===t&&(this._advance(),!0)},t.prototype._attemptCharCodeCaseInsensitive=function(t){return e=this._peek,n=t,Fr(e)==Fr(n)&&(this._advance(),!0);var e,n},t.prototype._requireCharCode=function(t){var e=this._getLocation();if(!this._attemptCharCode(t))throw this._createError(Ar(this._peek),this._getSpan(e,e))},t.prototype._attemptStr=function(t){var e=t.length;if(this._index+e>this._length)return!1;for(var n=this._savePosition(),r=0;r<e;r++)if(!this._attemptCharCode(t.charCodeAt(r)))return this._restorePosition(n),!1;return!0},t.prototype._attemptStrCaseInsensitive=function(t){for(var e=0;e<t.length;e++)if(!this._attemptCharCodeCaseInsensitive(t.charCodeAt(e)))return!1;return!0},t.prototype._requireStr=function(t){var e=this._getLocation();if(!this._attemptStr(t))throw this._createError(Ar(this._peek),this._getSpan(e))},t.prototype._attemptCharCodeUntilFn=function(t){for(;!t(this._peek);)this._advance()},t.prototype._requireCharCodeUntilFn=function(t,e){var n=this._getLocation();if(this._attemptCharCodeUntilFn(t),this._index-n.offset<e)throw this._createError(Ar(this._peek),this._getSpan(n,n))},t.prototype._attemptUntilChar=function(t){for(;this._peek!==t;)this._advance()},t.prototype._readChar=function(t){if(t&&38===this._peek)return this._decodeEntity();var e=this._index;return this._advance(),this._input[e]},t.prototype._decodeEntity=function(){var t=this._getLocation();if(this._advance(),!this._attemptCharCode(35)){var e=this._savePosition();if(this._attemptCharCodeUntilFn(Lr),this._peek!=Je)return this._restorePosition(e),"&";this._advance();var n=this._input.substring(t.offset+1,this._index-1),r=_e[n];if(!r)throw this._createError(Dr(n),this._getSpan(t));return r}var i=this._attemptCharCode(120)||this._attemptCharCode(88),o=this._getLocation().offset;if(this._attemptCharCodeUntilFn(Nr),this._peek!=Je)throw this._createError(Ar(this._peek),this._getSpan());this._advance();var a=this._input.substring(o,this._index-1);try{var s=parseInt(a,i?16:10);return String.fromCharCode(s)}catch(e){var l=this._input.substring(t.offset+1,this._index-1);throw this._createError(Dr(l),this._getSpan(t))}},t.prototype._consumeRawText=function(t,e,n){var r,i=this._getLocation();this._beginToken(t?Sr.ESCAPABLE_RAW_TEXT:Sr.RAW_TEXT,i);for(var o=[];r=this._getLocation(),!this._attemptCharCode(e)||!n();)for(this._index>r.offset&&o.push(this._input.substring(r.offset,this._index));this._peek!==e;)o.push(this._readChar(t));return this._endToken([this._processCarriageReturns(o.join(""))],r)},t.prototype._consumeComment=function(t){var e=this;this._beginToken(Sr.COMMENT_START,t),this._requireCharCode(Xe),this._endToken([]);var n=this._consumeRawText(!1,Xe,function(){return e._attemptStr("->")});this._beginToken(Sr.COMMENT_END,n.sourceSpan.end),this._endToken([])},t.prototype._consumeCdata=function(t){var e=this;this._beginToken(Sr.CDATA_START,t),this._requireStr("CDATA["),this._endToken([]);var n=this._consumeRawText(!1,93,function(){return e._attemptStr("]>")});this._beginToken(Sr.CDATA_END,n.sourceSpan.end),this._endToken([])},t.prototype._consumeDocType=function(t){this._beginToken(Sr.DOC_TYPE,t),this._attemptUntilChar(en),this._advance(),this._endToken([this._input.substring(t.offset+2,this._index-1)])},t.prototype._consumePrefixAndName=function(){for(var t,e,n=this._index,r=null;58!==this._peek&&!(((t=this._peek)<un||yn<t)&&(t<on||ln<t)&&(t<nn||t>rn));)this._advance();return 58===this._peek?(this._advance(),r=this._input.substring(n,this._index-1),e=this._index):e=n,this._requireCharCodeUntilFn(Rr,this._index===e?1:0),[r,this._input.substring(e,this._index)]},t.prototype._consumeTagOpen=function(t){var e,n,r=this._savePosition();try{if(!xn(this._peek))throw this._createError(Ar(this._peek),this._getSpan());var i=this._index;for(this._consumeTagOpenStart(t),n=(e=this._input.substring(i,this._index)).toLowerCase(),this._attemptCharCodeUntilFn(Ir);this._peek!==Ze&&this._peek!==en;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(Ir),this._attemptCharCode(tn)&&(this._attemptCharCodeUntilFn(Ir),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(Ir);this._consumeTagOpenEnd()}catch(e){if(e instanceof Tr)return this._restorePosition(r),this._beginToken(Sr.TEXT,t),void this._endToken(["<"]);throw e}var o=this._getTagDefinition(e).contentType;o===he.RAW_TEXT?this._consumeRawTextWithTagClose(n,!1):o===he.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,!0)},t.prototype._consumeRawTextWithTagClose=function(t,e){var n=this,r=this._consumeRawText(e,60,function(){return!!n._attemptCharCode(Ze)&&(n._attemptCharCodeUntilFn(Ir),!!n._attemptStrCaseInsensitive(t)&&(n._attemptCharCodeUntilFn(Ir),n._attemptCharCode(en)))});this._beginToken(Sr.TAG_CLOSE,r.sourceSpan.end),this._endToken([null,t])},t.prototype._consumeTagOpenStart=function(t){this._beginToken(Sr.TAG_OPEN_START,t);var e=this._consumePrefixAndName();this._endToken(e)},t.prototype._consumeAttributeName=function(){this._beginToken(Sr.ATTR_NAME);var t=this._consumePrefixAndName();this._endToken(t)},t.prototype._consumeAttributeValue=function(){var t;if(this._beginToken(Sr.ATTR_VALUE),this._peek===Ke||this._peek===Ye){var e=this._peek;this._advance();for(var n=[];this._peek!==e;)n.push(this._readChar(!0));t=n.join(""),this._advance()}else{var r=this._index;this._requireCharCodeUntilFn(Rr,1),t=this._input.substring(r,this._index)}this._endToken([this._processCarriageReturns(t)])},t.prototype._consumeTagOpenEnd=function(){var t=this._attemptCharCode(Ze)?Sr.TAG_OPEN_END_VOID:Sr.TAG_OPEN_END;this._beginToken(t),this._requireCharCode(en),this._endToken([])},t.prototype._consumeTagClose=function(t){this._beginToken(Sr.TAG_CLOSE,t),this._attemptCharCodeUntilFn(Ir);var e=this._consumePrefixAndName();this._attemptCharCodeUntilFn(Ir),this._requireCharCode(en),this._endToken(e)},t.prototype._consumeExpansionFormStart=function(){this._beginToken(Sr.EXPANSION_FORM_START,this._getLocation()),this._requireCharCode(vn),this._endToken([]),this._expansionCaseStack.push(Sr.EXPANSION_FORM_START),this._beginToken(Sr.RAW_TEXT,this._getLocation());var t=this._readUntil(44);this._endToken([t],this._getLocation()),this._requireCharCode(44),this._attemptCharCodeUntilFn(Ir),this._beginToken(Sr.RAW_TEXT,this._getLocation());var e=this._readUntil(44);this._endToken([e],this._getLocation()),this._requireCharCode(44),this._attemptCharCodeUntilFn(Ir)},t.prototype._consumeExpansionCaseStart=function(){this._beginToken(Sr.EXPANSION_CASE_VALUE,this._getLocation());var t=this._readUntil(vn).trim();this._endToken([t],this._getLocation()),this._attemptCharCodeUntilFn(Ir),this._beginToken(Sr.EXPANSION_CASE_EXP_START,this._getLocation()),this._requireCharCode(vn),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(Ir),this._expansionCaseStack.push(Sr.EXPANSION_CASE_EXP_START)},t.prototype._consumeExpansionCaseEnd=function(){this._beginToken(Sr.EXPANSION_CASE_EXP_END,this._getLocation()),this._requireCharCode(125),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(Ir),this._expansionCaseStack.pop()},t.prototype._consumeExpansionFormEnd=function(){this._beginToken(Sr.EXPANSION_FORM_END,this._getLocation()),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()},t.prototype._consumeText=function(){var t=this._getLocation();this._beginToken(Sr.TEXT,t);for(var e=[];this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(e.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(e.push(this._interpolationConfig.end),this._inInterpolation=!1):e.push(this._readChar(!0)),!this._isTextEnd(););this._endToken([this._processCarriageReturns(e.join(""))])},t.prototype._isTextEnd=function(){if(60===this._peek||this._peek===Be)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(jr(this._input,this._index,this._interpolationConfig))return!0;if(125===this._peek&&this._isInExpansionCase())return!0}return!1},t.prototype._savePosition=function(){return[this._peek,this._index,this._column,this._line,this.tokens.length]},t.prototype._readUntil=function(t){var e=this._index;return this._attemptUntilChar(t),this._input.substring(e,this._index)},t.prototype._restorePosition=function(t){this._peek=t[0],this._index=t[1],this._column=t[2],this._line=t[3];var e=t[4];e<this.tokens.length&&(this.tokens=this.tokens.slice(0,e))},t.prototype._isInExpansionCase=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Sr.EXPANSION_CASE_EXP_START},t.prototype._isInExpansionForm=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Sr.EXPANSION_FORM_START},t}();function Ir(t){return!wn(t)||t===Be}function Rr(t){return wn(t)||t===en||t===Ze||t===Ke||t===Ye||t===tn}function Nr(t){return t==Je||t==Be||!((e=t)>=un&&e<=dn||e>=on&&e<=sn||Cn(e));var e}function Lr(t){return t==Je||t==Be||!xn(t)}function jr(t,e,n){var r=!!n&&t.indexOf(n.start,e)==e;return t.charCodeAt(e)==vn&&!r}function Fr(t){return t>=un&&t<=yn?t-un+on:t}var Vr=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.elementName=e,i}return n(e,t),e.create=function(t,n,r){return new e(t,n,r)},e}(Cr),Br=function(t,e){this.rootNodes=t,this.errors=e},Ur=function(){function t(t){this.getTagDefinition=t}return t.prototype.parse=function(t,e,n,r){void 0===n&&(n=!1),void 0===r&&(r=se);var i,o,a,s,l,c=(i=t,o=e,a=this.getTagDefinition,void 0===(s=n)&&(s=!1),void 0===(l=r)&&(l=se),new Mr(new br(i,o),a,s,l).tokenize()),u=new Hr(c.tokens,this.getTagDefinition).build();return new Br(u.rootNodes,c.errors.concat(u.errors))},t}(),Hr=function(){function t(t,e){this.tokens=t,this.getTagDefinition=e,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return t.prototype.build=function(){for(;this._peek.type!==Sr.EOF;)this._peek.type===Sr.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===Sr.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===Sr.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Sr.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Sr.TEXT||this._peek.type===Sr.RAW_TEXT||this._peek.type===Sr.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Sr.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new Br(this._rootNodes,this._errors)},t.prototype._advance=function(){var t=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],t},t.prototype._advanceIf=function(t){return this._peek.type===t?this._advance():null},t.prototype._consumeCdata=function(t){this._consumeText(this._advance()),this._advanceIf(Sr.CDATA_END)},t.prototype._consumeComment=function(t){var e=this._advanceIf(Sr.RAW_TEXT);this._advanceIf(Sr.COMMENT_END);var n=null!=e?e.parts[0].trim():null;this._addToParent(new te(n,t.sourceSpan))},t.prototype._consumeExpansion=function(t){for(var e=this._advance(),n=this._advance(),r=[];this._peek.type===Sr.EXPANSION_CASE_VALUE;){var i=this._parseExpansionCase();if(!i)return;r.push(i)}if(this._peek.type===Sr.EXPANSION_FORM_END){var o=new _r(t.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new Qt(e.parts[0],n.parts[0],r,o,e.sourceSpan)),this._advance()}else this._errors.push(Vr.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."))},t.prototype._parseExpansionCase=function(){var e=this._advance();if(this._peek.type!==Sr.EXPANSION_CASE_EXP_START)return this._errors.push(Vr.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;var n=this._advance(),r=this._collectExpansionExpTokens(n);if(!r)return null;var i=this._advance();r.push(new Er(Sr.EOF,[],i.sourceSpan));var o=new t(r,this.getTagDefinition).build();if(o.errors.length>0)return this._errors=this._errors.concat(o.errors),null;var a=new _r(e.sourceSpan.start,i.sourceSpan.end),s=new _r(n.sourceSpan.start,i.sourceSpan.end);return new Xt(e.parts[0],o.rootNodes,a,e.sourceSpan,s)},t.prototype._collectExpansionExpTokens=function(t){for(var e=[],n=[Sr.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==Sr.EXPANSION_FORM_START&&this._peek.type!==Sr.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===Sr.EXPANSION_CASE_EXP_END){if(!zr(n,Sr.EXPANSION_CASE_EXP_START))return this._errors.push(Vr.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return e}if(this._peek.type===Sr.EXPANSION_FORM_END){if(!zr(n,Sr.EXPANSION_FORM_START))return this._errors.push(Vr.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===Sr.EOF)return this._errors.push(Vr.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;e.push(this._advance())}},t.prototype._consumeText=function(t){var e=t.parts[0];if(e.length>0&&"\n"==e[0]){var n=this._getParentElement();null!=n&&0==n.children.length&&this.getTagDefinition(n.name).ignoreFirstLf&&(e=e.substring(1))}e.length>0&&this._addToParent(new Kt(e,t.sourceSpan))},t.prototype._closeVoidElement=function(){var t=this._getParentElement();t&&this.getTagDefinition(t.name).isVoid&&this._elementStack.pop()},t.prototype._consumeStartTag=function(t){for(var e=t.parts[0],n=t.parts[1],r=[];this._peek.type===Sr.ATTR_NAME;)r.push(this._consumeAttr(this._advance()));var i=this._getElementFullName(e,n,this._getParentElement()),o=!1;if(this._peek.type===Sr.TAG_OPEN_END_VOID){this._advance(),o=!0;var a=this.getTagDefinition(i);a.canSelfClose||null!==ve(i)||a.isVoid||this._errors.push(Vr.create(i,t.sourceSpan,'Only void and foreign elements can be self closed "'+t.parts[1]+'"'))}else this._peek.type===Sr.TAG_OPEN_END&&(this._advance(),o=!1);var s=this._peek.sourceSpan.start,l=new _r(t.sourceSpan.start,s),c=new Jt(i,r,[],l,l,void 0);this._pushElement(c),o&&(this._popElement(i),c.endSourceSpan=l)},t.prototype._pushElement=function(t){var e=this._getParentElement();e&&this.getTagDefinition(e.name).isClosedByChild(t.name)&&this._elementStack.pop();var n=this.getTagDefinition(t.name),r=this._getParentElementSkippingContainers(),i=r.parent,o=r.container;if(i&&n.requireExtraParent(i.name)){var a=new Jt(n.parentToAdd,[],[],t.sourceSpan,t.startSourceSpan,t.endSourceSpan);this._insertBeforeContainer(i,o,a)}this._addToParent(t),this._elementStack.push(t)},t.prototype._consumeEndTag=function(t){var e=this._getElementFullName(t.parts[0],t.parts[1],this._getParentElement());if(this._getParentElement()&&(this._getParentElement().endSourceSpan=t.sourceSpan),this.getTagDefinition(e).isVoid)this._errors.push(Vr.create(e,t.sourceSpan,'Void elements do not have end tags "'+t.parts[1]+'"'));else if(!this._popElement(e)){var n='Unexpected closing tag "'+e+'". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags';this._errors.push(Vr.create(e,t.sourceSpan,n))}},t.prototype._popElement=function(t){for(var e=this._elementStack.length-1;e>=0;e--){var n=this._elementStack[e];if(n.name==t)return this._elementStack.splice(e,this._elementStack.length-e),!0;if(!this.getTagDefinition(n.name).closedByParent)return!1}return!1},t.prototype._consumeAttr=function(t){var e=be(t.parts[0],t.parts[1]),n=t.sourceSpan.end,r="",i=void 0;if(this._peek.type===Sr.ATTR_VALUE){var o=this._advance();r=o.parts[0],n=o.sourceSpan.end,i=o.sourceSpan}return new Zt(e,r,new _r(t.sourceSpan.start,n),i)},t.prototype._getParentElement=function(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null},t.prototype._getParentElementSkippingContainers=function(){for(var t=null,e=this._elementStack.length-1;e>=0;e--){if(!me(this._elementStack[e].name))return{parent:this._elementStack[e],container:t};t=this._elementStack[e]}return{parent:null,container:t}},t.prototype._addToParent=function(t){var e=this._getParentElement();null!=e?e.children.push(t):this._rootNodes.push(t)},t.prototype._insertBeforeContainer=function(t,e,n){if(e){if(t){var r=t.children.indexOf(e);t.children[r]=n}else this._rootNodes.push(n);n.children.push(e),this._elementStack.splice(this._elementStack.indexOf(e),0,n)}else this._addToParent(n),this._elementStack.push(n)},t.prototype._getElementFullName=function(t,e,n){return null==t&&null==(t=this.getTagDefinition(e).implicitNamespacePrefix)&&null!=n&&(t=ve(n.name)),be(t,e)},t}();function zr(t,e){return t.length>0&&t[t.length-1]===e}function Gr(t){return t.id||function(t){var e,n,r=$(t),i=function(t,e){for(var n=Array(t.length+3>>>2),r=0;r<n.length;r++)n[r]=oi(t,4*r,e);return n}(r,Jr.Big),o=8*r.length,a=new Array(80),s=[1732584193,4023233417,2562383102,271733878,3285377520],l=s[0],c=s[1],u=s[2],p=s[3],d=s[4];i[o>>5]|=128<<24-o%32,i[15+(o+64>>9<<4)]=o;for(var h=0;h<i.length;h+=16){for(var f=[l,c,u,p,d],m=f[0],g=f[1],y=f[2],v=f[3],b=f[4],_=0;_<80;_++){a[_]=_<16?i[h+_]:ri(a[_-3]^a[_-8]^a[_-14]^a[_-16],1);var w=Kr(_,c,u,p),C=w[0],x=w[1],S=[ri(l,5),C,d,x,a[_]].reduce(ti);e=[p,u,ri(c,30),l,S],d=e[0],p=e[1],u=e[2],c=e[3],l=e[4]}n=[ti(l,m),ti(c,g),ti(u,y),ti(p,v),ti(d,b)],l=n[0],c=n[1],u=n[2],p=n[3],d=n[4]}return function(t){for(var e="",n=0;n<t.length;n++){var r=ii(t,n);e+=(r>>>4).toString(16)+(15&r).toString(16)}return e.toLowerCase()}(ai([l,c,u,p,d]))}((e=t.nodes,e.map(function(t){return t.visit(Yr,null)})).join("")+"["+t.meaning+"]");var e}function Wr(t){if(t.id)return t.id;var e=new $r;return function(t,e){var n,r=Qr(t),i=r[0],o=r[1];if(e){var a=Qr(e),s=a[0],l=a[1];b=1,_=(v=[i,o])[0],w=v[1],u=[s,l],p=(c=[_<<b|w>>>32-b,w<<b|_>>>32-b])[0],d=c[1],h=u[0],f=u[1],m=ei(d,f),g=m[0],y=m[1],n=[ti(ti(p,h),g),y],i=n[0],o=n[1]}var c,u,p,d,h,f,m,g,y;var v,b,_,w;return function(t){for(var e="",n="1",r=t.length-1;r>=0;r--)e=si(e,li(ii(t,r),n)),n=li(256,n);return e.split("").reverse().join("")}(ai([2147483647&i,o]))}(t.nodes.map(function(t){return t.visit(e,null)}).join(""),t.meaning)}var qr=function(){function t(){}return t.prototype.visitText=function(t,e){return t.value},t.prototype.visitContainer=function(t,e){var n=this;return"["+t.children.map(function(t){return t.visit(n)}).join(", ")+"]"},t.prototype.visitIcu=function(t,e){var n=this,r=Object.keys(t.cases).map(function(e){return e+" {"+t.cases[e].visit(n)+"}"});return"{"+t.expression+", "+t.type+", "+r.join(", ")+"}"},t.prototype.visitTagPlaceholder=function(t,e){var n=this;return t.isVoid?'<ph tag name="'+t.startName+'"/>':'<ph tag name="'+t.startName+'">'+t.children.map(function(t){return t.visit(n)}).join(", ")+'</ph name="'+t.closeName+'">'},t.prototype.visitPlaceholder=function(t,e){return t.value?'<ph name="'+t.name+'">'+t.value+"</ph>":'<ph name="'+t.name+'"/>'},t.prototype.visitIcuPlaceholder=function(t,e){return'<ph icu name="'+t.name+'">'+t.value.visit(this)+"</ph>"},t}(),Yr=new qr;var $r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.visitIcu=function(t,e){var n=this,r=Object.keys(t.cases).map(function(e){return e+" {"+t.cases[e].visit(n)+"}"});return"{"+t.type+", "+r.join(", ")+"}"},e}(qr);function Kr(t,e,n,r){return t<20?[e&n|~e&r,1518500249]:t<40?[e^n^r,1859775393]:t<60?[e&n|e&r|n&r,2400959708]:[e^n^r,3395469782]}function Qr(t){var e=$(t),n=[Xr(e,0),Xr(e,102072)],r=n[0],i=n[1];return 0!=r||0!=i&&1!=i||(r^=319790063,i^=-1801410264),[r,i]}function Xr(t,e){var n,r,i=[2654435769,2654435769],o=i[0],a=i[1],s=t.length;for(n=0;n+12<=s;n+=12)o=(r=Zr([o=ti(o,oi(t,n,Jr.Little)),a=ti(a,oi(t,n+4,Jr.Little)),e=ti(e,oi(t,n+8,Jr.Little))]))[0],a=r[1],e=r[2];return Zr([o=ti(o,oi(t,n,Jr.Little)),a=ti(a,oi(t,n+4,Jr.Little)),e=ti(e=ti(e,s),oi(t,n+8,Jr.Little)<<8)])[2]}function Zr(t){var e=t[0],n=t[1],r=t[2];return e=ni(e=ni(e,n),r),e^=r>>>13,n=ni(n=ni(n,r),e),n^=e<<8,r=ni(r=ni(r,e),n),r^=n>>>13,e=ni(e=ni(e,n),r),e^=r>>>12,n=ni(n=ni(n,r),e),n^=e<<16,r=ni(r=ni(r,e),n),r^=n>>>5,e=ni(e=ni(e,n),r),e^=r>>>3,n=ni(n=ni(n,r),e),n^=e<<10,r=ni(r=ni(r,e),n),[e,n,r^=n>>>15]}var Jr={Little:0,Big:1};function ti(t,e){return ei(t,e)[1]}function ei(t,e){var n=(65535&t)+(65535&e),r=(t>>>16)+(e>>>16)+(n>>>16);return[r>>>16,r<<16|65535&n]}function ni(t,e){var n=(65535&t)-(65535&e);return(t>>16)-(e>>16)+(n>>16)<<16|65535&n}function ri(t,e){return t<<e|t>>>32-e}function ii(t,e){return e>=t.length?0:255&t.charCodeAt(e)}function oi(t,e,n){var r=0;if(n===Jr.Big)for(var i=0;i<4;i++)r+=ii(t,e+i)<<24-8*i;else for(i=0;i<4;i++)r+=ii(t,e+i)<<8*i;return r}function ai(t){return t.reduce(function(t,e){return t+function(t){for(var e="",n=0;n<4;n++)e+=String.fromCharCode(t>>>8*(3-n)&255);return e}(e)},"")}function si(t,e){for(var n="",r=Math.max(t.length,e.length),i=0,o=0;i<r||o;i++){var a=o+ +(t[i]||0)+ +(e[i]||0);a>=10?(o=1,n+=a-10):(o=0,n+=a)}return n}function li(t,e){for(var n="",r=e;0!==t;t>>>=1)1&t&&(n=si(n,r)),r=si(r,r);return n}Jr[Jr.Little]="Little",Jr[Jr.Big]="Big";var ci=function(t,e,n,r,i,o){this.nodes=t,this.placeholders=e,this.placeholderToMessage=n,this.meaning=r,this.description=i,this.id=o,t.length?this.sources=[{filePath:t[0].sourceSpan.start.file.url,startLine:t[0].sourceSpan.start.line+1,startCol:t[0].sourceSpan.start.col+1,endLine:t[t.length-1].sourceSpan.end.line+1,endCol:t[0].sourceSpan.start.col+1}]:this.sources=[]},ui=function(){function t(t,e){this.value=t,this.sourceSpan=e}return t.prototype.visit=function(t,e){return t.visitText(this,e)},t}(),pi=function(){function t(t,e){this.children=t,this.sourceSpan=e}return t.prototype.visit=function(t,e){return t.visitContainer(this,e)},t}(),di=function(){function t(t,e,n,r){this.expression=t,this.type=e,this.cases=n,this.sourceSpan=r}return t.prototype.visit=function(t,e){return t.visitIcu(this,e)},t}(),hi=function(){function t(t,e,n,r,i,o,a){this.tag=t,this.attrs=e,this.startName=n,this.closeName=r,this.children=i,this.isVoid=o,this.sourceSpan=a}return t.prototype.visit=function(t,e){return t.visitTagPlaceholder(this,e)},t}(),fi=function(){function t(t,e,n){this.value=t,this.name=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitPlaceholder(this,e)},t}(),mi=function(){function t(t,e,n){this.value=t,this.name=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitIcuPlaceholder(this,e)},t}(),gi=function(){function t(){}return t.prototype.visitText=function(t,e){return new ui(t.value,t.sourceSpan)},t.prototype.visitContainer=function(t,e){var n=this,r=t.children.map(function(t){return t.visit(n,e)});return new pi(r,t.sourceSpan)},t.prototype.visitIcu=function(t,e){var n=this,r={};Object.keys(t.cases).forEach(function(i){return r[i]=t.cases[i].visit(n,e)});var i=new di(t.expression,t.type,r,t.sourceSpan);return i.expressionPlaceholder=t.expressionPlaceholder,i},t.prototype.visitTagPlaceholder=function(t,e){var n=this,r=t.children.map(function(t){return t.visit(n,e)});return new hi(t.tag,t.attrs,t.startName,t.closeName,r,t.isVoid,t.sourceSpan)},t.prototype.visitPlaceholder=function(t,e){return new fi(t.value,t.name,t.sourceSpan)},t.prototype.visitIcuPlaceholder=function(t,e){return new mi(t.value,t.name,t.sourceSpan)},t}(),yi=function(){function t(){}return t.prototype.visitText=function(t,e){},t.prototype.visitContainer=function(t,e){var n=this;t.children.forEach(function(t){return t.visit(n)})},t.prototype.visitIcu=function(t,e){var n=this;Object.keys(t.cases).forEach(function(e){t.cases[e].visit(n)})},t.prototype.visitTagPlaceholder=function(t,e){var n=this;t.children.forEach(function(t){return t.visit(n)})},t.prototype.visitPlaceholder=function(t,e){},t.prototype.visitIcuPlaceholder=function(t,e){},t}(),vi=function(){function t(t){var e=void 0===t?{}:t,n=e.closedByChildren,r=e.requiredParents,i=e.implicitNamespacePrefix,o=e.contentType,a=void 0===o?he.PARSABLE_DATA:o,s=e.closedByParent,l=void 0!==s&&s,c=e.isVoid,u=void 0!==c&&c,p=e.ignoreFirstLf,d=void 0!==p&&p,h=this;this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,n&&n.length>0&&n.forEach(function(t){return h.closedByChildren[t]=!0}),this.isVoid=u,this.closedByParent=l||u,r&&r.length>0&&(this.requiredParents={},this.parentToAdd=r[0],r.forEach(function(t){return h.requiredParents[t]=!0})),this.implicitNamespacePrefix=i||null,this.contentType=a,this.ignoreFirstLf=d}return t.prototype.requireExtraParent=function(t){if(!this.requiredParents)return!1;if(!t)return!0;var e=t.toLowerCase();return!("template"===e||"ng-template"===t)&&1!=this.requiredParents[e]},t.prototype.isClosedByChild=function(t){return this.isVoid||t.toLowerCase()in this.closedByChildren},t}(),bi={base:new vi({isVoid:!0}),meta:new vi({isVoid:!0}),area:new vi({isVoid:!0}),embed:new vi({isVoid:!0}),link:new vi({isVoid:!0}),img:new vi({isVoid:!0}),input:new vi({isVoid:!0}),param:new vi({isVoid:!0}),hr:new vi({isVoid:!0}),br:new vi({isVoid:!0}),source:new vi({isVoid:!0}),track:new vi({isVoid:!0}),wbr:new vi({isVoid:!0}),p:new vi({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new vi({closedByChildren:["tbody","tfoot"]}),tbody:new vi({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new vi({closedByChildren:["tbody"],closedByParent:!0}),tr:new vi({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new vi({closedByChildren:["td","th"],closedByParent:!0}),th:new vi({closedByChildren:["td","th"],closedByParent:!0}),col:new vi({requiredParents:["colgroup"],isVoid:!0}),svg:new vi({implicitNamespacePrefix:"svg"}),math:new vi({implicitNamespacePrefix:"math"}),li:new vi({closedByChildren:["li"],closedByParent:!0}),dt:new vi({closedByChildren:["dt","dd"]}),dd:new vi({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new vi({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new vi({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new vi({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new vi({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new vi({closedByChildren:["optgroup"],closedByParent:!0}),option:new vi({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new vi({ignoreFirstLf:!0}),listing:new vi({ignoreFirstLf:!0}),style:new vi({contentType:he.RAW_TEXT}),script:new vi({contentType:he.RAW_TEXT}),title:new vi({contentType:he.ESCAPABLE_RAW_TEXT}),textarea:new vi({contentType:he.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})},_i=new vi;function wi(t){return bi[t.toLowerCase()]||_i}var Ci={A:"LINK",B:"BOLD_TEXT",BR:"LINE_BREAK",EM:"EMPHASISED_TEXT",H1:"HEADING_LEVEL1",H2:"HEADING_LEVEL2",H3:"HEADING_LEVEL3",H4:"HEADING_LEVEL4",H5:"HEADING_LEVEL5",H6:"HEADING_LEVEL6",HR:"HORIZONTAL_RULE",I:"ITALIC_TEXT",LI:"LIST_ITEM",LINK:"MEDIA_LINK",OL:"ORDERED_LIST",P:"PARAGRAPH",Q:"QUOTATION",S:"STRIKETHROUGH_TEXT",SMALL:"SMALL_TEXT",SUB:"SUBSTRIPT",SUP:"SUPERSCRIPT",TBODY:"TABLE_BODY",TD:"TABLE_CELL",TFOOT:"TABLE_FOOTER",TH:"TABLE_HEADER_CELL",THEAD:"TABLE_HEADER",TR:"TABLE_ROW",TT:"MONOSPACED_TEXT",U:"UNDERLINED_TEXT",UL:"UNORDERED_LIST"},xi=function(){function t(){this._placeHolderNameCounts={},this._signatureToName={}}return t.prototype.getStartTagPlaceholderName=function(t,e,n){var r=this._hashTag(t,e,n);if(this._signatureToName[r])return this._signatureToName[r];var i=t.toUpperCase(),o=Ci[i]||"TAG_"+i,a=this._generateUniqueName(n?o:"START_"+o);return this._signatureToName[r]=a,a},t.prototype.getCloseTagPlaceholderName=function(t){var e=this._hashClosingTag(t);if(this._signatureToName[e])return this._signatureToName[e];var n=t.toUpperCase(),r=Ci[n]||"TAG_"+n,i=this._generateUniqueName("CLOSE_"+r);return this._signatureToName[e]=i,i},t.prototype.getPlaceholderName=function(t,e){var n=t.toUpperCase(),r="PH: "+n+"="+e;if(this._signatureToName[r])return this._signatureToName[r];var i=this._generateUniqueName(n);return this._signatureToName[r]=i,i},t.prototype.getUniquePlaceholder=function(t){return this._generateUniqueName(t.toUpperCase())},t.prototype._hashTag=function(t,e,n){return"<"+t+Object.keys(e).sort().map(function(t){return" "+t+"="+e[t]}).join("")+(n?"/>":"></"+t+">")},t.prototype._hashClosingTag=function(t){return this._hashTag("/"+t,{},!1)},t.prototype._generateUniqueName=function(t){if(!this._placeHolderNameCounts.hasOwnProperty(t))return this._placeHolderNameCounts[t]=1,t;var e=this._placeHolderNameCounts[t];return this._placeHolderNameCounts[t]=e+1,t+"_"+e},t}(),Si=new mr(new kn);var Ei=function(){function t(t,e){this._expressionParser=t,this._interpolationConfig=e}return t.prototype.toI18nMessage=function(t,e,n,r){this._isIcu=1==t.length&&t[0]instanceof Qt,this._icuDepth=0,this._placeholderRegistry=new xi,this._placeholderToContent={},this._placeholderToMessage={};var i=ee(this,t,{});return new ci(i,this._placeholderToContent,this._placeholderToMessage,e,n,r)},t.prototype.visitElement=function(t,e){var n=ee(this,t.children),r={};t.attrs.forEach(function(t){r[t.name]=t.value});var i=wi(t.name).isVoid,o=this._placeholderRegistry.getStartTagPlaceholderName(t.name,r,i);this._placeholderToContent[o]=t.sourceSpan.toString();var a="";return i||(a=this._placeholderRegistry.getCloseTagPlaceholderName(t.name),this._placeholderToContent[a]="</"+t.name+">"),new hi(t.name,r,o,a,n,i,t.sourceSpan)},t.prototype.visitAttribute=function(t,e){return this._visitTextWithInterpolation(t.value,t.sourceSpan)},t.prototype.visitText=function(t,e){return this._visitTextWithInterpolation(t.value,t.sourceSpan)},t.prototype.visitComment=function(t,e){return null},t.prototype.visitExpansion=function(e,n){var r=this;this._icuDepth++;var i={},o=new di(e.switchValue,e.type,i,e.sourceSpan);if(e.cases.forEach(function(t){i[t.value]=new pi(t.expression.map(function(t){return t.visit(r,{})}),t.expSourceSpan)}),this._icuDepth--,this._isIcu||this._icuDepth>0){var a=this._placeholderRegistry.getUniquePlaceholder("VAR_"+e.type);return o.expressionPlaceholder=a,this._placeholderToContent[a]=e.switchValue,o}var s=this._placeholderRegistry.getPlaceholderName("ICU",e.sourceSpan.toString()),l=new t(this._expressionParser,this._interpolationConfig);return this._placeholderToMessage[s]=l.toI18nMessage([e],"","",""),new mi(o,s,e.sourceSpan)},t.prototype.visitExpansionCase=function(t,e){throw new Error("Unreachable code")},t.prototype._visitTextWithInterpolation=function(t,e){var n=this._expressionParser.splitInterpolation(t,e.start.toString(),this._interpolationConfig);if(!n)return new ui(t,e);for(var r=[],i=new pi(r,e),o=this._interpolationConfig,a=o.start,s=o.end,l=0;l<n.strings.length-1;l++){var c=n.expressions[l],u=c.split(ki)[2]||"INTERPOLATION",p=this._placeholderRegistry.getPlaceholderName(u,c);n.strings[l].length&&r.push(new ui(n.strings[l],e)),r.push(new fi(c,p,e)),this._placeholderToContent[p]=a+c+s}var d=n.strings.length-1;return n.strings[d].length&&r.push(new ui(n.strings[d],e)),i},t}(),ki=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g;var Oi=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e}(Cr),Pi="i18n",Ai="i18n-",Di=/^i18n:?/,Ti="|",Mi="@@",Ii=!1;var Ri=function(t,e){this.messages=t,this.errors=e},Ni={Extract:0,Merge:1};Ni[Ni.Extract]="Extract",Ni[Ni.Merge]="Merge";var Li=function(){function t(t,e){this._implicitTags=t,this._implicitAttrs=e}return t.prototype.extract=function(t,e){var n=this;return this._init(Ni.Extract,e),t.forEach(function(t){return t.visit(n,null)}),this._inI18nBlock&&this._reportError(t[t.length-1],"Unclosed block"),new Ri(this._messages,this._errors)},t.prototype.merge=function(t,e,n){this._init(Ni.Merge,n),this._translations=e;var r=new Jt("wrapper",[],t,void 0,void 0,void 0).visit(this,null);return this._inI18nBlock&&this._reportError(t[t.length-1],"Unclosed block"),new Br(r.children,this._errors)},t.prototype.visitExpansionCase=function(t,e){var n=ee(this,t.expression,e);if(this._mode===Ni.Merge)return new Xt(t.value,n,t.sourceSpan,t.valueSourceSpan,t.expSourceSpan)},t.prototype.visitExpansion=function(t,e){this._mayBeAddBlockChildren(t);var n=this._inIcu;this._inIcu||(this._isInTranslatableSection&&this._addMessage([t]),this._inIcu=!0);var r=ee(this,t.cases,e);return this._mode===Ni.Merge&&(t=new Qt(t.switchValue,t.type,r,t.sourceSpan,t.switchValueSourceSpan)),this._inIcu=n,t},t.prototype.visitComment=function(t,e){var n,r=!!((n=t)instanceof te&&n.value&&n.value.startsWith("i18n"));if(r&&this._isInTranslatableSection)this._reportError(t,"Could not start a block inside a translatable section");else{var i,o=!!((i=t)instanceof te&&i.value&&"/i18n"===i.value);if(!o||this._inI18nBlock){if(!this._inI18nNode&&!this._inIcu)if(this._inI18nBlock){if(o){if(this._depth==this._blockStartDepth){this._closeTranslatableSection(t,this._blockChildren),this._inI18nBlock=!1;var a=this._addMessage(this._blockChildren,this._blockMeaningAndDesc);return ee(this,this._translateMessage(t,a))}return void this._reportError(t,"I18N blocks should not cross element boundaries")}}else if(r){if(!Ii&&console&&console.warn){Ii=!0;var s=t.sourceSpan.details?", "+t.sourceSpan.details:"";console.warn("I18n comments are deprecated, use an <ng-container> element instead ("+t.sourceSpan.start+s+")")}this._inI18nBlock=!0,this._blockStartDepth=this._depth,this._blockChildren=[],this._blockMeaningAndDesc=t.value.replace(Di,"").trim(),this._openTranslatableSection(t)}}else this._reportError(t,"Trying to close an unopened block")}},t.prototype.visitText=function(t,e){return this._isInTranslatableSection&&this._mayBeAddBlockChildren(t),t},t.prototype.visitElement=function(t,e){var n=this;this._mayBeAddBlockChildren(t),this._depth++;var r=this._inI18nNode,i=this._inImplicitNode,o=[],a=void 0,s=t.attrs.find(function(t){return t.name===Pi})||null,l=s?s.value:"",c=this._implicitTags.some(function(e){return t.name===e})&&!this._inIcu&&!this._isInTranslatableSection,u=!i&&c;if(this._inImplicitNode=i||c,this._isInTranslatableSection||this._inIcu)(s||u)&&this._reportError(t,"Could not mark an element as translatable inside a translatable section"),this._mode==Ni.Extract&&ee(this,t.children);else{if(s||u){this._inI18nNode=!0;var p=this._addMessage(t.children,l);a=this._translateMessage(t,p)}if(this._mode==Ni.Extract){var d=s||u;d&&this._openTranslatableSection(t),ee(this,t.children),d&&this._closeTranslatableSection(t,t.children)}}this._mode===Ni.Merge&&(a||t.children).forEach(function(t){var r=t.visit(n,e);r&&!n._isInTranslatableSection&&(o=o.concat(r))});if(this._visitAttributesOf(t),this._depth--,this._inI18nNode=r,this._inImplicitNode=i,this._mode===Ni.Merge){var h=this._translateAttributes(t);return new Jt(t.name,h,o,t.sourceSpan,t.startSourceSpan,t.endSourceSpan)}return null},t.prototype.visitAttribute=function(t,e){throw new Error("unreachable code")},t.prototype._init=function(t,e){var n;this._mode=t,this._inI18nBlock=!1,this._inI18nNode=!1,this._depth=0,this._inIcu=!1,this._msgCountAtSectionStart=void 0,this._errors=[],this._messages=[],this._inImplicitNode=!1,this._createI18nMessage=(n=new Ei(Si,e),function(t,e,r,i){return n.toI18nMessage(t,e,r,i)})},t.prototype._visitAttributesOf=function(t){var e=this,n={},r=this._implicitAttrs[t.name]||[];t.attrs.filter(function(t){return t.name.startsWith(Ai)}).forEach(function(t){return n[t.name.slice(Ai.length)]=t.value}),t.attrs.forEach(function(t){t.name in n?e._addMessage([t],n[t.name]):r.some(function(e){return t.name===e})&&e._addMessage([t])})},t.prototype._addMessage=function(t,e){if(0==t.length||1==t.length&&t[0]instanceof Zt&&!t[0].value)return null;var n=ji(e),r=n.meaning,i=n.description,o=n.id,a=this._createI18nMessage(t,r,i,o);return this._messages.push(a),a},t.prototype._translateMessage=function(t,e){if(e&&this._mode===Ni.Merge){var n=this._translations.get(e);if(n)return n;this._reportError(t,'Translation unavailable for message id="'+this._translations.digest(e)+'"')}return[]},t.prototype._translateAttributes=function(t){var e=this,n=t.attrs,r={};n.forEach(function(t){t.name.startsWith(Ai)&&(r[t.name.slice(Ai.length)]=ji(t.value))});var i=[];return n.forEach(function(n){if(n.name!==Pi&&!n.name.startsWith(Ai))if(n.value&&""!=n.value&&r.hasOwnProperty(n.name)){var o=r[n.name],a=o.meaning,s=o.description,l=o.id,c=e._createI18nMessage([n],a,s,l),u=e._translations.get(c);if(u)if(0==u.length)i.push(new Zt(n.name,"",n.sourceSpan));else if(u[0]instanceof Kt){var p=u[0].value;i.push(new Zt(n.name,p,n.sourceSpan))}else e._reportError(t,'Unexpected translation for attribute "'+n.name+'" (id="'+(l||e._translations.digest(c))+'")');else e._reportError(t,'Translation unavailable for attribute "'+n.name+'" (id="'+(l||e._translations.digest(c))+'")')}else i.push(n)}),i},t.prototype._mayBeAddBlockChildren=function(t){this._inI18nBlock&&!this._inIcu&&this._depth==this._blockStartDepth&&this._blockChildren.push(t)},t.prototype._openTranslatableSection=function(t){this._isInTranslatableSection?this._reportError(t,"Unexpected section start"):this._msgCountAtSectionStart=this._messages.length},Object.defineProperty(t.prototype,"_isInTranslatableSection",{get:function(){return void 0!==this._msgCountAtSectionStart},enumerable:!0,configurable:!0}),t.prototype._closeTranslatableSection=function(t,e){if(this._isInTranslatableSection){var n=this._msgCountAtSectionStart;if(1==e.reduce(function(t,e){return t+(e instanceof te?0:1)},0))for(var r=this._messages.length-1;r>=n;r--){var i=this._messages[r].nodes;if(!(1==i.length&&i[0]instanceof ui)){this._messages.splice(r,1);break}}this._msgCountAtSectionStart=void 0}else this._reportError(t,"Unexpected section end")},t.prototype._reportError=function(t,e){this._errors.push(new Oi(t.sourceSpan,e))},t}();function ji(t){if(!t)return{meaning:"",description:"",id:""};var e=t.indexOf(Mi),n=t.indexOf(Ti),r=e>-1?[t.slice(0,e),t.slice(e+2)]:[t,""],i=r[0],o=r[1],a=n>-1?[i.slice(0,n),i.slice(n+1)]:["",i];return{meaning:a[0],description:a[1],id:o}}var Fi=new(function(){function t(){this.closedByParent=!1,this.contentType=he.PARSABLE_DATA,this.isVoid=!1,this.ignoreFirstLf=!1,this.canSelfClose=!0}return t.prototype.requireExtraParent=function(t){return!1},t.prototype.isClosedByChild=function(t){return!1},t}());function Vi(t){return Fi}var Bi=function(t){function e(){return t.call(this,Vi)||this}return n(e,t),e.prototype.parse=function(e,n,r){return void 0===r&&(r=!1),t.prototype.parse.call(this,e,n,r)},e}(Ur),Ui=function(){function t(){}return t.prototype.createNameMapper=function(t){return null},t}(),Hi=function(t){function e(e,n){var r=t.call(this)||this;return r.mapName=n,r.internalToPublic={},r.publicToNextId={},r.publicToInternal={},e.nodes.forEach(function(t){return t.visit(r)}),r}return n(e,t),e.prototype.toPublicName=function(t){return this.internalToPublic.hasOwnProperty(t)?this.internalToPublic[t]:null},e.prototype.toInternalName=function(t){return this.publicToInternal.hasOwnProperty(t)?this.publicToInternal[t]:null},e.prototype.visitText=function(t,e){return null},e.prototype.visitTagPlaceholder=function(e,n){this.visitPlaceholderName(e.startName),t.prototype.visitTagPlaceholder.call(this,e,n),this.visitPlaceholderName(e.closeName)},e.prototype.visitPlaceholder=function(t,e){this.visitPlaceholderName(t.name)},e.prototype.visitIcuPlaceholder=function(t,e){this.visitPlaceholderName(t.name)},e.prototype.visitPlaceholderName=function(t){if(t&&!this.internalToPublic.hasOwnProperty(t)){var e=this.mapName(t);if(this.publicToInternal.hasOwnProperty(e)){var n=this.publicToNextId[e];this.publicToNextId[e]=n+1,e=e+"_"+n}else this.publicToNextId[e]=1;this.internalToPublic[t]=e,this.publicToInternal[e]=t}},e}(yi),zi=new(function(){function t(){}return t.prototype.visitTag=function(t){var e=this,n=this._serializeAttributes(t.attrs);if(0==t.children.length)return"<"+t.name+n+"/>";var r=t.children.map(function(t){return t.visit(e)});return"<"+t.name+n+">"+r.join("")+"</"+t.name+">"},t.prototype.visitText=function(t){return t.value},t.prototype.visitDeclaration=function(t){return"<?xml"+this._serializeAttributes(t.attrs)+" ?>"},t.prototype._serializeAttributes=function(t){var e=Object.keys(t).map(function(e){return e+'="'+t[e]+'"'}).join(" ");return e.length>0?" "+e:""},t.prototype.visitDoctype=function(t){return"<!DOCTYPE "+t.rootTag+" [\n"+t.dtd+"\n]>"},t}());function Gi(t){return t.map(function(t){return t.visit(zi)}).join("")}var Wi=function(){function t(t){var e=this;this.attrs={},Object.keys(t).forEach(function(n){e.attrs[n]=Xi(t[n])})}return t.prototype.visit=function(t){return t.visitDeclaration(this)},t}(),qi=function(){function t(t,e){this.rootTag=t,this.dtd=e}return t.prototype.visit=function(t){return t.visitDoctype(this)},t}(),Yi=function(){function t(t,e,n){void 0===e&&(e={}),void 0===n&&(n=[]);var r=this;this.name=t,this.children=n,this.attrs={},Object.keys(e).forEach(function(t){r.attrs[t]=Xi(e[t])})}return t.prototype.visit=function(t){return t.visitTag(this)},t}(),$i=function(){function t(t){this.value=Xi(t)}return t.prototype.visit=function(t){return t.visitText(this)},t}(),Ki=function(t){function e(e){return void 0===e&&(e=0),t.call(this,"\n"+new Array(e+1).join(" "))||this}return n(e,t),e}($i),Qi=[[/&/g,"&amp;"],[/"/g,"&quot;"],[/'/g,"&apos;"],[/</g,"&lt;"],[/>/g,"&gt;"]];function Xi(t){return Qi.reduce(function(t,e){return t.replace(e[0],e[1])},t)}var Zi="trans-unit",Ji=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.write=function(t,e){var n=new to,r=[];t.forEach(function(t){var e=[];t.sources.forEach(function(t){var n=new Yi("context-group",{purpose:"location"});n.children.push(new Ki(10),new Yi("context",{"context-type":"sourcefile"},[new $i(t.filePath)]),new Ki(10),new Yi("context",{"context-type":"linenumber"},[new $i(""+t.startLine)]),new Ki(8)),e.push(new Ki(8),n)});var i,o=new Yi(Zi,{id:t.id,datatype:"html"});(i=o.children).push.apply(i,[new Ki(8),new Yi("source",{},n.serialize(t.nodes))].concat(e)),t.description&&o.children.push(new Ki(8),new Yi("note",{priority:"1",from:"description"},[new $i(t.description)])),t.meaning&&o.children.push(new Ki(8),new Yi("note",{priority:"1",from:"meaning"},[new $i(t.meaning)])),o.children.push(new Ki(6)),r.push(new Ki(6),o)});var i=new Yi("body",{},r.concat([new Ki(4)])),o=new Yi("file",{"source-language":e||"en",datatype:"plaintext",original:"ng2.template"},[new Ki(4),i,new Ki(2)]),a=new Yi("xliff",{version:"1.2",xmlns:"urn:oasis:names:tc:xliff:document:1.2"},[new Ki(2),o,new Ki]);return Gi([new Wi({version:"1.0",encoding:"UTF-8"}),new Ki,a,new Ki])},e.prototype.load=function(t,e){var n=(new eo).parse(t,e),r=n.locale,i=n.msgIdToHtml,o=n.errors,a={},s=new no;if(Object.keys(i).forEach(function(t){var n=s.convert(i[t],e),r=n.i18nNodes,l=n.errors;o.push.apply(o,l),a[t]=r}),o.length)throw new Error("xliff parse errors:\n"+o.join("\n"));return{locale:r,i18nNodesByMsgId:a}},e.prototype.digest=function(t){return Gr(t)},e}(Ui),to=function(){function t(){}return t.prototype.visitText=function(t,e){return[new $i(t.value)]},t.prototype.visitContainer=function(t,e){var n=this,r=[];return t.children.forEach(function(t){return r.push.apply(r,t.visit(n))}),r},t.prototype.visitIcu=function(t,e){var n=this,r=[new $i("{"+t.expressionPlaceholder+", "+t.type+", ")];return Object.keys(t.cases).forEach(function(e){r.push.apply(r,[new $i(e+" {")].concat(t.cases[e].visit(n),[new $i("} ")]))}),r.push(new $i("}")),r},t.prototype.visitTagPlaceholder=function(t,e){var n=function(t){switch(t.toLowerCase()){case"br":return"lb";case"img":return"image";default:return"x-"+t}}(t.tag);if(t.isVoid)return[new Yi("x",{id:t.startName,ctype:n,"equiv-text":"<"+t.tag+"/>"})];var r=new Yi("x",{id:t.startName,ctype:n,"equiv-text":"<"+t.tag+">"}),i=new Yi("x",{id:t.closeName,ctype:n,"equiv-text":"</"+t.tag+">"});return[r].concat(this.serialize(t.children),[i])},t.prototype.visitPlaceholder=function(t,e){return[new Yi("x",{id:t.name,"equiv-text":"{{"+t.value+"}}"})]},t.prototype.visitIcuPlaceholder=function(t,e){var n="{"+t.value.expression+", "+t.value.type+", "+Object.keys(t.value.cases).map(function(t){return t+" {...}"}).join(" ")+"}";return[new Yi("x",{id:t.name,"equiv-text":n})]},t.prototype.serialize=function(t){var e=this;return[].concat.apply([],t.map(function(t){return t.visit(e)}))},t}(),eo=function(){function t(){this._locale=null}return t.prototype.parse=function(t,e){this._unitMlString=null,this._msgIdToHtml={};var n=(new Bi).parse(t,e,!1);return this._errors=n.errors,ee(this,n.rootNodes,null),{msgIdToHtml:this._msgIdToHtml,errors:this._errors,locale:this._locale}},t.prototype.visitElement=function(t,e){switch(t.name){case Zi:this._unitMlString=null;var n=t.attrs.find(function(t){return"id"===t.name});if(n){var r=n.value;this._msgIdToHtml.hasOwnProperty(r)?this._addError(t,"Duplicated translations for msg "+r):(ee(this,t.children,null),"string"==typeof this._unitMlString?this._msgIdToHtml[r]=this._unitMlString:this._addError(t,"Message "+r+" misses a translation"))}else this._addError(t,"<"+Zi+'> misses the "id" attribute');break;case"source":case"seg-source":break;case"target":var i=t.startSourceSpan.end.offset,o=t.endSourceSpan.start.offset,a=t.startSourceSpan.start.file.content.slice(i,o);this._unitMlString=a;break;case"file":var s=t.attrs.find(function(t){return"target-language"===t.name});s&&(this._locale=s.value),ee(this,t.children,null);break;default:ee(this,t.children,null)}},t.prototype.visitAttribute=function(t,e){},t.prototype.visitText=function(t,e){},t.prototype.visitComment=function(t,e){},t.prototype.visitExpansion=function(t,e){},t.prototype.visitExpansionCase=function(t,e){},t.prototype._addError=function(t,e){this._errors.push(new Oi(t.sourceSpan,e))},t}(),no=function(){function t(){}return t.prototype.convert=function(t,e){var n=(new Bi).parse(t,e,!0);return this._errors=n.errors,{i18nNodes:this._errors.length>0||0==n.rootNodes.length?[]:[].concat.apply([],ee(this,n.rootNodes)),errors:this._errors}},t.prototype.visitText=function(t,e){return new ui(t.value,t.sourceSpan)},t.prototype.visitElement=function(t,e){if("x"===t.name){var n=t.attrs.find(function(t){return"id"===t.name});return n?new fi("",n.value,t.sourceSpan):(this._addError(t,'<x> misses the "id" attribute'),null)}return"mrk"===t.name?[].concat.apply([],ee(this,t.children)):(this._addError(t,"Unexpected tag"),null)},t.prototype.visitExpansion=function(t,e){var n={};return ee(this,t.cases).forEach(function(e){n[e.value]=new pi(e.nodes,t.sourceSpan)}),new di(t.switchValue,t.type,n,t.sourceSpan)},t.prototype.visitExpansionCase=function(t,e){return{value:t.value,nodes:ee(this,t.expression)}},t.prototype.visitComment=function(t,e){},t.prototype.visitAttribute=function(t,e){},t.prototype._addError=function(t,e){this._errors.push(new Oi(t.sourceSpan,e))},t}();var ro=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.write=function(t,e){var n=new io,r=[];t.forEach(function(t){var e=new Yi("unit",{id:t.id}),i=new Yi("notes");(t.description||t.meaning)&&(t.description&&i.children.push(new Ki(8),new Yi("note",{category:"description"},[new $i(t.description)])),t.meaning&&i.children.push(new Ki(8),new Yi("note",{category:"meaning"},[new $i(t.meaning)]))),t.sources.forEach(function(t){i.children.push(new Ki(8),new Yi("note",{category:"location"},[new $i(t.filePath+":"+t.startLine+(t.endLine!==t.startLine?","+t.endLine:""))]))}),i.children.push(new Ki(6)),e.children.push(new Ki(6),i);var o=new Yi("segment");o.children.push(new Ki(8),new Yi("source",{},n.serialize(t.nodes)),new Ki(6)),e.children.push(new Ki(6),o,new Ki(4)),r.push(new Ki(4),e)});var i=new Yi("file",{original:"ng.template",id:"ngi18n"},r.concat([new Ki(2)])),o=new Yi("xliff",{version:"2.0",xmlns:"urn:oasis:names:tc:xliff:document:2.0",srcLang:e||"en"},[new Ki(2),i,new Ki]);return Gi([new Wi({version:"1.0",encoding:"UTF-8"}),new Ki,o,new Ki])},e.prototype.load=function(t,e){var n=(new oo).parse(t,e),r=n.locale,i=n.msgIdToHtml,o=n.errors,a={},s=new ao;if(Object.keys(i).forEach(function(t){var n=s.convert(i[t],e),r=n.i18nNodes,l=n.errors;o.push.apply(o,l),a[t]=r}),o.length)throw new Error("xliff2 parse errors:\n"+o.join("\n"));return{locale:r,i18nNodesByMsgId:a}},e.prototype.digest=function(t){return Wr(t)},e}(Ui),io=function(){function t(){}return t.prototype.visitText=function(t,e){return[new $i(t.value)]},t.prototype.visitContainer=function(t,e){var n=this,r=[];return t.children.forEach(function(t){return r.push.apply(r,t.visit(n))}),r},t.prototype.visitIcu=function(t,e){var n=this,r=[new $i("{"+t.expressionPlaceholder+", "+t.type+", ")];return Object.keys(t.cases).forEach(function(e){r.push.apply(r,[new $i(e+" {")].concat(t.cases[e].visit(n),[new $i("} ")]))}),r.push(new $i("}")),r},t.prototype.visitTagPlaceholder=function(t,e){var n=this,r=function(t){switch(t.toLowerCase()){case"br":case"b":case"i":case"u":return"fmt";case"img":return"image";case"a":return"link";default:return"other"}}(t.tag);if(t.isVoid)return[new Yi("ph",{id:(this._nextPlaceholderId++).toString(),equiv:t.startName,type:r,disp:"<"+t.tag+"/>"})];var i=new Yi("pc",{id:(this._nextPlaceholderId++).toString(),equivStart:t.startName,equivEnd:t.closeName,type:r,dispStart:"<"+t.tag+">",dispEnd:"</"+t.tag+">"}),o=[].concat.apply([],t.children.map(function(t){return t.visit(n)}));return o.length?o.forEach(function(t){return i.children.push(t)}):i.children.push(new $i("")),[i]},t.prototype.visitPlaceholder=function(t,e){var n=(this._nextPlaceholderId++).toString();return[new Yi("ph",{id:n,equiv:t.name,disp:"{{"+t.value+"}}"})]},t.prototype.visitIcuPlaceholder=function(t,e){var n=Object.keys(t.value.cases).map(function(t){return t+" {...}"}).join(" "),r=(this._nextPlaceholderId++).toString();return[new Yi("ph",{id:r,equiv:t.name,disp:"{"+t.value.expression+", "+t.value.type+", "+n+"}"})]},t.prototype.serialize=function(t){var e=this;return this._nextPlaceholderId=0,[].concat.apply([],t.map(function(t){return t.visit(e)}))},t}(),oo=function(){function t(){this._locale=null}return t.prototype.parse=function(t,e){this._unitMlString=null,this._msgIdToHtml={};var n=(new Bi).parse(t,e,!1);return this._errors=n.errors,ee(this,n.rootNodes,null),{msgIdToHtml:this._msgIdToHtml,errors:this._errors,locale:this._locale}},t.prototype.visitElement=function(t,e){switch(t.name){case"unit":this._unitMlString=null;var n=t.attrs.find(function(t){return"id"===t.name});if(n){var r=n.value;this._msgIdToHtml.hasOwnProperty(r)?this._addError(t,"Duplicated translations for msg "+r):(ee(this,t.children,null),"string"==typeof this._unitMlString?this._msgIdToHtml[r]=this._unitMlString:this._addError(t,"Message "+r+" misses a translation"))}else this._addError(t,'<unit> misses the "id" attribute');break;case"source":break;case"target":var i=t.startSourceSpan.end.offset,o=t.endSourceSpan.start.offset,a=t.startSourceSpan.start.file.content.slice(i,o);this._unitMlString=a;break;case"xliff":var s=t.attrs.find(function(t){return"trgLang"===t.name});s&&(this._locale=s.value);var l=t.attrs.find(function(t){return"version"===t.name});if(l){var c=l.value;"2.0"!==c?this._addError(t,"The XLIFF file version "+c+" is not compatible with XLIFF 2.0 serializer"):ee(this,t.children,null)}break;default:ee(this,t.children,null)}},t.prototype.visitAttribute=function(t,e){},t.prototype.visitText=function(t,e){},t.prototype.visitComment=function(t,e){},t.prototype.visitExpansion=function(t,e){},t.prototype.visitExpansionCase=function(t,e){},t.prototype._addError=function(t,e){this._errors.push(new Oi(t.sourceSpan,e))},t}(),ao=function(){function t(){}return t.prototype.convert=function(t,e){var n=(new Bi).parse(t,e,!0);return this._errors=n.errors,{i18nNodes:this._errors.length>0||0==n.rootNodes.length?[]:[].concat.apply([],ee(this,n.rootNodes)),errors:this._errors}},t.prototype.visitText=function(t,e){return new ui(t.value,t.sourceSpan)},t.prototype.visitElement=function(t,e){var n=this;switch(t.name){case"ph":var r=t.attrs.find(function(t){return"equiv"===t.name});if(r)return[new fi("",r.value,t.sourceSpan)];this._addError(t,'<ph> misses the "equiv" attribute');break;case"pc":var i=t.attrs.find(function(t){return"equivStart"===t.name}),o=t.attrs.find(function(t){return"equivEnd"===t.name});if(i){if(o){var a=i.value,s=o.value,l=[];return l.concat.apply(l,[new fi("",a,t.sourceSpan)].concat(t.children.map(function(t){return t.visit(n,null)}),[new fi("",s,t.sourceSpan)]))}this._addError(t,'<ph> misses the "equivEnd" attribute')}else this._addError(t,'<ph> misses the "equivStart" attribute');break;case"mrk":return[].concat.apply([],ee(this,t.children));default:this._addError(t,"Unexpected tag")}return null},t.prototype.visitExpansion=function(t,e){var n={};return ee(this,t.cases).forEach(function(e){n[e.value]=new pi(e.nodes,t.sourceSpan)}),new di(t.switchValue,t.type,n,t.sourceSpan)},t.prototype.visitExpansionCase=function(t,e){return{value:t.value,nodes:[].concat.apply([],ee(this,t.expression))}},t.prototype.visitComment=function(t,e){},t.prototype.visitAttribute=function(t,e){},t.prototype._addError=function(t,e){this._errors.push(new Oi(t.sourceSpan,e))},t}();var so="messagebundle",lo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.write=function(t,e){var n=new po,r=new co,i=new Yi(so);return t.forEach(function(t){var e={id:t.id};t.description&&(e.desc=t.description),t.meaning&&(e.meaning=t.meaning);var n=[];t.sources.forEach(function(t){n.push(new Yi("source",{},[new $i(t.filePath+":"+t.startLine+(t.endLine!==t.startLine?","+t.endLine:""))]))}),i.children.push(new Ki(2),new Yi("msg",e,n.concat(r.serialize(t.nodes))))}),i.children.push(new Ki),Gi([new Wi({version:"1.0",encoding:"UTF-8"}),new Ki,new qi(so,'<!ELEMENT messagebundle (msg)*>\n<!ATTLIST messagebundle class CDATA #IMPLIED>\n\n<!ELEMENT msg (#PCDATA|ph|source)*>\n<!ATTLIST msg id CDATA #IMPLIED>\n<!ATTLIST msg seq CDATA #IMPLIED>\n<!ATTLIST msg name CDATA #IMPLIED>\n<!ATTLIST msg desc CDATA #IMPLIED>\n<!ATTLIST msg meaning CDATA #IMPLIED>\n<!ATTLIST msg obsolete (obsolete) #IMPLIED>\n<!ATTLIST msg xml:space (default|preserve) "default">\n<!ATTLIST msg is_hidden CDATA #IMPLIED>\n\n<!ELEMENT source (#PCDATA)>\n\n<!ELEMENT ph (#PCDATA|ex)*>\n<!ATTLIST ph name CDATA #REQUIRED>\n\n<!ELEMENT ex (#PCDATA)>'),new Ki,n.addDefaultExamples(i),new Ki])},e.prototype.load=function(t,e){throw new Error("Unsupported")},e.prototype.digest=function(t){return uo(t)},e.prototype.createNameMapper=function(t){return new Hi(t,ho)},e}(Ui),co=function(){function t(){}return t.prototype.visitText=function(t,e){return[new $i(t.value)]},t.prototype.visitContainer=function(t,e){var n=this,r=[];return t.children.forEach(function(t){return r.push.apply(r,t.visit(n))}),r},t.prototype.visitIcu=function(t,e){var n=this,r=[new $i("{"+t.expressionPlaceholder+", "+t.type+", ")];return Object.keys(t.cases).forEach(function(e){r.push.apply(r,[new $i(e+" {")].concat(t.cases[e].visit(n),[new $i("} ")]))}),r.push(new $i("}")),r},t.prototype.visitTagPlaceholder=function(t,e){var n=new Yi("ex",{},[new $i("<"+t.tag+">")]),r=new Yi("ph",{name:t.startName},[n]);if(t.isVoid)return[r];var i=new Yi("ex",{},[new $i("</"+t.tag+">")]),o=new Yi("ph",{name:t.closeName},[i]);return[r].concat(this.serialize(t.children),[o])},t.prototype.visitPlaceholder=function(t,e){var n=new Yi("ex",{},[new $i("{{"+t.value+"}}")]);return[new Yi("ph",{name:t.name},[n])]},t.prototype.visitIcuPlaceholder=function(t,e){var n=new Yi("ex",{},[new $i("{"+t.value.expression+", "+t.value.type+", "+Object.keys(t.value.cases).map(function(t){return t+" {...}"}).join(" ")+"}")]);return[new Yi("ph",{name:t.name},[n])]},t.prototype.serialize=function(t){var e=this;return[].concat.apply([],t.map(function(t){return t.visit(e)}))},t}();function uo(t){return Wr(t)}var po=function(){function t(){}return t.prototype.addDefaultExamples=function(t){return t.visit(this),t},t.prototype.visitTag=function(t){var e=this;if("ph"===t.name){if(!t.children||0==t.children.length){var n=new $i(t.attrs.name||"...");t.children=[new Yi("ex",{},[n])]}}else t.children&&t.children.forEach(function(t){return t.visit(e)})},t.prototype.visitText=function(t){},t.prototype.visitDeclaration=function(t){},t.prototype.visitDoctype=function(t){},t}();function ho(t){return t.toUpperCase().replace(/[^A-Z0-9_]/g,"_")}var fo="translationbundle",mo="translation",go=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.write=function(t,e){throw new Error("Unsupported")},e.prototype.load=function(t,e){var n=(new yo).parse(t,e),r=n.locale,i=n.msgIdToHtml,o=n.errors,a={},s=new vo;if(Object.keys(i).forEach(function(t){var n,r,o;n=a,r=t,o=function(){var n=s.convert(i[t],e),r=n.i18nNodes,o=n.errors;if(o.length)throw new Error("xtb parse errors:\n"+o.join("\n"));return r},Object.defineProperty(n,r,{configurable:!0,enumerable:!0,get:function(){var t=o();return Object.defineProperty(n,r,{enumerable:!0,value:t}),t},set:function(t){throw new Error("Could not overwrite an XTB translation")}})}),o.length)throw new Error("xtb parse errors:\n"+o.join("\n"));return{locale:r,i18nNodesByMsgId:a}},e.prototype.digest=function(t){return uo(t)},e.prototype.createNameMapper=function(t){return new Hi(t,ho)},e}(Ui);var yo=function(){function t(){this._locale=null}return t.prototype.parse=function(t,e){this._bundleDepth=0,this._msgIdToHtml={};var n=(new Bi).parse(t,e,!1);return this._errors=n.errors,ee(this,n.rootNodes),{msgIdToHtml:this._msgIdToHtml,errors:this._errors,locale:this._locale}},t.prototype.visitElement=function(t,e){switch(t.name){case fo:this._bundleDepth++,this._bundleDepth>1&&this._addError(t,"<"+fo+"> elements can not be nested");var n=t.attrs.find(function(t){return"lang"===t.name});n&&(this._locale=n.value),ee(this,t.children,null),this._bundleDepth--;break;case mo:var r=t.attrs.find(function(t){return"id"===t.name});if(r){var i=r.value;if(this._msgIdToHtml.hasOwnProperty(i))this._addError(t,"Duplicated translations for msg "+i);else{var o=t.startSourceSpan.end.offset,a=t.endSourceSpan.start.offset,s=t.startSourceSpan.start.file.content.slice(o,a);this._msgIdToHtml[i]=s}}else this._addError(t,"<"+mo+'> misses the "id" attribute');break;default:this._addError(t,"Unexpected tag")}},t.prototype.visitAttribute=function(t,e){},t.prototype.visitText=function(t,e){},t.prototype.visitComment=function(t,e){},t.prototype.visitExpansion=function(t,e){},t.prototype.visitExpansionCase=function(t,e){},t.prototype._addError=function(t,e){this._errors.push(new Oi(t.sourceSpan,e))},t}(),vo=function(){function t(){}return t.prototype.convert=function(t,e){var n=(new Bi).parse(t,e,!0);return this._errors=n.errors,{i18nNodes:this._errors.length>0||0==n.rootNodes.length?[]:ee(this,n.rootNodes),errors:this._errors}},t.prototype.visitText=function(t,e){return new ui(t.value,t.sourceSpan)},t.prototype.visitExpansion=function(t,e){var n={};return ee(this,t.cases).forEach(function(e){n[e.value]=new pi(e.nodes,t.sourceSpan)}),new di(t.switchValue,t.type,n,t.sourceSpan)},t.prototype.visitExpansionCase=function(t,e){return{value:t.value,nodes:ee(this,t.expression)}},t.prototype.visitElement=function(t,e){if("ph"===t.name){var n=t.attrs.find(function(t){return"name"===t.name});if(n)return new fi("",n.value,t.sourceSpan);this._addError(t,'<ph> misses the "name" attribute')}else this._addError(t,"Unexpected tag");return null},t.prototype.visitComment=function(t,e){},t.prototype.visitAttribute=function(t,e){},t.prototype._addError=function(t,e){this._errors.push(new Oi(t.sourceSpan,e))},t}(),bo=function(t){function e(){return t.call(this,wi)||this}return n(e,t),e.prototype.parse=function(e,n,r,i){return void 0===r&&(r=!1),void 0===i&&(i=se),t.prototype.parse.call(this,e,n,r,i)},e}(Ur),_o=function(){function t(t,e,n,r,i,o){void 0===t&&(t={}),void 0===i&&(i=D.Warning),this._i18nNodesByMsgId=t,this.digest=n,this.mapperFactory=r,this._i18nToHtml=new wo(t,e,n,r,i,o)}return t.load=function(e,n,r,i,o){var a=r.load(e,n),s=a.locale;return new t(a.i18nNodesByMsgId,s,function(t){return r.digest(t)},function(t){return r.createNameMapper(t)},i,o)},t.prototype.get=function(t){var e=this._i18nToHtml.convert(t);if(e.errors.length)throw new Error(e.errors.join("\n"));return e.nodes},t.prototype.has=function(t){return this.digest(t)in this._i18nNodesByMsgId},t}(),wo=function(){function t(t,e,n,r,i,o){void 0===t&&(t={}),this._i18nNodesByMsgId=t,this._locale=e,this._digest=n,this._mapperFactory=r,this._missingTranslationStrategy=i,this._console=o,this._contextStack=[],this._errors=[]}return t.prototype.convert=function(t){this._contextStack.length=0,this._errors.length=0;var e=this._convertToText(t),n=t.nodes[0].sourceSpan.start.file.url,r=(new bo).parse(e,n,!0);return{nodes:r.rootNodes,errors:this._errors.concat(r.errors)}},t.prototype.visitText=function(t,e){return t.value},t.prototype.visitContainer=function(t,e){var n=this;return t.children.map(function(t){return t.visit(n)}).join("")},t.prototype.visitIcu=function(t,e){var n=this,r=Object.keys(t.cases).map(function(e){return e+" {"+t.cases[e].visit(n)+"}"});return"{"+(this._srcMsg.placeholders.hasOwnProperty(t.expression)?this._srcMsg.placeholders[t.expression]:t.expression)+", "+t.type+", "+r.join(" ")+"}"},t.prototype.visitPlaceholder=function(t,e){var n=this._mapper(t.name);return this._srcMsg.placeholders.hasOwnProperty(n)?this._srcMsg.placeholders[n]:this._srcMsg.placeholderToMessage.hasOwnProperty(n)?this._convertToText(this._srcMsg.placeholderToMessage[n]):(this._addError(t,'Unknown placeholder "'+t.name+'"'),"")},t.prototype.visitTagPlaceholder=function(t,e){var n=this,r=""+t.tag,i=Object.keys(t.attrs).map(function(e){return e+'="'+t.attrs[e]+'"'}).join(" ");return t.isVoid?"<"+r+" "+i+"/>":"<"+r+" "+i+">"+t.children.map(function(t){return t.visit(n)}).join("")+"</"+r+">"},t.prototype.visitIcuPlaceholder=function(t,e){return this._convertToText(this._srcMsg.placeholderToMessage[t.name])},t.prototype._convertToText=function(t){var e,n=this,r=this._digest(t),i=this._mapperFactory?this._mapperFactory(t):null;if(this._contextStack.push({msg:this._srcMsg,mapper:this._mapper}),this._srcMsg=t,this._i18nNodesByMsgId.hasOwnProperty(r))e=this._i18nNodesByMsgId[r],this._mapper=function(t){return i?i.toInternalName(t):t};else{if(this._missingTranslationStrategy===D.Error){var o=this._locale?' for locale "'+this._locale+'"':"";this._addError(t.nodes[0],'Missing translation for message "'+r+'"'+o)}else if(this._console&&this._missingTranslationStrategy===D.Warning){o=this._locale?' for locale "'+this._locale+'"':"";this._console.warn('Missing translation for message "'+r+'"'+o)}e=t.nodes,this._mapper=function(t){return t}}var a=e.map(function(t){return t.visit(n)}).join(""),s=this._contextStack.pop();return this._srcMsg=s.msg,this._mapper=s.mapper,a},t.prototype._addError=function(t,e){this._errors.push(new Oi(t.sourceSpan,e))},t}(),Co=function(){function t(t,e,n,r,i){if(void 0===r&&(r=D.Warning),this._htmlParser=t,e){var o=function(t){switch(t=(t||"xlf").toLowerCase()){case"xmb":return new lo;case"xtb":return new go;case"xliff2":case"xlf2":return new ro;case"xliff":case"xlf":default:return new Ji}}(n);this._translationBundle=_o.load(e,"i18n",o,r,i)}else this._translationBundle=new _o({},null,Gr,void 0,r,i)}return t.prototype.parse=function(t,e,n,r){void 0===n&&(n=!1),void 0===r&&(r=se);var i,o,a,s=this._htmlParser.parse(t,e,n,r);return s.errors.length?new Br(s.rootNodes,s.errors):(i=s.rootNodes,o=this._translationBundle,a=r,new Li([],{}).merge(i,o,a))},t}();var xo=/(\.ts|\.d\.ts|\.js|\.jsx|\.tsx)$/,So=/\.ngfactory\.|\.ngsummary\./,Eo=/\.ngsummary\./,ko=/NgSummary$/;function Oo(t,e){void 0===e&&(e=!1);var n=Ao(t,e);return n[0]+".ngfactory"+Do(n[1])}function Po(t){return t.replace(So,".")}function Ao(t,e){if(void 0===e&&(e=!1),t.endsWith(".d.ts"))return[t.slice(0,-5),e?".ts":".d.ts"];var n=t.lastIndexOf(".");return-1!==n?[t.substring(0,n),t.substring(n)]:[t,""]}function Do(t){return".tsx"===t?".ts":t}function To(t){return t.replace(xo,"")+".ngsummary.json"}function Mo(t,e){void 0===e&&(e=!1);var n=Ao(Po(t),e);return n[0]+".ngsummary"+n[1]}function Io(t){return t+"NgSummary"}var Ro=/\u0275\d+/;function No(t){return Ro.test(t)}var Lo="@angular/core",jo=function(){function t(){}return t.ANALYZE_FOR_ENTRY_COMPONENTS={name:"ANALYZE_FOR_ENTRY_COMPONENTS",moduleName:Lo},t.ElementRef={name:"ElementRef",moduleName:Lo},t.NgModuleRef={name:"NgModuleRef",moduleName:Lo},t.ViewContainerRef={name:"ViewContainerRef",moduleName:Lo},t.ChangeDetectorRef={name:"ChangeDetectorRef",moduleName:Lo},t.QueryList={name:"QueryList",moduleName:Lo},t.TemplateRef={name:"TemplateRef",moduleName:Lo},t.CodegenComponentFactoryResolver={name:"ɵCodegenComponentFactoryResolver",moduleName:Lo},t.ComponentFactoryResolver={name:"ComponentFactoryResolver",moduleName:Lo},t.ComponentFactory={name:"ComponentFactory",moduleName:Lo},t.ComponentRef={name:"ComponentRef",moduleName:Lo},t.NgModuleFactory={name:"NgModuleFactory",moduleName:Lo},t.createModuleFactory={name:"ɵcmf",moduleName:Lo},t.moduleDef={name:"ɵmod",moduleName:Lo},t.moduleProviderDef={name:"ɵmpd",moduleName:Lo},t.RegisterModuleFactoryFn={name:"ɵregisterModuleFactory",moduleName:Lo},t.Injector={name:"Injector",moduleName:Lo},t.ViewEncapsulation={name:"ViewEncapsulation",moduleName:Lo},t.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:Lo},t.SecurityContext={name:"SecurityContext",moduleName:Lo},t.LOCALE_ID={name:"LOCALE_ID",moduleName:Lo},t.TRANSLATIONS_FORMAT={name:"TRANSLATIONS_FORMAT",moduleName:Lo},t.inlineInterpolate={name:"ɵinlineInterpolate",moduleName:Lo},t.interpolate={name:"ɵinterpolate",moduleName:Lo},t.EMPTY_ARRAY={name:"ɵEMPTY_ARRAY",moduleName:Lo},t.EMPTY_MAP={name:"ɵEMPTY_MAP",moduleName:Lo},t.Renderer={name:"Renderer",moduleName:Lo},t.viewDef={name:"ɵvid",moduleName:Lo},t.elementDef={name:"ɵeld",moduleName:Lo},t.anchorDef={name:"ɵand",moduleName:Lo},t.textDef={name:"ɵted",moduleName:Lo},t.directiveDef={name:"ɵdid",moduleName:Lo},t.providerDef={name:"ɵprd",moduleName:Lo},t.queryDef={name:"ɵqud",moduleName:Lo},t.pureArrayDef={name:"ɵpad",moduleName:Lo},t.pureObjectDef={name:"ɵpod",moduleName:Lo},t.purePipeDef={name:"ɵppd",moduleName:Lo},t.pipeDef={name:"ɵpid",moduleName:Lo},t.nodeValue={name:"ɵnov",moduleName:Lo},t.ngContentDef={name:"ɵncd",moduleName:Lo},t.unwrapValue={name:"ɵunv",moduleName:Lo},t.createRendererType2={name:"ɵcrt",moduleName:Lo},t.RendererType2={name:"RendererType2",moduleName:Lo},t.ViewDefinition={name:"ɵViewDefinition",moduleName:Lo},t.createComponentFactory={name:"ɵccf",moduleName:Lo},t}();function Fo(t){return{identifier:{reference:t}}}function Vo(t,e){return Fo(t.resolveExternalReference(e))}var Bo={OnInit:0,OnDestroy:1,DoCheck:2,OnChanges:3,AfterContentInit:4,AfterContentChecked:5,AfterViewInit:6,AfterViewChecked:7};Bo[Bo.OnInit]="OnInit",Bo[Bo.OnDestroy]="OnDestroy",Bo[Bo.DoCheck]="DoCheck",Bo[Bo.OnChanges]="OnChanges",Bo[Bo.AfterContentInit]="AfterContentInit",Bo[Bo.AfterContentChecked]="AfterContentChecked",Bo[Bo.AfterViewInit]="AfterViewInit",Bo[Bo.AfterViewChecked]="AfterViewChecked";var Uo=[Bo.OnInit,Bo.OnDestroy,Bo.DoCheck,Bo.OnChanges,Bo.AfterContentInit,Bo.AfterContentChecked,Bo.AfterViewInit,Bo.AfterViewChecked];function Ho(t,e,n){return t.hasLifecycleHook(n,function(t){switch(t){case Bo.OnInit:return"ngOnInit";case Bo.OnDestroy:return"ngOnDestroy";case Bo.DoCheck:return"ngDoCheck";case Bo.OnChanges:return"ngOnChanges";case Bo.AfterContentInit:return"ngAfterContentInit";case Bo.AfterContentChecked:return"ngAfterContentChecked";case Bo.AfterViewInit:return"ngAfterViewInit";case Bo.AfterViewChecked:return"ngAfterViewChecked"}}(e))}var zo=new RegExp("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-.\\w*]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g"),Go=function(){function t(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return t.parse=function(e){var n,r=[],i=function(t,e){e.notSelectors.length>0&&!e.element&&0==e.classNames.length&&0==e.attrs.length&&(e.element="*"),t.push(e)},o=new t,a=o,s=!1;for(zo.lastIndex=0;n=zo.exec(e);){if(n[1]){if(s)throw new Error("Nesting :not is not allowed in a selector");s=!0,a=new t,o.notSelectors.push(a)}if(n[2]&&a.setElement(n[2]),n[3]&&a.addClassName(n[3]),n[4]&&a.addAttribute(n[4],n[6]),n[7]&&(s=!1,a=o),n[8]){if(s)throw new Error("Multiple selectors in :not are not supported");i(r,o),o=a=new t}}return i(r,o),r},t.prototype.isElementSelector=function(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length},t.prototype.hasElementSelector=function(){return!!this.element},t.prototype.setElement=function(t){void 0===t&&(t=null),this.element=t},t.prototype.getMatchingElementTemplate=function(){for(var t=this.element||"div",e=this.classNames.length>0?' class="'+this.classNames.join(" ")+'"':"",n="",r=0;r<this.attrs.length;r+=2){n+=" "+this.attrs[r]+(""!==this.attrs[r+1]?'="'+this.attrs[r+1]+'"':"")}return wi(t).isVoid?"<"+t+e+n+"/>":"<"+t+e+n+"></"+t+">"},t.prototype.addAttribute=function(t,e){void 0===e&&(e=""),this.attrs.push(t,e&&e.toLowerCase()||"")},t.prototype.addClassName=function(t){this.classNames.push(t.toLowerCase())},t.prototype.toString=function(){var t=this.element||"";if(this.classNames&&this.classNames.forEach(function(e){return t+="."+e}),this.attrs)for(var e=0;e<this.attrs.length;e+=2){var n=this.attrs[e],r=this.attrs[e+1];t+="["+n+(r?"="+r:"")+"]"}return this.notSelectors.forEach(function(e){return t+=":not("+e+")"}),t},t}(),Wo=function(){function t(){this._elementMap=new Map,this._elementPartialMap=new Map,this._classMap=new Map,this._classPartialMap=new Map,this._attrValueMap=new Map,this._attrValuePartialMap=new Map,this._listContexts=[]}return t.createNotMatcher=function(e){var n=new t;return n.addSelectables(e,null),n},t.prototype.addSelectables=function(t,e){var n=null;t.length>1&&(n=new qo(t),this._listContexts.push(n));for(var r=0;r<t.length;r++)this._addSelectable(t[r],e,n)},t.prototype._addSelectable=function(t,e,n){var r=this,i=t.element,o=t.classNames,a=t.attrs,s=new Yo(t,e,n);i&&((c=0===a.length&&0===o.length)?this._addTerminal(r._elementMap,i,s):r=this._addPartial(r._elementPartialMap,i));if(o)for(var l=0;l<o.length;l++){var c=0===a.length&&l===o.length-1,u=o[l];c?this._addTerminal(r._classMap,u,s):r=this._addPartial(r._classPartialMap,u)}if(a)for(l=0;l<a.length;l+=2){c=l===a.length-2;var p=a[l],d=a[l+1];if(c){var h=r._attrValueMap,f=h.get(p);f||(f=new Map,h.set(p,f)),this._addTerminal(f,d,s)}else{var m=r._attrValuePartialMap,g=m.get(p);g||(g=new Map,m.set(p,g)),r=this._addPartial(g,d)}}},t.prototype._addTerminal=function(t,e,n){var r=t.get(e);r||(r=[],t.set(e,r)),r.push(n)},t.prototype._addPartial=function(e,n){var r=e.get(n);return r||(r=new t,e.set(n,r)),r},t.prototype.match=function(t,e){for(var n=!1,r=t.element,i=t.classNames,o=t.attrs,a=0;a<this._listContexts.length;a++)this._listContexts[a].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,r,t,e)||n,n=this._matchPartial(this._elementPartialMap,r,t,e)||n,i)for(a=0;a<i.length;a++){var s=i[a];n=this._matchTerminal(this._classMap,s,t,e)||n,n=this._matchPartial(this._classPartialMap,s,t,e)||n}if(o)for(a=0;a<o.length;a+=2){var l=o[a],c=o[a+1],u=this._attrValueMap.get(l);c&&(n=this._matchTerminal(u,"",t,e)||n),n=this._matchTerminal(u,c,t,e)||n;var p=this._attrValuePartialMap.get(l);c&&(n=this._matchPartial(p,"",t,e)||n),n=this._matchPartial(p,c,t,e)||n}return n},t.prototype._matchTerminal=function(t,e,n,r){if(!t||"string"!=typeof e)return!1;var i=t.get(e)||[],o=t.get("*");if(o&&(i=i.concat(o)),0===i.length)return!1;for(var a=!1,s=0;s<i.length;s++)a=i[s].finalize(n,r)||a;return a},t.prototype._matchPartial=function(t,e,n,r){if(!t||"string"!=typeof e)return!1;var i=t.get(e);return!!i&&i.match(n,r)},t}(),qo=function(t){this.selectors=t,this.alreadyMatched=!1},Yo=function(){function t(t,e,n){this.selector=t,this.cbContext=e,this.listContext=n,this.notSelectors=t.notSelectors}return t.prototype.finalize=function(t,e){var n=!0;!(this.notSelectors.length>0)||this.listContext&&this.listContext.alreadyMatched||(n=!Wo.createNotMatcher(this.notSelectors).match(t,null));return!n||!e||this.listContext&&this.listContext.alreadyMatched||(this.listContext&&(this.listContext.alreadyMatched=!0),e(this.selector,this.cbContext)),n},t}(),$o="ngComponentType",Ko=function(){function t(t,e,n,r,i,o,a,s,l,c,u,p){this._config=t,this._htmlParser=e,this._ngModuleResolver=n,this._directiveResolver=r,this._pipeResolver=i,this._summaryResolver=o,this._schemaRegistry=a,this._directiveNormalizer=s,this._console=l,this._staticSymbolCache=c,this._reflector=u,this._errorCollector=p,this._nonNormalizedDirectiveCache=new Map,this._directiveCache=new Map,this._summaryCache=new Map,this._pipeCache=new Map,this._ngModuleCache=new Map,this._ngModuleOfTypes=new Map}return t.prototype.getReflector=function(){return this._reflector},t.prototype.clearCacheFor=function(t){var e=this._directiveCache.get(t);this._directiveCache.delete(t),this._nonNormalizedDirectiveCache.delete(t),this._summaryCache.delete(t),this._pipeCache.delete(t),this._ngModuleOfTypes.delete(t),this._ngModuleCache.clear(),e&&this._directiveNormalizer.clearCacheFor(e)},t.prototype.clearCache=function(){this._directiveCache.clear(),this._nonNormalizedDirectiveCache.clear(),this._summaryCache.clear(),this._pipeCache.clear(),this._ngModuleCache.clear(),this._ngModuleOfTypes.clear(),this._directiveNormalizer.clearCache()},t.prototype._createProxyClass=function(t,e){var n=null,r=function(){if(!n)throw new Error("Illegal state: Class "+e+" for type "+K(t)+" is not compiled yet!");return n.apply(this,arguments)};return r.setDelegate=function(t){n=t,r.prototype=t.prototype},r.overriddenName=e,r},t.prototype.getGeneratedClass=function(t,e){return t instanceof _t?this._staticSymbolCache.get(Oo(t.filePath),e):this._createProxyClass(t,e)},t.prototype.getComponentViewClass=function(t){return this.getGeneratedClass(t,Ot(t,0))},t.prototype.getHostComponentViewClass=function(t){return this.getGeneratedClass(t,At(t))},t.prototype.getHostComponentType=function(t){var e=Et({reference:t})+"_Host";if(t instanceof _t)return this._staticSymbolCache.get(t.filePath,e);var n=function(){};return n.overriddenName=e,n},t.prototype.getRendererType=function(t){return t instanceof _t?this._staticSymbolCache.get(Oo(t.filePath),Pt(t)):{}},t.prototype.getComponentFactory=function(t,e,n,r){if(e instanceof _t)return this._staticSymbolCache.get(Oo(e.filePath),Dt(e));var i=this.getHostComponentViewClass(e);return this._reflector.resolveExternalReference(jo.createComponentFactory)(t,e,i,n,r,[])},t.prototype.initComponentFactory=function(t,e){var n;t instanceof _t||(n=t.ngContentSelectors).push.apply(n,e)},t.prototype._loadSummary=function(t,e){var n=this._summaryCache.get(t);if(!n){var r=this._summaryResolver.resolveSummary(t);n=r?r.type:null,this._summaryCache.set(t,n||null)}return n&&n.summaryKind===e?n:null},t.prototype.getHostComponentMetadata=function(t,e){var n=this.getHostComponentType(t.type.reference);e||(e=this.getHostComponentViewClass(n));var r=Go.parse(t.selector)[0].getMatchingElementTemplate(),i=this._htmlParser.parse(r,"");return Lt.create({isHost:!0,type:{reference:n,diDeps:[],lifecycleHooks:[]},template:new Nt({encapsulation:d.None,template:r,templateUrl:"",htmlAst:i,styles:[],styleUrls:[],ngContentSelectors:[],animations:[],isInline:!0,externalStylesheets:[],interpolation:null,preserveWhitespaces:!1}),exportAs:null,changeDetection:h.Default,inputs:[],outputs:[],host:{},isComponent:!0,selector:"*",providers:[],viewProviders:[],queries:[],guards:{},viewQueries:[],componentViewType:e,rendererType:{id:"__Host__",encapsulation:d.None,styles:[],data:{}},entryComponents:[],componentFactory:null})},t.prototype.loadDirectiveMetadata=function(t,e,n){var r=this;if(this._directiveCache.has(e))return null;e=Q(e);var i,o,a=this.getNonNormalizedDirectiveMetadata(e),s=a.annotation,l=a.metadata,c=function(t){var n=new Lt({isHost:!1,type:l.type,isComponent:l.isComponent,selector:l.selector,exportAs:l.exportAs,changeDetection:l.changeDetection,inputs:l.inputs,outputs:l.outputs,hostListeners:l.hostListeners,hostProperties:l.hostProperties,hostAttributes:l.hostAttributes,providers:l.providers,viewProviders:l.viewProviders,queries:l.queries,guards:l.guards,viewQueries:l.viewQueries,entryComponents:l.entryComponents,componentViewType:l.componentViewType,rendererType:l.rendererType,componentFactory:l.componentFactory,template:t});return t&&r.initComponentFactory(l.componentFactory,t.ngContentSelectors),r._directiveCache.set(e,n),r._summaryCache.set(e,n.toSummary()),null};if(l.isComponent){var u=l.template,p=this._directiveNormalizer.normalizeTemplate({ngModuleType:t,componentType:e,moduleUrl:this._reflector.componentModuleUrl(e,s),encapsulation:u.encapsulation,template:u.template,templateUrl:u.templateUrl,styles:u.styles,styleUrls:u.styleUrls,animations:u.animations,interpolation:u.interpolation,preserveWhitespaces:u.preserveWhitespaces});return X(p)&&n?(this._reportError((i=e,(o=Error("Can't compile synchronously as "+K(i)+" is still being loaded!"))[$o]=i,o),e),null):U(p,c)}return c(null),null},t.prototype.getNonNormalizedDirectiveMetadata=function(t){var e=this;if(!(t=Q(t)))return null;var n=this._nonNormalizedDirectiveCache.get(t);if(n)return n;var r=this._directiveResolver.resolve(t,!1);if(!r)return null;var i=void 0;if(f.isTypeOf(r)){re("styles",(a=r).styles),re("styleUrls",a.styleUrls),oe("interpolation",a.interpolation);var o=a.animations;i=new Nt({encapsulation:F(a.encapsulation),template:F(a.template),templateUrl:F(a.templateUrl),htmlAst:null,styles:a.styles||[],styleUrls:a.styleUrls||[],animations:o||[],interpolation:F(a.interpolation),isInline:!!a.template,externalStylesheets:[],ngContentSelectors:[],preserveWhitespaces:F(r.preserveWhitespaces)})}var a,s=null,l=[],c=[],u=r.selector;f.isTypeOf(r)?(s=(a=r).changeDetection,a.viewProviders&&(l=this._getProvidersMetadata(a.viewProviders,c,'viewProviders for "'+Jo(t)+'"',[],t)),a.entryComponents&&(c=Qo(a.entryComponents).map(function(t){return e._getEntryComponentMetadata(t)}).concat(c)),u||(u=this._schemaRegistry.getDefaultComponentElementName())):u||(this._reportError(z("Directive "+Jo(t)+" has no selector, please add it!"),t),u="error");var p=[];null!=r.providers&&(p=this._getProvidersMetadata(r.providers,c,'providers for "'+Jo(t)+'"',[],t));var d=[],h=[];null!=r.queries&&(d=this._getQueriesMetadata(r.queries,!1,t),h=this._getQueriesMetadata(r.queries,!0,t));var m=Lt.create({isHost:!1,selector:u,exportAs:F(r.exportAs),isComponent:!!i,type:this._getTypeMetadata(t),template:i,changeDetection:s,inputs:r.inputs||[],outputs:r.outputs||[],host:r.host||{},providers:p||[],viewProviders:l||[],queries:d||[],guards:r.guards||{},viewQueries:h||[],entryComponents:c,componentViewType:i?this.getComponentViewClass(t):null,rendererType:i?this.getRendererType(t):null,componentFactory:null});return i&&(m.componentFactory=this.getComponentFactory(u,t,m.inputs,m.outputs)),n={metadata:m,annotation:r},this._nonNormalizedDirectiveCache.set(t,n),n},t.prototype.getDirectiveMetadata=function(t){var e=this._directiveCache.get(t);return e||this._reportError(z("Illegal state: getDirectiveMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Directive "+Jo(t)+"."),t),e},t.prototype.getDirectiveSummary=function(t){var e=this._loadSummary(t,Tt.Directive);return e||this._reportError(z("Illegal state: Could not load the summary for directive "+Jo(t)+"."),t),e},t.prototype.isDirective=function(t){return!!this._loadSummary(t,Tt.Directive)||this._directiveResolver.isDirective(t)},t.prototype.isPipe=function(t){return!!this._loadSummary(t,Tt.Pipe)||this._pipeResolver.isPipe(t)},t.prototype.isNgModule=function(t){return!!this._loadSummary(t,Tt.NgModule)||this._ngModuleResolver.isNgModule(t)},t.prototype.getNgModuleSummary=function(t,e){void 0===e&&(e=null);var n=this._loadSummary(t,Tt.NgModule);if(!n){var r=this.getNgModuleMetadata(t,!1,e);(n=r?r.toSummary():null)&&this._summaryCache.set(t,n)}return n},t.prototype.loadNgModuleDirectiveAndPipeMetadata=function(t,e,n){var r=this;void 0===n&&(n=!0);var i=this.getNgModuleMetadata(t,n),o=[];return i&&(i.declaredDirectives.forEach(function(n){var i=r.loadDirectiveMetadata(t,n.reference,e);i&&o.push(i)}),i.declaredPipes.forEach(function(t){return r._loadPipeMetadata(t.reference)})),Promise.all(o)},t.prototype.getNgModuleMetadata=function(t,e,n){var r=this;void 0===e&&(e=!0),void 0===n&&(n=null),t=Q(t);var i=this._ngModuleCache.get(t);if(i)return i;var o=this._ngModuleResolver.resolve(t,e);if(!o)return null;var a=[],s=[],l=[],c=[],u=[],p=[],d=[],h=[],f=[];o.imports&&Qo(o.imports).forEach(function(e){var i=void 0;if(Xo(e))i=e;else if(e&&e.ngModule){var o=e;i=o.ngModule,o.providers&&p.push.apply(p,r._getProvidersMetadata(o.providers,d,"provider for the NgModule '"+Jo(i)+"'",[],e))}if(i){if(!r._checkSelfImport(t,i))if(n||(n=new Set),n.has(i))r._reportError(z(r._getTypeDescriptor(i)+" '"+Jo(e)+"' is imported recursively by the module '"+Jo(t)+"'."),t);else{n.add(i);var a=r.getNgModuleSummary(i,n);n.delete(i),a?c.push(a):r._reportError(z("Unexpected "+r._getTypeDescriptor(e)+" '"+Jo(e)+"' imported by the module '"+Jo(t)+"'. Please add a @NgModule annotation."),t)}}else r._reportError(z("Unexpected value '"+Jo(e)+"' imported by the module '"+Jo(t)+"'"),t)}),o.exports&&Qo(o.exports).forEach(function(e){if(Xo(e))if(n||(n=new Set),n.has(e))r._reportError(z(r._getTypeDescriptor(e)+" '"+K(e)+"' is exported recursively by the module '"+Jo(t)+"'"),t);else{n.add(e);var i=r.getNgModuleSummary(e,n);n.delete(e),i?u.push(i):s.push(r._getIdentifierMetadata(e))}else r._reportError(z("Unexpected value '"+Jo(e)+"' exported by the module '"+Jo(t)+"'"),t)});var m=this._getTransitiveNgModuleMetadata(c,u);o.declarations&&Qo(o.declarations).forEach(function(e){if(Xo(e)){var n=r._getIdentifierMetadata(e);if(r.isDirective(e))m.addDirective(n),a.push(n),r._addTypeToModule(e,t);else{if(!r.isPipe(e))return void r._reportError(z("Unexpected "+r._getTypeDescriptor(e)+" '"+Jo(e)+"' declared by the module '"+Jo(t)+"'. Please add a @Pipe/@Directive/@Component annotation."),t);m.addPipe(n),m.pipes.push(n),l.push(n),r._addTypeToModule(e,t)}}else r._reportError(z("Unexpected value '"+Jo(e)+"' declared by the module '"+Jo(t)+"'"),t)});var g=[],y=[];return s.forEach(function(e){if(m.directivesSet.has(e.reference))g.push(e),m.addExportedDirective(e);else{if(!m.pipesSet.has(e.reference))return void r._reportError(z("Can't export "+r._getTypeDescriptor(e.reference)+" "+Jo(e.reference)+" from "+Jo(t)+" as it was neither declared nor imported!"),t);y.push(e),m.addExportedPipe(e)}}),o.providers&&p.push.apply(p,this._getProvidersMetadata(o.providers,d,"provider for the NgModule '"+Jo(t)+"'",[],t)),o.entryComponents&&d.push.apply(d,Qo(o.entryComponents).map(function(t){return r._getEntryComponentMetadata(t)})),o.bootstrap&&Qo(o.bootstrap).forEach(function(e){Xo(e)?h.push(r._getIdentifierMetadata(e)):r._reportError(z("Unexpected value '"+Jo(e)+"' used in the bootstrap property of module '"+Jo(t)+"'"),t)}),d.push.apply(d,h.map(function(t){return r._getEntryComponentMetadata(t.reference)})),o.schemas&&f.push.apply(f,Qo(o.schemas)),i=new Ft({type:this._getTypeMetadata(t),providers:p,entryComponents:d,bootstrapComponents:h,schemas:f,declaredDirectives:a,exportedDirectives:g,declaredPipes:l,exportedPipes:y,importedModules:c,exportedModules:u,transitiveModule:m,id:o.id||null}),d.forEach(function(t){return m.addEntryComponent(t)}),p.forEach(function(t){return m.addProvider(t,i.type)}),m.addModule(i.type),this._ngModuleCache.set(t,i),i},t.prototype._checkSelfImport=function(t,e){return t===e&&(this._reportError(z("'"+Jo(t)+"' module can't import itself"),t),!0)},t.prototype._getTypeDescriptor=function(t){if(Xo(t)){if(this.isDirective(t))return"directive";if(this.isPipe(t))return"pipe";if(this.isNgModule(t))return"module"}return t.provide?"provider":"value"},t.prototype._addTypeToModule=function(t,e){var n=this._ngModuleOfTypes.get(t);n&&n!==e?this._reportError(z("Type "+Jo(t)+" is part of the declarations of 2 modules: "+Jo(n)+" and "+Jo(e)+"! Please consider moving "+Jo(t)+" to a higher module that imports "+Jo(n)+" and "+Jo(e)+". You can also create a new NgModule that exports and includes "+Jo(t)+" then import that NgModule in "+Jo(n)+" and "+Jo(e)+"."),e):this._ngModuleOfTypes.set(t,e)},t.prototype._getTransitiveNgModuleMetadata=function(t,e){var n=new Vt,r=new Map;return t.concat(e).forEach(function(t){t.modules.forEach(function(t){return n.addModule(t)}),t.entryComponents.forEach(function(t){return n.addEntryComponent(t)});var e=new Set;t.providers.forEach(function(t){var i=It(t.provider.token),o=r.get(i);o||(o=new Set,r.set(i,o));var a=t.module.reference;!e.has(i)&&o.has(a)||(o.add(a),e.add(i),n.addProvider(t.provider,t.module))})}),e.forEach(function(t){t.exportedDirectives.forEach(function(t){return n.addExportedDirective(t)}),t.exportedPipes.forEach(function(t){return n.addExportedPipe(t)})}),t.forEach(function(t){t.exportedDirectives.forEach(function(t){return n.addDirective(t)}),t.exportedPipes.forEach(function(t){return n.addPipe(t)})}),n},t.prototype._getIdentifierMetadata=function(t){return{reference:t=Q(t)}},t.prototype.isInjectable=function(t){return this._reflector.annotations(t).some(function(t){return S.isTypeOf(t)})},t.prototype.getInjectableSummary=function(t){return{summaryKind:Tt.Injectable,type:this._getTypeMetadata(t,null,!1)}},t.prototype._getInjectableMetadata=function(t,e){void 0===e&&(e=null);var n=this._loadSummary(t,Tt.Injectable);return n?n.type:this._getTypeMetadata(t,e)},t.prototype._getTypeMetadata=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!0);var r,i,o=this._getIdentifierMetadata(t);return{reference:o.reference,diDeps:this._getDependenciesMetadata(o.reference,e,n),lifecycleHooks:(r=this._reflector,i=o.reference,Uo.filter(function(t){return Ho(r,t,i)}))}},t.prototype._getFactoryMetadata=function(t,e){return void 0===e&&(e=null),{reference:t=Q(t),diDeps:this._getDependenciesMetadata(t,e)}},t.prototype.getPipeMetadata=function(t){var e=this._pipeCache.get(t);return e||this._reportError(z("Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe "+Jo(t)+"."),t),e||null},t.prototype.getPipeSummary=function(t){var e=this._loadSummary(t,Tt.Pipe);return e||this._reportError(z("Illegal state: Could not load the summary for pipe "+Jo(t)+"."),t),e},t.prototype.getOrLoadPipeMetadata=function(t){var e=this._pipeCache.get(t);return e||(e=this._loadPipeMetadata(t)),e},t.prototype._loadPipeMetadata=function(t){t=Q(t);var e=this._pipeResolver.resolve(t),n=new jt({type:this._getTypeMetadata(t),name:e.name,pure:!!e.pure});return this._pipeCache.set(t,n),this._summaryCache.set(t,n.toSummary()),n},t.prototype._getDependenciesMetadata=function(t,e,n){var r=this;void 0===n&&(n=!0);var s=!1,l=(e||this._reflector.parameters(t)||[]).map(function(t){var e=!1,n=!1,l=!1,c=!1,u=!1,p=null;return Array.isArray(t)?t.forEach(function(t){O.isTypeOf(t)?n=!0:E.isTypeOf(t)?l=!0:k.isTypeOf(t)?c=!0:x.isTypeOf(t)?u=!0:a.isTypeOf(t)?(e=!0,p=t.attributeName):i.isTypeOf(t)?p=t.token:o.isTypeOf(t)||t instanceof _t?p=t:Xo(t)&&null==p&&(p=t)}):p=t,null==p?(s=!0,null):{isAttribute:e,isHost:n,isSelf:l,isSkipSelf:c,isOptional:u,token:r._getTokenMetadata(p)}});if(s){var c=l.map(function(t){return t?Jo(t.token):"?"}).join(", "),u="Can't resolve all parameters for "+Jo(t)+": ("+c+").";n||this._config.strictInjectionParameters?this._reportError(z(u),t):this._console.warn("Warning: "+u+" This will become an error in Angular v6.x")}return l},t.prototype._getTokenMetadata=function(t){return"string"==typeof(t=Q(t))?{value:t}:{identifier:{reference:t}}},t.prototype._getProvidersMetadata=function(t,e,n,r,i){var o=this;return void 0===r&&(r=[]),t.forEach(function(a,s){if(Array.isArray(a))o._getProvidersMetadata(a,e,n,r);else{var l=void 0;if((a=Q(a))&&"object"==typeof a&&a.hasOwnProperty("provide"))o._validateProvider(a),l=new Ut(a.provide,a);else{if(!Xo(a)){if(void 0===a)return void o._reportError(z("Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files."));var c=t.reduce(function(t,e,n){return n<s?t.push(""+Jo(e)):n==s?t.push("?"+Jo(e)+"?"):n==s+1&&t.push("..."),t},[]).join(", ");return void o._reportError(z("Invalid "+(n||"provider")+" - only instances of Provider and Type are allowed, got: ["+c+"]"),i)}l=new Ut(a,{useClass:a})}l.token===o._reflector.resolveExternalReference(jo.ANALYZE_FOR_ENTRY_COMPONENTS)?e.push.apply(e,o._getEntryComponentsFromProvider(l,i)):r.push(o.getProviderMetadata(l))}}),r},t.prototype._validateProvider=function(t){t.hasOwnProperty("useClass")&&null==t.useClass&&this._reportError(z("Invalid provider for "+Jo(t.provide)+". useClass cannot be "+t.useClass+".\n           Usually it happens when:\n           1. There's a circular dependency (might be caused by using index.ts (barrel) files).\n           2. Class was used before it was declared. Use forwardRef in this case."))},t.prototype._getEntryComponentsFromProvider=function(t,e){var n,r,i=this,o=[],a=[];return t.useFactory||t.useExisting||t.useClass?(this._reportError(z("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!"),e),[]):t.multi?(n=t.useValue,r=a,L(n,new Zo,r),a.forEach(function(t){var e=i._getEntryComponentMetadata(t.reference,!1);e&&o.push(e)}),o):(this._reportError(z("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!"),e),[])},t.prototype._getEntryComponentMetadata=function(t,e){void 0===e&&(e=!0);var n=this.getNonNormalizedDirectiveMetadata(t);if(n&&n.metadata.isComponent)return{componentType:t,componentFactory:n.metadata.componentFactory};var r=this._loadSummary(t,Tt.Directive);if(r&&r.isComponent)return{componentType:t,componentFactory:r.componentFactory};if(e)throw z(t.name+" cannot be used as an entry component.");return null},t.prototype.getProviderMetadata=function(t){var e=void 0,n=null,r=null,i=this._getTokenMetadata(t.token);return t.useClass?(e=(n=this._getInjectableMetadata(t.useClass,t.dependencies)).diDeps,t.token===t.useClass&&(i={identifier:n})):t.useFactory&&(e=(r=this._getFactoryMetadata(t.useFactory,t.dependencies)).diDeps),{token:i,useClass:n,useValue:t.useValue,useFactory:r,useExisting:t.useExisting?this._getTokenMetadata(t.useExisting):void 0,deps:e,multi:t.multi}},t.prototype._getQueriesMetadata=function(t,e,n){var r=this,i=[];return Object.keys(t).forEach(function(o){var a=t[o];a.isViewQuery===e&&i.push(r._getQueryMetadata(a,o,n))}),i},t.prototype._queryVarBindings=function(t){return t.split(/\s*,\s*/)},t.prototype._getQueryMetadata=function(t,e,n){var r,i=this;return"string"==typeof t.selector?r=this._queryVarBindings(t.selector).map(function(t){return i._getTokenMetadata(t)}):t.selector?r=[this._getTokenMetadata(t.selector)]:(this._reportError(z("Can't construct a query for the property \""+e+'" of "'+Jo(n)+"\" since the query selector wasn't defined."),n),r=[]),{selectors:r,first:t.first,descendants:t.descendants,propertyName:e,read:t.read?this._getTokenMetadata(t.read):null}},t.prototype._reportError=function(t,e,n){if(!this._errorCollector)throw t;this._errorCollector(t,e),n&&this._errorCollector(t,n)},t}();function Qo(t){return(e=function t(e,n){if(void 0===n&&(n=[]),e)for(var r=0;r<e.length;r++){var i=Q(e[r]);Array.isArray(i)?t(i,n):n.push(i)}return n}(t))?Array.from(new Set(e)):[];var e}function Xo(t){return t instanceof _t||t instanceof P}var Zo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.visitOther=function(t,e){e.push({reference:t})},e}(V);function Jo(t){return t instanceof _t?t.name+" in "+t.filePath:K(t)}var ta={Const:0};ta[ta.Const]="Const";var ea=function(){function t(t){void 0===t&&(t=null),this.modifiers=t,t||(this.modifiers=[])}return t.prototype.hasModifier=function(t){return-1!==this.modifiers.indexOf(t)},t}(),na={Dynamic:0,Bool:1,String:2,Int:3,Number:4,Function:5,Inferred:6};na[na.Dynamic]="Dynamic",na[na.Bool]="Bool",na[na.String]="String",na[na.Int]="Int",na[na.Number]="Number",na[na.Function]="Function",na[na.Inferred]="Inferred";var ra=function(t){function e(e,n){void 0===n&&(n=null);var r=t.call(this,n)||this;return r.name=e,r}return n(e,t),e.prototype.visitType=function(t,e){return t.visitBuiltintType(this,e)},e}(ea),ia=function(t){function e(e,n){void 0===n&&(n=null);var r=t.call(this,n)||this;return r.value=e,r}return n(e,t),e.prototype.visitType=function(t,e){return t.visitExpressionType(this,e)},e}(ea),oa=function(t){function e(e,n){void 0===n&&(n=null);var r=t.call(this,n)||this;return r.of=e,r}return n(e,t),e.prototype.visitType=function(t,e){return t.visitArrayType(this,e)},e}(ea),aa=function(t){function e(e,n){void 0===n&&(n=null);var r=t.call(this,n)||this;return r.valueType=e||null,r}return n(e,t),e.prototype.visitType=function(t,e){return t.visitMapType(this,e)},e}(ea),sa=new ra(na.Dynamic),la=new ra(na.Inferred),ca=new ra(na.Bool),ua=(new ra(na.Int),new ra(na.Number),new ra(na.String),new ra(na.Function),{Equals:0,NotEquals:1,Identical:2,NotIdentical:3,Minus:4,Plus:5,Divide:6,Multiply:7,Modulo:8,And:9,Or:10,Lower:11,LowerEquals:12,Bigger:13,BiggerEquals:14});function pa(t,e){return null==t||null==e?t==e:t.isEquivalent(e)}function da(t,e){var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(!t[r].isEquivalent(e[r]))return!1;return!0}ua[ua.Equals]="Equals",ua[ua.NotEquals]="NotEquals",ua[ua.Identical]="Identical",ua[ua.NotIdentical]="NotIdentical",ua[ua.Minus]="Minus",ua[ua.Plus]="Plus",ua[ua.Divide]="Divide",ua[ua.Multiply]="Multiply",ua[ua.Modulo]="Modulo",ua[ua.And]="And",ua[ua.Or]="Or",ua[ua.Lower]="Lower",ua[ua.LowerEquals]="LowerEquals",ua[ua.Bigger]="Bigger",ua[ua.BiggerEquals]="BiggerEquals";var ha=function(){function t(t,e){this.type=t||null,this.sourceSpan=e||null}return t.prototype.prop=function(t,e){return new Ia(this,t,null,e)},t.prototype.key=function(t,e,n){return new Ra(this,t,e,n)},t.prototype.callMethod=function(t,e,n){return new _a(this,t,e,null,n)},t.prototype.callFn=function(t,e){return new wa(this,t,null,e)},t.prototype.instantiate=function(t,e,n){return new Ca(this,t,e,n)},t.prototype.conditional=function(t,e,n){return void 0===e&&(e=null),new ka(this,t,e,null,n)},t.prototype.equals=function(t,e){return new Ma(ua.Equals,this,t,null,e)},t.prototype.notEquals=function(t,e){return new Ma(ua.NotEquals,this,t,null,e)},t.prototype.identical=function(t,e){return new Ma(ua.Identical,this,t,null,e)},t.prototype.notIdentical=function(t,e){return new Ma(ua.NotIdentical,this,t,null,e)},t.prototype.minus=function(t,e){return new Ma(ua.Minus,this,t,null,e)},t.prototype.plus=function(t,e){return new Ma(ua.Plus,this,t,null,e)},t.prototype.divide=function(t,e){return new Ma(ua.Divide,this,t,null,e)},t.prototype.multiply=function(t,e){return new Ma(ua.Multiply,this,t,null,e)},t.prototype.modulo=function(t,e){return new Ma(ua.Modulo,this,t,null,e)},t.prototype.and=function(t,e){return new Ma(ua.And,this,t,null,e)},t.prototype.or=function(t,e){return new Ma(ua.Or,this,t,null,e)},t.prototype.lower=function(t,e){return new Ma(ua.Lower,this,t,null,e)},t.prototype.lowerEquals=function(t,e){return new Ma(ua.LowerEquals,this,t,null,e)},t.prototype.bigger=function(t,e){return new Ma(ua.Bigger,this,t,null,e)},t.prototype.biggerEquals=function(t,e){return new Ma(ua.BiggerEquals,this,t,null,e)},t.prototype.isBlank=function(t){return this.equals(Ba,t)},t.prototype.cast=function(t,e){return new Aa(this,t,e)},t.prototype.toStmt=function(){return new Wa(this,null)},t}(),fa={This:0,Super:1,CatchError:2,CatchStack:3};fa[fa.This]="This",fa[fa.Super]="Super",fa[fa.CatchError]="CatchError",fa[fa.CatchStack]="CatchStack";var ma=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return"string"==typeof e?(i.name=e,i.builtin=null):(i.name=null,i.builtin=e),i}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.name===t.name&&this.builtin===t.builtin},e.prototype.visitExpression=function(t,e){return t.visitReadVarExpr(this,e)},e.prototype.set=function(t){if(!this.name)throw new Error("Built in variable "+this.builtin+" can not be assigned to.");return new ga(this.name,t,null,this.sourceSpan)},e}(ha),ga=function(t){function e(e,n,r,i){var o=t.call(this,r||n.type,i)||this;return o.name=e,o.value=n,o}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.name===t.name&&this.value.isEquivalent(t.value)},e.prototype.visitExpression=function(t,e){return t.visitWriteVarExpr(this,e)},e.prototype.toDeclStmt=function(t,e){return new za(this.name,this.value,t,e,this.sourceSpan)},e}(ha),ya=function(t){function e(e,n,r,i,o){var a=t.call(this,i||r.type,o)||this;return a.receiver=e,a.index=n,a.value=r,a}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)&&this.value.isEquivalent(t.value)},e.prototype.visitExpression=function(t,e){return t.visitWriteKeyExpr(this,e)},e}(ha),va=function(t){function e(e,n,r,i,o){var a=t.call(this,i||r.type,o)||this;return a.receiver=e,a.name=n,a.value=r,a}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name&&this.value.isEquivalent(t.value)},e.prototype.visitExpression=function(t,e){return t.visitWritePropExpr(this,e)},e}(ha),ba={ConcatArray:0,SubscribeObservable:1,Bind:2};ba[ba.ConcatArray]="ConcatArray",ba[ba.SubscribeObservable]="SubscribeObservable",ba[ba.Bind]="Bind";var _a=function(t){function e(e,n,r,i,o){var a=t.call(this,i,o)||this;return a.receiver=e,a.args=r,"string"==typeof n?(a.name=n,a.builtin=null):(a.name=null,a.builtin=n),a}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name&&this.builtin===t.builtin&&da(this.args,t.args)},e.prototype.visitExpression=function(t,e){return t.visitInvokeMethodExpr(this,e)},e}(ha),wa=function(t){function e(e,n,r,i){var o=t.call(this,r,i)||this;return o.fn=e,o.args=n,o}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.fn.isEquivalent(t.fn)&&da(this.args,t.args)},e.prototype.visitExpression=function(t,e){return t.visitInvokeFunctionExpr(this,e)},e}(ha),Ca=function(t){function e(e,n,r,i){var o=t.call(this,r,i)||this;return o.classExpr=e,o.args=n,o}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.classExpr.isEquivalent(t.classExpr)&&da(this.args,t.args)},e.prototype.visitExpression=function(t,e){return t.visitInstantiateExpr(this,e)},e}(ha),xa=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.value=e,i}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.value===t.value},e.prototype.visitExpression=function(t,e){return t.visitLiteralExpr(this,e)},e}(ha),Sa=function(t){function e(e,n,r,i){void 0===r&&(r=null);var o=t.call(this,n,i)||this;return o.value=e,o.typeParams=r,o}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.value.name===t.value.name&&this.value.moduleName===t.value.moduleName&&this.value.runtime===t.value.runtime},e.prototype.visitExpression=function(t,e){return t.visitExternalExpr(this,e)},e}(ha),Ea=function(t,e,n){this.moduleName=t,this.name=e,this.runtime=n},ka=function(t){function e(e,n,r,i,o){void 0===r&&(r=null);var a=t.call(this,i||n.type,o)||this;return a.condition=e,a.falseCase=r,a.trueCase=n,a}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.condition.isEquivalent(t.condition)&&this.trueCase.isEquivalent(t.trueCase)&&pa(this.falseCase,t.falseCase)},e.prototype.visitExpression=function(t,e){return t.visitConditionalExpr(this,e)},e}(ha),Oa=function(t){function e(e,n){var r=t.call(this,ca,n)||this;return r.condition=e,r}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.condition.isEquivalent(t.condition)},e.prototype.visitExpression=function(t,e){return t.visitNotExpr(this,e)},e}(ha),Pa=function(t){function e(e,n){var r=t.call(this,e.type,n)||this;return r.condition=e,r}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.condition.isEquivalent(t.condition)},e.prototype.visitExpression=function(t,e){return t.visitAssertNotNullExpr(this,e)},e}(ha),Aa=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.value=e,i}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.value.isEquivalent(t.value)},e.prototype.visitExpression=function(t,e){return t.visitCastExpr(this,e)},e}(ha),Da=function(){function t(t,e){void 0===e&&(e=null),this.name=t,this.type=e}return t.prototype.isEquivalent=function(t){return this.name===t.name},t}(),Ta=function(t){function e(e,n,r,i){var o=t.call(this,r,i)||this;return o.params=e,o.statements=n,o}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&da(this.params,t.params)&&da(this.statements,t.statements)},e.prototype.visitExpression=function(t,e){return t.visitFunctionExpr(this,e)},e.prototype.toDeclStmt=function(t,e){return void 0===e&&(e=null),new Ga(t,this.params,this.statements,this.type,e,this.sourceSpan)},e}(ha),Ma=function(t){function e(e,n,r,i,o){var a=t.call(this,i||n.type,o)||this;return a.operator=e,a.rhs=r,a.lhs=n,a}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.operator===t.operator&&this.lhs.isEquivalent(t.lhs)&&this.rhs.isEquivalent(t.rhs)},e.prototype.visitExpression=function(t,e){return t.visitBinaryOperatorExpr(this,e)},e}(ha),Ia=function(t){function e(e,n,r,i){var o=t.call(this,r,i)||this;return o.receiver=e,o.name=n,o}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name},e.prototype.visitExpression=function(t,e){return t.visitReadPropExpr(this,e)},e.prototype.set=function(t){return new va(this.receiver,this.name,t,null,this.sourceSpan)},e}(ha),Ra=function(t){function e(e,n,r,i){var o=t.call(this,r,i)||this;return o.receiver=e,o.index=n,o}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)},e.prototype.visitExpression=function(t,e){return t.visitReadKeyExpr(this,e)},e.prototype.set=function(t){return new ya(this.receiver,this.index,t,null,this.sourceSpan)},e}(ha),Na=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.entries=e,i}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&da(this.entries,t.entries)},e.prototype.visitExpression=function(t,e){return t.visitLiteralArrayExpr(this,e)},e}(ha),La=function(){function t(t,e,n){this.key=t,this.value=e,this.quoted=n}return t.prototype.isEquivalent=function(t){return this.key===t.key&&this.value.isEquivalent(t.value)},t}(),ja=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.entries=e,i.valueType=null,n&&(i.valueType=n.valueType),i}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&da(this.entries,t.entries)},e.prototype.visitExpression=function(t,e){return t.visitLiteralMapExpr(this,e)},e}(ha),Fa=function(t){function e(e,n){var r=t.call(this,e[e.length-1].type,n)||this;return r.parts=e,r}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&da(this.parts,t.parts)},e.prototype.visitExpression=function(t,e){return t.visitCommaExpr(this,e)},e}(ha),Va=(new ma(fa.This,null,null),new ma(fa.Super,null,null),new ma(fa.CatchError,null,null),new ma(fa.CatchStack,null,null),new xa(null,null,null)),Ba=new xa(null,la,null),Ua={Final:0,Private:1,Exported:2};Ua[Ua.Final]="Final",Ua[Ua.Private]="Private",Ua[Ua.Exported]="Exported";var Ha=function(){function t(t,e){this.modifiers=t||[],this.sourceSpan=e||null}return t.prototype.hasModifier=function(t){return-1!==this.modifiers.indexOf(t)},t}(),za=function(t){function e(e,n,r,i,o){void 0===i&&(i=null);var a=t.call(this,i,o)||this;return a.name=e,a.value=n,a.type=r||n.type,a}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.name===t.name&&this.value.isEquivalent(t.value)},e.prototype.visitStatement=function(t,e){return t.visitDeclareVarStmt(this,e)},e}(Ha),Ga=function(t){function e(e,n,r,i,o,a){void 0===o&&(o=null);var s=t.call(this,o,a)||this;return s.name=e,s.params=n,s.statements=r,s.type=i||null,s}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&da(this.params,t.params)&&da(this.statements,t.statements)},e.prototype.visitStatement=function(t,e){return t.visitDeclareFunctionStmt(this,e)},e}(Ha),Wa=function(t){function e(e,n){var r=t.call(this,null,n)||this;return r.expr=e,r}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.expr.isEquivalent(t.expr)},e.prototype.visitStatement=function(t,e){return t.visitExpressionStmt(this,e)},e}(Ha),qa=function(t){function e(e,n){var r=t.call(this,null,n)||this;return r.value=e,r}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.value.isEquivalent(t.value)},e.prototype.visitStatement=function(t,e){return t.visitReturnStmt(this,e)},e}(Ha),Ya=function(){function t(t,e){this.modifiers=e,e||(this.modifiers=[]),this.type=t||null}return t.prototype.hasModifier=function(t){return-1!==this.modifiers.indexOf(t)},t}(),$a=(function(t){function e(e,n,r){void 0===r&&(r=null);var i=t.call(this,n,r)||this;return i.name=e,i}n(e,t),e.prototype.isEquivalent=function(t){return this.name===t.name}}(Ya),function(t){function e(e,n,r,i,o){void 0===o&&(o=null);var a=t.call(this,i,o)||this;return a.name=e,a.params=n,a.body=r,a}return n(e,t),e.prototype.isEquivalent=function(t){return this.name===t.name&&da(this.body,t.body)},e}(Ya)),Ka=function(t){function e(e,n,r,i){void 0===i&&(i=null);var o=t.call(this,r,i)||this;return o.name=e,o.body=n,o}return n(e,t),e.prototype.isEquivalent=function(t){return this.name===t.name&&da(this.body,t.body)},e}(Ya),Qa=function(t){function e(e,n,r,i,o,a,s,l){void 0===s&&(s=null);var c=t.call(this,s,l)||this;return c.name=e,c.parent=n,c.fields=r,c.getters=i,c.constructorMethod=o,c.methods=a,c}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.name===t.name&&pa(this.parent,t.parent)&&da(this.fields,t.fields)&&da(this.getters,t.getters)&&this.constructorMethod.isEquivalent(t.constructorMethod)&&da(this.methods,t.methods)},e.prototype.visitStatement=function(t,e){return t.visitDeclareClassStmt(this,e)},e}(Ha),Xa=function(t){function e(e,n,r,i){void 0===r&&(r=[]);var o=t.call(this,null,i)||this;return o.condition=e,o.trueCase=n,o.falseCase=r,o}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.condition.isEquivalent(t.condition)&&da(this.trueCase,t.trueCase)&&da(this.falseCase,t.falseCase)},e.prototype.visitStatement=function(t,e){return t.visitIfStmt(this,e)},e}(Ha),Za=function(t){function e(e,n){var r=t.call(this,null,n)||this;return r.comment=e,r}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e},e.prototype.visitStatement=function(t,e){return t.visitCommentStmt(this,e)},e}(Ha),Ja=function(t){function e(e,n,r){var i=t.call(this,null,r)||this;return i.bodyStmts=e,i.catchStmts=n,i}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&da(this.bodyStmts,t.bodyStmts)&&da(this.catchStmts,t.catchStmts)},e.prototype.visitStatement=function(t,e){return t.visitTryCatchStmt(this,e)},e}(Ha),ts=function(t){function e(e,n){var r=t.call(this,null,n)||this;return r.error=e,r}return n(e,t),e.prototype.isEquivalent=function(t){return t instanceof Ja&&this.error.isEquivalent(t.error)},e.prototype.visitStatement=function(t,e){return t.visitThrowStmt(this,e)},e}(Ha),es=function(){function t(){}return t.prototype.transformExpr=function(t,e){return t},t.prototype.transformStmt=function(t,e){return t},t.prototype.visitReadVarExpr=function(t,e){return this.transformExpr(t,e)},t.prototype.visitWriteVarExpr=function(t,e){return this.transformExpr(new ga(t.name,t.value.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitWriteKeyExpr=function(t,e){return this.transformExpr(new ya(t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),t.value.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitWritePropExpr=function(t,e){return this.transformExpr(new va(t.receiver.visitExpression(this,e),t.name,t.value.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitInvokeMethodExpr=function(t,e){var n=t.builtin||t.name;return this.transformExpr(new _a(t.receiver.visitExpression(this,e),n,this.visitAllExpressions(t.args,e),t.type,t.sourceSpan),e)},t.prototype.visitInvokeFunctionExpr=function(t,e){return this.transformExpr(new wa(t.fn.visitExpression(this,e),this.visitAllExpressions(t.args,e),t.type,t.sourceSpan),e)},t.prototype.visitInstantiateExpr=function(t,e){return this.transformExpr(new Ca(t.classExpr.visitExpression(this,e),this.visitAllExpressions(t.args,e),t.type,t.sourceSpan),e)},t.prototype.visitLiteralExpr=function(t,e){return this.transformExpr(t,e)},t.prototype.visitExternalExpr=function(t,e){return this.transformExpr(t,e)},t.prototype.visitConditionalExpr=function(t,e){return this.transformExpr(new ka(t.condition.visitExpression(this,e),t.trueCase.visitExpression(this,e),t.falseCase.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitNotExpr=function(t,e){return this.transformExpr(new Oa(t.condition.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitAssertNotNullExpr=function(t,e){return this.transformExpr(new Pa(t.condition.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitCastExpr=function(t,e){return this.transformExpr(new Aa(t.value.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitFunctionExpr=function(t,e){return this.transformExpr(new Ta(t.params,this.visitAllStatements(t.statements,e),t.type,t.sourceSpan),e)},t.prototype.visitBinaryOperatorExpr=function(t,e){return this.transformExpr(new Ma(t.operator,t.lhs.visitExpression(this,e),t.rhs.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitReadPropExpr=function(t,e){return this.transformExpr(new Ia(t.receiver.visitExpression(this,e),t.name,t.type,t.sourceSpan),e)},t.prototype.visitReadKeyExpr=function(t,e){return this.transformExpr(new Ra(t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitLiteralArrayExpr=function(t,e){return this.transformExpr(new Na(this.visitAllExpressions(t.entries,e),t.type,t.sourceSpan),e)},t.prototype.visitLiteralMapExpr=function(t,e){var n=this,r=t.entries.map(function(t){return new La(t.key,t.value.visitExpression(n,e),t.quoted)}),i=new aa(t.valueType,null);return this.transformExpr(new ja(r,i,t.sourceSpan),e)},t.prototype.visitCommaExpr=function(t,e){return this.transformExpr(new Fa(this.visitAllExpressions(t.parts,e),t.sourceSpan),e)},t.prototype.visitAllExpressions=function(t,e){var n=this;return t.map(function(t){return t.visitExpression(n,e)})},t.prototype.visitDeclareVarStmt=function(t,e){return this.transformStmt(new za(t.name,t.value.visitExpression(this,e),t.type,t.modifiers,t.sourceSpan),e)},t.prototype.visitDeclareFunctionStmt=function(t,e){return this.transformStmt(new Ga(t.name,t.params,this.visitAllStatements(t.statements,e),t.type,t.modifiers,t.sourceSpan),e)},t.prototype.visitExpressionStmt=function(t,e){return this.transformStmt(new Wa(t.expr.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitReturnStmt=function(t,e){return this.transformStmt(new qa(t.value.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitDeclareClassStmt=function(t,e){var n=this,r=t.parent.visitExpression(this,e),i=t.getters.map(function(t){return new Ka(t.name,n.visitAllStatements(t.body,e),t.type,t.modifiers)}),o=t.constructorMethod&&new $a(t.constructorMethod.name,t.constructorMethod.params,this.visitAllStatements(t.constructorMethod.body,e),t.constructorMethod.type,t.constructorMethod.modifiers),a=t.methods.map(function(t){return new $a(t.name,t.params,n.visitAllStatements(t.body,e),t.type,t.modifiers)});return this.transformStmt(new Qa(t.name,r,t.fields,i,o,a,t.modifiers,t.sourceSpan),e)},t.prototype.visitIfStmt=function(t,e){return this.transformStmt(new Xa(t.condition.visitExpression(this,e),this.visitAllStatements(t.trueCase,e),this.visitAllStatements(t.falseCase,e),t.sourceSpan),e)},t.prototype.visitTryCatchStmt=function(t,e){return this.transformStmt(new Ja(this.visitAllStatements(t.bodyStmts,e),this.visitAllStatements(t.catchStmts,e),t.sourceSpan),e)},t.prototype.visitThrowStmt=function(t,e){return this.transformStmt(new ts(t.error.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitCommentStmt=function(t,e){return this.transformStmt(t,e)},t.prototype.visitAllStatements=function(t,e){var n=this;return t.map(function(t){return t.visitStatement(n,e)})},t}(),ns=function(){function t(){}return t.prototype.visitType=function(t,e){return t},t.prototype.visitExpression=function(t,e){return t.type&&t.type.visitType(this,e),t},t.prototype.visitBuiltintType=function(t,e){return this.visitType(t,e)},t.prototype.visitExpressionType=function(t,e){return t.value.visitExpression(this,e),this.visitType(t,e)},t.prototype.visitArrayType=function(t,e){return this.visitType(t,e)},t.prototype.visitMapType=function(t,e){return this.visitType(t,e)},t.prototype.visitReadVarExpr=function(t,e){return this.visitExpression(t,e)},t.prototype.visitWriteVarExpr=function(t,e){return t.value.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitWriteKeyExpr=function(t,e){return t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),t.value.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitWritePropExpr=function(t,e){return t.receiver.visitExpression(this,e),t.value.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitInvokeMethodExpr=function(t,e){return t.receiver.visitExpression(this,e),this.visitAllExpressions(t.args,e),this.visitExpression(t,e)},t.prototype.visitInvokeFunctionExpr=function(t,e){return t.fn.visitExpression(this,e),this.visitAllExpressions(t.args,e),this.visitExpression(t,e)},t.prototype.visitInstantiateExpr=function(t,e){return t.classExpr.visitExpression(this,e),this.visitAllExpressions(t.args,e),this.visitExpression(t,e)},t.prototype.visitLiteralExpr=function(t,e){return this.visitExpression(t,e)},t.prototype.visitExternalExpr=function(t,e){var n=this;return t.typeParams&&t.typeParams.forEach(function(t){return t.visitType(n,e)}),this.visitExpression(t,e)},t.prototype.visitConditionalExpr=function(t,e){return t.condition.visitExpression(this,e),t.trueCase.visitExpression(this,e),t.falseCase.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitNotExpr=function(t,e){return t.condition.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitAssertNotNullExpr=function(t,e){return t.condition.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitCastExpr=function(t,e){return t.value.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitFunctionExpr=function(t,e){return this.visitAllStatements(t.statements,e),this.visitExpression(t,e)},t.prototype.visitBinaryOperatorExpr=function(t,e){return t.lhs.visitExpression(this,e),t.rhs.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitReadPropExpr=function(t,e){return t.receiver.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitReadKeyExpr=function(t,e){return t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitLiteralArrayExpr=function(t,e){return this.visitAllExpressions(t.entries,e),this.visitExpression(t,e)},t.prototype.visitLiteralMapExpr=function(t,e){var n=this;return t.entries.forEach(function(t){return t.value.visitExpression(n,e)}),this.visitExpression(t,e)},t.prototype.visitCommaExpr=function(t,e){return this.visitAllExpressions(t.parts,e),this.visitExpression(t,e)},t.prototype.visitAllExpressions=function(t,e){var n=this;t.forEach(function(t){return t.visitExpression(n,e)})},t.prototype.visitDeclareVarStmt=function(t,e){return t.value.visitExpression(this,e),t.type&&t.type.visitType(this,e),t},t.prototype.visitDeclareFunctionStmt=function(t,e){return this.visitAllStatements(t.statements,e),t.type&&t.type.visitType(this,e),t},t.prototype.visitExpressionStmt=function(t,e){return t.expr.visitExpression(this,e),t},t.prototype.visitReturnStmt=function(t,e){return t.value.visitExpression(this,e),t},t.prototype.visitDeclareClassStmt=function(t,e){var n=this;return t.parent.visitExpression(this,e),t.getters.forEach(function(t){return n.visitAllStatements(t.body,e)}),t.constructorMethod&&this.visitAllStatements(t.constructorMethod.body,e),t.methods.forEach(function(t){return n.visitAllStatements(t.body,e)}),t},t.prototype.visitIfStmt=function(t,e){return t.condition.visitExpression(this,e),this.visitAllStatements(t.trueCase,e),this.visitAllStatements(t.falseCase,e),t},t.prototype.visitTryCatchStmt=function(t,e){return this.visitAllStatements(t.bodyStmts,e),this.visitAllStatements(t.catchStmts,e),t},t.prototype.visitThrowStmt=function(t,e){return t.error.visitExpression(this,e),t},t.prototype.visitCommentStmt=function(t,e){return t},t.prototype.visitAllStatements=function(t,e){var n=this;t.forEach(function(t){return t.visitStatement(n,e)})},t}();function rs(t){var e=new is;return e.visitAllStatements(t,null),e.varNames}var is=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.varNames=new Set,e}return n(e,t),e.prototype.visitDeclareFunctionStmt=function(t,e){return t},e.prototype.visitDeclareClassStmt=function(t,e){return t},e.prototype.visitReadVarExpr=function(t,e){return t.name&&this.varNames.add(t.name),null},e}(ns);var os=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.externalReferences=[],e}return n(e,t),e.prototype.visitExternalExpr=function(e,n){return this.externalReferences.push(e.value),t.prototype.visitExternalExpr.call(this,e,n)},e}(ns);function as(t,e){if(!e)return t;var n=new ls(e);return t.visitStatement(n,null)}function ss(t,e){if(!e)return t;var n=new ls(e);return t.visitExpression(n,null)}var ls=function(t){function e(e){var n=t.call(this)||this;return n.sourceSpan=e,n}return n(e,t),e.prototype._clone=function(t){var e=Object.create(t.constructor.prototype);for(var n in t)e[n]=t[n];return e},e.prototype.transformExpr=function(t,e){return t.sourceSpan||((t=this._clone(t)).sourceSpan=this.sourceSpan),t},e.prototype.transformStmt=function(t,e){return t.sourceSpan||((t=this._clone(t)).sourceSpan=this.sourceSpan),t},e}(es);function cs(t,e,n){return new ma(t,e,n)}function us(t,e,n){return void 0===e&&(e=null),new Sa(t,null,e,n)}function ps(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),null!=t?ds(us(t,e,null),n):null}function ds(t,e){return void 0===e&&(e=null),new ia(t,e)}function hs(t,e,n){return new Na(t,e,n)}function fs(t,e){return void 0===e&&(e=null),new ja(t.map(function(t){return new La(t.key,t.value,t.quoted)}),e,null)}function ms(t,e,n,r){return new Ta(t,e,n,r)}function gs(t,e,n){return new xa(t,e,n)}var ys=function(t){function e(e,n){return t.call(this,n,e)||this}return n(e,t),e}(Cr),vs=function(t,e){var n,r,i,o=this;this.reflector=t,this.component=e,this.errors=[],this.viewQueries=(n=e,r=1,i=new Map,n.viewQueries&&n.viewQueries.forEach(function(t){return Ss(i,{meta:t,queryId:r++})}),i),this.viewProviders=new Map,e.viewProviders.forEach(function(t){null==o.viewProviders.get(It(t.token))&&o.viewProviders.set(It(t.token),!0)})},bs=function(){function t(t,e,n,r,i,o,a,s,l){var c=this;this.viewContext=t,this._parent=e,this._isViewRoot=n,this._directiveAsts=r,this._sourceSpan=l,this._transformedProviders=new Map,this._seenProviders=new Map,this._queriedTokens=new Map,this.transformedHasViewContainer=!1,this._attrs={},i.forEach(function(t){return c._attrs[t.name]=t.value});var u,p,d,h,f,m,g,y=r.map(function(t){return t.directive});if(this._allProviders=(u=y,p=l,d=t.errors,h=new Map,u.forEach(function(t){xs([{token:{identifier:t.type},useClass:t.type}],t.isComponent?dt.Component:dt.Directive,!0,p,d,h)}),u.filter(function(t){return t.isComponent}).concat(u.filter(function(t){return!t.isComponent})).forEach(function(t){xs(t.providers,dt.PublicService,!1,p,d,h),xs(t.viewProviders,dt.PrivateService,!1,p,d,h)}),h),this._contentQueries=(f=y,m=s,g=new Map,f.forEach(function(t,e){t.queries&&t.queries.forEach(function(t){return Ss(g,{meta:t,queryId:m++})})}),g),Array.from(this._allProviders.values()).forEach(function(t){c._addQueryReadsTo(t.token,t.token,c._queriedTokens)}),a){var v=Vo(this.viewContext.reflector,jo.TemplateRef);this._addQueryReadsTo(v,v,this._queriedTokens)}o.forEach(function(t){var e=t.value||Vo(c.viewContext.reflector,jo.ElementRef);c._addQueryReadsTo({value:t.name},e,c._queriedTokens)}),this._queriedTokens.get(this.viewContext.reflector.resolveExternalReference(jo.ViewContainerRef))&&(this.transformedHasViewContainer=!0),Array.from(this._allProviders.values()).forEach(function(t){(t.eager||c._queriedTokens.get(It(t.token)))&&c._getOrCreateLocalProvider(t.providerType,t.token,!0)})}return t.prototype.afterElement=function(){var t=this;Array.from(this._allProviders.values()).forEach(function(e){t._getOrCreateLocalProvider(e.providerType,e.token,!1)})},Object.defineProperty(t.prototype,"transformProviders",{get:function(){var t=[],e=[];return this._transformedProviders.forEach(function(n){n.eager?e.push(n):t.push(n)}),t.concat(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"transformedDirectiveAsts",{get:function(){var t=this.transformProviders.map(function(t){return t.token.identifier}),e=this._directiveAsts.slice();return e.sort(function(e,n){return t.indexOf(e.directive.type)-t.indexOf(n.directive.type)}),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryMatches",{get:function(){var t=[];return this._queriedTokens.forEach(function(e){t.push.apply(t,e)}),t},enumerable:!0,configurable:!0}),t.prototype._addQueryReadsTo=function(t,e,n){this._getQueriesFor(t).forEach(function(t){var r=t.meta.read||e,i=It(r),o=n.get(i);o||(o=[],n.set(i,o)),o.push({queryId:t.queryId,value:r})})},t.prototype._getQueriesFor=function(t){for(var e,n=[],r=this,i=0;null!==r;)(e=r._contentQueries.get(It(t)))&&n.push.apply(n,e.filter(function(t){return t.meta.descendants||i<=1})),r._directiveAsts.length>0&&i++,r=r._parent;return(e=this.viewContext.viewQueries.get(It(t)))&&n.push.apply(n,e),n},t.prototype._getOrCreateLocalProvider=function(t,e,n){var r=this,i=this._allProviders.get(It(e));if(!i||(t===dt.Directive||t===dt.PublicService)&&i.providerType===dt.PrivateService||(t===dt.PrivateService||t===dt.PublicService)&&i.providerType===dt.Builtin)return null;var o=this._transformedProviders.get(It(e));if(o)return o;if(null!=this._seenProviders.get(It(e)))return this.viewContext.errors.push(new ys("Cannot instantiate cyclic dependency! "+Mt(e),this._sourceSpan)),null;this._seenProviders.set(It(e),!0);var a=i.providers.map(function(t){var e=t.useValue,o=t.useExisting,a=void 0;if(null!=t.useExisting){var s=r._getDependency(i.providerType,{token:t.useExisting},n);null!=s.token?o=s.token:(o=null,e=s.value)}else if(t.useFactory){a=(t.deps||t.useFactory.diDeps).map(function(t){return r._getDependency(i.providerType,t,n)})}else if(t.useClass){a=(t.deps||t.useClass.diDeps).map(function(t){return r._getDependency(i.providerType,t,n)})}return ws(t,{useExisting:o,useValue:e,deps:a})});return o=Cs(i,{eager:n,providers:a}),this._transformedProviders.set(It(e),o),o},t.prototype._getLocalDependency=function(t,e,n){if(void 0===n&&(n=!1),e.isAttribute){var r=this._attrs[e.token.value];return{isValue:!0,value:null==r?null:r}}if(null!=e.token){if(t===dt.Directive||t===dt.Component){if(It(e.token)===this.viewContext.reflector.resolveExternalReference(jo.Renderer)||It(e.token)===this.viewContext.reflector.resolveExternalReference(jo.ElementRef)||It(e.token)===this.viewContext.reflector.resolveExternalReference(jo.ChangeDetectorRef)||It(e.token)===this.viewContext.reflector.resolveExternalReference(jo.TemplateRef))return e;It(e.token)===this.viewContext.reflector.resolveExternalReference(jo.ViewContainerRef)&&(this.transformedHasViewContainer=!0)}if(It(e.token)===this.viewContext.reflector.resolveExternalReference(jo.Injector))return e;if(null!=this._getOrCreateLocalProvider(t,e.token,n))return e}return null},t.prototype._getDependency=function(t,e,n){void 0===n&&(n=!1);var r=this,i=n,o=null;if(e.isSkipSelf||(o=this._getLocalDependency(t,e,n)),e.isSelf)!o&&e.isOptional&&(o={isValue:!0,value:null});else{for(;!o&&r._parent;){var a=r;r=r._parent,a._isViewRoot&&(i=!1),o=r._getLocalDependency(dt.PublicService,e,i)}o||(o=!e.isHost||this.viewContext.component.isHost||this.viewContext.component.type.reference===It(e.token)||null!=this.viewContext.viewProviders.get(It(e.token))?e:e.isOptional?o={isValue:!0,value:null}:null)}return o||this.viewContext.errors.push(new ys("No provider for "+Mt(e.token),this._sourceSpan)),o},t}(),_s=function(){function t(t,e,n,r){var i=this;this.reflector=t,this._transformedProviders=new Map,this._seenProviders=new Map,this._errors=[],this._allProviders=new Map,e.transitiveModule.modules.forEach(function(t){xs([{token:{identifier:t},useClass:t}],dt.PublicService,!0,r,i._errors,i._allProviders)}),xs(e.transitiveModule.providers.map(function(t){return t.provider}).concat(n),dt.PublicService,!1,r,this._errors,this._allProviders)}return t.prototype.parse=function(){var t=this;if(Array.from(this._allProviders.values()).forEach(function(e){t._getOrCreateLocalProvider(e.token,e.eager)}),this._errors.length>0){var e=this._errors.join("\n");throw new Error("Provider parse errors:\n"+e)}var n=[],r=[];return this._transformedProviders.forEach(function(t){t.eager?r.push(t):n.push(t)}),n.concat(r)},t.prototype._getOrCreateLocalProvider=function(t,e){var n=this,r=this._allProviders.get(It(t));if(!r)return null;var i=this._transformedProviders.get(It(t));if(i)return i;if(null!=this._seenProviders.get(It(t)))return this._errors.push(new ys("Cannot instantiate cyclic dependency! "+Mt(t),r.sourceSpan)),null;this._seenProviders.set(It(t),!0);var o=r.providers.map(function(t){var i=t.useValue,o=t.useExisting,a=void 0;if(null!=t.useExisting){var s=n._getDependency({token:t.useExisting},e,r.sourceSpan);null!=s.token?o=s.token:(o=null,i=s.value)}else if(t.useFactory){a=(t.deps||t.useFactory.diDeps).map(function(t){return n._getDependency(t,e,r.sourceSpan)})}else if(t.useClass){a=(t.deps||t.useClass.diDeps).map(function(t){return n._getDependency(t,e,r.sourceSpan)})}return ws(t,{useExisting:o,useValue:i,deps:a})});return i=Cs(r,{eager:e,providers:o}),this._transformedProviders.set(It(t),i),i},t.prototype._getDependency=function(t,e,n){void 0===e&&(e=!1);var r=!1;t.isSkipSelf||null==t.token||(It(t.token)===this.reflector.resolveExternalReference(jo.Injector)||It(t.token)===this.reflector.resolveExternalReference(jo.ComponentFactoryResolver)?r=!0:null!=this._getOrCreateLocalProvider(t.token,e)&&(r=!0));var i=t;return t.isSelf&&!r&&(t.isOptional?i={isValue:!0,value:null}:this._errors.push(new ys("No provider for "+Mt(t.token),n))),i},t}();function ws(t,e){var n=e.useExisting,r=e.useValue,i=e.deps;return{token:t.token,useClass:t.useClass,useExisting:n,useFactory:t.useFactory,useValue:r,deps:i,multi:t.multi}}function Cs(t,e){var n=e.eager,r=e.providers;return new pt(t.token,t.multiProvider,t.eager||n,r,t.providerType,t.lifecycleHooks,t.sourceSpan)}function xs(t,e,n,r,i,o){t.forEach(function(t){var a=o.get(It(t.token));if(null!=a&&!!a.multiProvider!=!!t.multi&&i.push(new ys("Mixing multi and non multi provider is not possible for token "+Mt(a.token),r)),a)t.multi||(a.providers.length=0),a.providers.push(t);else{var s=t.token.identifier&&t.token.identifier.lifecycleHooks?t.token.identifier.lifecycleHooks:[],l=!(t.useClass||t.useExisting||t.useFactory);a=new pt(t.token,!!t.multi,n||l,[t],e,s,r),o.set(It(t.token),a)}})}function Ss(t,e){e.meta.selectors.forEach(function(n){var r=t.get(It(n));r||(r=[],t.set(It(n),r)),r.push(e)})}function Es(t,e,n){return void 0===n&&(n=null),L(e,new ks(t),n)}var ks=function(){function t(t){this.ctx=t}return t.prototype.visitArray=function(t,e){var n=this;return hs(t.map(function(t){return L(t,n,null)}),e)},t.prototype.visitStringMap=function(t,e){var n=this,r=[],i=new Set(t&&t.$quoted$);return Object.keys(t).forEach(function(e){r.push(new La(e,L(t[e],n,null),i.has(e)))}),new ja(r,e)},t.prototype.visitPrimitive=function(t,e){return gs(t,e)},t.prototype.visitOther=function(t,e){return t instanceof ha?t:this.ctx.importExpr(t)},t}();function Os(t,e){var n=0;e.eager||(n|=4096),e.providerType===dt.PrivateService&&(n|=8192),e.lifecycleHooks.forEach(function(t){t!==Bo.OnDestroy&&e.providerType!==dt.Directive&&e.providerType!==dt.Component||(n|=Ts(t))});var r=e.multiProvider?function(t,e,n){var r=[],i=[],o=n.map(function(e,n){var r;if(e.useClass){var i=a(n,e.deps||e.useClass.diDeps);r=t.importExpr(e.useClass.reference).instantiate(i)}else if(e.useFactory){var i=a(n,e.deps||e.useFactory.diDeps);r=t.importExpr(e.useFactory.reference).callFn(i)}else if(e.useExisting){var i=a(n,[{token:e.useExisting}]);r=i[0]}else r=Es(t,e.useValue);return r});return{providerExpr:ms(i,[new qa(hs(o))],la),flags:1024|e,depsExpr:hs(r)};function a(e,n){return n.map(function(n,o){var a="p"+e+"_"+o;return i.push(new Da(a,sa)),r.push(Ds(t,n)),cs(a)})}}(t,n,e.providers):Ps(t,n,e.providerType,e.providers[0]);return{providerExpr:r.providerExpr,flags:r.flags,depsExpr:r.depsExpr,tokenExpr:As(t,e.token)}}function Ps(t,e,n,r){var i,o;return n===dt.Directive||n===dt.Component?(i=t.importExpr(r.useClass.reference),e|=16384,o=r.deps||r.useClass.diDeps):r.useClass?(i=t.importExpr(r.useClass.reference),e|=512,o=r.deps||r.useClass.diDeps):r.useFactory?(i=t.importExpr(r.useFactory.reference),e|=1024,o=r.deps||r.useFactory.diDeps):r.useExisting?(i=Va,e|=2048,o=[{token:r.useExisting}]):(i=Es(t,r.useValue),e|=256,o=[]),{providerExpr:i,flags:e,depsExpr:hs(o.map(function(e){return Ds(t,e)}))}}function As(t,e){return e.identifier?t.importExpr(e.identifier.reference):gs(e.value)}function Ds(t,e){var n=e.isValue?Es(t,e.value):As(t,e.token),r=0;return e.isSkipSelf&&(r|=1),e.isOptional&&(r|=2),e.isValue&&(r|=8),0===r?n:hs([gs(r),n])}function Ts(t){var e=0;switch(t){case Bo.AfterContentChecked:e=2097152;break;case Bo.AfterContentInit:e=1048576;break;case Bo.AfterViewChecked:e=8388608;break;case Bo.AfterViewInit:e=4194304;break;case Bo.DoCheck:e=262144;break;case Bo.OnChanges:e=524288;break;case Bo.OnDestroy:e=131072;break;case Bo.OnInit:e=65536}return e}function Ms(t,e,n,r){var i=r.map(function(t){return e.importExpr(t.componentFactory)}),o=Vo(t,jo.ComponentFactoryResolver),a={diDeps:[{isValue:!0,value:hs(i)},{token:o,isSkipSelf:!0,isOptional:!0},{token:Vo(t,jo.NgModuleRef)}],lifecycleHooks:[],reference:t.resolveExternalReference(jo.CodegenComponentFactoryResolver)},s=Ps(e,n,dt.PrivateService,{token:o,multi:!1,useClass:a});return{providerExpr:s.providerExpr,flags:s.flags,depsExpr:s.depsExpr,tokenExpr:As(e,o)}}var Is=function(t){this.ngModuleFactoryVar=t},Rs=cs("_l"),Ns=function(){function t(t){this.reflector=t}return t.prototype.compile=function(t,e,n){var r=xr("NgModule",e.type),i=e.transitiveModule.entryComponents,o=e.bootstrapComponents,a=new _s(this.reflector,e,n,r),s=[Ms(this.reflector,t,0,i)].concat(a.parse().map(function(e){return Os(t,e)})).map(function(t){var e=t.providerExpr,n=t.depsExpr,r=t.flags,i=t.tokenExpr;return us(jo.moduleProviderDef).callFn([gs(r),i,e,n])}),l=us(jo.moduleDef).callFn([hs(s)]),c=ms([new Da(Rs.name)],[new qa(l)],la),u=Et(e.type)+"NgFactory";if(this._createNgModuleFactory(t,e.type.reference,us(jo.createModuleFactory).callFn([t.importExpr(e.type.reference),hs(o.map(function(e){return t.importExpr(e.reference)})),c])),e.id){var p=us(jo.RegisterModuleFactoryFn).callFn([gs(e.id),cs(u)]).toStmt();t.statements.push(p)}return new Is(u)},t.prototype.createStub=function(t,e){this._createNgModuleFactory(t,e,Va)},t.prototype._createNgModuleFactory=function(t,e,n){var r=cs(Et({reference:e})+"NgFactory").set(n).toDeclStmt(ps(jo.NgModuleFactory,[ds(t.importExpr(e))],[ta.Const]),[Ua.Final,Ua.Exported]);t.statements.push(r)},t}(),Ls=function(){function t(t){this._reflector=t}return t.prototype.isNgModule=function(t){return this._reflector.annotations(t).some(_.isTypeOf)},t.prototype.resolve=function(t,e){void 0===e&&(e=!0);var n=Ve(this._reflector.annotations(t),_.isTypeOf);if(n)return n;if(e)throw new Error("No NgModule metadata found for '"+K(t)+"'.");return null},t}(),js=function(){function t(t){void 0===t&&(t=null),this.file=t,this.sourcesContent=new Map,this.lines=[],this.lastCol0=0,this.hasMappings=!1}return t.prototype.addSource=function(t,e){return void 0===e&&(e=null),this.sourcesContent.has(t)||this.sourcesContent.set(t,e),this},t.prototype.addLine=function(){return this.lines.push([]),this.lastCol0=0,this},t.prototype.addMapping=function(t,e,n,r){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(null!=e&&!this.sourcesContent.has(e))throw new Error('Unknown source file "'+e+'"');if(null==t)throw new Error("The column in the generated code must be provided");if(t<this.lastCol0)throw new Error("Mapping should be added in output order");if(e&&(null==n||null==r))throw new Error("The source location must be provided when a source url is provided");return this.hasMappings=!0,this.lastCol0=t,this.currentLine.push({col0:t,sourceUrl:e,sourceLine0:n,sourceCol0:r}),this},Object.defineProperty(t.prototype,"currentLine",{get:function(){return this.lines.slice(-1)[0]},enumerable:!0,configurable:!0}),t.prototype.toJSON=function(){var t=this;if(!this.hasMappings)return null;var e=new Map,n=[],r=[];Array.from(this.sourcesContent.keys()).forEach(function(i,o){e.set(i,o),n.push(i),r.push(t.sourcesContent.get(i)||null)});var i="",o=0,a=0,s=0,l=0;return this.lines.forEach(function(t){o=0,i+=t.map(function(t){var n=Fs(t.col0-o);return o=t.col0,null!=t.sourceUrl&&(n+=Fs(e.get(t.sourceUrl)-a),a=e.get(t.sourceUrl),n+=Fs(t.sourceLine0-s),s=t.sourceLine0,n+=Fs(t.sourceCol0-l),l=t.sourceCol0),n}).join(","),i+=";"}),i=i.slice(0,-1),{file:this.file||"",version:3,sourceRoot:"",sources:n,sourcesContent:r,mappings:i}},t.prototype.toJsComment=function(){return this.hasMappings?"//# sourceMappingURL=data:application/json;base64,"+function(t){var e="";t=$(t);for(var n=0;n<t.length;){var r=t.charCodeAt(n++),i=t.charCodeAt(n++),o=t.charCodeAt(n++);e+=Bs(r>>2),e+=Bs((3&r)<<4|(isNaN(i)?0:i>>4)),e+=isNaN(i)?"=":Bs((15&i)<<2|o>>6),e+=isNaN(i)||isNaN(o)?"=":Bs(63&o)}return e}(JSON.stringify(this,null,0)):""},t}();function Fs(t){t=t<0?1+(-t<<1):t<<1;var e="";do{var n=31&t;(t>>=5)>0&&(n|=32),e+=Bs(n)}while(t>0);return e}var Vs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Bs(t){if(t<0||t>=64)throw new Error("Can only encode value in the range [0, 63]");return Vs[t]}var Us=/'|\\|\n|\r|\$/g,Hs=/^[$A-Z_][0-9A-Z_$]*$/i,zs="  ",Gs=cs("error",null,null),Ws=cs("stack",null,null),qs=function(t){this.indent=t,this.partsLength=0,this.parts=[],this.srcSpans=[]},Ys=function(){function t(t){this._indent=t,this._classes=[],this._preambleLineCount=0,this._lines=[new qs(t)]}return t.createRoot=function(){return new t(0)},Object.defineProperty(t.prototype,"_currentLine",{get:function(){return this._lines[this._lines.length-1]},enumerable:!0,configurable:!0}),t.prototype.println=function(t,e){void 0===e&&(e=""),this.print(t||null,e,!0)},t.prototype.lineIsEmpty=function(){return 0===this._currentLine.parts.length},t.prototype.lineLength=function(){return this._currentLine.indent*zs.length+this._currentLine.partsLength},t.prototype.print=function(t,e,n){void 0===n&&(n=!1),e.length>0&&(this._currentLine.parts.push(e),this._currentLine.partsLength+=e.length,this._currentLine.srcSpans.push(t&&t.sourceSpan||null)),n&&this._lines.push(new qs(this._indent))},t.prototype.removeEmptyLastLine=function(){this.lineIsEmpty()&&this._lines.pop()},t.prototype.incIndent=function(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)},t.prototype.decIndent=function(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)},t.prototype.pushClass=function(t){this._classes.push(t)},t.prototype.popClass=function(){return this._classes.pop()},Object.defineProperty(t.prototype,"currentClass",{get:function(){return this._classes.length>0?this._classes[this._classes.length-1]:null},enumerable:!0,configurable:!0}),t.prototype.toSource=function(){return this.sourceLines.map(function(t){return t.parts.length>0?Qs(t.indent)+t.parts.join(""):""}).join("\n")},t.prototype.toSourceMapGenerator=function(t,e){void 0===e&&(e=0);for(var n=new js(t),r=!1,i=function(){r||(n.addSource(t," ").addMapping(0,t,0,0),r=!0)},o=0;o<e;o++)n.addLine(),i();return this.sourceLines.forEach(function(t,e){n.addLine();for(var o=t.srcSpans,a=t.parts,s=t.indent*zs.length,l=0;l<o.length&&!o[l];)s+=a[l].length,l++;for(l<o.length&&0===e&&0===s?r=!0:i();l<o.length;){var c=o[l],u=c.start.file,p=c.start.line,d=c.start.col;for(n.addSource(u.url,u.content).addMapping(s,u.url,p,d),s+=a[l].length,l++;l<o.length&&(c===o[l]||!o[l]);)s+=a[l].length,l++}}),n},t.prototype.setPreambleLineCount=function(t){return this._preambleLineCount=t},t.prototype.spanOf=function(t,e){var n=this._lines[t-this._preambleLineCount];if(n)for(var r=e-Qs(n.indent).length,i=0;i<n.parts.length;i++){var o=n.parts[i];if(o.length>r)return n.srcSpans[i];r-=o.length}return null},Object.defineProperty(t.prototype,"sourceLines",{get:function(){return this._lines.length&&0===this._lines[this._lines.length-1].parts.length?this._lines.slice(0,-1):this._lines},enumerable:!0,configurable:!0}),t}(),$s=function(){function t(t){this._escapeDollarInStrings=t}return t.prototype.visitExpressionStmt=function(t,e){return t.expr.visitExpression(this,e),e.println(t,";"),null},t.prototype.visitReturnStmt=function(t,e){return e.print(t,"return "),t.value.visitExpression(this,e),e.println(t,";"),null},t.prototype.visitIfStmt=function(t,e){e.print(t,"if ("),t.condition.visitExpression(this,e),e.print(t,") {");var n=null!=t.falseCase&&t.falseCase.length>0;return t.trueCase.length<=1&&!n?(e.print(t," "),this.visitAllStatements(t.trueCase,e),e.removeEmptyLastLine(),e.print(t," ")):(e.println(),e.incIndent(),this.visitAllStatements(t.trueCase,e),e.decIndent(),n&&(e.println(t,"} else {"),e.incIndent(),this.visitAllStatements(t.falseCase,e),e.decIndent())),e.println(t,"}"),null},t.prototype.visitThrowStmt=function(t,e){return e.print(t,"throw "),t.error.visitExpression(this,e),e.println(t,";"),null},t.prototype.visitCommentStmt=function(t,e){return t.comment.split("\n").forEach(function(n){e.println(t,"// "+n)}),null},t.prototype.visitWriteVarExpr=function(t,e){var n=e.lineIsEmpty();return n||e.print(t,"("),e.print(t,t.name+" = "),t.value.visitExpression(this,e),n||e.print(t,")"),null},t.prototype.visitWriteKeyExpr=function(t,e){var n=e.lineIsEmpty();return n||e.print(t,"("),t.receiver.visitExpression(this,e),e.print(t,"["),t.index.visitExpression(this,e),e.print(t,"] = "),t.value.visitExpression(this,e),n||e.print(t,")"),null},t.prototype.visitWritePropExpr=function(t,e){var n=e.lineIsEmpty();return n||e.print(t,"("),t.receiver.visitExpression(this,e),e.print(t,"."+t.name+" = "),t.value.visitExpression(this,e),n||e.print(t,")"),null},t.prototype.visitInvokeMethodExpr=function(t,e){t.receiver.visitExpression(this,e);var n=t.name;return null!=t.builtin&&null==(n=this.getBuiltinMethodName(t.builtin))?null:(e.print(t,"."+n+"("),this.visitAllExpressions(t.args,e,","),e.print(t,")"),null)},t.prototype.visitInvokeFunctionExpr=function(t,e){return t.fn.visitExpression(this,e),e.print(t,"("),this.visitAllExpressions(t.args,e,","),e.print(t,")"),null},t.prototype.visitReadVarExpr=function(t,e){var n=t.name;if(null!=t.builtin)switch(t.builtin){case fa.Super:n="super";break;case fa.This:n="this";break;case fa.CatchError:n=Gs.name;break;case fa.CatchStack:n=Ws.name;break;default:throw new Error("Unknown builtin variable "+t.builtin)}return e.print(t,n),null},t.prototype.visitInstantiateExpr=function(t,e){return e.print(t,"new "),t.classExpr.visitExpression(this,e),e.print(t,"("),this.visitAllExpressions(t.args,e,","),e.print(t,")"),null},t.prototype.visitLiteralExpr=function(t,e){var n=t.value;return"string"==typeof n?e.print(t,Ks(n,this._escapeDollarInStrings)):e.print(t,""+n),null},t.prototype.visitConditionalExpr=function(t,e){return e.print(t,"("),t.condition.visitExpression(this,e),e.print(t,"? "),t.trueCase.visitExpression(this,e),e.print(t,": "),t.falseCase.visitExpression(this,e),e.print(t,")"),null},t.prototype.visitNotExpr=function(t,e){return e.print(t,"!"),t.condition.visitExpression(this,e),null},t.prototype.visitAssertNotNullExpr=function(t,e){return t.condition.visitExpression(this,e),null},t.prototype.visitBinaryOperatorExpr=function(t,e){var n;switch(t.operator){case ua.Equals:n="==";break;case ua.Identical:n="===";break;case ua.NotEquals:n="!=";break;case ua.NotIdentical:n="!==";break;case ua.And:n="&&";break;case ua.Or:n="||";break;case ua.Plus:n="+";break;case ua.Minus:n="-";break;case ua.Divide:n="/";break;case ua.Multiply:n="*";break;case ua.Modulo:n="%";break;case ua.Lower:n="<";break;case ua.LowerEquals:n="<=";break;case ua.Bigger:n=">";break;case ua.BiggerEquals:n=">=";break;default:throw new Error("Unknown operator "+t.operator)}return e.print(t,"("),t.lhs.visitExpression(this,e),e.print(t," "+n+" "),t.rhs.visitExpression(this,e),e.print(t,")"),null},t.prototype.visitReadPropExpr=function(t,e){return t.receiver.visitExpression(this,e),e.print(t,"."),e.print(t,t.name),null},t.prototype.visitReadKeyExpr=function(t,e){return t.receiver.visitExpression(this,e),e.print(t,"["),t.index.visitExpression(this,e),e.print(t,"]"),null},t.prototype.visitLiteralArrayExpr=function(t,e){return e.print(t,"["),this.visitAllExpressions(t.entries,e,","),e.print(t,"]"),null},t.prototype.visitLiteralMapExpr=function(t,e){var n=this;return e.print(t,"{"),this.visitAllObjects(function(r){e.print(t,Ks(r.key,n._escapeDollarInStrings,r.quoted)+":"),r.value.visitExpression(n,e)},t.entries,e,","),e.print(t,"}"),null},t.prototype.visitCommaExpr=function(t,e){return e.print(t,"("),this.visitAllExpressions(t.parts,e,","),e.print(t,")"),null},t.prototype.visitAllExpressions=function(t,e,n){var r=this;this.visitAllObjects(function(t){return t.visitExpression(r,e)},t,e,n)},t.prototype.visitAllObjects=function(t,e,n,r){for(var i=!1,o=0;o<e.length;o++)o>0&&(n.lineLength()>80?(n.print(null,r,!0),i||(n.incIndent(),n.incIndent(),i=!0)):n.print(null,r,!1)),t(e[o]);i&&(n.decIndent(),n.decIndent())},t.prototype.visitAllStatements=function(t,e){var n=this;t.forEach(function(t){return t.visitStatement(n,e)})},t}();function Ks(t,e,n){if(void 0===n&&(n=!0),null==t)return null;var r=t.replace(Us,function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return"$"==t[0]?e?"\\$":"$":"\n"==t[0]?"\\n":"\r"==t[0]?"\\r":"\\"+t[0]});return n||!Hs.test(r)?"'"+r+"'":r}function Qs(t){for(var e="",n=0;n<t;n++)e+=zs;return e}function Xs(t){var e=new Js,n=Ys.createRoot();return(Array.isArray(t)?t:[t]).forEach(function(t){if(t instanceof Ha)t.visitStatement(e,n);else if(t instanceof ha)t.visitExpression(e,n);else{if(!(t instanceof ea))throw new Error("Don't know how to print debug info for "+t);t.visitType(e,n)}}),n.toSource()}var Zs=function(){function t(){}return t.prototype.emitStatementsAndContext=function(t,e,n,r,i){void 0===n&&(n=""),void 0===r&&(r=!0);var o=new Js(i),a=Ys.createRoot();o.visitAllStatements(e,a);var s=n?n.split("\n"):[];o.reexports.forEach(function(t,e){var n=t.map(function(t){return t.name+" as "+t.as}).join(",");s.push("export {"+n+"} from '"+e+"';")}),o.importsWithPrefixes.forEach(function(t,e){s.push("import * as "+t+" from '"+e+"';")});var l=r?a.toSourceMapGenerator(t,s.length).toJsComment():"",c=s.concat([a.toSource(),l]);return l&&c.push(""),a.setPreambleLineCount(s.length),{sourceText:c.join("\n"),context:a}},t.prototype.emitStatements=function(t,e,n){return void 0===n&&(n=""),this.emitStatementsAndContext(t,e,n).sourceText},t}(),Js=function(t){function e(e){var n=t.call(this,!1)||this;return n.referenceFilter=e,n.typeExpression=0,n.importsWithPrefixes=new Map,n.reexports=new Map,n}return n(e,t),e.prototype.visitType=function(t,e,n){void 0===n&&(n="any"),t?(this.typeExpression++,t.visitType(this,e),this.typeExpression--):e.print(null,n)},e.prototype.visitLiteralExpr=function(e,n){var r=e.value;return null==r&&e.type!=la?(n.print(e,"("+r+" as any)"),null):t.prototype.visitLiteralExpr.call(this,e,n)},e.prototype.visitLiteralArrayExpr=function(e,n){0===e.entries.length&&n.print(e,"(");var r=t.prototype.visitLiteralArrayExpr.call(this,e,n);return 0===e.entries.length&&n.print(e," as any[])"),r},e.prototype.visitExternalExpr=function(t,e){return this._visitIdentifier(t.value,t.typeParams,e),null},e.prototype.visitAssertNotNullExpr=function(e,n){var r=t.prototype.visitAssertNotNullExpr.call(this,e,n);return n.print(e,"!"),r},e.prototype.visitDeclareVarStmt=function(t,e){if(t.hasModifier(Ua.Exported)&&t.value instanceof Sa&&!t.type){var n=t.value.value,r=n.name,i=n.moduleName;if(i){var o=this.reexports.get(i);return o||(o=[],this.reexports.set(i,o)),o.push({name:r,as:t.name}),null}}return t.hasModifier(Ua.Exported)&&e.print(t,"export "),t.hasModifier(Ua.Final)?e.print(t,"const"):e.print(t,"var"),e.print(t," "+t.name),this._printColonType(t.type,e),e.print(t," = "),t.value.visitExpression(this,e),e.println(t,";"),null},e.prototype.visitCastExpr=function(t,e){return e.print(t,"(<"),t.type.visitType(this,e),e.print(t,">"),t.value.visitExpression(this,e),e.print(t,")"),null},e.prototype.visitInstantiateExpr=function(t,e){return e.print(t,"new "),this.typeExpression++,t.classExpr.visitExpression(this,e),this.typeExpression--,e.print(t,"("),this.visitAllExpressions(t.args,e,","),e.print(t,")"),null},e.prototype.visitDeclareClassStmt=function(t,e){var n=this;return e.pushClass(t),t.hasModifier(Ua.Exported)&&e.print(t,"export "),e.print(t,"class "+t.name),null!=t.parent&&(e.print(t," extends "),this.typeExpression++,t.parent.visitExpression(this,e),this.typeExpression--),e.println(t," {"),e.incIndent(),t.fields.forEach(function(t){return n._visitClassField(t,e)}),null!=t.constructorMethod&&this._visitClassConstructor(t,e),t.getters.forEach(function(t){return n._visitClassGetter(t,e)}),t.methods.forEach(function(t){return n._visitClassMethod(t,e)}),e.decIndent(),e.println(t,"}"),e.popClass(),null},e.prototype._visitClassField=function(t,e){t.hasModifier(Ua.Private)&&e.print(null,"/*private*/ "),e.print(null,t.name),this._printColonType(t.type,e),e.println(null,";")},e.prototype._visitClassGetter=function(t,e){t.hasModifier(Ua.Private)&&e.print(null,"private "),e.print(null,"get "+t.name+"()"),this._printColonType(t.type,e),e.println(null," {"),e.incIndent(),this.visitAllStatements(t.body,e),e.decIndent(),e.println(null,"}")},e.prototype._visitClassConstructor=function(t,e){e.print(t,"constructor("),this._visitParams(t.constructorMethod.params,e),e.println(t,") {"),e.incIndent(),this.visitAllStatements(t.constructorMethod.body,e),e.decIndent(),e.println(t,"}")},e.prototype._visitClassMethod=function(t,e){t.hasModifier(Ua.Private)&&e.print(null,"private "),e.print(null,t.name+"("),this._visitParams(t.params,e),e.print(null,")"),this._printColonType(t.type,e,"void"),e.println(null," {"),e.incIndent(),this.visitAllStatements(t.body,e),e.decIndent(),e.println(null,"}")},e.prototype.visitFunctionExpr=function(t,e){return e.print(t,"("),this._visitParams(t.params,e),e.print(t,")"),this._printColonType(t.type,e,"void"),e.println(t," => {"),e.incIndent(),this.visitAllStatements(t.statements,e),e.decIndent(),e.print(t,"}"),null},e.prototype.visitDeclareFunctionStmt=function(t,e){return t.hasModifier(Ua.Exported)&&e.print(t,"export "),e.print(t,"function "+t.name+"("),this._visitParams(t.params,e),e.print(t,")"),this._printColonType(t.type,e,"void"),e.println(t," {"),e.incIndent(),this.visitAllStatements(t.statements,e),e.decIndent(),e.println(t,"}"),null},e.prototype.visitTryCatchStmt=function(t,e){e.println(t,"try {"),e.incIndent(),this.visitAllStatements(t.bodyStmts,e),e.decIndent(),e.println(t,"} catch ("+Gs.name+") {"),e.incIndent();var n=[Ws.set(Gs.prop("stack",null)).toDeclStmt(null,[Ua.Final])].concat(t.catchStmts);return this.visitAllStatements(n,e),e.decIndent(),e.println(t,"}"),null},e.prototype.visitBuiltintType=function(t,e){var n;switch(t.name){case na.Bool:n="boolean";break;case na.Dynamic:n="any";break;case na.Function:n="Function";break;case na.Number:case na.Int:n="number";break;case na.String:n="string";break;default:throw new Error("Unsupported builtin type "+t.name)}return e.print(null,n),null},e.prototype.visitExpressionType=function(t,e){return t.value.visitExpression(this,e),null},e.prototype.visitArrayType=function(t,e){return this.visitType(t.of,e),e.print(null,"[]"),null},e.prototype.visitMapType=function(t,e){return e.print(null,"{[key: string]:"),this.visitType(t.valueType,e),e.print(null,"}"),null},e.prototype.getBuiltinMethodName=function(t){var e;switch(t){case ba.ConcatArray:e="concat";break;case ba.SubscribeObservable:e="subscribe";break;case ba.Bind:e="bind";break;default:throw new Error("Unknown builtin method: "+t)}return e},e.prototype._visitParams=function(t,e){var n=this;this.visitAllObjects(function(t){e.print(null,t.name),n._printColonType(t.type,e)},t,e,",")},e.prototype._visitIdentifier=function(t,e,n){var r=this,i=t.name,o=t.moduleName;if(this.referenceFilter&&this.referenceFilter(t))n.print(null,"(null as any)");else{if(o){var a=this.importsWithPrefixes.get(o);null==a&&(a="i"+this.importsWithPrefixes.size,this.importsWithPrefixes.set(o,a)),n.print(null,a+".")}if(n.print(null,i),this.typeExpression>0)(e||[]).length>0&&(n.print(null,"<"),this.visitAllObjects(function(t){return t.visitType(r,n)},e,n,","),n.print(null,">"))}},e.prototype._printColonType=function(t,e,n){t!==la&&(e.print(null,":"),this.visitType(t,e,n))},e}($s),tl=function(){function t(t){this._reflector=t}return t.prototype.isPipe=function(t){var e=this._reflector.annotations(Q(t));return e&&e.some(m.isTypeOf)},t.prototype.resolve=function(t,e){void 0===e&&(e=!0);var n=this._reflector.annotations(Q(t));if(n){var r=Ve(n,m.isTypeOf);if(r)return r}if(e)throw new Error("No Pipe decorator found on "+K(t));return null},t}(),el={};function nl(t,e){for(var n=0,r=e;n<r.length;n++){var i=r[n];el[i.toLowerCase()]=t}}nl(A.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),nl(A.STYLE,["*|style"]),nl(A.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","img|srcset","input|src","ins|cite","q|cite","source|src","source|srcset","track|src","video|poster","video|src"]),nl(A.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"]);var rl=function(){},il="boolean",ol="number",al="string",sl="object",ll=["[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume",":svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type","select^[HTMLElement]|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","shadow^[HTMLElement]|","slot^[HTMLElement]|name","source^[HTMLElement]|media,sizes,src,srcset,type","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|#height,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],cl={class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},ul=function(t){function e(){var e=t.call(this)||this;return e._schema={},ll.forEach(function(t){var n={},r=t.split("|"),i=r[0],o=r[1].split(","),a=i.split("^"),s=a[0],l=a[1];s.split(",").forEach(function(t){return e._schema[t.toLowerCase()]=n});var c=l&&e._schema[l.toLowerCase()];c&&Object.keys(c).forEach(function(t){n[t]=c[t]}),o.forEach(function(t){if(t.length>0)switch(t[0]){case"*":break;case"!":n[t.substring(1)]=il;break;case"#":n[t.substring(1)]=ol;break;case"%":n[t.substring(1)]=sl;break;default:n[t]=al}})}),e}return n(e,t),e.prototype.hasProperty=function(t,e,n){if(n.some(function(t){return t.name===C.name}))return!0;if(t.indexOf("-")>-1){if(me(t)||ge(t))return!1;if(n.some(function(t){return t.name===w.name}))return!0}return!!(this._schema[t.toLowerCase()]||this._schema.unknown)[e]},e.prototype.hasElement=function(t,e){if(e.some(function(t){return t.name===C.name}))return!0;if(t.indexOf("-")>-1){if(me(t)||ge(t))return!0;if(e.some(function(t){return t.name===w.name}))return!0}return!!this._schema[t.toLowerCase()]},e.prototype.securityContext=function(t,e,n){n&&(e=this.getMappedPropName(e)),t=t.toLowerCase(),e=e.toLowerCase();var r=el[t+"|"+e];return r||((r=el["*|"+e])||A.NONE)},e.prototype.getMappedPropName=function(t){return cl[t]||t},e.prototype.getDefaultComponentElementName=function(){return"ng-component"},e.prototype.validateProperty=function(t){return t.toLowerCase().startsWith("on")?{error:!0,msg:"Binding to event property '"+t+"' is disallowed for security reasons, please use ("+t.slice(2)+")=...\nIf '"+t+"' is a directive input, make sure the directive is imported by the current module."}:{error:!1}},e.prototype.validateAttribute=function(t){return t.toLowerCase().startsWith("on")?{error:!0,msg:"Binding to event attribute '"+t+"' is disallowed for security reasons, please use ("+t.slice(2)+")=..."}:{error:!1}},e.prototype.allKnownElementNames=function(){return Object.keys(this._schema)},e.prototype.normalizeAnimationStyleProperty=function(t){return t.replace(I,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t[1].toUpperCase()})},e.prototype.normalizeAnimationStyleValue=function(t,e,n){var r="",i=n.toString().trim(),o=null;if(function(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}(t)&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{var a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&(o="Please provide a CSS unit value for "+e+":"+n)}return{error:o,value:i+r}},e}(rl);var pl=function(){function t(){this.strictStyling=!0}return t.prototype.shimCssText=function(t,e,n){void 0===n&&(n="");var r=t.match(Dl)||[];return t=t.replace(Al,""),t=this._insertDirectives(t),[this._scopeCssText(t,e,n)].concat(r).join("\n")},t.prototype._insertDirectives=function(t){return t=this._insertPolyfillDirectivesInCssText(t),this._insertPolyfillRulesInCssText(t)},t.prototype._insertPolyfillDirectivesInCssText=function(t){return t.replace(hl,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t[2]+"{"})},t.prototype._insertPolyfillRulesInCssText=function(t){return t.replace(fl,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0].replace(t[1],"").replace(t[2],"");return t[4]+n})},t.prototype._scopeCssText=function(t,e,n){var r=this._extractUnscopedRulesFromCssText(t);return t=this._insertPolyfillHostInCssText(t),t=this._convertColonHost(t),t=this._convertColonHostContext(t),t=this._convertShadowDOMSelectors(t),e&&(t=this._scopeSelectors(t,e,n)),(t=t+"\n"+r).trim()},t.prototype._extractUnscopedRulesFromCssText=function(t){var e,n="";for(ml.lastIndex=0;null!==(e=ml.exec(t));){n+=e[0].replace(e[2],"").replace(e[1],e[4])+"\n\n"}return n},t.prototype._convertColonHost=function(t){return this._convertColonRule(t,bl,this._colonHostPartReplacer)},t.prototype._convertColonHostContext=function(t){return this._convertColonRule(t,_l,this._colonHostContextPartReplacer)},t.prototype._convertColonRule=function(t,e,n){return t.replace(e,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t[2]){for(var r=t[2].split(","),i=[],o=0;o<r.length;o++){var a=r[o].trim();if(!a)break;i.push(n(wl,a,t[3]))}return i.join(",")}return wl+t[3]})},t.prototype._colonHostContextPartReplacer=function(t,e,n){return e.indexOf(gl)>-1?this._colonHostPartReplacer(t,e,n):t+e+n+", "+e+" "+t+n},t.prototype._colonHostPartReplacer=function(t,e,n){return t+e.replace(gl,"")+n},t.prototype._convertShadowDOMSelectors=function(t){return xl.reduce(function(t,e){return t.replace(e," ")},t)},t.prototype._scopeSelectors=function(t,e,n){var r,i,o,a=this;return r=function(t){var r=t.selector,i=t.content;return"@"!=t.selector[0]?r=a._scopeSelector(t.selector,e,n,a.strictStyling):(t.selector.startsWith("@media")||t.selector.startsWith("@supports")||t.selector.startsWith("@page")||t.selector.startsWith("@document"))&&(i=a._scopeSelectors(t.content,e,n)),new Ll(r,i)},i=function(t){for(var e=t.split(Ml),n=[],r=[],i=0,o=[],a=0;a<e.length;a++){var s=e[a];s==Rl&&i--,i>0?o.push(s):(o.length>0&&(r.push(o.join("")),n.push(Nl),o=[]),n.push(s)),s==Il&&i++}o.length>0&&(r.push(o.join("")),n.push(Nl));return new jl(n.join(""),r)}(t),o=0,i.escapedString.replace(Tl,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[2],a="",s=t[4],l="";s&&s.startsWith("{"+Nl)&&(a=i.blocks[o++],s=s.substring(Nl.length+1),l="{");var c=r(new Ll(n,a));return""+t[1]+c.selector+t[3]+l+c.content+s})},t.prototype._scopeSelector=function(t,e,n,r){var i=this;return t.split(",").map(function(t){return t.trim().split(Sl)}).map(function(t){var o,a=t[0],s=t.slice(1);return[(o=a,i._selectorNeedsScoping(o,e)?r?i._applyStrictSelectorScope(o,e,n):i._applySelectorScope(o,e,n):o)].concat(s).join(" ")}).join(", ")},t.prototype._selectorNeedsScoping=function(t,e){return!this._makeScopeMatcher(e).test(t)},t.prototype._makeScopeMatcher=function(t){return t=t.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+t+")"+El,"m")},t.prototype._applySelectorScope=function(t,e,n){return this._applySimpleSelectorScope(t,e,n)},t.prototype._applySimpleSelectorScope=function(t,e,n){if(kl.lastIndex=0,kl.test(t)){var r=this.strictStyling?"["+n+"]":e;return t.replace(Cl,function(t,e){return e.replace(/([^:]*)(:*)(.*)/,function(t,e,n,i){return e+r+n+i})}).replace(kl,r+" ")}return e+" "+t},t.prototype._applyStrictSelectorScope=function(t,e,n){for(var r,i=this,o="["+(e=e.replace(/\[is=([^\]]*)\]/g,function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e[0]}))+"]",a=function(t){var r=t.trim();if(!r)return"";if(t.indexOf(wl)>-1)r=i._applySimpleSelectorScope(t,e,n);else{var a=t.replace(kl,"");if(a.length>0){var s=a.match(/([^:]*)(:*)(.*)/);s&&(r=s[1]+o+s[2]+s[3])}}return r},s=new dl(t),l="",c=0,u=/( |>|\+|~(?!=))\s*/g,p=!((t=s.content()).indexOf(wl)>-1);null!==(r=u.exec(t));){var d=r[1],h=t.slice(c,r.index).trim();l+=((p=p||h.indexOf(wl)>-1)?a(h):h)+" "+d+" ",c=u.lastIndex}var f=t.substring(c);return l+=(p=p||f.indexOf(wl)>-1)?a(f):f,s.restore(l)},t.prototype._insertPolyfillHostInCssText=function(t){return t.replace(Pl,yl).replace(Ol,gl)},t}(),dl=function(){function t(t){var e=this;this.placeholders=[],this.index=0,t=t.replace(/(\[[^\]]*\])/g,function(t,n){var r="__ph-"+e.index+"__";return e.placeholders.push(n),e.index++,r}),this._content=t.replace(/(:nth-[-\w]+)(\([^)]+\))/g,function(t,n,r){var i="__ph-"+e.index+"__";return e.placeholders.push(r),e.index++,n+i})}return t.prototype.restore=function(t){var e=this;return t.replace(/__ph-(\d+)__/g,function(t,n){return e.placeholders[+n]})},t.prototype.content=function(){return this._content},t}(),hl=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,fl=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,ml=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,gl="-shadowcsshost",yl="-shadowcsscontext",vl=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",bl=new RegExp("("+gl+vl,"gim"),_l=new RegExp("("+yl+vl,"gim"),wl=gl+"-no-combinator",Cl=/-shadowcsshost-no-combinator([^\s]*)/,xl=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],Sl=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,El="([>\\s~+[.,{:][\\s\\S]*)?$",kl=/-shadowcsshost/gim,Ol=/:host/gim,Pl=/:host-context/gim,Al=/\/\*\s*[\s\S]*?\*\//g;var Dl=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;var Tl=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,Ml=/([{}])/g,Il="{",Rl="}",Nl="%BLOCK%",Ll=function(t,e){this.selector=t,this.content=e};var jl=function(t,e){this.escapedString=t,this.blocks=e};var Fl=function(t,e,n){this.name=t,this.moduleUrl=e,this.setValue=n},Vl=function(t,e,n,r,i){this.outputCtx=t,this.stylesVar=e,this.dependencies=n,this.isShimmed=r,this.meta=i},Bl=function(){function t(t){this._urlResolver=t,this._shadowCss=new pl}return t.prototype.compileComponent=function(t,e){var n=e.template;return this._compileStyles(t,e,new Rt({styles:n.styles,styleUrls:n.styleUrls,moduleUrl:kt(e.type)}),this.needsStyleShim(e),!0)},t.prototype.compileStyles=function(t,e,n,r){return void 0===r&&(r=this.needsStyleShim(e)),this._compileStyles(t,e,n,r,!1)},t.prototype.needsStyleShim=function(t){return t.template.encapsulation===d.Emulated},t.prototype._compileStyles=function(t,e,n,r,i){var o=this,a=n.styles.map(function(t){return gs(o._shimIfNeeded(t,r))}),s=[];n.styleUrls.forEach(function(e){var n=a.length;a.push(null),s.push(new Fl(Ul(null),e,function(e){return a[n]=t.importExpr(e)}))});var l=Ul(i?e:null),c=cs(l).set(hs(a,new oa(sa,[ta.Const]))).toDeclStmt(null,i?[Ua.Final]:[Ua.Final,Ua.Exported]);return t.statements.push(c),new Vl(t,l,s,r,n)},t.prototype._shimIfNeeded=function(t,e){return e?this._shadowCss.shimCssText(t,"_ngcontent-%COMP%","_nghost-%COMP%"):t},t}();function Ul(t){var e="styles";return t&&(e+="_"+Et(t.type)),e}var Hl="ngPreserveWhitespaces",zl=new Set(["pre","template","textarea","script","style"]),Gl=" \f\n\r\t\v ᠎ - \u2028\u2029   \ufeff",Wl=new RegExp("[^"+Gl+"]"),ql=new RegExp("["+Gl+"]{2,}","g");function Yl(t){return t.replace(new RegExp(we,"g")," ")}var $l=function(){function t(){}return t.prototype.visitElement=function(t,e){return zl.has(t.name)||t.attrs.some(function(t){return t.name===Hl})?new Jt(t.name,ee(this,t.attrs),t.children,t.sourceSpan,t.startSourceSpan,t.endSourceSpan):new Jt(t.name,t.attrs,ee(this,t.children),t.sourceSpan,t.startSourceSpan,t.endSourceSpan)},t.prototype.visitAttribute=function(t,e){return t.name!==Hl?t:null},t.prototype.visitText=function(t,e){return t.value.match(Wl)?new Kt(Yl(t.value).replace(ql," "),t.sourceSpan):null},t.prototype.visitComment=function(t,e){return t},t.prototype.visitExpansion=function(t,e){return t},t.prototype.visitExpansionCase=function(t,e){return t},t}();var Kl=["zero","one","two","few","many","other"];function Ql(t){var e=new Jl;return new Xl(ee(e,t),e.isExpanded,e.errors)}var Xl=function(t,e,n){this.nodes=t,this.expanded=e,this.errors=n},Zl=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e}(Cr),Jl=function(){function t(){this.isExpanded=!1,this.errors=[]}return t.prototype.visitElement=function(t,e){return new Jt(t.name,t.attrs,ee(this,t.children),t.sourceSpan,t.startSourceSpan,t.endSourceSpan)},t.prototype.visitAttribute=function(t,e){return t},t.prototype.visitText=function(t,e){return t},t.prototype.visitComment=function(t,e){return t},t.prototype.visitExpansion=function(t,e){return this.isExpanded=!0,"plural"==t.type?(a=t,s=this.errors,l=a.cases.map(function(t){-1!=Kl.indexOf(t.value)||t.value.match(/^=\d+$/)||s.push(new Zl(t.valueSourceSpan,'Plural cases should be "=<number>" or one of '+Kl.join(", ")));var e=Ql(t.expression);return s.push.apply(s,e.errors),new Jt("ng-template",[new Zt("ngPluralCase",""+t.value,t.valueSourceSpan)],e.nodes,t.sourceSpan,t.sourceSpan,t.sourceSpan)}),c=new Zt("[ngPlural]",a.switchValue,a.switchValueSourceSpan),new Jt("ng-container",[c],l,a.sourceSpan,a.sourceSpan,a.sourceSpan)):(n=t,r=this.errors,i=n.cases.map(function(t){var e=Ql(t.expression);return r.push.apply(r,e.errors),"other"===t.value?new Jt("ng-template",[new Zt("ngSwitchDefault","",t.valueSourceSpan)],e.nodes,t.sourceSpan,t.sourceSpan,t.sourceSpan):new Jt("ng-template",[new Zt("ngSwitchCase",""+t.value,t.valueSourceSpan)],e.nodes,t.sourceSpan,t.sourceSpan,t.sourceSpan)}),o=new Zt("[ngSwitch]",n.switchValue,n.switchValueSourceSpan),new Jt("ng-container",[o],i,n.sourceSpan,n.sourceSpan,n.sourceSpan));var n,r,i,o,a,s,l,c},t.prototype.visitExpansionCase=function(t,e){throw new Error("Should not be reached")},t}();var tc={DEFAULT:0,LITERAL_ATTR:1,ANIMATION:2};tc[tc.DEFAULT]="DEFAULT",tc[tc.LITERAL_ATTR]="LITERAL_ATTR",tc[tc.ANIMATION]="ANIMATION";var ec=function(t,e,n,r){this.name=t,this.expression=e,this.type=n,this.sourceSpan=r,this.isLiteral=this.type===tc.LITERAL_ATTR,this.isAnimation=this.type===tc.ANIMATION},nc=function(){function t(t,e,n,r,i){var o=this;this._exprParser=t,this._interpolationConfig=e,this._schemaRegistry=n,this._targetErrors=i,this.pipesByName=new Map,this._usedPipes=new Map,r.forEach(function(t){return o.pipesByName.set(t.name,t)})}return t.prototype.getUsedPipes=function(){return Array.from(this._usedPipes.values())},t.prototype.createDirectiveHostPropertyAsts=function(t,e,n){var r=this;if(t.hostProperties){var i=[];return Object.keys(t.hostProperties).forEach(function(e){var o=t.hostProperties[e];"string"==typeof o?r.parsePropertyBinding(e,o,!0,n,[],i):r._reportError('Value of the host property binding "'+e+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",n)}),i.map(function(t){return r.createElementPropertyAst(e,t)})}return null},t.prototype.createDirectiveHostEventAsts=function(t,e){var n=this;if(t.hostListeners){var r=[];return Object.keys(t.hostListeners).forEach(function(i){var o=t.hostListeners[i];"string"==typeof o?n.parseEvent(i,o,e,[],r):n._reportError('Value of the host listener "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",e)}),r}return null},t.prototype.parseInterpolation=function(t,e){var n=e.start.toString();try{var r=this._exprParser.parseInterpolation(t,n,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,e),this._checkPipes(r,e),r}catch(t){return this._reportError(""+t,e),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},t.prototype.parseInlineTemplateBinding=function(t,e,n,r,i,o){for(var a=this._parseTemplateBindings(t,e,n),s=0;s<a.length;s++){var l=a[s];l.keyIsVar?o.push(new at(l.key,l.name,n)):l.expression?this._parsePropertyAst(l.key,l.expression,n,r,i):(r.push([l.key,""]),this.parseLiteralAttr(l.key,null,n,r,i))}},t.prototype._parseTemplateBindings=function(t,e,n){var r=this,i=n.start.toString();try{var o=this._exprParser.parseTemplateBindings(t,e,i);return this._reportExpressionParserErrors(o.errors,n),o.templateBindings.forEach(function(t){t.expression&&r._checkPipes(t.expression,n)}),o.warnings.forEach(function(t){r._reportError(t,n,wr.WARNING)}),o.templateBindings}catch(t){return this._reportError(""+t,n),[]}},t.prototype.parseLiteralAttr=function(t,e,n,r,i){ic(t)?(t=t.substring(1),e&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',n,wr.ERROR),this._parseAnimation(t,e,n,r,i)):i.push(new ec(t,this._exprParser.wrapLiteralPrimitive(e,""),tc.LITERAL_ATTR,n))},t.prototype.parsePropertyBinding=function(t,e,n,r,i,o){var a=!1;t.startsWith("animate-")?(a=!0,t=t.substring("animate-".length)):ic(t)&&(a=!0,t=t.substring(1)),a?this._parseAnimation(t,e,r,i,o):this._parsePropertyAst(t,this._parseBinding(e,n,r),r,i,o)},t.prototype.parsePropertyInterpolation=function(t,e,n,r,i){var o=this.parseInterpolation(e,n);return!!o&&(this._parsePropertyAst(t,o,n,r,i),!0)},t.prototype._parsePropertyAst=function(t,e,n,r,i){r.push([t,e.source]),i.push(new ec(t,e,tc.DEFAULT,n))},t.prototype._parseAnimation=function(t,e,n,r,i){var o=this._parseBinding(e||"undefined",!1,n);r.push([t,o.source]),i.push(new ec(t,o,tc.ANIMATION,n))},t.prototype._parseBinding=function(t,e,n){var r=n.start.toString();try{var i=e?this._exprParser.parseSimpleBinding(t,r,this._interpolationConfig):this._exprParser.parseBinding(t,r,this._interpolationConfig);return i&&this._reportExpressionParserErrors(i.errors,n),this._checkPipes(i,n),i}catch(t){return this._reportError(""+t,n),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},t.prototype.createElementPropertyAst=function(t,e){if(e.isAnimation)return new rt(e.name,ft.Animation,A.NONE,e.expression,null,e.sourceSpan);var n=null,r=void 0,i=null,o=e.name.split("."),a=void 0;if(o.length>1)if("attr"==o[0]){i=o[1],this._validatePropertyOrAttributeName(i,e.sourceSpan,!0),a=oc(this._schemaRegistry,t,i,!0);var s=i.indexOf(":");if(s>-1)i=be(i.substring(0,s),i.substring(s+1));r=ft.Attribute}else"class"==o[0]?(i=o[1],r=ft.Class,a=[A.NONE]):"style"==o[0]&&(n=o.length>2?o[2]:null,i=o[1],r=ft.Style,a=[A.STYLE]);return null===i&&(i=this._schemaRegistry.getMappedPropName(e.name),a=oc(this._schemaRegistry,t,i,!1),r=ft.Property,this._validatePropertyOrAttributeName(i,e.sourceSpan,!1)),new rt(i,r,a[0],e.expression,n,e.sourceSpan)},t.prototype.parseEvent=function(t,e,n,r,i){ic(t)?(t=t.substr(1),this._parseAnimationEvent(t,e,n,i)):this._parseEvent(t,e,n,r,i)},t.prototype._parseAnimationEvent=function(t,e,n,r){var i=N(t,".",[t,""]),o=i[0],a=i[1].toLowerCase();if(a)switch(a){case"start":case"done":var s=this._parseAction(e,n);r.push(new it(o,null,a,s,n));break;default:this._reportError('The provided animation output phase value "'+a+'" for "@'+o+'" is not supported (use start or done)',n)}else this._reportError("The animation trigger output event (@"+o+") is missing its phase value name (start or done are currently supported)",n)},t.prototype._parseEvent=function(t,e,n,r,i){var o=R(t,[null,t]),a=o[0],s=o[1],l=this._parseAction(e,n);r.push([t,l.source]),i.push(new it(s,a,null,l,n))},t.prototype._parseAction=function(t,e){var n=e.start.toString();try{var r=this._exprParser.parseAction(t,n,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,e),!r||r.ast instanceof Un?(this._reportError("Empty expressions are not allowed",e),this._exprParser.wrapLiteralPrimitive("ERROR",n)):(this._checkPipes(r,e),r)}catch(t){return this._reportError(""+t,e),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},t.prototype._reportError=function(t,e,n){void 0===n&&(n=wr.ERROR),this._targetErrors.push(new Cr(e,t,n))},t.prototype._reportExpressionParserErrors=function(t,e){for(var n=0,r=t;n<r.length;n++){var i=r[n];this._reportError(i.message,e)}},t.prototype._checkPipes=function(t,e){var n=this;if(t){var r=new rc;t.visit(r),r.pipes.forEach(function(t,r){var i=n.pipesByName.get(r);i?n._usedPipes.set(r,i):n._reportError("The pipe '"+r+"' could not be found",new _r(e.start.moveBy(t.span.start),e.start.moveBy(t.span.end)))})}},t.prototype._validatePropertyOrAttributeName=function(t,e,n){var r=n?this._schemaRegistry.validateAttribute(t):this._schemaRegistry.validateProperty(t);r.error&&this._reportError(r.msg,e,wr.ERROR)},t}(),rc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pipes=new Map,e}return n(e,t),e.prototype.visitPipe=function(t,e){return this.pipes.set(t.name,t),t.exp.visit(this),this.visitAll(t.args,e),null},e}(ur);function ic(t){return"@"==t[0]}function oc(t,e,n,r){var i=[];return Go.parse(e).forEach(function(e){var o=e.element?[e.element]:t.allKnownElementNames(),a=new Set(e.notSelectors.filter(function(t){return t.isElementSelector()}).map(function(t){return t.element})),s=o.filter(function(t){return!a.has(t)});i.push.apply(i,s.map(function(e){return t.securityContext(e,n,r)}))}),0===i.length?[A.NONE]:Array.from(new Set(i)).sort()}var ac=/^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/,sc="template",lc="class",cc=Go.parse("*")[0],uc="The <template> element is deprecated. Use <ng-template> instead",pc="The template attribute is deprecated. Use an ng-template element instead.",dc={};var hc=function(t){function e(e,n,r){return t.call(this,n,e,r)||this}return n(e,t),e}(Cr),fc=function(t,e,n){this.templateAst=t,this.usedPipes=e,this.errors=n},mc=function(){function t(t,e,n,r,i,o,a){this._config=t,this._reflector=e,this._exprParser=n,this._schemaRegistry=r,this._htmlParser=i,this._console=o,this.transforms=a}return t.prototype.parse=function(t,e,n,r,i,o,a){var s,l=this.tryParse(t,e,n,r,i,o,a),c=l.errors.filter(function(t){return t.level===wr.WARNING}).filter((s=[pc,uc],function(t){return-1===s.indexOf(t.msg)||(dc[t.msg]=(dc[t.msg]||0)+1,dc[t.msg]<=1)})),u=l.errors.filter(function(t){return t.level===wr.ERROR});if(c.length>0&&this._console.warn("Template parse warnings:\n"+c.join("\n")),u.length>0)throw z("Template parse errors:\n"+u.join("\n"),u);return{template:l.templateAst,pipes:l.usedPipes}},t.prototype.tryParse=function(t,e,n,r,i,o,a){var s,l="string"==typeof e?this._htmlParser.parse(e,o,!0,this.getInterpolationConfig(t)):e;return a||(s=l,l=new Br(ee(new $l,s.rootNodes),s.errors)),this.tryParseHtml(this.expandHtml(l),t,n,r,i)},t.prototype.tryParseHtml=function(t,e,n,r,i){var o,a=t.errors,s=[];if(t.rootNodes.length>0){var l=Ec(n),c=Ec(r),u=new vs(this._reflector,e),p=void 0;e.template&&e.template.interpolation&&(p={start:e.template.interpolation[0],end:e.template.interpolation[1]});var d=new nc(this._exprParser,p,this._schemaRegistry,c,a),h=new gc(this._reflector,this._config,u,l,d,this._schemaRegistry,i,a);o=ee(h,t.rootNodes,Cc),a.push.apply(a,u.errors),s.push.apply(s,d.getUsedPipes())}else o=[];return this._assertNoReferenceDuplicationOnTemplate(o,a),a.length>0?new fc(o,s,a):(this.transforms&&this.transforms.forEach(function(t){o=yt(t,o)}),new fc(o,s,a))},t.prototype.expandHtml=function(t,e){void 0===e&&(e=!1);var n=t.errors;if(0==n.length||e){var r=Ql(t.rootNodes);n.push.apply(n,r.errors),t=new Br(r.nodes,n)}return t},t.prototype.getInterpolationConfig=function(t){if(t.template)return ae.fromArray(t.template.interpolation)},t.prototype._assertNoReferenceDuplicationOnTemplate=function(t,e){var n=[];t.filter(function(t){return!!t.references}).forEach(function(t){return t.references.forEach(function(t){var r=t.name;if(n.indexOf(r)<0)n.push(r);else{var i=new hc('Reference "#'+r+'" is defined several times',t.sourceSpan,wr.ERROR);e.push(i)}})})},t}(),gc=function(){function t(t,e,n,r,i,o,a,s){var l=this;this.reflector=t,this.config=e,this.providerViewContext=n,this._bindingParser=i,this._schemaRegistry=o,this._schemas=a,this._targetErrors=s,this.selectorMatcher=new Wo,this.directivesIndex=new Map,this.ngContentCount=0,this.contentQueryStartId=n.component.viewQueries.length+1,r.forEach(function(t,e){var n=Go.parse(t.selector);l.selectorMatcher.addSelectables(n,t),l.directivesIndex.set(t,e)})}return t.prototype.visitExpansion=function(t,e){return null},t.prototype.visitExpansionCase=function(t,e){return null},t.prototype.visitText=function(t,e){var n=e.findNgContentIndex(cc),r=Yl(t.value),i=this._bindingParser.parseInterpolation(r,t.sourceSpan);return i?new et(i,n,t.sourceSpan):new tt(r,n,t.sourceSpan)},t.prototype.visitAttribute=function(t,e){return new nt(t.name,t.value,t.sourceSpan)},t.prototype.visitComment=function(t,e){return null},t.prototype.visitElement=function(t,e){var n=this,r=this.contentQueryStartId,i=t.name,o=Te(t);if(o.type===Me.SCRIPT||o.type===Me.STYLE)return null;if(o.type===Me.STYLESHEET&&ce(o.hrefAttr))return null;var a=[],s=[],l=[],c=[],u=[],p=[],d=[],h=[],f=!1,m=[],g=function(t,e,n){if(ye(t.name))return!0;var r=fe(t.name)[1];if(r.toLowerCase()===sc&&e&&r.toLowerCase()===sc)return n(uc,t.sourceSpan),!0;return!1}(t,this.config.enableLegacyTemplate,function(t,e){return n._reportError(t,e,wr.WARNING)});t.attrs.forEach(function(t){var e,r,i=n._parseAttr(g,t,a,s,u,l,c),o=n._normalizeAttributeName(t.name);n.config.enableLegacyTemplate&&"template"==o?(n._reportError(pc,t.sourceSpan,wr.WARNING),e=t.value):o.startsWith("*")&&(e=t.value,r=o.substring("*".length)+":");var y=null!=e;y&&(f&&n._reportError("Can't have multiple template bindings on one element. Use only one attribute named 'template' or prefixed with *",t.sourceSpan),f=!0,n._bindingParser.parseInlineTemplateBinding(r,e,t.sourceSpan,d,p,h)),i||y||(m.push(n.visitAttribute(t,null)),a.push([t.name,t.value]))});var y=wc(i,a),v=this._parseDirectives(this.selectorMatcher,y),b=v.directives,_=v.matchElement,w=[],C=new Set,x=this._createDirectiveAsts(g,t.name,b,s,l,t.sourceSpan,w,C),S=this._createElementPropertyAsts(t.name,s,C),E=e.isTemplateElement||f,k=new bs(this.providerViewContext,e.providerContext,E,x,m,w,g,r,t.sourceSpan),O=ee(o.nonBindable?xc:this,t.children,_c.create(g,x,g?e.providerContext:k));k.afterElement();var P,A=null!=o.projectAs?Go.parse(o.projectAs)[0]:y,D=e.findNgContentIndex(A);if(o.type===Me.NG_CONTENT)t.children&&!t.children.every(Sc)&&this._reportError("<ng-content> element cannot have content.",t.sourceSpan),P=new ht(this.ngContentCount++,f?null:D,t.sourceSpan);else if(g)this._assertAllEventsPublishedByDirectives(x,u),this._assertNoComponentsNorElementBindingsOnTemplate(x,S,t.sourceSpan),P=new lt(m,u,w,c,k.transformedDirectiveAsts,k.transformProviders,k.transformedHasViewContainer,k.queryMatches,O,f?null:D,t.sourceSpan);else{this._assertElementExists(_,t),this._assertOnlyOneComponent(x,t.sourceSpan);var T=f?null:e.findNgContentIndex(A);P=new st(i,m,S,u,w,k.transformedDirectiveAsts,k.transformProviders,k.transformedHasViewContainer,k.queryMatches,O,f?null:T,t.sourceSpan,t.endSourceSpan||null)}if(f){var M=this.contentQueryStartId,I=wc(sc,d),R=this._parseDirectives(this.selectorMatcher,I).directives,N=new Set,L=this._createDirectiveAsts(!0,t.name,R,p,[],t.sourceSpan,[],N),j=this._createElementPropertyAsts(t.name,p,N);this._assertNoComponentsNorElementBindingsOnTemplate(L,j,t.sourceSpan);var F=new bs(this.providerViewContext,e.providerContext,e.isTemplateElement,L,[],[],!0,M,t.sourceSpan);F.afterElement(),P=new lt([],[],[],h,F.transformedDirectiveAsts,F.transformProviders,F.transformedHasViewContainer,F.queryMatches,[P],D,t.sourceSpan)}return P},t.prototype._parseAttr=function(t,e,n,r,i,o,a){var s=this._normalizeAttributeName(e.name),l=e.value,c=e.sourceSpan,u=s.match(ac),p=!1;if(null!==u)if(p=!0,null!=u[1])this._bindingParser.parsePropertyBinding(u[7],l,!1,c,n,r);else if(u[2])if(t){var d=u[7];this._parseVariable(d,l,c,a)}else this._reportError('"let-" is only supported on ng-template elements.',c);else if(u[3]){d=u[7];this._parseReference(d,l,c,o)}else u[4]?this._bindingParser.parseEvent(u[7],l,c,n,i):u[5]?(this._bindingParser.parsePropertyBinding(u[7],l,!1,c,n,r),this._parseAssignmentEvent(u[7],l,c,n,i)):u[6]?this._bindingParser.parseLiteralAttr(s,l,c,n,r):u[8]?(this._bindingParser.parsePropertyBinding(u[8],l,!1,c,n,r),this._parseAssignmentEvent(u[8],l,c,n,i)):u[9]?this._bindingParser.parsePropertyBinding(u[9],l,!1,c,n,r):u[10]&&this._bindingParser.parseEvent(u[10],l,c,n,i);else p=this._bindingParser.parsePropertyInterpolation(s,l,c,n,r);return p||this._bindingParser.parseLiteralAttr(s,l,c,n,r),p},t.prototype._normalizeAttributeName=function(t){return/^data-/i.test(t)?t.substring(5):t},t.prototype._parseVariable=function(t,e,n,r){t.indexOf("-")>-1&&this._reportError('"-" is not allowed in variable names',n),r.push(new at(t,e,n))},t.prototype._parseReference=function(t,e,n,r){t.indexOf("-")>-1&&this._reportError('"-" is not allowed in reference names',n),r.push(new vc(t,e,n))},t.prototype._parseAssignmentEvent=function(t,e,n,r,i){this._bindingParser.parseEvent(t+"Change",e+"=$event",n,r,i)},t.prototype._parseDirectives=function(t,e){var n=this,r=new Array(this.directivesIndex.size),i=!1;return t.match(e,function(t,e){r[n.directivesIndex.get(e)]=e,i=i||t.hasElementSelector()}),{directives:r.filter(function(t){return!!t}),matchElement:i}},t.prototype._createDirectiveAsts=function(t,e,n,r,i,o,a,s){var l=this,c=new Set,u=null,p=n.map(function(t){var n=new _r(o.start,o.end,"Directive "+Et(t.type));t.isComponent&&(u=t);var p=[],d=l._bindingParser.createDirectiveHostPropertyAsts(t,e,n);d=l._checkPropertiesInSchema(e,d);var h=l._bindingParser.createDirectiveHostEventAsts(t,n);l._createDirectivePropertyAsts(t.inputs,r,p,s),i.forEach(function(e){(0===e.value.length&&t.isComponent||e.isReferenceToDirective(t))&&(a.push(new ot(e.name,Fo(t.type.reference),e.sourceSpan)),c.add(e.name))});var f=l.contentQueryStartId;return l.contentQueryStartId+=t.queries.length,new ut(t,p,d,h,f,n)});return i.forEach(function(e){if(e.value.length>0)c.has(e.name)||l._reportError('There is no directive with "exportAs" set to "'+e.value+'"',e.sourceSpan);else if(!u){var n=null;t&&(n=Vo(l.reflector,jo.TemplateRef)),a.push(new ot(e.name,n,e.sourceSpan))}}),p},t.prototype._createDirectivePropertyAsts=function(t,e,n,r){if(t){var i=new Map;e.forEach(function(t){var e=i.get(t.name);e&&!e.isLiteral||i.set(t.name,t)}),Object.keys(t).forEach(function(e){var o=t[e],a=i.get(o);a&&(r.add(a.name),kc(a.expression)||n.push(new ct(e,a.name,a.expression,a.sourceSpan)))})}},t.prototype._createElementPropertyAsts=function(t,e,n){var r=this,i=[];return e.forEach(function(e){e.isLiteral||n.has(e.name)||i.push(r._bindingParser.createElementPropertyAst(t,e))}),this._checkPropertiesInSchema(t,i)},t.prototype._findComponentDirectives=function(t){return t.filter(function(t){return t.directive.isComponent})},t.prototype._findComponentDirectiveNames=function(t){return this._findComponentDirectives(t).map(function(t){return Et(t.directive.type)})},t.prototype._assertOnlyOneComponent=function(t,e){var n=this._findComponentDirectiveNames(t);n.length>1&&this._reportError("More than one component matched on this element.\nMake sure that only one component's selector can match a given element.\nConflicting components: "+n.join(","),e)},t.prototype._assertElementExists=function(t,e){var n=e.name.replace(/^:xhtml:/,"");if(!t&&!this._schemaRegistry.hasElement(n,this._schemas)){var r="'"+n+"' is not a known element:\n";r+="1. If '"+n+"' is an Angular component, then verify that it is part of this module.\n",n.indexOf("-")>-1?r+="2. If '"+n+"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.":r+="2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.",this._reportError(r,e.sourceSpan)}},t.prototype._assertNoComponentsNorElementBindingsOnTemplate=function(t,e,n){var r=this,i=this._findComponentDirectiveNames(t);i.length>0&&this._reportError("Components on an embedded template: "+i.join(","),n),e.forEach(function(t){r._reportError("Property binding "+t.name+' not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations".',n)})},t.prototype._assertAllEventsPublishedByDirectives=function(t,e){var n=this,r=new Set;t.forEach(function(t){Object.keys(t.directive.outputs).forEach(function(e){var n=t.directive.outputs[e];r.add(n)})}),e.forEach(function(t){null==t.target&&r.has(t.name)||n._reportError("Event binding "+t.fullName+' not emitted by any directive on an embedded template. Make sure that the event name is spelled correctly and all directives are listed in the "@NgModule.declarations".',t.sourceSpan)})},t.prototype._checkPropertiesInSchema=function(t,e){var n=this;return e.filter(function(e){if(e.type===ft.Property&&!n._schemaRegistry.hasProperty(t,e.name,n._schemas)){var r="Can't bind to '"+e.name+"' since it isn't a known property of '"+t+"'.";t.startsWith("ng-")?r+="\n1. If '"+e.name+"' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.\n2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.":t.indexOf("-")>-1&&(r+="\n1. If '"+t+"' is an Angular component and it has '"+e.name+"' input, then verify that it is part of this module.\n2. If '"+t+"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.\n3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component."),n._reportError(r,e.sourceSpan)}return!kc(e.value)})},t.prototype._reportError=function(t,e,n){void 0===n&&(n=wr.ERROR),this._targetErrors.push(new Cr(e,t,n))},t}(),yc=function(){function t(){}return t.prototype.visitElement=function(t,e){var n=Te(t);if(n.type===Me.SCRIPT||n.type===Me.STYLE||n.type===Me.STYLESHEET)return null;var r=t.attrs.map(function(t){return[t.name,t.value]}),i=wc(t.name,r),o=e.findNgContentIndex(i),a=ee(this,t.children,Cc);return new st(t.name,ee(this,t.attrs),[],[],[],[],[],!1,[],a,o,t.sourceSpan,t.endSourceSpan)},t.prototype.visitComment=function(t,e){return null},t.prototype.visitAttribute=function(t,e){return new nt(t.name,t.value,t.sourceSpan)},t.prototype.visitText=function(t,e){var n=e.findNgContentIndex(cc);return new tt(t.value,n,t.sourceSpan)},t.prototype.visitExpansion=function(t,e){return t},t.prototype.visitExpansionCase=function(t,e){return t},t}(),vc=function(){function t(t,e,n){this.name=t,this.value=e,this.sourceSpan=n}return t.prototype.isReferenceToDirective=function(t){return-1!==(e=t.exportAs,e?e.split(",").map(function(t){return t.trim()}):[]).indexOf(this.value);var e},t}();function bc(t){return t.trim().split(/\s+/g)}var _c=function(){function t(t,e,n,r){this.isTemplateElement=t,this._ngContentIndexMatcher=e,this._wildcardNgContentIndex=n,this.providerContext=r}return t.create=function(e,n,r){var i=new Wo,o=null,a=n.find(function(t){return t.directive.isComponent});if(a)for(var s=a.directive.template.ngContentSelectors,l=0;l<s.length;l++){"*"===s[l]?o=l:i.addSelectables(Go.parse(s[l]),l)}return new t(e,i,o,r)},t.prototype.findNgContentIndex=function(t){var e=[];return this._ngContentIndexMatcher.match(t,function(t,n){e.push(n)}),e.sort(),null!=this._wildcardNgContentIndex&&e.push(this._wildcardNgContentIndex),e.length>0?e[0]:null},t}();function wc(t,e){var n=new Go,r=fe(t)[1];n.setElement(r);for(var i=0;i<e.length;i++){var o=e[i][0],a=fe(o)[1],s=e[i][1];if(n.addAttribute(a,s),o.toLowerCase()==lc)bc(s).forEach(function(t){return n.addClassName(t)})}return n}var Cc=new _c(!0,new Wo,null,null),xc=new yc;function Sc(t){return t instanceof Kt&&0==t.value.trim().length}function Ec(t){var e=new Map;return t.forEach(function(t){e.get(t.type.reference)||e.set(t.type.reference,t)}),Array.from(e.values())}function kc(t){return t instanceof sr&&(t=t.ast),t instanceof Un}var Oc=function(){function t(){}return t.event=cs("$event"),t}(),Pc=function(t,e){this.stmts=t,this.allowDefault=e};function Ac(t,e,n,r){t||(t=new Uc);var i=Dc({createLiteralArrayConverter:function(t){return function(t){return hs(t)}},createLiteralMapConverter:function(t){return function(e){return fs(t.map(function(t,n){return{key:t.key,value:e[n],quoted:t.quoted}}))}},createPipeConverter:function(t){throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: "+t)}},n),o=new Bc(t,e,r),a=[];!function t(e,n){Array.isArray(e)?e.forEach(function(e){return t(e,n)}):n.push(e)}(i.visit(o,Lc.Statement),a),function(t,e,n){for(var r=t-1;r>=0;r--)n.unshift(Nc(e,r))}(o.temporaryCount,r,a);var s=a.length-1,l=null;if(s>=0){var c=function(t){{if(t instanceof Wa)return t.expr;if(t instanceof qa)return t.value}return null}(a[s]);c&&(l=cs("pd_"+r),a[s]=l.set(c.cast(sa).notIdentical(gs(!1))).toDeclStmt(null,[Ua.Final]))}return new Pc(a,l)}function Dc(t,e){return n=e,r=new Vc(t),n.visit(r);var n,r}var Tc=function(t,e){this.stmts=t,this.currValExpr=e},Mc={General:0,TrySimple:1};function Ic(t,e,n,r,i){t||(t=new Uc);var o=cs("currVal_"+r),a=[],s=new Bc(t,e,r),l=n.visit(s,Lc.Expression);if(s.temporaryCount)for(var c=0;c<s.temporaryCount;c++)a.push(Nc(r,c));else if(i==Mc.TrySimple)return new Tc([],l);return a.push(o.set(l).toDeclStmt(sa,[Ua.Final])),new Tc(a,o)}function Rc(t,e){return"tmp_"+t+"_"+e}function Nc(t,e){return new za(Rc(t,e),Va)}Mc[Mc.General]="General",Mc[Mc.TrySimple]="TrySimple";var Lc={Statement:0,Expression:1};function jc(t,e){if(t!==Lc.Expression)throw new Error("Expected an expression, but saw "+e)}function Fc(t,e){return t===Lc.Statement?e.toStmt():e}Lc[Lc.Statement]="Statement",Lc[Lc.Expression]="Expression";var Vc=function(t){function e(e){var n=t.call(this)||this;return n._converterFactory=e,n}return n(e,t),e.prototype.visitPipe=function(t,e){var n=this,r=[t.exp].concat(t.args).map(function(t){return t.visit(n,e)});return new Hc(t.span,r,this._converterFactory.createPipeConverter(t.name,r.length))},e.prototype.visitLiteralArray=function(t,e){var n=this,r=t.expressions.map(function(t){return t.visit(n,e)});return new Hc(t.span,r,this._converterFactory.createLiteralArrayConverter(t.expressions.length))},e.prototype.visitLiteralMap=function(t,e){var n=this,r=t.values.map(function(t){return t.visit(n,e)});return new Hc(t.span,r,this._converterFactory.createLiteralMapConverter(t.keys))},e}(pr),Bc=function(){function t(t,e,n){this._localResolver=t,this._implicitReceiver=e,this.bindingId=n,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0}return t.prototype.visitBinary=function(t,e){var n;switch(t.operation){case"+":n=ua.Plus;break;case"-":n=ua.Minus;break;case"*":n=ua.Multiply;break;case"/":n=ua.Divide;break;case"%":n=ua.Modulo;break;case"&&":n=ua.And;break;case"||":n=ua.Or;break;case"==":n=ua.Equals;break;case"!=":n=ua.NotEquals;break;case"===":n=ua.Identical;break;case"!==":n=ua.NotIdentical;break;case"<":n=ua.Lower;break;case">":n=ua.Bigger;break;case"<=":n=ua.LowerEquals;break;case">=":n=ua.BiggerEquals;break;default:throw new Error("Unsupported operation "+t.operation)}return Fc(e,new Ma(n,this._visit(t.left,Lc.Expression),this._visit(t.right,Lc.Expression)))},t.prototype.visitChain=function(t,e){return function(t,e){if(t!==Lc.Statement)throw new Error("Expected a statement, but saw "+e)}(e,t),this.visitAll(t.expressions,e)},t.prototype.visitConditional=function(t,e){return Fc(e,this._visit(t.condition,Lc.Expression).conditional(this._visit(t.trueExp,Lc.Expression),this._visit(t.falseExp,Lc.Expression)))},t.prototype.visitPipe=function(t,e){throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: "+t.name)},t.prototype.visitFunctionCall=function(t,e){var n=this.visitAll(t.args,Lc.Expression);return Fc(e,t instanceof Hc?t.converter(n):this._visit(t.target,Lc.Expression).callFn(n))},t.prototype.visitImplicitReceiver=function(t,e){return jc(e,t),this._implicitReceiver},t.prototype.visitInterpolation=function(t,e){jc(e,t);for(var n=[gs(t.expressions.length)],r=0;r<t.strings.length-1;r++)n.push(gs(t.strings[r])),n.push(this._visit(t.expressions[r],Lc.Expression));return n.push(gs(t.strings[t.strings.length-1])),t.expressions.length<=9?us(jo.inlineInterpolate).callFn(n):us(jo.interpolate).callFn([n[0],hs(n.slice(1))])},t.prototype.visitKeyedRead=function(t,e){var n=this.leftMostSafeNode(t);return n?this.convertSafeAccess(t,n,e):Fc(e,this._visit(t.obj,Lc.Expression).key(this._visit(t.key,Lc.Expression)))},t.prototype.visitKeyedWrite=function(t,e){var n=this._visit(t.obj,Lc.Expression),r=this._visit(t.key,Lc.Expression),i=this._visit(t.value,Lc.Expression);return Fc(e,n.key(r).set(i))},t.prototype.visitLiteralArray=function(t,e){throw new Error("Illegal State: literal arrays should have been converted into functions")},t.prototype.visitLiteralMap=function(t,e){throw new Error("Illegal State: literal maps should have been converted into functions")},t.prototype.visitLiteralPrimitive=function(t,e){var n=null===t.value||void 0===t.value||!0===t.value||!0===t.value?la:void 0;return Fc(e,gs(t.value,n))},t.prototype._getLocal=function(t){return this._localResolver.getLocal(t)},t.prototype.visitMethodCall=function(t,e){if(t.receiver instanceof Hn&&"$any"==t.name){if(1!=(r=this.visitAll(t.args,Lc.Expression)).length)throw new Error("Invalid call to $any, expected 1 argument but received "+(r.length||"none"));return r[0].cast(sa)}var n=this.leftMostSafeNode(t);if(n)return this.convertSafeAccess(t,n,e);var r=this.visitAll(t.args,Lc.Expression),i=null,o=this._visit(t.receiver,Lc.Expression);if(o===this._implicitReceiver){var a=this._getLocal(t.name);a&&(i=a.callFn(r))}return null==i&&(i=o.callMethod(t.name,r)),Fc(e,i)},t.prototype.visitPrefixNot=function(t,e){return Fc(e,(n=this._visit(t.expression,Lc.Expression),new Oa(n,r)));var n,r},t.prototype.visitNonNullAssert=function(t,e){return Fc(e,(n=this._visit(t.expression,Lc.Expression),new Pa(n,r)));var n,r},t.prototype.visitPropertyRead=function(t,e){var n=this.leftMostSafeNode(t);if(n)return this.convertSafeAccess(t,n,e);var r=null,i=this._visit(t.receiver,Lc.Expression);return i===this._implicitReceiver&&(r=this._getLocal(t.name)),null==r&&(r=i.prop(t.name)),Fc(e,r)},t.prototype.visitPropertyWrite=function(t,e){var n=this._visit(t.receiver,Lc.Expression);if(n===this._implicitReceiver&&this._getLocal(t.name))throw new Error("Cannot assign to a reference or variable!");return Fc(e,n.prop(t.name).set(this._visit(t.value,Lc.Expression)))},t.prototype.visitSafePropertyRead=function(t,e){return this.convertSafeAccess(t,this.leftMostSafeNode(t),e)},t.prototype.visitSafeMethodCall=function(t,e){return this.convertSafeAccess(t,this.leftMostSafeNode(t),e)},t.prototype.visitAll=function(t,e){var n=this;return t.map(function(t){return n._visit(t,e)})},t.prototype.visitQuote=function(t,e){throw new Error("Quotes are not supported for evaluation!\n        Statement: "+t.uninterpretedExpression+" located at "+t.location)},t.prototype._visit=function(t,e){var n=this._resultMap.get(t);return n||(this._nodeMap.get(t)||t).visit(this,e)},t.prototype.convertSafeAccess=function(t,e,n){var r=this._visit(e.receiver,Lc.Expression),i=void 0;this.needsTemporary(e.receiver)&&(r=(i=this.allocateTemporary()).set(r),this._resultMap.set(e.receiver,i));var o=r.isBlank();e instanceof or?this._nodeMap.set(e,new ir(e.span,e.receiver,e.name,e.args)):this._nodeMap.set(e,new Wn(e.span,e.receiver,e.name));var a=this._visit(t,Lc.Expression);return this._nodeMap.delete(e),i&&this.releaseTemporary(i),Fc(n,o.conditional(gs(null),a))},t.prototype.leftMostSafeNode=function(t){var e=this,n=function(t,n){return(e._nodeMap.get(n)||n).visit(t)};return t.visit({visitBinary:function(t){return null},visitChain:function(t){return null},visitConditional:function(t){return null},visitFunctionCall:function(t){return null},visitImplicitReceiver:function(t){return null},visitInterpolation:function(t){return null},visitKeyedRead:function(t){return n(this,t.obj)},visitKeyedWrite:function(t){return null},visitLiteralArray:function(t){return null},visitLiteralMap:function(t){return null},visitLiteralPrimitive:function(t){return null},visitMethodCall:function(t){return n(this,t.receiver)},visitPipe:function(t){return null},visitPrefixNot:function(t){return null},visitNonNullAssert:function(t){return null},visitPropertyRead:function(t){return n(this,t.receiver)},visitPropertyWrite:function(t){return null},visitQuote:function(t){return null},visitSafeMethodCall:function(t){return n(this,t.receiver)||t},visitSafePropertyRead:function(t){return n(this,t.receiver)||t}})},t.prototype.needsTemporary=function(t){var e=this,n=function(t,n){return n&&(e._nodeMap.get(n)||n).visit(t)};return t.visit({visitBinary:function(t){return n(this,t.left)||n(this,t.right)},visitChain:function(t){return!1},visitConditional:function(t){return n(this,t.condition)||n(this,t.trueExp)||n(this,t.falseExp)},visitFunctionCall:function(t){return!0},visitImplicitReceiver:function(t){return!1},visitInterpolation:function(t){return e=this,t.expressions.some(function(t){return n(e,t)});var e},visitKeyedRead:function(t){return!1},visitKeyedWrite:function(t){return!1},visitLiteralArray:function(t){return!0},visitLiteralMap:function(t){return!0},visitLiteralPrimitive:function(t){return!1},visitMethodCall:function(t){return!0},visitPipe:function(t){return!0},visitPrefixNot:function(t){return n(this,t.expression)},visitNonNullAssert:function(t){return n(this,t.expression)},visitPropertyRead:function(t){return!1},visitPropertyWrite:function(t){return!1},visitQuote:function(t){return!1},visitSafeMethodCall:function(t){return!0},visitSafePropertyRead:function(t){return!1}})},t.prototype.allocateTemporary=function(){var t=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new ma(Rc(this.bindingId,t))},t.prototype.releaseTemporary=function(t){if(this._currentTemporary--,t.name!=Rc(this.bindingId,this._currentTemporary))throw new Error("Temporary "+t.name+" released out of order")},t}();var Uc=function(){function t(){}return t.prototype.getLocal=function(t){return t===Oc.event.name?Oc.event:null},t}();var Hc=function(t){function e(e,n,r){var i=t.call(this,e,null,n)||this;return i.args=n,i.converter=r,i}return n(e,t),e}(ar),zc=function(){function t(t,e){this.options=t,this.reflector=e}return t.prototype.compileComponent=function(t,e,n,r,i,o){var a=this,s=new Map;r.forEach(function(t){return s.set(t.name,t.type.reference)});var l=0,c=function(t,n){var r=l++;return new qc(a.options,a.reflector,i,t,e.type.reference,e.isHost,r,s,n,o,c)},u=c(null,[]);return u.visitAll([],n),u.build(t)},t}(),Gc="_any",Wc=new(function(){function t(){}return t.prototype.getLocal=function(t){return t===Oc.event.name?cs(Gc):null},t}()),qc=function(){function t(t,e,n,r,i,o,a,s,l,c,u){this.options=t,this.reflector=e,this.externalReferenceVars=n,this.parent=r,this.component=i,this.isHostComponent=o,this.embeddedViewIndex=a,this.pipes=s,this.guards=l,this.ctx=c,this.viewBuilderFactory=u,this.refOutputVars=new Map,this.variables=[],this.children=[],this.updates=[],this.actions=[]}return t.prototype.getOutputVar=function(t){var e;if(!(e=t===this.component&&this.isHostComponent?Gc:t instanceof _t?this.externalReferenceVars.get(t):Gc))throw new Error("Illegal State: referring to a type without a variable "+JSON.stringify(t));return e},t.prototype.getTypeGuardExpressions=function(t){for(var e=this.guards.slice(),n=0,r=t.directives;n<r.length;n++)for(var i=r[n],o=0,a=i.inputs;o<a.length;o++){var s=a[o],l=i.directive.guards[s.directiveName];if(l){var c="UseIf"===l;e.push({guard:l,useIf:c,expression:{context:this.component,value:s.value}})}}return e},t.prototype.visitAll=function(t,e){this.variables=t,yt(this,e)},t.prototype.build=function(t,e){var n=this;void 0===e&&(e=[]),this.children.forEach(function(n){return n.build(t,e)});var r=[cs(Gc).set(Va).toDeclStmt(sa)],i=0;if(this.updates.forEach(function(t){var e=n.preprocessUpdateExpression(t),o=e.sourceSpan,a=e.context,s=e.value,l=""+i++,c=Ic(a===n.component?n:Wc,cs(n.getOutputVar(a)),s,l,Mc.General),u=c.stmts,p=c.currValExpr;u.push(new Wa(p)),r.push.apply(r,u.map(function(t){return as(t,o)}))}),this.actions.forEach(function(t){var e=t.sourceSpan,o=t.context,a=t.value,s=""+i++,l=Ac(o===n.component?n:Wc,cs(n.getOutputVar(o)),a,s).stmts;r.push.apply(r,l.map(function(t){return as(t,e)}))}),this.guards.length){for(var o=void 0,a=0,s=this.guards;a<s.length;a++){var l=s[a],c=this.preprocessUpdateExpression(l.expression),u=c.context,p=c.value,d=""+i++,h=Ic(u===this.component?this:Wc,cs(this.getOutputVar(u)),p,d,Mc.TrySimple),f=h.stmts,m=h.currValExpr;if(0==f.length){var g=l.useIf?m:this.ctx.importExpr(l.guard).callFn([m]);o=o?o.and(g):g}}o&&(r=[new Xa(o,r)])}var y="_View_"+t+"_"+this.embeddedViewIndex,v=new Ga(y,[],r);return e.push(v),e},t.prototype.visitBoundText=function(t,e){var n=this;t.value.ast.expressions.forEach(function(e){return n.updates.push({context:n.component,value:e,sourceSpan:t.sourceSpan})})},t.prototype.visitEmbeddedTemplate=function(t,e){if(this.visitElementOrTemplate(t),this.options.fullTemplateTypeCheck){var n=this.getTypeGuardExpressions(t),r=this.viewBuilderFactory(this,n);this.children.push(r),r.visitAll(t.variables,t.children)}},t.prototype.visitElement=function(t,e){var n=this;this.visitElementOrTemplate(t);t.inputs.forEach(function(t){n.updates.push({context:n.component,value:t.value,sourceSpan:t.sourceSpan})}),yt(this,t.children)},t.prototype.visitElementOrTemplate=function(t){var e=this;t.directives.forEach(function(t){e.visitDirective(t)}),t.references.forEach(function(t){var n=null;n=t.value&&t.value.identifier&&e.options.fullTemplateTypeCheck?t.value.identifier.reference:na.Dynamic,e.refOutputVars.set(t.name,n)}),t.outputs.forEach(function(t){e.actions.push({context:e.component,value:t.handler,sourceSpan:t.sourceSpan})})},t.prototype.visitDirective=function(t){var e=this,n=t.directive.type.reference;t.inputs.forEach(function(t){return e.updates.push({context:e.component,value:t.value,sourceSpan:t.sourceSpan})}),this.options.fullTemplateTypeCheck&&(t.hostProperties.forEach(function(t){return e.updates.push({context:n,value:t.value,sourceSpan:t.sourceSpan})}),t.hostEvents.forEach(function(t){return e.actions.push({context:n,value:t.handler,sourceSpan:t.sourceSpan})}))},t.prototype.getLocal=function(t){if(t==Oc.event.name)return cs(this.getOutputVar(na.Dynamic));for(var e=this;e;e=e.parent){var n=void 0;if(null==(n=e.refOutputVars.get(t)))e.variables.find(function(e){return e.name===t})&&(n=na.Dynamic);if(null!=n)return cs(this.getOutputVar(n))}return null},t.prototype.pipeOutputVar=function(t){var e=this.pipes.get(t);if(!e)throw new Error("Illegal State: Could not find pipe "+t+" in template of "+this.component);return this.getOutputVar(e)},t.prototype.preprocessUpdateExpression=function(t){var e=this;return{sourceSpan:t.sourceSpan,context:t.context,value:Dc({createLiteralArrayConverter:function(t){return function(t){var n=hs(t);return e.options.fullTemplateTypeCheck?n:n.cast(sa)}},createLiteralMapConverter:function(t){return function(n){var r=fs(t.map(function(t,e){return{key:t.key,value:n[e],quoted:t.quoted}}));return e.options.fullTemplateTypeCheck?r:r.cast(sa)}},createPipeConverter:function(t,n){return function(n){return(e.options.fullTemplateTypeCheck?cs(e.pipeOutputVar(t)):cs(e.getOutputVar(na.Dynamic))).callMethod("transform",n)}}},t.value)}},t.prototype.visitNgContent=function(t,e){},t.prototype.visitText=function(t,e){},t.prototype.visitDirectiveProperty=function(t,e){},t.prototype.visitReference=function(t,e){},t.prototype.visitVariable=function(t,e){},t.prototype.visitEvent=function(t,e){},t.prototype.visitElementProperty=function(t,e){},t.prototype.visitAttr=function(t,e){},t}(),Yc="class",$c="style",Kc=function(t,e){this.viewClassVar=t,this.rendererTypeVar=e},Qc=function(){function t(t){this._reflector=t}return t.prototype.compileComponent=function(t,e,n,r,i){var o=this,a=0,s=function t(e,n){void 0===n&&(n=new Map);e.forEach(function(e){var r=new Set,i=new Set,o=void 0;e instanceof st?(t(e.children,n),e.children.forEach(function(t){var e=n.get(t);e.staticQueryIds.forEach(function(t){return r.add(t)}),e.dynamicQueryIds.forEach(function(t){return i.add(t)})}),o=e.queryMatches):e instanceof lt&&(t(e.children,n),e.children.forEach(function(t){var e=n.get(t);e.staticQueryIds.forEach(function(t){return i.add(t)}),e.dynamicQueryIds.forEach(function(t){return i.add(t)})}),o=e.queryMatches),o&&o.forEach(function(t){return r.add(t.queryId)}),i.forEach(function(t){return r.delete(t)}),n.set(e,{staticQueryIds:r,dynamicQueryIds:i})});return n}(n),l=void 0;if(!e.isHost){var c=e.template,u=[];c.animations&&c.animations.length&&u.push(new La("animation",Es(t,c.animations),!0));var p=cs(Pt(e.type.reference));l=p.name,t.statements.push(p.set(us(jo.createRendererType2).callFn([new ja([new La("encapsulation",gs(c.encapsulation),!1),new La("styles",r,!1),new La("data",new ja(u),!1)])])).toDeclStmt(ps(jo.RendererType2),[Ua.Final,Ua.Exported]))}var d,h=function(n){var r=a++;return new ru(o._reflector,t,n,e,r,i,s,h)},f=h(null);return f.visitAll([],n),(d=t.statements).push.apply(d,f.build()),new Kc(f.viewName,l)},t}(),Xc=cs("_l"),Zc=cs("_v"),Jc=cs("_ck"),tu=cs("_co"),eu=cs("en"),nu=cs("ad"),ru=function(){function t(t,e,n,r,i,o,a,s){this.reflector=t,this.outputCtx=e,this.parent=n,this.component=r,this.embeddedViewIndex=i,this.usedPipes=o,this.staticQueryIds=a,this.viewBuilderFactory=s,this.nodes=[],this.purePipeNodeIndices=Object.create(null),this.refNodeIndices=Object.create(null),this.variables=[],this.children=[],this.compType=this.embeddedViewIndex>0?sa:ds(e.importExpr(this.component.type.reference)),this.viewName=Ot(this.component.type.reference,this.embeddedViewIndex)}return t.prototype.visitAll=function(t,e){var n,r,i,o=this;if(this.variables=t,this.parent||this.usedPipes.forEach(function(t){t.pure&&(o.purePipeNodeIndices[t.name]=o._createPipe(null,t))}),!this.parent){var a=(n=this.staticQueryIds,r=new Set,i=new Set,Array.from(n.values()).forEach(function(t){t.staticQueryIds.forEach(function(t){return r.add(t)}),t.dynamicQueryIds.forEach(function(t){return i.add(t)})}),i.forEach(function(t){return r.delete(t)}),{staticQueryIds:r,dynamicQueryIds:i});this.component.viewQueries.forEach(function(t,e){var n=e+1,r=t.first?0:1,i=134217728|su(a,n,t.first);o.nodes.push(function(){return{sourceSpan:null,nodeFlags:i,nodeDef:us(jo.queryDef).callFn([gs(i),gs(n),new ja([new La(t.propertyName,gs(r),!1)])])}})})}yt(this,e),this.parent&&(0===e.length||function t(e){var n=e[e.length-1];if(n instanceof lt)return n.hasViewContainer;if(n instanceof st)return me(n.name)&&n.children.length?t(n.children):n.hasViewContainer;return n instanceof ht}(e))&&this.nodes.push(function(){return{sourceSpan:null,nodeFlags:1,nodeDef:us(jo.anchorDef).callFn([gs(0),Va,Va,gs(0)])}})},t.prototype.build=function(t){void 0===t&&(t=[]),this.children.forEach(function(e){return e.build(t)});var e=this._createNodeExpressions(),n=e.updateRendererStmts,r=e.updateDirectivesStmts,i=e.nodeDefExprs,o=this._createUpdateFn(n),a=this._createUpdateFn(r),s=0;this.parent||this.component.changeDetection!==h.OnPush||(s|=2);var l=new Ga(this.viewName,[new Da(Xc.name)],[new qa(us(jo.viewDef).callFn([gs(s),hs(i),a,o]))],ps(jo.ViewDefinition),0===this.embeddedViewIndex?[Ua.Exported]:[]);return t.push(l),t},t.prototype._createUpdateFn=function(t){var e;if(t.length>0){var n=[];!this.component.isHost&&rs(t).has(tu.name)&&n.push(tu.set(Zc.prop("component")).toDeclStmt(this.compType)),e=ms([new Da(Jc.name,la),new Da(Zc.name,la)],n.concat(t),la)}else e=Va;return e},t.prototype.visitNgContent=function(t,e){this.nodes.push(function(){return{sourceSpan:t.sourceSpan,nodeFlags:8,nodeDef:us(jo.ngContentDef).callFn([gs(t.ngContentIndex),gs(t.index)])}})},t.prototype.visitText=function(t,e){this.nodes.push(function(){return{sourceSpan:t.sourceSpan,nodeFlags:2,nodeDef:us(jo.textDef).callFn([gs(-1),gs(t.ngContentIndex),hs([gs(t.value)])])}})},t.prototype.visitBoundText=function(t,e){var n=this,r=this.nodes.length;this.nodes.push(null);var i=t.value.ast,o=i.expressions.map(function(e,i){return n._preprocessUpdateExpression({nodeIndex:r,bindingIndex:i,sourceSpan:t.sourceSpan,context:tu,value:e})}),a=r;this.nodes[r]=function(){return{sourceSpan:t.sourceSpan,nodeFlags:2,nodeDef:us(jo.textDef).callFn([gs(a),gs(t.ngContentIndex),hs(i.strings.map(function(t){return gs(t)}))]),updateRenderer:o}}},t.prototype.visitEmbeddedTemplate=function(t,e){var n=this,r=this.nodes.length;this.nodes.push(null);var i=this._visitElementOrTemplate(r,t),o=i.flags,a=i.queryMatchesExpr,s=i.hostEvents,l=this.viewBuilderFactory(this);this.children.push(l),l.visitAll(t.variables,t.children);var c=this.nodes.length-r-1;this.nodes[r]=function(){return{sourceSpan:t.sourceSpan,nodeFlags:1|o,nodeDef:us(jo.anchorDef).callFn([gs(o),a,gs(t.ngContentIndex),gs(c),n._createElementHandleEventFn(r,s),cs(l.viewName)])}}},t.prototype.visitElement=function(t,e){var n=this,r=this.nodes.length;this.nodes.push(null);var i=me(t.name)?null:t.name,o=this._visitElementOrTemplate(r,t),a=o.flags,s=o.usedEvents,l=o.queryMatchesExpr,c=o.hostBindings,u=o.hostEvents,p=[],d=[],h=[];if(i){var f=t.inputs.map(function(t){return{context:tu,inputAst:t,dirAst:null}}).concat(c);f.length&&(d=f.map(function(t,e){return n._preprocessUpdateExpression({context:t.context,nodeIndex:r,bindingIndex:e,sourceSpan:t.inputAst.sourceSpan,value:t.inputAst.value})}),p=f.map(function(t){return function(t,e){switch(t.type){case ft.Attribute:return hs([gs(1),gs(t.name),gs(t.securityContext)]);case ft.Property:return hs([gs(8),gs(t.name),gs(t.securityContext)]);case ft.Animation:var n=8|(e&&e.directive.isComponent?32:16);return hs([gs(n),gs("@"+t.name),gs(t.securityContext)]);case ft.Class:return hs([gs(2),gs(t.name),Va]);case ft.Style:return hs([gs(4),gs(t.name),gs(t.unit)])}}(t.inputAst,t.dirAst)})),h=s.map(function(t){var e=t[0],n=t[1];return hs([gs(e),gs(n)])})}yt(this,t.children);var m=this.nodes.length-r-1,g=t.directives.find(function(t){return t.directive.isComponent}),y=Va,v=Va;g&&(v=this.outputCtx.importExpr(g.directive.componentViewType),y=this.outputCtx.importExpr(g.directive.rendererType));var b=r;this.nodes[r]=function(){return{sourceSpan:t.sourceSpan,nodeFlags:1|a,nodeDef:us(jo.elementDef).callFn([gs(b),gs(a),l,gs(t.ngContentIndex),gs(m),gs(i),i?(e=t,o=Object.create(null),e.attrs.forEach(function(t){o[t.name]=t.value}),e.directives.forEach(function(t){Object.keys(t.directive.hostAttributes).forEach(function(e){var n,r,i,a=t.directive.hostAttributes[e],s=o[e];o[e]=null!=s?(r=s,i=a,(n=e)==Yc||n==$c?r+" "+i:i):a})}),hs(Object.keys(o).sort().map(function(t){return hs([gs(t),gs(o[t])])}))):Va,p.length?hs(p):Va,h.length?hs(h):Va,n._createElementHandleEventFn(r,u),v,y]),updateRenderer:d};var e,o}},t.prototype._visitElementOrTemplate=function(t,e){var n=this,r=0;e.hasViewContainer&&(r|=16777216);var i=new Map;e.outputs.forEach(function(t){var e=au(t,null),n=e.name,r=e.target;i.set(lu(r,n),[r,n])}),e.directives.forEach(function(t){t.hostEvents.forEach(function(e){var n=au(e,t),r=n.name,o=n.target;i.set(lu(o,r),[o,r])})});var o=[],a=[];this._visitComponentFactoryResolverProvider(e.directives),e.providers.forEach(function(r,s){var l=void 0,c=void 0;if(e.directives.forEach(function(t,e){t.directive.type.reference===It(r.token)&&(l=t,c=e)}),l){var u=n._visitDirective(r,l,c,t,e.references,e.queryMatches,i,n.staticQueryIds.get(e)),p=u.hostBindings,d=u.hostEvents;o.push.apply(o,p),a.push.apply(a,d)}else n._visitProvider(r,e.queryMatches)});var s=[];return e.queryMatches.forEach(function(t){var e=void 0;It(t.value)===n.reflector.resolveExternalReference(jo.ElementRef)?e=0:It(t.value)===n.reflector.resolveExternalReference(jo.ViewContainerRef)?e=3:It(t.value)===n.reflector.resolveExternalReference(jo.TemplateRef)&&(e=2),null!=e&&s.push(hs([gs(t.queryId),gs(e)]))}),e.references.forEach(function(e){var r=void 0;e.value?It(e.value)===n.reflector.resolveExternalReference(jo.TemplateRef)&&(r=2):r=1,null!=r&&(n.refNodeIndices[e.name]=t,s.push(hs([gs(e.name),gs(r)])))}),e.outputs.forEach(function(t){a.push({context:tu,eventAst:t,dirAst:null})}),{flags:r,usedEvents:Array.from(i.values()),queryMatchesExpr:s.length?hs(s):Va,hostBindings:o,hostEvents:a}},t.prototype._visitDirective=function(t,e,n,r,i,o,a,s){var l=this,c=this.nodes.length;this.nodes.push(null),e.directive.queries.forEach(function(t,n){var r=e.contentQueryStartId+n,i=67108864|su(s,r,t.first),o=t.first?0:1;l.nodes.push(function(){return{sourceSpan:e.sourceSpan,nodeFlags:i,nodeDef:us(jo.queryDef).callFn([gs(i),gs(r),new ja([new La(t.propertyName,gs(o),!1)])])}})});var u=this.nodes.length-c-1,p=this._visitProviderOrDirective(t,o),d=p.flags,h=p.queryMatchExprs,f=p.providerExpr,m=p.depsExpr;i.forEach(function(e){e.value&&It(e.value)===It(t.token)&&(l.refNodeIndices[e.name]=c,h.push(hs([gs(e.name),gs(4)])))}),e.directive.isComponent&&(d|=32768);var g=e.inputs.map(function(t,e){var n=hs([gs(e),gs(t.directiveName)]);return new La(t.directiveName,n,!1)}),y=[],v=e.directive;Object.keys(v.outputs).forEach(function(t){var e=v.outputs[t];a.has(e)&&y.push(new La(t,gs(e),!1))});var b=[];(e.inputs.length||(327680&d)>0)&&(b=e.inputs.map(function(t,e){return l._preprocessUpdateExpression({nodeIndex:c,bindingIndex:e,sourceSpan:t.sourceSpan,context:tu,value:t.value})}));var _=us(jo.nodeValue).callFn([Zc,gs(c)]),w=e.hostProperties.map(function(t){return{context:_,dirAst:e,inputAst:t}}),C=e.hostEvents.map(function(t){return{context:_,eventAst:t,dirAst:e}}),x=c;return this.nodes[c]=function(){return{sourceSpan:e.sourceSpan,nodeFlags:16384|d,nodeDef:us(jo.directiveDef).callFn([gs(x),gs(d),h.length?hs(h):Va,gs(u),f,m,g.length?new ja(g):Va,y.length?new ja(y):Va]),updateDirectives:b,directive:e.directive.type}},{hostBindings:w,hostEvents:C}},t.prototype._visitProvider=function(t,e){this._addProviderNode(this._visitProviderOrDirective(t,e))},t.prototype._visitComponentFactoryResolverProvider=function(t){var e=t.find(function(t){return t.directive.isComponent});if(e&&e.directive.entryComponents.length){var n=Ms(this.reflector,this.outputCtx,8192,e.directive.entryComponents),r=n.providerExpr,i=n.depsExpr,o=n.flags,a=n.tokenExpr;this._addProviderNode({providerExpr:r,depsExpr:i,flags:o,tokenExpr:a,queryMatchExprs:[],sourceSpan:e.sourceSpan})}},t.prototype._addProviderNode=function(t){this.nodes.length;this.nodes.push(function(){return{sourceSpan:t.sourceSpan,nodeFlags:t.flags,nodeDef:us(jo.providerDef).callFn([gs(t.flags),t.queryMatchExprs.length?hs(t.queryMatchExprs):Va,t.tokenExpr,t.providerExpr,t.depsExpr])}})},t.prototype._visitProviderOrDirective=function(t,e){var n=[];e.forEach(function(e){It(e.value)===It(t.token)&&n.push(hs([gs(e.queryId),gs(4)]))});var r=Os(this.outputCtx,t),i=r.providerExpr,o=r.depsExpr,a=r.flags,s=r.tokenExpr;return{flags:0|a,queryMatchExprs:n,providerExpr:i,depsExpr:o,tokenExpr:s,sourceSpan:t.sourceSpan}},t.prototype.getLocal=function(t){if(t==Oc.event.name)return Oc.event;for(var e=Zc,n=this;n;n=n.parent,e=e.prop("parent").cast(sa)){var r=n.refNodeIndices[t];if(null!=r)return us(jo.nodeValue).callFn([e,gs(r)]);var i=n.variables.find(function(e){return e.name===t});if(i){var o=i.value||"$implicit";return e.prop("context").prop(o)}}return null},t.prototype._createLiteralArrayConverter=function(t,e){if(0===e){var n=us(jo.EMPTY_ARRAY);return function(){return n}}var r=this.nodes.length;return this.nodes.push(function(){return{sourceSpan:t,nodeFlags:32,nodeDef:us(jo.pureArrayDef).callFn([gs(r),gs(e)])}}),function(t){return iu(r,t)}},t.prototype._createLiteralMapConverter=function(t,e){if(0===e.length){var n=us(jo.EMPTY_MAP);return function(){return n}}var i=fs(e.map(function(t,e){return r({},t,{value:gs(e)})})),o=this.nodes.length;return this.nodes.push(function(){return{sourceSpan:t,nodeFlags:64,nodeDef:us(jo.pureObjectDef).callFn([gs(o),i])}}),function(t){return iu(o,t)}},t.prototype._createPipeConverter=function(t,e,n){var r=this.usedPipes.find(function(t){return t.name===e});if(r.pure){var i=this.nodes.length;this.nodes.push(function(){return{sourceSpan:t.sourceSpan,nodeFlags:128,nodeDef:us(jo.purePipeDef).callFn([gs(i),gs(n)])}});for(var o=Zc,a=this;a.parent;)a=a.parent,o=o.prop("parent").cast(sa);var s=a.purePipeNodeIndices[e],l=us(jo.nodeValue).callFn([o,gs(s)]);return function(e){return ou(t.nodeIndex,t.bindingIndex,iu(i,[l].concat(e)))}}var c=this._createPipe(t.sourceSpan,r),u=us(jo.nodeValue).callFn([Zc,gs(c)]);return function(e){return ou(t.nodeIndex,t.bindingIndex,u.callMethod("transform",e))}},t.prototype._createPipe=function(t,e){var n=this,r=this.nodes.length,i=0;e.type.lifecycleHooks.forEach(function(t){t===Bo.OnDestroy&&(i|=Ts(t))});var o=e.type.diDeps.map(function(t){return Ds(n.outputCtx,t)});return this.nodes.push(function(){return{sourceSpan:t,nodeFlags:16,nodeDef:us(jo.pipeDef).callFn([gs(i),n.outputCtx.importExpr(e.type.reference),hs(o)])}}),r},t.prototype._preprocessUpdateExpression=function(t){var e=this;return{nodeIndex:t.nodeIndex,bindingIndex:t.bindingIndex,sourceSpan:t.sourceSpan,context:t.context,value:Dc({createLiteralArrayConverter:function(n){return e._createLiteralArrayConverter(t.sourceSpan,n)},createLiteralMapConverter:function(n){return e._createLiteralMapConverter(t.sourceSpan,n)},createPipeConverter:function(n,r){return e._createPipeConverter(t,n,r)}},t.value)}},t.prototype._createNodeExpressions=function(){var t=this,e=0,n=[],r=[],i=this.nodes.map(function(t,e){var i=t(),a=i.nodeDef,s=i.nodeFlags,l=i.updateDirectives,c=i.updateRenderer,u=i.sourceSpan;return c&&n.push.apply(n,o(e,u,c,!1)),l&&r.push.apply(r,o(e,u,l,(327680&s)>0)),ss(3&s?new Fa([Xc.callFn([]).callFn([]),a]):a,u)});return{updateRendererStmts:n,updateDirectivesStmts:r,nodeDefExprs:i};function o(n,r,i,o){var a=[],s=i.map(function(n){var r=n.sourceSpan,i=n.context,o=n.value,s=""+e++,l=Ic(i===tu?t:null,i,o,s,Mc.General),c=l.stmts,u=l.currValExpr;return a.push.apply(a,c.map(function(t){return as(t,r)})),ss(u,r)});return(i.length||o)&&a.push(as(iu(n,s).toStmt(),r)),a}},t.prototype._createElementHandleEventFn=function(t,e){var n,r=this,i=[],o=0;if(e.forEach(function(t){var e=t.context,n=t.eventAst,a=t.dirAst,s=""+o++,l=Ac(e===tu?r:null,e,n.handler,s),c=l.stmts,u=l.allowDefault,p=c;u&&p.push(nu.set(u.and(nu)).toStmt());var d=au(n,a),h=lu(d.target,d.name);i.push(as(new Xa(gs(h).identical(eu),p),n.sourceSpan))}),i.length>0){var a=[nu.set(gs(!0)).toDeclStmt(ca)];!this.component.isHost&&rs(i).has(tu.name)&&a.push(tu.set(Zc.prop("component")).toDeclStmt(this.compType)),n=ms([new Da(Zc.name,la),new Da(eu.name,la),new Da(Oc.event.name,la)],a.concat(i,[new qa(nu)]),la)}else n=Va;return n},t.prototype.visitDirective=function(t,e){},t.prototype.visitDirectiveProperty=function(t,e){},t.prototype.visitReference=function(t,e){},t.prototype.visitVariable=function(t,e){},t.prototype.visitEvent=function(t,e){},t.prototype.visitElementProperty=function(t,e){},t.prototype.visitAttr=function(t,e){},t}();function iu(t,e){return e.length>10?Jc.callFn([Zc,gs(t),gs(1),hs(e)]):Jc.callFn([Zc,gs(t),gs(0)].concat(e))}function ou(t,e,n){return us(jo.unwrapValue).callFn([Zc,gs(t),gs(e),n])}function au(t,e){return t.isAnimation?{name:"@"+t.name+"."+t.phase,target:e&&e.directive.isComponent?"component":null}:t}function su(t,e,n){var r=0;return!n||!t.staticQueryIds.has(e)&&t.dynamicQueryIds.has(e)?r|=536870912:r|=268435456,r}function lu(t,e){return t?t+":"+e:e}var cu=function(){function t(t,e,n,r){void 0===r&&(r=null),this._htmlParser=t,this._implicitTags=e,this._implicitAttrs=n,this._locale=r,this._messages=[]}return t.prototype.updateFromTemplate=function(t,e,n){var r=this._htmlParser.parse(t,e,!0,n);if(r.errors.length)return r.errors;var i,o,a,s,l,c=(i=r.rootNodes,o=n,a=this._implicitTags,s=this._implicitAttrs,new Li(a,s).extract(i,o));return c.errors.length?c.errors:((l=this._messages).push.apply(l,c.messages),[])},t.prototype.getMessages=function(){return this._messages},t.prototype.write=function(t,e){var n={},r=new uu;this._messages.forEach(function(e){var r,i=t.digest(e);n.hasOwnProperty(i)?(r=n[i].sources).push.apply(r,e.sources):n[i]=e});var i=Object.keys(n).map(function(i){var o=t.createNameMapper(n[i]),a=n[i],s=o?r.convert(a.nodes,o):a.nodes,l=new ci(s,{},{},a.meaning,a.description,i);return l.sources=a.sources,e&&l.sources.forEach(function(t){return t.filePath=e(t.filePath)}),l});return t.write(i,this._locale)},t}(),uu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.convert=function(t,e){var n=this;return e?t.map(function(t){return t.visit(n,e)}):t},e.prototype.visitTagPlaceholder=function(t,e){var n=this,r=e.toPublicName(t.startName),i=t.closeName?e.toPublicName(t.closeName):t.closeName,o=t.children.map(function(t){return t.visit(n,e)});return new hi(t.tag,t.attrs,r,i,o,t.isVoid,t.sourceSpan)},e.prototype.visitPlaceholder=function(t,e){return new fi(t.value,e.toPublicName(t.name),t.sourceSpan)},e.prototype.visitIcuPlaceholder=function(t,e){return new mi(t.value,e.toPublicName(t.name),t.sourceSpan)},e}(gi),pu=function(){function t(t,e,n){this.srcFileUrl=t,this.genFileUrl=e,"string"==typeof n?(this.source=n,this.stmts=null):(this.source=null,this.stmts=n)}return t.prototype.isEquivalent=function(t){return this.genFileUrl===t.genFileUrl&&(this.source?this.source===t.source:null!=t.stmts&&da(this.stmts,t.stmts))},t}();function du(t,e){for(var n=[],r=0,i=t.transitiveModule.providers;r<i.length;r++){var o=i[r],a=o.provider,s=o.module;if(It(a.token)===e.ROUTES)for(var l=0,c=hu(a.useValue);l<c.length;l++){var u=c[l];n.push(fu(u,e,s.reference))}}return n}function hu(t,e){if(void 0===e&&(e=[]),"string"==typeof t)e.push(t);else if(Array.isArray(t))for(var n=0,r=t;n<r.length;n++){hu(r[n],e)}else t.loadChildren?hu(t.loadChildren,e):t.children&&hu(t.children,e);return e}function fu(t,e,n){var r=t.split("#"),i=r[0],o=r[1],a=e.resolveExternalReference({moduleName:i,name:o},n?n.filePath:void 0);return{route:t,module:n||a,referencedModule:a}}var mu=function(t,e){this.symbol=t,this.metadata=e},gu=function(){function t(t,e,n,r){this.host=t,this.staticSymbolCache=e,this.summaryResolver=n,this.errorRecorder=r,this.metadataCache=new Map,this.resolvedSymbols=new Map,this.resolvedFilePaths=new Set,this.importAs=new Map,this.symbolResourcePaths=new Map,this.symbolFromFile=new Map,this.knownFileNameToModuleNames=new Map}return t.prototype.resolveSymbol=function(t){if(t.members.length>0)return this._resolveSymbolMembers(t);var e=this._resolveSymbolFromSummary(t);if(e)return e;var n=this.resolvedSymbols.get(t);return n||(this._createSymbolsOf(t.filePath),this.resolvedSymbols.get(t))},t.prototype.getImportAs=function(t,e){if(void 0===e&&(e=!0),t.members.length){var n=this.getStaticSymbol(t.filePath,t.name);return(i=this.getImportAs(n,e))?this.getStaticSymbol(i.filePath,i.name,t.members):null}var r=t.filePath.replace(Eo,".");if(r!==t.filePath){var i,o=t.name.replace(ko,"");n=this.getStaticSymbol(r,o,t.members);return(i=this.getImportAs(n,e))?this.getStaticSymbol(Mo(i.filePath),Io(i.name),n.members):null}var a=e&&this.summaryResolver.getImportAs(t)||null;return a||(a=this.importAs.get(t)),a},t.prototype.getResourcePath=function(t){return this.symbolResourcePaths.get(t)||t.filePath},t.prototype.getTypeArity=function(t){if(e=t.filePath,So.test(e))return null;for(var e,n=vu(this.resolveSymbol(t));n&&n.metadata instanceof _t;)n=vu(this.resolveSymbol(n.metadata));return n&&n.metadata&&n.metadata.arity||null},t.prototype.getKnownModuleName=function(t){return this.knownFileNameToModuleNames.get(t)||null},t.prototype.recordImportAs=function(t,e){t.assertNoMembers(),e.assertNoMembers(),this.importAs.set(t,e)},t.prototype.recordModuleNameForFileName=function(t,e){this.knownFileNameToModuleNames.set(t,e)},t.prototype.invalidateFile=function(t){this.metadataCache.delete(t),this.resolvedFilePaths.delete(t);var e=this.symbolFromFile.get(t);if(e){this.symbolFromFile.delete(t);for(var n=0,r=e;n<r.length;n++){var i=r[n];this.resolvedSymbols.delete(i),this.importAs.delete(i),this.symbolResourcePaths.delete(i)}}},t.prototype.ignoreErrorsFor=function(t){var e=this.errorRecorder;this.errorRecorder=function(){};try{return t()}finally{this.errorRecorder=e}},t.prototype._resolveSymbolMembers=function(t){var e=t.members,n=this.resolveSymbol(this.getStaticSymbol(t.filePath,t.name));if(!n)return null;var r=vu(n.metadata);if(r instanceof _t)return new mu(t,this.getStaticSymbol(r.filePath,r.name,e));if(!r||"class"!==r.__symbolic){for(var i=r,o=0;o<e.length&&i;o++)i=i[e[o]];return new mu(t,i)}return r.statics&&1===e.length?new mu(t,r.statics[e[0]]):null},t.prototype._resolveSymbolFromSummary=function(t){var e=this.summaryResolver.resolveSummary(t);return e?new mu(t,e.metadata):null},t.prototype.getStaticSymbol=function(t,e,n){return this.staticSymbolCache.get(t,e,n)},t.prototype.hasDecorators=function(t){var e=this.getModuleMetadata(t);return!!e.metadata&&Object.keys(e.metadata).some(function(t){var n=e.metadata[t];return n&&"class"===n.__symbolic&&n.decorators})},t.prototype.getSymbolsOf=function(t){var e=this.summaryResolver.getSymbolsOf(t);if(e)return e;this._createSymbolsOf(t);var n=[];return this.resolvedSymbols.forEach(function(e){e.symbol.filePath===t&&n.push(e.symbol)}),n},t.prototype._createSymbolsOf=function(t){var e=this;if(!this.resolvedFilePaths.has(t)){this.resolvedFilePaths.add(t);var n=[],r=this.getModuleMetadata(t);if(r.importAs&&this.knownFileNameToModuleNames.set(t,r.importAs),r.exports)for(var i=function(r){if(r.export)r.export.forEach(function(i){var o,a=o=yu(o="string"==typeof i?i:i.as);"string"!=typeof i&&(a=yu(i.name));var s=e.resolveModule(r.from,t);if(s){var l=e.getStaticSymbol(s,a),c=e.getStaticSymbol(t,o);n.push(e.createExport(c,l))}});else{var i=o.resolveModule(r.from,t);if(i)o.getSymbolsOf(i).forEach(function(r){var i=e.getStaticSymbol(t,r.name);n.push(e.createExport(i,r))})}},o=this,a=0,s=r.exports;a<s.length;a++){i(s[a])}if(r.metadata){var l=new Set(Object.keys(r.metadata).map(yu)),c=r.origins||{};Object.keys(r.metadata).forEach(function(i){var o=r.metadata[i],a=yu(i),s=e.getStaticSymbol(t,a),u=c.hasOwnProperty(i)&&c[i];if(u){var p=e.resolveModule(u,t);p?e.symbolResourcePaths.set(s,p):e.reportError(new Error("Couldn't resolve original symbol for "+u+" from "+t))}n.push(e.createResolvedSymbol(s,t,l,o))})}n.forEach(function(t){return e.resolvedSymbols.set(t.symbol,t)}),this.symbolFromFile.set(t,n.map(function(t){return t.symbol}))}},t.prototype.createResolvedSymbol=function(t,e,i,o){var a,s=this;if(this.summaryResolver.isLibraryFile(t.filePath)&&o&&"class"===o.__symbolic){var l={__symbolic:"class",arity:o.arity};return new mu(t,l)}var c=function(){return a||(a=s.host.getOutputName(e.replace(/((\.ts)|(\.d\.ts)|)$/,".ts").replace(/^.*node_modules[/\\]/,""))),a},u=this,p=L(o,new(function(o){function a(){return null!==o&&o.apply(this,arguments)||this}return n(a,o),a.prototype.visitStringMap=function(n,a){var s=n.__symbolic;if("function"===s){var l=a.length;a.push.apply(a,n.parameters||[]);var p=o.prototype.visitStringMap.call(this,n,a);return a.length=l,p}if("reference"!==s)return"error"===s?r({},n,{fileName:c()}):o.prototype.visitStringMap.call(this,n,a);var d=n.module,h=n.name?yu(n.name):n.name;if(!h)return null;var f=void 0;return d?(f=u.resolveModule(d,t.filePath))?{__symbolic:"resolved",symbol:u.getStaticSymbol(f,h),line:n.line,character:n.character,fileName:c()}:{__symbolic:"error",message:"Could not resolve "+d+" relative to "+t.filePath+".",line:n.line,character:n.character,fileName:c()}:a.indexOf(h)>=0?{__symbolic:"reference",name:h}:i.has(h)?u.getStaticSymbol(e,h):void 0},a}(V)),[]),d=vu(p);return d instanceof _t?this.createExport(t,d):new mu(t,p)},t.prototype.createExport=function(t,e){return t.assertNoMembers(),e.assertNoMembers(),this.summaryResolver.isLibraryFile(t.filePath)&&this.summaryResolver.isLibraryFile(e.filePath)&&this.importAs.set(e,this.getImportAs(t)||t),new mu(t,e)},t.prototype.reportError=function(t,e,n){if(!this.errorRecorder)throw t;this.errorRecorder(t,e&&e.filePath||n)},t.prototype.getModuleMetadata=function(t){var e=this.metadataCache.get(t);if(!e){var n=this.host.getMetadataFor(t);if(n){var r=-1;n.forEach(function(t){t&&t.version>r&&(r=t.version,e=t)})}if(e||(e={__symbolic:"module",version:4,module:t,metadata:{}}),4!=e.version){var i=2==e.version?"Unsupported metadata version "+e.version+" for module "+t+". This module should be compiled with a newer version of ngc":"Metadata version mismatch for module "+t+", found version "+e.version+", expected 4";this.reportError(new Error(i))}this.metadataCache.set(t,e)}return e},t.prototype.getSymbolByModule=function(t,e,n){var r=this.resolveModule(t,n);return r?this.getStaticSymbol(r,e):(this.reportError(new Error("Could not resolve module "+t+(n?" relative to "+n:""))),this.getStaticSymbol("ERROR:"+t,e))},t.prototype.resolveModule=function(t,e){try{return this.host.moduleNameToFileName(t,e)}catch(n){console.error("Could not resolve module '"+t+"' relative to file "+e),this.reportError(n,void 0,e)}return null},t}();function yu(t){return t.startsWith("___")?t.substr(1):t}function vu(t){return t&&"resolved"===t.__symbolic?t.symbol:t}function bu(t,e,n){var r=Io(e.name);t.statements.push(ms([],[new qa(n)],new oa(sa)).toDeclStmt(r,[Ua.Final,Ua.Exported]))}var _u=function(t){function e(e,n,r){var i=t.call(this)||this;return i.symbolResolver=e,i.summaryResolver=n,i.srcFileName=r,i.symbols=[],i.indexBySymbol=new Map,i.reexportedBy=new Map,i.processedSummaryBySymbol=new Map,i.processedSummaries=[],i.unprocessedSymbolSummariesBySymbol=new Map,i.moduleName=e.getKnownModuleName(r),i}return n(e,t),e.prototype.addSummary=function(t){var e,n,r=this,i=this.unprocessedSymbolSummariesBySymbol.get(t.symbol),o=this.processedSummaryBySymbol.get(t.symbol);if(i||(i={symbol:t.symbol,metadata:void 0},this.unprocessedSymbolSummariesBySymbol.set(t.symbol,i),o={symbol:this.processValue(t.symbol,0)},this.processedSummaries.push(o),this.processedSummaryBySymbol.set(t.symbol,o)),!i.metadata&&t.metadata){var a=t.metadata||{};if("class"===a.__symbolic){var s={};Object.keys(a).forEach(function(t){"decorators"!==t&&(s[t]=a[t])}),a=s}else xu(a)&&(xu(n=a)&&vu(n.expression)instanceof _t||xu(e=a)&&e.expression&&"select"===e.expression.__symbolic&&vu(e.expression.expression)instanceof _t||(a={__symbolic:"error",message:"Complex function calls are not supported."}));if(i.metadata=a,o.metadata=this.processValue(a,1),a instanceof _t&&this.summaryResolver.isLibraryFile(a.filePath)){var l=this.symbols[this.indexBySymbol.get(a)];No(l.name)||this.reexportedBy.set(l,t.symbol)}}if(!i.type&&t.type&&(i.type=t.type,o.type=this.processValue(t.type,0),t.type.summaryKind===Tt.NgModule)){var c=t.type;c.exportedDirectives.concat(c.exportedPipes).forEach(function(t){var e=t.reference;if(r.summaryResolver.isLibraryFile(e.filePath)&&!r.unprocessedSymbolSummariesBySymbol.has(e)){var n=r.summaryResolver.resolveSummary(e);n&&r.addSummary(n)}})}},e.prototype.serialize=function(){var t=this,e=[];return{json:JSON.stringify({moduleName:this.moduleName,summaries:this.processedSummaries,symbols:this.symbols.map(function(n,r){n.assertNoMembers();var i=void 0;if(t.summaryResolver.isLibraryFile(n.filePath)){var o=t.reexportedBy.get(n);if(o)i=t.indexBySymbol.get(o);else{var a=t.unprocessedSymbolSummariesBySymbol.get(n);a&&a.metadata&&"interface"===a.metadata.__symbolic||(i=n.name+"_"+r,e.push({symbol:n,exportAs:i}))}}return{__symbol:r,name:n.name,filePath:t.summaryResolver.toSummaryFileName(n.filePath,t.srcFileName),importAs:i}})}),exportAs:e}},e.prototype.processValue=function(t,e){return L(t,this,e)},e.prototype.visitOther=function(t,e){if(t instanceof _t){var n=this.symbolResolver.getStaticSymbol(t.filePath,t.name);return{__symbol:this.visitStaticSymbol(n,e),members:t.members}}},e.prototype.visitStaticSymbol=function(t,e){var n=this.indexBySymbol.get(t),r=null;if(1&e&&this.summaryResolver.isLibraryFile(t.filePath)){if(this.unprocessedSymbolSummariesBySymbol.has(t))return n;(r=this.loadSummary(t))&&r.metadata instanceof _t&&(n=this.visitStaticSymbol(r.metadata,e),r=null)}else if(null!=n)return n;return null==n&&(n=this.symbols.length,this.symbols.push(t)),this.indexBySymbol.set(t,n),r&&this.addSummary(r),n},e.prototype.loadSummary=function(t){var e=this.summaryResolver.resolveSummary(t);if(!e){var n=this.symbolResolver.resolveSymbol(t);n&&(e={symbol:n.symbol,metadata:n.metadata})}return e},e}(V),wu=function(){function t(t,e,n){this.outputCtx=t,this.symbolResolver=e,this.summaryResolver=n,this.data=[]}return t.prototype.addSourceType=function(t,e){this.data.push({summary:t,metadata:e,isLibrary:!1})},t.prototype.addLibType=function(t){this.data.push({summary:t,metadata:null,isLibrary:!0})},t.prototype.serialize=function(t){for(var e=this,n=new Map,r=0,i=t;r<i.length;r++){var o=i[r],a=o.symbol,s=o.exportAs;n.set(a,s)}for(var l=new Set,c=0,u=this.data;c<u.length;c++){var p=u[c],d=p.summary,h=p.metadata,f=p.isLibrary;if(d.summaryKind===Tt.NgModule){l.add(d.type.reference);for(var m=0,g=d.modules;m<g.length;m++){var y=g[m];l.add(y.reference)}}if(!f){Io(d.type.reference.name);bu(this.outputCtx,d.type.reference,this.serializeSummaryWithDeps(d,h))}}l.forEach(function(t){if(e.summaryResolver.isLibraryFile(t.filePath)){var r=Io(n.get(t)||t.name);e.outputCtx.statements.push(cs(r).set(e.serializeSummaryRef(t)).toDeclStmt(null,[Ua.Exported]))}})},t.prototype.serializeSummaryWithDeps=function(t,e){var n=this,r=[this.serializeSummary(t)],i=[];if(e instanceof Ft)r.push.apply(r,e.declaredDirectives.concat(e.declaredPipes).map(function(t){return t.reference}).concat(e.transitiveModule.modules.map(function(t){return t.reference}).filter(function(t){return t!==e.type.reference})).map(function(t){return n.serializeSummaryRef(t)})),i=e.providers;else if(t.summaryKind===Tt.Directive){var o=t;i=o.providers.concat(o.viewProviders)}return r.push.apply(r,i.filter(function(t){return!!t.useClass}).map(function(t){return n.serializeSummary({summaryKind:Tt.Injectable,type:t.useClass})})),hs(r)},t.prototype.serializeSummaryRef=function(t){var e=this.symbolResolver.getStaticSymbol(Mo(t.filePath),Io(t.name));return this.outputCtx.importExpr(e)},t.prototype.serializeSummary=function(t){var e=this.outputCtx;return L(t,new(function(){function t(){}return t.prototype.visitArray=function(t,e){var n=this;return hs(t.map(function(t){return L(t,n,e)}))},t.prototype.visitStringMap=function(t,e){var n=this;return new ja(Object.keys(t).map(function(r){return new La(r,L(t[r],n,e),!1)}))},t.prototype.visitPrimitive=function(t,e){return gs(t)},t.prototype.visitOther=function(t,n){if(t instanceof _t)return e.importExpr(t);throw new Error("Illegal State: Encountered value "+t)},t}()),null)},t}(),Cu=function(t){function e(e,n){var r=t.call(this)||this;return r.symbolCache=e,r.summaryResolver=n,r}return n(e,t),e.prototype.deserialize=function(t,e){var n=this,r=JSON.parse(e),i=[];this.symbols=r.symbols.map(function(e){return n.symbolCache.get(n.summaryResolver.fromSummaryFileName(e.filePath,t),e.name)}),r.symbols.forEach(function(e,r){var o=n.symbols[r],a=e.importAs;"number"==typeof a?i.push({symbol:o,importAs:n.symbols[a]}):"string"==typeof a&&i.push({symbol:o,importAs:n.symbolCache.get(Oo(t),a)})});var o=L(r.summaries,this,null);return{moduleName:r.moduleName,summaries:o,importAs:i}},e.prototype.visitStringMap=function(e,n){if("__symbol"in e){var r=this.symbols[e.__symbol],i=e.members;return i.length?this.symbolCache.get(r.filePath,r.name,i):r}return t.prototype.visitStringMap.call(this,e,n)},e}(V);function xu(t){return t&&"call"===t.__symbolic}var Su={Basic:1,TypeCheck:2,All:3};Su[Su.Basic]="Basic",Su[Su.TypeCheck]="TypeCheck",Su[Su.All]="All";var Eu=function(){function t(t,e,n,r,i,o,a,s,l,c,u,p,d){this._config=t,this._options=e,this._host=n,this._reflector=r,this._metadataResolver=i,this._templateParser=o,this._styleCompiler=a,this._viewCompiler=s,this._typeCheckCompiler=l,this._ngModuleCompiler=c,this._outputEmitter=u,this._summaryResolver=p,this._symbolResolver=d,this._templateAstCache=new Map,this._analyzedFiles=new Map}return t.prototype.clearCache=function(){this._metadataResolver.clearCache()},t.prototype.analyzeModulesSync=function(t){var e=this,n=Du(t,this._host,this._symbolResolver,this._metadataResolver);return n.ngModules.forEach(function(t){return e._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(t.type.reference,!0)}),n},t.prototype.analyzeModulesAsync=function(t){var e=this,n=Du(t,this._host,this._symbolResolver,this._metadataResolver);return Promise.all(n.ngModules.map(function(t){return e._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(t.type.reference,!1)})).then(function(){return n})},t.prototype._analyzeFile=function(t){var e=this._analyzedFiles.get(t);return e||(e=Mu(this._host,this._symbolResolver,this._metadataResolver,t),this._analyzedFiles.set(t,e)),e},t.prototype.findGeneratedFileNames=function(t){var e=this,n=[],r=this._analyzeFile(t);(this._options.allowEmptyCodegenFiles||r.directives.length||r.pipes.length||r.injectables.length||r.ngModules.length||r.exportsNonSourceFiles)&&(n.push(Oo(r.fileName,!0)),this._options.enableSummariesForJit&&n.push(Mo(r.fileName,!0)));var i=Do(Ao(r.fileName,!0)[1]);return r.directives.forEach(function(t){var o=e._metadataResolver.getNonNormalizedDirectiveMetadata(t).metadata;o.isComponent&&o.template.styleUrls.forEach(function(t){var a=e._host.resourceNameToFileName(t,r.fileName);if(!a)throw z("Couldn't resolve resource "+t+" relative to "+r.fileName);var s=(o.template.encapsulation||e._config.defaultEncapsulation)===d.Emulated;n.push(Pu(a,s,i)),e._options.allowEmptyCodegenFiles&&n.push(Pu(a,!s,i))})}),n},t.prototype.emitBasicStub=function(t,e){var n=this._createOutputContext(t);if(t.endsWith(".ngfactory.ts")){if(!e)throw new Error("Assertion error: require the original file for .ngfactory.ts stubs. File: "+t);var r=this._analyzeFile(e);this._createNgFactoryStub(n,r,Su.Basic)}else if(t.endsWith(".ngsummary.ts")){if(this._options.enableSummariesForJit){if(!e)throw new Error("Assertion error: require the original file for .ngsummary.ts stubs. File: "+t);r=this._analyzeFile(e);ku(n),r.ngModules.forEach(function(t){var e,r;e=n,r=t.type.reference,bu(e,r,Va)})}}else t.endsWith(".ngstyle.ts")&&ku(n);return this._codegenSourceModule("unknown",n)},t.prototype.emitTypeCheckStub=function(t,e){var n=this._analyzeFile(e),r=this._createOutputContext(t);return t.endsWith(".ngfactory.ts")&&this._createNgFactoryStub(r,n,Su.TypeCheck),r.statements.length>0?this._codegenSourceModule(n.fileName,r):null},t.prototype.loadFilesAsync=function(t){var e=this,n=t.map(function(t){return e._analyzeFile(t)}),r=[];return n.forEach(function(t){return t.ngModules.forEach(function(t){return r.push(e._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(t.type.reference,!1))})}),Promise.all(r).then(function(t){return Ru(n)})},t.prototype.loadFilesSync=function(t){var e=this,n=t.map(function(t){return e._analyzeFile(t)});return n.forEach(function(t){return t.ngModules.forEach(function(t){return e._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(t.type.reference,!0)})}),Ru(n)},t.prototype._createNgFactoryStub=function(t,e,n){var r=this,i=0;e.ngModules.forEach(function(e,o){r._ngModuleCompiler.createStub(t,e.type.reference);var a=e.transitiveModule.directives.map(function(t){return t.reference}).concat(e.transitiveModule.pipes.map(function(t){return t.reference}),e.importedModules.map(function(t){return t.type.reference}),e.exportedModules.map(function(t){return t.type.reference}),r._externalIdentifierReferences([jo.TemplateRef,jo.ElementRef])),s=new Map;a.forEach(function(t,e){s.set(t,"_decl"+o+"_"+e)}),s.forEach(function(e,n){t.statements.push(cs(e).set(Va.cast(sa)).toDeclStmt(ds(t.importExpr(n,null,!1))))}),n&Su.TypeCheck&&e.declaredDirectives.forEach(function(n){var o=r._metadataResolver.getDirectiveMetadata(n.reference);o.isComponent&&(i++,r._createTypeCheckBlock(t,o.type.reference.name+"_Host_"+i,e,r._metadataResolver.getHostComponentMetadata(o),[o.type],s),r._createTypeCheckBlock(t,o.type.reference.name+"_"+i,e,o,e.transitiveModule.directives,s))})}),0===t.statements.length&&ku(t)},t.prototype._externalIdentifierReferences=function(t){for(var e=[],n=0,r=t;n<r.length;n++){var i=r[n],o=Vo(this._reflector,i);o.identifier&&e.push(o.identifier.reference)}return e},t.prototype._createTypeCheckBlock=function(t,e,n,r,i,o){var a,s=this._parseTemplate(r,n,i),l=s.template,c=s.pipes;(a=t.statements).push.apply(a,this._typeCheckCompiler.compileComponent(e,r,l,c,o,t))},t.prototype.emitMessageBundle=function(t,e){var n=this,r=[],i=new bo,o=new cu(i,[],{},e);if(t.files.forEach(function(t){var e=[];t.directives.forEach(function(t){var r=n._metadataResolver.getDirectiveMetadata(t);r&&r.isComponent&&e.push(r)}),e.forEach(function(e){var n=e.template.template,i=ae.fromArray(e.template.interpolation);r.push.apply(r,o.updateFromTemplate(n,t.fileName,i))})}),r.length)throw new Error(r.map(function(t){return t.toString()}).join("\n"));return o},t.prototype.emitAllImpls=function(t){var e=this,n=t.ngModuleByPipeOrDirective;return Ht(t.files.map(function(t){return e._compileImplFile(t.fileName,n,t.directives,t.pipes,t.ngModules,t.injectables)}))},t.prototype._compileImplFile=function(t,e,n,r,i,o){var a=this,s=Do(Ao(t,!0)[1]),l=[],c=this._createOutputContext(Oo(t,!0));if(l.push.apply(l,this._createSummary(t,n,r,i,o,c)),i.forEach(function(t){return a._compileModule(c,t)}),n.forEach(function(n){var r=a._metadataResolver.getDirectiveMetadata(n);if(r.isComponent){var i=e.get(n);if(!i)throw new Error("Internal Error: cannot determine the module for component "+Et(r.type)+"!");var o=a._styleCompiler.compileComponent(c,r);r.template.externalStylesheets.forEach(function(e){var n=a._styleCompiler.needsStyleShim(r);l.push(a._codegenStyles(t,r,e,n,s)),a._options.allowEmptyCodegenFiles&&l.push(a._codegenStyles(t,r,e,!n,s))});a._compileComponent(c,r,i,i.transitiveModule.directives,o,s);a._compileComponentFactory(c,r,i,s)}}),c.statements.length>0||this._options.allowEmptyCodegenFiles){var u=this._codegenSourceModule(t,c);l.unshift(u)}return l},t.prototype._createSummary=function(t,e,n,r,i,o){var a=this,s=this._symbolResolver.getSymbolsOf(t).map(function(t){return a._symbolResolver.resolveSymbol(t)}),l=r.map(function(t){return{summary:a._metadataResolver.getNgModuleSummary(t.type.reference),metadata:a._metadataResolver.getNgModuleMetadata(t.type.reference)}}).concat(e.map(function(t){return{summary:a._metadataResolver.getDirectiveSummary(t),metadata:a._metadataResolver.getDirectiveMetadata(t)}}),n.map(function(t){return{summary:a._metadataResolver.getPipeSummary(t),metadata:a._metadataResolver.getPipeMetadata(t)}}),i.map(function(t){return{summary:a._metadataResolver.getInjectableSummary(t),metadata:a._metadataResolver.getInjectableSummary(t).type}})),c=this._options.enableSummariesForJit?this._createOutputContext(Mo(t,!0)):null,u=function(t,e,n,r,i,o){var a=new _u(r,n,t);i.forEach(function(t){return a.addSummary({symbol:t.symbol,metadata:t.metadata})}),o.forEach(function(t){var e=t.summary;t.metadata,a.addSummary({symbol:e.type.reference,metadata:void 0,type:e})});var s=a.serialize(),l=s.json,c=s.exportAs;if(e){var u=new wu(e,r,n);o.forEach(function(t){var e=t.summary,n=t.metadata;u.addSourceType(e,n)}),a.unprocessedSymbolSummariesBySymbol.forEach(function(t){n.isLibraryFile(t.symbol.filePath)&&t.type&&u.addLibType(t.type)}),u.serialize(c)}return{json:l,exportAs:c}}(t,c,this._summaryResolver,this._symbolResolver,s,l),p=u.json;u.exportAs.forEach(function(t){o.statements.push(cs(t.exportAs).set(o.importExpr(t.symbol)).toDeclStmt(null,[Ua.Exported]))});var d=[new pu(t,To(t),p)];return c&&d.push(this._codegenSourceModule(t,c)),d},t.prototype._compileModule=function(t,e){var n=[];if(this._options.locale){var r=this._options.locale.replace(/_/g,"-");n.push({token:Vo(this._reflector,jo.LOCALE_ID),useValue:r})}this._options.i18nFormat&&n.push({token:Vo(this._reflector,jo.TRANSLATIONS_FORMAT),useValue:this._options.i18nFormat}),this._ngModuleCompiler.compile(t,e,n)},t.prototype._compileComponentFactory=function(t,e,n,r){var i=this._metadataResolver.getHostComponentMetadata(e),o=this._compileComponent(t,i,n,[e.type],null,r).viewClassVar,a=Dt(e.type.reference),s=[];for(var l in e.inputs){var c=e.inputs[l];s.push(new La(l,gs(c),!1))}var u=[];for(var l in e.outputs){c=e.outputs[l];u.push(new La(l,gs(c),!1))}t.statements.push(cs(a).set(us(jo.createComponentFactory).callFn([gs(e.selector),t.importExpr(e.type.reference),cs(o),new ja(s),new ja(u),hs(e.template.ngContentSelectors.map(function(t){return gs(t)}))])).toDeclStmt(ps(jo.ComponentFactory,[ds(t.importExpr(e.type.reference))],[ta.Const]),[Ua.Final,Ua.Exported]))},t.prototype._compileComponent=function(t,e,n,r,i,o){var a=this._parseTemplate(e,n,r),s=a.template,l=a.pipes,c=i?cs(i.stylesVar):hs([]),u=this._viewCompiler.compileComponent(t,e,s,c,l);return i&&Ou(this._symbolResolver,i,this._styleCompiler.needsStyleShim(e),o),u},t.prototype._parseTemplate=function(t,e,n){var r=this;if(this._templateAstCache.has(t.type.reference))return this._templateAstCache.get(t.type.reference);var i=t.template.preserveWhitespaces,o=n.map(function(t){return r._metadataResolver.getDirectiveSummary(t.reference)}),a=e.transitiveModule.pipes.map(function(t){return r._metadataResolver.getPipeSummary(t.reference)}),s=this._templateParser.parse(t,t.template.htmlAst,o,a,e.schemas,Gt(e.type,t,t.template),i);return this._templateAstCache.set(t.type.reference,s),s},t.prototype._createOutputContext=function(t){var e=this;return{statements:[],genFilePath:t,importExpr:function(n,r,i){if(void 0===r&&(r=null),void 0===i&&(i=!0),!(n instanceof _t))throw new Error("Internal error: unknown identifier "+JSON.stringify(n));var o=e._symbolResolver.getTypeArity(n)||0,a=e._symbolResolver.getImportAs(n,i)||n,s=a.filePath,l=a.name,c=a.members,u=e._fileNameToModuleName(s,t),p=u===e._fileNameToModuleName(t,t)?null:u,d=r||[],h=o-d.length,f=d.concat(new Array(h).fill(sa));return c.reduce(function(t,e){return t.prop(e)},us(new Ea(p,l,null),f))}}},t.prototype._fileNameToModuleName=function(t,e){return this._summaryResolver.getKnownModuleName(t)||this._symbolResolver.getKnownModuleName(t)||this._host.fileNameToModuleName(t,e)},t.prototype._codegenStyles=function(t,e,n,r,i){var o=this._createOutputContext(Pu(n.moduleUrl,r,i)),a=this._styleCompiler.compileStyles(o,e,n,r);return Ou(this._symbolResolver,a,r,i),this._codegenSourceModule(t,o)},t.prototype._codegenSourceModule=function(t,e){return new pu(t,e.genFilePath,e.statements)},t.prototype.listLazyRoutes=function(t,e){var n=this;if(t)return function t(e,r,i){void 0===r&&(r=new Set);void 0===i&&(i=[]);if(r.has(e)||!e.name)return i;r.add(e);var o=du(n._metadataResolver.getNgModuleMetadata(e,!0),n._reflector);for(var a=0,s=o;a<s.length;a++){var l=s[a];i.push(l),t(l.referencedModule,r,i)}return i}(fu(t,this._reflector).referencedModule);if(e){for(var r=[],i=0,o=e.ngModules;i<o.length;i++)for(var a=0,s=du(o[i],this._reflector);a<s.length;a++){var l=s[a];r.push(l)}return r}throw new Error("Either route or analyzedModules has to be specified!")},t}();function ku(t){t.statements.push(us(jo.ComponentFactory).toStmt())}function Ou(t,e,n,r){e.dependencies.forEach(function(e){e.setValue(t.getStaticSymbol(Pu(e.moduleUrl,n,r),e.name))})}function Pu(t,e,n){return t+(e?".shim":"")+".ngstyle"+n}function Au(t,e,n,r){var i,o,a,s,l,c,u;return Iu((i=t,o=e,a=n,s=r,l=new Set,c=[],u=function(t){if(l.has(t)||!o.isSourceFile(t))return!1;l.add(t);var e=Mu(o,a,s,t);c.push(e),e.ngModules.forEach(function(t){t.transitiveModule.modules.forEach(function(t){return u(t.reference.filePath)})})},i.forEach(function(t){return u(t)}),c))}function Du(t,e,n,r){return Tu(Au(t,e,n,r))}function Tu(t){if(t.symbolsMissingModule&&t.symbolsMissingModule.length)throw z(t.symbolsMissingModule.map(function(t){return"Cannot determine the module for class "+t.name+" in "+t.filePath+"! Add "+t.name+" to the NgModule to fix it."}).join("\n"));return t}function Mu(t,e,n,r){var i=[],o=[],a=[],s=[],l=e.hasDecorators(r),c=!1;return r.endsWith(".d.ts")&&!l||e.getSymbolsOf(r).forEach(function(r){var l=e.resolveSymbol(r).metadata;if(l&&"error"!==l.__symbolic){var u,p,d,h,f=!1;if("class"===l.__symbolic)if(n.isDirective(r))f=!0,i.push(r);else if(n.isPipe(r))f=!0,o.push(r);else if(n.isNgModule(r)){var m=n.getNgModuleMetadata(r,!1);m&&(f=!0,s.push(m))}else n.isInjectable(r)&&(f=!0,a.push(r));f||(c=c||(u=t,p=l,d=!1,h=function(){function t(){}return t.prototype.visitArray=function(t,e){var n=this;t.forEach(function(t){return L(t,n,e)})},t.prototype.visitStringMap=function(t,e){var n=this;Object.keys(t).forEach(function(r){return L(t[r],n,e)})},t.prototype.visitPrimitive=function(t,e){},t.prototype.visitOther=function(t,e){t instanceof _t&&!u.isSourceFile(t.filePath)&&(d=!0)},t}(),L(p,new h,null),d))}}),{fileName:r,directives:i,pipes:o,ngModules:s,injectables:a,exportsNonSourceFiles:c}}function Iu(t){var e=[],n=new Map,r=new Set;t.forEach(function(t){t.ngModules.forEach(function(t){e.push(t),t.declaredDirectives.forEach(function(e){return n.set(e.reference,t)}),t.declaredPipes.forEach(function(e){return n.set(e.reference,t)})}),t.directives.forEach(function(t){return r.add(t)}),t.pipes.forEach(function(t){return r.add(t)})});var i=[];return r.forEach(function(t){n.has(t)||i.push(t)}),{ngModules:e,ngModuleByPipeOrDirective:n,symbolsMissingModule:i,files:t}}function Ru(t){return Tu(Iu(t))}var Nu="ngFormattedMessage";function Lu(t,e){if(void 0===e&&(e=0),!t)return"";var n=t.position?t.position.fileName+"("+(t.position.line+1)+","+(t.position.column+1)+")":"",r=n&&0!==e?" at "+n:"",i=""+(n&&0===e?n+": ":"")+t.message+r;return""+function t(e){if(e<=0)return"";if(e<6)return[""," ","  ","   ","    ","     "][e];var n=t(Math.floor(e/2));return n+n+(e%2==1?" ":"")}(e)+i+(t.next&&"\n"+Lu(t.next,e+2)||"")}function ju(t){var e=z(Lu(t)+".");return e[Nu]=!0,e.chain=t,e.position=t.position,e}var Fu="@angular/core",Vu=/^\$.*\$$/,Bu={__symbolic:"ignore"},Uu="useValue",Hu="provide",zu=new Set([Uu,"useFactory","data"]);function Gu(t){return t&&"ignore"==t.__symbolic}var Wu=function(){function t(t,e,n,r,i){void 0===n&&(n=[]),void 0===r&&(r=[]);var o=this;this.summaryResolver=t,this.symbolResolver=e,this.errorRecorder=i,this.annotationCache=new Map,this.propertyCache=new Map,this.parameterCache=new Map,this.methodCache=new Map,this.staticCache=new Map,this.conversionMap=new Map,this.resolvedExternalReferences=new Map,this.annotationForParentClassWithSummaryKind=new Map,this.initializeConversionMap(),n.forEach(function(t){return o._registerDecoratorOrConstructor(o.getStaticSymbol(t.filePath,t.name),t.ctor)}),r.forEach(function(t){return o._registerFunction(o.getStaticSymbol(t.filePath,t.name),t.fn)}),this.annotationForParentClassWithSummaryKind.set(Tt.Directive,[p,f]),this.annotationForParentClassWithSummaryKind.set(Tt.Pipe,[m]),this.annotationForParentClassWithSummaryKind.set(Tt.NgModule,[_]),this.annotationForParentClassWithSummaryKind.set(Tt.Injectable,[S,m,p,f,_])}return t.prototype.componentModuleUrl=function(t){var e=this.findSymbolDeclaration(t);return this.symbolResolver.getResourcePath(e)},t.prototype.resolveExternalReference=function(t,e){var n=void 0;if(!e){n=t.moduleName+":"+t.name;var r=this.resolvedExternalReferences.get(n);if(r)return r}var i=this.symbolResolver.getSymbolByModule(t.moduleName,t.name,e),o=this.findSymbolDeclaration(i);return e||(this.symbolResolver.recordModuleNameForFileName(i.filePath,t.moduleName),this.symbolResolver.recordImportAs(o,i)),n&&this.resolvedExternalReferences.set(n,o),o},t.prototype.findDeclaration=function(t,e,n){return this.findSymbolDeclaration(this.symbolResolver.getSymbolByModule(t,e,n))},t.prototype.tryFindDeclaration=function(t,e){var n=this;return this.symbolResolver.ignoreErrorsFor(function(){return n.findDeclaration(t,e)})},t.prototype.findSymbolDeclaration=function(t){var e=this.symbolResolver.resolveSymbol(t);if(e){var n=e.metadata;if(n&&"resolved"===n.__symbolic&&(n=n.symbol),n instanceof _t)return this.findSymbolDeclaration(e.metadata)}return t},t.prototype.annotations=function(t){var e=this.annotationCache.get(t);if(!e){e=[];var n=this.getTypeMetadata(t),r=this.findParentType(t,n);if(r){var i=this.annotations(r);e.push.apply(e,i)}var o=[];if(n.decorators&&(o=this.simplify(t,n.decorators),e.push.apply(e,o)),r&&!this.summaryResolver.isLibraryFile(t.filePath)&&this.summaryResolver.isLibraryFile(r.filePath)){var a=this.summaryResolver.resolveSummary(r);if(a&&a.type){var s=this.annotationForParentClassWithSummaryKind.get(a.type.summaryKind);s.some(function(t){return o.some(function(e){return t.isTypeOf(e)})})||this.reportError(ap(Yu("Class "+t.name+" in "+t.filePath+" extends from a "+Tt[a.type.summaryKind]+" in another compilation unit without duplicating the decorator",void 0,"Please add a "+s.map(function(t){return t.ngMetadataName}).join(" or ")+" decorator to the class"),t),t)}}this.annotationCache.set(t,e.filter(function(t){return!!t}))}return e},t.prototype.propMetadata=function(t){var e=this,n=this.propertyCache.get(t);if(!n){var r=this.getTypeMetadata(t);n={};var i=this.findParentType(t,r);if(i){var o=this.propMetadata(i);Object.keys(o).forEach(function(t){n[t]=o[t]})}var a=r.members||{};Object.keys(a).forEach(function(r){var i=a[r].find(function(t){return"property"==t.__symbolic||"method"==t.__symbolic}),o=[];n[r]&&o.push.apply(o,n[r]),n[r]=o,i&&i.decorators&&o.push.apply(o,e.simplify(t,i.decorators))}),this.propertyCache.set(t,n)}return n},t.prototype.parameters=function(t){var e=this;if(!(t instanceof _t))return this.reportError(new Error("parameters received "+JSON.stringify(t)+" which is not a StaticSymbol"),t),[];try{var n=this.parameterCache.get(t);if(!n){var r=this.getTypeMetadata(t),i=this.findParentType(t,r),o=r?r.members:null,a=o?o.__ctor__:null;if(a){var s=a.find(function(t){return"constructor"==t.__symbolic}),l=s.parameters||[],c=this.simplify(t,s.parameterDecorators||[]);n=[],l.forEach(function(r,i){var o=[],a=e.trySimplify(t,r);a&&o.push(a);var s=c?c[i]:null;s&&o.push.apply(o,s),n.push(o)})}else i&&(n=this.parameters(i));n||(n=[]),this.parameterCache.set(t,n)}return n}catch(e){throw console.error("Failed on type "+JSON.stringify(t)+" with error "+e),e}},t.prototype._methodNames=function(t){var e=this.methodCache.get(t);if(!e){var n=this.getTypeMetadata(t);e={};var r=this.findParentType(t,n);if(r){var i=this._methodNames(r);Object.keys(i).forEach(function(t){e[t]=i[t]})}var o=n.members||{};Object.keys(o).forEach(function(t){var n=o[t].some(function(t){return"method"==t.__symbolic});e[t]=e[t]||n}),this.methodCache.set(t,e)}return e},t.prototype._staticMembers=function(t){var e=this.staticCache.get(t);if(!e){var n=this.getTypeMetadata(t).statics||{};e=Object.keys(n),this.staticCache.set(t,e)}return e},t.prototype.findParentType=function(t,e){var n=this.trySimplify(t,e.extends);if(n instanceof _t)return n},t.prototype.hasLifecycleHook=function(t,e){t instanceof _t||this.reportError(new Error("hasLifecycleHook received "+JSON.stringify(t)+" which is not a StaticSymbol"),t);try{return!!this._methodNames(t)[e]}catch(e){throw console.error("Failed on type "+JSON.stringify(t)+" with error "+e),e}},t.prototype.guards=function(t){if(!(t instanceof _t))return this.reportError(new Error("guards received "+JSON.stringify(t)+" which is not a StaticSymbol"),t),{};for(var e={},n=0,r=this._staticMembers(t);n<r.length;n++){var i=r[n];if(i.endsWith("TypeGuard")){var o=i.substr(0,i.length-"TypeGuard".length),a=void 0;o.endsWith("UseIf")?(o=i.substr(0,o.length-"UseIf".length),a="UseIf"):a=this.getStaticSymbol(t.filePath,t.name,[i]),e[o]=a}}return e},t.prototype._registerDecoratorOrConstructor=function(t,e){this.conversionMap.set(t,function(t,n){return new(e.bind.apply(e,[void 0].concat(n)))})},t.prototype._registerFunction=function(t,e){this.conversionMap.set(t,function(t,n){return e.apply(void 0,n)})},t.prototype.initializeConversionMap=function(){this.injectionToken=this.findDeclaration(Fu,"InjectionToken"),this.opaqueToken=this.findDeclaration(Fu,"OpaqueToken"),this.ROUTES=this.tryFindDeclaration("@angular/router","ROUTES"),this.ANALYZE_FOR_ENTRY_COMPONENTS=this.findDeclaration(Fu,"ANALYZE_FOR_ENTRY_COMPONENTS"),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"Host"),O),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"Injectable"),S),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"Self"),E),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"SkipSelf"),k),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"Inject"),i),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"Optional"),x),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"Attribute"),a),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"ContentChild"),l),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"ContentChildren"),s),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"ViewChild"),u),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"ViewChildren"),c),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"Input"),g),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"Output"),y),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"Pipe"),m),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"HostBinding"),v),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"HostListener"),b),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"Directive"),p),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"Component"),f),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"NgModule"),_),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"Host"),O),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"Self"),E),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"SkipSelf"),k),this._registerDecoratorOrConstructor(this.findDeclaration(Fu,"Optional"),x)},t.prototype.getStaticSymbol=function(t,e,n){return this.symbolResolver.getStaticSymbol(t,e,n)},t.prototype.trySimplify=function(t,e){var n=this.errorRecorder;this.errorRecorder=function(t,e){};var r=this.simplify(t,e);return this.errorRecorder=n,r},t.prototype.simplify=function(t,e){var n,r=this,i=rp.empty,o=new Map;try{n=function t(e,n,a,s){function l(t){var e=r.symbolResolver.resolveSymbol(t);return e?e.metadata:null}function c(n){return t(e,n,a,0)}function u(n,i){if(n===e)return t(n,i,a+1,s);try{return t(n,i,a+1,s)}catch(t){if(!$u(t))throw t;var o=t.chain?"references '"+t.symbol.name+"'":function(t){if(t.summary)return t.summary;switch(t.message){case Ku:if(t.context&&t.context.className)return"references non-exported class "+t.context.className;break;case Qu:return"is not initialized";case Xu:return"is a destructured variable";case Zu:return"could not be resolved";case Ju:return t.context&&t.context.name?"calls '"+t.context.name+"'":"calls a function";case tp:return t.context&&t.context.name?"references local variable "+t.context.name:"references a local variable"}return"contains the error"}(t),l={message:"'"+n.name+"' "+o,position:t.position,next:t.chain};r.error({message:t.message,advise:t.advise,context:t.context,chain:l,symbol:n},e)}}function p(n){if(np(n))return n;if(n instanceof Array){for(var d=[],h=0,f=n;h<f.length;h++){var m=f[h];if(m&&"spread"===m.__symbolic){var g=c(m.expression);if(Array.isArray(g)){for(var y=0,v=g;y<v.length;y++){var b=v[y];d.push(b)}continue}}var _=p(m);Gu(_)||d.push(_)}return d}if(n instanceof _t)return n===r.injectionToken||r.conversionMap.has(n)||s>0&&!n.members.length?n:null!=(D=l(w=n))?u(w,D):w;if(n){if(n.__symbolic){var w=void 0;switch(n.__symbolic){case"binop":var C=p(n.left);if(Gu(C))return C;var x=p(n.right);if(Gu(x))return x;switch(n.operator){case"&&":return C&&x;case"||":return C||x;case"|":return C|x;case"^":return C^x;case"&":return C&x;case"==":return C==x;case"!=":return C!=x;case"===":return C===x;case"!==":return C!==x;case"<":return C<x;case">":return C>x;case"<=":return C<=x;case">=":return C>=x;case"<<":return C<<x;case">>":return C>>x;case"+":return C+x;case"-":return C-x;case"*":return C*x;case"/":return C/x;case"%":return C%x}return null;case"if":return p(p(n.condition)?n.thenExpression:n.elseExpression);case"pre":var S=p(n.operand);if(Gu(S))return S;switch(n.operator){case"+":return S;case"-":return-S;case"!":return!S;case"~":return~S}return null;case"index":var E=c(n.expression),k=c(n.index);return E&&np(k)?E[k]:null;case"select":var O=n.member,P=e,A=p(n.expression);if(A instanceof _t){var D,T=A.members.concat(O);return null!=(D=l(P=r.getStaticSymbol(A.filePath,A.name,T)))?u(P,D):P}return A&&np(O)?u(P,A[O]):null;case"reference":var M=n.name,I=i.resolve(M);if(I!=rp.missing)return I;break;case"resolved":try{return p(n.symbol)}catch(t){throw $u(t)&&null!=n.fileName&&null!=n.line&&null!=n.character&&(t.position={fileName:n.fileName,line:n.line,column:n.character}),t}case"class":case"function":return e;case"new":case"call":if((w=t(e,n.expression,a+1,0))instanceof _t){if(w===r.injectionToken||w===r.opaqueToken)return e;var R=n.arguments||[],N=r.conversionMap.get(w);if(N){var L=R.map(function(t){return u(e,t)}).map(function(t){return Gu(t)?void 0:t});return N(e,L)}return function(t,n,s,l){if(n&&"function"==n.__symbolic){o.get(t)&&r.error({message:"Recursion is not supported",summary:"called '"+t.name+"' recursively",value:n},t);try{var c=n.value;if(c&&(0!=a||"error"!=c.__symbolic)){var d=n.parameters,h=n.defaults;s=s.map(function(t){return u(e,t)}).map(function(t){return Gu(t)?void 0:t}),h&&h.length>s.length&&s.push.apply(s,h.slice(s.length).map(function(t){return p(t)})),o.set(t,!0);for(var f=rp.build(),m=0;m<d.length;m++)f.define(d[m],s[m]);var g,y=i;try{i=f.done(),g=u(t,c)}finally{i=y}return g}}finally{o.delete(t)}}if(0===a)return Bu;var v=void 0;if(l&&"resolved"==l.__symbolic){var b=l.line,_=l.character,w=l.fileName;null!=w&&null!=b&&null!=_&&(v={fileName:w,line:b,column:_})}r.error({message:Ju,context:t,value:n,position:v},e)}(w,l(w),R,n.expression)}return Bu;case"error":var j=n.message;return null!=n.line?r.error({message:j,context:n.context,value:n,position:{fileName:n.fileName,line:n.line,column:n.character}},e):r.error({message:j,context:n.context},e),Bu;case"ignore":return n}return null}return function(t,e){if(!t)return{};var n={};return Object.keys(t).forEach(function(r){var i=e(t[r],r);Gu(i)||(Vu.test(r)?Object.defineProperty(n,r,{enumerable:!1,configurable:!0,value:i}):n[r]=i)}),n}(n,function(i,o){if(zu.has(o)){if(o===Uu&&Hu in n){var l=p(n.provide);if(l===r.ROUTES||l==r.ANALYZE_FOR_ENTRY_COMPONENTS)return p(i)}return t(e,i,a,s+1)}return p(i)})}return Bu}return p(n)}(t,e,0,0)}catch(e){if(!this.errorRecorder)throw ap(e,t);this.reportError(e,t)}if(!Gu(n))return n},t.prototype.getTypeMetadata=function(t){var e=this.symbolResolver.resolveSymbol(t);return e&&e.metadata?e.metadata:{__symbolic:"class"}},t.prototype.reportError=function(t,e,n){if(!this.errorRecorder)throw t;this.errorRecorder(ap(t,e),e&&e.filePath||n)},t.prototype.error=function(t,e){var n=t.message,r=t.summary,i=t.advise,o=t.position,a=t.context,s=(t.value,t.symbol),l=t.chain;this.reportError(Yu(n,r,i,o,s,a,l),e)},t}(),qu="ngMetadataError";function Yu(t,e,n,r,i,o,a){var s=z(t);return s[qu]=!0,n&&(s.advise=n),r&&(s.position=r),e&&(s.summary=e),o&&(s.context=o),a&&(s.chain=a),i&&(s.symbol=i),s}function $u(t){return!!t[qu]}var Ku="Reference to non-exported class",Qu="Variable not initialized",Xu="Destructuring not supported",Zu="Could not resolve type",Ju="Function call not supported",tp="Reference to a local symbol",ep="Lambda not supported";function np(t){return null===t||"function"!=typeof t&&"object"!=typeof t}var rp=function(){function t(){}return t.build=function(){var e=new Map;return{define:function(t,n){return e.set(t,n),this},done:function(){return e.size>0?new ip(e):t.empty}}},t.missing={},t.empty={resolve:function(e){return t.missing}},t}(),ip=function(t){function e(e){var n=t.call(this)||this;return n.bindings=e,n}return n(e,t),e.prototype.resolve=function(t){return this.bindings.has(t)?this.bindings.get(t):rp.missing},e}(rp);function op(t,e){return{message:""+function(t,e){switch(t){case Ku:if(e&&e.className)return"References to a non-exported class are not supported in decorators but "+e.className+" was referenced.";break;case Qu:return"Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler";case Xu:return"Referencing an exported destructured variable or constant is not supported in decorators and this value is needed by the template compiler";case Zu:if(e&&e.typeName)return"Could not resolve type "+e.typeName;break;case Ju:return e&&e.name?"Function calls are not supported in decorators but '"+e.name+"' was called":"Function calls are not supported in decorators";case tp:if(e&&e.name)return"Reference to a local (non-exported) symbols are not supported in decorators but '"+e.name+"' was referenced";break;case ep:return"Function expressions are not supported in decorators"}return t}(t.message,t.context)+(t.symbol?" in '"+t.symbol.name+"'":""),position:t.position,next:t.next?op(t.next,e):e?{message:e}:void 0}}function ap(t,e){if($u(t)){var n=t.position;return ju(op({message:"Error during template compile of '"+e.name+"'",position:n,next:{message:t.message,next:t.chain,context:t.context,symbol:t.symbol}},t.advise||function(t,e){switch(t){case Ku:if(e&&e.className)return"Consider exporting '"+e.className+"'";break;case Xu:return"Consider simplifying to avoid destructuring";case tp:if(e&&e.name)return"Consider exporting '"+e.name+"'";break;case ep:return"Consider changing the function expression into an exported function"}}(t.message,t.context)))}return t}var sp=function(){function t(t,e){this.host=t,this.staticSymbolCache=e,this.summaryCache=new Map,this.loadedFilePaths=new Map,this.importAs=new Map,this.knownFileNameToModuleNames=new Map}return t.prototype.isLibraryFile=function(t){return!this.host.isSourceFile(Po(t))},t.prototype.toSummaryFileName=function(t,e){return this.host.toSummaryFileName(t,e)},t.prototype.fromSummaryFileName=function(t,e){return this.host.fromSummaryFileName(t,e)},t.prototype.resolveSummary=function(t){var e=t.members.length?this.staticSymbolCache.get(t.filePath,t.name):t,n=this.summaryCache.get(e);return n||(this._loadSummaryFile(t.filePath),n=this.summaryCache.get(t)),e===t&&n||null},t.prototype.getSymbolsOf=function(t){return this._loadSummaryFile(t)?Array.from(this.summaryCache.keys()).filter(function(e){return e.filePath===t}):null},t.prototype.getImportAs=function(t){return t.assertNoMembers(),this.importAs.get(t)},t.prototype.getKnownModuleName=function(t){return this.knownFileNameToModuleNames.get(t)||null},t.prototype.addSummary=function(t){this.summaryCache.set(t.symbol,t)},t.prototype._loadSummaryFile=function(t){var e=this,n=this.loadedFilePaths.get(t);if(null!=n)return n;var r,i,o,a=null;if(this.isLibraryFile(t)){var s=To(t);try{a=this.host.loadSummary(s)}catch(t){throw console.error("Error loading summary file "+s),t}}if(n=null!=a,this.loadedFilePaths.set(t,n),a){var l=(r=this.staticSymbolCache,i=t,o=a,new Cu(r,this).deserialize(i,o)),c=l.moduleName,u=l.summaries,p=l.importAs;u.forEach(function(t){return e.summaryCache.set(t.symbol,t)}),c&&this.knownFileNameToModuleNames.set(t,c),p.forEach(function(t){e.importAs.set(t.symbol,t.importAs)})}return n},t}();function lp(t){return{resolve:function(e,n){var r=t.resourceNameToFileName(n,e);if(!r)throw z("Couldn't resolve resource "+n+" from "+e);return r}}}var cp=function(){},up=function(){function t(){this._summaries=new Map}return t.prototype.isLibraryFile=function(){return!1},t.prototype.toSummaryFileName=function(t){return t},t.prototype.fromSummaryFileName=function(t){return t},t.prototype.resolveSummary=function(t){return this._summaries.get(t)||null},t.prototype.getSymbolsOf=function(){return[]},t.prototype.getImportAs=function(t){return t},t.prototype.getKnownModuleName=function(t){return null},t.prototype.addSummary=function(t){this._summaries.set(t.symbol,t)},t}();function pp(t,e,n,r,i){for(var o=r.createChildWihtLocalVars(),a=0;a<t.length;a++)o.vars.set(t[a],e[a]);var s=i.visitAllStatements(n,o);return s?s.value:null}var dp=function(){function t(t,e,n,r){this.parent=t,this.instance=e,this.className=n,this.vars=r,this.exports=[]}return t.prototype.createChildWihtLocalVars=function(){return new t(this,this.instance,this.className,new Map)},t}(),hp=function(t){this.value=t};var fp=function(){function t(t){this.reflector=t}return t.prototype.debugAst=function(t){return Xs(t)},t.prototype.visitDeclareVarStmt=function(t,e){return e.vars.set(t.name,t.value.visitExpression(this,e)),t.hasModifier(Ua.Exported)&&e.exports.push(t.name),null},t.prototype.visitWriteVarExpr=function(t,e){for(var n=t.value.visitExpression(this,e),r=e;null!=r;){if(r.vars.has(t.name))return r.vars.set(t.name,n),n;r=r.parent}throw new Error("Not declared variable "+t.name)},t.prototype.visitReadVarExpr=function(t,e){var n=t.name;if(null!=t.builtin)switch(t.builtin){case fa.Super:return e.instance.__proto__;case fa.This:return e.instance;case fa.CatchError:n=gp;break;case fa.CatchStack:n=yp;break;default:throw new Error("Unknown builtin variable "+t.builtin)}for(var r=e;null!=r;){if(r.vars.has(n))return r.vars.get(n);r=r.parent}throw new Error("Not declared variable "+n)},t.prototype.visitWriteKeyExpr=function(t,e){var n=t.receiver.visitExpression(this,e),r=t.index.visitExpression(this,e),i=t.value.visitExpression(this,e);return n[r]=i,i},t.prototype.visitWritePropExpr=function(t,e){var n=t.receiver.visitExpression(this,e),r=t.value.visitExpression(this,e);return n[t.name]=r,r},t.prototype.visitInvokeMethodExpr=function(t,e){var n,r=t.receiver.visitExpression(this,e),i=this.visitAllExpressions(t.args,e);if(null!=t.builtin)switch(t.builtin){case ba.ConcatArray:n=r.concat.apply(r,i);break;case ba.SubscribeObservable:n=r.subscribe({next:i[0]});break;case ba.Bind:n=r.bind.apply(r,i);break;default:throw new Error("Unknown builtin method "+t.builtin)}else n=r[t.name].apply(r,i);return n},t.prototype.visitInvokeFunctionExpr=function(t,e){var n=this.visitAllExpressions(t.args,e),r=t.fn;return r instanceof ma&&r.builtin===fa.Super?(e.instance.constructor.prototype.constructor.apply(e.instance,n),null):t.fn.visitExpression(this,e).apply(null,n)},t.prototype.visitReturnStmt=function(t,e){return new hp(t.value.visitExpression(this,e))},t.prototype.visitDeclareClassStmt=function(t,e){var n=function(t,e,n){var r={};t.getters.forEach(function(i){r[i.name]={configurable:!1,get:function(){var r=new dp(e,this,t.name,e.vars);return pp([],[],i.body,r,n)}}}),t.methods.forEach(function(i){var o=i.params.map(function(t){return t.name});r[i.name]={writable:!1,configurable:!1,value:function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var s=new dp(e,this,t.name,e.vars);return pp(o,r,i.body,s,n)}}});var i=t.constructorMethod.params.map(function(t){return t.name}),o=function(){for(var r=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var s=new dp(e,this,t.name,e.vars);t.fields.forEach(function(t){r[t.name]=void 0}),pp(i,o,t.constructorMethod.body,s,n)},a=t.parent?t.parent.visitExpression(n,e):Object;return o.prototype=Object.create(a.prototype,r),o}(t,e,this);return e.vars.set(t.name,n),t.hasModifier(Ua.Exported)&&e.exports.push(t.name),null},t.prototype.visitExpressionStmt=function(t,e){return t.expr.visitExpression(this,e)},t.prototype.visitIfStmt=function(t,e){return t.condition.visitExpression(this,e)?this.visitAllStatements(t.trueCase,e):null!=t.falseCase?this.visitAllStatements(t.falseCase,e):null},t.prototype.visitTryCatchStmt=function(t,e){try{return this.visitAllStatements(t.bodyStmts,e)}catch(r){var n=e.createChildWihtLocalVars();return n.vars.set(gp,r),n.vars.set(yp,r.stack),this.visitAllStatements(t.catchStmts,n)}},t.prototype.visitThrowStmt=function(t,e){throw t.error.visitExpression(this,e)},t.prototype.visitCommentStmt=function(t,e){return null},t.prototype.visitInstantiateExpr=function(t,e){var n=this.visitAllExpressions(t.args,e),r=t.classExpr.visitExpression(this,e);return new(r.bind.apply(r,[void 0].concat(n)))},t.prototype.visitLiteralExpr=function(t,e){return t.value},t.prototype.visitExternalExpr=function(t,e){return this.reflector.resolveExternalReference(t.value)},t.prototype.visitConditionalExpr=function(t,e){return t.condition.visitExpression(this,e)?t.trueCase.visitExpression(this,e):null!=t.falseCase?t.falseCase.visitExpression(this,e):null},t.prototype.visitNotExpr=function(t,e){return!t.condition.visitExpression(this,e)},t.prototype.visitAssertNotNullExpr=function(t,e){return t.condition.visitExpression(this,e)},t.prototype.visitCastExpr=function(t,e){return t.value.visitExpression(this,e)},t.prototype.visitFunctionExpr=function(t,e){return mp(t.params.map(function(t){return t.name}),t.statements,e,this)},t.prototype.visitDeclareFunctionStmt=function(t,e){var n=t.params.map(function(t){return t.name});return e.vars.set(t.name,mp(n,t.statements,e,this)),t.hasModifier(Ua.Exported)&&e.exports.push(t.name),null},t.prototype.visitBinaryOperatorExpr=function(t,e){var n=this,r=function(){return t.lhs.visitExpression(n,e)},i=function(){return t.rhs.visitExpression(n,e)};switch(t.operator){case ua.Equals:return r()==i();case ua.Identical:return r()===i();case ua.NotEquals:return r()!=i();case ua.NotIdentical:return r()!==i();case ua.And:return r()&&i();case ua.Or:return r()||i();case ua.Plus:return r()+i();case ua.Minus:return r()-i();case ua.Divide:return r()/i();case ua.Multiply:return r()*i();case ua.Modulo:return r()%i();case ua.Lower:return r()<i();case ua.LowerEquals:return r()<=i();case ua.Bigger:return r()>i();case ua.BiggerEquals:return r()>=i();default:throw new Error("Unknown operator "+t.operator)}},t.prototype.visitReadPropExpr=function(t,e){return t.receiver.visitExpression(this,e)[t.name]},t.prototype.visitReadKeyExpr=function(t,e){return t.receiver.visitExpression(this,e)[t.index.visitExpression(this,e)]},t.prototype.visitLiteralArrayExpr=function(t,e){return this.visitAllExpressions(t.entries,e)},t.prototype.visitLiteralMapExpr=function(t,e){var n=this,r={};return t.entries.forEach(function(t){return r[t.key]=t.value.visitExpression(n,e)}),r},t.prototype.visitCommaExpr=function(t,e){var n=this.visitAllExpressions(t.parts,e);return n[n.length-1]},t.prototype.visitAllExpressions=function(t,e){var n=this;return t.map(function(t){return t.visitExpression(n,e)})},t.prototype.visitAllStatements=function(t,e){for(var n=0;n<t.length;n++){var r=t[n].visitStatement(this,e);if(r instanceof hp)return r}return null},t}();function mp(t,e,n,r){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return pp(t,i,e,n,r)}}var gp="error",yp="stack";function vp(t,e,n,r){var i=new bp(n),o=Ys.createRoot();return i.visitAllStatements(e,o),i.createReturnStmt(o),function(t,e,n,r){var i=e.toSource()+"\n//# sourceURL="+t,o=[],a=[];for(var s in n)o.push(s),a.push(n[s]);if(r){var l=(new(Function.bind.apply(Function,[void 0].concat(o.concat("return null;"))))).toString(),c=l.slice(0,l.indexOf("return null;")).split("\n").length-1;i+="\n"+e.toSourceMapGenerator(t,c).toJsComment()}return(new(Function.bind.apply(Function,[void 0].concat(o.concat(i))))).apply(void 0,a)}(t,o,i.getArgs(),r)}var bp=function(t){function e(e){var n=t.call(this)||this;return n.reflector=e,n._evalArgNames=[],n._evalArgValues=[],n._evalExportedVars=[],n}return n(e,t),e.prototype.createReturnStmt=function(t){new qa(new ja(this._evalExportedVars.map(function(t){return new La(t,cs(t),!1)}))).visitStatement(this,t)},e.prototype.getArgs=function(){for(var t={},e=0;e<this._evalArgNames.length;e++)t[this._evalArgNames[e]]=this._evalArgValues[e];return t},e.prototype.visitExternalExpr=function(t,e){var n=this.reflector.resolveExternalReference(t.value),r=this._evalArgValues.indexOf(n);if(-1===r){r=this._evalArgValues.length,this._evalArgValues.push(n);var i=Et({reference:n})||"val";this._evalArgNames.push("jit_"+i+"_"+r)}return e.print(t,this._evalArgNames[r]),null},e.prototype.visitDeclareVarStmt=function(e,n){return e.hasModifier(Ua.Exported)&&this._evalExportedVars.push(e.name),t.prototype.visitDeclareVarStmt.call(this,e,n)},e.prototype.visitDeclareFunctionStmt=function(e,n){return e.hasModifier(Ua.Exported)&&this._evalExportedVars.push(e.name),t.prototype.visitDeclareFunctionStmt.call(this,e,n)},e.prototype.visitDeclareClassStmt=function(e,n){return e.hasModifier(Ua.Exported)&&this._evalExportedVars.push(e.name),t.prototype.visitDeclareClassStmt.call(this,e,n)},e}(function(t){function e(){return t.call(this,!1)||this}return n(e,t),e.prototype.visitDeclareClassStmt=function(t,e){var n=this;return e.pushClass(t),this._visitClassConstructor(t,e),null!=t.parent&&(e.print(t,t.name+".prototype = Object.create("),t.parent.visitExpression(this,e),e.println(t,".prototype);")),t.getters.forEach(function(r){return n._visitClassGetter(t,r,e)}),t.methods.forEach(function(r){return n._visitClassMethod(t,r,e)}),e.popClass(),null},e.prototype._visitClassConstructor=function(t,e){e.print(t,"function "+t.name+"("),null!=t.constructorMethod&&this._visitParams(t.constructorMethod.params,e),e.println(t,") {"),e.incIndent(),null!=t.constructorMethod&&t.constructorMethod.body.length>0&&(e.println(t,"var self = this;"),this.visitAllStatements(t.constructorMethod.body,e)),e.decIndent(),e.println(t,"}")},e.prototype._visitClassGetter=function(t,e,n){n.println(t,"Object.defineProperty("+t.name+".prototype, '"+e.name+"', { get: function() {"),n.incIndent(),e.body.length>0&&(n.println(t,"var self = this;"),this.visitAllStatements(e.body,n)),n.decIndent(),n.println(t,"}});")},e.prototype._visitClassMethod=function(t,e,n){n.print(t,t.name+".prototype."+e.name+" = function("),this._visitParams(e.params,n),n.println(t,") {"),n.incIndent(),e.body.length>0&&(n.println(t,"var self = this;"),this.visitAllStatements(e.body,n)),n.decIndent(),n.println(t,"};")},e.prototype.visitReadVarExpr=function(e,n){if(e.builtin===fa.This)n.print(e,"self");else{if(e.builtin===fa.Super)throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");t.prototype.visitReadVarExpr.call(this,e,n)}return null},e.prototype.visitDeclareVarStmt=function(t,e){return e.print(t,"var "+t.name+" = "),t.value.visitExpression(this,e),e.println(t,";"),null},e.prototype.visitCastExpr=function(t,e){return t.value.visitExpression(this,e),null},e.prototype.visitInvokeFunctionExpr=function(e,n){var r=e.fn;return r instanceof ma&&r.builtin===fa.Super?(n.currentClass.parent.visitExpression(this,n),n.print(e,".call(this"),e.args.length>0&&(n.print(e,", "),this.visitAllExpressions(e.args,n,",")),n.print(e,")")):t.prototype.visitInvokeFunctionExpr.call(this,e,n),null},e.prototype.visitFunctionExpr=function(t,e){return e.print(t,"function("),this._visitParams(t.params,e),e.println(t,") {"),e.incIndent(),this.visitAllStatements(t.statements,e),e.decIndent(),e.print(t,"}"),null},e.prototype.visitDeclareFunctionStmt=function(t,e){return e.print(t,"function "+t.name+"("),this._visitParams(t.params,e),e.println(t,") {"),e.incIndent(),this.visitAllStatements(t.statements,e),e.decIndent(),e.println(t,"}"),null},e.prototype.visitTryCatchStmt=function(t,e){e.println(t,"try {"),e.incIndent(),this.visitAllStatements(t.bodyStmts,e),e.decIndent(),e.println(t,"} catch ("+Gs.name+") {"),e.incIndent();var n=[Ws.set(Gs.prop("stack")).toDeclStmt(null,[Ua.Final])].concat(t.catchStmts);return this.visitAllStatements(n,e),e.decIndent(),e.println(t,"}"),null},e.prototype._visitParams=function(t,e){this.visitAllObjects(function(t){return e.print(null,t.name)},t,e,",")},e.prototype.getBuiltinMethodName=function(t){var e;switch(t){case ba.ConcatArray:e="concat";break;case ba.SubscribeObservable:e="subscribe";break;case ba.Bind:e="bind";break;default:throw new Error("Unknown builtin method: "+t)}return e},e}($s)),_p=function(){function t(t,e,n,r,i,o,a,s,l,c){this._metadataResolver=t,this._templateParser=e,this._styleCompiler=n,this._viewCompiler=r,this._ngModuleCompiler=i,this._summaryResolver=o,this._reflector=a,this._compilerConfig=s,this._console=l,this.getExtraNgModuleProviders=c,this._compiledTemplateCache=new Map,this._compiledHostTemplateCache=new Map,this._compiledDirectiveWrapperCache=new Map,this._compiledNgModuleCache=new Map,this._sharedStylesheetCount=0,this._addedAotSummaries=new Set}return t.prototype.compileModuleSync=function(t){return B(this._compileModuleAndComponents(t,!0))},t.prototype.compileModuleAsync=function(t){return Promise.resolve(this._compileModuleAndComponents(t,!1))},t.prototype.compileModuleAndAllComponentsSync=function(t){return B(this._compileModuleAndAllComponents(t,!0))},t.prototype.compileModuleAndAllComponentsAsync=function(t){return Promise.resolve(this._compileModuleAndAllComponents(t,!1))},t.prototype.getComponentFactory=function(t){return this._metadataResolver.getDirectiveSummary(t).componentFactory},t.prototype.loadAotSummaries=function(t){this.clearCache(),this._addAotSummaries(t)},t.prototype._addAotSummaries=function(t){if(!this._addedAotSummaries.has(t)){this._addedAotSummaries.add(t);for(var e=t(),n=0;n<e.length;n++){var r=e[n];if("function"==typeof r)this._addAotSummaries(r);else{var i=r;this._summaryResolver.addSummary({symbol:i.type.reference,metadata:null,type:i})}}}},t.prototype.hasAotSummary=function(t){return!!this._summaryResolver.resolveSummary(t)},t.prototype._filterJitIdentifiers=function(t){var e=this;return t.map(function(t){return t.reference}).filter(function(t){return!e.hasAotSummary(t)})},t.prototype._compileModuleAndComponents=function(t,e){var n=this;return U(this._loadModules(t,e),function(){return n._compileComponents(t,null),n._compileModule(t)})},t.prototype._compileModuleAndAllComponents=function(t,e){var n=this;return U(this._loadModules(t,e),function(){var e=[];return n._compileComponents(t,e),{ngModuleFactory:n._compileModule(t),componentFactories:e}})},t.prototype._loadModules=function(t,e){var n=this,r=[],i=this._metadataResolver.getNgModuleMetadata(t);return this._filterJitIdentifiers(i.transitiveModule.modules).forEach(function(t){var i=n._metadataResolver.getNgModuleMetadata(t);n._filterJitIdentifiers(i.declaredDirectives).forEach(function(t){var o=n._metadataResolver.loadDirectiveMetadata(i.type.reference,t,e);o&&r.push(o)}),n._filterJitIdentifiers(i.declaredPipes).forEach(function(t){return n._metadataResolver.getOrLoadPipeMetadata(t)})}),H(r)},t.prototype._compileModule=function(t){var e=this._compiledNgModuleCache.get(t);if(!e){var n=this._metadataResolver.getNgModuleMetadata(t),r=this.getExtraNgModuleProviders(n.type.reference),i=xp(),o=this._ngModuleCompiler.compile(i,n,r);e=this._interpretOrJit(qt(n),i.statements)[o.ngModuleFactoryVar],this._compiledNgModuleCache.set(n.type.reference,e)}return e},t.prototype._compileComponents=function(t,e){var n=this,r=this._metadataResolver.getNgModuleMetadata(t),i=new Map,o=new Set,a=this._filterJitIdentifiers(r.transitiveModule.modules);a.forEach(function(t){var r=n._metadataResolver.getNgModuleMetadata(t);n._filterJitIdentifiers(r.declaredDirectives).forEach(function(t){i.set(t,r);var a=n._metadataResolver.getDirectiveMetadata(t);if(a.isComponent&&(o.add(n._createCompiledTemplate(a,r)),e)){var s=n._createCompiledHostTemplate(a.type.reference,r);o.add(s),e.push(a.componentFactory)}})}),a.forEach(function(t){var e=n._metadataResolver.getNgModuleMetadata(t);n._filterJitIdentifiers(e.declaredDirectives).forEach(function(t){var e=n._metadataResolver.getDirectiveMetadata(t);e.isComponent&&e.entryComponents.forEach(function(t){var e=i.get(t.componentType);o.add(n._createCompiledHostTemplate(t.componentType,e))})}),e.entryComponents.forEach(function(t){if(!n.hasAotSummary(t.componentType.reference)){var e=i.get(t.componentType);o.add(n._createCompiledHostTemplate(t.componentType,e))}})}),o.forEach(function(t){return n._compileTemplate(t)})},t.prototype.clearCacheFor=function(t){this._compiledNgModuleCache.delete(t),this._metadataResolver.clearCacheFor(t),this._compiledHostTemplateCache.delete(t),this._compiledTemplateCache.get(t)&&this._compiledTemplateCache.delete(t)},t.prototype.clearCache=function(){this._metadataResolver.clearCache(),this._compiledTemplateCache.clear(),this._compiledHostTemplateCache.clear(),this._compiledNgModuleCache.clear()},t.prototype._createCompiledHostTemplate=function(t,e){if(!e)throw new Error("Component "+K(t)+" is not part of any NgModule or the module has not been imported into your module.");var n=this._compiledHostTemplateCache.get(t);if(!n){var r=this._metadataResolver.getDirectiveMetadata(t);Cp(r);var i=this._metadataResolver.getHostComponentMetadata(r,r.componentFactory.viewDefFactory);n=new wp(!0,r.type,i,e,[r.type]),this._compiledHostTemplateCache.set(t,n)}return n},t.prototype._createCompiledTemplate=function(t,e){var n=this._compiledTemplateCache.get(t.type.reference);return n||(Cp(t),n=new wp(!1,t.type,t,e,e.transitiveModule.directives),this._compiledTemplateCache.set(t.type.reference,n)),n},t.prototype._compileTemplate=function(t){var e=this;if(!t.isCompiled){var n=t.compMeta,r=new Map,i=xp(),o=this._styleCompiler.compileComponent(i,n);n.template.externalStylesheets.forEach(function(t){var i=e._styleCompiler.compileStyles(xp(),n,t);r.set(t.moduleUrl,i)}),this._resolveStylesCompileResult(o,r);t.ngModule.transitiveModule.pipes.map(function(t){return e._metadataResolver.getPipeSummary(t.reference)});var a=this._parseTemplate(n,t.ngModule,t.directives),s=a.template,l=a.pipes,c=this._viewCompiler.compileComponent(i,n,s,cs(o.stylesVar),l),u=this._interpretOrJit(Yt(t.ngModule.type,t.compMeta),i.statements),p=u[c.viewClassVar],d=u[c.rendererTypeVar];t.compiled(p,d)}},t.prototype._parseTemplate=function(t,e,n){var r=this,i=t.template.preserveWhitespaces,o=n.map(function(t){return r._metadataResolver.getDirectiveSummary(t.reference)}),a=e.transitiveModule.pipes.map(function(t){return r._metadataResolver.getPipeSummary(t.reference)});return this._templateParser.parse(t,t.template.htmlAst,o,a,e.schemas,Gt(e.type,t,t.template),i)},t.prototype._resolveStylesCompileResult=function(t,e){var n=this;t.dependencies.forEach(function(t,r){var i=e.get(t.moduleUrl),o=n._resolveAndEvalStylesCompileResult(i,e);t.setValue(o)})},t.prototype._resolveAndEvalStylesCompileResult=function(t,e){return this._resolveStylesCompileResult(t,e),this._interpretOrJit(Wt(t.meta,this._sharedStylesheetCount++),t.outputCtx.statements)[t.stylesVar]},t.prototype._interpretOrJit=function(t,e){return this._compilerConfig.useJit?vp(t,e,this._reflector,this._compilerConfig.jitDevMode):function(t,e){var n=new dp(null,null,null,new Map);new fp(e).visitAllStatements(t,n);var r={};return n.exports.forEach(function(t){r[t]=n.vars.get(t)}),r}(e,this._reflector)},t}(),wp=function(){function t(t,e,n,r,i){this.isHost=t,this.compType=e,this.compMeta=n,this.ngModule=r,this.directives=i,this._viewClass=null,this.isCompiled=!1}return t.prototype.compiled=function(t,e){for(var n in this._viewClass=t,this.compMeta.componentViewType.setDelegate(t),e)this.compMeta.rendererType[n]=e[n];this.isCompiled=!0},t}();function Cp(t){if(!t.isComponent)throw new Error("Could not compile '"+Et(t.type)+"' because it is not a component.")}function xp(){return{statements:[],genFilePath:"",importExpr:function(t){return us({name:Et(t),moduleName:null,runtime:t})}}}var Sp=function(){};var Ep=function(){function t(t){void 0===t&&(t=null),this._packagePrefix=t}return t.prototype.resolve=function(t,e){var n=e;null!=t&&t.length>0&&(n=function(t,e){var n=Pp(encodeURI(e)),r=Pp(t);{if(null!=n[Op.Scheme])return Ap(n);n[Op.Scheme]=r[Op.Scheme]}for(var i=Op.Scheme;i<=Op.Port;i++)null==n[i]&&(n[i]=r[i]);if("/"==n[Op.Path][0])return Ap(n);var o=r[Op.Path];null==o&&(o="/");var a=o.lastIndexOf("/");return o=o.substring(0,a+1)+n[Op.Path],n[Op.Path]=o,Ap(n)}(t,n));var r=Pp(n),i=this._packagePrefix;if(null!=i&&null!=r&&"package"==r[Op.Scheme]){var o=r[Op.Path];return(i=i.replace(/\/+$/,""))+"/"+(o=o.replace(/^\/+/,""))}return n},t}();var kp=new RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),Op={Scheme:1,UserInfo:2,Domain:3,Port:4,Path:5,QueryData:6,Fragment:7};function Pp(t){return t.match(kp)}function Ap(t){var e,n,r,i,o,a,s,l,c=t[Op.Path];return c=null==c?"":function(t){if("/"==t)return"/";for(var e="/"==t[0]?"/":"",n="/"===t[t.length-1]?"/":"",r=t.split("/"),i=[],o=0,a=0;a<r.length;a++){var s=r[a];switch(s){case"":case".":break;case"..":i.length>0?i.pop():o++;break;default:i.push(s)}}if(""==e){for(;o-- >0;)i.unshift("..");0===i.length&&i.push(".")}return e+i.join("/")+n}(c),t[Op.Path]=c,e=t[Op.Scheme],n=t[Op.UserInfo],r=t[Op.Domain],i=t[Op.Port],o=c,a=t[Op.QueryData],s=t[Op.Fragment],l=[],null!=e&&l.push(e+":"),null!=r&&(l.push("//"),null!=n&&l.push(n+"@"),l.push(r),null!=i&&l.push(":"+i)),null!=o&&l.push(o),null!=a&&l.push("?"+a),null!=s&&l.push("#"+s),l.join("")}Op[Op.Scheme]="Scheme",Op[Op.UserInfo]="UserInfo",Op[Op.Domain]="Domain",Op[Op.Port]="Port",Op[Op.Path]="Path",Op[Op.QueryData]="QueryData",Op[Op.Fragment]="Fragment";var Dp=function(){function t(){}return t.prototype.get=function(t){return""},t}(),Tp=function(){function t(t,e,n,r){this.host=t,this.staticSymbolResolver=e,this.messageBundle=n,this.metadataResolver=r}return t.prototype.extract=function(t){var e=this,n=Du(t,this.host,this.staticSymbolResolver,this.metadataResolver),r=n.files,i=n.ngModules;return Promise.all(i.map(function(t){return e.metadataResolver.loadNgModuleDirectiveAndPipeMetadata(t.type.reference,!1)})).then(function(){var t=[];if(r.forEach(function(n){var r=[];n.directives.forEach(function(t){var n=e.metadataResolver.getDirectiveMetadata(t);n&&n.isComponent&&r.push(n)}),r.forEach(function(r){var i=r.template.template,o=ae.fromArray(r.template.interpolation);t.push.apply(t,e.messageBundle.updateFromTemplate(i,n.fileName,o))})}),t.length)throw new Error(t.map(function(t){return t.toString()}).join("\n"));return e.messageBundle})},t.create=function(e,n){var r=new bo,i=lp(e),o=new wt,a=new sp(e,o),s=new gu(e,o,a),l=new Wu(a,s),c=new vt({defaultEncapsulation:d.Emulated,useJit:!1}),u=new Re({get:function(t){return e.loadResource(t)}},i,r,c),p=new ul,h=new Ko(c,r,new Ls(l),new je(l),new tl(l),a,p,u,console,o,l),f=new cu(r,[],{},n);return{extractor:new t(e,s,f,h),staticReflector:l}},t}();t.core=M,t.CompilerConfig=vt,t.preserveWhitespacesDefault=bt,t.isLoweredSymbol=No,t.createLoweredSymbol=function(t){return"ɵ"+t},t.Identifiers=jo,t.JitCompiler=_p,t.DirectiveResolver=je,t.PipeResolver=tl,t.NgModuleResolver=Ls,t.DEFAULT_INTERPOLATION_CONFIG=se,t.InterpolationConfig=ae,t.NgModuleCompiler=Ns,t.AssertNotNull=Pa,t.BinaryOperator=ua,t.BinaryOperatorExpr=Ma,t.BuiltinMethod=ba,t.BuiltinVar=fa,t.CastExpr=Aa,t.ClassStmt=Qa,t.CommaExpr=Fa,t.CommentStmt=Za,t.ConditionalExpr=ka,t.DeclareFunctionStmt=Ga,t.DeclareVarStmt=za,t.ExpressionStatement=Wa,t.ExternalExpr=Sa,t.ExternalReference=Ea,t.FunctionExpr=Ta,t.IfStmt=Xa,t.InstantiateExpr=Ca,t.InvokeFunctionExpr=wa,t.InvokeMethodExpr=_a,t.LiteralArrayExpr=Na,t.LiteralExpr=xa,t.LiteralMapExpr=ja,t.NotExpr=Oa,t.ReadKeyExpr=Ra,t.ReadPropExpr=Ia,t.ReadVarExpr=ma,t.ReturnStatement=qa,t.ThrowStmt=ts,t.TryCatchStmt=Ja,t.WriteKeyExpr=ya,t.WritePropExpr=va,t.WriteVarExpr=ga,t.StmtModifier=Ua,t.Statement=Ha,t.collectExternalReferences=function(t){var e=new os;return e.visitAllStatements(t,null),e.externalReferences},t.EmitterVisitorContext=Ys,t.ViewCompiler=Qc,t.getParseErrors=function(t){return t[W]||[]},t.isSyntaxError=function(t){return t[G]},t.syntaxError=z,t.Version=Z,t.VERSION=J,t.TextAst=tt,t.BoundTextAst=et,t.AttrAst=nt,t.BoundElementPropertyAst=rt,t.BoundEventAst=it,t.ReferenceAst=ot,t.VariableAst=at,t.ElementAst=st,t.EmbeddedTemplateAst=lt,t.BoundDirectivePropertyAst=ct,t.DirectiveAst=ut,t.ProviderAst=pt,t.ProviderAstType=dt,t.NgContentAst=ht,t.PropertyBindingType=ft,t.NullTemplateVisitor=mt,t.RecursiveTemplateAstVisitor=gt,t.templateVisitAll=yt,t.identifierName=Et,t.identifierModuleUrl=kt,t.viewClassName=Ot,t.rendererTypeName=Pt,t.hostViewClassName=At,t.componentFactoryName=Dt,t.CompileSummaryKind=Tt,t.tokenName=Mt,t.tokenReference=It,t.CompileStylesheetMetadata=Rt,t.CompileTemplateMetadata=Nt,t.CompileDirectiveMetadata=Lt,t.CompilePipeMetadata=jt,t.CompileNgModuleMetadata=Ft,t.TransitiveCompileNgModuleMetadata=Vt,t.ProviderMeta=Ut,t.flatten=Ht,t.templateSourceUrl=Gt,t.sharedStylesheetJitUrl=Wt,t.ngModuleJitUrl=qt,t.templateJitUrl=Yt,t.createAotUrlResolver=lp,t.createAotCompiler=function(t,e,n){var r=e.translations||"",i=lp(t),o=new wt,a=new sp(t,o),s=new gu(t,o,a),l=new Wu(a,s,[],[],n),c=new Co(new bo,r,e.i18nFormat,e.missingTranslation,console),u=new vt({defaultEncapsulation:d.Emulated,useJit:!1,enableLegacyTemplate:!0===e.enableLegacyTemplate,missingTranslation:e.missingTranslation,preserveWhitespaces:e.preserveWhitespaces,strictInjectionParameters:e.strictInjectionParameters}),p=new Re({get:function(e){return t.loadResource(e)}},i,c,u),h=new mr(new kn),f=new ul,m=new mc(u,l,h,f,c,console,[]),g=new Ko(u,c,new Ls(l),new je(l),new tl(l),a,f,p,console,o,l,n),y=new Qc(l),v=new zc(e,l);return{compiler:new Eu(u,e,t,l,g,m,new Bl(i),y,v,new Ns(l),new Zs,a,s),reflector:l}},t.AotCompiler=Eu,t.analyzeNgModules=Au,t.analyzeAndValidateNgModules=Du,t.analyzeFile=Mu,t.mergeAnalyzedFiles=Iu,t.GeneratedFile=pu,t.toTypeScript=function(t,e){if(void 0===e&&(e=""),!t.stmts)throw new Error("Illegal state: No stmts present on GeneratedFile "+t.genFileUrl);return(new Zs).emitStatements(t.genFileUrl,t.stmts,e)},t.formattedError=ju,t.isFormattedError=function(t){return!!t[Nu]},t.StaticReflector=Wu,t.StaticSymbol=_t,t.StaticSymbolCache=wt,t.ResolvedStaticSymbol=mu,t.StaticSymbolResolver=gu,t.unescapeIdentifier=yu,t.unwrapResolvedMetadata=vu,t.AotSummaryResolver=sp,t.AstPath=$t,t.SummaryResolver=cp,t.JitSummaryResolver=up,t.CompileReflector=Sp,t.createUrlResolverWithoutPackagePrefix=function(){return new Ep},t.createOfflineCompileUrlResolver=function(){return new Ep(".")},t.UrlResolver=Ep,t.getUrlScheme=function(t){var e=Pp(t);return e&&e[Op.Scheme]||""},t.ResourceLoader=Dp,t.ElementSchemaRegistry=rl,t.Extractor=Tp,t.I18NHtmlParser=Co,t.MessageBundle=cu,t.Serializer=Ui,t.Xliff=Ji,t.Xliff2=ro,t.Xmb=lo,t.Xtb=go,t.DirectiveNormalizer=Re,t.ParserError=jn,t.ParseSpan=Fn,t.AST=Vn,t.Quote=Bn,t.EmptyExpr=Un,t.ImplicitReceiver=Hn,t.Chain=zn,t.Conditional=Gn,t.PropertyRead=Wn,t.PropertyWrite=qn,t.SafePropertyRead=Yn,t.KeyedRead=$n,t.KeyedWrite=Kn,t.BindingPipe=Qn,t.LiteralPrimitive=Xn,t.LiteralArray=Zn,t.LiteralMap=Jn,t.Interpolation=tr,t.Binary=er,t.PrefixNot=nr,t.NonNullAssert=rr,t.MethodCall=ir,t.SafeMethodCall=or,t.FunctionCall=ar,t.ASTWithSource=sr,t.TemplateBinding=lr,t.NullAstVisitor=cr,t.RecursiveAstVisitor=ur,t.AstTransformer=pr,t.visitAstChildren=function(t,e,n){function r(t){e.visit&&e.visit(t,n)||t.visit(e,n)}function i(t){t.forEach(r)}t.visit({visitBinary:function(t){r(t.left),r(t.right)},visitChain:function(t){i(t.expressions)},visitConditional:function(t){r(t.condition),r(t.trueExp),r(t.falseExp)},visitFunctionCall:function(t){t.target&&r(t.target),i(t.args)},visitImplicitReceiver:function(t){},visitInterpolation:function(t){i(t.expressions)},visitKeyedRead:function(t){r(t.obj),r(t.key)},visitKeyedWrite:function(t){r(t.obj),r(t.key),r(t.obj)},visitLiteralArray:function(t){i(t.expressions)},visitLiteralMap:function(t){},visitLiteralPrimitive:function(t){},visitMethodCall:function(t){r(t.receiver),i(t.args)},visitPipe:function(t){r(t.exp),i(t.args)},visitPrefixNot:function(t){r(t.expression)},visitNonNullAssert:function(t){r(t.expression)},visitPropertyRead:function(t){r(t.receiver)},visitPropertyWrite:function(t){r(t.receiver),r(t.value)},visitQuote:function(t){},visitSafeMethodCall:function(t){r(t.receiver),i(t.args)},visitSafePropertyRead:function(t){r(t.receiver)}})},t.TokenType=Sn,t.Lexer=kn,t.Token=On,t.EOF=Dn,t.isIdentifier=In,t.isQuote=Nn,t.SplitInterpolation=dr,t.TemplateBindingParseResult=hr,t.Parser=mr,t._ParseAST=gr,t.ERROR_COMPONENT_TYPE=$o,t.CompileMetadataResolver=Ko,t.Text=Kt,t.Expansion=Qt,t.ExpansionCase=Xt,t.Attribute=Zt,t.Element=Jt,t.Comment=te,t.visitAll=ee,t.RecursiveVisitor=ne,t.findNode=function(t,e){var r=[];return ee(new(function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.visit=function(t,n){var i=function t(e){var n=e.sourceSpan.start.offset,r=e.sourceSpan.end.offset;return e instanceof Jt&&(e.endSourceSpan?r=e.endSourceSpan.end.offset:e.children&&e.children.length&&(r=t(e.children[e.children.length-1]).end)),{start:n,end:r}}(t);if(!(i.start<=e&&e<i.end))return!0;r.push(t)},i}(ne)),t),new $t(r,e)},t.ParseTreeResult=Br,t.TreeError=Vr,t.HtmlParser=bo,t.HtmlTagDefinition=vi,t.getHtmlTagDefinition=wi,t.TagContentType=he,t.splitNsName=fe,t.isNgContainer=me,t.isNgContent=ge,t.isNgTemplate=ye,t.getNsPrefix=ve,t.mergeNsAndName=be,t.NAMED_ENTITIES=_e,t.NGSP_UNICODE=we,t.debugOutputAstAsTypeScript=Xs,t.TypeScriptEmitter=Zs,t.ParseLocation=vr,t.ParseSourceFile=br,t.ParseSourceSpan=_r,t.ParseErrorLevel=wr,t.ParseError=Cr,t.typeSourceSpan=xr,t.DomElementSchemaRegistry=ul,t.CssSelector=Go,t.SelectorMatcher=Wo,t.SelectorListContext=qo,t.SelectorContext=Yo,t.StylesCompileDependency=Fl,t.CompiledStylesheet=Vl,t.StyleCompiler=Bl,t.TemplateParseError=hc,t.TemplateParseResult=fc,t.TemplateParser=mc,t.splitClasses=bc,t.createElementCssSelector=wc,t.removeSummaryDuplicates=Ec,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r.ng=r.ng||{},r.ng.compiler={}))},{}],62:[function(t,e,n){(function(r){var i,o;i=this,o=function(t,e,n,i,o,a){"use strict";var s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function l(t,e){function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},u=function(){function t(t){this._desc=t,this.ngMetadataName="InjectionToken"}return t.prototype.toString=function(){return"InjectionToken "+this._desc},t}(),p="__annotations__",d="__paramaters__",h="__prop__metadata__";function f(t,e,n,r){var i=m(e);function o(t){if(this instanceof o)return i.call(this,t),this;var e=new o(t),n=function(t){return(t.hasOwnProperty(p)?t[p]:Object.defineProperty(t,p,{value:[]})[p]).push(e),t};return r&&r(n),n}return n&&(o.prototype=Object.create(n.prototype)),o.prototype.ngMetadataName=t,o.annotationCls=o,o}function m(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(t){var r=t.apply(void 0,e);for(var i in r)this[i]=r[i]}}}function g(t,e,n){var r=m(e);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this instanceof i)return r.apply(this,t),this;var n,o=new((n=i).bind.apply(n,[void 0].concat(t)));return a.annotation=o,a;function a(t,e,n){for(var r=t.hasOwnProperty(d)?t[d]:Object.defineProperty(t,d,{value:[]})[d];r.length<=n;)r.push(null);return(r[n]=r[n]||[]).push(o),t}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=t,i.annotationCls=i,i}function y(t,e,n){var r=m(e);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this instanceof i)return r.apply(this,t),this;var n,o=new((n=i).bind.apply(n,[void 0].concat(t)));return function(t,e){var n=t.constructor,r=n.hasOwnProperty(h)?n[h]:Object.defineProperty(n,h,{value:{}})[h];r[e]=r.hasOwnProperty(e)&&r[e]||[],r[e].unshift(o)}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=t,i.annotationCls=i,i}var v=new u("AnalyzeForEntryComponents"),b=g("Attribute",function(t){return{attributeName:t}}),_=function(){},w=y("ContentChildren",function(t,e){return void 0===e&&(e={}),c({selector:t,first:!1,isViewQuery:!1,descendants:!1},e)},_),C=y("ContentChild",function(t,e){return void 0===e&&(e={}),c({selector:t,first:!0,isViewQuery:!1,descendants:!0},e)},_),x=y("ViewChildren",function(t,e){return void 0===e&&(e={}),c({selector:t,first:!1,isViewQuery:!0,descendants:!0},e)},_),S=y("ViewChild",function(t,e){return c({selector:t,first:!0,isViewQuery:!0,descendants:!0},e)},_),E={OnPush:0,Default:1};E[E.OnPush]="OnPush",E[E.Default]="Default";var k={CheckOnce:0,Checked:1,CheckAlways:2,Detached:3,Errored:4,Destroyed:5};k[k.CheckOnce]="CheckOnce",k[k.Checked]="Checked",k[k.CheckAlways]="CheckAlways",k[k.Detached]="Detached",k[k.Errored]="Errored",k[k.Destroyed]="Destroyed";var O=f("Directive",function(t){return void 0===t&&(t={}),t}),P=f("Component",function(t){return void 0===t&&(t={}),c({changeDetection:E.Default},t)},O),A=f("Pipe",function(t){return c({pure:!0},t)}),D=y("Input",function(t){return{bindingPropertyName:t}}),T=y("Output",function(t){return{bindingPropertyName:t}}),M=y("HostBinding",function(t){return{hostPropertyName:t}}),I=y("HostListener",function(t,e){return{eventName:t,args:e}}),R=f("NgModule",function(t){return t}),N={Emulated:0,Native:1,None:2};N[N.Emulated]="Emulated",N[N.Native]="Native",N[N.None]="None";var L=function(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")},j=new L("5.2.6"),F=g("Inject",function(t){return{token:t}}),V=g("Optional"),B=f("Injectable"),U=g("Self"),H=g("SkipSelf"),z=g("Host"),G="undefined"!=typeof window&&window,W="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,q=G||void 0!==r&&r||W,Y=Promise.resolve(0),$=null;function K(){if(!$){var t=q.Symbol;if(t&&t.iterator)$=t.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),n=0;n<e.length;++n){var r=e[n];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&($=r)}}return $}function Q(t){"undefined"==typeof Zone?Y.then(function(){t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}function X(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}function Z(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(Z).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;var e=t.toString();if(null==e)return""+e;var n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function J(t){return t.__forward_ref__=J,t.toString=function(){return Z(this())},t}function tt(t){return"function"==typeof t&&t.hasOwnProperty("__forward_ref__")&&t.__forward_ref__===J?t():t}var et="__source",nt=new Object,rt=nt,it=function(){function t(){}return t.prototype.get=function(t,e){if(void 0===e&&(e=nt),e===nt)throw new Error("NullInjectorError: No provider for "+Z(t)+"!");return e},t}(),ot=function(){function t(){}return t.create=function(t,e){return Array.isArray(t)?new gt(t,e):new gt(t.providers,t.parent,t.name||null)},t.THROW_IF_NOT_FOUND=nt,t.NULL=new it,t}(),at=function(t){return t},st=[],lt=at,ct=function(){return Array.prototype.slice.call(arguments)},ut={},pt=function(t){for(var e in t)if(t[e]===ut)return e;throw Error("!prop")}({provide:String,useValue:ut}),dt="ngTempTokenPath",ht=ot.NULL,ft=/\n/gm,mt="ɵ",gt=function(){function t(t,e,n){void 0===e&&(e=ht),void 0===n&&(n=null),this.parent=e,this.source=n;var r=this._records=new Map;r.set(ot,{token:ot,fn:at,deps:st,value:this,useNew:!1}),function t(e,n){if(n)if((n=tt(n))instanceof Array)for(var r=0;r<n.length;r++)t(e,n[r]);else{if("function"==typeof n)throw _t("Function/Class not supported",n);if(!n||"object"!=typeof n||!n.provide)throw _t("Unexpected provider",n);var i=tt(n.provide),o=function(t){var e=function(t){var e=st,n=t.deps;if(n&&n.length){e=[];for(var r=0;r<n.length;r++){var i=6,o=tt(n[r]);if(o instanceof Array)for(var a=0,s=o;a<s.length;a++){var l=s[a];l instanceof V||l==V?i|=1:l instanceof H||l==H?i&=-3:l instanceof U||l==U?i&=-5:o=l instanceof F?l.token:tt(l)}e.push({token:o,options:i})}}else if(t.useExisting){var o=tt(t.useExisting);e=[{token:o,options:6}]}else if(!(n||pt in t))throw _t("'deps' required",t);return e}(t),n=at,r=st,i=!1,o=tt(t.provide);if(pt in t)r=t.useValue;else if(t.useFactory)n=t.useFactory;else if(t.useExisting);else if(t.useClass)i=!0,n=tt(t.useClass);else{if("function"!=typeof o)throw _t("StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable",t);i=!0,n=o}return{deps:e,fn:n,useNew:i,value:r}}(n);if(!0===n.multi){var a=e.get(i);if(a){if(a.fn!==ct)throw yt(i)}else e.set(i,a={token:n.provide,deps:[],useNew:!1,fn:ct,value:st});i=n,a.deps.push({token:i,options:6})}var s=e.get(i);if(s&&s.fn==ct)throw yt(i);e.set(i,o)}}(r,t)}return t.prototype.get=function(t,e){var n=this._records.get(t);try{return vt(t,n,this._records,this.parent,e)}catch(e){var r=e[dt];throw t[et]&&r.unshift(t[et]),e.message=bt("\n"+e.message,r,this.source),e.ngTokenPath=r,e[dt]=null,e}},t.prototype.toString=function(){var t=[];return this._records.forEach(function(e,n){return t.push(Z(n))}),"StaticInjector["+t.join(", ")+"]"},t}();function yt(t){return _t("Cannot mix multi providers and regular providers",t)}function vt(t,e,n,r,i){try{return function(t,e,n,r,i){var o,a;if(e){if((o=e.value)==lt)throw Error(mt+"Circular dependency");if(o===st){e.value=lt;var s=void 0,l=e.useNew,c=e.fn,u=e.deps,p=st;if(u.length){p=[];for(var d=0;d<u.length;d++){var h=u[d],f=h.options,m=2&f?n.get(h.token):void 0;p.push(vt(h.token,m,n,m||4&f?r:ht,1&f?null:ot.THROW_IF_NOT_FOUND))}}e.value=o=l?new((a=c).bind.apply(a,[void 0].concat(p))):c.apply(s,p)}}else o=r.get(t,i);return o}(t,e,n,r,i)}catch(n){throw n instanceof Error||(n=new Error(n)),(n[dt]=n[dt]||[]).unshift(t),e&&e.value==lt&&(e.value=st),n}}function bt(t,e,n){void 0===n&&(n=null),t=t&&"\n"===t.charAt(0)&&t.charAt(1)==mt?t.substr(2):t;var r=Z(e);if(e instanceof Array)r=e.map(Z).join(" -> ");else if("object"==typeof e){var i=[];for(var o in e)if(e.hasOwnProperty(o)){var a=e[o];i.push(o+":"+("string"==typeof a?JSON.stringify(a):Z(a)))}r="{"+i.join(", ")+"}"}return"StaticInjectorError"+(n?"("+n+")":"")+"["+r+"]: "+t.replace(ft,"\n  ")}function _t(t,e){return new Error(bt(t,e))}var wt="ngDebugContext",Ct="ngOriginalError",xt="ngErrorLogger";function St(t){return t[wt]}function Et(t){return t[Ct]}function kt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];t.error.apply(t,e)}var Ot=function(){function t(){this._console=console}return t.prototype.handleError=function(t){var e=this._findOriginalError(t),n=this._findContext(t),r=t[xt]||kt;r(this._console,"ERROR",t),e&&r(this._console,"ORIGINAL ERROR",e),n&&r(this._console,"ERROR CONTEXT",n)},t.prototype._findContext=function(t){return t?St(t)?St(t):this._findContext(Et(t)):null},t.prototype._findOriginalError=function(t){for(var e=Et(t);e&&Et(e);)e=Et(e);return e},t}();function Pt(t){return t.length>1?" ("+function(t){for(var e=[],n=0;n<t.length;++n){if(e.indexOf(t[n])>-1)return e.push(t[n]),e;e.push(t[n])}return e}(t.slice().reverse()).map(function(t){return Z(t.token)}).join(" -> ")+")":""}function At(t,e,n,r){var i,o,a,s=[e],l=n(s),c=r?(o=l+" caused by: "+((i=r)instanceof Error?i.message:i),(a=Error(o))[Ct]=i,a):Error(l);return c.addKey=Dt,c.keys=s,c.injectors=[t],c.constructResolvingMessage=n,c[Ct]=r,c}function Dt(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function Tt(t,e){for(var n=[],r=0,i=e.length;r<i;r++){var o=e[r];o&&0!=o.length?n.push(o.map(Z).join(" ")):n.push("?")}return Error("Cannot resolve all parameters for '"+Z(t)+"'("+n.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+Z(t)+"' is decorated with Injectable.")}var Mt=function(){function t(t,e){if(this.token=t,this.id=e,!t)throw new Error("Token must be defined!");this.displayName=Z(this.token)}return t.get=function(t){return It.get(tt(t))},Object.defineProperty(t,"numberOfKeys",{get:function(){return It.numberOfKeys},enumerable:!0,configurable:!0}),t}(),It=new(function(){function t(){this._allKeys=new Map}return t.prototype.get=function(t){if(t instanceof Mt)return t;if(this._allKeys.has(t))return this._allKeys.get(t);var e=new Mt(t,Mt.numberOfKeys);return this._allKeys.set(t,e),e},Object.defineProperty(t.prototype,"numberOfKeys",{get:function(){return this._allKeys.size},enumerable:!0,configurable:!0}),t}()),Rt=Function;function Nt(t){return"function"==typeof t}var Lt=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/,jt=/^class\s+[A-Za-z\d$_]*\s*extends\s+[A-Za-z\d$_]+\s*{/,Ft=/^class\s+[A-Za-z\d$_]*\s*extends\s+[A-Za-z\d$_]+\s*{[\s\S]*constructor\s*\(/,Vt=function(){function t(t){this._reflect=t||q.Reflect}return t.prototype.isReflectionEnabled=function(){return!0},t.prototype.factory=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new(t.bind.apply(t,[void 0].concat(e)))}},t.prototype._zipTypesAndAnnotations=function(t,e){var n;n=void 0===t?new Array(e.length):new Array(t.length);for(var r=0;r<n.length;r++)void 0===t?n[r]=[]:t[r]!=Object?n[r]=[t[r]]:n[r]=[],e&&null!=e[r]&&(n[r]=n[r].concat(e[r]));return n},t.prototype._ownParameters=function(t,e){var n=t.toString();if(Lt.exec(n)||jt.exec(n)&&!Ft.exec(n))return null;if(t.parameters&&t.parameters!==e.parameters)return t.parameters;var r=t.ctorParameters;if(r&&r!==e.ctorParameters){var i="function"==typeof r?r():r,o=i.map(function(t){return t&&t.type}),a=i.map(function(t){return t&&Bt(t.decorators)});return this._zipTypesAndAnnotations(o,a)}var s=t.hasOwnProperty(d)&&t[d],l=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",t);return l||s?this._zipTypesAndAnnotations(l,s):new Array(t.length).fill(void 0)},t.prototype.parameters=function(t){if(!Nt(t))return[];var e=Ut(t),n=this._ownParameters(t,e);return n||e===Object||(n=this.parameters(e)),n||[]},t.prototype._ownAnnotations=function(t,e){if(t.annotations&&t.annotations!==e.annotations){var n=t.annotations;return"function"==typeof n&&n.annotations&&(n=n.annotations),n}return t.decorators&&t.decorators!==e.decorators?Bt(t.decorators):t.hasOwnProperty(p)?t[p]:null},t.prototype.annotations=function(t){if(!Nt(t))return[];var e=Ut(t),n=this._ownAnnotations(t,e)||[];return(e!==Object?this.annotations(e):[]).concat(n)},t.prototype._ownPropMetadata=function(t,e){if(t.propMetadata&&t.propMetadata!==e.propMetadata){var n=t.propMetadata;return"function"==typeof n&&n.propMetadata&&(n=n.propMetadata),n}if(t.propDecorators&&t.propDecorators!==e.propDecorators){var r=t.propDecorators,i={};return Object.keys(r).forEach(function(t){i[t]=Bt(r[t])}),i}return t.hasOwnProperty(h)?t[h]:null},t.prototype.propMetadata=function(t){if(!Nt(t))return{};var e=Ut(t),n={};if(e!==Object){var r=this.propMetadata(e);Object.keys(r).forEach(function(t){n[t]=r[t]})}var i=this._ownPropMetadata(t,e);return i&&Object.keys(i).forEach(function(t){var e=[];n.hasOwnProperty(t)&&e.push.apply(e,n[t]),e.push.apply(e,i[t]),n[t]=e}),n},t.prototype.hasLifecycleHook=function(t,e){return t instanceof Rt&&e in t.prototype},t.prototype.guards=function(t){return{}},t.prototype.getter=function(t){return new Function("o","return o."+t+";")},t.prototype.setter=function(t){return new Function("o","v","return o."+t+" = v;")},t.prototype.method=function(t){return new Function("o","args","if (!o."+t+") throw new Error('\""+t+"\" is undefined');\n        return o."+t+".apply(o, args);")},t.prototype.importUri=function(t){return"object"==typeof t&&t.filePath?t.filePath:"./"+Z(t)},t.prototype.resourceUri=function(t){return"./"+Z(t)},t.prototype.resolveIdentifier=function(t,e,n,r){return r},t.prototype.resolveEnum=function(t,e){return t[e]},t}();function Bt(t){return t?t.map(function(t){var e=t.type.annotationCls,n=t.args?t.args:[];return new(e.bind.apply(e,[void 0].concat(n)))}):[]}function Ut(t){var e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object}var Ht=new(function(){function t(t){this.reflectionCapabilities=t}return t.prototype.updateCapabilities=function(t){this.reflectionCapabilities=t},t.prototype.factory=function(t){return this.reflectionCapabilities.factory(t)},t.prototype.parameters=function(t){return this.reflectionCapabilities.parameters(t)},t.prototype.annotations=function(t){return this.reflectionCapabilities.annotations(t)},t.prototype.propMetadata=function(t){return this.reflectionCapabilities.propMetadata(t)},t.prototype.hasLifecycleHook=function(t,e){return this.reflectionCapabilities.hasLifecycleHook(t,e)},t.prototype.getter=function(t){return this.reflectionCapabilities.getter(t)},t.prototype.setter=function(t){return this.reflectionCapabilities.setter(t)},t.prototype.method=function(t){return this.reflectionCapabilities.method(t)},t.prototype.importUri=function(t){return this.reflectionCapabilities.importUri(t)},t.prototype.resourceUri=function(t){return this.reflectionCapabilities.resourceUri(t)},t.prototype.resolveIdentifier=function(t,e,n,r){return this.reflectionCapabilities.resolveIdentifier(t,e,n,r)},t.prototype.resolveEnum=function(t,e){return this.reflectionCapabilities.resolveEnum(t,e)},t}())(new Vt),zt=function(){function t(t,e,n){this.key=t,this.optional=e,this.visibility=n}return t.fromKey=function(e){return new t(e,!1,null)},t}(),Gt=[],Wt=function(t,e,n){this.key=t,this.resolvedFactories=e,this.multiProvider=n,this.resolvedFactory=this.resolvedFactories[0]},qt=function(t,e){this.factory=t,this.dependencies=e};function Yt(t){var e,n;if(t.useClass){var r=tt(t.useClass);e=Ht.factory(r),n=Qt(r)}else t.useExisting?(e=function(t){return t},n=[zt.fromKey(Mt.get(t.useExisting))]):t.useFactory?(e=t.useFactory,n=function(t,e){{if(e){var n=e.map(function(t){return[t]});return e.map(function(e){return Xt(t,e,n)})}return Qt(t)}}(t.useFactory,t.deps)):(e=function(){return t.useValue},n=Gt);return new qt(e,n)}function $t(t){return new Wt(Mt.get(t.provide),[Yt(t)],t.multi||!1)}function Kt(t){var e=function(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=e.get(r.key.id);if(i){if(r.multiProvider!==i.multiProvider)throw Error("Cannot mix multi providers and regular providers, got: "+i+" "+r);if(r.multiProvider)for(var o=0;o<r.resolvedFactories.length;o++)i.resolvedFactories.push(r.resolvedFactories[o]);else e.set(r.key.id,r)}else{var a=void 0;a=r.multiProvider?new Wt(r.key,r.resolvedFactories.slice(),r.multiProvider):r,e.set(r.key.id,a)}}return e}(function t(e,n){e.forEach(function(e){if(e instanceof Rt)n.push({provide:e,useClass:e});else if(e&&"object"==typeof e&&void 0!==e.provide)n.push(e);else{if(!(e instanceof Array))throw Error("Invalid provider - only instances of Provider and Type are allowed, got: "+e);t(e,n)}});return n}(t,[]).map($t),new Map);return Array.from(e.values())}function Qt(t){var e=Ht.parameters(t);if(!e)return[];if(e.some(function(t){return null==t}))throw Tt(t,e);return e.map(function(n){return Xt(t,n,e)})}function Xt(t,e,n){var r=null,i=!1;if(!Array.isArray(e))return Zt(e instanceof F?e.token:e,i,null);for(var o=null,a=0;a<e.length;++a){var s=e[a];s instanceof Rt?r=s:s instanceof F?r=s.token:s instanceof V?i=!0:s instanceof U||s instanceof H?o=s:s instanceof u&&(r=s)}if(null!=(r=tt(r)))return Zt(r,i,o);throw Tt(t,n)}function Zt(t,e,n){return new zt(Mt.get(t),e,n)}var Jt=new Object,te=function(){function t(){}return t.resolve=function(t){return Kt(t)},t.resolveAndCreate=function(e,n){var r=t.resolve(e);return t.fromResolvedProviders(r,n)},t.fromResolvedProviders=function(t,e){return new ee(t,e)},t}(),ee=function(){function t(t,e){this._constructionCounter=0,this._providers=t,this.parent=e||null;var n=t.length;this.keyIds=new Array(n),this.objs=new Array(n);for(var r=0;r<n;r++)this.keyIds[r]=t[r].key.id,this.objs[r]=Jt}return t.prototype.get=function(t,e){return void 0===e&&(e=rt),this._getByKey(Mt.get(t),null,e)},t.prototype.resolveAndCreateChild=function(t){var e=te.resolve(t);return this.createChildFromResolved(e)},t.prototype.createChildFromResolved=function(e){var n=new t(e);return n.parent=this,n},t.prototype.resolveAndInstantiate=function(t){return this.instantiateResolved(te.resolve([t])[0])},t.prototype.instantiateResolved=function(t){return this._instantiateProvider(t)},t.prototype.getProviderAtIndex=function(t){if(t<0||t>=this._providers.length)throw Error("Index "+t+" is out-of-bounds.");return this._providers[t]},t.prototype._new=function(t){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw e=this,n=t.key,At(e,n,function(t){return"Cannot instantiate cyclic dependency!"+Pt(t)});var e,n;return this._instantiateProvider(t)},t.prototype._getMaxNumberOfObjects=function(){return this.objs.length},t.prototype._instantiateProvider=function(t){if(t.multiProvider){for(var e=new Array(t.resolvedFactories.length),n=0;n<t.resolvedFactories.length;++n)e[n]=this._instantiate(t,t.resolvedFactories[n]);return e}return this._instantiate(t,t.resolvedFactories[0])},t.prototype._instantiate=function(t,e){var n,r,i,o,a,s=this,l=e.factory;try{n=e.dependencies.map(function(t){return s._getByReflectiveDependency(t)})}catch(e){throw e.addKey&&e.addKey(this,t.key),e}try{r=l.apply(void 0,n)}catch(e){throw i=this,o=e,e.stack,a=t.key,At(i,a,function(t){var e=Z(t[0].token);return o.message+": Error during instantiation of "+e+"!"+Pt(t)+"."},o)}return r},t.prototype._getByReflectiveDependency=function(t){return this._getByKey(t.key,t.visibility,t.optional?null:rt)},t.prototype._getByKey=function(e,n,r){return e===t.INJECTOR_KEY?this:n instanceof U?this._getByKeySelf(e,r):this._getByKeyDefault(e,r,n)},t.prototype._getObjByKeyId=function(t){for(var e=0;e<this.keyIds.length;e++)if(this.keyIds[e]===t)return this.objs[e]===Jt&&(this.objs[e]=this._new(this._providers[e])),this.objs[e];return Jt},t.prototype._throwOrNull=function(t,e){if(e!==rt)return e;throw At(this,t,function(t){return"No provider for "+Z(t[0].token)+"!"+Pt(t)})},t.prototype._getByKeySelf=function(t,e){var n=this._getObjByKeyId(t.id);return n!==Jt?n:this._throwOrNull(t,e)},t.prototype._getByKeyDefault=function(e,n,r){var i;for(i=r instanceof H?this.parent:this;i instanceof t;){var o=i,a=o._getObjByKeyId(e.id);if(a!==Jt)return a;i=o.parent}return null!==i?i.get(e.token,n):this._throwOrNull(e,n)},Object.defineProperty(t.prototype,"displayName",{get:function(){return"ReflectiveInjector(providers: ["+function(t,e){for(var n=new Array(t._providers.length),r=0;r<t._providers.length;++r)n[r]=e(t.getProviderAtIndex(r));return n}(this,function(t){return' "'+t.key.displayName+'" '}).join(", ")+"])"},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.displayName},t.INJECTOR_KEY=Mt.get(ot),t}();function ne(t){return!!t&&"function"==typeof t.then}var re=new u("Application Initializer"),ie=function(){function t(t){var e=this;this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise(function(t,n){e.resolve=t,e.reject=n})}return t.prototype.runInitializers=function(){var t=this;if(!this.initialized){var e=[],n=function(){t.done=!0,t.resolve()};if(this.appInits)for(var r=0;r<this.appInits.length;r++){var i=this.appInits[r]();ne(i)&&e.push(i)}Promise.all(e).then(function(){n()}).catch(function(e){t.reject(e)}),0===e.length&&n(),this.initialized=!0}},t.decorators=[{type:B}],t.ctorParameters=function(){return[{type:Array,decorators:[{type:F,args:[re]},{type:V}]}]},t}(),oe=new u("AppId");function ae(){return""+le()+le()+le()}var se={provide:oe,useFactory:ae,deps:[]};function le(){return String.fromCharCode(97+Math.floor(25*Math.random()))}var ce=new u("Platform Initializer"),ue=new u("Platform ID"),pe=new u("appBootstrapListener"),de=new u("Application Packages Root URL"),he=function(){function t(){}return t.prototype.log=function(t){console.log(t)},t.prototype.warn=function(t){console.warn(t)},t.decorators=[{type:B}],t.ctorParameters=function(){return[]},t}(),fe=function(t,e){this.ngModuleFactory=t,this.componentFactories=e};function me(){throw new Error("Runtime compiler is not loaded")}var ge=function(){function t(){}return t.prototype.compileModuleSync=function(t){throw me()},t.prototype.compileModuleAsync=function(t){throw me()},t.prototype.compileModuleAndAllComponentsSync=function(t){throw me()},t.prototype.compileModuleAndAllComponentsAsync=function(t){throw me()},t.prototype.clearCache=function(){},t.prototype.clearCacheFor=function(t){},t.decorators=[{type:B}],t.ctorParameters=function(){return[]},t}(),ye=new u("compilerOptions"),ve=function(){},be=function(){},_e=function(){};function we(t){var e=Error("No component factory found for "+Z(t)+". Did you add it to @NgModule.entryComponents?");return e[Se]=t,e}var Ce,xe,Se="ngComponent",Ee=function(){function t(){}return t.prototype.resolveComponentFactory=function(t){throw we(t)},t}(),ke=function(){function t(){}return t.NULL=new Ee,t}(),Oe=function(){function t(t,e,n){this._parent=e,this._ngModule=n,this._factories=new Map;for(var r=0;r<t.length;r++){var i=t[r];this._factories.set(i.componentType,i)}}return t.prototype.resolveComponentFactory=function(t){var e=this._factories.get(t);if(!e&&this._parent&&(e=this._parent.resolveComponentFactory(t)),!e)throw we(t);return new Pe(e,this._ngModule)},t}(),Pe=function(t){function e(e,n){var r=t.call(this)||this;return r.factory=e,r.ngModule=n,r.selector=e.selector,r.componentType=e.componentType,r.ngContentSelectors=e.ngContentSelectors,r.inputs=e.inputs,r.outputs=e.outputs,r}return l(e,t),e.prototype.create=function(t,e,n,r){return this.factory.create(t,e,n,r||this.ngModule)},e}(_e),Ae=function(){},De=function(){};function Te(){var t=q.wtf;return!(!t||!(Ce=t.trace))&&(xe=Ce.events,!0)}function Me(t,e){return void 0===e&&(e=null),xe.createScope(t,e)}function Ie(t,e){return Ce.leaveScope(t,e),e}function Re(t,e){return Ce.beginTimeRange(t,e)}function Ne(t){Ce.endTimeRange(t)}var Le=Te();function je(t,e){return null}var Fe=Le?Me:function(t,e){return je},Ve=Le?Ie:function(t,e){return e},Be=Le?Re:function(t,e){return null},Ue=Le?Ne:function(t){return null},He=function(t){function e(e){void 0===e&&(e=!1);var n=t.call(this)||this;return n.__isAsync=e,n}return l(e,t),e.prototype.emit=function(e){t.prototype.next.call(this,e)},e.prototype.subscribe=function(e,n,r){var i,o=function(t){return null},s=function(){return null};e&&"object"==typeof e?(i=this.__isAsync?function(t){setTimeout(function(){return e.next(t)})}:function(t){e.next(t)},e.error&&(o=this.__isAsync?function(t){setTimeout(function(){return e.error(t)})}:function(t){e.error(t)}),e.complete&&(s=this.__isAsync?function(){setTimeout(function(){return e.complete()})}:function(){e.complete()})):(i=this.__isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)},n&&(o=this.__isAsync?function(t){setTimeout(function(){return n(t)})}:function(t){n(t)}),r&&(s=this.__isAsync?function(){setTimeout(function(){return r()})}:function(){r()}));var l=t.prototype.subscribe.call(this,i,o,s);return e instanceof a.Subscription&&e.add(l),l},e}(o.Subject),ze=function(){function t(t){var e=t.enableLongStackTrace,n=void 0!==e&&e;if(this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new He(!1),this.onMicrotaskEmpty=new He(!1),this.onStable=new He(!1),this.onError=new He(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();var r;this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),(r=this)._inner=r._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:function(t,e,n,i,o,a){try{return Ye(r),t.invokeTask(n,i,o,a)}finally{$e(r)}},onInvoke:function(t,e,n,i,o,a,s){try{return Ye(r),t.invoke(n,i,o,a,s)}finally{$e(r)}},onHasTask:function(t,e,n,i){t.hasTask(n,i),e===n&&("microTask"==i.change?(r.hasPendingMicrotasks=i.microTask,qe(r)):"macroTask"==i.change&&(r.hasPendingMacrotasks=i.macroTask))},onHandleError:function(t,e,n,i){return t.handleError(n,i),r.runOutsideAngular(function(){return r.onError.emit(i)}),!1}})}return t.isInAngularZone=function(){return!0===Zone.current.get("isAngularZone")},t.assertInAngularZone=function(){if(!t.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")},t.assertNotInAngularZone=function(){if(t.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")},t.prototype.run=function(t,e,n){return this._inner.run(t,e,n)},t.prototype.runTask=function(t,e,n,r){var i=this._inner,o=i.scheduleEventTask("NgZoneEvent: "+r,t,We,Ge,Ge);try{return i.runTask(o,e,n)}finally{i.cancelTask(o)}},t.prototype.runGuarded=function(t,e,n){return this._inner.runGuarded(t,e,n)},t.prototype.runOutsideAngular=function(t){return this._outer.run(t)},t}();function Ge(){}var We={};function qe(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(function(){return t.onStable.emit(null)})}finally{t.isStable=!0}}}function Ye(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function $e(t){t._nesting--,qe(t)}var Ke=function(){function t(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new He,this.onMicrotaskEmpty=new He,this.onStable=new He,this.onError=new He}return t.prototype.run=function(t){return t()},t.prototype.runGuarded=function(t){return t()},t.prototype.runOutsideAngular=function(t){return t()},t.prototype.runTask=function(t){return t()},t}(),Qe=function(){function t(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this._watchAngularEvents()}return t.prototype._watchAngularEvents=function(){var t=this;this._ngZone.onUnstable.subscribe({next:function(){t._didWork=!0,t._isZoneStable=!1}}),this._ngZone.runOutsideAngular(function(){t._ngZone.onStable.subscribe({next:function(){ze.assertNotInAngularZone(),Q(function(){t._isZoneStable=!0,t._runCallbacksIfReady()})}})})},t.prototype.increasePendingRequestCount=function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount},t.prototype.decreasePendingRequestCount=function(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount},t.prototype.isStable=function(){return this._isZoneStable&&0==this._pendingCount&&!this._ngZone.hasPendingMacrotasks},t.prototype._runCallbacksIfReady=function(){var t=this;this.isStable()?Q(function(){for(;0!==t._callbacks.length;)t._callbacks.pop()(t._didWork);t._didWork=!1}):this._didWork=!0},t.prototype.whenStable=function(t){this._callbacks.push(t),this._runCallbacksIfReady()},t.prototype.getPendingRequestCount=function(){return this._pendingCount},t.prototype.findProviders=function(t,e,n){return[]},t.decorators=[{type:B}],t.ctorParameters=function(){return[{type:ze}]},t}(),Xe=function(){function t(){this._applications=new Map,Je.addToWindow(this)}return t.prototype.registerApplication=function(t,e){this._applications.set(t,e)},t.prototype.unregisterApplication=function(t){this._applications.delete(t)},t.prototype.unregisterAllApplications=function(){this._applications.clear()},t.prototype.getTestability=function(t){return this._applications.get(t)||null},t.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},t.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},t.prototype.findTestabilityInTree=function(t,e){return void 0===e&&(e=!0),Je.findTestabilityInTree(this,t,e)},t.decorators=[{type:B}],t.ctorParameters=function(){return[]},t}();var Ze,Je=new(function(){function t(){}return t.prototype.addToWindow=function(t){},t.prototype.findTestabilityInTree=function(t,e,n){return null},t}()),tn=!0,en=!1,nn=new u("AllowMultipleToken");function rn(){return en=!0,tn}var on=function(t,e){this.name=t,this.token=e};function an(t){if(Ze&&!Ze.destroyed&&!Ze.injector.get(nn,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Ze=t.get(un);var e=t.get(ce,null);return e&&e.forEach(function(t){return t()}),Ze}function sn(t,e,n){void 0===n&&(n=[]);var r="Platform: "+e,i=new u(r);return function(e){void 0===e&&(e=[]);var o=cn();if(!o||o.injector.get(nn,!1))if(t)t(n.concat(e).concat({provide:i,useValue:!0}));else{var a=n.concat(e).concat({provide:i,useValue:!0});an(ot.create({providers:a,name:r}))}return ln(i)}}function ln(t){var e=cn();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}function cn(){return Ze&&!Ze.destroyed?Ze:null}var un=function(){function t(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return t.prototype.bootstrapModuleFactory=function(t,e){var n=this,r=function(t){var e;e="noop"===t?new Ke:("zone.js"===t?void 0:t)||new ze({enableLongStackTrace:rn()});return e}(e?e.ngZone:void 0),i=[{provide:ze,useValue:r}];return r.run(function(){var e=ot.create({providers:i,parent:n.injector,name:t.moduleType.name}),o=t.create(e),a=o.injector.get(Ot,null);if(!a)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return o.onDestroy(function(){return hn(n._modules,o)}),r.runOutsideAngular(function(){return r.onError.subscribe({next:function(t){a.handleError(t)}})}),function(t,e,n){try{var r=n();return ne(r)?r.catch(function(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}):r}catch(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}}(a,r,function(){var t=o.injector.get(ie);return t.runInitializers(),t.donePromise.then(function(){return n._moduleDoBootstrap(o),o})})})},t.prototype.bootstrapModule=function(t,e){var n=this;void 0===e&&(e=[]);var r=this.injector.get(ve),i=pn({},e);return r.createCompiler([i]).compileModuleAsync(t).then(function(t){return n.bootstrapModuleFactory(t,i)})},t.prototype._moduleDoBootstrap=function(t){var e=t.injector.get(dn);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(function(t){return e.bootstrap(t)});else{if(!t.instance.ngDoBootstrap)throw new Error("The module "+Z(t.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');t.instance.ngDoBootstrap(e)}this._modules.push(t)},t.prototype.onDestroy=function(t){this._destroyListeners.push(t)},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(t){return t.destroy()}),this._destroyListeners.forEach(function(t){return t()}),this._destroyed=!0},Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),t.decorators=[{type:B}],t.ctorParameters=function(){return[{type:ot}]},t}();function pn(t,e){return t=Array.isArray(e)?e.reduce(pn,t):c({},t,e)}var dn=function(){function t(t,r,o,a,s,l){var c=this;this._zone=t,this._console=r,this._injector=o,this._exceptionHandler=a,this._componentFactoryResolver=s,this._initStatus=l,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=rn(),this._zone.onMicrotaskEmpty.subscribe({next:function(){c._zone.run(function(){c.tick()})}});var u=new e.Observable(function(t){c._stable=c._zone.isStable&&!c._zone.hasPendingMacrotasks&&!c._zone.hasPendingMicrotasks,c._zone.runOutsideAngular(function(){t.next(c._stable),t.complete()})}),p=new e.Observable(function(t){var e;c._zone.runOutsideAngular(function(){e=c._zone.onStable.subscribe(function(){ze.assertNotInAngularZone(),Q(function(){c._stable||c._zone.hasPendingMacrotasks||c._zone.hasPendingMicrotasks||(c._stable=!0,t.next(!0))})})});var n=c._zone.onUnstable.subscribe(function(){ze.assertInAngularZone(),c._stable&&(c._stable=!1,c._zone.runOutsideAngular(function(){t.next(!1)}))});return function(){e.unsubscribe(),n.unsubscribe()}});this.isStable=n.merge(u,i.share.call(p))}return t.prototype.bootstrap=function(t,e){var n,r=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=t instanceof _e?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);var i=n instanceof Pe?null:this._injector.get(Ae),o=e||n.selector,a=n.create(ot.NULL,[],o,i);a.onDestroy(function(){r._unloadComponent(a)});var s=a.injector.get(Qe,null);return s&&a.injector.get(Xe).registerApplication(a.location.nativeElement,s),this._loadComponent(a),rn()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),a},t.prototype.tick=function(){var e=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var n=t._tickScope();try{this._runningTick=!0,this._views.forEach(function(t){return t.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(t){return t.checkNoChanges()})}catch(t){this._zone.runOutsideAngular(function(){return e._exceptionHandler.handleError(t)})}finally{this._runningTick=!1,Ve(n)}},t.prototype.attachView=function(t){var e=t;this._views.push(e),e.attachToAppRef(this)},t.prototype.detachView=function(t){var e=t;hn(this._views,e),e.detachFromAppRef()},t.prototype._loadComponent=function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(pe,[]).concat(this._bootstrapListeners).forEach(function(e){return e(t)})},t.prototype._unloadComponent=function(t){this.detachView(t.hostView),hn(this.components,t)},t.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(t){return t.destroy()})},Object.defineProperty(t.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),t._tickScope=Fe("ApplicationRef#tick()"),t.decorators=[{type:B}],t.ctorParameters=function(){return[{type:ze},{type:he},{type:ot},{type:Ot},{type:ke},{type:ie}]},t}();function hn(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var fn=function(t,e,n,r,i,o){this.id=t,this.templateUrl=e,this.slotCount=n,this.encapsulation=r,this.styles=i,this.animations=o},mn=function(){},gn=function(){},yn=(new u("Renderer2Interceptor"),function(){}),vn=function(){},bn={Important:1,DashCase:2};bn[bn.Important]="Important",bn[bn.DashCase]="DashCase";var _n=function(){},wn=function(t){this.nativeElement=t},Cn=function(){},xn=new Map;var Sn=function(){function t(){this.dirty=!0,this._results=[],this.changes=new He,this.length=0}return t.prototype.map=function(t){return this._results.map(t)},t.prototype.filter=function(t){return this._results.filter(t)},t.prototype.find=function(t){return this._results.find(t)},t.prototype.reduce=function(t,e){return this._results.reduce(t,e)},t.prototype.forEach=function(t){this._results.forEach(t)},t.prototype.some=function(t){return this._results.some(t)},t.prototype.toArray=function(){return this._results.slice()},t.prototype[K()]=function(){return this._results[K()]()},t.prototype.toString=function(){return this._results.toString()},t.prototype.reset=function(t){this._results=function t(e){return e.reduce(function(e,n){var r=Array.isArray(n)?t(n):n;return e.concat(r)},[])}(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},t.prototype.notifyOnChanges=function(){this.changes.emit(this)},t.prototype.setDirty=function(){this.dirty=!0},t.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},t}();var En=function(){},kn={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},On=function(){function t(t,e){this._compiler=t,this._config=e||kn}return t.prototype.load=function(t){return this._compiler instanceof ge?this.loadFactory(t):this.loadAndCompile(t)},t.prototype.loadAndCompile=function(t){var e=this,n=t.split("#"),r=n[0],i=n[1];return void 0===i&&(i="default"),System.import(r).then(function(t){return t[i]}).then(function(t){return Pn(t,r,i)}).then(function(t){return e._compiler.compileModuleAsync(t)})},t.prototype.loadFactory=function(t){var e=t.split("#"),n=e[0],r=e[1],i="NgFactory";return void 0===r&&(r="default",i=""),System.import(this._config.factoryPathPrefix+n+this._config.factoryPathSuffix).then(function(t){return t[r+i]}).then(function(t){return Pn(t,n,r)})},t.decorators=[{type:B}],t.ctorParameters=function(){return[{type:ge},{type:En,decorators:[{type:V}]}]},t}();function Pn(t,e,n){if(!t)throw new Error("Cannot find '"+n+"' in '"+e+"'");return t}var An=function(){},Dn=function(){},Tn=function(){},Mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e}(Tn),In=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e}(Mn),Rn=function(t,e){this.name=t,this.callback=e},Nn=function(){function t(t,e,n){this._debugContext=n,this.nativeNode=t,e&&e instanceof Ln?e.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(t.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),t}(),Ln=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.properties={},i.attributes={},i.classes={},i.styles={},i.childNodes=[],i.nativeElement=e,i}return l(e,t),e.prototype.addChild=function(t){t&&(this.childNodes.push(t),t.parent=this)},e.prototype.removeChild=function(t){var e=this.childNodes.indexOf(t);-1!==e&&(t.parent=null,this.childNodes.splice(e,1))},e.prototype.insertChildrenAfter=function(t,e){var n,r=this,i=this.childNodes.indexOf(t);-1!==i&&((n=this.childNodes).splice.apply(n,[i+1,0].concat(e)),e.forEach(function(t){t.parent&&t.parent.removeChild(t),t.parent=r}))},e.prototype.insertBefore=function(t,e){var n=this.childNodes.indexOf(t);-1===n?this.addChild(e):(e.parent&&e.parent.removeChild(e),e.parent=this,this.childNodes.splice(n,0,e))},e.prototype.query=function(t){return this.queryAll(t)[0]||null},e.prototype.queryAll=function(t){var e=[];return function t(e,n,r){e.childNodes.forEach(function(e){e instanceof Ln&&(n(e)&&r.push(e),t(e,n,r))})}(this,t,e),e},e.prototype.queryAllNodes=function(t){var e=[];return function t(e,n,r){e instanceof Ln&&e.childNodes.forEach(function(e){n(e)&&r.push(e),e instanceof Ln&&t(e,n,r)})}(this,t,e),e},Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes.filter(function(t){return t instanceof e})},enumerable:!0,configurable:!0}),e.prototype.triggerEventHandler=function(t,e){this.listeners.forEach(function(n){n.name==t&&n.callback(e)})},e}(Nn);var jn=new Map;function Fn(t){return jn.get(t)||null}function Vn(t){jn.set(t.nativeNode,t)}function Bn(t,e){var n=zn(t),r=zn(e);return n&&r?function(t,e,n){var r=t[K()](),i=e[K()]();for(;;){var o=r.next(),a=i.next();if(o.done&&a.done)return!0;if(o.done||a.done)return!1;if(!n(o.value,a.value))return!1}}(t,e,Bn):!(n||!(t&&("object"==typeof t||"function"==typeof t))||r||!(e&&("object"==typeof e||"function"==typeof e)))||X(t,e)}var Un=function(){function t(t){this.wrapped=t}return t.wrap=function(e){return new t(e)},t.unwrap=function(e){return t.isWrapped(e)?e.wrapped:e},t.isWrapped=function(e){return e instanceof t},t}(),Hn=function(){function t(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}return t.prototype.isFirstChange=function(){return this.firstChange},t}();function zn(t){return!!Gn(t)&&(Array.isArray(t)||!(t instanceof Map)&&K()in t)}function Gn(t){return null!==t&&("function"==typeof t||"object"==typeof t)}var Wn=function(){function t(){}return t.prototype.supports=function(t){return zn(t)},t.prototype.create=function(t){return new Yn(t)},t}(),qn=function(t,e){return e},Yn=function(){function t(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||qn}return t.prototype.forEachItem=function(t){var e;for(e=this._itHead;null!==e;e=e._next)t(e)},t.prototype.forEachOperation=function(t){for(var e=this._itHead,n=this._removalsHead,r=0,i=null;e||n;){var o=!n||e&&e.currentIndex<Xn(n,r,i)?e:n,a=Xn(o,r,i),s=o.currentIndex;if(o===n)r--,n=n._nextRemoved;else if(e=e._next,null==o.previousIndex)r++;else{i||(i=[]);var l=a-r,c=s-r;if(l!=c){for(var u=0;u<l;u++){var p=u<i.length?i[u]:i[u]=0,d=p+u;c<=d&&d<l&&(i[u]=p+1)}i[o.previousIndex]=c-l}}a!==s&&t(o,a,s)}},t.prototype.forEachPreviousItem=function(t){var e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)},t.prototype.forEachAddedItem=function(t){var e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)},t.prototype.forEachMovedItem=function(t){var e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)},t.prototype.forEachRemovedItem=function(t){var e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)},t.prototype.forEachIdentityChange=function(t){var e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)},t.prototype.diff=function(t){if(null==t&&(t=[]),!zn(t))throw new Error("Error trying to diff '"+Z(t)+"'. Only arrays and iterables are allowed");return this.check(t)?this:null},t.prototype.onDestroy=function(){},t.prototype.check=function(t){var e=this;this._reset();var n,r,i,o=this._itHead,a=!1;if(Array.isArray(t)){this.length=t.length;for(var s=0;s<this.length;s++)r=t[s],i=this._trackByFn(s,r),null!==o&&X(o.trackById,i)?(a&&(o=this._verifyReinsertion(o,r,i,s)),X(o.item,r)||this._addIdentityChange(o,r)):(o=this._mismatch(o,r,i,s),a=!0),o=o._next}else n=0,function(t,e){if(Array.isArray(t))for(var n=0;n<t.length;n++)e(t[n]);else for(var r=t[K()](),i=void 0;!(i=r.next()).done;)e(i.value)}(t,function(t){i=e._trackByFn(n,t),null!==o&&X(o.trackById,i)?(a&&(o=e._verifyReinsertion(o,t,i,n)),X(o.item,t)||e._addIdentityChange(o,t)):(o=e._mismatch(o,t,i,n),a=!0),o=o._next,n++}),this.length=n;return this._truncate(o),this.collection=t,this.isDirty},Object.defineProperty(t.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead},enumerable:!0,configurable:!0}),t.prototype._reset=function(){if(this.isDirty){var t=void 0,e=void 0;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=e)t.previousIndex=t.currentIndex,e=t._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}},t.prototype._mismatch=function(t,e,n,r){var i;return null===t?i=this._itTail:(i=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(X(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,i,r)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(X(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,i,r)):t=this._addAfter(new $n(e,n),i,r),t},t.prototype._verifyReinsertion=function(t,e,n,r){var i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==i?t=this._reinsertAfter(i,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t},t.prototype._truncate=function(t){for(;null!==t;){var e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)},t.prototype._reinsertAfter=function(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);var r=t._prevRemoved,i=t._nextRemoved;return null===r?this._removalsHead=i:r._nextRemoved=i,null===i?this._removalsTail=r:i._prevRemoved=r,this._insertAfter(t,e,n),this._addToMoves(t,n),t},t.prototype._moveAfter=function(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t},t.prototype._addAfter=function(t,e,n){return this._insertAfter(t,e,n),null===this._additionsTail?this._additionsTail=this._additionsHead=t:this._additionsTail=this._additionsTail._nextAdded=t,t},t.prototype._insertAfter=function(t,e,n){var r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new Qn),this._linkedRecords.put(t),t.currentIndex=n,t},t.prototype._remove=function(t){return this._addToRemovals(this._unlink(t))},t.prototype._unlink=function(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);var e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t},t.prototype._addToMoves=function(t,e){return t.previousIndex===e?t:(null===this._movesTail?this._movesTail=this._movesHead=t:this._movesTail=this._movesTail._nextMoved=t,t)},t.prototype._addToRemovals=function(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Qn),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t},t.prototype._addIdentityChange=function(t,e){return t.item=e,null===this._identityChangesTail?this._identityChangesTail=this._identityChangesHead=t:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=t,t},t}(),$n=function(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null},Kn=function(){function t(){this._head=null,this._tail=null}return t.prototype.add=function(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)},t.prototype.get=function(t,e){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&X(n.trackById,t))return n;return null},t.prototype.remove=function(t){var e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head},t}(),Qn=function(){function t(){this.map=new Map}return t.prototype.put=function(t){var e=t.trackById,n=this.map.get(e);n||(n=new Kn,this.map.set(e,n)),n.add(t)},t.prototype.get=function(t,e){var n=t,r=this.map.get(n);return r?r.get(t,e):null},t.prototype.remove=function(t){var e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this.map.size},enumerable:!0,configurable:!0}),t.prototype.clear=function(){this.map.clear()},t}();function Xn(t,e,n){var r=t.previousIndex;if(null===r)return r;var i=0;return n&&r<n.length&&(i=n[r]),r+e+i}var Zn=function(){function t(){}return t.prototype.supports=function(t){return t instanceof Map||Gn(t)},t.prototype.create=function(){return new Jn},t}(),Jn=function(){function t(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return Object.defineProperty(t.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead},enumerable:!0,configurable:!0}),t.prototype.forEachItem=function(t){var e;for(e=this._mapHead;null!==e;e=e._next)t(e)},t.prototype.forEachPreviousItem=function(t){var e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)},t.prototype.forEachChangedItem=function(t){var e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)},t.prototype.forEachAddedItem=function(t){var e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)},t.prototype.forEachRemovedItem=function(t){var e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)},t.prototype.diff=function(t){if(t){if(!(t instanceof Map||Gn(t)))throw new Error("Error trying to diff '"+Z(t)+"'. Only maps and objects are allowed")}else t=new Map;return this.check(t)?this:null},t.prototype.onDestroy=function(){},t.prototype.check=function(t){var e=this;this._reset();var n=this._mapHead;if(this._appendAfter=null,this._forEach(t,function(t,r){if(n&&n.key===r)e._maybeAddToChanges(n,t),e._appendAfter=n,n=n._next;else{var i=e._getOrCreateRecordForKey(r,t);n=e._insertBeforeOrAppend(n,i)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(var r=n;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty},t.prototype._insertBeforeOrAppend=function(t,e){if(t){var n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null},t.prototype._getOrCreateRecordForKey=function(t,e){if(this._records.has(t)){var n=this._records.get(t);this._maybeAddToChanges(n,e);var r=n._prev,i=n._next;return r&&(r._next=i),i&&(i._prev=r),n._next=null,n._prev=null,n}var o=new tr(t);return this._records.set(t,o),o.currentValue=e,this._addToAdditions(o),o},t.prototype._reset=function(){if(this.isDirty){var t=void 0;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}},t.prototype._maybeAddToChanges=function(t,e){X(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))},t.prototype._addToAdditions=function(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)},t.prototype._addToChanges=function(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)},t.prototype._forEach=function(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(function(n){return e(t[n],n)})},t}(),tr=function(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null},er=function(){function t(t){this.factories=t}return t.create=function(e,n){if(null!=n){var r=n.factories.slice();return new t(e=e.concat(r))}return new t(e)},t.extend=function(e){return{provide:t,useFactory:function(n){if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new H,new V]]}},t.prototype.find=function(t){var e,n=this.factories.find(function(e){return e.supports(t)});if(null!=n)return n;throw new Error("Cannot find a differ supporting object '"+t+"' of type '"+((e=t).name||typeof e)+"'")},t}();var nr=function(){function t(t){this.factories=t}return t.create=function(e,n){if(n){var r=n.factories.slice();e=e.concat(r)}return new t(e)},t.extend=function(e){return{provide:t,useFactory:function(n){if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new H,new V]]}},t.prototype.find=function(t){var e=this.factories.find(function(e){return e.supports(t)});if(e)return e;throw new Error("Cannot find a differ supporting object '"+t+"'")},t}(),rr=[new Zn],ir=[new Wn],or=new er(ir),ar=new nr(rr),sr=sn(null,"core",[{provide:ue,useValue:"unknown"},{provide:un,deps:[ot]},{provide:Xe,deps:[]},{provide:he,deps:[]}]),lr=new u("LocaleId"),cr=new u("Translations"),ur=new u("TranslationsFormat"),pr={Error:0,Warning:1,Ignore:2};function dr(){return or}function hr(){return ar}function fr(t){return t||"en-US"}pr[pr.Error]="Error",pr[pr.Warning]="Warning",pr[pr.Ignore]="Ignore";var mr=function(){function t(t){}return t.decorators=[{type:R,args:[{providers:[dn,ie,ge,se,{provide:er,useFactory:dr},{provide:nr,useFactory:hr},{provide:lr,useFactory:fr,deps:[[new F(lr),new V,new H]]}]}]}],t.ctorParameters=function(){return[{type:dn}]},t}(),gr={NONE:0,HTML:1,STYLE:2,SCRIPT:3,URL:4,RESOURCE_URL:5};gr[gr.NONE]="NONE",gr[gr.HTML]="HTML",gr[gr.STYLE]="STYLE",gr[gr.SCRIPT]="SCRIPT",gr[gr.URL]="URL",gr[gr.RESOURCE_URL]="RESOURCE_URL";var yr=function(){};function vr(t,e,n){var r=t.state,i=1792&r;return i===e?(t.state=-1793&r|n,t.initIndex=-1,!0):i===n}function br(t,e,n){return(1792&t.state)===e&&t.initIndex<=n&&(t.initIndex=n+1,!0)}function _r(t,e){return t.nodes[e]}function wr(t,e){return t.nodes[e]}function Cr(t,e){return t.nodes[e]}function xr(t,e){return t.nodes[e]}function Sr(t,e){return t.nodes[e]}var Er=function(){},kr={setCurrentNode:void 0,createRootView:void 0,createEmbeddedView:void 0,createComponentView:void 0,createNgModuleRef:void 0,overrideProvider:void 0,overrideComponentView:void 0,clearOverrides:void 0,checkAndUpdateView:void 0,checkNoChangesView:void 0,destroyView:void 0,resolveDep:void 0,createDebugContext:void 0,handleEvent:void 0,updateDirectives:void 0,updateRenderer:void 0,dirtyParentQueries:void 0};function Or(t,e,n,r){var i,o,a="ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '"+e+"'. Current value: '"+n+"'.";return r&&(a+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),i=t,Pr(o=new Error(a),i),o}function Pr(t,e){t[wt]=e,t[xt]=e.logError.bind(e)}function Ar(t){return new Error("ViewDestroyedError: Attempt to use a destroyed view: "+t)}var Dr=function(){},Tr=new Map;function Mr(t){var e=Tr.get(t);return e||(e=Z(t)+"_"+Tr.size,Tr.set(t,e)),e}var Ir="$$undefined",Rr="$$empty";var Nr=0;function Lr(t){if(t&&t.id===Ir){var e=null!=t.encapsulation&&t.encapsulation!==N.None||t.styles.length||Object.keys(t.data).length;t.id=e?"c"+Nr++:Rr}return t&&t.id===Rr&&(t=null),t||null}function jr(t,e,n,r){var i=t.oldValues;return!(!(2&t.state)&&X(i[e.bindingIndex+n],r))}function Fr(t,e,n,r){return!!jr(t,e,n,r)&&(t.oldValues[e.bindingIndex+n]=r,!0)}function Vr(t,e,n,r){var i=t.oldValues[e.bindingIndex+n];if(1&t.state||!Bn(i,r)){var o=e.bindings[n].name;throw Or(kr.createDebugContext(t,e.nodeIndex),o+": "+i,o+": "+r,0!=(1&t.state))}}function Br(t){for(var e=t;e;)2&e.def.flags&&(e.state|=8),e=e.viewContainerParent||e.parent}function Ur(t,e){for(var n=t;n&&n!==e;)n.state|=64,n=n.viewContainerParent||n.parent}function Hr(t,e,n,r){try{return Br(33554432&t.def.nodes[e].flags?wr(t,e).componentView:t),kr.handleEvent(t,e,n,r)}catch(e){t.root.errorHandler.handleError(e)}}function zr(t){return t.parent?wr(t.parent,t.parentNodeDef.nodeIndex):null}function Gr(t){return t.parent?t.parentNodeDef.parent:null}function Wr(t,e){switch(201347067&e.flags){case 1:return wr(t,e.nodeIndex).renderElement;case 2:return _r(t,e.nodeIndex).renderText}}function qr(t,e){return t?t+":"+e:e}function Yr(t){return!!t.parent&&!!(32768&t.parentNodeDef.flags)}function $r(t){return 1<<t%32}function Kr(t){var e={},n=0,r={};return t&&t.forEach(function(t){var i=t[0],o=t[1];"number"==typeof i?(e[i]=o,n|=$r(i)):r[i]=o}),{matchedQueries:e,references:r,matchedQueryIds:n}}function Qr(t,e){return t.map(function(t){var n,r;return Array.isArray(t)?(r=t[0],n=t[1]):(r=0,n=t),n&&("function"==typeof n||"object"==typeof n)&&e&&Object.defineProperty(n,et,{value:e,configurable:!0}),{flags:r,token:n,tokenKey:Mr(n)}})}function Xr(t,e,n){var r=n.renderParent;return r?0==(1&r.flags)||0==(33554432&r.flags)||r.element.componentRendererType&&r.element.componentRendererType.encapsulation===N.Native?wr(t,n.renderParent.nodeIndex).renderElement:void 0:e}var Zr=new WeakMap;function Jr(t){var e=Zr.get(t);return e||((e=t(function(){return Dr})).factory=t,Zr.set(t,e)),e}function ti(t,e,n,r,i){3===e&&(n=t.renderer.parentNode(Wr(t,t.def.lastRenderRootNode))),ei(t,e,0,t.def.nodes.length-1,n,r,i)}function ei(t,e,n,r,i,o,a){for(var s=n;s<=r;s++){var l=t.def.nodes[s];11&l.flags&&ri(t,l,e,i,o,a),s+=l.childCount}}function ni(t,e,n,r,i,o){for(var a=t;a&&!Yr(a);)a=a.parent;for(var s=a.parent,l=Gr(a),c=l.nodeIndex+1,u=l.nodeIndex+l.childCount,p=c;p<=u;p++){var d=s.def.nodes[p];d.ngContentIndex===e&&ri(s,d,n,r,i,o),p+=d.childCount}if(!s.parent){var h=t.root.projectableNodes[e];if(h)for(p=0;p<h.length;p++)ii(t,h[p],n,r,i,o)}}function ri(t,e,n,r,i,o){if(8&e.flags)ni(t,e.ngContent.index,n,r,i,o);else{var a=Wr(t,e);if(3===n&&33554432&e.flags&&48&e.bindingFlags){if(16&e.bindingFlags&&ii(t,a,n,r,i,o),32&e.bindingFlags)ii(wr(t,e.nodeIndex).componentView,a,n,r,i,o)}else ii(t,a,n,r,i,o);if(16777216&e.flags)for(var s=wr(t,e.nodeIndex).viewContainer._embeddedViews,l=0;l<s.length;l++)ti(s[l],n,r,i,o);1&e.flags&&!e.element.name&&ei(t,n,e.nodeIndex+1,e.nodeIndex+e.childCount,r,i,o)}}function ii(t,e,n,r,i,o){var a=t.renderer;switch(n){case 1:a.appendChild(r,e);break;case 2:a.insertBefore(r,e,i);break;case 3:a.removeChild(r,e);break;case 0:o.push(e)}}var oi=/^:([^:]+):(.+)$/;function ai(t){if(":"===t[0]){var e=t.match(oi);return[e[1],e[2]]}return["",t]}function si(t){for(var e=0,n=0;n<t.length;n++)e|=t[n].flags;return e}function li(t){return null!=t?t.toString():""}function ci(t,e,n){var r,i=n.element,o=t.root.selectorOrNode,a=t.renderer;if(t.parent||!o){r=i.name?a.createElement(i.name,i.ns):a.createComment("");var s=Xr(t,e,n);s&&a.appendChild(s,r)}else r=a.selectRootElement(o);if(i.attrs)for(var l=0;l<i.attrs.length;l++){var c=i.attrs[l],u=c[0],p=c[1],d=c[2];a.setAttribute(r,p,d,u)}return r}function ui(t,e,n,r){for(var i=0;i<n.outputs.length;i++){var o=n.outputs[i],a=pi(t,n.nodeIndex,qr(o.target,o.eventName)),s=o.target,l=t;"component"===o.target&&(s=null,l=e);var c=l.renderer.listen(s||r,o.eventName,a);t.disposables[n.outputIndex+i]=c}}function pi(t,e,n){return function(r){return Hr(t,e,n,r)}}function di(t,e,n,r){if(!Fr(t,e,n,r))return!1;var i,o,a,s,l,c,u,p,d,h,f=e.bindings[n],m=wr(t,e.nodeIndex),g=m.renderElement,y=f.name;switch(15&f.flags){case 1:!function(t,e,n,r,i,o){var a=e.securityContext,s=a?t.root.sanitizer.sanitize(a,o):o;s=null!=s?s.toString():null;var l=t.renderer;null!=o?l.setAttribute(n,i,s,r):l.removeAttribute(n,i,r)}(t,f,g,f.ns,y,r);break;case 2:u=g,p=y,d=r,h=t.renderer,d?h.addClass(u,p):h.removeClass(u,p);break;case 4:!function(t,e,n,r,i){var o=t.root.sanitizer.sanitize(gr.STYLE,i);if(null!=o){o=o.toString();var a=e.suffix;null!=a&&(o+=a)}else o=null;var s=t.renderer;null!=o?s.setStyle(n,r,o):s.removeStyle(n,r)}(t,f,g,y,r);break;case 8:var v=33554432&e.flags&&32&f.flags?m.componentView:t;i=v,o=g,a=y,s=r,l=f.securityContext,c=l?i.root.sanitizer.sanitize(l,s):s,i.renderer.setProperty(o,a,c)}return!0}var hi=new Object,fi=Mr(ot),mi=Mr(Ae);function gi(t,e,n){if(void 0===n&&(n=ot.THROW_IF_NOT_FOUND),8&e.flags)return e.token;if(2&e.flags&&(n=null),1&e.flags)return t._parent.get(e.token,n);var r=e.tokenKey;switch(r){case fi:case mi:return t}var i=t._def.providersByKey[r];if(i){var o=t._providers[i.index];return void 0===o&&(o=t._providers[i.index]=yi(t,i)),o===hi?void 0:o}return t._parent.get(e.token,n)}function yi(t,e){var n;switch(201347067&e.flags){case 512:n=function(t,e,n){var r=n.length;switch(r){case 0:return new e;case 1:return new e(gi(t,n[0]));case 2:return new e(gi(t,n[0]),gi(t,n[1]));case 3:return new e(gi(t,n[0]),gi(t,n[1]),gi(t,n[2]));default:for(var i=new Array(r),o=0;o<r;o++)i[o]=gi(t,n[o]);return new(e.bind.apply(e,[void 0].concat(i)))}}(t,e.value,e.deps);break;case 1024:n=function(t,e,n){var r=n.length;switch(r){case 0:return e();case 1:return e(gi(t,n[0]));case 2:return e(gi(t,n[0]),gi(t,n[1]));case 3:return e(gi(t,n[0]),gi(t,n[1]),gi(t,n[2]));default:for(var i=Array(r),o=0;o<r;o++)i[o]=gi(t,n[o]);return e.apply(void 0,i)}}(t,e.value,e.deps);break;case 2048:n=gi(t,e.deps[0]);break;case 256:n=e.value}return void 0===n?hi:n}function vi(t,e,n,r){var i=e.viewContainer._embeddedViews;null==n&&(n=i.length),r.viewContainerParent=t,Ci(i,n,r),function(t,e){var n=zr(e);if(!n||n===t||16&e.state)return;e.state|=16;var r=n.template._projectedViews;r||(r=n.template._projectedViews=[]);r.push(e),function(t,e){if(4&e.flags)return;t.nodeFlags|=4,e.flags|=4;var n=e.parent;for(;n;)n.childFlags|=4,n=n.parent}(e.parent.def,e.parentNodeDef)}(e,r),kr.dirtyParentQueries(r),_i(e,n>0?i[n-1]:null,r)}function bi(t,e){var n=t.viewContainer._embeddedViews;if((null==e||e>=n.length)&&(e=n.length-1),e<0)return null;var r=n[e];return r.viewContainerParent=null,xi(n,e),kr.dirtyParentQueries(r),wi(r),r}function _i(t,e,n){var r=e?Wr(e,e.def.lastRenderRootNode):t.renderElement;ti(n,2,n.renderer.parentNode(r),n.renderer.nextSibling(r),void 0)}function wi(t){ti(t,3,null,null,void 0)}function Ci(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function xi(t,e){e>=t.length-1?t.pop():t.splice(e,1)}var Si=new Object;function Ei(t){return t.viewDefFactory}var ki=function(t){function e(e,n,r,i,o,a){var s=t.call(this)||this;return s.selector=e,s.componentType=n,s._inputs=i,s._outputs=o,s.ngContentSelectors=a,s.viewDefFactory=r,s}return l(e,t),Object.defineProperty(e.prototype,"inputs",{get:function(){var t=[],e=this._inputs;for(var n in e){var r=e[n];t.push({propName:n,templateName:r})}return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outputs",{get:function(){var t=[];for(var e in this._outputs){var n=this._outputs[e];t.push({propName:e,templateName:n})}return t},enumerable:!0,configurable:!0}),e.prototype.create=function(t,e,n,r){if(!r)throw new Error("ngModule should be provided");var i=Jr(this.viewDefFactory),o=i.nodes[0].element.componentProvider.nodeIndex,a=kr.createRootView(t,e||[],n,i,r,Si),s=Cr(a,o).instance;return n&&a.renderer.setAttribute(wr(a,0).renderElement,"ng-version",j.full),new Oi(a,new Ai(a),s)},e}(_e),Oi=function(t){function e(e,n,r){var i=t.call(this)||this;return i._view=e,i._viewRef=n,i._component=r,i._elDef=i._view.def.nodes[0],i.hostView=n,i.changeDetectorRef=n,i.instance=r,i}return l(e,t),Object.defineProperty(e.prototype,"location",{get:function(){return new wn(wr(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new Mi(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._viewRef.destroy()},e.prototype.onDestroy=function(t){this._viewRef.onDestroy(t)},e}(be);var Pi=function(){function t(t,e,n){this._view=t,this._elDef=e,this._data=n,this._embeddedViews=[]}return Object.defineProperty(t.prototype,"element",{get:function(){return new wn(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new Mi(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentInjector",{get:function(){for(var t=this._view,e=this._elDef.parent;!e&&t;)e=Gr(t),t=t.parent;return t?new Mi(t,e):new Mi(this._view,null)},enumerable:!0,configurable:!0}),t.prototype.clear=function(){for(var t=this._embeddedViews.length-1;t>=0;t--){var e=bi(this._data,t);kr.destroyView(e)}},t.prototype.get=function(t){var e=this._embeddedViews[t];if(e){var n=new Ai(e);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(t.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(t,e,n){var r=t.createEmbeddedView(e||{});return this.insert(r,n),r},t.prototype.createComponent=function(t,e,n,r,i){var o=n||this.parentInjector;i||t instanceof Pe||(i=o.get(Ae));var a=t.create(o,r,void 0,i);return this.insert(a.hostView,e),a},t.prototype.insert=function(t,e){if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n=t,r=n._view;return vi(this._view,this._data,e,r),n.attachToViewContainerRef(this),t},t.prototype.move=function(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n,r,i,o,a,s=this._embeddedViews.indexOf(t._view);return n=this._data,r=s,i=e,o=n.viewContainer._embeddedViews,a=o[r],xi(o,r),null==i&&(i=o.length),Ci(o,i,a),kr.dirtyParentQueries(a),wi(a),_i(n,i>0?o[i-1]:null,a),t},t.prototype.indexOf=function(t){return this._embeddedViews.indexOf(t._view)},t.prototype.remove=function(t){var e=bi(this._data,t);e&&kr.destroyView(e)},t.prototype.detach=function(t){var e=bi(this._data,t);return e?new Ai(e):null},t}();var Ai=function(){function t(t){this._view=t,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(t.prototype,"rootNodes",{get:function(){return ti(this._view,0,void 0,void 0,t=[]),t;var t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),t.prototype.markForCheck=function(){Br(this._view)},t.prototype.detach=function(){this._view.state&=-5},t.prototype.detectChanges=function(){var t=this._view.root.rendererFactory;t.begin&&t.begin();try{kr.checkAndUpdateView(this._view)}finally{t.end&&t.end()}},t.prototype.checkNoChanges=function(){kr.checkNoChangesView(this._view)},t.prototype.reattach=function(){this._view.state|=4},t.prototype.onDestroy=function(t){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(t)},t.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),kr.destroyView(this._view)},t.prototype.detachFromAppRef=function(){this._appRef=null,wi(this._view),kr.dirtyParentQueries(this._view)},t.prototype.attachToAppRef=function(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t},t.prototype.attachToViewContainerRef=function(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t},t}();var Di=function(t){function e(e,n){var r=t.call(this)||this;return r._parentView=e,r._def=n,r}return l(e,t),e.prototype.createEmbeddedView=function(t){return new Ai(kr.createEmbeddedView(this._parentView,this._def,this._def.element.template,t))},Object.defineProperty(e.prototype,"elementRef",{get:function(){return new wn(wr(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),e}(An);function Ti(t,e){return new Mi(t,e)}var Mi=function(){function t(t,e){this.view=t,this.elDef=e}return t.prototype.get=function(t,e){void 0===e&&(e=ot.THROW_IF_NOT_FOUND);var n=!!this.elDef&&0!=(33554432&this.elDef.flags);return kr.resolveDep(this.view,this.elDef,n,{flags:0,token:t,tokenKey:Mr(t)},e)},t}();var Ii=function(){function t(t){this.delegate=t}return t.prototype.selectRootElement=function(t){return this.delegate.selectRootElement(t)},t.prototype.createElement=function(t,e){var n=ai(e),r=n[0],i=n[1],o=this.delegate.createElement(i,r);return t&&this.delegate.appendChild(t,o),o},t.prototype.createViewRoot=function(t){return t},t.prototype.createTemplateAnchor=function(t){var e=this.delegate.createComment("");return t&&this.delegate.appendChild(t,e),e},t.prototype.createText=function(t,e){var n=this.delegate.createText(e);return t&&this.delegate.appendChild(t,n),n},t.prototype.projectNodes=function(t,e){for(var n=0;n<e.length;n++)this.delegate.appendChild(t,e[n])},t.prototype.attachViewAfter=function(t,e){for(var n=this.delegate.parentNode(t),r=this.delegate.nextSibling(t),i=0;i<e.length;i++)this.delegate.insertBefore(n,e[i],r)},t.prototype.detachView=function(t){for(var e=0;e<t.length;e++){var n=t[e],r=this.delegate.parentNode(n);this.delegate.removeChild(r,n)}},t.prototype.destroyView=function(t,e){for(var n=0;n<e.length;n++)this.delegate.destroyNode(e[n])},t.prototype.listen=function(t,e,n){return this.delegate.listen(t,e,n)},t.prototype.listenGlobal=function(t,e,n){return this.delegate.listen(t,e,n)},t.prototype.setElementProperty=function(t,e,n){this.delegate.setProperty(t,e,n)},t.prototype.setElementAttribute=function(t,e,n){var r=ai(e),i=r[0],o=r[1];null!=n?this.delegate.setAttribute(t,o,n,i):this.delegate.removeAttribute(t,o,i)},t.prototype.setBindingDebugInfo=function(t,e,n){},t.prototype.setElementClass=function(t,e,n){n?this.delegate.addClass(t,e):this.delegate.removeClass(t,e)},t.prototype.setElementStyle=function(t,e,n){null!=n?this.delegate.setStyle(t,e,n):this.delegate.removeStyle(t,e)},t.prototype.invokeElementMethod=function(t,e,n){t[e].apply(t,n)},t.prototype.setText=function(t,e){this.delegate.setValue(t,e)},t.prototype.animate=function(){throw new Error("Renderer.animate is no longer supported!")},t}();function Ri(t,e,n,r){return new Ni(t,e,n,r)}var Ni=function(){function t(t,e,n,r){this._moduleType=t,this._parent=e,this._bootstrapComponents=n,this._def=r,this._destroyListeners=[],this._destroyed=!1,this.injector=this,function(t){for(var e=t._def,n=t._providers=new Array(e.providers.length),r=0;r<e.providers.length;r++){var i=e.providers[r];4096&i.flags||(n[r]=yi(t,i))}}(this)}return t.prototype.get=function(t,e){return void 0===e&&(e=ot.THROW_IF_NOT_FOUND),gi(this,{token:t,tokenKey:Mr(t),flags:0},e)},Object.defineProperty(t.prototype,"instance",{get:function(){return this.get(this._moduleType)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentFactoryResolver",{get:function(){return this.get(ke)},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){if(this._destroyed)throw new Error("The ng module "+Z(this.instance.constructor)+" has already been destroyed.");this._destroyed=!0,function(t,e){for(var n=t._def,r=0;r<n.providers.length;r++)if(131072&n.providers[r].flags){var i=t._providers[r];i&&i!==hi&&i.ngOnDestroy()}}(this),this._destroyListeners.forEach(function(t){return t()})},t.prototype.onDestroy=function(t){this._destroyListeners.push(t)},t}(),Li=Mr(gn),ji=Mr(_n),Fi=Mr(wn),Vi=Mr(Dn),Bi=Mr(An),Ui=Mr(Tn),Hi=Mr(ot);function zi(t,e,n,r,i,o,a,s,l){var c=Kr(n),u=c.matchedQueries,p=c.references,d=c.matchedQueryIds;l||(l=[]),s||(s=[]),o=tt(o);var h=Qr(a,Z(i));return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:e,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:u,matchedQueryIds:d,references:p,ngContentIndex:-1,childCount:r,bindings:s,bindingFlags:si(s),outputs:l,element:null,provider:{token:i,value:o,deps:h},text:null,query:null,ngContent:null}}function Gi(t,e){for(var n=t;n.parent&&!Yr(n);)n=n.parent;return $i(n.parent,Gr(n),!0,e.provider.value,e.provider.deps)}function Wi(t,e){var n=(32768&e.flags)>0,r=$i(t,e.parent,n,e.provider.value,e.provider.deps);if(e.outputs.length)for(var i=0;i<e.outputs.length;i++){var o=e.outputs[i],a=r[o.propName].subscribe(qi(t,e.parent.nodeIndex,o.eventName));t.disposables[e.outputIndex+i]=a.unsubscribe.bind(a)}return r}function qi(t,e,n){return function(r){return Hr(t,e,n,r)}}function Yi(t,e){var n=(8192&e.flags)>0,r=e.provider;switch(201347067&e.flags){case 512:return $i(t,e.parent,n,r.value,r.deps);case 1024:return function(t,e,n,r,i){var o=i.length;switch(o){case 0:return r();case 1:return r(Qi(t,e,n,i[0]));case 2:return r(Qi(t,e,n,i[0]),Qi(t,e,n,i[1]));case 3:return r(Qi(t,e,n,i[0]),Qi(t,e,n,i[1]),Qi(t,e,n,i[2]));default:for(var a=Array(o),s=0;s<o;s++)a[s]=Qi(t,e,n,i[s]);return r.apply(void 0,a)}}(t,e.parent,n,r.value,r.deps);case 2048:return Qi(t,e.parent,n,r.deps[0]);case 256:return r.value}}function $i(t,e,n,r,i){var o=i.length;switch(o){case 0:return new r;case 1:return new r(Qi(t,e,n,i[0]));case 2:return new r(Qi(t,e,n,i[0]),Qi(t,e,n,i[1]));case 3:return new r(Qi(t,e,n,i[0]),Qi(t,e,n,i[1]),Qi(t,e,n,i[2]));default:for(var a=new Array(o),s=0;s<o;s++)a[s]=Qi(t,e,n,i[s]);return new(r.bind.apply(r,[void 0].concat(a)))}}var Ki={};function Qi(t,e,n,r,i){if(void 0===i&&(i=ot.THROW_IF_NOT_FOUND),8&r.flags)return r.token;var o=t;2&r.flags&&(i=null);var a=r.tokenKey;for(a===Ui&&(n=!(!e||!e.element.componentView)),e&&1&r.flags&&(n=!1,e=e.parent);t;){if(e)switch(a){case Li:var s=Xi(t,e,n);return new Ii(s.renderer);case ji:return(s=Xi(t,e,n)).renderer;case Fi:return new wn(wr(t,e.nodeIndex).renderElement);case Vi:return wr(t,e.nodeIndex).viewContainer;case Bi:if(e.element.template)return wr(t,e.nodeIndex).template;break;case Ui:var l=Xi(t,e,n);return new Ai(l);case Hi:return Ti(t,e);default:var c=(n?e.element.allProviders:e.element.publicProviders)[a];if(c){var u=Cr(t,c.nodeIndex);return u||(u={instance:Yi(t,c)},t.nodes[c.nodeIndex]=u),u.instance}}n=Yr(t),e=Gr(t),t=t.parent}var p=o.root.injector.get(r.token,Ki);return p!==Ki||i===Ki?p:o.root.ngModule.injector.get(r.token,i)}function Xi(t,e,n){var r;if(n)r=wr(t,e.nodeIndex).componentView;else for(r=t;r.parent&&!Yr(r);)r=r.parent;return r}function Zi(t,e,n,r,i,o){if(32768&n.flags){var a=wr(t,n.parent.nodeIndex).componentView;2&a.def.flags&&(a.state|=8)}var s=n.bindings[r].name;if(e.instance[s]=i,524288&n.flags){o=o||{};var l=Un.unwrap(t.oldValues[n.bindingIndex+r]);o[n.bindings[r].nonMinifiedName]=new Hn(l,i,0!=(2&t.state))}return t.oldValues[n.bindingIndex+r]=i,o}function Ji(t,e){if(t.def.nodeFlags&e)for(var n=t.def.nodes,r=0,i=0;i<n.length;i++){var o=n[i],a=o.parent;for(!a&&o.flags&e&&eo(t,i,o.flags&e,r++),0==(o.childFlags&e)&&(i+=o.childCount);a&&1&a.flags&&i===a.nodeIndex+a.childCount;)a.directChildFlags&e&&(r=to(t,a,e,r)),a=a.parent}}function to(t,e,n,r){for(var i=e.nodeIndex+1;i<=e.nodeIndex+e.childCount;i++){var o=t.def.nodes[i];o.flags&n&&eo(t,i,o.flags&n,r++),i+=o.childCount}return r}function eo(t,e,n,r){var i=Cr(t,e);if(i){var o=i.instance;o&&(kr.setCurrentNode(t,e),1048576&n&&br(t,512,r)&&o.ngAfterContentInit(),2097152&n&&o.ngAfterContentChecked(),4194304&n&&br(t,768,r)&&o.ngAfterViewInit(),8388608&n&&o.ngAfterViewChecked(),131072&n&&o.ngOnDestroy())}}function no(t){for(var e,n=t.def.nodeMatchedQueries;t.parent&&((e=t).parent&&!(32768&e.parentNodeDef.flags));){var r=t.parentNodeDef;t=t.parent;for(var i=r.nodeIndex+r.childCount,o=0;o<=i;o++){67108864&(a=t.def.nodes[o]).flags&&536870912&a.flags&&(a.query.filterId&n)===a.query.filterId&&Sr(t,o).setDirty(),!(1&a.flags&&o+a.childCount<r.nodeIndex)&&67108864&a.childFlags&&536870912&a.childFlags||(o+=a.childCount)}}if(134217728&t.def.nodeFlags)for(o=0;o<t.def.nodes.length;o++){var a;134217728&(a=t.def.nodes[o]).flags&&536870912&a.flags&&Sr(t,o).setDirty(),o+=a.childCount}}function ro(t,e){var n=Sr(t,e.nodeIndex);if(n.dirty){var r,i=void 0;if(67108864&e.flags){var o=e.parent.parent;i=io(t,o.nodeIndex,o.nodeIndex+o.childCount,e.query,[]),r=Cr(t,e.parent.nodeIndex).instance}else 134217728&e.flags&&(i=io(t,0,t.def.nodes.length-1,e.query,[]),r=t.component);n.reset(i);for(var a=e.query.bindings,s=!1,l=0;l<a.length;l++){var c=a[l],u=void 0;switch(c.bindingType){case 0:u=n.first;break;case 1:u=n,s=!0}r[c.propName]=u}s&&n.notifyOnChanges()}}function io(t,e,n,r,i){for(var o=e;o<=n;o++){var a=t.def.nodes[o],s=a.matchedQueries[r.id];if(null!=s&&i.push(oo(t,a,s)),1&a.flags&&a.element.template&&(a.element.template.nodeMatchedQueries&r.filterId)===r.filterId){var l=wr(t,o);if((a.childMatchedQueries&r.filterId)===r.filterId&&(io(t,o+1,o+a.childCount,r,i),o+=a.childCount),16777216&a.flags)for(var c=l.viewContainer._embeddedViews,u=0;u<c.length;u++){var p=c[u],d=zr(p);d&&d===l&&io(p,0,p.def.nodes.length-1,r,i)}var h=l.template._projectedViews;if(h)for(u=0;u<h.length;u++){var f=h[u];io(f,0,f.def.nodes.length-1,r,i)}}(a.childMatchedQueries&r.filterId)!==r.filterId&&(o+=a.childCount)}return i}function oo(t,e,n){if(null!=n)switch(n){case 1:return wr(t,e.nodeIndex).renderElement;case 0:return new wn(wr(t,e.nodeIndex).renderElement);case 2:return wr(t,e.nodeIndex).template;case 3:return wr(t,e.nodeIndex).viewContainer;case 4:return Cr(t,e.nodeIndex).instance}}function ao(t,e,n){for(var r=new Array(n.length),i=0;i<n.length;i++){var o=n[i];r[i]={flags:8,name:o,ns:null,nonMinifiedName:o,securityContext:null,suffix:null}}return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:t,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:-1,childCount:0,bindings:r,bindingFlags:si(r),outputs:[],element:null,provider:null,text:null,query:null,ngContent:null}}function so(t,e,n){var r,i=t.renderer;r=i.createText(n.text.prefix);var o=Xr(t,e,n);return o&&i.appendChild(o,r),{renderText:r}}function lo(t,e){return(null!=t?t.toString():"")+e.suffix}function co(t){return 0!=(1&t.flags)&&null===t.element.name}function uo(t,e,n){var r=e.element&&e.element.template;if(r){if(!r.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(r.lastRenderRootNode&&16777216&r.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+e.nodeIndex+"!")}if(20224&e.flags&&0==(1&(t?t.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+e.nodeIndex+"!");if(e.query){if(67108864&e.flags&&(!t||0==(16384&t.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+e.nodeIndex+"!");if(134217728&e.flags&&t)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+e.nodeIndex+"!")}if(e.childCount){var i=t?t.nodeIndex+t.childCount:n-1;if(e.nodeIndex<=i&&e.nodeIndex+e.childCount>i)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+e.nodeIndex+"!")}}function po(t,e,n,r){var i=mo(t.root,t.renderer,t,e,n);return go(i,t.component,r),yo(i),i}function ho(t,e,n){var r=mo(t,t.renderer,null,null,e);return go(r,n,n),yo(r),r}function fo(t,e,n,r){var i,o=e.element.componentRendererType;return i=o?t.root.rendererFactory.createRenderer(r,o):t.root.renderer,mo(t.root,i,t,e.element.componentProvider,n)}function mo(t,e,n,r,i){var o=new Array(i.nodes.length),a=i.outputCount?new Array(i.outputCount):null;return{def:i,parent:n,viewContainerParent:null,parentNodeDef:r,context:null,component:null,nodes:o,state:13,root:t,renderer:e,oldValues:new Array(i.bindingCount),disposables:a,initIndex:-1}}function go(t,e,n){t.component=e,t.context=n}function yo(t){var e;if(Yr(t)){var n=t.parentNodeDef;e=wr(t.parent,n.parent.nodeIndex).renderElement}for(var r,i,o,a,s,l=t.def,c=t.nodes,u=0;u<l.nodes.length;u++){var p=l.nodes[u];kr.setCurrentNode(t,u);var d=void 0;switch(201347067&p.flags){case 1:var h=ci(t,e,p),f=void 0;if(33554432&p.flags){var m=Jr(p.element.componentView);f=kr.createComponentView(t,p,m,h)}ui(t,f,p,h),d={renderElement:h,componentView:f,viewContainer:null,template:p.element.template?(a=t,s=p,new Di(a,s)):void 0},16777216&p.flags&&(d.viewContainer=new Pi(t,p,d));break;case 2:d=so(t,e,p);break;case 512:case 1024:case 2048:case 256:if(!((d=c[u])||4096&p.flags))d={instance:Yi(t,p)};break;case 16:d={instance:Gi(t,p)};break;case 16384:if(!(d=c[u]))d={instance:Wi(t,p)};if(32768&p.flags)go(wr(t,p.parent.nodeIndex).componentView,d.instance,d.instance);break;case 32:case 64:case 128:d={value:void 0};break;case 67108864:case 134217728:d=new Sn;break;case 8:void 0,(o=Xr(r=t,e,i=p))&&ni(r,i.ngContent.index,1,o,null,void 0),d=void 0}c[u]=d}ko(t,Eo.CreateViewNodes),Do(t,201326592,268435456,0)}function vo(t){wo(t),kr.updateDirectives(t,1),Oo(t,Eo.CheckNoChanges),kr.updateRenderer(t,1),ko(t,Eo.CheckNoChanges),t.state&=-97}function bo(t){1&t.state?(t.state&=-2,t.state|=2):t.state&=-3,vr(t,0,256),wo(t),kr.updateDirectives(t,0),Oo(t,Eo.CheckAndUpdate),Do(t,67108864,536870912,0);var e=vr(t,256,512);Ji(t,2097152|(e?1048576:0)),kr.updateRenderer(t,0),ko(t,Eo.CheckAndUpdate),Do(t,134217728,536870912,0),Ji(t,8388608|((e=vr(t,512,768))?4194304:0)),2&t.def.flags&&(t.state&=-9),t.state&=-97,vr(t,768,1024)}function _o(t,e,n,r,i,o,a,s,l,c,u,p,d){return 0===n?function(t,e,n,r,i,o,a,s,l,c,u,p){switch(201347067&e.flags){case 1:return A=t,T=n,M=r,I=i,R=o,N=a,L=s,j=l,F=c,V=u,B=p,U=(D=e).bindings.length,H=!1,U>0&&di(A,D,0,T)&&(H=!0),U>1&&di(A,D,1,M)&&(H=!0),U>2&&di(A,D,2,I)&&(H=!0),U>3&&di(A,D,3,R)&&(H=!0),U>4&&di(A,D,4,N)&&(H=!0),U>5&&di(A,D,5,L)&&(H=!0),U>6&&di(A,D,6,j)&&(H=!0),U>7&&di(A,D,7,F)&&(H=!0),U>8&&di(A,D,8,V)&&(H=!0),U>9&&di(A,D,9,B)&&(H=!0),H;case 2:return function(t,e,n,r,i,o,a,s,l,c,u,p){var d=!1,h=e.bindings,f=h.length;if(f>0&&Fr(t,e,0,n)&&(d=!0),f>1&&Fr(t,e,1,r)&&(d=!0),f>2&&Fr(t,e,2,i)&&(d=!0),f>3&&Fr(t,e,3,o)&&(d=!0),f>4&&Fr(t,e,4,a)&&(d=!0),f>5&&Fr(t,e,5,s)&&(d=!0),f>6&&Fr(t,e,6,l)&&(d=!0),f>7&&Fr(t,e,7,c)&&(d=!0),f>8&&Fr(t,e,8,u)&&(d=!0),f>9&&Fr(t,e,9,p)&&(d=!0),d){var m=e.text.prefix;f>0&&(m+=lo(n,h[0])),f>1&&(m+=lo(r,h[1])),f>2&&(m+=lo(i,h[2])),f>3&&(m+=lo(o,h[3])),f>4&&(m+=lo(a,h[4])),f>5&&(m+=lo(s,h[5])),f>6&&(m+=lo(l,h[6])),f>7&&(m+=lo(c,h[7])),f>8&&(m+=lo(u,h[8])),f>9&&(m+=lo(p,h[9]));var g=_r(t,e.nodeIndex).renderText;t.renderer.setValue(g,m)}return d}(t,e,n,r,i,o,a,s,l,c,u,p);case 16384:return f=n,m=r,g=i,y=o,v=a,b=s,_=l,w=c,C=u,x=p,S=Cr(d=t,(h=e).nodeIndex),E=S.instance,k=!1,O=void 0,(P=h.bindings.length)>0&&jr(d,h,0,f)&&(k=!0,O=Zi(d,S,h,0,f,O)),P>1&&jr(d,h,1,m)&&(k=!0,O=Zi(d,S,h,1,m,O)),P>2&&jr(d,h,2,g)&&(k=!0,O=Zi(d,S,h,2,g,O)),P>3&&jr(d,h,3,y)&&(k=!0,O=Zi(d,S,h,3,y,O)),P>4&&jr(d,h,4,v)&&(k=!0,O=Zi(d,S,h,4,v,O)),P>5&&jr(d,h,5,b)&&(k=!0,O=Zi(d,S,h,5,b,O)),P>6&&jr(d,h,6,_)&&(k=!0,O=Zi(d,S,h,6,_,O)),P>7&&jr(d,h,7,w)&&(k=!0,O=Zi(d,S,h,7,w,O)),P>8&&jr(d,h,8,C)&&(k=!0,O=Zi(d,S,h,8,C,O)),P>9&&jr(d,h,9,x)&&(k=!0,O=Zi(d,S,h,9,x,O)),O&&E.ngOnChanges(O),65536&h.flags&&br(d,256,h.nodeIndex)&&E.ngOnInit(),262144&h.flags&&E.ngDoCheck(),k;case 32:case 64:case 128:return function(t,e,n,r,i,o,a,s,l,c,u,p){var d=e.bindings,h=!1,f=d.length;if(f>0&&Fr(t,e,0,n)&&(h=!0),f>1&&Fr(t,e,1,r)&&(h=!0),f>2&&Fr(t,e,2,i)&&(h=!0),f>3&&Fr(t,e,3,o)&&(h=!0),f>4&&Fr(t,e,4,a)&&(h=!0),f>5&&Fr(t,e,5,s)&&(h=!0),f>6&&Fr(t,e,6,l)&&(h=!0),f>7&&Fr(t,e,7,c)&&(h=!0),f>8&&Fr(t,e,8,u)&&(h=!0),f>9&&Fr(t,e,9,p)&&(h=!0),h){var m=xr(t,e.nodeIndex),g=void 0;switch(201347067&e.flags){case 32:g=new Array(d.length),f>0&&(g[0]=n),f>1&&(g[1]=r),f>2&&(g[2]=i),f>3&&(g[3]=o),f>4&&(g[4]=a),f>5&&(g[5]=s),f>6&&(g[6]=l),f>7&&(g[7]=c),f>8&&(g[8]=u),f>9&&(g[9]=p);break;case 64:g={},f>0&&(g[d[0].name]=n),f>1&&(g[d[1].name]=r),f>2&&(g[d[2].name]=i),f>3&&(g[d[3].name]=o),f>4&&(g[d[4].name]=a),f>5&&(g[d[5].name]=s),f>6&&(g[d[6].name]=l),f>7&&(g[d[7].name]=c),f>8&&(g[d[8].name]=u),f>9&&(g[d[9].name]=p);break;case 128:var y=n;switch(f){case 1:g=y.transform(n);break;case 2:g=y.transform(r);break;case 3:g=y.transform(r,i);break;case 4:g=y.transform(r,i,o);break;case 5:g=y.transform(r,i,o,a);break;case 6:g=y.transform(r,i,o,a,s);break;case 7:g=y.transform(r,i,o,a,s,l);break;case 8:g=y.transform(r,i,o,a,s,l,c);break;case 9:g=y.transform(r,i,o,a,s,l,c,u);break;case 10:g=y.transform(r,i,o,a,s,l,c,u,p)}}m.value=g}return h}(t,e,n,r,i,o,a,s,l,c,u,p);default:throw"unreachable"}var d,h,f,m,g,y,v,b,_,w,C,x,S,E,k,O,P;var A,D,T,M,I,R,N,L,j,F,V,B,U,H}(t,e,r,i,o,a,s,l,c,u,p,d):function(t,e,n){switch(201347067&e.flags){case 1:return function(t,e,n){for(var r=!1,i=0;i<n.length;i++)di(t,e,i,n[i])&&(r=!0);return r}(t,e,n);case 2:return function(t,e,n){for(var r=e.bindings,i=!1,o=0;o<n.length;o++)Fr(t,e,o,n[o])&&(i=!0);if(i){var a="";for(o=0;o<n.length;o++)a+=lo(n[o],r[o]);a=e.text.prefix+a;var s=_r(t,e.nodeIndex).renderText;t.renderer.setValue(s,a)}return i}(t,e,n);case 16384:return function(t,e,n){for(var r=Cr(t,e.nodeIndex),i=r.instance,o=!1,a=void 0,s=0;s<n.length;s++)jr(t,e,s,n[s])&&(o=!0,a=Zi(t,r,e,s,n[s],a));return a&&i.ngOnChanges(a),65536&e.flags&&br(t,256,e.nodeIndex)&&i.ngOnInit(),262144&e.flags&&i.ngDoCheck(),o}(t,e,n);case 32:case 64:case 128:return function(t,e,n){for(var r=e.bindings,i=!1,o=0;o<n.length;o++)Fr(t,e,o,n[o])&&(i=!0);if(i){var a=xr(t,e.nodeIndex),s=void 0;switch(201347067&e.flags){case 32:s=n;break;case 64:for(s={},o=0;o<n.length;o++)s[r[o].name]=n[o];break;case 128:var l=n[0],c=n.slice(1);s=l.transform.apply(l,c)}a.value=s}return i}(t,e,n);default:throw"unreachable"}}(t,e,r)}function wo(t){var e=t.def;if(4&e.nodeFlags)for(var n=0;n<e.nodes.length;n++){var r=e.nodes[n];if(4&r.flags){var i=wr(t,n).template._projectedViews;if(i)for(var o=0;o<i.length;o++){var a=i[o];a.state|=32,Ur(a,t)}}else 0==(4&r.childFlags)&&(n+=r.childCount)}}function Co(t,e,n,r,i,o,a,s,l,c,u,p,d){return 0===n?function(t,e,n,r,i,o,a,s,l,c,u,p){var d=e.bindings.length;d>0&&Vr(t,e,0,n);d>1&&Vr(t,e,1,r);d>2&&Vr(t,e,2,i);d>3&&Vr(t,e,3,o);d>4&&Vr(t,e,4,a);d>5&&Vr(t,e,5,s);d>6&&Vr(t,e,6,l);d>7&&Vr(t,e,7,c);d>8&&Vr(t,e,8,u);d>9&&Vr(t,e,9,p)}(t,e,r,i,o,a,s,l,c,u,p,d):function(t,e,n){for(var r=0;r<n.length;r++)Vr(t,e,r,n[r])}(t,e,r),!1}function xo(t,e){if(Sr(t,e.nodeIndex).dirty)throw Or(kr.createDebugContext(t,e.nodeIndex),"Query "+e.query.id+" not dirty","Query "+e.query.id+" dirty",0!=(1&t.state))}function So(t){if(!(128&t.state)){if(Oo(t,Eo.Destroy),ko(t,Eo.Destroy),Ji(t,131072),t.disposables)for(var e=0;e<t.disposables.length;e++)t.disposables[e]();!function(t){if(16&t.state){var e=zr(t);if(e){var n=e.template._projectedViews;n&&(xi(n,n.indexOf(t)),kr.dirtyParentQueries(t))}}}(t),t.renderer.destroyNode&&function(t){for(var e=t.def.nodes.length,n=0;n<e;n++){var r=t.def.nodes[n];1&r.flags?t.renderer.destroyNode(wr(t,n).renderElement):2&r.flags?t.renderer.destroyNode(_r(t,n).renderText):(67108864&r.flags||134217728&r.flags)&&Sr(t,n).destroy()}}(t),Yr(t)&&t.renderer.destroy(),t.state|=128}}var Eo={CreateViewNodes:0,CheckNoChanges:1,CheckNoChangesProjectedViews:2,CheckAndUpdate:3,CheckAndUpdateProjectedViews:4,Destroy:5};function ko(t,e){var n=t.def;if(33554432&n.nodeFlags)for(var r=0;r<n.nodes.length;r++){var i=n.nodes[r];33554432&i.flags?Po(wr(t,r).componentView,e):0==(33554432&i.childFlags)&&(r+=i.childCount)}}function Oo(t,e){var n=t.def;if(16777216&n.nodeFlags)for(var r=0;r<n.nodes.length;r++){var i=n.nodes[r];if(16777216&i.flags)for(var o=wr(t,r).viewContainer._embeddedViews,a=0;a<o.length;a++)Po(o[a],e);else 0==(16777216&i.childFlags)&&(r+=i.childCount)}}function Po(t,e){var n=t.state;switch(e){case Eo.CheckNoChanges:0==(128&n)&&(12==(12&n)?vo(t):64&n&&Ao(t,Eo.CheckNoChangesProjectedViews));break;case Eo.CheckNoChangesProjectedViews:0==(128&n)&&(32&n?vo(t):64&n&&Ao(t,e));break;case Eo.CheckAndUpdate:0==(128&n)&&(12==(12&n)?bo(t):64&n&&Ao(t,Eo.CheckAndUpdateProjectedViews));break;case Eo.CheckAndUpdateProjectedViews:0==(128&n)&&(32&n?bo(t):64&n&&Ao(t,e));break;case Eo.Destroy:So(t);break;case Eo.CreateViewNodes:yo(t)}}function Ao(t,e){Oo(t,e),ko(t,e)}function Do(t,e,n,r){if(t.def.nodeFlags&e&&t.def.nodeFlags&n)for(var i=t.def.nodes.length,o=0;o<i;o++){var a=t.def.nodes[o];if(a.flags&e&&a.flags&n)switch(kr.setCurrentNode(t,a.nodeIndex),r){case 0:ro(t,a);break;case 1:xo(t,a)}a.childFlags&e&&a.childFlags&n||(o+=a.childCount)}}Eo[Eo.CreateViewNodes]="CreateViewNodes",Eo[Eo.CheckNoChanges]="CheckNoChanges",Eo[Eo.CheckNoChangesProjectedViews]="CheckNoChangesProjectedViews",Eo[Eo.CheckAndUpdate]="CheckAndUpdate",Eo[Eo.CheckAndUpdateProjectedViews]="CheckAndUpdateProjectedViews",Eo[Eo.Destroy]="Destroy";var To=!1;function Mo(){if(!To){To=!0;var t=rn()?{setCurrentNode:ta,createRootView:Ro,createEmbeddedView:Lo,createComponentView:jo,createNgModuleRef:Fo,overrideProvider:Uo,overrideComponentView:Ho,clearOverrides:zo,checkAndUpdateView:Yo,checkNoChangesView:$o,destroyView:Ko,createDebugContext:function(t,e){return new pa(t,e)},handleEvent:ea,updateDirectives:na,updateRenderer:ra}:{setCurrentNode:function(){},createRootView:Io,createEmbeddedView:po,createComponentView:fo,createNgModuleRef:Ri,overrideProvider:Dr,overrideComponentView:Dr,clearOverrides:Dr,checkAndUpdateView:bo,checkNoChangesView:vo,destroyView:So,createDebugContext:function(t,e){return new pa(t,e)},handleEvent:function(t,e,n,r){return t.def.handleEvent(t,e,n,r)},updateDirectives:function(t,e){return t.def.updateDirectives(0===e?Wo:qo,t)},updateRenderer:function(t,e){return t.def.updateRenderer(0===e?Wo:qo,t)}};kr.setCurrentNode=t.setCurrentNode,kr.createRootView=t.createRootView,kr.createEmbeddedView=t.createEmbeddedView,kr.createComponentView=t.createComponentView,kr.createNgModuleRef=t.createNgModuleRef,kr.overrideProvider=t.overrideProvider,kr.overrideComponentView=t.overrideComponentView,kr.clearOverrides=t.clearOverrides,kr.checkAndUpdateView=t.checkAndUpdateView,kr.checkNoChangesView=t.checkNoChangesView,kr.destroyView=t.destroyView,kr.resolveDep=Qi,kr.createDebugContext=t.createDebugContext,kr.handleEvent=t.handleEvent,kr.updateDirectives=t.updateDirectives,kr.updateRenderer=t.updateRenderer,kr.dirtyParentQueries=no}}function Io(t,e,n,r,i,o){return ho(No(t,i,i.injector.get(vn),e,n),r,o)}function Ro(t,e,n,r,i,o){var a=i.injector.get(vn),s=No(t,i,new ma(a),e,n),l=Go(r);return ha(Jo.create,ho,null,[s,l,o])}function No(t,e,n,r,i){var o=e.injector.get(yr),a=e.injector.get(Ot);return{ngModule:e,injector:t,projectableNodes:r,selectorOrNode:i,sanitizer:o,rendererFactory:n,renderer:n.createRenderer(null,null),errorHandler:a}}function Lo(t,e,n,r){var i=Go(n);return ha(Jo.create,po,null,[t,e,i,r])}function jo(t,e,n,r){var i=Bo.get(e.element.componentProvider.provider.token);return n=i||Go(n),ha(Jo.create,fo,null,[t,e,n,r])}function Fo(t,e,n,r){return Ri(t,e,n,function(t){var e=function(t){var e=!1,n=!1;if(0===Vo.size)return{hasOverrides:e,hasDeprecatedOverrides:n};return t.providers.forEach(function(t){var r=Vo.get(t.token);3840&t.flags&&r&&(e=!0,n=n||r.deprecatedBehavior)}),{hasOverrides:e,hasDeprecatedOverrides:n}}(t),n=e.hasOverrides,r=e.hasDeprecatedOverrides;if(!n)return t;return function(t){for(var e=0;e<t.providers.length;e++){var n=t.providers[e];r&&(n.flags|=4096);var i=Vo.get(n.token);i&&(n.flags=-3841&n.flags|i.flags,n.deps=Qr(i.deps),n.value=i.value)}}(t=t.factory(function(){return Dr})),t}(r))}var Vo=new Map,Bo=new Map;function Uo(t){Vo.set(t.token,t)}function Ho(t,e){var n=Jr(Jr(Ei(e)).nodes[0].element.componentView);Bo.set(t,n)}function zo(){Vo.clear(),Bo.clear()}function Go(t){if(0===Vo.size)return t;var e=function(t){for(var e=[],n=null,r=0;r<t.nodes.length;r++){var i=t.nodes[r];1&i.flags&&(n=i),n&&3840&i.flags&&Vo.has(i.provider.token)&&(e.push(n.nodeIndex),n=null)}return e}(t);if(0===e.length)return t;t=t.factory(function(){return Dr});for(var n=0;n<e.length;n++)r(t,e[n]);return t;function r(t,e){for(var n=e+1;n<t.nodes.length;n++){var r=t.nodes[n];if(1&r.flags)return;if(3840&r.flags){var i=r.provider,o=Vo.get(i.token);o&&(r.flags=-3841&r.flags|o.flags,i.deps=Qr(o.deps),i.value=o.value)}}}}function Wo(t,e,n,r,i,o,a,s,l,c,u,p,d){var h=t.def.nodes[e];return _o(t,h,n,r,i,o,a,s,l,c,u,p,d),224&h.flags?xr(t,e).value:void 0}function qo(t,e,n,r,i,o,a,s,l,c,u,p,d){var h=t.def.nodes[e];return Co(t,h,n,r,i,o,a,s,l,c,u,p,d),224&h.flags?xr(t,e).value:void 0}function Yo(t){return ha(Jo.detectChanges,bo,null,[t])}function $o(t){return ha(Jo.checkNoChanges,vo,null,[t])}function Ko(t){return ha(Jo.destroy,So,null,[t])}var Qo,Xo,Zo,Jo={create:0,detectChanges:1,checkNoChanges:2,destroy:3,handleEvent:4};function ta(t,e){Xo=t,Zo=e}function ea(t,e,n,r){return ta(t,e),ha(Jo.handleEvent,t.def.handleEvent,null,[t,e,n,r])}function na(t,e){if(128&t.state)throw Ar(Jo[Qo]);return ta(t,ca(t,0)),t.def.updateDirectives(function(t,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a=t.def.nodes[n];0===e?ia(t,a,r,i):oa(t,a,r,i);16384&a.flags&&ta(t,ca(t,n));return 224&a.flags?xr(t,a.nodeIndex).value:void 0},t)}function ra(t,e){if(128&t.state)throw Ar(Jo[Qo]);return ta(t,ua(t,0)),t.def.updateRenderer(function(t,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a=t.def.nodes[n];0===e?ia(t,a,r,i):oa(t,a,r,i);3&a.flags&&ta(t,ua(t,n));return 224&a.flags?xr(t,a.nodeIndex).value:void 0},t)}function ia(t,e,n,r){if(_o.apply(void 0,[t,e,n].concat(r))){var i=1===n?r[0]:r;if(16384&e.flags){for(var o={},a=0;a<e.bindings.length;a++){var s=e.bindings[a],l=i[a];8&s.flags&&(o[aa(s.nonMinifiedName)]=la(l))}var c=e.parent,u=wr(t,c.nodeIndex).renderElement;if(c.element.name)for(var p in o){null!=(l=o[p])?t.renderer.setAttribute(u,p,l):t.renderer.removeAttribute(u,p)}else t.renderer.setValue(u,"bindings="+JSON.stringify(o,null,2))}}}function oa(t,e,n,r){Co.apply(void 0,[t,e,n].concat(r))}function aa(t){return"ng-reflect-"+(t=t.replace(/[$@]/g,"_").replace(sa,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"-"+t[1].toLowerCase()}))}Jo[Jo.create]="create",Jo[Jo.detectChanges]="detectChanges",Jo[Jo.checkNoChanges]="checkNoChanges",Jo[Jo.destroy]="destroy",Jo[Jo.handleEvent]="handleEvent";var sa=/([A-Z])/g;function la(t){try{return null!=t?t.toString().slice(0,30):t}catch(t){return"[ERROR] Exception while trying to serialize the value"}}function ca(t,e){for(var n=e;n<t.def.nodes.length;n++){var r=t.def.nodes[n];if(16384&r.flags&&r.bindings&&r.bindings.length)return n}return null}function ua(t,e){for(var n=e;n<t.def.nodes.length;n++){var r=t.def.nodes[n];if(3&r.flags&&r.bindings&&r.bindings.length)return n}return null}var pa=function(){function t(t,e){this.view=t,this.nodeIndex=e,null==e&&(this.nodeIndex=e=0),this.nodeDef=t.def.nodes[e];for(var n=this.nodeDef,r=t;n&&0==(1&n.flags);)n=n.parent;if(!n)for(;!n&&r;)n=Gr(r),r=r.parent;this.elDef=n,this.elView=r}return Object.defineProperty(t.prototype,"elOrCompView",{get:function(){return wr(this.elView,this.elDef.nodeIndex).componentView||this.view},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return Ti(this.elView,this.elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){return this.elOrCompView.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this.elOrCompView.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){var t=[];if(this.elDef)for(var e=this.elDef.nodeIndex+1;e<=this.elDef.nodeIndex+this.elDef.childCount;e++){var n=this.elView.def.nodes[e];20224&n.flags&&t.push(n.provider.token),e+=n.childCount}return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){var t={};if(this.elDef){da(this.elView,this.elDef,t);for(var e=this.elDef.nodeIndex+1;e<=this.elDef.nodeIndex+this.elDef.childCount;e++){var n=this.elView.def.nodes[e];20224&n.flags&&da(this.elView,n,t),e+=n.childCount}}return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentRenderElement",{get:function(){var t=function(t){for(;t&&!Yr(t);)t=t.parent;if(t.parent)return wr(t.parent,Gr(t).nodeIndex);return null}(this.elOrCompView);return t?t.renderElement:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderNode",{get:function(){return 2&this.nodeDef.flags?Wr(this.view,this.nodeDef):Wr(this.elView,this.elDef)},enumerable:!0,configurable:!0}),t.prototype.logError=function(t){for(var e,n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];2&this.nodeDef.flags?(e=this.view.def,n=this.nodeDef.nodeIndex):(e=this.elView.def,n=this.elDef.nodeIndex);var o=function(t,e){for(var n=-1,r=0;r<=e;r++){var i=t.nodes[r];3&i.flags&&n++}return n}(e,n),a=-1;e.factory(function(){return++a===o?(e=t.error).bind.apply(e,[t].concat(r)):Dr;var e}),a<o&&(t.error("Illegal state: the ViewDefinitionFactory did not call the logger!"),t.error.apply(t,r))},t}();function da(t,e,n){for(var r in e.references)n[r]=oo(t,e,e.references[r])}function ha(t,e,n,r){var i,o,a=Qo,s=Xo,l=Zo;try{Qo=t;var c=e.apply(n,r);return Xo=s,Zo=l,Qo=a,c}catch(t){if(St(t)||!Xo)throw t;throw i=t,o=fa(),i instanceof Error||(i=new Error(i.toString())),Pr(i,o),i}}function fa(){return Xo?new pa(Xo,Zo):null}var ma=function(){function t(t){this.delegate=t}return t.prototype.createRenderer=function(t,e){return new ga(this.delegate.createRenderer(t,e))},t.prototype.begin=function(){this.delegate.begin&&this.delegate.begin()},t.prototype.end=function(){this.delegate.end&&this.delegate.end()},t.prototype.whenRenderingDone=function(){return this.delegate.whenRenderingDone?this.delegate.whenRenderingDone():Promise.resolve(null)},t}(),ga=function(){function t(t){this.delegate=t,this.data=this.delegate.data}return t.prototype.destroyNode=function(t){var e;e=Fn(t),jn.delete(e.nativeNode),this.delegate.destroyNode&&this.delegate.destroyNode(t)},t.prototype.destroy=function(){this.delegate.destroy()},t.prototype.createElement=function(t,e){var n=this.delegate.createElement(t,e),r=fa();if(r){var i=new Ln(n,null,r);i.name=t,Vn(i)}return n},t.prototype.createComment=function(t){var e=this.delegate.createComment(t),n=fa();return n&&Vn(new Nn(e,null,n)),e},t.prototype.createText=function(t){var e=this.delegate.createText(t),n=fa();return n&&Vn(new Nn(e,null,n)),e},t.prototype.appendChild=function(t,e){var n=Fn(t),r=Fn(e);n&&r&&n instanceof Ln&&n.addChild(r),this.delegate.appendChild(t,e)},t.prototype.insertBefore=function(t,e,n){var r=Fn(t),i=Fn(e),o=Fn(n);r&&i&&r instanceof Ln&&r.insertBefore(o,i),this.delegate.insertBefore(t,e,n)},t.prototype.removeChild=function(t,e){var n=Fn(t),r=Fn(e);n&&r&&n instanceof Ln&&n.removeChild(r),this.delegate.removeChild(t,e)},t.prototype.selectRootElement=function(t){var e=this.delegate.selectRootElement(t),n=fa();return n&&Vn(new Ln(e,null,n)),e},t.prototype.setAttribute=function(t,e,n,r){var i=Fn(t);if(i&&i instanceof Ln){var o=r?r+":"+e:e;i.attributes[o]=n}this.delegate.setAttribute(t,e,n,r)},t.prototype.removeAttribute=function(t,e,n){var r=Fn(t);if(r&&r instanceof Ln){var i=n?n+":"+e:e;r.attributes[i]=null}this.delegate.removeAttribute(t,e,n)},t.prototype.addClass=function(t,e){var n=Fn(t);n&&n instanceof Ln&&(n.classes[e]=!0),this.delegate.addClass(t,e)},t.prototype.removeClass=function(t,e){var n=Fn(t);n&&n instanceof Ln&&(n.classes[e]=!1),this.delegate.removeClass(t,e)},t.prototype.setStyle=function(t,e,n,r){var i=Fn(t);i&&i instanceof Ln&&(i.styles[e]=n),this.delegate.setStyle(t,e,n,r)},t.prototype.removeStyle=function(t,e,n){var r=Fn(t);r&&r instanceof Ln&&(r.styles[e]=null),this.delegate.removeStyle(t,e,n)},t.prototype.setProperty=function(t,e,n){var r=Fn(t);r&&r instanceof Ln&&(r.properties[e]=n),this.delegate.setProperty(t,e,n)},t.prototype.listen=function(t,e,n){if("string"!=typeof t){var r=Fn(t);r&&r.listeners.push(new Rn(e,n))}return this.delegate.listen(t,e,n)},t.prototype.parentNode=function(t){return this.delegate.parentNode(t)},t.prototype.nextSibling=function(t){return this.delegate.nextSibling(t)},t.prototype.setValue=function(t,e){return this.delegate.setValue(t,e)},t}();var ya=function(t){function e(e,n,r){var i=t.call(this)||this;return i.moduleType=e,i._bootstrapComponents=n,i._ngModuleDefFactory=r,i}return l(e,t),e.prototype.create=function(t){Mo();var e=Jr(this._ngModuleDefFactory);return kr.createNgModuleRef(this.moduleType,t||ot.NULL,this._bootstrapComponents,e)},e}(De);function va(t){return"string"==typeof t?'"'+t+'"':""+t}function ba(t,e,n,r){t!=e&&Ca(t,e,n,"==",r)}function _a(t,e){wa(t,null,e)}function wa(t,e,n){t==e&&Ca(t,e,n,"!=")}function Ca(t,e,n,r,i){throw void 0===i&&(i=va),new Error("ASSERT: expected "+n+" "+r+" "+i(e)+" but was "+i(t)+"!")}function xa(t,e){wa(t,null,"node"),ba(3&t.flags,e,"Node.type",Sa)}function Sa(t){return 1==t?"Projection":0==t?"Container":2==t?"View":3==t?"Element":"??? "+t+" ???"}function Ea(t,e,n,r){ngDevMode&&xa(t,0),ngDevMode&&xa(e,2);var i=function(t){for(var e=t;e;){ngDevMode&&xa(e,0);var n=e.data.renderParent;if(null!==n)return n.native;var r=e.parent;if(ngDevMode&&_a(r,"container.parent"),3==(3&r.flags))return null;ngDevMode&&xa(r,2),e=r.parent}return null}(t),o=e.child;if(i)for(;o;){var a=3&o.flags,s=null,l=t.view.renderer,c=l.listen;if(3===a)n?c?l.insertBefore(i,o.native,r):i.insertBefore(o.native,r,!0):c?l.removeChild(i,o.native):i.removeChild(o.native),s=o.next;else if(0===a){var u=o.data;n?c?l.appendChild(i,o.native):i.appendChild(o.native):c?l.removeChild(i,o.native):i.removeChild(o.native),s=u.views.length?u.views[0].child:null}else s=1===a?o.data[0]:o.child;if(null===s){for(;o&&!o.next;)(o=o.parent)===e&&(o=null);o=o&&o.next}else o=s}}function ka(t,e){var n=t.data.views,r=n[e];return e>0&&Oa(n[e-1],r.next),n.splice(e,1),function(t){for(var e=t;e;){var n=null;if(e.views&&e.views.length?n=e.views[0].data:e.child?n=e.child:e.next&&(Aa(e),n=e.next),null==n){for(;e&&!e.next;)Aa(e),e=Pa(e,t);Aa(e||t),n=e&&e.next}e=n}}(r.data),Ea(t,r,!1),t.query&&t.query.removeView(t,r,e),r}function Oa(t,e){t.next=e,t.data.next=e?e.data:null}function Pa(t,e){var n;return(n=t.node)&&2==(3&n.flags)?n.parent.data:t.parent===e?null:t.parent}function Aa(t){if(t.cleanup){for(var e=t.cleanup,n=0;n<e.length-1;n+=2)"string"==typeof e[n]?(e[n+1].removeEventListener(e[n],e[n+2],e[n+3]),n+=2):e[n].call(e[n+1]);t.cleanup=null}}function Da(t,e,n){if(null!==e&&3==(3&t.flags)&&(t.view!==n||null===t.data)){var r=n.renderer;return r.listen?r.appendChild(t.native,e):t.native.appendChild(e),!0}return!1}function Ta(t){return"function"==typeof t?t.name||t:"string"==typeof t?t:null==t?"":""+t}"undefined"==typeof ngDevMode&&("undefined"!=typeof window&&(window.ngDevMode=!0),"undefined"!=typeof self&&(self.ngDevMode=!0),void 0!==r&&(r.ngDevMode=!0));!function(){function t(){this.dirty=!1,this._valuesTree=null,this._values=null}Object.defineProperty(t.prototype,"length",{get:function(){return ngDevMode&&_a(this._values,"refreshed"),this._values.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"first",{get:function(){ngDevMode&&_a(this._values,"refreshed");var t=this._values;return t.length?t[0]:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){ngDevMode&&_a(this._values,"refreshed");var t=this._values;return t.length?t[t.length-1]:null},enumerable:!0,configurable:!0}),t.prototype._refresh=function(){return null===this._values&&(this._values=this._valuesTree,!0)},t.prototype.map=function(t){throw new Error("Method not implemented.")},t.prototype.filter=function(t){throw new Error("Method not implemented.")},t.prototype.find=function(t){throw new Error("Method not implemented.")},t.prototype.reduce=function(t,e){throw new Error("Method not implemented.")},t.prototype.forEach=function(t){throw new Error("Method not implemented.")},t.prototype.some=function(t){throw new Error("Method not implemented.")},t.prototype.toArray=function(){return ngDevMode&&_a(this._values,"refreshed"),this._values},t.prototype.toString=function(){throw new Error("Method not implemented.")},t.prototype.reset=function(t){throw new Error("Method not implemented.")},t.prototype.notifyOnChanges=function(){throw new Error("Method not implemented.")},t.prototype.setDirty=function(){throw new Error("Method not implemented.")},t.prototype.destroy=function(){throw new Error("Method not implemented.")}}();var Ma={Important:1,DashCase:2};Ma[Ma.Important]="Important",Ma[Ma.DashCase]="DashCase";var Ia,Ra,Na,La,ja,Fa,Va,Ba,Ua,Ha,za,Ga={createRenderer:function(t,e){return document}},Wa="__ngHostLNode__";function qa(t,e){var n=Fa;return Ua=t.data,Ha=t.bindingStartIndex||0,ja=t.ngStaticData,Ba=t.creationMode,za=t.viewHookStartIndex,t.cleanup,Ia=t.renderer,null!=e&&(Na=e,La=!0),Fa=t,n}function Ya(t){!function(){if(null==za)return;var t=za,e=t;for(;t<Ua.length;)Ua[t+1].call(Ua[t+2]),16===Ua[t]&&(e<t&&(Ua[e]=Ua[t],Ua[e+1]=Ua[t+1],Ua[e+2]=Ua[t+2]),e+=3),t+=3;Ua.length=e}(),qa(t,null)}function $a(t,e,n){return{parent:Fa,id:t,node:null,data:[],ngStaticData:n,cleanup:null,renderer:e,child:null,tail:null,next:null,bindingStartIndex:null,creationMode:!0,viewHookStartIndex:null}}function Ka(t,e,n,r){var i=La?Na:Na&&Na.parent,o=(La?Va:Na&&Na.query)||i&&i.query&&i.query.child(),a=null!=r,s={flags:e,native:n,view:Fa,parent:i,child:null,next:null,nodeInjector:i?i.nodeInjector:null,data:a?r:null,query:o,staticData:null};return 2==(2&e)&&a&&(ngDevMode&&ba(r.node,null,"viewState.node"),r.node=s),null!=t&&(ngDevMode&&ba(Ua.length,t,"data.length not in sequence"),Ua[t]=s,t>=ja.length?ja[t]=null:s.staticData=ja[t],La?(Va=null,Na.view!==Fa&&2!=(3&Na.flags)||(ngDevMode&&ba(Na.child,null,"previousNode.child"),Na.child=s)):Na&&(ngDevMode&&ba(Na.next,null,"previousNode.next"),Na.next=s)),Na=s,La=!0,s}function Qa(t){return t.ngStaticData||(t.ngStaticData=[])}function Xa(t,e){return new Error("Renderer: "+t+" ["+Ta(e)+"]")}function Za(t,e){La=!1,Na=null,Ka(0,3,t,$a(-1,Ia,Qa(e.template)))}function Ja(t,e,n,r){return{tagName:t,attrs:e,localNames:r?[r,-1]:null,initialInputs:void 0,inputs:void 0,outputs:void 0,containerStatic:n}}function ts(t,e){ngDevMode&&ba(Fa.bindingStartIndex,null,"bindingStartIndex");var n=null!=e?Ia.createText?Ia.createText(Ta(e)):Ia.createTextNode(Ta(e)):null,r=Ka(t,3,n);La=!1,Da(r.parent,n,Fa)}function es(t,e,n,r){var i;if(null==e)ngDevMode&&ss(t),i=Ua[t];else{ngDevMode&&ba(Fa.bindingStartIndex,null,"bindingStartIndex"),ngDevMode&&ba(La,!0,"isParent");var o=Na.flags;if(0===(4092&o)?o=t<<12|4|3&o:o+=4,Na.flags=o,ngDevMode&&ss(t-1),Object.defineProperty(e,Wa,{enumerable:!1,value:Na}),Ua[t]=i=e,t>=ja.length&&(ja[t]=n,r)){ngDevMode&&_a(Na.staticData,"previousOrParentNode.staticData");var a=Na.staticData;(a.localNames||(a.localNames=[])).push(r,t)}var s=n.diPublic;s&&s(n);var l=Na.staticData;l&&l.attrs&&function(t,e,n){var r=((4092&Na.flags)>>2)-1,i=n.initialInputs;(void 0===i||r>=i.length)&&(i=function(t,e,n){var r=n.initialInputs||(n.initialInputs=[]);r[t]=null;for(var i=n.attrs,o=0;o<i.length;o+=2){var a=i[o],s=e[a];if(void 0!==s){var l=r[t]||(r[t]=[]);l.push(s,i[1|o])}}return r}(r,e,n));var o=i[r];if(o)for(var a=0;a<o.length;a+=2)t[o[a]]=o[1|a]}(i,n.inputs,l)}return i}Fa=$a(null,null,[]);var ns=function(t,e,n){ngDevMode&&ss(e);var r=Ua[e];ngDevMode&&xa(r,3),ngDevMode&&wa(r.data,null,"isComponent"),ngDevMode&&ss(t);var i=r.data;ngDevMode&&wa(i,null,"hostView");var o=Ua[t],a=qa(i,r);try{n(o,Ba)}finally{i.creationMode=!1,Ya(a)}};function rs(t){return Fa.tail?Fa.tail.next=t:Fa.child=t,Fa.tail=t,t}var is={};function os(t){var e,n,r;return(e=Ba)?("number"!=typeof Fa.bindingStartIndex&&(Ha=Fa.bindingStartIndex=Ua.length),Ua[Ha++]=t):((e=t!==is&&(n=Ua[Ha],r=t,!(n!=n&&r!=r)&&n!==r))&&(Ua[Ha]=t),Ha++),e?t:is}function as(){wa(Na.parent,null,"isParent")}function ss(t,e){var n,r,i;null==e&&(e=Ua),n=e?e.length:0,i="data.length",n<(r=t)&&Ca(n,r,i,">")}function ls(t){ngDevMode&&_a(t,"component");var e=t[Wa];ngDevMode&&!e&&Xa("Not a directive instance",t),ngDevMode&&_a(e.data,"hostNode.data"),function(t,e,n,r){var i=qa(e,t);try{Ra.begin&&Ra.begin(),r?(ja=r.ngStaticData||(r.ngStaticData=[]),r(n,Ba)):n.constructor.ngComponentDef.r(1,0)}finally{Ra.end&&Ra.end(),e.creationMode=!1,Ya(i)}}(e,e.view,t),!1}var cs={};function us(){}function ps(t){if(null==t)return cs;var e={};for(var n in t)e[t[n]]=n;return e}function ds(t,e){return{type:7,name:t,definitions:e,options:{}}}function hs(t,e){return void 0===e&&(e=null),{type:4,styles:e,timings:t}}function fs(t,e){return void 0===e&&(e=null),{type:3,steps:t,options:e}}function ms(t,e){return void 0===e&&(e=null),{type:2,steps:t,options:e}}function gs(t){return{type:6,styles:t,offset:null}}function ys(t,e,n){return{type:0,name:t,styles:e,options:n}}function vs(t){return{type:5,steps:t}}function bs(t,e,n){return void 0===n&&(n=null),{type:1,expr:t,animation:e,options:n}}t.createPlatform=an,t.assertPlatform=ln,t.destroyPlatform=function(){Ze&&!Ze.destroyed&&Ze.destroy()},t.getPlatform=cn,t.PlatformRef=un,t.ApplicationRef=dn,t.enableProdMode=function(){if(en)throw new Error("Cannot enable prod mode after platform setup.");tn=!1},t.isDevMode=rn,t.createPlatformFactory=sn,t.NgProbeToken=on,t.APP_ID=oe,t.PACKAGE_ROOT_URL=de,t.PLATFORM_INITIALIZER=ce,t.PLATFORM_ID=ue,t.APP_BOOTSTRAP_LISTENER=pe,t.APP_INITIALIZER=re,t.ApplicationInitStatus=ie,t.DebugElement=Ln,t.DebugNode=Nn,t.asNativeElements=function(t){return t.map(function(t){return t.nativeElement})},t.getDebugNode=Fn,t.Testability=Qe,t.TestabilityRegistry=Xe,t.setTestabilityGetter=function(t){Je=t},t.TRANSLATIONS=cr,t.TRANSLATIONS_FORMAT=ur,t.LOCALE_ID=lr,t.MissingTranslationStrategy=pr,t.ApplicationModule=mr,t.wtfCreateScope=Fe,t.wtfLeave=Ve,t.wtfStartTimeRange=Be,t.wtfEndTimeRange=Ue,t.Type=Rt,t.EventEmitter=He,t.ErrorHandler=Ot,t.Sanitizer=yr,t.SecurityContext=gr,t.ANALYZE_FOR_ENTRY_COMPONENTS=v,t.Attribute=b,t.ContentChild=C,t.ContentChildren=w,t.Query=_,t.ViewChild=S,t.ViewChildren=x,t.Component=P,t.Directive=O,t.HostBinding=M,t.HostListener=I,t.Input=D,t.Output=T,t.Pipe=A,t.CUSTOM_ELEMENTS_SCHEMA={name:"custom-elements"},t.NO_ERRORS_SCHEMA={name:"no-errors-schema"},t.NgModule=R,t.ViewEncapsulation=N,t.Version=L,t.VERSION=j,t.forwardRef=J,t.resolveForwardRef=tt,t.Injector=ot,t.ReflectiveInjector=te,t.ResolvedReflectiveFactory=qt,t.ReflectiveKey=Mt,t.InjectionToken=u,t.Inject=F,t.Optional=V,t.Injectable=B,t.Self=U,t.SkipSelf=H,t.Host=z,t.NgZone=ze,t.RenderComponentType=fn,t.Renderer=gn,t.Renderer2=_n,t.RendererFactory2=vn,t.RendererStyleFlags2=bn,t.RootRenderer=yn,t.COMPILER_OPTIONS=ye,t.Compiler=ge,t.CompilerFactory=ve,t.ModuleWithComponentFactories=fe,t.ComponentFactory=_e,t.ComponentRef=be,t.ComponentFactoryResolver=ke,t.ElementRef=wn,t.NgModuleFactory=De,t.NgModuleRef=Ae,t.NgModuleFactoryLoader=Cn,t.getModuleFactory=function(t){var e=xn.get(t);if(!e)throw new Error("No module with ID "+t+" loaded");return e},t.QueryList=Sn,t.SystemJsNgModuleLoader=On,t.SystemJsNgModuleLoaderConfig=En,t.TemplateRef=An,t.ViewContainerRef=Dn,t.EmbeddedViewRef=In,t.ViewRef=Mn,t.ChangeDetectionStrategy=E,t.ChangeDetectorRef=Tn,t.DefaultIterableDiffer=Yn,t.IterableDiffers=er,t.KeyValueDiffers=nr,t.SimpleChange=Hn,t.WrappedValue=Un,t.platformCore=sr,t.ɵALLOW_MULTIPLE_PLATFORMS=nn,t.ɵAPP_ID_RANDOM_PROVIDER=se,t.ɵdevModeEqual=Bn,t.ɵisListLikeIterable=zn,t.ɵChangeDetectorStatus=k,t.ɵisDefaultChangeDetectionStrategy=function(t){return null==t||t===E.Default},t.ɵConsole=he,t.ɵComponentFactory=_e,t.ɵCodegenComponentFactoryResolver=Oe,t.ɵReflectionCapabilities=Vt,t.ɵRenderDebugInfo=mn,t.ɵglobal=q,t.ɵlooseIdentical=X,t.ɵstringify=Z,t.ɵmakeDecorator=f,t.ɵisObservable=function(t){return!!t&&"function"==typeof t.subscribe},t.ɵisPromise=ne,t.ɵclearOverrides=function(){return Mo(),kr.clearOverrides()},t.ɵoverrideComponentView=function(t,e){return Mo(),kr.overrideComponentView(t,e)},t.ɵoverrideProvider=function(t){return Mo(),kr.overrideProvider(t)},t.ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR=Ki,t.ɵdefineComponent=function(t){var e={type:t.type,diPublic:null,n:t.factory,tag:t.tag||null,template:t.template||null,r:t.refresh||function(e,n){ns(e,n,t.template)},h:t.hostBindings||us,inputs:ps(t.inputs),outputs:ps(t.outputs),methods:ps(t.methods),rendererType:Lr(t.rendererType)||null},n=t.features;return n&&n.forEach(function(t){return t(e)}),e},t.ɵdetectChanges=ls,t.ɵrenderComponent=function(t,e){void 0===e&&(e={});var n,r=e.rendererFactory||Ga,i=t.ngComponentDef,o=function(t,e){ngDevMode&&ss(-1),Ra=t;var n=t.createRenderer(null,null),r="string"==typeof e?n.selectRootElement?n.selectRootElement(e):n.querySelector(e):e;if(ngDevMode&&!r)throw Xa("string"==typeof e?"Host node with selector not found:":"Host node is required:",e);return r}(r,e.host||i.tag),a=qa($a(-1,r.createRenderer(o,i.rendererType),[]),null);try{Za(o,i),n=es(1,i.n(),i)}finally{Ya(a)}return e.features&&e.features.forEach(function(t){return t(n,i)}),ls(n),n},t.ɵC=function(t,e,n,r,i){ngDevMode&&ba(Fa.bindingStartIndex,null,"bindingStartIndex");var o=Ia.createComment(ngDevMode?"container":""),a=null,s=La?Na:Na.parent;ngDevMode&&wa(s,null,"currentParent"),Da(s,o,Fa)&&(a=s);var l=Ka(t,0,o,{views:[],nextIndex:0,renderParent:a,template:null==e?null:e,next:null,parent:Fa});null==l.staticData&&(l.staticData=ja[t]=Ja(n||null,r||null,[],i||null)),rs(l.data)},t.ɵD=es,t.ɵE=function(t,e,n,r){var i,o;if(null==e){var a=Ua[t];o=a&&a.native}else{ngDevMode&&ba(Fa.bindingStartIndex,null,"bindingStartIndex");var s="string"!=typeof e,l=s?e.tag:e;if(null===l)throw"for now name is required";o=Ia.createElement(l);var c=null;if(s){var u=Qa(e.template);c=rs($a(-1,Ra.createRenderer(o,e.rendererType),u))}null==(i=Ka(t,3,o,c)).staticData&&(ngDevMode&&ss(t-1),i.staticData=ja[t]=Ja(l,n||null,null,r||null)),n&&function(t,e){ngDevMode&&ba(e.length%2,0,"attrs.length % 2");for(var n=Ia.setAttribute,r=0;r<e.length;r+=2)n?Ia.setAttribute(t,e[r],e[1|r]):t.setAttribute(e[r],e[1|r])}(o,n),Da(i.parent,o,Fa)}return o},t.ɵT=ts,t.ɵV=function(t){var e=La?Na:Na.parent;ngDevMode&&xa(e,0);var n=e.data,r=n.views,i=!Ba&&n.nextIndex<r.length&&r[n.nextIndex],o=i&&t===i.data.id;if(o)Na=r[n.nextIndex++],ngDevMode&&xa(Na,2),La=!0,qa(i.data,Na);else{var a=$a(t,Ia,function(t,e){ngDevMode&&xa(e,0);var n=e.staticData.containerStatic;return(t>=n.length||null==n[t])&&(n[t]=[]),n[t]}(t,e));qa(a,Ka(null,2,null,a)),n.nextIndex++}return!o},t.ɵb=os,t.ɵb1=function(t,e,n){return os(e)===is?is:t+Ta(e)+n},t.ɵc=function(){La?La=!1:(ngDevMode&&as(),Na=Na.parent),ngDevMode&&xa(Na,0);var t=Na.query;t&&t.addNode(Na)},t.ɵcR=function(t){ngDevMode&&ss(t),Na=Ua[t],ngDevMode&&xa(Na,0),La=!0,Na.data.nextIndex=0},t.ɵcr=function(){La?La=!1:(ngDevMode&&xa(Na,2),ngDevMode&&as(),Na=Na.parent),ngDevMode&&xa(Na,0);var t=Na;ngDevMode&&xa(t,0);for(var e=t.data.nextIndex;e<t.data.views.length;)ka(t,e)},t.ɵe=function(){La?La=!1:(ngDevMode&&as(),Na=Na.parent),ngDevMode&&xa(Na,3);var t=Na.query;t&&t.addNode(Na)},t.ɵp=function(t,e,n){if(n!==is){var r=Ua[t],i=r.staticData;void 0===i.inputs&&(i.inputs=null,i=function(t,e,n){void 0===n&&(n=!1);for(var r=t>>12,i=r,o=r+((4092&t)>>2);i<o;i++){var a=ja[i],s=n?a.inputs:a.outputs;for(var l in s)if(s.hasOwnProperty(l)){var c=s[l],u=n?e.inputs||(e.inputs={}):e.outputs||(e.outputs={}),p=u.hasOwnProperty(l);p?u[l].push(i,c):u[l]=[i,c]}}return e}(r.flags,i,!0));var o,a=i.inputs;if(a&&(o=a[e]))!function(t,e){for(var n=0;n<t.length;n+=2)ngDevMode&&ss(t[n]),Ua[t[n]][t[1|n]]=e}(o,n);else{var s=r.native;Ia.setProperty?Ia.setProperty(s,e,n):s.setProperty?s.setProperty(e,n):s[e]=n}}},t.ɵs=function(t,e,n,r){if(n!==is){var i=Ua[t];null==n?Ia.removeStyle?Ia.removeStyle(i.native,e,Ma.DashCase):i.native.style.removeProperty(e):Ia.setStyle?Ia.setStyle(i.native,e,r?Ta(n)+r:Ta(n),Ma.DashCase):i.native.style.setProperty(e,r?Ta(n)+r:Ta(n))}},t.ɵt=function(t,e){var n=t<Ua.length&&Ua[t];n&&n.native?e!==is&&(Ia.setValue?Ia.setValue(n.native,Ta(e)):n.native.textContent=Ta(e)):n?(n.native=Ia.createText?Ia.createText(Ta(e)):Ia.createTextNode(Ta(e)),function(t,e){var n=t.parent;if(3==(3&n.flags)&&(n.view!==e||null===n.data)){for(var r=t.next,i=null;r&&null===(i=r.native);)r=r.next;var o=e.renderer;o.listen?o.insertBefore(n.native,t.native,i):n.native.insertBefore(t.native,i,!1)}}(n,Fa)):ts(t,e)},t.ɵv=function(){La=!1;var t=Na=Fa.node,e=Na.parent;ngDevMode&&xa(t,2),ngDevMode&&xa(e,0);var n,r,i,o,a,s,l,c,u,p=e.data,d=p.nextIndex<=p.views.length?p.views[p.nextIndex-1]:null;(null==d||d.data.id!==t.data.id)&&(n=e,r=t,i=p.nextIndex-1,c=n.data,u=c.views,i>0&&Oa(u[i-1],r),i<u.length&&u[i].data.id!==r.data.id?(Oa(r,u[i]),u.splice(i,0,r)):i>=u.length&&u.push(r),c.nextIndex<=i&&c.nextIndex++,null!==n.data.renderParent&&Ea(n,r,!0,(o=i,a=c,s=n.native,l=a.views,o+1<l.length?l[o+1].child.native:s)),n.query&&n.query.insertView(n,r,i),Fa.creationMode=!1),Ya(Fa.parent),ngDevMode&&ba(La,!1,"isParent"),ngDevMode&&xa(Na,2)},t.ɵregisterModuleFactory=function(t,e){var n=xn.get(t);if(n)throw new Error("Duplicate module registered for "+t+" - "+n.moduleType.name+" vs "+e.moduleType.name);xn.set(t,e)},t.ɵEMPTY_ARRAY=[],t.ɵEMPTY_MAP={},t.ɵand=function(t,e,n,r,i,o){t|=1;var a=Kr(e),s=a.matchedQueries,l=a.references;return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:t,checkIndex:-1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:s,matchedQueryIds:a.matchedQueryIds,references:l,ngContentIndex:n,childCount:r,bindings:[],bindingFlags:0,outputs:[],element:{ns:null,name:null,attrs:null,template:o?Jr(o):null,componentProvider:null,componentView:null,componentRendererType:null,publicProviders:null,allProviders:null,handleEvent:i||Dr},provider:null,text:null,query:null,ngContent:null}},t.ɵccf=function(t,e,n,r,i,o){return new ki(t,e,n,r,i,o)},t.ɵcmf=function(t,e,n){return new ya(t,e,n)},t.ɵcrt=function(t){return{id:Ir,styles:t.styles,encapsulation:t.encapsulation,data:t.data}},t.ɵdid=function(t,e,n,r,i,o,a,s){var l=[];if(a)for(var c in a){var u=a[c],p=u[0],d=u[1];l[p]={flags:8,name:c,nonMinifiedName:d,ns:null,securityContext:null,suffix:null}}var h=[];if(s)for(var f in s)h.push({type:1,propName:f,target:null,eventName:s[f]});return zi(t,e|=16384,n,r,i,i,o,l,h)},t.ɵeld=function(t,e,n,r,i,o,a,s,l,c,u,p){void 0===a&&(a=[]),c||(c=Dr);var d=Kr(n),h=d.matchedQueries,f=d.references,m=d.matchedQueryIds,g=null,y=null;o&&(g=(I=ai(o))[0],y=I[1]),s=s||[];for(var v=new Array(s.length),b=0;b<s.length;b++){var _=s[b],w=_[0],C=_[1],x=_[2],S=ai(C),E=S[0],k=S[1],O=void 0,P=void 0;switch(15&w){case 4:P=x;break;case 1:case 8:O=x}v[b]={flags:w,ns:E,name:k,nonMinifiedName:k,securityContext:O,suffix:P}}l=l||[];var A=new Array(l.length);for(b=0;b<l.length;b++){var D=l[b],T=D[0],M=D[1];A[b]={type:0,target:T,eventName:M,propName:null}}var I,R=(a=a||[]).map(function(t){var e=t[0],n=t[1],r=ai(e);return[r[0],r[1],n]});return p=Lr(p),u&&(e|=33554432),{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:e|=1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:h,matchedQueryIds:m,references:f,ngContentIndex:r,childCount:i,bindings:v,bindingFlags:si(v),outputs:A,element:{ns:g,name:y,attrs:R,template:null,componentProvider:null,componentView:u||null,componentRendererType:p,publicProviders:null,allProviders:null,handleEvent:c||Dr},provider:null,text:null,query:null,ngContent:null}},t.ɵelementEventFullName=qr,t.ɵgetComponentViewDefinitionFactory=Ei,t.ɵinlineInterpolate=function(t,e,n,r,i,o,a,s,l,c,u,p,d,h,f,m,g,y,v,b){switch(t){case 1:return e+li(n)+r;case 2:return e+li(n)+r+li(i)+o;case 3:return e+li(n)+r+li(i)+o+li(a)+s;case 4:return e+li(n)+r+li(i)+o+li(a)+s+li(l)+c;case 5:return e+li(n)+r+li(i)+o+li(a)+s+li(l)+c+li(u)+p;case 6:return e+li(n)+r+li(i)+o+li(a)+s+li(l)+c+li(u)+p+li(d)+h;case 7:return e+li(n)+r+li(i)+o+li(a)+s+li(l)+c+li(u)+p+li(d)+h+li(f)+m;case 8:return e+li(n)+r+li(i)+o+li(a)+s+li(l)+c+li(u)+p+li(d)+h+li(f)+m+li(g)+y;case 9:return e+li(n)+r+li(i)+o+li(a)+s+li(l)+c+li(u)+p+li(d)+h+li(f)+m+li(g)+y+li(v)+b;default:throw new Error("Does not support more than 9 expressions")}},t.ɵinterpolate=function(t,e){for(var n="",r=0;r<2*t;r+=2)n=n+e[r]+li(e[r+1]);return n+e[2*t]},t.ɵmod=function(t){for(var e={},n=0;n<t.length;n++){var r=t[n];r.index=n,e[Mr(r.token)]=r}return{factory:null,providersByKey:e,providers:t}},t.ɵmpd=function(t,e,n,r){return n=tt(n),{index:-1,deps:Qr(r,Z(e)),flags:t,token:e,value:n}},t.ɵncd=function(t,e){return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:-1,flags:8,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:t,childCount:0,bindings:[],bindingFlags:0,outputs:[],element:null,provider:null,text:null,query:null,ngContent:{index:e}}},t.ɵnov=function(t,e){var n=t.def.nodes[e];if(1&n.flags){var r=wr(t,n.nodeIndex);return n.element.template?r.template:r.renderElement}if(2&n.flags)return _r(t,n.nodeIndex).renderText;if(20240&n.flags)return Cr(t,n.nodeIndex).instance;throw new Error("Illegal state: read nodeValue for node index "+e)},t.ɵpid=function(t,e,n){return zi(-1,t|=16,null,0,e,e,n)},t.ɵprd=function(t,e,n,r,i){return zi(-1,t,e,0,n,r,i)},t.ɵpad=function(t,e){return ao(32,t,new Array(e))},t.ɵpod=function(t,e){for(var n=Object.keys(e),r=n.length,i=new Array(r),o=0;o<r;o++){var a=n[o];i[e[a]]=a}return ao(64,t,i)},t.ɵppd=function(t,e){return ao(128,t,new Array(e+1))},t.ɵqud=function(t,e,n){var r=[];for(var i in n){var o=n[i];r.push({propName:i,bindingType:o})}return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:-1,flags:t,childFlags:0,directChildFlags:0,childMatchedQueries:0,ngContentIndex:-1,matchedQueries:{},matchedQueryIds:0,references:{},childCount:0,bindings:[],bindingFlags:0,outputs:[],element:null,provider:null,text:null,query:{id:e,filterId:$r(e),bindings:r},ngContent:null}},t.ɵted=function(t,e,n){for(var r=new Array(n.length-1),i=1;i<n.length;i++)r[i-1]={flags:8,name:null,ns:null,nonMinifiedName:null,securityContext:null,suffix:n[i]};return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:2,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:e,childCount:0,bindings:r,bindingFlags:8,outputs:[],element:null,provider:null,text:{prefix:n[0]},query:null,ngContent:null}},t.ɵunv=function(t,e,n,r){if(Un.isWrapped(r)){r=Un.unwrap(r);var i=t.def.nodes[e].bindingIndex+n,o=Un.unwrap(t.oldValues[i]);t.oldValues[i]=new Un(o)}return r},t.ɵvid=function(t,e,n,r){for(var i=0,o=0,a=0,s=0,l=0,c=null,u=null,p=!1,d=!1,h=null,f=0;f<e.length;f++){var m=e[f];if(m.nodeIndex=f,m.parent=c,m.bindingIndex=i,m.outputIndex=o,m.renderParent=u,a|=m.flags,l|=m.matchedQueryIds,m.element){var g=m.element;g.publicProviders=c?c.element.publicProviders:Object.create(null),g.allProviders=g.publicProviders,p=!1,d=!1,m.element.template&&(l|=m.element.template.nodeMatchedQueries)}if(uo(c,m,e.length),i+=m.bindings.length,o+=m.outputs.length,!u&&3&m.flags&&(h=m),20224&m.flags){p||(p=!0,c.element.publicProviders=Object.create(c.element.publicProviders),c.element.allProviders=c.element.publicProviders);var y=0!=(8192&m.flags),v=0!=(32768&m.flags);!y||v?c.element.publicProviders[Mr(m.provider.token)]=m:(d||(d=!0,c.element.allProviders=Object.create(c.element.publicProviders)),c.element.allProviders[Mr(m.provider.token)]=m),v&&(c.element.componentProvider=m)}if(c?(c.childFlags|=m.flags,c.directChildFlags|=m.flags,c.childMatchedQueries|=m.matchedQueryIds,m.element&&m.element.template&&(c.childMatchedQueries|=m.element.template.nodeMatchedQueries)):s|=m.flags,m.childCount>0)c=m,co(m)||(u=m);else for(;c&&f===c.nodeIndex+c.childCount;){var b=c.parent;b&&(b.childFlags|=c.childFlags,b.childMatchedQueries|=c.childMatchedQueries),u=(c=b)&&co(c)?c.renderParent:c}}return{factory:null,nodeFlags:a,rootNodeFlags:s,nodeMatchedQueries:l,flags:t,nodes:e,updateDirectives:n||Dr,updateRenderer:r||Dr,handleEvent:function(t,n,r,i){return e[n].element.handleEvent(t,r,i)},bindingCount:i,outputCount:o,lastRenderRootNode:h}},t.AUTO_STYLE="*",t.trigger=function(t,e){return ds(t,e)},t.animate=function(t,e){return hs(t,e)},t.group=function(t){return fs(t)},t.sequence=function(t){return ms(t)},t.style=function(t){return gs(t)},t.state=function(t,e){return ys(t,e)},t.keyframes=function(t){return vs(t)},t.transition=function(t,e){return bs(t,e)},t.ɵbf=hs,t.ɵbg=fs,t.ɵbk=vs,t.ɵbh=ms,t.ɵbj=ys,t.ɵbi=gs,t.ɵbl=bs,t.ɵbe=ds,t.ɵn=dr,t.ɵo=hr,t.ɵq=fr,t.ɵi=ae,t.ɵj=or,t.ɵk=ar,t.ɵl=Wn,t.ɵm=Zn,t.ɵf=ee,t.ɵg=zt,t.ɵh=Kt,t.ɵr=Le,t.ɵw=Me,t.ɵu=Te,t.ɵz=Ne,t.ɵx=Ie,t.ɵy=Re,t.ɵbc=Ta,t.ɵa=g,t.ɵd=y,t.ɵba=zi,t.ɵbb=Er,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?o(n,t("rxjs/Observable"),t("rxjs/observable/merge"),t("rxjs/operator/share"),t("rxjs/Subject"),t("rxjs/Subscription")):o((i.ng=i.ng||{},i.ng.core={}),i.Rx,i.Rx.Observable,i.Rx.Observable.prototype,i.Rx,i.Rx)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"rxjs/Observable":73,"rxjs/Subject":77,"rxjs/Subscription":80,"rxjs/observable/merge":104,"rxjs/operator/share":119}],63:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i,o){"use strict";var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function s(t,e){function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var l=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},c=function(){function t(){}return Object.defineProperty(t.prototype,"value",{get:function(){return this.control?this.control.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.control?this.control.valid:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"invalid",{get:function(){return this.control?this.control.invalid:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pending",{get:function(){return this.control?this.control.pending:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.control?this.control.disabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return this.control?this.control.enabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return this.control?this.control.errors:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pristine",{get:function(){return this.control?this.control.pristine:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return this.control?this.control.dirty:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"touched",{get:function(){return this.control?this.control.touched:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.control?this.control.status:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"untouched",{get:function(){return this.control?this.control.untouched:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"statusChanges",{get:function(){return this.control?this.control.statusChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valueChanges",{get:function(){return this.control?this.control.valueChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.reset=function(t){void 0===t&&(t=void 0),this.control&&this.control.reset(t)},t.prototype.hasError=function(t,e){return!!this.control&&this.control.hasError(t,e)},t.prototype.getError=function(t,e){return this.control?this.control.getError(t,e):null},t}(),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),Object.defineProperty(e.prototype,"formDirective",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),e}(c);function p(t){return null==t||0===t.length}var d=new e.InjectionToken("NgValidators"),h=new e.InjectionToken("NgAsyncValidators"),f=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,m=function(){function t(){}return t.min=function(t){return function(e){if(p(e.value)||p(t))return null;var n=parseFloat(e.value);return!isNaN(n)&&n<t?{min:{min:t,actual:e.value}}:null}},t.max=function(t){return function(e){if(p(e.value)||p(t))return null;var n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}},t.required=function(t){return p(t.value)?{required:!0}:null},t.requiredTrue=function(t){return!0===t.value?null:{required:!0}},t.email=function(t){return f.test(t.value)?null:{email:!0}},t.minLength=function(t){return function(e){if(p(e.value))return null;var n=e.value?e.value.length:0;return n<t?{minlength:{requiredLength:t,actualLength:n}}:null}},t.maxLength=function(t){return function(e){var n=e.value?e.value.length:0;return n>t?{maxlength:{requiredLength:t,actualLength:n}}:null}},t.pattern=function(e){return e?("string"==typeof e?(r="","^"!==e.charAt(0)&&(r+="^"),r+=e,"$"!==e.charAt(e.length-1)&&(r+="$"),n=new RegExp(r)):(r=e.toString(),n=e),function(t){if(p(t.value))return null;var e=t.value;return n.test(e)?null:{pattern:{requiredPattern:r,actualValue:e}}}):t.nullValidator;var n,r},t.nullValidator=function(t){return null},t.compose=function(t){if(!t)return null;var e=t.filter(g);return 0==e.length?null:function(t){return v((n=t,e.map(function(t){return t(n)})));var n}},t.composeAsync=function(t){if(!t)return null;var e=t.filter(g);return 0==e.length?null:function(t){var r,o,a=(r=t,o=e,o.map(function(t){return t(r)})).map(y);return i.map.call(n.forkJoin(a),v)}},t}();function g(t){return null!=t}function y(t){var n=e.ɵisPromise(t)?r.fromPromise(t):t;if(!e.ɵisObservable(n))throw new Error("Expected validator to return Promise or Observable.");return n}function v(t){var e=t.reduce(function(t,e){return null!=e?l({},t,e):t},{});return 0===Object.keys(e).length?null:e}var b=new e.InjectionToken("NgValueAccessor"),_={provide:b,useExisting:e.forwardRef(function(){return w}),multi:!0},w=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.decorators=[{type:e.Directive,args:[{selector:"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},providers:[_]}]}],t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},t}(),C={provide:b,useExisting:e.forwardRef(function(){return S}),multi:!0};var x=new e.InjectionToken("CompositionEventMode"),S=function(){function t(t,e,n){var r;this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=function(t){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=(r=o.ɵgetDOM()?o.ɵgetDOM().getUserAgent():"",!/android (\d+)/.test(r.toLowerCase())))}return t.prototype.writeValue=function(t){var e=null==t?"":t;this._renderer.setProperty(this._elementRef.nativeElement,"value",e)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._handleInput=function(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)},t.prototype._compositionStart=function(){this._composing=!0},t.prototype._compositionEnd=function(t){this._composing=!1,this._compositionMode&&this.onChange(t)},t.decorators=[{type:e.Directive,args:[{selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]",host:{"(input)":"$any(this)._handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"$any(this)._compositionStart()","(compositionend)":"$any(this)._compositionEnd($event.target.value)"},providers:[C]}]}],t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[x]}]}]},t}();function E(t){return t.validate?function(e){return t.validate(e)}:t}function k(t){return t.validate?function(e){return t.validate(e)}:t}var O={provide:b,useExisting:e.forwardRef(function(){return P}),multi:!0},P=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){var e=null==t?"":t;this._renderer.setProperty(this._elementRef.nativeElement,"value",e)},t.prototype.registerOnChange=function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.decorators=[{type:e.Directive,args:[{selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[O]}]}],t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},t}();function A(){throw new Error("unimplemented")}var D=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._parent=null,e.name=null,e.valueAccessor=null,e._rawValidators=[],e._rawAsyncValidators=[],e}return s(e,t),Object.defineProperty(e.prototype,"validator",{get:function(){return A()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return A()},enumerable:!0,configurable:!0}),e}(c),T={provide:b,useExisting:e.forwardRef(function(){return I}),multi:!0},M=function(){function t(){this._accessors=[]}return t.prototype.add=function(t,e){this._accessors.push([t,e])},t.prototype.remove=function(t){for(var e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)},t.prototype.select=function(t){var e=this;this._accessors.forEach(function(n){e._isSameGroup(n,t)&&n[1]!==t&&n[1].fireUncheck(t.value)})},t.prototype._isSameGroup=function(t,e){return!!t[0].control&&(t[0]._parent===e._control._parent&&t[1].name===e.name)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}(),I=function(){function t(t,e,n,r){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return t.prototype.ngOnInit=function(){this._control=this._injector.get(D),this._checkName(),this._registry.add(this._control,this)},t.prototype.ngOnDestroy=function(){this._registry.remove(this)},t.prototype.writeValue=function(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)},t.prototype.registerOnChange=function(t){var e=this;this._fn=t,this.onChange=function(){t(e.value),e._registry.select(e)}},t.prototype.fireUncheck=function(t){this.writeValue(t)},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._checkName=function(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)},t.prototype._throwNameError=function(){throw new Error('\n      If you define both a name and a formControlName attribute on your radio button, their values\n      must match. Ex: <input type="radio" formControlName="food" name="food">\n    ')},t.decorators=[{type:e.Directive,args:[{selector:"input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]",host:{"(change)":"onChange()","(blur)":"onTouched()"},providers:[T]}]}],t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:M},{type:e.Injector}]},t.propDecorators={name:[{type:e.Input}],formControlName:[{type:e.Input}],value:[{type:e.Input}]},t}(),R={provide:b,useExisting:e.forwardRef(function(){return N}),multi:!0},N=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))},t.prototype.registerOnChange=function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.decorators=[{type:e.Directive,args:[{selector:"input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[R]}]}],t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},t}(),L={provide:b,useExisting:e.forwardRef(function(){return F}),multi:!0};function j(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),(t+": "+e).slice(0,50))}var F=function(){function t(t,n){this._renderer=t,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=e.ɵlooseIdentical}return Object.defineProperty(t.prototype,"compareWith",{set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){this.value=t;var e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=j(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){e.value=e._getOptionValue(n),t(e.value)}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._registerOption=function(){return(this._idCounter++).toString()},t.prototype._getOptionId=function(t){for(var e=0,n=Array.from(this._optionMap.keys());e<n.length;e++){var r=n[e];if(this._compareWith(this._optionMap.get(r),t))return r}return null},t.prototype._getOptionValue=function(t){var e=t.split(":")[0];return this._optionMap.has(e)?this._optionMap.get(e):t},t.decorators=[{type:e.Directive,args:[{selector:"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]",host:{"(change)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[L]}]}],t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},t.propDecorators={compareWith:[{type:e.Input}]},t}(),V=function(){function t(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption())}return Object.defineProperty(t.prototype,"ngValue",{set:function(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(j(this.id,t)),this._select.writeValue(this._select.value))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{set:function(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)},enumerable:!0,configurable:!0}),t.prototype._setElementValue=function(t){this._renderer.setProperty(this._element.nativeElement,"value",t)},t.prototype.ngOnDestroy=function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))},t.decorators=[{type:e.Directive,args:[{selector:"option"}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:F,decorators:[{type:e.Optional},{type:e.Host}]}]},t.propDecorators={ngValue:[{type:e.Input,args:["ngValue"]}],value:[{type:e.Input,args:["value"]}]},t}(),B={provide:b,useExisting:e.forwardRef(function(){return H}),multi:!0};function U(t,e){return null==t?""+e:("string"==typeof e&&(e="'"+e+"'"),e&&"object"==typeof e&&(e="Object"),(t+": "+e).slice(0,50))}var H=function(){function t(t,n){this._renderer=t,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=e.ɵlooseIdentical}return Object.defineProperty(t.prototype,"compareWith",{set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){var e,n=this;if(this.value=t,Array.isArray(t)){var r=t.map(function(t){return n._getOptionId(t)});e=function(t,e){t._setSelected(r.indexOf(e.toString())>-1)}}else e=function(t,e){t._setSelected(!1)};this._optionMap.forEach(e)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){var r=[];if(n.hasOwnProperty("selectedOptions"))for(var i=n.selectedOptions,o=0;o<i.length;o++){var a=i.item(o),s=e._getOptionValue(a.value);r.push(s)}else for(i=n.options,o=0;o<i.length;o++){if((a=i.item(o)).selected){s=e._getOptionValue(a.value);r.push(s)}}e.value=r,t(r)}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._registerOption=function(t){var e=(this._idCounter++).toString();return this._optionMap.set(e,t),e},t.prototype._getOptionId=function(t){for(var e=0,n=Array.from(this._optionMap.keys());e<n.length;e++){var r=n[e];if(this._compareWith(this._optionMap.get(r)._value,t))return r}return null},t.prototype._getOptionValue=function(t){var e=t.split(":")[0];return this._optionMap.has(e)?this._optionMap.get(e)._value:t},t.decorators=[{type:e.Directive,args:[{selector:"select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]",host:{"(change)":"onChange($event.target)","(blur)":"onTouched()"},providers:[B]}]}],t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},t.propDecorators={compareWith:[{type:e.Input}]},t}(),z=function(){function t(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption(this))}return Object.defineProperty(t.prototype,"ngValue",{set:function(t){null!=this._select&&(this._value=t,this._setElementValue(U(this.id,t)),this._select.writeValue(this._select.value))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{set:function(t){this._select?(this._value=t,this._setElementValue(U(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)},enumerable:!0,configurable:!0}),t.prototype._setElementValue=function(t){this._renderer.setProperty(this._element.nativeElement,"value",t)},t.prototype._setSelected=function(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)},t.prototype.ngOnDestroy=function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))},t.decorators=[{type:e.Directive,args:[{selector:"option"}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:H,decorators:[{type:e.Optional},{type:e.Host}]}]},t.propDecorators={ngValue:[{type:e.Input,args:["ngValue"]}],value:[{type:e.Input,args:["value"]}]},t}();function G(t,e){return e.path.concat([t])}function W(t,e){var n,r,i,o,a;t||K(e,"Cannot find control with"),e.valueAccessor||K(e,"No value accessor for form control with"),t.validator=m.compose([t.validator,e.validator]),t.asyncValidator=m.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),n=t,(r=e).valueAccessor.registerOnChange(function(t){n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&q(n,r)}),i=e,t.registerOnChange(function(t,e){i.valueAccessor.writeValue(t),e&&i.viewToModelUpdate(t)}),o=t,(a=e).valueAccessor.registerOnTouched(function(){o._pendingTouched=!0,"blur"===o.updateOn&&o._pendingChange&&q(o,a),"submit"!==o.updateOn&&o.markAsTouched()}),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(function(t){e.valueAccessor.setDisabledState(t)}),e._rawValidators.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(function(){return t.updateValueAndValidity()})}),e._rawAsyncValidators.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(function(){return t.updateValueAndValidity()})})}function q(t,e){e.viewToModelUpdate(t._pendingValue),t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),t._pendingChange=!1}function Y(t,e){null==t&&K(e,"Cannot find control with"),t.validator=m.compose([t.validator,e.validator]),t.asyncValidator=m.composeAsync([t.asyncValidator,e.asyncValidator])}function $(t){return K(t,"There is no FormControl instance attached to form control element with")}function K(t,e){var n;throw n=t.path.length>1?"path: '"+t.path.join(" -> ")+"'":t.path[0]?"name: '"+t.path+"'":"unspecified name attribute",new Error(e+" "+n)}function Q(t){return null!=t?m.compose(t.map(E)):null}function X(t){return null!=t?m.composeAsync(t.map(k)):null}function Z(t,n){if(!t.hasOwnProperty("model"))return!1;var r=t.model;return!!r.isFirstChange()||!e.ɵlooseIdentical(n,r.currentValue)}var J=[w,N,P,F,H,I];function tt(t,e){t._syncPendingControls(),e.forEach(function(t){var e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function et(t,e){if(!e)return null;var n=void 0,r=void 0,i=void 0;return e.forEach(function(e){var o;e.constructor===S?n=e:(o=e,J.some(function(t){return o.constructor===t})?(r&&K(t,"More than one built-in value accessor matches form control with"),r=e):(i&&K(t,"More than one custom value accessor matches form control with"),i=e))}),i||(r||(n||(K(t,"No valid value accessor for form control with"),null)))}function nt(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var rt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormGroup(this)},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormGroup(this)},Object.defineProperty(e.prototype,"control",{get:function(){return this.formDirective.getFormGroup(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return G(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return Q(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return X(this._asyncValidators)},enumerable:!0,configurable:!0}),e.prototype._checkParentType=function(){},e}(u),it=function(){function t(t){this._cd=t}return Object.defineProperty(t.prototype,"ngClassUntouched",{get:function(){return!!this._cd.control&&this._cd.control.untouched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassTouched",{get:function(){return!!this._cd.control&&this._cd.control.touched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassPristine",{get:function(){return!!this._cd.control&&this._cd.control.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassDirty",{get:function(){return!!this._cd.control&&this._cd.control.dirty},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassValid",{get:function(){return!!this._cd.control&&this._cd.control.valid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassInvalid",{get:function(){return!!this._cd.control&&this._cd.control.invalid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassPending",{get:function(){return!!this._cd.control&&this._cd.control.pending},enumerable:!0,configurable:!0}),t}(),ot={"[class.ng-untouched]":"ngClassUntouched","[class.ng-touched]":"ngClassTouched","[class.ng-pristine]":"ngClassPristine","[class.ng-dirty]":"ngClassDirty","[class.ng-valid]":"ngClassValid","[class.ng-invalid]":"ngClassInvalid","[class.ng-pending]":"ngClassPending"},at=function(t){function n(e){return t.call(this,e)||this}return s(n,t),n.decorators=[{type:e.Directive,args:[{selector:"[formControlName],[ngModel],[formControl]",host:ot}]}],n.ctorParameters=function(){return[{type:D,decorators:[{type:e.Self}]}]},n}(it),st=function(t){function n(e){return t.call(this,e)||this}return s(n,t),n.decorators=[{type:e.Directive,args:[{selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]",host:ot}]}],n.ctorParameters=function(){return[{type:u,decorators:[{type:e.Self}]}]},n}(it),lt="VALID",ct="INVALID",ut="PENDING",pt="DISABLED";function dt(t){var e=ft(t)?t.validators:t;return Array.isArray(e)?Q(e):e||null}function ht(t,e){var n=ft(e)?e.asyncValidators:t;return Array.isArray(n)?X(n):n||null}function ft(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}var mt=function(){function t(t,e){this.validator=t,this.asyncValidator=e,this._onCollectionChange=function(){},this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}return Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.status===lt},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"invalid",{get:function(){return this.status===ct},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pending",{get:function(){return this.status==ut},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.status===pt},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return this.status!==pt},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return!this.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"untouched",{get:function(){return!this.touched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"updateOn",{get:function(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"},enumerable:!0,configurable:!0}),t.prototype.setValidators=function(t){this.validator=dt(t)},t.prototype.setAsyncValidators=function(t){this.asyncValidator=ht(t)},t.prototype.clearValidators=function(){this.validator=null},t.prototype.clearAsyncValidators=function(){this.asyncValidator=null},t.prototype.markAsTouched=function(t){void 0===t&&(t={}),this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)},t.prototype.markAsUntouched=function(t){void 0===t&&(t={}),this.touched=!1,this._pendingTouched=!1,this._forEachChild(function(t){t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)},t.prototype.markAsDirty=function(t){void 0===t&&(t={}),this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)},t.prototype.markAsPristine=function(t){void 0===t&&(t={}),this.pristine=!0,this._pendingDirty=!1,this._forEachChild(function(t){t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)},t.prototype.markAsPending=function(t){void 0===t&&(t={}),this.status=ut,this._parent&&!t.onlySelf&&this._parent.markAsPending(t)},t.prototype.disable=function(t){void 0===t&&(t={}),this.status=pt,this.errors=null,this._forEachChild(function(e){e.disable(l({},t,{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(t),this._onDisabledChange.forEach(function(t){return t(!0)})},t.prototype.enable=function(t){void 0===t&&(t={}),this.status=lt,this._forEachChild(function(e){e.enable(l({},t,{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(t),this._onDisabledChange.forEach(function(t){return t(!1)})},t.prototype._updateAncestors=function(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),this._parent._updatePristine(),this._parent._updateTouched())},t.prototype.setParent=function(t){this._parent=t},t.prototype.updateValueAndValidity=function(t){void 0===t&&(t={}),this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),this.status!==lt&&this.status!==ut||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)},t.prototype._updateTreeValidity=function(t){void 0===t&&(t={emitEvent:!0}),this._forEachChild(function(e){return e._updateTreeValidity(t)}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})},t.prototype._setInitialStatus=function(){this.status=this._allControlsDisabled()?pt:lt},t.prototype._runValidator=function(){return this.validator?this.validator(this):null},t.prototype._runAsyncValidator=function(t){var e=this;if(this.asyncValidator){this.status=ut;var n=y(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(function(n){return e.setErrors(n,{emitEvent:t})})}},t.prototype._cancelExistingSubscription=function(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()},t.prototype.setErrors=function(t,e){void 0===e&&(e={}),this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)},t.prototype.get=function(t){return e=this,r=".",null==(n=t)?null:(n instanceof Array||(n=n.split(r)),n instanceof Array&&0===n.length?null:n.reduce(function(t,e){return t instanceof yt?t.controls[e]||null:t instanceof vt&&t.at(e)||null},e));var e,n,r},t.prototype.getError=function(t,e){var n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null},t.prototype.hasError=function(t,e){return!!this.getError(t,e)},Object.defineProperty(t.prototype,"root",{get:function(){for(var t=this;t._parent;)t=t._parent;return t},enumerable:!0,configurable:!0}),t.prototype._updateControlsErrors=function(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)},t.prototype._initObservables=function(){this.valueChanges=new e.EventEmitter,this.statusChanges=new e.EventEmitter},t.prototype._calculateStatus=function(){return this._allControlsDisabled()?pt:this.errors?ct:this._anyControlsHaveStatus(ut)?ut:this._anyControlsHaveStatus(ct)?ct:lt},t.prototype._anyControlsHaveStatus=function(t){return this._anyControls(function(e){return e.status===t})},t.prototype._anyControlsDirty=function(){return this._anyControls(function(t){return t.dirty})},t.prototype._anyControlsTouched=function(){return this._anyControls(function(t){return t.touched})},t.prototype._updatePristine=function(t){void 0===t&&(t={}),this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)},t.prototype._updateTouched=function(t){void 0===t&&(t={}),this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)},t.prototype._isBoxedValue=function(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t},t.prototype._registerOnCollectionChange=function(t){this._onCollectionChange=t},t.prototype._setUpdateStrategy=function(t){ft(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)},t}(),gt=function(t){function e(e,n,r){void 0===e&&(e=null);var i=t.call(this,dt(n),ht(r,n))||this;return i._onChange=[],i._applyFormState(e),i._setUpdateStrategy(n),i.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),i._initObservables(),i}return s(e,t),e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(function(t){return t(n.value,!1!==e.emitViewToModelChange)}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){void 0===e&&(e={}),this.setValue(t,e)},e.prototype.reset=function(t,e){void 0===t&&(t=null),void 0===e&&(e={}),this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1},e.prototype._updateValue=function(){},e.prototype._anyControls=function(t){return!1},e.prototype._allControlsDisabled=function(){return this.disabled},e.prototype.registerOnChange=function(t){this._onChange.push(t)},e.prototype._clearChangeFns=function(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=function(){}},e.prototype.registerOnDisabledChange=function(t){this._onDisabledChange.push(t)},e.prototype._forEachChild=function(t){},e.prototype._syncPendingControls=function(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange))&&(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0)},e.prototype._applyFormState=function(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t},e}(mt),yt=function(t){function e(e,n,r){var i=t.call(this,dt(n),ht(r,n))||this;return i.controls=e,i._initObservables(),i._setUpdateStrategy(n),i._setUpControls(),i.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),i}return s(e,t),e.prototype.registerControl=function(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)},e.prototype.addControl=function(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.removeControl=function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.setControl=function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.contains=function(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled},e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this._checkAllValuesPresent(t),Object.keys(t).forEach(function(r){n._throwIfControlMissing(r),n.controls[r].setValue(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){var n=this;void 0===e&&(e={}),Object.keys(t).forEach(function(r){n.controls[r]&&n.controls[r].patchValue(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.reset=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this._forEachChild(function(n,r){n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)},e.prototype.getRawValue=function(){return this._reduceChildren({},function(t,e,n){return t[n]=e instanceof gt?e.value:e.getRawValue(),t})},e.prototype._syncPendingControls=function(){var t=this._reduceChildren(!1,function(t,e){return!!e._syncPendingControls()||t});return t&&this.updateValueAndValidity({onlySelf:!0}),t},e.prototype._throwIfControlMissing=function(t){if(!Object.keys(this.controls).length)throw new Error("\n        There are no form controls registered with this group yet.  If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      ");if(!this.controls[t])throw new Error("Cannot find form control with name: "+t+".")},e.prototype._forEachChild=function(t){var e=this;Object.keys(this.controls).forEach(function(n){return t(e.controls[n],n)})},e.prototype._setUpControls=function(){var t=this;this._forEachChild(function(e){e.setParent(t),e._registerOnCollectionChange(t._onCollectionChange)})},e.prototype._updateValue=function(){this.value=this._reduceValue()},e.prototype._anyControls=function(t){var e=this,n=!1;return this._forEachChild(function(r,i){n=n||e.contains(i)&&t(r)}),n},e.prototype._reduceValue=function(){var t=this;return this._reduceChildren({},function(e,n,r){return(n.enabled||t.disabled)&&(e[r]=n.value),e})},e.prototype._reduceChildren=function(t,e){var n=t;return this._forEachChild(function(t,r){n=e(n,t,r)}),n},e.prototype._allControlsDisabled=function(){for(var t=0,e=Object.keys(this.controls);t<e.length;t++){var n=e[t];if(this.controls[n].enabled)return!1}return Object.keys(this.controls).length>0||this.disabled},e.prototype._checkAllValuesPresent=function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control with name: '"+n+"'.")})},e}(mt),vt=function(t){function e(e,n,r){var i=t.call(this,dt(n),ht(r,n))||this;return i.controls=e,i._initObservables(),i._setUpdateStrategy(n),i._setUpControls(),i.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),i}return s(e,t),e.prototype.at=function(t){return this.controls[t]},e.prototype.push=function(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.insert=function(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()},e.prototype.removeAt=function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),this.updateValueAndValidity()},e.prototype.setControl=function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()},Object.defineProperty(e.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this._checkAllValuesPresent(t),t.forEach(function(t,r){n._throwIfControlMissing(r),n.at(r).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){var n=this;void 0===e&&(e={}),t.forEach(function(t,r){n.at(r)&&n.at(r).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.reset=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this._forEachChild(function(n,r){n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)},e.prototype.getRawValue=function(){return this.controls.map(function(t){return t instanceof gt?t.value:t.getRawValue()})},e.prototype._syncPendingControls=function(){var t=this.controls.reduce(function(t,e){return!!e._syncPendingControls()||t},!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t},e.prototype._throwIfControlMissing=function(t){if(!this.controls.length)throw new Error("\n        There are no form controls registered with this array yet.  If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)},e.prototype._forEachChild=function(t){this.controls.forEach(function(e,n){t(e,n)})},e.prototype._updateValue=function(){var t=this;this.value=this.controls.filter(function(e){return e.enabled||t.disabled}).map(function(t){return t.value})},e.prototype._anyControls=function(t){return this.controls.some(function(e){return e.enabled&&t(e)})},e.prototype._setUpControls=function(){var t=this;this._forEachChild(function(e){return t._registerControl(e)})},e.prototype._checkAllValuesPresent=function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control at index: "+n+".")})},e.prototype._allControlsDisabled=function(){for(var t=0,e=this.controls;t<e.length;t++){if(e[t].enabled)return!1}return this.controls.length>0||this.disabled},e.prototype._registerControl=function(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)},e}(mt),bt={provide:u,useExisting:e.forwardRef(function(){return wt})},_t=Promise.resolve(null),wt=function(t){function n(n,r){var i=t.call(this)||this;return i.submitted=!1,i._directives=[],i.ngSubmit=new e.EventEmitter,i.form=new yt({},Q(n),X(r)),i}return s(n,t),n.prototype.ngAfterViewInit=function(){this._setUpdateStrategy()},Object.defineProperty(n.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),n.prototype.addControl=function(t){var e=this;_t.then(function(){var n=e._findContainer(t.path);t.control=n.registerControl(t.name,t.control),W(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),e._directives.push(t)})},n.prototype.getControl=function(t){return this.form.get(t.path)},n.prototype.removeControl=function(t){var e=this;_t.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name),nt(e._directives,t)})},n.prototype.addFormGroup=function(t){var e=this;_t.then(function(){var n=e._findContainer(t.path),r=new yt({});Y(r,t),n.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})},n.prototype.removeFormGroup=function(t){var e=this;_t.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name)})},n.prototype.getFormGroup=function(t){return this.form.get(t.path)},n.prototype.updateModel=function(t,e){var n=this;_t.then(function(){n.form.get(t.path).setValue(e)})},n.prototype.setValue=function(t){this.control.setValue(t)},n.prototype.onSubmit=function(t){return this.submitted=!0,tt(this.form,this._directives),this.ngSubmit.emit(t),!1},n.prototype.onReset=function(){this.resetForm()},n.prototype.resetForm=function(t){void 0===t&&(t=void 0),this.form.reset(t),this.submitted=!1},n.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)},n.prototype._findContainer=function(t){return t.pop(),t.length?this.form.get(t):this.form},n.decorators=[{type:e.Directive,args:[{selector:"form:not([ngNoForm]):not([formGroup]),ngForm,[ngForm]",providers:[bt],host:{"(submit)":"onSubmit($event)","(reset)":"onReset()"},outputs:["ngSubmit"],exportAs:"ngForm"}]}],n.ctorParameters=function(){return[{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[d]}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[h]}]}]},n.propDecorators={options:[{type:e.Input,args:["ngFormOptions"]}]},n}(u),Ct='\n    <div [formGroup]="myGroup">\n      <input formControlName="firstName">\n    </div>\n\n    In your class:\n\n    this.myGroup = new FormGroup({\n       firstName: new FormControl()\n    });',xt='\n    <div [formGroup]="myGroup">\n       <div formGroupName="person">\n          <input formControlName="firstName">\n       </div>\n    </div>\n\n    In your class:\n\n    this.myGroup = new FormGroup({\n       person: new FormGroup({ firstName: new FormControl() })\n    });',St='\n    <div [formGroup]="myGroup">\n      <div formArrayName="cities">\n        <div *ngFor="let city of cityArray.controls; index as i">\n          <input [formControlName]="i">\n        </div>\n      </div>\n    </div>\n\n    In your class:\n\n    this.cityArray = new FormArray([new FormControl(\'SF\')]);\n    this.myGroup = new FormGroup({\n      cities: this.cityArray\n    });',Et='\n    <form>\n       <div ngModelGroup="person">\n          <input [(ngModel)]="person.name" name="firstName">\n       </div>\n    </form>',kt='\n    <div [formGroup]="myGroup">\n       <input formControlName="firstName">\n       <input [(ngModel)]="showMoreControls" [ngModelOptions]="{standalone: true}">\n    </div>\n  ',Ot=function(){function t(){}return t.modelParentException=function(){throw new Error('\n      ngModel cannot be used to register form controls with a parent formGroup directive.  Try using\n      formGroup\'s partner directive "formControlName" instead.  Example:\n\n      '+Ct+"\n\n      Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n      Example:\n\n      "+kt)},t.formGroupNameException=function(){throw new Error("\n      ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n      Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n      "+xt+"\n\n      Option 2:  Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n      "+Et)},t.missingNameException=function(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n      control must be defined as \'standalone\' in ngModelOptions.\n\n      Example 1: <input [(ngModel)]="person.firstName" name="first">\n      Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">')},t.modelGroupParentException=function(){throw new Error("\n      ngModelGroup cannot be used with a parent formGroup directive.\n\n      Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n      "+xt+"\n\n      Option 2:  Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n      "+Et)},t}(),Pt={provide:u,useExisting:e.forwardRef(function(){return At})},At=function(t){function n(e,n,r){var i=t.call(this)||this;return i._parent=e,i._validators=n,i._asyncValidators=r,i}return s(n,t),n.prototype._checkParentType=function(){this._parent instanceof n||this._parent instanceof wt||Ot.modelGroupParentException()},n.decorators=[{type:e.Directive,args:[{selector:"[ngModelGroup]",providers:[Pt],exportAs:"ngModelGroup"}]}],n.ctorParameters=function(){return[{type:u,decorators:[{type:e.Host},{type:e.SkipSelf}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[d]}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[h]}]}]},n.propDecorators={name:[{type:e.Input,args:["ngModelGroup"]}]},n}(rt),Dt={provide:D,useExisting:e.forwardRef(function(){return Mt})},Tt=Promise.resolve(null),Mt=function(t){function n(n,r,i,o){var a=t.call(this)||this;return a.control=new gt,a._registered=!1,a.update=new e.EventEmitter,a._parent=n,a._rawValidators=r||[],a._rawAsyncValidators=i||[],a.valueAccessor=et(a,o),a}return s(n,t),n.prototype.ngOnChanges=function(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),Z(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)},n.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},Object.defineProperty(n.prototype,"path",{get:function(){return this._parent?G(this.name,this._parent):[this.name]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"validator",{get:function(){return Q(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"asyncValidator",{get:function(){return X(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),n.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},n.prototype._setUpControl=function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0},n.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)},n.prototype._isStandalone=function(){return!this._parent||!(!this.options||!this.options.standalone)},n.prototype._setUpStandalone=function(){W(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})},n.prototype._checkForErrors=function(){this._isStandalone()||this._checkParentType(),this._checkName()},n.prototype._checkParentType=function(){!(this._parent instanceof At)&&this._parent instanceof rt?Ot.formGroupNameException():this._parent instanceof At||this._parent instanceof wt||Ot.modelParentException()},n.prototype._checkName=function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||Ot.missingNameException()},n.prototype._updateValue=function(t){var e=this;Tt.then(function(){e.control.setValue(t,{emitViewToModelChange:!1})})},n.prototype._updateDisabled=function(t){var e=this,n=t.isDisabled.currentValue,r=""===n||n&&"false"!==n;Tt.then(function(){r&&!e.control.disabled?e.control.disable():!r&&e.control.disabled&&e.control.enable()})},n.decorators=[{type:e.Directive,args:[{selector:"[ngModel]:not([formControlName]):not([formControl])",providers:[Dt],exportAs:"ngModel"}]}],n.ctorParameters=function(){return[{type:u,decorators:[{type:e.Optional},{type:e.Host}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[d]}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[h]}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[b]}]}]},n.propDecorators={name:[{type:e.Input}],isDisabled:[{type:e.Input,args:["disabled"]}],model:[{type:e.Input,args:["ngModel"]}],options:[{type:e.Input,args:["ngModelOptions"]}],update:[{type:e.Output,args:["ngModelChange"]}]},n}(D),It=function(){function t(){}return t.controlParentException=function(){throw new Error("formControlName must be used with a parent formGroup directive.  You'll want to add a formGroup\n       directive and pass it an existing FormGroup instance (you can create one in your class).\n\n      Example:\n\n      "+Ct)},t.ngModelGroupException=function(){throw new Error('formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n       that also have a "form" prefix: formGroupName, formArrayName, or formGroup.\n\n       Option 1:  Update the parent to be formGroupName (reactive form strategy)\n\n        '+xt+"\n\n        Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n        "+Et)},t.missingFormException=function(){throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n       Example:\n\n       "+Ct)},t.groupParentException=function(){throw new Error("formGroupName must be used with a parent formGroup directive.  You'll want to add a formGroup\n      directive and pass it an existing FormGroup instance (you can create one in your class).\n\n      Example:\n\n      "+xt)},t.arrayParentException=function(){throw new Error("formArrayName must be used with a parent formGroup directive.  You'll want to add a formGroup\n       directive and pass it an existing FormGroup instance (you can create one in your class).\n\n        Example:\n\n        "+St)},t.disabledAttrWarning=function(){console.warn("\n      It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n      when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n      you. We recommend using this approach to avoid 'changed after checked' errors.\n       \n      Example: \n      form = new FormGroup({\n        first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n        last: new FormControl('Drew', Validators.required)\n      });\n    ")},t}(),Rt={provide:D,useExisting:e.forwardRef(function(){return Nt})},Nt=function(t){function n(n,r,i){var o=t.call(this)||this;return o.update=new e.EventEmitter,o._rawValidators=n||[],o._rawAsyncValidators=r||[],o.valueAccessor=et(o,i),o}return s(n,t),Object.defineProperty(n.prototype,"isDisabled",{set:function(t){It.disabledAttrWarning()},enumerable:!0,configurable:!0}),n.prototype.ngOnChanges=function(t){this._isControlChanged(t)&&(W(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),Z(t,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)},Object.defineProperty(n.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"validator",{get:function(){return Q(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"asyncValidator",{get:function(){return X(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),n.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},n.prototype._isControlChanged=function(t){return t.hasOwnProperty("form")},n.decorators=[{type:e.Directive,args:[{selector:"[formControl]",providers:[Rt],exportAs:"ngForm"}]}],n.ctorParameters=function(){return[{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[d]}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[h]}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[b]}]}]},n.propDecorators={form:[{type:e.Input,args:["formControl"]}],model:[{type:e.Input,args:["ngModel"]}],update:[{type:e.Output,args:["ngModelChange"]}],isDisabled:[{type:e.Input,args:["disabled"]}]},n}(D),Lt={provide:u,useExisting:e.forwardRef(function(){return jt})},jt=function(t){function n(n,r){var i=t.call(this)||this;return i._validators=n,i._asyncValidators=r,i.submitted=!1,i.directives=[],i.form=null,i.ngSubmit=new e.EventEmitter,i}return s(n,t),n.prototype.ngOnChanges=function(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())},Object.defineProperty(n.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),n.prototype.addControl=function(t){var e=this.form.get(t.path);return W(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e},n.prototype.getControl=function(t){return this.form.get(t.path)},n.prototype.removeControl=function(t){nt(this.directives,t)},n.prototype.addFormGroup=function(t){var e=this.form.get(t.path);Y(e,t),e.updateValueAndValidity({emitEvent:!1})},n.prototype.removeFormGroup=function(t){},n.prototype.getFormGroup=function(t){return this.form.get(t.path)},n.prototype.addFormArray=function(t){var e=this.form.get(t.path);Y(e,t),e.updateValueAndValidity({emitEvent:!1})},n.prototype.removeFormArray=function(t){},n.prototype.getFormArray=function(t){return this.form.get(t.path)},n.prototype.updateModel=function(t,e){this.form.get(t.path).setValue(e)},n.prototype.onSubmit=function(t){return this.submitted=!0,tt(this.form,this.directives),this.ngSubmit.emit(t),!1},n.prototype.onReset=function(){this.resetForm()},n.prototype.resetForm=function(t){void 0===t&&(t=void 0),this.form.reset(t),this.submitted=!1},n.prototype._updateDomValue=function(){var t=this;this.directives.forEach(function(e){var n,r,i=t.form.get(e.path);e.control!==i&&(n=e.control,(r=e).valueAccessor.registerOnChange(function(){return $(r)}),r.valueAccessor.registerOnTouched(function(){return $(r)}),r._rawValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),r._rawAsyncValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),n&&n._clearChangeFns(),i&&W(i,e),e.control=i)}),this.form._updateTreeValidity({emitEvent:!1})},n.prototype._updateRegistrations=function(){var t=this;this.form._registerOnCollectionChange(function(){return t._updateDomValue()}),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){}),this._oldForm=this.form},n.prototype._updateValidators=function(){var t=Q(this._validators);this.form.validator=m.compose([this.form.validator,t]);var e=X(this._asyncValidators);this.form.asyncValidator=m.composeAsync([this.form.asyncValidator,e])},n.prototype._checkFormPresent=function(){this.form||It.missingFormException()},n.decorators=[{type:e.Directive,args:[{selector:"[formGroup]",providers:[Lt],host:{"(submit)":"onSubmit($event)","(reset)":"onReset()"},exportAs:"ngForm"}]}],n.ctorParameters=function(){return[{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[d]}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[h]}]}]},n.propDecorators={form:[{type:e.Input,args:["formGroup"]}],ngSubmit:[{type:e.Output}]},n}(u),Ft={provide:u,useExisting:e.forwardRef(function(){return Vt})},Vt=function(t){function n(e,n,r){var i=t.call(this)||this;return i._parent=e,i._validators=n,i._asyncValidators=r,i}return s(n,t),n.prototype._checkParentType=function(){Ht(this._parent)&&It.groupParentException()},n.decorators=[{type:e.Directive,args:[{selector:"[formGroupName]",providers:[Ft]}]}],n.ctorParameters=function(){return[{type:u,decorators:[{type:e.Optional},{type:e.Host},{type:e.SkipSelf}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[d]}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[h]}]}]},n.propDecorators={name:[{type:e.Input,args:["formGroupName"]}]},n}(rt),Bt={provide:u,useExisting:e.forwardRef(function(){return Ut})},Ut=function(t){function n(e,n,r){var i=t.call(this)||this;return i._parent=e,i._validators=n,i._asyncValidators=r,i}return s(n,t),n.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormArray(this)},n.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormArray(this)},Object.defineProperty(n.prototype,"control",{get:function(){return this.formDirective.getFormArray(this)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"path",{get:function(){return G(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"validator",{get:function(){return Q(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"asyncValidator",{get:function(){return X(this._asyncValidators)},enumerable:!0,configurable:!0}),n.prototype._checkParentType=function(){Ht(this._parent)&&It.arrayParentException()},n.decorators=[{type:e.Directive,args:[{selector:"[formArrayName]",providers:[Bt]}]}],n.ctorParameters=function(){return[{type:u,decorators:[{type:e.Optional},{type:e.Host},{type:e.SkipSelf}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[d]}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[h]}]}]},n.propDecorators={name:[{type:e.Input,args:["formArrayName"]}]},n}(u);function Ht(t){return!(t instanceof Vt||t instanceof jt||t instanceof Ut)}var zt={provide:D,useExisting:e.forwardRef(function(){return Gt})},Gt=function(t){function n(n,r,i,o){var a=t.call(this)||this;return a._added=!1,a.update=new e.EventEmitter,a._parent=n,a._rawValidators=r||[],a._rawAsyncValidators=i||[],a.valueAccessor=et(a,o),a}return s(n,t),Object.defineProperty(n.prototype,"isDisabled",{set:function(t){It.disabledAttrWarning()},enumerable:!0,configurable:!0}),n.prototype.ngOnChanges=function(t){this._added||this._setUpControl(),Z(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))},n.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},n.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},Object.defineProperty(n.prototype,"path",{get:function(){return G(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"validator",{get:function(){return Q(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"asyncValidator",{get:function(){return X(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),n.prototype._checkParentType=function(){!(this._parent instanceof Vt)&&this._parent instanceof rt?It.ngModelGroupException():this._parent instanceof Vt||this._parent instanceof jt||this._parent instanceof Ut||It.controlParentException()},n.prototype._setUpControl=function(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0},n.decorators=[{type:e.Directive,args:[{selector:"[formControlName]",providers:[zt]}]}],n.ctorParameters=function(){return[{type:u,decorators:[{type:e.Optional},{type:e.Host},{type:e.SkipSelf}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[d]}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[h]}]},{type:Array,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[b]}]}]},n.propDecorators={name:[{type:e.Input,args:["formControlName"]}],model:[{type:e.Input,args:["ngModel"]}],update:[{type:e.Output,args:["ngModelChange"]}],isDisabled:[{type:e.Input,args:["disabled"]}]},n}(D),Wt={provide:d,useExisting:e.forwardRef(function(){return Yt}),multi:!0},qt={provide:d,useExisting:e.forwardRef(function(){return $t}),multi:!0},Yt=function(){function t(){}return Object.defineProperty(t.prototype,"required",{get:function(){return this._required},set:function(t){this._required=null!=t&&!1!==t&&""+t!="false",this._onChange&&this._onChange()},enumerable:!0,configurable:!0}),t.prototype.validate=function(t){return this.required?m.required(t):null},t.prototype.registerOnValidatorChange=function(t){this._onChange=t},t.decorators=[{type:e.Directive,args:[{selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",providers:[Wt],host:{"[attr.required]":'required ? "" : null'}}]}],t.ctorParameters=function(){return[]},t.propDecorators={required:[{type:e.Input}]},t}(),$t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return s(n,t),n.prototype.validate=function(t){return this.required?m.requiredTrue(t):null},n.decorators=[{type:e.Directive,args:[{selector:"input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]",providers:[qt],host:{"[attr.required]":'required ? "" : null'}}]}],n.ctorParameters=function(){return[]},n}(Yt),Kt={provide:d,useExisting:e.forwardRef(function(){return Qt}),multi:!0},Qt=function(){function t(){}return Object.defineProperty(t.prototype,"email",{set:function(t){this._enabled=""===t||!0===t||"true"===t,this._onChange&&this._onChange()},enumerable:!0,configurable:!0}),t.prototype.validate=function(t){return this._enabled?m.email(t):null},t.prototype.registerOnValidatorChange=function(t){this._onChange=t},t.decorators=[{type:e.Directive,args:[{selector:"[email][formControlName],[email][formControl],[email][ngModel]",providers:[Kt]}]}],t.ctorParameters=function(){return[]},t.propDecorators={email:[{type:e.Input}]},t}(),Xt={provide:d,useExisting:e.forwardRef(function(){return Zt}),multi:!0},Zt=function(){function t(){}return t.prototype.ngOnChanges=function(t){"minlength"in t&&(this._createValidator(),this._onChange&&this._onChange())},t.prototype.validate=function(t){return null==this.minlength?null:this._validator(t)},t.prototype.registerOnValidatorChange=function(t){this._onChange=t},t.prototype._createValidator=function(){this._validator=m.minLength(parseInt(this.minlength,10))},t.decorators=[{type:e.Directive,args:[{selector:"[minlength][formControlName],[minlength][formControl],[minlength][ngModel]",providers:[Xt],host:{"[attr.minlength]":"minlength ? minlength : null"}}]}],t.ctorParameters=function(){return[]},t.propDecorators={minlength:[{type:e.Input}]},t}(),Jt={provide:d,useExisting:e.forwardRef(function(){return te}),multi:!0},te=function(){function t(){}return t.prototype.ngOnChanges=function(t){"maxlength"in t&&(this._createValidator(),this._onChange&&this._onChange())},t.prototype.validate=function(t){return null!=this.maxlength?this._validator(t):null},t.prototype.registerOnValidatorChange=function(t){this._onChange=t},t.prototype._createValidator=function(){this._validator=m.maxLength(parseInt(this.maxlength,10))},t.decorators=[{type:e.Directive,args:[{selector:"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",providers:[Jt],host:{"[attr.maxlength]":"maxlength ? maxlength : null"}}]}],t.ctorParameters=function(){return[]},t.propDecorators={maxlength:[{type:e.Input}]},t}(),ee={provide:d,useExisting:e.forwardRef(function(){return ne}),multi:!0},ne=function(){function t(){}return t.prototype.ngOnChanges=function(t){"pattern"in t&&(this._createValidator(),this._onChange&&this._onChange())},t.prototype.validate=function(t){return this._validator(t)},t.prototype.registerOnValidatorChange=function(t){this._onChange=t},t.prototype._createValidator=function(){this._validator=m.pattern(this.pattern)},t.decorators=[{type:e.Directive,args:[{selector:"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]",providers:[ee],host:{"[attr.pattern]":"pattern ? pattern : null"}}]}],t.ctorParameters=function(){return[]},t.propDecorators={pattern:[{type:e.Input}]},t}(),re=function(){function t(){}return t.prototype.group=function(t,e){void 0===e&&(e=null);var n=this._reduceControls(t),r=null!=e?e.validator:null,i=null!=e?e.asyncValidator:null;return new yt(n,r,i)},t.prototype.control=function(t,e,n){return new gt(t,e,n)},t.prototype.array=function(t,e,n){var r=this,i=t.map(function(t){return r._createControl(t)});return new vt(i,e,n)},t.prototype._reduceControls=function(t){var e=this,n={};return Object.keys(t).forEach(function(r){n[r]=e._createControl(t[r])}),n},t.prototype._createControl=function(t){if(t instanceof gt||t instanceof yt||t instanceof vt)return t;if(Array.isArray(t)){var e=t[0],n=t.length>1?t[1]:null,r=t.length>2?t[2]:null;return this.control(e,n,r)}return this.control(t)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}(),ie=new e.Version("5.2.6"),oe=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"form:not([ngNoForm]):not([ngNativeValidate])",host:{novalidate:""}}]}],t.ctorParameters=function(){return[]},t}(),ae=[oe,V,z,S,P,N,w,F,H,I,at,st,Yt,Zt,te,ne,$t,Qt],se=[Mt,At,wt],le=[Nt,jt,Gt,Vt,Ut],ce=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:ae,exports:ae}]}],t.ctorParameters=function(){return[]},t}(),ue=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:se,providers:[M],exports:[ce,se]}]}],t.ctorParameters=function(){return[]},t}(),pe=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[le],providers:[re,M],exports:[ce,le]}]}],t.ctorParameters=function(){return[]},t}();t.AbstractControlDirective=c,t.AbstractFormGroupDirective=rt,t.CheckboxControlValueAccessor=w,t.ControlContainer=u,t.NG_VALUE_ACCESSOR=b,t.COMPOSITION_BUFFER_MODE=x,t.DefaultValueAccessor=S,t.NgControl=D,t.NgControlStatus=at,t.NgControlStatusGroup=st,t.NgForm=wt,t.NgModel=Mt,t.NgModelGroup=At,t.RadioControlValueAccessor=I,t.FormControlDirective=Nt,t.FormControlName=Gt,t.FormGroupDirective=jt,t.FormArrayName=Ut,t.FormGroupName=Vt,t.NgSelectOption=V,t.SelectControlValueAccessor=F,t.SelectMultipleControlValueAccessor=H,t.CheckboxRequiredValidator=$t,t.EmailValidator=Qt,t.MaxLengthValidator=te,t.MinLengthValidator=Zt,t.PatternValidator=ne,t.RequiredValidator=Yt,t.FormBuilder=re,t.AbstractControl=mt,t.FormArray=vt,t.FormControl=gt,t.FormGroup=yt,t.NG_ASYNC_VALIDATORS=h,t.NG_VALIDATORS=d,t.Validators=m,t.VERSION=ie,t.FormsModule=ue,t.ReactiveFormsModule=pe,t.ɵba=ce,t.ɵz=le,t.ɵx=ae,t.ɵy=se,t.ɵa=_,t.ɵb=C,t.ɵc=it,t.ɵd=ot,t.ɵe=bt,t.ɵf=Dt,t.ɵg=Pt,t.ɵbf=oe,t.ɵbb=O,t.ɵbc=P,t.ɵh=T,t.ɵi=M,t.ɵbd=R,t.ɵbe=N,t.ɵj=Rt,t.ɵk=zt,t.ɵl=Lt,t.ɵn=Bt,t.ɵm=Ft,t.ɵo=L,t.ɵq=z,t.ɵp=B,t.ɵs=qt,t.ɵt=Kt,t.ɵv=Jt,t.ɵu=Xt,t.ɵw=ee,t.ɵr=Wt,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core"),t("rxjs/observable/forkJoin"),t("rxjs/observable/fromPromise"),t("rxjs/operator/map"),t("@angular/platform-browser")):i((r.ng=r.ng||{},r.ng.forms={}),r.ng.core,r.Rx.Observable,r.Rx.Observable,r.Rx.Observable.prototype,r.ng.platformBrowser)},{"@angular/core":62,"@angular/platform-browser":67,"rxjs/observable/forkJoin":99,"rxjs/observable/fromPromise":103,"rxjs/operator/map":115}],64:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i,o,a,s,l,c,u,p,d,h,f,m,g,y,v,b,_,w,C,x,S,E,k,O,P,A,D,T,M,I,R,N,L,j,F,V,B,U,H,z,G,W){"use strict";var q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function Y(t,e){function n(){this.constructor=t}q(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var $=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},K=function(){function t(){}return t.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",t.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",t.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",t.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",t}(),Q=function(){function t(){}return t.COMPLEX="375ms",t.ENTERING="225ms",t.EXITING="195ms",t}(),X=new e.InjectionToken("mat-sanity-checks"),Z=function(){function t(t){this._sanityChecksEnabled=t,this._hasDoneGlobalChecks=!1,this._hasCheckedHammer=!1,this._document="object"==typeof document&&document?document:null,this._window="object"==typeof window&&window?window:null,this._areChecksEnabled()&&!this._hasDoneGlobalChecks&&(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._hasDoneGlobalChecks=!0)}return t.prototype._areChecksEnabled=function(){return this._sanityChecksEnabled&&e.isDevMode()&&!this._isTestEnv()},t.prototype._isTestEnv=function(){return this._window&&(this._window.__karma__||this._window.jasmine)},t.prototype._checkDoctypeIsDefined=function(){this._document&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")},t.prototype._checkThemeIsPresent=function(){if(this._document&&"function"==typeof getComputedStyle){var t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);var e=getComputedStyle(t);e&&"none"!==e.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}},t.prototype._checkHammerIsAvailable=function(){!this._hasCheckedHammer&&this._window&&(this._areChecksEnabled()&&!this._window.Hammer&&console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),this._hasCheckedHammer=!0)},t.decorators=[{type:e.NgModule,args:[{imports:[n.BidiModule],exports:[n.BidiModule],providers:[{provide:X,useValue:!0}]}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[X]}]}]},t}();function J(t){return function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,e)||this;return r._disabled=!1,r}return Y(e,t),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),e}(t)}function tt(t,e){return function(t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(this,n)||this;return i.color=e,i}return Y(n,t),Object.defineProperty(n.prototype,"color",{get:function(){return this._color},set:function(t){var n=t||e;n!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove("mat-"+this._color),n&&this._elementRef.nativeElement.classList.add("mat-"+n),this._color=n)},enumerable:!0,configurable:!0}),n}(t)}function et(t){return function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,e)||this;return r._disableRipple=!1,r}return Y(e,t),Object.defineProperty(e.prototype,"disableRipple",{get:function(){return this._disableRipple},set:function(t){this._disableRipple=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),e}(t)}function nt(t,e){return void 0===e&&(e=0),function(t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(this,n)||this;return i._tabIndex=e,i}return Y(n,t),Object.defineProperty(n.prototype,"tabIndex",{get:function(){return this.disabled?-1:this._tabIndex},set:function(t){this._tabIndex=null!=t?t:e},enumerable:!0,configurable:!0}),n}(t)}function rt(t){return function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,e)||this;return r.errorState=!1,r.stateChanges=new i.Subject,r}return Y(e,t),e.prototype.updateErrorState=function(){var t=this.errorState,e=this._parentFormGroup||this._parentForm,n=this.errorStateMatcher||this._defaultErrorStateMatcher,r=this.ngControl?this.ngControl.control:null,i=n.isErrorState(r,e);i!==t&&(this.errorState=i,this.stateChanges.next())},e}(t)}var it=new e.InjectionToken("MAT_DATE_LOCALE"),ot={provide:it,useExisting:e.LOCALE_ID},at=function(){function t(){this._localeChanges=new i.Subject}return Object.defineProperty(t.prototype,"localeChanges",{get:function(){return this._localeChanges},enumerable:!0,configurable:!0}),t.prototype.deserialize=function(t){return null==t||this.isDateInstance(t)&&this.isValid(t)?t:this.invalid()},t.prototype.setLocale=function(t){this.locale=t,this._localeChanges.next()},t.prototype.compareDate=function(t,e){return this.getYear(t)-this.getYear(e)||this.getMonth(t)-this.getMonth(e)||this.getDate(t)-this.getDate(e)},t.prototype.sameDate=function(t,e){if(t&&e){var n=this.isValid(t),r=this.isValid(e);return n&&r?!this.compareDate(t,e):n==r}return t==e},t.prototype.clampDate=function(t,e,n){return e&&this.compareDate(t,e)<0?e:n&&this.compareDate(t,n)>0?n:t},t}(),st=new e.InjectionToken("mat-date-formats"),lt="undefined"!=typeof Intl,ct={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},ut=ht(31,function(t){return String(t+1)}),pt={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},dt=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function ht(t,e){for(var n=Array(t),r=0;r<t;r++)n[r]=e(r);return n}var ft=function(t){function n(e){var n=t.call(this)||this;t.prototype.setLocale.call(n,e);var r="object"==typeof document&&!!document,i=r&&/(msie|trident)/i.test(navigator.userAgent);return n.useUtcForDisplay=!i,n._clampDate=i||r&&/(edge)/i.test(navigator.userAgent),n}return Y(n,t),n.prototype.getYear=function(t){return t.getFullYear()},n.prototype.getMonth=function(t){return t.getMonth()},n.prototype.getDate=function(t){return t.getDate()},n.prototype.getDayOfWeek=function(t){return t.getDay()},n.prototype.getMonthNames=function(t){var e=this;if(lt){var n=new Intl.DateTimeFormat(this.locale,{month:t,timeZone:"utc"});return ht(12,function(t){return e._stripDirectionalityCharacters(e._format(n,new Date(2017,t,1)))})}return ct[t]},n.prototype.getDateNames=function(){var t=this;if(lt){var e=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return ht(31,function(n){return t._stripDirectionalityCharacters(t._format(e,new Date(2017,0,n+1)))})}return ut},n.prototype.getDayOfWeekNames=function(t){var e=this;if(lt){var n=new Intl.DateTimeFormat(this.locale,{weekday:t,timeZone:"utc"});return ht(7,function(t){return e._stripDirectionalityCharacters(e._format(n,new Date(2017,0,t+1)))})}return pt[t]},n.prototype.getYearName=function(t){if(lt){var e=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._stripDirectionalityCharacters(this._format(e,t))}return String(this.getYear(t))},n.prototype.getFirstDayOfWeek=function(){return 0},n.prototype.getNumDaysInMonth=function(t){return this.getDate(this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+1,0))},n.prototype.clone=function(t){return this.createDate(this.getYear(t),this.getMonth(t),this.getDate(t))},n.prototype.createDate=function(t,e,n){if(e<0||e>11)throw Error('Invalid month index "'+e+'". Month index has to be between 0 and 11.');if(n<1)throw Error('Invalid date "'+n+'". Date has to be greater than 0.');var r=this._createDateWithOverflow(t,e,n);if(r.getMonth()!=e)throw Error('Invalid date "'+n+'" for month with index "'+e+'".');return r},n.prototype.today=function(){return new Date},n.prototype.parse=function(t){return"number"==typeof t?new Date(t):t?new Date(Date.parse(t)):null},n.prototype.format=function(t,e){if(!this.isValid(t))throw Error("NativeDateAdapter: Cannot format invalid date.");if(lt){this._clampDate&&(t.getFullYear()<1||t.getFullYear()>9999)&&(t=this.clone(t)).setFullYear(Math.max(1,Math.min(9999,t.getFullYear()))),e=$({},e,{timeZone:"utc"});var n=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(n,t))}return this._stripDirectionalityCharacters(t.toDateString())},n.prototype.addCalendarYears=function(t,e){return this.addCalendarMonths(t,12*e)},n.prototype.addCalendarMonths=function(t,e){var n=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(n)!=((this.getMonth(t)+e)%12+12)%12&&(n=this._createDateWithOverflow(this.getYear(n),this.getMonth(n),0)),n},n.prototype.addCalendarDays=function(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)},n.prototype.toIso8601=function(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")},n.prototype.deserialize=function(e){if("string"==typeof e){if(!e)return null;if(dt.test(e)){var n=new Date(e);if(this.isValid(n))return n}}return t.prototype.deserialize.call(this,e)},n.prototype.isDateInstance=function(t){return t instanceof Date},n.prototype.isValid=function(t){return!isNaN(t.getTime())},n.prototype.invalid=function(){return new Date(NaN)},n.prototype._createDateWithOverflow=function(t,e,n){var r=new Date(t,e,n);return t>=0&&t<100&&r.setFullYear(this.getYear(r)-1900),r},n.prototype._2digit=function(t){return("00"+t).slice(-2)},n.prototype._stripDirectionalityCharacters=function(t){return t.replace(/[\u200e\u200f]/g,"")},n.prototype._format=function(t,e){var n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.format(n)},n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[it]}]}]},n}(at),mt={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},gt=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{providers:[{provide:at,useClass:ft},ot]}]}],t.ctorParameters=function(){return[]},t}(),yt=mt,vt=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[gt],providers:[{provide:st,useValue:yt}]}]}],t.ctorParameters=function(){return[]},t}(),bt=function(){function t(){}return t.prototype.isErrorState=function(t,e){return!!(t&&t.invalid&&(t.dirty||e&&e.submitted))},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}(),_t=function(){function t(){}return t.prototype.isErrorState=function(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}(),wt=new e.InjectionToken("MAT_HAMMER_OPTIONS"),Ct=function(t){function n(e,n){var r=t.call(this)||this;return r._hammerOptions=e,r._hammer="undefined"!=typeof window?window.Hammer:null,r.events=r._hammer?["longpress","slide","slidestart","slideend","slideright","slideleft"]:[],n&&n._checkHammerIsAvailable(),r}return Y(n,t),n.prototype.buildHammer=function(t){var e=new this._hammer(t,this._hammerOptions||void 0),n=new this._hammer.Pan,r=new this._hammer.Swipe,i=new this._hammer.Press,o=this._createRecognizer(n,{event:"slide",threshold:0},r),a=this._createRecognizer(i,{event:"longpress",time:500});return n.recognizeWith(r),e.add([r,i,n,o,a]),e},n.prototype._createRecognizer=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=new t.constructor(e);return n.push(t),n.forEach(function(t){return i.recognizeWith(t)}),i},n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[wt]}]},{type:Z,decorators:[{type:e.Optional}]}]},n}(a.HammerGestureConfig),xt=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-line], [matLine]",host:{class:"mat-line"}}]}],t.ctorParameters=function(){return[]},t}(),St=function(){function t(t,e){var n=this;this._lines=t,this._element=e,this._setLineClass(this._lines.length),this._lines.changes.subscribe(function(){n._setLineClass(n._lines.length)})}return t.prototype._setLineClass=function(t){this._resetClasses(),2===t||3===t?this._setClass("mat-"+t+"-line",!0):t>3&&this._setClass("mat-multi-line",!0)},t.prototype._resetClasses=function(){this._setClass("mat-2-line",!1),this._setClass("mat-3-line",!1),this._setClass("mat-multi-line",!1)},t.prototype._setClass=function(t,e){e?this._element.nativeElement.classList.add(t):this._element.nativeElement.classList.remove(t)},t}(),Et=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[Z],exports:[xt,Z],declarations:[xt]}]}],t.ctorParameters=function(){return[]},t}(),kt={FADING_IN:0,VISIBLE:1,FADING_OUT:2,HIDDEN:3};kt[kt.FADING_IN]="FADING_IN",kt[kt.VISIBLE]="VISIBLE",kt[kt.FADING_OUT]="FADING_OUT",kt[kt.HIDDEN]="HIDDEN";var Ot=function(){function t(t,e,n){this._renderer=t,this.element=e,this.config=n,this.state=kt.HIDDEN}return t.prototype.fadeOut=function(){this._renderer.fadeOutRipple(this)},t}(),Pt={enterDuration:450,exitDuration:400},At=800,Dt=function(){function t(t,e,n,r){var i=this;this._target=t,this._ngZone=e,this._isPointerDown=!1,this._triggerEvents=new Map,this._activeRipples=new Set,this._eventOptions=!!l.supportsPassiveEventListeners()&&{passive:!0},this.onMousedown=function(t){var e=i._lastTouchStartEvent&&Date.now()<i._lastTouchStartEvent+At;i._target.rippleDisabled||e||(i._isPointerDown=!0,i.fadeInRipple(t.clientX,t.clientY,i._target.rippleConfig))},this.onTouchStart=function(t){i._target.rippleDisabled||(i._lastTouchStartEvent=Date.now(),i._isPointerDown=!0,i.fadeInRipple(t.touches[0].clientX,t.touches[0].clientY,i._target.rippleConfig))},this.onPointerUp=function(){i._isPointerDown&&(i._isPointerDown=!1,i._activeRipples.forEach(function(t){var e=t.state===kt.VISIBLE||t.config.terminateOnPointerUp&&t.state===kt.FADING_IN;!t.config.persistent&&e&&t.fadeOut()}))},r.isBrowser&&(this._containerElement=n.nativeElement,this._triggerEvents.set("mousedown",this.onMousedown),this._triggerEvents.set("mouseup",this.onPointerUp),this._triggerEvents.set("mouseleave",this.onPointerUp),this._triggerEvents.set("touchstart",this.onTouchStart),this._triggerEvents.set("touchend",this.onPointerUp))}return t.prototype.fadeInRipple=function(t,e,n){var r=this;void 0===n&&(n={});var i=this._containerElement.getBoundingClientRect(),o=$({},Pt,n.animation);n.centered&&(t=i.left+i.width/2,e=i.top+i.height/2);var a,s,l,c,u,p,d=n.radius||(a=t,s=e,l=i,c=Math.max(Math.abs(a-l.left),Math.abs(a-l.right)),u=Math.max(Math.abs(s-l.top),Math.abs(s-l.bottom)),Math.sqrt(c*c+u*u)),h=t-i.left,f=e-i.top,m=o.enterDuration/(n.speedFactor||1),g=document.createElement("div");g.classList.add("mat-ripple-element"),g.style.left=h-d+"px",g.style.top=f-d+"px",g.style.height=2*d+"px",g.style.width=2*d+"px",g.style.backgroundColor=n.color||null,g.style.transitionDuration=m+"ms",this._containerElement.appendChild(g),p=g,window.getComputedStyle(p).getPropertyValue("opacity"),g.style.transform="scale(1)";var y=new Ot(this,g,n);return y.state=kt.FADING_IN,this._activeRipples.add(y),this.runTimeoutOutsideZone(function(){y.state=kt.VISIBLE,n.persistent||r._isPointerDown||y.fadeOut()},m),y},t.prototype.fadeOutRipple=function(t){if(this._activeRipples.delete(t)){var e=t.element,n=$({},Pt,t.config.animation);e.style.transitionDuration=n.exitDuration+"ms",e.style.opacity="0",t.state=kt.FADING_OUT,this.runTimeoutOutsideZone(function(){t.state=kt.HIDDEN,e.parentNode.removeChild(e)},n.exitDuration)}},t.prototype.fadeOutAll=function(){this._activeRipples.forEach(function(t){return t.fadeOut()})},t.prototype.setupTriggerEvents=function(t){var e=this;t&&t!==this._triggerElement&&(this._removeTriggerEvents(),this._ngZone.runOutsideAngular(function(){e._triggerEvents.forEach(function(n,r){return t.addEventListener(r,n,e._eventOptions)})}),this._triggerElement=t)},t.prototype.runTimeoutOutsideZone=function(t,e){void 0===e&&(e=0),this._ngZone.runOutsideAngular(function(){return setTimeout(t,e)})},t.prototype._removeTriggerEvents=function(){var t=this;this._triggerElement&&this._triggerEvents.forEach(function(e,n){t._triggerElement.removeEventListener(n,e,t._eventOptions)})},t}();var Tt=new e.InjectionToken("mat-ripple-global-options"),Mt=function(){function t(t,e,n,r){this._elementRef=t,this.radius=0,this.speedFactor=1,this._disabled=!1,this._isInitialized=!1,this._globalOptions=r||{},this._rippleRenderer=new Dt(this,e,t,n)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=t,this._setupTriggerEventsIfEnabled()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trigger",{get:function(){return this._trigger||this._elementRef.nativeElement},set:function(t){this._trigger=t,this._setupTriggerEventsIfEnabled()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()},t.prototype.ngOnDestroy=function(){this._rippleRenderer._removeTriggerEvents()},t.prototype.fadeOutAll=function(){this._rippleRenderer.fadeOutAll()},Object.defineProperty(t.prototype,"rippleConfig",{get:function(){return{centered:this.centered,radius:this.radius,color:this.color,animation:$({},this._globalOptions.animation,this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp,speedFactor:this.speedFactor*(this._globalOptions.baseSpeedFactor||1)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rippleDisabled",{get:function(){return this.disabled||!!this._globalOptions.disabled},enumerable:!0,configurable:!0}),t.prototype._setupTriggerEventsIfEnabled=function(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)},t.prototype.launch=function(t,e,n){return void 0===e&&(e=0),"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,$({},this.rippleConfig,n)):this._rippleRenderer.fadeInRipple(0,0,$({},this.rippleConfig,t))},t.decorators=[{type:e.Directive,args:[{selector:"[mat-ripple], [matRipple]",exportAs:"matRipple",host:{class:"mat-ripple","[class.mat-ripple-unbounded]":"unbounded"}}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:l.Platform},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[Tt]}]}]},t.propDecorators={color:[{type:e.Input,args:["matRippleColor"]}],unbounded:[{type:e.Input,args:["matRippleUnbounded"]}],centered:[{type:e.Input,args:["matRippleCentered"]}],radius:[{type:e.Input,args:["matRippleRadius"]}],speedFactor:[{type:e.Input,args:["matRippleSpeedFactor"]}],animation:[{type:e.Input,args:["matRippleAnimation"]}],disabled:[{type:e.Input,args:["matRippleDisabled"]}],trigger:[{type:e.Input,args:["matRippleTrigger"]}]},t}(),It=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[Z,l.PlatformModule],exports:[Mt,Z],declarations:[Mt]}]}],t.ctorParameters=function(){return[]},t}(),Rt=function(){function t(){this.state="unchecked",this.disabled=!1}return t.decorators=[{type:e.Component,args:[{encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,selector:"mat-pseudo-checkbox",styles:[".mat-pseudo-checkbox{width:20px;height:20px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0,0,.2,.1),background-color 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:'';border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:9px;left:2px;width:16px;opacity:1}.mat-pseudo-checkbox-checked::after{top:5px;left:3px;width:12px;height:5px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1}"],template:"",host:{class:"mat-pseudo-checkbox","[class.mat-pseudo-checkbox-indeterminate]":'state === "indeterminate"',"[class.mat-pseudo-checkbox-checked]":'state === "checked"',"[class.mat-pseudo-checkbox-disabled]":"disabled"}}]}],t.ctorParameters=function(){return[]},t.propDecorators={state:[{type:e.Input}],disabled:[{type:e.Input}]},t}(),Nt=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{exports:[Rt],declarations:[Rt]}]}],t.ctorParameters=function(){return[]},t}(),Lt=function(){},jt=J(Lt),Ft=0,Vt=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._labelId="mat-optgroup-label-"+Ft++,e}return Y(n,t),n.decorators=[{type:e.Component,args:[{selector:"mat-optgroup",exportAs:"matOptgroup",template:'<label class="mat-optgroup-label" [id]="_labelId">{{ label }}</label><ng-content select="mat-option, ng-container"></ng-content>',encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,inputs:["disabled"],styles:[".mat-optgroup-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right:0}"],host:{class:"mat-optgroup",role:"group","[class.mat-optgroup-disabled]":"disabled","[attr.aria-disabled]":"disabled.toString()","[attr.aria-labelledby]":"_labelId"}}]}],n.ctorParameters=function(){return[]},n.propDecorators={label:[{type:e.Input}]},n}(jt),Bt=0,Ut=function(t,e){void 0===e&&(e=!1),this.source=t,this.isUserInput=e},Ht=new e.InjectionToken("MAT_OPTION_PARENT_COMPONENT"),zt=function(){function t(t,n,r,o){this._element=t,this._changeDetectorRef=n,this._parent=r,this.group=o,this._selected=!1,this._active=!1,this._disabled=!1,this._id="mat-option-"+Bt++,this._mostRecentViewValue="",this.onSelectionChange=new e.EventEmitter,this._stateChanges=new i.Subject}return Object.defineProperty(t.prototype,"multiple",{get:function(){return this._parent&&this._parent.multiple},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.group&&this.group.disabled||this._disabled},set:function(t){this._disabled=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableRipple",{get:function(){return this._parent&&this._parent.disableRipple},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this._active},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewValue",{get:function(){return(this._getHostElement().textContent||"").trim()},enumerable:!0,configurable:!0}),t.prototype.select=function(){this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent()},t.prototype.deselect=function(){this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent()},t.prototype.focus=function(){var t=this._getHostElement();"function"==typeof t.focus&&t.focus()},t.prototype.setActiveStyles=function(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())},t.prototype.setInactiveStyles=function(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())},t.prototype.getLabel=function(){return this.viewValue},t.prototype._handleKeydown=function(t){t.keyCode!==c.ENTER&&t.keyCode!==c.SPACE||(this._selectViaInteraction(),t.preventDefault())},t.prototype._selectViaInteraction=function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))},t.prototype._getTabIndex=function(){return this.disabled?"-1":"0"},t.prototype._getHostElement=function(){return this._element.nativeElement},t.prototype.ngAfterViewChecked=function(){if(this._selected){var t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}},t.prototype._emitSelectionChangeEvent=function(t){void 0===t&&(t=!1),this.onSelectionChange.emit(new Ut(this,t))},t.decorators=[{type:e.Component,args:[{selector:"mat-option",exportAs:"matOption",host:{role:"option","[attr.tabindex]":"_getTabIndex()","[class.mat-selected]":"selected","[class.mat-option-multiple]":"multiple","[class.mat-active]":"active","[id]":"id","[attr.aria-selected]":"selected.toString()","[attr.aria-disabled]":"disabled.toString()","[class.mat-option-disabled]":"disabled","(click)":"_selectViaInteraction()","(keydown)":"_handleKeydown($event)",class:"mat-option"},styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;position:relative;cursor:pointer;outline:0;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}@media screen and (-ms-high-contrast:active){.mat-option-ripple{opacity:.5}}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}"],template:'<mat-pseudo-checkbox *ngIf="multiple" class="mat-option-pseudo-checkbox" [state]="selected ? \'checked\' : \'\'" [disabled]="disabled"></mat-pseudo-checkbox><span class="mat-option-text"><ng-content></ng-content></span><div class="mat-option-ripple" mat-ripple [matRippleTrigger]="_getHostElement()" [matRippleDisabled]="disabled || disableRipple"></div>',encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[Ht]}]},{type:Vt,decorators:[{type:e.Optional}]}]},t.propDecorators={value:[{type:e.Input}],disabled:[{type:e.Input}],onSelectionChange:[{type:e.Output}]},t}();function Gt(t,e,n){if(n.length){for(var r=e.toArray(),i=n.toArray(),o=0,a=0;a<t+1;a++)r[a].group&&r[a].group===i[o]&&o++;return o}return 0}function Wt(t,e,n,r){var i=t*e;return i<n?i:i+e>n+r?Math.max(0,i-r+e):n}var qt=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[It,s.CommonModule,Nt],exports:[zt,Vt],declarations:[zt,Vt]}]}],t.ctorParameters=function(){return[]},t}(),Yt=new e.InjectionToken("mat-label-global-options"),$t=0,Kt=function(){function t(){this.id="mat-error-"+$t++}return t.decorators=[{type:e.Directive,args:[{selector:"mat-error",host:{class:"mat-error",role:"alert","[attr.id]":"id"}}]}],t.ctorParameters=function(){return[]},t.propDecorators={id:[{type:e.Input}]},t}(),Qt={transitionMessages:w.trigger("transitionMessages",[w.state("enter",w.style({opacity:1,transform:"translateY(0%)"})),w.transition("void => enter",[w.style({opacity:0,transform:"translateY(-100%)"}),w.animate("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},Xt=function(){};function Zt(){return Error("Placeholder attribute and child element were both specified.")}function Jt(t){return Error("A hint was already declared for 'align=\""+t+"\"'.")}function te(){return Error("mat-form-field must contain a MatFormFieldControl.")}var ee=0,ne=function(){function t(){this.align="start",this.id="mat-hint-"+ee++}return t.decorators=[{type:e.Directive,args:[{selector:"mat-hint",host:{class:"mat-hint","[class.mat-right]":'align == "end"',"[attr.id]":"id","[attr.align]":"null"}}]}],t.ctorParameters=function(){return[]},t.propDecorators={align:[{type:e.Input}],id:[{type:e.Input}]},t}(),re=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-label"}]}],t.ctorParameters=function(){return[]},t}(),ie=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-placeholder"}]}],t.ctorParameters=function(){return[]},t}(),oe=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[matPrefix]"}]}],t.ctorParameters=function(){return[]},t}(),ae=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[matSuffix]"}]}],t.ctorParameters=function(){return[]},t}(),se=function(t){this._elementRef=t},le=tt(se,"primary"),ce=0,ue=function(t){function n(e,n,r){var i=t.call(this,e)||this;return i._elementRef=e,i._changeDetectorRef=n,i._showAlwaysAnimate=!1,i._subscriptAnimationState="",i._hintLabel="",i._hintLabelId="mat-hint-"+ce++,i._labelOptions=r||{},i.floatLabel=i._labelOptions.float||"auto",i}return Y(n,t),Object.defineProperty(n.prototype,"dividerColor",{get:function(){return this.color},set:function(t){this.color=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hideRequiredMarker",{get:function(){return this._hideRequiredMarker},set:function(t){this._hideRequiredMarker=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_shouldAlwaysFloat",{get:function(){return"always"===this._floatLabel&&!this._showAlwaysAnimate},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_canLabelFloat",{get:function(){return"never"!==this._floatLabel},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hintLabel",{get:function(){return this._hintLabel},set:function(t){this._hintLabel=t,this._processHints()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"floatPlaceholder",{get:function(){return this._floatLabel},set:function(t){this.floatLabel=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"floatLabel",{get:function(){return this._floatLabel},set:function(t){t!==this._floatLabel&&(this._floatLabel=t||this._labelOptions.float||"auto",this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){var t=this;this._validateControlChild(),this._control.controlType&&this._elementRef.nativeElement.classList.add("mat-form-field-type-"+this._control.controlType),this._control.stateChanges.pipe(_.startWith(null)).subscribe(function(){t._validatePlaceholders(),t._syncDescribedByIds(),t._changeDetectorRef.markForCheck()});var e=this._control.ngControl;e&&e.valueChanges&&e.valueChanges.subscribe(function(){t._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(_.startWith(null)).subscribe(function(){t._processHints(),t._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(_.startWith(null)).subscribe(function(){t._syncDescribedByIds(),t._changeDetectorRef.markForCheck()})},n.prototype.ngAfterContentChecked=function(){this._validateControlChild()},n.prototype.ngAfterViewInit=function(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()},n.prototype._shouldForward=function(t){var e=this._control?this._control.ngControl:null;return e&&e[t]},n.prototype._hasPlaceholder=function(){return!(!this._control.placeholder&&!this._placeholderChild)},n.prototype._hasLabel=function(){return!!this._labelChild},n.prototype._shouldLabelFloat=function(){return this._canLabelFloat&&(this._control.shouldLabelFloat||this._control.shouldPlaceholderFloat||this._shouldAlwaysFloat)},n.prototype._hideControlPlaceholder=function(){return!this._hasLabel()||!this._shouldLabelFloat()},n.prototype._hasFloatingLabel=function(){return this._hasLabel()||this._hasPlaceholder()},n.prototype._getDisplayedMessages=function(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"},n.prototype._animateAndLockLabel=function(){var t=this;this._hasFloatingLabel()&&this._canLabelFloat&&(this._showAlwaysAnimate=!0,this._floatLabel="always",b.fromEvent(this._label.nativeElement,"transitionend").pipe(f.take(1)).subscribe(function(){t._showAlwaysAnimate=!1}),this._changeDetectorRef.markForCheck())},n.prototype._validatePlaceholders=function(){if(this._control.placeholder&&this._placeholderChild)throw Zt()},n.prototype._processHints=function(){this._validateHints(),this._syncDescribedByIds()},n.prototype._validateHints=function(){var t,e,n=this;this._hintChildren&&this._hintChildren.forEach(function(r){if("start"===r.align){if(t||n.hintLabel)throw Jt("start");t=r}else if("end"===r.align){if(e)throw Jt("end");e=r}})},n.prototype._syncDescribedByIds=function(){if(this._control){var t=[];if("hint"===this._getDisplayedMessages()){var e=this._hintChildren?this._hintChildren.find(function(t){return"start"===t.align}):null,n=this._hintChildren?this._hintChildren.find(function(t){return"end"===t.align}):null;e?t.push(e.id):this._hintLabel&&t.push(this._hintLabelId),n&&t.push(n.id)}else this._errorChildren&&(t=this._errorChildren.map(function(t){return t.id}));this._control.setDescribedByIds(t)}},n.prototype._validateControlChild=function(){if(!this._control)throw te()},n.decorators=[{type:e.Component,args:[{selector:"mat-input-container, mat-form-field",exportAs:"matFormField",template:'<div class="mat-input-wrapper mat-form-field-wrapper"><div class="mat-input-flex mat-form-field-flex" #connectionContainer (click)="_control.onContainerClick && _control.onContainerClick($event)"><div class="mat-input-prefix mat-form-field-prefix" *ngIf="_prefixChildren.length"><ng-content select="[matPrefix]"></ng-content></div><div class="mat-input-infix mat-form-field-infix" #inputContainer><ng-content></ng-content><span class="mat-form-field-label-wrapper mat-input-placeholder-wrapper mat-form-field-placeholder-wrapper"><label class="mat-form-field-label mat-input-placeholder mat-form-field-placeholder" [attr.for]="_control.id" [attr.aria-owns]="_control.id" [class.mat-empty]="_control.empty && !_shouldAlwaysFloat" [class.mat-form-field-empty]="_control.empty && !_shouldAlwaysFloat" [class.mat-accent]="color == \'accent\'" [class.mat-warn]="color == \'warn\'" #label *ngIf="_hasFloatingLabel()" [ngSwitch]="_hasLabel()"><ng-container *ngSwitchCase="false"><ng-content select="mat-placeholder"></ng-content>{{_control.placeholder}}</ng-container><ng-content select="mat-label" *ngSwitchCase="true"></ng-content><span class="mat-placeholder-required mat-form-field-required-marker" aria-hidden="true" *ngIf="!hideRequiredMarker && _control.required && !_control.disabled">&nbsp;*</span></label></span></div><div class="mat-input-suffix mat-form-field-suffix" *ngIf="_suffixChildren.length"><ng-content select="[matSuffix]"></ng-content></div></div><div class="mat-input-underline mat-form-field-underline" #underline><span class="mat-input-ripple mat-form-field-ripple" [class.mat-accent]="color == \'accent\'" [class.mat-warn]="color == \'warn\'"></span></div><div class="mat-input-subscript-wrapper mat-form-field-subscript-wrapper" [ngSwitch]="_getDisplayedMessages()"><div *ngSwitchCase="\'error\'" [@transitionMessages]="_subscriptAnimationState"><ng-content select="mat-error"></ng-content></div><div class="mat-input-hint-wrapper mat-form-field-hint-wrapper" *ngSwitchCase="\'hint\'" [@transitionMessages]="_subscriptAnimationState"><div *ngIf="hintLabel" [id]="_hintLabelId" class="mat-hint">{{hintLabel}}</div><ng-content select="mat-hint:not([align=\'end\'])"></ng-content><div class="mat-input-hint-spacer mat-form-field-hint-spacer"></div><ng-content select="mat-hint[align=\'end\']"></ng-content></div></div></div>',styles:[".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none}.mat-form-field-prefix .mat-icon,.mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-prefix .mat-icon-button,.mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform:perspective(100px);-ms-transform:none;transform-origin:0 0;transition:transform .4s cubic-bezier(.25,.8,.25,1),color .4s cubic-bezier(.25,.8,.25,1),width .4s cubic-bezier(.25,.8,.25,1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label,.mat-form-field-empty.mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-placeholder-wrapper .mat-form-field-placeholder,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-placeholder-wrapper .mat-form-field-placeholder{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-placeholder-wrapper .mat-form-field-placeholder,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-placeholder-wrapper .mat-form-field-placeholder{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;height:1px;width:100%}.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.mat-form-field-underline .mat-form-field-ripple{position:absolute;top:0;left:0;width:100%;height:2px;transform-origin:50%;transform:scaleX(.5);visibility:hidden;opacity:0;transition:background-color .3s cubic-bezier(.55,0,.55,.2)}.mat-form-field-invalid:not(.mat-focused) .mat-form-field-underline .mat-form-field-ripple{height:1px}.mat-focused .mat-form-field-underline .mat-form-field-ripple,.mat-form-field-invalid .mat-form-field-underline .mat-form-field-ripple{visibility:visible;opacity:1;transform:scaleX(1);transition:transform .3s cubic-bezier(.25,.8,.25,1),opacity .1s cubic-bezier(.25,.8,.25,1),background-color .3s cubic-bezier(.25,.8,.25,1)}.mat-form-field-subscript-wrapper{position:absolute;width:100%;overflow:hidden}.mat-form-field-label-wrapper .mat-icon,.mat-form-field-subscript-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block} .mat-input-element{font:inherit;background:0 0;color:currentColor;border:none;outline:0;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element[type=date]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=month]::after,.mat-input-element[type=time]::after,.mat-input-element[type=week]::after{content:' ';white-space:pre;width:1px}.mat-input-element::placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-input-element::-moz-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-input-element::-webkit-input-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-input-element:-ms-input-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent!important;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent!important;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent!important;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent!important;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-autosize{resize:none}"],animations:[Qt.transitionMessages],host:{class:"mat-input-container mat-form-field","[class.mat-input-invalid]":"_control.errorState","[class.mat-form-field-invalid]":"_control.errorState","[class.mat-form-field-can-float]":"_canLabelFloat","[class.mat-form-field-should-float]":"_shouldLabelFloat()","[class.mat-form-field-hide-placeholder]":"_hideControlPlaceholder()","[class.mat-form-field-disabled]":"_control.disabled","[class.mat-focused]":"_control.focused","[class.ng-untouched]":'_shouldForward("untouched")',"[class.ng-touched]":'_shouldForward("touched")',"[class.ng-pristine]":'_shouldForward("pristine")',"[class.ng-dirty]":'_shouldForward("dirty")',"[class.ng-valid]":'_shouldForward("valid")',"[class.ng-invalid]":'_shouldForward("invalid")',"[class.ng-pending]":'_shouldForward("pending")'},inputs:["color"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[Yt]}]}]},n.propDecorators={dividerColor:[{type:e.Input}],hideRequiredMarker:[{type:e.Input}],hintLabel:[{type:e.Input}],floatPlaceholder:[{type:e.Input}],floatLabel:[{type:e.Input}],underlineRef:[{type:e.ViewChild,args:["underline"]}],_connectionContainerRef:[{type:e.ViewChild,args:["connectionContainer"]}],_inputContainerRef:[{type:e.ViewChild,args:["inputContainer"]}],_label:[{type:e.ViewChild,args:["label"]}],_control:[{type:e.ContentChild,args:[Xt]}],_placeholderChild:[{type:e.ContentChild,args:[ie]}],_labelChild:[{type:e.ContentChild,args:[re]}],_errorChildren:[{type:e.ContentChildren,args:[Kt]}],_hintChildren:[{type:e.ContentChildren,args:[ne]}],_prefixChildren:[{type:e.ContentChildren,args:[oe]}],_suffixChildren:[{type:e.ContentChildren,args:[ae]}]},n}(le),pe=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[Kt,ne,ue,ie,oe,ae,re],imports:[s.CommonModule,l.PlatformModule],exports:[Kt,ne,ue,ie,oe,ae,re]}]}],t.ctorParameters=function(){return[]},t}(),de=0,he=function(t,e){this.source=t,this.option=e},fe=function(){},me=et(fe),ge=new e.InjectionToken("mat-autocomplete-default-options"),ye=function(t){function n(n,r,i){var o=t.call(this)||this;return o._changeDetectorRef=n,o._elementRef=r,o.showPanel=!1,o._isOpen=!1,o.displayWith=null,o.optionSelected=new e.EventEmitter,o._classList={},o.id="mat-autocomplete-"+de++,o._autoActiveFirstOption=!(!i||void 0===i.autoActiveFirstOption)&&i.autoActiveFirstOption,o}return Y(n,t),Object.defineProperty(n.prototype,"isOpen",{get:function(){return this._isOpen&&this.showPanel},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"autoActiveFirstOption",{get:function(){return this._autoActiveFirstOption},set:function(t){this._autoActiveFirstOption=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"classList",{set:function(t){var e=this;t&&t.length&&(t.split(" ").forEach(function(t){return e._classList[t.trim()]=!0}),this._elementRef.nativeElement.className="")},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){this._keyManager=new u.ActiveDescendantKeyManager(this.options).withWrap(),this._setVisibility()},n.prototype._setScrollTop=function(t){this.panel&&(this.panel.nativeElement.scrollTop=t)},n.prototype._getScrollTop=function(){return this.panel?this.panel.nativeElement.scrollTop:0},n.prototype._setVisibility=function(){this.showPanel=!!this.options.length,this._classList["mat-autocomplete-visible"]=this.showPanel,this._classList["mat-autocomplete-hidden"]=!this.showPanel,this._changeDetectorRef.markForCheck()},n.prototype._emitSelectEvent=function(t){var e=new he(this,t);this.optionSelected.emit(e)},n.decorators=[{type:e.Component,args:[{selector:"mat-autocomplete",template:'<ng-template><div class="mat-autocomplete-panel" role="listbox" [id]="id" [ngClass]="_classList" #panel><ng-content></ng-content></div></ng-template>',styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative}.mat-autocomplete-panel:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"matAutocomplete",inputs:["disableRipple"],host:{class:"mat-autocomplete"},providers:[{provide:Ht,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[ge]}]}]},n.propDecorators={template:[{type:e.ViewChild,args:[e.TemplateRef]}],panel:[{type:e.ViewChild,args:["panel"]}],options:[{type:e.ContentChildren,args:[zt,{descendants:!0}]}],optionGroups:[{type:e.ContentChildren,args:[Vt]}],displayWith:[{type:e.Input}],autoActiveFirstOption:[{type:e.Input}],optionSelected:[{type:e.Output}],classList:[{type:e.Input,args:["class"]}]},n}(me),ve=new e.InjectionToken("mat-autocomplete-scroll-strategy");function be(t){return function(){return t.scrollStrategies.reposition()}}var _e={provide:ve,deps:[p.Overlay],useFactory:be},we={provide:v.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return xe}),multi:!0};function Ce(){return Error("Attempting to open an undefined instance of `mat-autocomplete`. Make sure that the id passed to the `matAutocomplete` is correct and that you're attempting to open it after the ngAfterContentInit hook.")}var xe=function(){function t(t,e,n,r,o,a,s,l,c){var u=this;this._element=t,this._overlay=e,this._viewContainerRef=n,this._zone=r,this._changeDetectorRef=o,this._scrollStrategy=a,this._dir=s,this._formField=l,this._document=c,this._componentDestroyed=!1,this._manuallyFloatingLabel=!1,this._closeKeyEventStream=new i.Subject,this._onChange=function(){},this._onTouched=function(){},this._panelOpen=!1,this.optionSelections=C.defer(function(){return u.autocomplete&&u.autocomplete.options?x.merge.apply(void 0,u.autocomplete.options.map(function(t){return t.onSelectionChange})):u._zone.onStable.asObservable().pipe(f.take(1),m.switchMap(function(){return u.optionSelections}))})}return t.prototype.ngOnDestroy=function(){this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()},Object.defineProperty(t.prototype,"panelOpen",{get:function(){return this._panelOpen&&this.autocomplete.showPanel},enumerable:!0,configurable:!0}),t.prototype.openPanel=function(){this._attachOverlay(),this._floatLabel()},t.prototype.closePanel=function(){this._resetLabel(),this._panelOpen&&(this.autocomplete._isOpen=this._panelOpen=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())},Object.defineProperty(t.prototype,"panelClosingActions",{get:function(){var t=this;return x.merge(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(h.filter(function(){return t._panelOpen})),this._closeKeyEventStream,this._outsideClickStream,this._overlayRef?this._overlayRef.detachments().pipe(h.filter(function(){return t._panelOpen})):S.of())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeOption",{get:function(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_outsideClickStream",{get:function(){var t=this;return this._document?x.merge(b.fromEvent(this._document,"click"),b.fromEvent(this._document,"touchend")).pipe(h.filter(function(e){var n=e.target,r=t._formField?t._formField._elementRef.nativeElement:null;return t._panelOpen&&n!==t._element.nativeElement&&(!r||!r.contains(n))&&!!t._overlayRef&&!t._overlayRef.overlayElement.contains(n)})):S.of(null)},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){var e=this;Promise.resolve(null).then(function(){return e._setTriggerValue(t)})},t.prototype.registerOnChange=function(t){this._onChange=t},t.prototype.registerOnTouched=function(t){this._onTouched=t},t.prototype.setDisabledState=function(t){this._element.nativeElement.disabled=t},t.prototype._handleKeydown=function(t){var e=t.keyCode;if(e===c.ESCAPE&&t.preventDefault(),this.panelOpen&&(e===c.ESCAPE||e===c.UP_ARROW&&t.altKey))this._resetActiveItem(),this._closeKeyEventStream.next(),t.stopPropagation();else if(this.activeOption&&e===c.ENTER&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else{var n=this.autocomplete._keyManager.activeItem,r=e===c.UP_ARROW||e===c.DOWN_ARROW;this.panelOpen||e===c.TAB?this.autocomplete._keyManager.onKeydown(t):r&&this._canOpen()&&this.openPanel(),(r||this.autocomplete._keyManager.activeItem!==n)&&this._scrollToOption()}},t.prototype._handleInput=function(t){var e=t.target,n=e.value;"number"===e.type&&(n=""==n?null:parseFloat(n)),this._canOpen()&&this._previousValue!==n&&document.activeElement===t.target&&(this._previousValue=n,this._onChange(n),this.openPanel())},t.prototype._handleFocus=function(){this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0))},t.prototype._floatLabel=function(t){void 0===t&&(t=!1),this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)},t.prototype._resetLabel=function(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)},t.prototype._scrollToOption=function(){var t=this.autocomplete._keyManager.activeItemIndex||0,e=Wt(t+Gt(t,this.autocomplete.options,this.autocomplete.optionGroups),48,this.autocomplete._getScrollTop(),256);this.autocomplete._setScrollTop(e)},t.prototype._subscribeToClosingActions=function(){var t=this,e=this._zone.onStable.asObservable().pipe(f.take(1)),n=this.autocomplete.options.changes.pipe(g.tap(function(){return t._positionStrategy.recalculateLastPosition()}),y.delay(0));return x.merge(e,n).pipe(m.switchMap(function(){return t._resetActiveItem(),t.autocomplete._setVisibility(),t.panelClosingActions}),f.take(1)).subscribe(function(e){return t._setValueAndClose(e)})},t.prototype._destroyPanel=function(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)},t.prototype._setTriggerValue=function(t){var e=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(t):t,n=null!=e?e:"";this._formField?this._formField._control.value=n:this._element.nativeElement.value=n},t.prototype._setValueAndClose=function(t){t&&t.source&&(this._clearPreviousSelectedOption(t.source),this._setTriggerValue(t.source.value),this._onChange(t.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(t.source)),this.closePanel()},t.prototype._clearPreviousSelectedOption=function(t){this.autocomplete.options.forEach(function(e){e!=t&&e.selected&&e.deselect()})},t.prototype._attachOverlay=function(){if(!this.autocomplete)throw Ce();this._overlayRef?this._overlayRef.updateSize({width:this._getHostWidth()}):(this._portal=new d.TemplatePortal(this.autocomplete.template,this._viewContainerRef),this._overlayRef=this._overlay.create(this._getOverlayConfig())),this._overlayRef&&!this._overlayRef.hasAttached()&&(this._overlayRef.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions()),this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._panelOpen=!0},t.prototype._getOverlayConfig=function(){return new p.OverlayConfig({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getHostWidth(),direction:this._dir?this._dir.value:"ltr"})},t.prototype._getOverlayPosition=function(){return this._positionStrategy=this._overlay.position().connectedTo(this._getConnectedElement(),{originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}).withFallbackPosition({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"}),this._positionStrategy},t.prototype._getConnectedElement=function(){return this._formField?this._formField._connectionContainerRef:this._element},t.prototype._getHostWidth=function(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width},t.prototype._resetActiveItem=function(){this.autocomplete._keyManager.setActiveItem(this.autocomplete.autoActiveFirstOption?0:-1)},t.prototype._canOpen=function(){var t=this._element.nativeElement;return!t.readOnly&&!t.disabled},t.decorators=[{type:e.Directive,args:[{selector:"input[matAutocomplete], textarea[matAutocomplete]",host:{role:"combobox",autocomplete:"off","aria-autocomplete":"list","[attr.aria-activedescendant]":"activeOption?.id","[attr.aria-expanded]":"panelOpen.toString()","[attr.aria-owns]":"autocomplete?.id","(focusin)":"_handleFocus()","(blur)":"_onTouched()","(input)":"_handleInput($event)","(keydown)":"_handleKeydown($event)"},exportAs:"matAutocompleteTrigger",providers:[we]}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:p.Overlay},{type:e.ViewContainerRef},{type:e.NgZone},{type:e.ChangeDetectorRef},{type:void 0,decorators:[{type:e.Inject,args:[ve]}]},{type:n.Directionality,decorators:[{type:e.Optional}]},{type:ue,decorators:[{type:e.Optional},{type:e.Host}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[s.DOCUMENT]}]}]},t.propDecorators={autocomplete:[{type:e.Input,args:["matAutocomplete"]}]},t}(),Se=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[qt,p.OverlayModule,Z,s.CommonModule],exports:[ye,qt,xe,Z],declarations:[ye,xe],providers:[_e]}]}],t.ctorParameters=function(){return[]},t}(),Ee="accent",ke="primary",Oe=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],Pe=function(t){this._elementRef=t},Ae=tt(J(et(Pe))),De=function(t){function n(e,n,r){var i=t.call(this,e)||this;i._platform=n,i._focusMonitor=r,i._isRoundButton=i._hasHostAttributes("mat-fab","mat-mini-fab"),i._isIconButton=i._hasHostAttributes("mat-icon-button");for(var o=0,a=Oe;o<a.length;o++){var s=a[o];i._hasHostAttributes(s)&&e.nativeElement.classList.add(s)}return i._focusMonitor.monitor(i._elementRef.nativeElement,!0),i._isRoundButton?i.color=Ee:i._hasHostAttributes("mat-flat-button")&&(i.color=ke),i}return Y(n,t),n.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)},n.prototype.focus=function(){this._getHostElement().focus()},n.prototype._getHostElement=function(){return this._elementRef.nativeElement},n.prototype._isRippleDisabled=function(){return this.disableRipple||this.disabled},n.prototype._hasHostAttributes=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!!this._platform.isBrowser&&e.some(function(e){return t._getHostElement().hasAttribute(e)})},n.decorators=[{type:e.Component,args:[{selector:"button[mat-button], button[mat-raised-button], button[mat-icon-button],\n             button[mat-fab], button[mat-mini-fab], button[mat-stroked-button],\n             button[mat-flat-button]",exportAs:"matButton",host:{"[disabled]":"disabled || null"},template:'<span class="mat-button-wrapper"><ng-content></ng-content></span><div matRipple class="mat-button-ripple" [class.mat-button-ripple-round]="_isRoundButton || _isIconButton" [matRippleDisabled]="_isRippleDisabled()" [matRippleCentered]="_isIconButton" [matRippleTrigger]="_getHostElement()"></div><div class="mat-button-focus-overlay"></div>',styles:[".mat-button,.mat-flat-button,.mat-icon-button,.mat-stroked-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px}.mat-button[disabled],.mat-flat-button[disabled],.mat-icon-button[disabled],.mat-stroked-button[disabled]{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner{border:0}.mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{transition:none;opacity:0}.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:1}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1)}.mat-raised-button[disabled]{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-raised-button:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-raised-button[disabled]{box-shadow:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button:not([class*=mat-elevation-z]){box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-flat-button:not([class*=mat-elevation-z]){box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab[disabled]{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-fab::-moz-focus-inner{border:0}.mat-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-fab[disabled]{box-shadow:none}.mat-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab[disabled]{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-mini-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-mini-fab[disabled]{box-shadow:none}.mat-mini-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-mini-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button .mat-icon,.mat-icon-button i{line-height:24px}.mat-button,.mat-fab,.mat-icon-button,.mat-mini-fab,.mat-raised-button{color:currentColor}.mat-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*{vertical-align:middle}.mat-button-focus-overlay,.mat-button-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-focus-overlay{background-color:rgba(0,0,0,.12);border-radius:inherit;opacity:0;transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1)}@media screen and (-ms-high-contrast:active){.mat-button-focus-overlay{background-color:rgba(255,255,255,.5)}}.mat-button-ripple-round{border-radius:50%;z-index:1}@media screen and (-ms-high-contrast:active){.mat-button,.mat-fab,.mat-flat-button,.mat-icon-button,.mat-mini-fab,.mat-raised-button{outline:solid 1px}}"],inputs:["disabled","disableRipple","color"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:l.Platform},{type:u.FocusMonitor}]},n.propDecorators={ripple:[{type:e.ViewChild,args:[Mt]}]},n}(Ae),Te=function(t){function n(e,n,r){return t.call(this,r,e,n)||this}return Y(n,t),n.prototype._haltDisabledEvents=function(t){this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())},n.decorators=[{type:e.Component,args:[{selector:"a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab],\n             a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]",exportAs:"matButton, matAnchor",host:{"[attr.tabindex]":"disabled ? -1 : 0","[attr.disabled]":"disabled || null","[attr.aria-disabled]":"disabled.toString()","(click)":"_haltDisabledEvents($event)"},inputs:["disabled","disableRipple","color"],template:'<span class="mat-button-wrapper"><ng-content></ng-content></span><div matRipple class="mat-button-ripple" [class.mat-button-ripple-round]="_isRoundButton || _isIconButton" [matRippleDisabled]="_isRippleDisabled()" [matRippleCentered]="_isIconButton" [matRippleTrigger]="_getHostElement()"></div><div class="mat-button-focus-overlay"></div>',styles:[".mat-button,.mat-flat-button,.mat-icon-button,.mat-stroked-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px}.mat-button[disabled],.mat-flat-button[disabled],.mat-icon-button[disabled],.mat-stroked-button[disabled]{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner{border:0}.mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{transition:none;opacity:0}.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:1}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1)}.mat-raised-button[disabled]{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-raised-button:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-raised-button[disabled]{box-shadow:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button:not([class*=mat-elevation-z]){box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-flat-button:not([class*=mat-elevation-z]){box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab[disabled]{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-fab::-moz-focus-inner{border:0}.mat-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-fab[disabled]{box-shadow:none}.mat-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab[disabled]{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-mini-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-mini-fab[disabled]{box-shadow:none}.mat-mini-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-mini-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button .mat-icon,.mat-icon-button i{line-height:24px}.mat-button,.mat-fab,.mat-icon-button,.mat-mini-fab,.mat-raised-button{color:currentColor}.mat-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*{vertical-align:middle}.mat-button-focus-overlay,.mat-button-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-focus-overlay{background-color:rgba(0,0,0,.12);border-radius:inherit;opacity:0;transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1)}@media screen and (-ms-high-contrast:active){.mat-button-focus-overlay{background-color:rgba(255,255,255,.5)}}.mat-button-ripple-round{border-radius:50%;z-index:1}@media screen and (-ms-high-contrast:active){.mat-button,.mat-fab,.mat-flat-button,.mat-icon-button,.mat-mini-fab,.mat-raised-button{outline:solid 1px}}"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:l.Platform},{type:u.FocusMonitor},{type:e.ElementRef}]},n}(De),Me=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,It,Z,u.A11yModule],exports:[De,Te,Z],declarations:[De,Te]}]}],t.ctorParameters=function(){return[]},t}(),Ie=function(){},Re=J(Ie),Ne={provide:v.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return Fe}),multi:!0},Le=0,je=function(){},Fe=function(t){function n(n){var r=t.call(this)||this;return r._changeDetector=n,r._controlValueAccessorChangeFn=function(){},r._onTouched=function(){},r._name="mat-button-toggle-group-"+Le++,r._vertical=!1,r._value=null,r.valueChange=new e.EventEmitter,r._selected=null,r.change=new e.EventEmitter,r}return Y(n,t),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},set:function(t){this._name=t,this._updateButtonToggleNames()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"vertical",{get:function(){return this._vertical},set:function(t){this._vertical=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(t){this._value!=t&&(this._value=t,this.valueChange.emit(t),this._updateSelectedButtonToggleFromValue())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t,this.value=t?t.value:null,t&&!t.checked&&(t.checked=!0)},enumerable:!0,configurable:!0}),n.prototype._updateButtonToggleNames=function(){var t=this;this._buttonToggles&&this._buttonToggles.forEach(function(e){e.name=t._name})},n.prototype._updateSelectedButtonToggleFromValue=function(){var t=this,e=null!=this._selected&&this._selected.value==this._value;if(null!=this._buttonToggles&&!e){var n=this._buttonToggles.filter(function(e){return e.value==t._value})[0];n?this.selected=n:null==this.value&&(this.selected=null,this._buttonToggles.forEach(function(t){t.checked=!1}))}},n.prototype._emitChangeEvent=function(){var t=new je;t.source=this._selected,t.value=this._value,this._controlValueAccessorChangeFn(t.value),this.change.emit(t)},n.prototype.writeValue=function(t){this.value=t,this._changeDetector.markForCheck()},n.prototype.registerOnChange=function(t){this._controlValueAccessorChangeFn=t},n.prototype.registerOnTouched=function(t){this._onTouched=t},n.prototype.setDisabledState=function(t){this.disabled=t,this._markButtonTogglesForCheck()},n.prototype._markButtonTogglesForCheck=function(){this._buttonToggles&&this._buttonToggles.forEach(function(t){return t._markForCheck()})},n.decorators=[{type:e.Directive,args:[{selector:"mat-button-toggle-group:not([multiple])",providers:[Ne],inputs:["disabled"],host:{role:"radiogroup",class:"mat-button-toggle-group","[class.mat-button-toggle-vertical]":"vertical"},exportAs:"matButtonToggleGroup"}]}],n.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},n.propDecorators={_buttonToggles:[{type:e.ContentChildren,args:[e.forwardRef(function(){return Be})]}],name:[{type:e.Input}],vertical:[{type:e.Input}],value:[{type:e.Input}],valueChange:[{type:e.Output}],selected:[{type:e.Input}],change:[{type:e.Output}]},n}(Re),Ve=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._vertical=!1,e}return Y(n,t),Object.defineProperty(n.prototype,"vertical",{get:function(){return this._vertical},set:function(t){this._vertical=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),n.decorators=[{type:e.Directive,args:[{selector:"mat-button-toggle-group[multiple]",exportAs:"matButtonToggleGroup",inputs:["disabled"],host:{class:"mat-button-toggle-group","[class.mat-button-toggle-vertical]":"vertical",role:"group"}}]}],n.ctorParameters=function(){return[]},n.propDecorators={vertical:[{type:e.Input}]},n}(Re),Be=function(){function t(t,n,r,i,o,a){var s=this;this._changeDetectorRef=r,this._buttonToggleDispatcher=i,this._elementRef=o,this._focusMonitor=a,this.ariaLabel="",this.ariaLabelledby=null,this._isSingleSelector=!1,this._removeUniqueSelectionListener=function(){},this._checked=!1,this._value=null,this._disabled=!1,this.change=new e.EventEmitter,this.buttonToggleGroup=t,this.buttonToggleGroupMultiple=n,this.buttonToggleGroup?(this._removeUniqueSelectionListener=i.listen(function(t,e){t!=s.id&&e==s.name&&(s.checked=!1,s._changeDetectorRef.markForCheck())}),this._type="radio",this.name=this.buttonToggleGroup.name,this._isSingleSelector=!0):(this._type="checkbox",this._isSingleSelector=!1)}return Object.defineProperty(t.prototype,"inputId",{get:function(){return this.id+"-input"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(t){this._isSingleSelector&&t&&(this._buttonToggleDispatcher.notify(this.id,this.name),this._changeDetectorRef.markForCheck()),this._checked=t,t&&this._isSingleSelector&&this.buttonToggleGroup.value!=this.value&&(this.buttonToggleGroup.selected=this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this._value!=t&&(null!=this.buttonToggleGroup&&this.checked&&(this.buttonToggleGroup.value=t),this._value=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||null!=this.buttonToggleGroup&&this.buttonToggleGroup.disabled||null!=this.buttonToggleGroupMultiple&&this.buttonToggleGroupMultiple.disabled},set:function(t){this._disabled=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){null==this.id&&(this.id="mat-button-toggle-"+Le++),this.buttonToggleGroup&&this._value==this.buttonToggleGroup.value&&(this._checked=!0),this._focusMonitor.monitor(this._elementRef.nativeElement,!0)},t.prototype.focus=function(){this._inputElement.nativeElement.focus()},t.prototype._toggle=function(){this.checked=!this.checked},t.prototype._onInputChange=function(t){if(t.stopPropagation(),this._isSingleSelector){var e=this.buttonToggleGroup.selected!=this;this.checked=!0,this.buttonToggleGroup.selected=this,this.buttonToggleGroup._onTouched(),e&&this.buttonToggleGroup._emitChangeEvent()}else this._toggle();this._emitChangeEvent()},t.prototype._onInputClick=function(t){t.stopPropagation()},t.prototype._emitChangeEvent=function(){var t=new je;t.source=this,t.value=this._value,this.change.emit(t)},t.prototype.ngOnDestroy=function(){this._removeUniqueSelectionListener()},t.prototype._markForCheck=function(){this._changeDetectorRef.markForCheck()},t.decorators=[{type:e.Component,args:[{selector:"mat-button-toggle",template:'<label [attr.for]="inputId" class="mat-button-toggle-label"><input #input class="mat-button-toggle-input cdk-visually-hidden" [type]="_type" [id]="inputId" [checked]="checked" [disabled]="disabled || null" [attr.name]="name" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledby" (change)="_onInputChange($event)" (click)="_onInputClick($event)"><div class="mat-button-toggle-label-content"><ng-content></ng-content></div></label><div class="mat-button-toggle-focus-overlay"></div>',styles:[".mat-button-toggle-group,.mat-button-toggle-standalone{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);position:relative;display:inline-flex;flex-direction:row;border-radius:2px;cursor:pointer;white-space:nowrap;overflow:hidden}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle-disabled .mat-button-toggle-label-content{cursor:default}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay,.mat-button-toggle.cdk-program-focused .mat-button-toggle-focus-overlay{opacity:1}.mat-button-toggle-label-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;cursor:pointer}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{border-radius:inherit;pointer-events:none;opacity:0;top:0;left:0;right:0;bottom:0;position:absolute}"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,exportAs:"matButtonToggle",changeDetection:e.ChangeDetectionStrategy.OnPush,host:{"[class.mat-button-toggle-standalone]":"!buttonToggleGroup && !buttonToggleGroupMultiple","[class.mat-button-toggle-checked]":"checked","[class.mat-button-toggle-disabled]":"disabled",class:"mat-button-toggle","[attr.id]":"id"}}]}],t.ctorParameters=function(){return[{type:Fe,decorators:[{type:e.Optional}]},{type:Ve,decorators:[{type:e.Optional}]},{type:e.ChangeDetectorRef},{type:E.UniqueSelectionDispatcher},{type:e.ElementRef},{type:u.FocusMonitor}]},t.propDecorators={ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],_inputElement:[{type:e.ViewChild,args:["input"]}],id:[{type:e.Input}],name:[{type:e.Input}],checked:[{type:e.Input}],value:[{type:e.Input}],disabled:[{type:e.Input}],change:[{type:e.Output}]},t}(),Ue=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[Z,u.A11yModule],exports:[Fe,Ve,Be,Z],declarations:[Fe,Ve,Be],providers:[E.UNIQUE_SELECTION_DISPATCHER_PROVIDER]}]}],t.ctorParameters=function(){return[]},t}(),He=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-card-content",host:{class:"mat-card-content"}}]}],t.ctorParameters=function(){return[]},t}(),ze=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-card-title, [mat-card-title], [matCardTitle]",host:{class:"mat-card-title"}}]}],t.ctorParameters=function(){return[]},t}(),Ge=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]",host:{class:"mat-card-subtitle"}}]}],t.ctorParameters=function(){return[]},t}(),We=function(){function t(){this.align="start"}return t.decorators=[{type:e.Directive,args:[{selector:"mat-card-actions",exportAs:"matCardActions",host:{class:"mat-card-actions","[class.mat-card-actions-align-end]":'align === "end"'}}]}],t.ctorParameters=function(){return[]},t.propDecorators={align:[{type:e.Input}]},t}(),qe=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-card-footer",host:{class:"mat-card-footer"}}]}],t.ctorParameters=function(){return[]},t}(),Ye=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-card-image], [matCardImage]",host:{class:"mat-card-image"}}]}],t.ctorParameters=function(){return[]},t}(),$e=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-card-sm-image], [matCardImageSmall]",host:{class:"mat-card-sm-image"}}]}],t.ctorParameters=function(){return[]},t}(),Ke=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-card-md-image], [matCardImageMedium]",host:{class:"mat-card-md-image"}}]}],t.ctorParameters=function(){return[]},t}(),Qe=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-card-lg-image], [matCardImageLarge]",host:{class:"mat-card-lg-image"}}]}],t.ctorParameters=function(){return[]},t}(),Xe=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-card-xl-image], [matCardImageXLarge]",host:{class:"mat-card-xl-image"}}]}],t.ctorParameters=function(){return[]},t}(),Ze=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-card-avatar], [matCardAvatar]",host:{class:"mat-card-avatar"}}]}],t.ctorParameters=function(){return[]},t}(),Je=function(){function t(){}return t.decorators=[{type:e.Component,args:[{selector:"mat-card",exportAs:"matCard",template:'<ng-content></ng-content><ng-content select="mat-card-footer"></ng-content>',styles:[".mat-card{transition:box-shadow 280ms cubic-bezier(.4,0,.2,1);display:block;position:relative;padding:24px;border-radius:2px}.mat-card:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-card .mat-divider{position:absolute;left:0;width:100%}[dir=rtl] .mat-card .mat-divider{left:auto;right:0}.mat-card .mat-divider.mat-divider-inset{position:static;margin:0}@media screen and (-ms-high-contrast:active){.mat-card{outline:solid 1px}}.mat-card-flat{box-shadow:none}.mat-card-actions,.mat-card-content,.mat-card-subtitle,.mat-card-title{display:block;margin-bottom:16px}.mat-card-actions{margin-left:-16px;margin-right:-16px;padding:8px 0}.mat-card-actions-align-end{display:flex;justify-content:flex-end}.mat-card-image{width:calc(100% + 48px);margin:0 -24px 16px -24px}.mat-card-xl-image{width:240px;height:240px;margin:-8px}.mat-card-footer{display:block;margin:0 -24px -24px -24px}.mat-card-actions .mat-button,.mat-card-actions .mat-raised-button{margin:0 4px}.mat-card-header{display:flex;flex-direction:row}.mat-card-header-text{margin:0 8px}.mat-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0}.mat-card-lg-image,.mat-card-md-image,.mat-card-sm-image{margin:-8px 0}.mat-card-title-group{display:flex;justify-content:space-between;margin:0 -8px}.mat-card-sm-image{width:80px;height:80px}.mat-card-md-image{width:112px;height:112px}.mat-card-lg-image{width:152px;height:152px}@media (max-width:599px){.mat-card{padding:24px 16px}.mat-card-actions{margin-left:-8px;margin-right:-8px}.mat-card-image{width:calc(100% + 32px);margin:16px -16px}.mat-card-title-group{margin:0}.mat-card-xl-image{margin-left:0;margin-right:0}.mat-card-header{margin:-8px 0 0 0}.mat-card-footer{margin-left:-16px;margin-right:-16px}}.mat-card-content>:first-child,.mat-card>:first-child{margin-top:0}.mat-card-content>:last-child:not(.mat-card-footer),.mat-card>:last-child:not(.mat-card-footer){margin-bottom:0}.mat-card-image:first-child{margin-top:-24px}.mat-card>.mat-card-actions:last-child{margin-bottom:-16px;padding-bottom:0}.mat-card-actions .mat-button:first-child,.mat-card-actions .mat-raised-button:first-child{margin-left:0;margin-right:0}.mat-card-subtitle:not(:first-child),.mat-card-title:not(:first-child){margin-top:-4px}.mat-card-header .mat-card-subtitle:not(:first-child){margin-top:-8px}.mat-card>.mat-card-xl-image:first-child{margin-top:-8px}.mat-card>.mat-card-xl-image:last-child{margin-bottom:-8px}"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,host:{class:"mat-card"}}]}],t.ctorParameters=function(){return[]},t}(),tn=function(){function t(){}return t.decorators=[{type:e.Component,args:[{selector:"mat-card-header",template:'<ng-content select="[mat-card-avatar], [matCardAvatar]"></ng-content><div class="mat-card-header-text"><ng-content select="mat-card-title, mat-card-subtitle, [mat-card-title], [mat-card-subtitle], [matCardTitle], [matCardSubtitle]"></ng-content></div><ng-content></ng-content>',encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,host:{class:"mat-card-header"}}]}],t.ctorParameters=function(){return[]},t}(),en=function(){function t(){}return t.decorators=[{type:e.Component,args:[{selector:"mat-card-title-group",template:'<div><ng-content select="mat-card-title, mat-card-subtitle, [mat-card-title], [mat-card-subtitle], [matCardTitle], [matCardSubtitle]"></ng-content></div><ng-content select="img"></ng-content><ng-content></ng-content>',encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,host:{class:"mat-card-title-group"}}]}],t.ctorParameters=function(){return[]},t}(),nn=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[Z],exports:[Je,tn,en,He,ze,Ge,We,qe,$e,Ke,Qe,Ye,Xe,Ze,Z],declarations:[Je,tn,en,He,ze,Ge,We,qe,$e,Ke,Qe,Ye,Xe,Ze]}]}],t.ctorParameters=function(){return[]},t}(),rn=new e.InjectionToken("mat-checkbox-click-action"),on=0,an={provide:v.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return pn}),multi:!0},sn={Init:0,Checked:1,Unchecked:2,Indeterminate:3};sn[sn.Init]="Init",sn[sn.Checked]="Checked",sn[sn.Unchecked]="Unchecked",sn[sn.Indeterminate]="Indeterminate";var ln=function(){},cn=function(t){this._elementRef=t},un=nt(tt(et(J(cn)),"accent")),pn=function(t){function n(n,r,i,o,a){var s=t.call(this,n)||this;return s._changeDetectorRef=r,s._focusMonitor=i,s._clickAction=a,s.ariaLabel="",s.ariaLabelledby=null,s._uniqueId="mat-checkbox-"+ ++on,s.id=s._uniqueId,s.labelPosition="after",s.name=null,s.change=new e.EventEmitter,s.indeterminateChange=new e.EventEmitter,s._onTouched=function(){},s._currentAnimationClass="",s._currentCheckState=sn.Init,s._controlValueAccessorChangeFn=function(){},s._checked=!1,s._indeterminate=!1,s.tabIndex=parseInt(o)||0,s}return Y(n,t),Object.defineProperty(n.prototype,"inputId",{get:function(){return(this.id||this._uniqueId)+"-input"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(t){this._required=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"align",{get:function(){return"after"==this.labelPosition?"start":"end"},set:function(t){this.labelPosition="start"==t?"after":"before"},enumerable:!0,configurable:!0}),n.prototype.ngAfterViewInit=function(){var t=this;this._focusMonitor.monitor(this._inputElement.nativeElement).subscribe(function(e){return t._onInputFocusChange(e)})},n.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._inputElement.nativeElement)},Object.defineProperty(n.prototype,"checked",{get:function(){return this._checked},set:function(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"indeterminate",{get:function(){return this._indeterminate},set:function(t){var e=t!=this._indeterminate;this._indeterminate=t,e&&(this._indeterminate?this._transitionCheckState(sn.Indeterminate):this._transitionCheckState(this.checked?sn.Checked:sn.Unchecked),this.indeterminateChange.emit(this._indeterminate))},enumerable:!0,configurable:!0}),n.prototype._isRippleDisabled=function(){return this.disableRipple||this.disabled},n.prototype._onLabelTextChange=function(){this._changeDetectorRef.markForCheck()},n.prototype.writeValue=function(t){this.checked=!!t},n.prototype.registerOnChange=function(t){this._controlValueAccessorChangeFn=t},n.prototype.registerOnTouched=function(t){this._onTouched=t},n.prototype.setDisabledState=function(t){this.disabled=t,this._changeDetectorRef.markForCheck()},n.prototype._getAriaChecked=function(){return this.checked?"true":this.indeterminate?"mixed":"false"},n.prototype._transitionCheckState=function(t){var e=this._currentCheckState,n=this._elementRef.nativeElement;e!==t&&(this._currentAnimationClass.length>0&&n.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(e,t),this._currentCheckState=t,this._currentAnimationClass.length>0&&n.classList.add(this._currentAnimationClass))},n.prototype._emitChangeEvent=function(){var t=new ln;t.source=this,t.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(t)},n.prototype._onInputFocusChange=function(t){this._focusRipple||"keyboard"!==t?t||(this._removeFocusRipple(),this._onTouched()):this._focusRipple=this.ripple.launch(0,0,{persistent:!0})},n.prototype.toggle=function(){this.checked=!this.checked},n.prototype._onInputClick=function(t){var e=this;t.stopPropagation(),this.disabled||"noop"===this._clickAction?this.disabled||"noop"!==this._clickAction||(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==this._clickAction&&Promise.resolve().then(function(){e._indeterminate=!1,e.indeterminateChange.emit(e._indeterminate)}),this.toggle(),this._transitionCheckState(this._checked?sn.Checked:sn.Unchecked),this._emitChangeEvent())},n.prototype.focus=function(){this._focusMonitor.focusVia(this._inputElement.nativeElement,"keyboard")},n.prototype._onInteractionEvent=function(t){t.stopPropagation()},n.prototype._getAnimationClassForCheckStateTransition=function(t,e){var n="";switch(t){case sn.Init:if(e===sn.Checked)n="unchecked-checked";else{if(e!=sn.Indeterminate)return"";n="unchecked-indeterminate"}break;case sn.Unchecked:n=e===sn.Checked?"unchecked-checked":"unchecked-indeterminate";break;case sn.Checked:n=e===sn.Unchecked?"checked-unchecked":"checked-indeterminate";break;case sn.Indeterminate:n=e===sn.Checked?"indeterminate-checked":"indeterminate-unchecked"}return"mat-checkbox-anim-"+n},n.prototype._removeFocusRipple=function(){this._focusRipple&&(this._focusRipple.fadeOut(),this._focusRipple=null)},n.decorators=[{type:e.Component,args:[{selector:"mat-checkbox",template:'<label [attr.for]="inputId" class="mat-checkbox-layout" #label><div class="mat-checkbox-inner-container" [class.mat-checkbox-inner-container-no-side-margin]="!checkboxLabel.textContent || !checkboxLabel.textContent.trim()"><input #input class="mat-checkbox-input cdk-visually-hidden" type="checkbox" [id]="inputId" [required]="required" [checked]="checked" [attr.value]="value" [disabled]="disabled" [attr.name]="name" [tabIndex]="tabIndex" [indeterminate]="indeterminate" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledby" [attr.aria-checked]="_getAriaChecked()" (change)="_onInteractionEvent($event)" (click)="_onInputClick($event)"><div matRipple class="mat-checkbox-ripple" [matRippleTrigger]="label" [matRippleDisabled]="_isRippleDisabled()" [matRippleRadius]="25" [matRippleCentered]="true" [matRippleAnimation]="{enterDuration: 150}"></div><div class="mat-checkbox-frame"></div><div class="mat-checkbox-background"><svg version="1.1" focusable="false" class="mat-checkbox-checkmark" viewBox="0 0 24 24" xml:space="preserve"><path class="mat-checkbox-checkmark-path" fill="none" stroke="white" d="M4.1,12.7 9,17.6 20.3,6.3"/></svg><div class="mat-checkbox-mixedmark"></div></div></div><span class="mat-checkbox-label" #checkboxLabel (cdkObserveContent)="_onLabelTextChange()"><span style="display:none">&nbsp;</span><ng-content></ng-content></span></label>',styles:["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.91026}50%{animation-timing-function:cubic-bezier(0,0,.2,.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0,0,0,1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(.4,0,1,1);stroke-dashoffset:0}to{stroke-dashoffset:-22.91026}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0,0,.2,.1);opacity:1;transform:rotate(0)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(.14,0,0,1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0,0,.2,.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(.14,0,0,1);opacity:1;transform:rotate(0)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}100%,32.8%{opacity:0;transform:scaleX(0)}}.mat-checkbox-checkmark,.mat-checkbox-mixedmark{width:calc(100% - 4px)}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);cursor:pointer}.mat-checkbox-layout{cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-inner-container{display:inline-block;height:20px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:20px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0,0,.2,.1);border-width:2px;border-style:solid}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0,0,.2,.1),opacity 90ms cubic-bezier(0,0,.2,.1)}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.91026;stroke-dasharray:22.91026;stroke-width:2.66667px}.mat-checkbox-mixedmark{height:2px;opacity:0;transform:scaleX(0) rotate(0)}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0s mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0s mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0s mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0s mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0s mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:.5s linear 0s mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:.5s linear 0s mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:.3s linear 0s mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox-ripple{position:absolute;left:calc(50% - 25px);top:calc(50% - 25px);height:50px;width:50px;z-index:1;pointer-events:none}"],exportAs:"matCheckbox",host:{class:"mat-checkbox","[id]":"id","[class.mat-checkbox-indeterminate]":"indeterminate","[class.mat-checkbox-checked]":"checked","[class.mat-checkbox-disabled]":"disabled","[class.mat-checkbox-label-before]":'labelPosition == "before"'},providers:[an],inputs:["disabled","disableRipple","color","tabIndex"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:u.FocusMonitor},{type:void 0,decorators:[{type:e.Attribute,args:["tabindex"]}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[rn]}]}]},n.propDecorators={ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],id:[{type:e.Input}],required:[{type:e.Input}],align:[{type:e.Input}],labelPosition:[{type:e.Input}],name:[{type:e.Input}],change:[{type:e.Output}],indeterminateChange:[{type:e.Output}],value:[{type:e.Input}],_inputElement:[{type:e.ViewChild,args:["input"]}],ripple:[{type:e.ViewChild,args:[Mt]}],checked:[{type:e.Input}],indeterminate:[{type:e.Input}]},n}(un),dn={provide:v.NG_VALIDATORS,useExisting:e.forwardRef(function(){return hn}),multi:!0},hn=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Directive,args:[{selector:"mat-checkbox[required][formControlName],\n             mat-checkbox[required][formControl], mat-checkbox[required][ngModel]",providers:[dn],host:{"[attr.required]":'required ? "" : null'}}]}],n.ctorParameters=function(){return[]},n}(v.CheckboxRequiredValidator),fn=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,It,Z,k.ObserversModule,u.A11yModule],exports:[pn,hn,Z],declarations:[pn,hn]}]}],t.ctorParameters=function(){return[]},t}(),mn=function(t,e,n){void 0===n&&(n=!1),this.source=t,this.selected=e,this.isUserInput=n},gn=function(t){this._elementRef=t},yn=tt(J(gn),"primary"),vn=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-basic-chip, [mat-basic-chip]",host:{class:"mat-basic-chip"}}]}],t.ctorParameters=function(){return[]},t}(),bn=function(t){function n(n){var r=t.call(this,n)||this;return r._elementRef=n,r._hasFocus=!1,r._selected=!1,r._selectable=!0,r._removable=!0,r._onFocus=new i.Subject,r._onBlur=new i.Subject,r.selectionChange=new e.EventEmitter,r.destroyed=new e.EventEmitter,r.destroy=r.destroyed,r.removed=new e.EventEmitter,r.onRemove=r.removed,r}return Y(n,t),Object.defineProperty(n.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=r.coerceBooleanProperty(t),this.selectionChange.emit({source:this,isUserInput:!1,selected:t})},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return null!=this._value?this._value:this._elementRef.nativeElement.textContent},set:function(t){this._value=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectable",{get:function(){return this._selectable},set:function(t){this._selectable=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"removable",{get:function(){return this._removable},set:function(t){this._removable=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"ariaSelected",{get:function(){return this.selectable?this.selected.toString():null},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this.destroyed.emit({chip:this})},n.prototype.select=function(){this._selected=!0,this.selectionChange.emit({source:this,isUserInput:!1,selected:!0})},n.prototype.deselect=function(){this._selected=!1,this.selectionChange.emit({source:this,isUserInput:!1,selected:!1})},n.prototype.selectViaInteraction=function(){this._selected=!0,this.selectionChange.emit({source:this,isUserInput:!0,selected:!0})},n.prototype.toggleSelected=function(t){return void 0===t&&(t=!1),this._selected=!this.selected,this.selectionChange.emit({source:this,isUserInput:t,selected:this._selected}),this.selected},n.prototype.focus=function(){this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})},n.prototype.remove=function(){this.removable&&this.removed.emit({chip:this})},n.prototype._handleClick=function(t){this.disabled||(t.preventDefault(),t.stopPropagation(),this.focus())},n.prototype._handleKeydown=function(t){if(!this.disabled)switch(t.keyCode){case c.DELETE:case c.BACKSPACE:this.remove(),t.preventDefault();break;case c.SPACE:this.selectable&&this.toggleSelected(!0),t.preventDefault()}},n.prototype._blur=function(){this._hasFocus=!1,this._onBlur.next({chip:this})},n.decorators=[{type:e.Directive,args:[{selector:"mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]",inputs:["color","disabled"],exportAs:"matChip",host:{class:"mat-chip","[attr.tabindex]":"disabled ? null : -1",role:"option","[class.mat-chip-selected]":"selected","[attr.disabled]":"disabled || null","[attr.aria-disabled]":"disabled.toString()","[attr.aria-selected]":"ariaSelected","(click)":"_handleClick($event)","(keydown)":"_handleKeydown($event)","(focus)":"_hasFocus = true","(blur)":"_blur()"}}]}],n.ctorParameters=function(){return[{type:e.ElementRef}]},n.propDecorators={selected:[{type:e.Input}],value:[{type:e.Input}],selectable:[{type:e.Input}],removable:[{type:e.Input}],selectionChange:[{type:e.Output}],destroyed:[{type:e.Output}],destroy:[{type:e.Output}],removed:[{type:e.Output}],onRemove:[{type:e.Output,args:["remove"]}]},n}(yn),_n=function(){function t(t){this._parentChip=t}return t.prototype._handleClick=function(){this._parentChip.removable&&this._parentChip.remove()},t.decorators=[{type:e.Directive,args:[{selector:"[matChipRemove]",host:{class:"mat-chip-remove","(click)":"_handleClick()"}}]}],t.ctorParameters=function(){return[{type:bn}]},t}(),wn=function(t,e,n,r){this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=n,this.ngControl=r},Cn=rt(wn),xn=0,Sn=function(t,e){this.source=t,this.value=e},En=function(t){function i(n,r,i,o,a,s,l){var c=t.call(this,s,o,a,l)||this;return c._elementRef=n,c._changeDetectorRef=r,c._dir=i,c.ngControl=l,c.controlType="mat-chip-list",c._lastDestroyedIndex=null,c._chipSet=new WeakMap,c._tabOutSubscription=O.Subscription.EMPTY,c._uid="mat-chip-list-"+xn++,c._tabIndex=0,c._userTabIndex=null,c._onTouched=function(){},c._onChange=function(){},c._multiple=!1,c._compareWith=function(t,e){return t===e},c._required=!1,c._disabled=!1,c.ariaOrientation="horizontal",c._selectable=!0,c.change=new e.EventEmitter,c.valueChange=new e.EventEmitter,c.ngControl&&(c.ngControl.valueAccessor=c),c}return Y(i,t),Object.defineProperty(i.prototype,"selected",{get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"role",{get:function(){return this.empty?null:"listbox"},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"multiple",{get:function(){return this._multiple},set:function(t){this._multiple=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"compareWith",{get:function(){return this._compareWith},set:function(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){return this._value},set:function(t){this.writeValue(t),this._value=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"id",{get:function(){return this._id||this._uid},set:function(t){this._id=t,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"required",{get:function(){return this._required},set:function(t){this._required=r.coerceBooleanProperty(t),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"placeholder",{get:function(){return this._chipInput?this._chipInput.placeholder:this._placeholder},set:function(t){this._placeholder=t,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"focused",{get:function(){return this.chips.some(function(t){return t._hasFocus})||this._chipInput&&this._chipInput.focused},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"empty",{get:function(){return(!this._chipInput||this._chipInput.empty)&&0===this.chips.length},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"shouldLabelFloat",{get:function(){return!this.empty||this.focused},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"disabled",{get:function(){return this.ngControl?!!this.ngControl.disabled:this._disabled},set:function(t){this._disabled=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectable",{get:function(){return this._selectable},set:function(t){this._selectable=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tabIndex",{set:function(t){this._userTabIndex=t,this._tabIndex=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"chipSelectionChanges",{get:function(){return x.merge.apply(void 0,this.chips.map(function(t){return t.selectionChange}))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"chipFocusChanges",{get:function(){return x.merge.apply(void 0,this.chips.map(function(t){return t._onFocus}))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"chipBlurChanges",{get:function(){return x.merge.apply(void 0,this.chips.map(function(t){return t._onBlur}))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"chipRemoveChanges",{get:function(){return x.merge.apply(void 0,this.chips.map(function(t){return t.destroy}))},enumerable:!0,configurable:!0}),i.prototype.ngAfterContentInit=function(){var t=this;this._keyManager=new u.FocusKeyManager(this.chips).withWrap().withVerticalOrientation().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._tabOutSubscription=this._keyManager.tabOut.subscribe(function(){t._tabIndex=-1,setTimeout(function(){return t._tabIndex=t._userTabIndex||0})}),this._changeSubscription=this.chips.changes.pipe(_.startWith(null)).subscribe(function(){t._resetChips(),t._initializeSelection(),t._updateTabIndex(),t._updateFocusForDestroyedChips()})},i.prototype.ngOnInit=function(){this._selectionModel=new E.SelectionModel(this.multiple,void 0,!1),this.stateChanges.next()},i.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},i.prototype.ngOnDestroy=function(){this._tabOutSubscription.unsubscribe(),this._changeSubscription&&this._changeSubscription.unsubscribe(),this._chipRemoveSubscription&&this._chipRemoveSubscription.unsubscribe(),this._dropSubscriptions(),this.stateChanges.complete()},i.prototype.registerInput=function(t){this._chipInput=t},i.prototype.setDescribedByIds=function(t){this._ariaDescribedby=t.join(" ")},i.prototype.writeValue=function(t){this.chips&&this._setSelectionByValue(t,!1)},i.prototype.registerOnChange=function(t){this._onChange=t},i.prototype.registerOnTouched=function(t){this._onTouched=t},i.prototype.setDisabledState=function(t){this.disabled=t,this._elementRef.nativeElement.disabled=t,this.stateChanges.next()},i.prototype.onContainerClick=function(){this.focus()},i.prototype.focus=function(){this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(),this.stateChanges.next()))},i.prototype._focusInput=function(){this._chipInput&&this._chipInput.focus()},i.prototype._keydown=function(t){var e=t.target;t.keyCode===c.BACKSPACE&&this._isInputEmpty(e)?(this._keyManager.setLastItemActive(),t.preventDefault()):e&&e.classList.contains("mat-chip")&&(this._keyManager.onKeydown(t),this.stateChanges.next())},i.prototype._updateTabIndex=function(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)},i.prototype._updateKeyManager=function(t){var e=this.chips.toArray().indexOf(t);this._isValidIndex(e)&&(t._hasFocus&&(e<this.chips.length-1?this._keyManager.setActiveItem(e):e-1>=0&&this._keyManager.setActiveItem(e-1)),this._keyManager.activeItemIndex===e&&(this._lastDestroyedIndex=e))},i.prototype._updateFocusForDestroyedChips=function(){var t=this.chips;if(null!=this._lastDestroyedIndex&&t.length>0){var e=Math.min(this._lastDestroyedIndex,t.length-1);this._keyManager.setActiveItem(e);var n=this._keyManager.activeItem;n&&n.focus()}this._lastDestroyedIndex=null},i.prototype._isValidIndex=function(t){return t>=0&&t<this.chips.length},i.prototype._isInputEmpty=function(t){return!(!t||"input"!==t.nodeName.toLowerCase())&&!t.value},i.prototype._setSelectionByValue=function(t,e){var n=this;if(void 0===e&&(e=!0),this._clearSelection(),this.chips.forEach(function(t){return t.deselect()}),Array.isArray(t))t.forEach(function(t){return n._selectValue(t,e)}),this._sortValues();else{var r=this._selectValue(t,e);if(r){var i=this.chips.toArray().indexOf(r);e?this._keyManager.setActiveItem(i):this._keyManager.updateActiveItemIndex(i)}}},i.prototype._selectValue=function(t,e){var n=this;void 0===e&&(e=!0);var r=this.chips.find(function(e){return null!=e.value&&n._compareWith(e.value,t)});return r&&(e?r.selectViaInteraction():r.select(),this._selectionModel.select(r)),r},i.prototype._initializeSelection=function(){var t=this;Promise.resolve().then(function(){(t.ngControl||t._value)&&(t._setSelectionByValue(t.ngControl?t.ngControl.value:t._value,!1),t.stateChanges.next())})},i.prototype._clearSelection=function(t){this._selectionModel.clear(),this.chips.forEach(function(e){e!==t&&e.deselect()}),this.stateChanges.next()},i.prototype._sortValues=function(){var t=this;this._multiple&&(this._selectionModel.clear(),this.chips.forEach(function(e){e.selected&&t._selectionModel.select(e)}),this.stateChanges.next())},i.prototype._propagateChanges=function(t){var e=null;e=Array.isArray(this.selected)?this.selected.map(function(t){return t.value}):this.selected?this.selected.value:t,this._value=e,this.change.emit(new Sn(this,e)),this.valueChange.emit(e),this._onChange(e),this._changeDetectorRef.markForCheck()},i.prototype._blur=function(){var t=this;this.disabled||(this._chipInput?setTimeout(function(){t.focused||t._markAsTouched()}):this._markAsTouched())},i.prototype._markAsTouched=function(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()},i.prototype._resetChips=function(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()},i.prototype._dropSubscriptions=function(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null)},i.prototype._listenToChipsSelection=function(){var t=this;this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(function(e){e.source.selected?t._selectionModel.select(e.source):t._selectionModel.deselect(e.source),t.multiple||t.chips.forEach(function(e){!t._selectionModel.isSelected(e)&&e.selected&&e.deselect()}),e.isUserInput&&t._propagateChanges()})},i.prototype._listenToChipsFocus=function(){var t=this;this._chipFocusSubscription=this.chipFocusChanges.subscribe(function(e){var n=t.chips.toArray().indexOf(e.chip);t._isValidIndex(n)&&t._keyManager.updateActiveItemIndex(n),t.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(function(){t._blur(),t.stateChanges.next()})},i.prototype._listenToChipsRemoved=function(){var t=this;this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(function(e){t._updateKeyManager(e.chip)})},i.decorators=[{type:e.Component,args:[{selector:"mat-chip-list",template:'<div class="mat-chip-list-wrapper"><ng-content></ng-content></div>',exportAs:"matChipList",host:{"[attr.tabindex]":"_tabIndex","[attr.aria-describedby]":"_ariaDescribedby || null","[attr.aria-required]":"required.toString()","[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",class:"mat-chip-list","(focus)":"focus()","(blur)":"_blur()","(keydown)":"_keydown($event)"},providers:[{provide:Xt,useExisting:i}],styles:[".mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline}.mat-chip:not(.mat-basic-chip){transition:box-shadow 280ms cubic-bezier(.4,0,.2,1);display:inline-flex;padding:7px 12px;border-radius:24px;align-items:center;cursor:default}.mat-chip:not(.mat-basic-chip)+.mat-chip:not(.mat-basic-chip){margin:0 0 0 8px}[dir=rtl] .mat-chip:not(.mat-basic-chip)+.mat-chip:not(.mat-basic-chip){margin:0 8px 0 0}.mat-form-field-prefix .mat-chip:not(.mat-basic-chip):last-child{margin-right:8px}[dir=rtl] .mat-form-field-prefix .mat-chip:not(.mat-basic-chip):last-child{margin-left:8px}.mat-chip:not(.mat-basic-chip) .mat-chip-remove.mat-icon{width:1em;height:1em}.mat-chip:not(.mat-basic-chip):focus{box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12);outline:0}@media screen and (-ms-high-contrast:active){.mat-chip:not(.mat-basic-chip){outline:solid 1px}}.mat-chip-list-stacked .mat-chip-list-wrapper{display:block}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-chip:not(.mat-basic-chip){display:block;margin:0;margin-bottom:8px}[dir=rtl] .mat-chip-list-stacked .mat-chip-list-wrapper .mat-chip:not(.mat-basic-chip){margin:0;margin-bottom:8px}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-chip:not(.mat-basic-chip):last-child,[dir=rtl] .mat-chip-list-stacked .mat-chip-list-wrapper .mat-chip:not(.mat-basic-chip):last-child{margin-bottom:0}.mat-form-field-prefix .mat-chip-list-wrapper{margin-bottom:8px}.mat-chip-remove{margin-right:-4px;margin-left:6px;cursor:pointer}[dir=rtl] .mat-chip-remove{margin-right:6px;margin-left:-4px}input.mat-chip-input{width:150px;margin:3px;flex:1 0 150px}"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],i.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:n.Directionality,decorators:[{type:e.Optional}]},{type:v.NgForm,decorators:[{type:e.Optional}]},{type:v.FormGroupDirective,decorators:[{type:e.Optional}]},{type:_t},{type:v.NgControl,decorators:[{type:e.Optional},{type:e.Self}]}]},i.propDecorators={errorStateMatcher:[{type:e.Input}],multiple:[{type:e.Input}],compareWith:[{type:e.Input}],value:[{type:e.Input}],id:[{type:e.Input}],required:[{type:e.Input}],placeholder:[{type:e.Input}],disabled:[{type:e.Input}],ariaOrientation:[{type:e.Input,args:["aria-orientation"]}],selectable:[{type:e.Input}],tabIndex:[{type:e.Input}],change:[{type:e.Output}],valueChange:[{type:e.Output}],chips:[{type:e.ContentChildren,args:[bn]}]},i}(Cn),kn=function(){function t(t){this._elementRef=t,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=[c.ENTER],this.chipEnd=new e.EventEmitter,this.placeholder="",this._inputElement=this._elementRef.nativeElement}return Object.defineProperty(t.prototype,"chipList",{set:function(t){t&&(this._chipList=t,this._chipList.registerInput(this))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"addOnBlur",{get:function(){return this._addOnBlur},set:function(t){this._addOnBlur=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return!this._inputElement.value},enumerable:!0,configurable:!0}),t.prototype._keydown=function(t){this._emitChipEnd(t)},t.prototype._blur=function(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipList.focused||this._chipList._blur(),this._chipList.stateChanges.next()},t.prototype._focus=function(){this.focused=!0,this._chipList.stateChanges.next()},t.prototype._emitChipEnd=function(t){!this._inputElement.value&&t&&this._chipList._keydown(t),(!t||this.separatorKeyCodes.indexOf(t.keyCode)>-1)&&(this.chipEnd.emit({input:this._inputElement,value:this._inputElement.value}),t&&t.preventDefault())},t.prototype._onInput=function(){this._chipList.stateChanges.next()},t.prototype.focus=function(){this._inputElement.focus()},t.decorators=[{type:e.Directive,args:[{selector:"input[matChipInputFor]",exportAs:"matChipInput, matChipInputFor",host:{class:"mat-chip-input mat-input-element","(keydown)":"_keydown($event)","(blur)":"_blur()","(focus)":"_focus()","(input)":"_onInput()"}}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={chipList:[{type:e.Input,args:["matChipInputFor"]}],addOnBlur:[{type:e.Input,args:["matChipInputAddOnBlur"]}],separatorKeyCodes:[{type:e.Input,args:["matChipInputSeparatorKeyCodes"]}],chipEnd:[{type:e.Output,args:["matChipInputTokenEnd"]}],placeholder:[{type:e.Input}]},t}(),On=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[],exports:[En,bn,kn,_n,_n,vn],declarations:[En,bn,kn,_n,_n,vn],providers:[_t]}]}],t.ctorParameters=function(){return[]},t}(),Pn=function(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.direction="ltr",this.ariaDescribedBy=null,this.ariaLabel=null,this.autoFocus=!0,this.closeOnNavigation=!0},An={slideDialog:w.trigger("slideDialog",[w.state("enter",w.style({transform:"none",opacity:1})),w.state("void",w.style({transform:"translate3d(0, 25%, 0) scale(0.9)",opacity:0})),w.state("exit",w.style({transform:"translate3d(0, 25%, 0)",opacity:0})),w.transition("* => *",w.animate("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])};function Dn(){throw Error("Attempting to attach dialog content after content is already attached")}var Tn=function(t){function n(n,r,i,o){var a=t.call(this)||this;return a._elementRef=n,a._focusTrapFactory=r,a._changeDetectorRef=i,a._document=o,a._elementFocusedBeforeDialogWasOpened=null,a._state="enter",a._animationStateChanged=new e.EventEmitter,a._ariaLabelledBy=null,a}return Y(n,t),n.prototype.attachComponentPortal=function(t){return this._portalOutlet.hasAttached()&&Dn(),this._savePreviouslyFocusedElement(),this._portalOutlet.attachComponentPortal(t)},n.prototype.attachTemplatePortal=function(t){return this._portalOutlet.hasAttached()&&Dn(),this._savePreviouslyFocusedElement(),this._portalOutlet.attachTemplatePortal(t)},n.prototype._trapFocus=function(){this._focusTrap||(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)),this._config.autoFocus&&this._focusTrap.focusInitialElementWhenReady()},n.prototype._restoreFocus=function(){var t=this._elementFocusedBeforeDialogWasOpened;t&&"function"==typeof t.focus&&t.focus(),this._focusTrap&&this._focusTrap.destroy()},n.prototype._savePreviouslyFocusedElement=function(){var t=this;this._document&&(this._elementFocusedBeforeDialogWasOpened=this._document.activeElement,this._elementRef.nativeElement.focus&&Promise.resolve().then(function(){return t._elementRef.nativeElement.focus()}))},n.prototype._onAnimationDone=function(t){"enter"===t.toState?this._trapFocus():"exit"===t.toState&&this._restoreFocus(),this._animationStateChanged.emit(t)},n.prototype._onAnimationStart=function(t){this._animationStateChanged.emit(t)},n.prototype._startExitAnimation=function(){this._state="exit",this._changeDetectorRef.markForCheck()},n.decorators=[{type:e.Component,args:[{selector:"mat-dialog-container",template:"<ng-template cdkPortalOutlet></ng-template>",styles:[".mat-dialog-container{box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);display:block;padding:24px;border-radius:2px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%}@media screen and (-ms-high-contrast:active){.mat-dialog-container{outline:solid 1px}}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:12px 0;display:flex;flex-wrap:wrap;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button+.mat-button,.mat-dialog-actions .mat-button+.mat-raised-button,.mat-dialog-actions .mat-raised-button+.mat-button,.mat-dialog-actions .mat-raised-button+.mat-raised-button{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button+.mat-button,[dir=rtl] .mat-dialog-actions .mat-button+.mat-raised-button,[dir=rtl] .mat-dialog-actions .mat-raised-button+.mat-button,[dir=rtl] .mat-dialog-actions .mat-raised-button+.mat-raised-button{margin-left:0;margin-right:8px}"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.Default,animations:[An.slideDialog],host:{class:"mat-dialog-container",tabindex:"-1","[attr.id]":"_id","[attr.role]":"_config?.role","[attr.aria-labelledby]":"_config?.ariaLabel ? null : _ariaLabelledBy","[attr.aria-label]":"_config?.ariaLabel","[attr.aria-describedby]":"_config?.ariaDescribedBy || null","[@slideDialog]":"_state","(@slideDialog.start)":"_onAnimationStart($event)","(@slideDialog.done)":"_onAnimationDone($event)"}}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:u.FocusTrapFactory},{type:e.ChangeDetectorRef},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[s.DOCUMENT]}]}]},n.propDecorators={_portalOutlet:[{type:e.ViewChild,args:[d.CdkPortalOutlet]}]},n}(d.BasePortalOutlet),Mn=0,In=function(){function t(t,e,n,r){void 0===r&&(r="mat-dialog-"+Mn++);var o=this;this._overlayRef=t,this._containerInstance=e,this.id=r,this.disableClose=this._containerInstance._config.disableClose,this._afterOpen=new i.Subject,this._afterClosed=new i.Subject,this._beforeClose=new i.Subject,this._locationChanges=O.Subscription.EMPTY,e._id=r,e._animationStateChanged.pipe(h.filter(function(t){return"done"===t.phaseName&&"enter"===t.toState}),f.take(1)).subscribe(function(){o._afterOpen.next(),o._afterOpen.complete()}),e._animationStateChanged.pipe(h.filter(function(t){return"done"===t.phaseName&&"exit"===t.toState}),f.take(1)).subscribe(function(){o._overlayRef.dispose(),o._locationChanges.unsubscribe(),o._afterClosed.next(o._result),o._afterClosed.complete(),o.componentInstance=null}),t.keydownEvents().pipe(h.filter(function(t){return t.keyCode===c.ESCAPE&&!o.disableClose})).subscribe(function(){return o.close()}),n&&(this._locationChanges=n.subscribe(function(){o._containerInstance._config.closeOnNavigation&&o.close()}))}return t.prototype.close=function(t){var e=this;this._result=t,this._containerInstance._animationStateChanged.pipe(h.filter(function(t){return"start"===t.phaseName}),f.take(1)).subscribe(function(){e._beforeClose.next(t),e._beforeClose.complete(),e._overlayRef.detachBackdrop()}),this._containerInstance._startExitAnimation()},t.prototype.afterOpen=function(){return this._afterOpen.asObservable()},t.prototype.afterClosed=function(){return this._afterClosed.asObservable()},t.prototype.beforeClose=function(){return this._beforeClose.asObservable()},t.prototype.backdropClick=function(){return this._overlayRef.backdropClick()},t.prototype.keydownEvents=function(){return this._overlayRef.keydownEvents()},t.prototype.updatePosition=function(t){var e=this._getPositionStrategy();return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._overlayRef.updatePosition(),this},t.prototype.updateSize=function(t,e){return void 0===t&&(t="auto"),void 0===e&&(e="auto"),this._getPositionStrategy().width(t).height(e),this._overlayRef.updatePosition(),this},t.prototype._getPositionStrategy=function(){return this._overlayRef.getConfig().positionStrategy},t}(),Rn=new e.InjectionToken("MatDialogData"),Nn=new e.InjectionToken("mat-dialog-default-options"),Ln=new e.InjectionToken("mat-dialog-scroll-strategy");function jn(t){return function(){return t.scrollStrategies.block()}}var Fn={provide:Ln,deps:[p.Overlay],useFactory:jn},Vn=function(){function t(t,e,n,r,o,a,s){var l=this;this._overlay=t,this._injector=e,this._location=n,this._defaultOptions=r,this._scrollStrategy=o,this._parentDialog=a,this._overlayContainer=s,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new i.Subject,this._afterOpenAtThisLevel=new i.Subject,this._ariaHiddenElements=new Map,this.afterAllClosed=C.defer(function(){return l.openDialogs.length?l._afterAllClosed:l._afterAllClosed.pipe(_.startWith(void 0))})}return Object.defineProperty(t.prototype,"openDialogs",{get:function(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"afterOpen",{get:function(){return this._parentDialog?this._parentDialog.afterOpen:this._afterOpenAtThisLevel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_afterAllClosed",{get:function(){var t=this._parentDialog;return t?t._afterAllClosed:this._afterAllClosedAtThisLevel},enumerable:!0,configurable:!0}),t.prototype.open=function(t,e){var n,r,i=this;if(n=e,r=this._defaultOptions||new Pn,(e=$({},r,n)).id&&this.getDialogById(e.id))throw Error('Dialog with id "'+e.id+'" exists already. The dialog id must be unique.');var o=this._createOverlay(e),a=this._attachDialogContainer(o,e),s=this._attachDialogContent(t,a,o,e);return this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(s),s.afterClosed().subscribe(function(){return i._removeOpenDialog(s)}),this.afterOpen.next(s),s},t.prototype.closeAll=function(){for(var t=this.openDialogs.length;t--;)this.openDialogs[t].close()},t.prototype.getDialogById=function(t){return this.openDialogs.find(function(e){return e.id===t})},t.prototype._createOverlay=function(t){var e=this._getOverlayConfig(t);return this._overlay.create(e)},t.prototype._getOverlayConfig=function(t){var e=new p.OverlayConfig({positionStrategy:this._overlay.position().global(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight});return t.backdropClass&&(e.backdropClass=t.backdropClass),e},t.prototype._attachDialogContainer=function(t,e){var n=new d.ComponentPortal(Tn,e.viewContainerRef),r=t.attach(n);return r.instance._config=e,r.instance},t.prototype._attachDialogContent=function(t,n,r,i){var o=new In(r,n,this._location,i.id);if(i.hasBackdrop&&r.backdropClick().subscribe(function(){o.disableClose||o.close()}),t instanceof e.TemplateRef)n.attachTemplatePortal(new d.TemplatePortal(t,null,{$implicit:i.data,dialogRef:o}));else{var a=this._createInjector(i,o,n),s=n.attachComponentPortal(new d.ComponentPortal(t,void 0,a));o.componentInstance=s.instance}return o.updateSize(i.width,i.height).updatePosition(i.position),o},t.prototype._createInjector=function(t,e,r){var i=t&&t.viewContainerRef&&t.viewContainerRef.injector,o=new WeakMap;return o.set(Tn,r).set(Rn,t.data).set(In,e),i&&i.get(n.Directionality,null)||o.set(n.Directionality,{value:t.direction,change:S.of()}),new d.PortalInjector(i||this._injector,o)},t.prototype._removeOpenDialog=function(t){var e=this.openDialogs.indexOf(t);e>-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._ariaHiddenElements.forEach(function(t,e){t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),this._afterAllClosed.next()))},t.prototype._hideNonDialogContentFromAssistiveTechnology=function(){var t=this._overlayContainer.getContainerElement();if(t.parentElement)for(var e=t.parentElement.children,n=e.length-1;n>-1;n--){var r=e[n];r===t||"SCRIPT"===r.nodeName||"STYLE"===r.nodeName||r.hasAttribute("aria-live")||(this._ariaHiddenElements.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:p.Overlay},{type:e.Injector},{type:s.Location,decorators:[{type:e.Optional}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[Nn]}]},{type:void 0,decorators:[{type:e.Inject,args:[Ln]}]},{type:t,decorators:[{type:e.Optional},{type:e.SkipSelf}]},{type:p.OverlayContainer}]},t}();var Bn=0,Un=function(){function t(t,e,n){this.dialogRef=t,this._elementRef=e,this._dialog=n,this.ariaLabel="Close dialog"}return t.prototype.ngOnInit=function(){this.dialogRef||(this.dialogRef=Wn(this._elementRef,this._dialog.openDialogs))},t.prototype.ngOnChanges=function(t){var e=t._matDialogClose||t._matDialogCloseResult;e&&(this.dialogResult=e.currentValue)},t.decorators=[{type:e.Directive,args:[{selector:"button[mat-dialog-close], button[matDialogClose]",exportAs:"matDialogClose",host:{"(click)":"dialogRef.close(dialogResult)","[attr.aria-label]":"ariaLabel",type:"button"}}]}],t.ctorParameters=function(){return[{type:In,decorators:[{type:e.Optional}]},{type:e.ElementRef},{type:Vn}]},t.propDecorators={ariaLabel:[{type:e.Input,args:["aria-label"]}],dialogResult:[{type:e.Input,args:["mat-dialog-close"]}],_matDialogClose:[{type:e.Input,args:["matDialogClose"]}]},t}(),Hn=function(){function t(t,e,n){this._dialogRef=t,this._elementRef=e,this._dialog=n,this.id="mat-dialog-title-"+Bn++}return t.prototype.ngOnInit=function(){var t=this;this._dialogRef||(this._dialogRef=Wn(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(function(){var e=t._dialogRef._containerInstance;e&&!e._ariaLabelledBy&&(e._ariaLabelledBy=t.id)})},t.decorators=[{type:e.Directive,args:[{selector:"[mat-dialog-title], [matDialogTitle]",exportAs:"matDialogTitle",host:{class:"mat-dialog-title","[id]":"id"}}]}],t.ctorParameters=function(){return[{type:In,decorators:[{type:e.Optional}]},{type:e.ElementRef},{type:Vn}]},t.propDecorators={id:[{type:e.Input}]},t}(),zn=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-dialog-content], mat-dialog-content, [matDialogContent]",host:{class:"mat-dialog-content"}}]}],t.ctorParameters=function(){return[]},t}(),Gn=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",host:{class:"mat-dialog-actions"}}]}],t.ctorParameters=function(){return[]},t}();function Wn(t,e){for(var n=t.nativeElement.parentElement;n&&!n.classList.contains("mat-dialog-container");)n=n.parentElement;return n?e.find(function(t){return t.id===n.id}):null}var qn=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,p.OverlayModule,d.PortalModule,u.A11yModule,Z],exports:[Tn,Un,Hn,zn,Gn,Z],declarations:[Tn,Un,Hn,Gn,zn],providers:[Vn,Fn],entryComponents:[Tn]}]}],t.ctorParameters=function(){return[]},t}(),Yn=function(){function t(t,e,n){this._elementRef=t,this._platform=e,this._ngZone=n,this._destroyed=new i.Subject}return Object.defineProperty(t.prototype,"minRows",{get:function(){return this._minRows},set:function(t){this._minRows=t,this._setMinHeight()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxRows",{get:function(){return this._maxRows},set:function(t){this._maxRows=t,this._setMaxHeight()},enumerable:!0,configurable:!0}),t.prototype._setMinHeight=function(){var t=this.minRows&&this._cachedLineHeight?this.minRows*this._cachedLineHeight+"px":null;t&&this._setTextareaStyle("minHeight",t)},t.prototype._setMaxHeight=function(){var t=this.maxRows&&this._cachedLineHeight?this.maxRows*this._cachedLineHeight+"px":null;t&&this._setTextareaStyle("maxHeight",t)},t.prototype.ngAfterViewInit=function(){var t=this;this._platform.isBrowser&&(this.resizeToFitContent(),this._ngZone&&this._ngZone.runOutsideAngular(function(){b.fromEvent(window,"resize").pipe(P.auditTime(16),A.takeUntil(t._destroyed)).subscribe(function(){return t.resizeToFitContent(!0)})}))},t.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete()},t.prototype._setTextareaStyle=function(t,e){this._elementRef.nativeElement.style[t]=e},t.prototype._cacheTextareaLineHeight=function(){if(!this._cachedLineHeight){var t=this._elementRef.nativeElement,e=t.cloneNode(!1);e.rows=1,e.style.position="absolute",e.style.visibility="hidden",e.style.border="none",e.style.padding="0",e.style.height="",e.style.minHeight="",e.style.maxHeight="",e.style.overflow="hidden",t.parentNode.appendChild(e),this._cachedLineHeight=e.clientHeight,t.parentNode.removeChild(e),this._setMinHeight(),this._setMaxHeight()}},t.prototype.ngDoCheck=function(){this._platform.isBrowser&&this.resizeToFitContent()},t.prototype.resizeToFitContent=function(t){if(void 0===t&&(t=!1),this._cacheTextareaLineHeight(),this._cachedLineHeight){var e=this._elementRef.nativeElement,n=e.value;if(n!==this._previousValue||t){var r=e.placeholder;e.style.height="auto",e.style.overflow="hidden",e.placeholder="",e.style.height=e.scrollHeight+"px",e.style.overflow="",e.placeholder=r,this._previousValue=n}}},t.decorators=[{type:e.Directive,args:[{selector:"textarea[mat-autosize], textarea[matTextareaAutosize]",exportAs:"matTextareaAutosize",host:{class:"mat-autosize",rows:"1"}}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:l.Platform},{type:e.NgZone}]},t.propDecorators={minRows:[{type:e.Input,args:["matAutosizeMinRows"]}],maxRows:[{type:e.Input,args:["matAutosizeMaxRows"]}]},t}();function $n(t){return Error('Input type "'+t+"\" isn't supported by matInput.")}var Kn=new e.InjectionToken("MAT_INPUT_VALUE_ACCESSOR"),Qn=["button","checkbox","file","hidden","image","radio","range","reset","submit"],Xn=0,Zn=function(t,e,n,r){this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=n,this.ngControl=r},Jn=rt(Zn),tr=function(t){function n(e,n,r,o,a,s,c){var u=t.call(this,s,o,a,r)||this;return u._elementRef=e,u._platform=n,u.ngControl=r,u._uid="mat-input-"+Xn++,u._isServer=!1,u.focused=!1,u.stateChanges=new i.Subject,u.controlType="mat-input",u._disabled=!1,u.placeholder="",u._required=!1,u._type="text",u._readonly=!1,u._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(function(t){return l.getSupportedInputTypes().has(t)}),u._inputValueAccessor=c||u._elementRef.nativeElement,u._previousNativeValue=u.value,u.id=u.id,n.IOS&&e.nativeElement.addEventListener("keyup",function(t){var e=t.target;e.value||e.selectionStart||e.selectionEnd||(e.setSelectionRange(1,1),e.setSelectionRange(0,0))}),u._isServer=!u._platform.isBrowser,u}return Y(n,t),Object.defineProperty(n.prototype,"disabled",{get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(t){this._disabled=r.coerceBooleanProperty(t),this.focused&&(this.focused=!1,this.stateChanges.next())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},set:function(t){this._id=t||this._uid},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(t){this._required=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this._type},set:function(t){this._type=t||"text",this._validateType(),!this._isTextarea()&&l.getSupportedInputTypes().has(this._type)&&(this._elementRef.nativeElement.type=this._type)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._inputValueAccessor.value},set:function(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"readonly",{get:function(){return this._readonly},set:function(t){this._readonly=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),n.prototype.ngOnChanges=function(){this.stateChanges.next()},n.prototype.ngOnDestroy=function(){this.stateChanges.complete()},n.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState(),this._dirtyCheckNativeValue()},n.prototype.focus=function(){this._elementRef.nativeElement.focus()},n.prototype._focusChanged=function(t){t===this.focused||this.readonly||(this.focused=t,this.stateChanges.next())},n.prototype._onInput=function(){},n.prototype._dirtyCheckNativeValue=function(){var t=this.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())},n.prototype._validateType=function(){if(Qn.indexOf(this._type)>-1)throw $n(this._type)},n.prototype._isNeverEmpty=function(){return this._neverEmptyInputTypes.indexOf(this._type)>-1},n.prototype._isBadInput=function(){var t=this._elementRef.nativeElement.validity;return t&&t.badInput},n.prototype._isTextarea=function(){var t=this._elementRef.nativeElement,e=this._platform.isBrowser?t.nodeName:t.name;return!!e&&"textarea"===e.toLowerCase()},Object.defineProperty(n.prototype,"empty",{get:function(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"shouldLabelFloat",{get:function(){return this.focused||!this.empty},enumerable:!0,configurable:!0}),n.prototype.setDescribedByIds=function(t){this._ariaDescribedby=t.join(" ")},n.prototype.onContainerClick=function(){this.focus()},n.decorators=[{type:e.Directive,args:[{selector:"input[matInput], textarea[matInput]",exportAs:"matInput",host:{class:"mat-input-element mat-form-field-autofill-control","[class.mat-input-server]":"_isServer","[attr.id]":"id","[placeholder]":"placeholder","[disabled]":"disabled","[required]":"required","[readonly]":"readonly","[attr.aria-describedby]":"_ariaDescribedby || null","[attr.aria-invalid]":"errorState","[attr.aria-required]":"required.toString()","(blur)":"_focusChanged(false)","(focus)":"_focusChanged(true)","(input)":"_onInput()"},providers:[{provide:Xt,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:l.Platform},{type:v.NgControl,decorators:[{type:e.Optional},{type:e.Self}]},{type:v.NgForm,decorators:[{type:e.Optional}]},{type:v.FormGroupDirective,decorators:[{type:e.Optional}]},{type:_t},{type:void 0,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[Kn]}]}]},n.propDecorators={disabled:[{type:e.Input}],id:[{type:e.Input}],placeholder:[{type:e.Input}],required:[{type:e.Input}],type:[{type:e.Input}],errorStateMatcher:[{type:e.Input}],value:[{type:e.Input}],readonly:[{type:e.Input}]},n}(Jn),er=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[tr,Yn],imports:[s.CommonModule,pe,l.PlatformModule],exports:[pe,tr,Yn],providers:[_t]}]}],t.ctorParameters=function(){return[]},t}();function nr(t){return Error("MatDatepicker: No provider found for "+t+". You must import one of the following modules at your application root: MatNativeDateModule, MatMomentDateModule, or provide a custom implementation.")}var rr=function(){function t(){this.changes=new i.Subject,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}return t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}(),ir=function(t,e,n,r){this.value=t,this.displayValue=e,this.ariaLabel=n,this.enabled=r},or=function(){function t(){this.numCols=7,this.allowDisabledSelection=!1,this.activeCell=0,this.cellAspectRatio=1,this.selectedValueChange=new e.EventEmitter}return t.prototype._cellClicked=function(t){(this.allowDisabledSelection||t.enabled)&&this.selectedValueChange.emit(t.value)},Object.defineProperty(t.prototype,"_firstRowOffset",{get:function(){return this.rows&&this.rows.length&&this.rows[0].length?this.numCols-this.rows[0].length:0},enumerable:!0,configurable:!0}),t.prototype._isActiveCell=function(t,e){var n=t*this.numCols+e;return t&&(n-=this._firstRowOffset),n==this.activeCell},t.decorators=[{type:e.Component,args:[{selector:"[mat-calendar-body]",template:'<tr *ngIf="_firstRowOffset < labelMinRequiredCells" aria-hidden="true"><td class="mat-calendar-body-label" [attr.colspan]="numCols" [style.paddingTop.%]="50 * cellAspectRatio / numCols" [style.paddingBottom.%]="50 * cellAspectRatio / numCols">{{label}}</td></tr><tr *ngFor="let row of rows; let rowIndex = index" role="row"><td *ngIf="rowIndex === 0 && _firstRowOffset" aria-hidden="true" class="mat-calendar-body-label" [attr.colspan]="_firstRowOffset" [style.paddingTop.%]="50 * cellAspectRatio / numCols" [style.paddingBottom.%]="50 * cellAspectRatio / numCols">{{_firstRowOffset >= labelMinRequiredCells ? label : \'\'}}</td><td *ngFor="let item of row; let colIndex = index" role="gridcell" class="mat-calendar-body-cell" [tabindex]="_isActiveCell(rowIndex, colIndex) ? 0 : -1" [class.mat-calendar-body-disabled]="!item.enabled" [class.mat-calendar-body-active]="_isActiveCell(rowIndex, colIndex)" [attr.aria-label]="item.ariaLabel" [attr.aria-disabled]="!item.enabled || null" (click)="_cellClicked(item)" [style.width.%]="100 / numCols" [style.paddingTop.%]="50 * cellAspectRatio / numCols" [style.paddingBottom.%]="50 * cellAspectRatio / numCols"><div class="mat-calendar-body-cell-content" [class.mat-calendar-body-selected]="selectedValue === item.value" [class.mat-calendar-body-today]="todayValue === item.value">{{item.displayValue}}</div></td></tr>',styles:[".mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.71429%;padding-right:4.71429%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:0;cursor:pointer}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-cell-content{position:absolute;top:5%;left:5%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}[dir=rtl] .mat-calendar-body-label{text-align:right}"],host:{class:"mat-calendar-body",role:"grid","attr.aria-readonly":"true"},exportAs:"matCalendarBody",encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[]},t.propDecorators={label:[{type:e.Input}],rows:[{type:e.Input}],todayValue:[{type:e.Input}],selectedValue:[{type:e.Input}],labelMinRequiredCells:[{type:e.Input}],numCols:[{type:e.Input}],allowDisabledSelection:[{type:e.Input}],activeCell:[{type:e.Input}],cellAspectRatio:[{type:e.Input}],selectedValueChange:[{type:e.Output}]},t}(),ar=function(){function t(t,n,r){if(this._dateAdapter=t,this._dateFormats=n,this._changeDetectorRef=r,this.selectedChange=new e.EventEmitter,this._userSelection=new e.EventEmitter,!this._dateAdapter)throw nr("DateAdapter");if(!this._dateFormats)throw nr("MAT_DATE_FORMATS");var i=this._dateAdapter.getFirstDayOfWeek(),o=this._dateAdapter.getDayOfWeekNames("narrow"),a=this._dateAdapter.getDayOfWeekNames("long").map(function(t,e){return{long:t,narrow:o[e]}});this._weekdays=a.slice(i).concat(a.slice(0,i)),this._activeDate=this._dateAdapter.today()}return Object.defineProperty(t.prototype,"activeDate",{get:function(){return this._activeDate},set:function(t){var e=this._activeDate;this._activeDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today(),this._hasSameMonthAndYear(e,this._activeDate)||this._init()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._selectedDate=this._getDateInCurrentMonth(this._selected)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._init()},t.prototype._dateSelected=function(t){if(this._selectedDate!=t){var e=this._dateAdapter.getYear(this.activeDate),n=this._dateAdapter.getMonth(this.activeDate),r=this._dateAdapter.createDate(e,n,t);this.selectedChange.emit(r)}this._userSelection.emit()},t.prototype._init=function(){this._selectedDate=this._getDateInCurrentMonth(this.selected),this._todayDate=this._getDateInCurrentMonth(this._dateAdapter.today()),this._monthLabel=this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();var t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._createWeekCells(),this._changeDetectorRef.markForCheck()},t.prototype._createWeekCells=function(){var t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(var n=0,r=this._firstWeekOffset;n<t;n++,r++){7==r&&(this._weeks.push([]),r=0);var i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),n+1),o=this._shouldEnableDate(i),a=this._dateAdapter.format(i,this._dateFormats.display.dateA11yLabel);this._weeks[this._weeks.length-1].push(new ir(n+1,e[n],a,o))}},t.prototype._shouldEnableDate=function(t){return!!t&&(!this.dateFilter||this.dateFilter(t))&&(!this.minDate||this._dateAdapter.compareDate(t,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)},t.prototype._getDateInCurrentMonth=function(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null},t.prototype._hasSameMonthAndYear=function(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.decorators=[{type:e.Component,args:[{selector:"mat-month-view",template:'<table class="mat-calendar-table"><thead class="mat-calendar-table-header"><tr><th *ngFor="let day of _weekdays" [attr.aria-label]="day.long">{{day.narrow}}</th></tr><tr><th class="mat-calendar-table-header-divider" colspan="7" aria-hidden="true"></th></tr></thead><tbody mat-calendar-body [label]="_monthLabel" [rows]="_weeks" [todayValue]="_todayDate" [selectedValue]="_selectedDate" [labelMinRequiredCells]="3" [activeCell]="_dateAdapter.getDate(activeDate) - 1" (selectedValueChange)="_dateSelected($event)"></tbody></table>',exportAs:"matMonthView",encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:at,decorators:[{type:e.Optional}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[st]}]},{type:e.ChangeDetectorRef}]},t.propDecorators={activeDate:[{type:e.Input}],selected:[{type:e.Input}],minDate:[{type:e.Input}],maxDate:[{type:e.Input}],dateFilter:[{type:e.Input}],selectedChange:[{type:e.Output}],_userSelection:[{type:e.Output}]},t}(),sr=function(){function t(t,n){if(this._dateAdapter=t,this._changeDetectorRef=n,this.selectedChange=new e.EventEmitter,!this._dateAdapter)throw nr("DateAdapter");this._activeDate=this._dateAdapter.today()}return Object.defineProperty(t.prototype,"activeDate",{get:function(){return this._activeDate},set:function(t){var e=this._activeDate;this._activeDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today(),Math.floor(this._dateAdapter.getYear(e)/24)!=Math.floor(this._dateAdapter.getYear(this._activeDate)/24)&&this._init()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._selectedYear=this._selected&&this._dateAdapter.getYear(this._selected)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._init()},t.prototype._init=function(){var t=this;this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());var e=this._dateAdapter.getYear(this._activeDate),n=e%24;this._years=[];for(var r=0,i=[];r<24;r++)i.push(e-n+r),4==i.length&&(this._years.push(i.map(function(e){return t._createCellForYear(e)})),i=[]);this._changeDetectorRef.markForCheck()},t.prototype._yearSelected=function(t){var e=this._dateAdapter.getMonth(this.activeDate),n=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(t,e,1));this.selectedChange.emit(this._dateAdapter.createDate(t,e,Math.min(this._dateAdapter.getDate(this.activeDate),n)))},t.prototype._getActiveCell=function(){return this._dateAdapter.getYear(this.activeDate)%24},t.prototype._createCellForYear=function(t){var e=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1));return new ir(t,e,e,this._shouldEnableYear(t))},t.prototype._shouldEnableYear=function(t){if(null==t||this.maxDate&&t>this._dateAdapter.getYear(this.maxDate)||this.minDate&&t<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(var e=this._dateAdapter.createDate(t,0,1);this._dateAdapter.getYear(e)==t;e=this._dateAdapter.addCalendarDays(e,1))if(this.dateFilter(e))return!0;return!1},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.decorators=[{type:e.Component,args:[{selector:"mat-multi-year-view",template:'<table class="mat-calendar-table"><thead class="mat-calendar-table-header"><tr><th class="mat-calendar-table-header-divider" colspan="4"></th></tr></thead><tbody mat-calendar-body allowDisabledSelection="true" [rows]="_years" [todayValue]="_todayYear" [selectedValue]="_selectedYear" [numCols]="4" [cellAspectRatio]="4 / 7" [activeCell]="_getActiveCell()" (selectedValueChange)="_yearSelected($event)"></tbody></table>',exportAs:"matMultiYearView",encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:at,decorators:[{type:e.Optional}]},{type:e.ChangeDetectorRef}]},t.propDecorators={activeDate:[{type:e.Input}],selected:[{type:e.Input}],minDate:[{type:e.Input}],maxDate:[{type:e.Input}],dateFilter:[{type:e.Input}],selectedChange:[{type:e.Output}]},t}(),lr=function(){function t(t,n,r){if(this._dateAdapter=t,this._dateFormats=n,this._changeDetectorRef=r,this.selectedChange=new e.EventEmitter,!this._dateAdapter)throw nr("DateAdapter");if(!this._dateFormats)throw nr("MAT_DATE_FORMATS");this._activeDate=this._dateAdapter.today()}return Object.defineProperty(t.prototype,"activeDate",{get:function(){return this._activeDate},set:function(t){var e=this._activeDate;this._activeDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today(),this._dateAdapter.getYear(e)!=this._dateAdapter.getYear(this._activeDate)&&this._init()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._selectedMonth=this._getMonthInCurrentYear(this._selected)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._init()},t.prototype._monthSelected=function(t){var e=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1));this.selectedChange.emit(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,Math.min(this._dateAdapter.getDate(this.activeDate),e)))},t.prototype._init=function(){var t=this;this._selectedMonth=this._getMonthInCurrentYear(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);var e=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(function(n){return n.map(function(n){return t._createCellForMonth(n,e[n])})}),this._changeDetectorRef.markForCheck()},t.prototype._getMonthInCurrentYear=function(t){return t&&this._dateAdapter.getYear(t)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(t):null},t.prototype._createCellForMonth=function(t,e){var n=this._dateAdapter.format(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1),this._dateFormats.display.monthYearA11yLabel);return new ir(t,e.toLocaleUpperCase(),n,this._shouldEnableMonth(t))},t.prototype._shouldEnableMonth=function(t){var e=this._dateAdapter.getYear(this.activeDate);if(null==t||this._isYearAndMonthAfterMaxDate(e,t)||this._isYearAndMonthBeforeMinDate(e,t))return!1;if(!this.dateFilter)return!0;for(var n=this._dateAdapter.createDate(e,t,1);this._dateAdapter.getMonth(n)==t;n=this._dateAdapter.addCalendarDays(n,1))if(this.dateFilter(n))return!0;return!1},t.prototype._isYearAndMonthAfterMaxDate=function(t,e){if(this.maxDate){var n=this._dateAdapter.getYear(this.maxDate),r=this._dateAdapter.getMonth(this.maxDate);return t>n||t===n&&e>r}return!1},t.prototype._isYearAndMonthBeforeMinDate=function(t,e){if(this.minDate){var n=this._dateAdapter.getYear(this.minDate),r=this._dateAdapter.getMonth(this.minDate);return t<n||t===n&&e<r}return!1},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.decorators=[{type:e.Component,args:[{selector:"mat-year-view",template:'<table class="mat-calendar-table"><thead class="mat-calendar-table-header"><tr><th class="mat-calendar-table-header-divider" colspan="4"></th></tr></thead><tbody mat-calendar-body allowDisabledSelection="true" [label]="_yearLabel" [rows]="_months" [todayValue]="_todayMonth" [selectedValue]="_selectedMonth" [labelMinRequiredCells]="2" [numCols]="4" [cellAspectRatio]="4 / 7" [activeCell]="_dateAdapter.getMonth(activeDate)" (selectedValueChange)="_monthSelected($event)"></tbody></table>',exportAs:"matYearView",encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:at,decorators:[{type:e.Optional}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[st]}]},{type:e.ChangeDetectorRef}]},t.propDecorators={activeDate:[{type:e.Input}],selected:[{type:e.Input}],minDate:[{type:e.Input}],maxDate:[{type:e.Input}],dateFilter:[{type:e.Input}],selectedChange:[{type:e.Output}]},t}(),cr=function(){function t(t,n,r,i,o,a,s){if(this._elementRef=t,this._intl=n,this._ngZone=r,this._dateAdapter=i,this._dateFormats=o,this._dir=s,this.startView="month",this.selectedChange=new e.EventEmitter,this._userSelection=new e.EventEmitter,!this._dateAdapter)throw nr("DateAdapter");if(!this._dateFormats)throw nr("MAT_DATE_FORMATS");this._intlChanges=n.changes.subscribe(function(){return a.markForCheck()})}return Object.defineProperty(t.prototype,"startAt",{get:function(){return this._startAt},set:function(t){this._startAt=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_activeDate",{get:function(){return this._clampedActiveDate},set:function(t){this._clampedActiveDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_periodButtonText",{get:function(){if("month"==this._currentView)return this._dateAdapter.format(this._activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase();if("year"==this._currentView)return this._dateAdapter.getYearName(this._activeDate);var t=this._dateAdapter.getYear(this._activeDate);return this._dateAdapter.getYearName(this._dateAdapter.createDate(t-t%24,0,1))+" – "+this._dateAdapter.getYearName(this._dateAdapter.createDate(t+24-1-t%24,0,1))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_periodButtonLabel",{get:function(){return"month"==this._currentView?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_prevButtonLabel",{get:function(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this._currentView]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_nextButtonLabel",{get:function(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this._currentView]},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._activeDate=this.startAt||this._dateAdapter.today(),this._focusActiveCell(),this._currentView=this.startView},t.prototype.ngOnDestroy=function(){this._intlChanges.unsubscribe()},t.prototype.ngOnChanges=function(t){var e=t.minDate||t.maxDate||t.dateFilter;if(e&&!e.firstChange){var n=this.monthView||this.yearView||this.multiYearView;n&&n._init()}},t.prototype._dateSelected=function(t){this._dateAdapter.sameDate(t,this.selected)||this.selectedChange.emit(t)},t.prototype._userSelected=function(){this._userSelection.emit()},t.prototype._goToDateInView=function(t,e){this._activeDate=t,this._currentView=e},t.prototype._currentPeriodClicked=function(){this._currentView="month"==this._currentView?"multi-year":"month"},t.prototype._previousClicked=function(){this._activeDate="month"==this._currentView?this._dateAdapter.addCalendarMonths(this._activeDate,-1):this._dateAdapter.addCalendarYears(this._activeDate,"year"==this._currentView?-1:-24)},t.prototype._nextClicked=function(){this._activeDate="month"==this._currentView?this._dateAdapter.addCalendarMonths(this._activeDate,1):this._dateAdapter.addCalendarYears(this._activeDate,"year"==this._currentView?1:24)},t.prototype._previousEnabled=function(){return!this.minDate||(!this.minDate||!this._isSameView(this._activeDate,this.minDate))},t.prototype._nextEnabled=function(){return!this.maxDate||!this._isSameView(this._activeDate,this.maxDate)},t.prototype._handleCalendarBodyKeydown=function(t){"month"==this._currentView?this._handleCalendarBodyKeydownInMonthView(t):"year"==this._currentView?this._handleCalendarBodyKeydownInYearView(t):this._handleCalendarBodyKeydownInMultiYearView(t)},t.prototype._focusActiveCell=function(){var t=this;this._ngZone.runOutsideAngular(function(){t._ngZone.onStable.asObservable().pipe(f.take(1)).subscribe(function(){t._elementRef.nativeElement.querySelector(".mat-calendar-body-active").focus()})})},t.prototype._isSameView=function(t,e){return"month"==this._currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e)&&this._dateAdapter.getMonth(t)==this._dateAdapter.getMonth(e):"year"==this._currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e):Math.floor(this._dateAdapter.getYear(t)/24)==Math.floor(this._dateAdapter.getYear(e)/24)},t.prototype._handleCalendarBodyKeydownInMonthView=function(t){var e=this._isRtl();switch(t.keyCode){case c.LEFT_ARROW:this._activeDate=this._dateAdapter.addCalendarDays(this._activeDate,e?1:-1);break;case c.RIGHT_ARROW:this._activeDate=this._dateAdapter.addCalendarDays(this._activeDate,e?-1:1);break;case c.UP_ARROW:this._activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case c.DOWN_ARROW:this._activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case c.HOME:this._activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case c.END:this._activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case c.PAGE_UP:this._activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case c.PAGE_DOWN:this._activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case c.ENTER:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected(this._activeDate),this._userSelected(),t.preventDefault()));default:return}this._focusActiveCell(),t.preventDefault()},t.prototype._handleCalendarBodyKeydownInYearView=function(t){var e=this._isRtl();switch(t.keyCode){case c.LEFT_ARROW:this._activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,e?1:-1);break;case c.RIGHT_ARROW:this._activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,e?-1:1);break;case c.UP_ARROW:this._activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case c.DOWN_ARROW:this._activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case c.HOME:this._activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case c.END:this._activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case c.PAGE_UP:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-10:-1);break;case c.PAGE_DOWN:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?10:1);break;case c.ENTER:this._goToDateInView(this._activeDate,"month");break;default:return}this._focusActiveCell(),t.preventDefault()},t.prototype._handleCalendarBodyKeydownInMultiYearView=function(t){switch(t.keyCode){case c.LEFT_ARROW:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-1);break;case c.RIGHT_ARROW:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,1);break;case c.UP_ARROW:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case c.DOWN_ARROW:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case c.HOME:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-this._dateAdapter.getYear(this._activeDate)%24);break;case c.END:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,24-this._dateAdapter.getYear(this._activeDate)%24-1);break;case c.PAGE_UP:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-240:-24);break;case c.PAGE_DOWN:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?240:24);break;case c.ENTER:this._goToDateInView(this._activeDate,"year");break;default:return}this._focusActiveCell(),t.preventDefault()},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.prototype._isRtl=function(){return this._dir&&"rtl"===this._dir.value},t.decorators=[{type:e.Component,args:[{selector:"mat-calendar",template:'<div class="mat-calendar-header"><div class="mat-calendar-controls"><button mat-button class="mat-calendar-period-button" (click)="_currentPeriodClicked()" [attr.aria-label]="_periodButtonLabel">{{_periodButtonText}}<div class="mat-calendar-arrow" [class.mat-calendar-invert]="_currentView != \'month\'"></div></button><div class="mat-calendar-spacer"></div><button mat-icon-button class="mat-calendar-previous-button" [disabled]="!_previousEnabled()" (click)="_previousClicked()" [attr.aria-label]="_prevButtonLabel"></button> <button mat-icon-button class="mat-calendar-next-button" [disabled]="!_nextEnabled()" (click)="_nextClicked()" [attr.aria-label]="_nextButtonLabel"></button></div></div><div class="mat-calendar-content" (keydown)="_handleCalendarBodyKeydown($event)" [ngSwitch]="_currentView" cdkMonitorSubtreeFocus tabindex="-1"><mat-month-view *ngSwitchCase="\'month\'" [activeDate]="_activeDate" [selected]="selected" [dateFilter]="dateFilter" [maxDate]="maxDate" [minDate]="minDate" (selectedChange)="_dateSelected($event)" (_userSelection)="_userSelected()"></mat-month-view><mat-year-view *ngSwitchCase="\'year\'" [activeDate]="_activeDate" [selected]="selected" [dateFilter]="dateFilter" [maxDate]="maxDate" [minDate]="minDate" (selectedChange)="_goToDateInView($event, \'month\')"></mat-year-view><mat-multi-year-view *ngSwitchCase="\'multi-year\'" [activeDate]="_activeDate" [selected]="selected" [dateFilter]="dateFilter" [maxDate]="maxDate" [minDate]="minDate" (selectedChange)="_goToDateInView($event, \'year\')"></mat-multi-year-view></div>',styles:[".mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:0}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-next-button,.mat-calendar-previous-button{position:relative}.mat-calendar-next-button::after,.mat-calendar-previous-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:'';margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-next-button,[dir=rtl] .mat-calendar-previous-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:'';position:absolute;top:0;left:-8px;right:-8px;height:1px}"],host:{class:"mat-calendar"},exportAs:"matCalendar",encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:rr},{type:e.NgZone},{type:at,decorators:[{type:e.Optional}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[st]}]},{type:e.ChangeDetectorRef},{type:n.Directionality,decorators:[{type:e.Optional}]}]},t.propDecorators={startAt:[{type:e.Input}],startView:[{type:e.Input}],selected:[{type:e.Input}],minDate:[{type:e.Input}],maxDate:[{type:e.Input}],dateFilter:[{type:e.Input}],selectedChange:[{type:e.Output}],_userSelection:[{type:e.Output}],monthView:[{type:e.ViewChild,args:[ar]}],yearView:[{type:e.ViewChild,args:[lr]}],multiYearView:[{type:e.ViewChild,args:[sr]}]},t}(),ur=0,pr=new e.InjectionToken("mat-datepicker-scroll-strategy");function dr(t){return function(){return t.scrollStrategies.reposition()}}var hr={provide:pr,deps:[p.Overlay],useFactory:dr},fr=function(){function t(){}return t.prototype.ngAfterContentInit=function(){this._calendar._focusActiveCell()},t.decorators=[{type:e.Component,args:[{selector:"mat-datepicker-content",template:'<mat-calendar cdkTrapFocus [id]="datepicker.id" [ngClass]="datepicker.panelClass" [startAt]="datepicker.startAt" [startView]="datepicker.startView" [minDate]="datepicker._minDate" [maxDate]="datepicker._maxDate" [dateFilter]="datepicker._dateFilter" [selected]="datepicker._selected" (selectedChange)="datepicker._select($event)" (_userSelection)="datepicker.close()"></mat-calendar>',styles:[".mat-datepicker-content{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);display:block;border-radius:2px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content-touch{box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation:landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation:portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}"],host:{class:"mat-datepicker-content","[class.mat-datepicker-content-touch]":"datepicker.touchUi"},exportAs:"matDatepickerContent",encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[]},t.propDecorators={_calendar:[{type:e.ViewChild,args:[cr]}]},t}(),mr=function(){function t(t,n,r,o,a,s,l,c){if(this._dialog=t,this._overlay=n,this._ngZone=r,this._viewContainerRef=o,this._scrollStrategy=a,this._dateAdapter=s,this._dir=l,this._document=c,this.startView="month",this._touchUi=!1,this.selectedChanged=new e.EventEmitter,this.openedStream=new e.EventEmitter,this.closedStream=new e.EventEmitter,this._opened=!1,this.id="mat-datepicker-"+ur++,this._validSelected=null,this._focusedElementBeforeOpen=null,this._inputSubscription=O.Subscription.EMPTY,this._disabledChange=new i.Subject,!this._dateAdapter)throw nr("DateAdapter")}return Object.defineProperty(t.prototype,"startAt",{get:function(){return this._startAt||(this._datepickerInput?this._datepickerInput.value:null)},set:function(t){this._startAt=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"touchUi",{get:function(){return this._touchUi},set:function(t){this._touchUi=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return void 0===this._disabled&&this._datepickerInput?this._datepickerInput.disabled:!!this._disabled},set:function(t){var e=r.coerceBooleanProperty(t);e!==this._disabled&&(this._disabled=e,this._disabledChange.next(e))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"opened",{get:function(){return this._opened},set:function(t){t?this.open():this.close()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_selected",{get:function(){return this._validSelected},set:function(t){this._validSelected=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_minDate",{get:function(){return this._datepickerInput&&this._datepickerInput.min},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_maxDate",{get:function(){return this._datepickerInput&&this._datepickerInput.max},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_dateFilter",{get:function(){return this._datepickerInput&&this._datepickerInput._dateFilter},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.close(),this._inputSubscription.unsubscribe(),this._disabledChange.complete(),this._popupRef&&this._popupRef.dispose()},t.prototype._select=function(t){var e=this._selected;this._selected=t,this._dateAdapter.sameDate(e,this._selected)||this.selectedChanged.emit(t)},t.prototype._registerInput=function(t){var e=this;if(this._datepickerInput)throw Error("A MatDatepicker can only be associated with a single input.");this._datepickerInput=t,this._inputSubscription=this._datepickerInput._valueChange.subscribe(function(t){return e._selected=t})},t.prototype.open=function(){if(!this._opened&&!this.disabled){if(!this._datepickerInput)throw Error("Attempted to open an MatDatepicker with no associated input.");this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit()}},t.prototype.close=function(){var t=this;if(this._opened){this._popupRef&&this._popupRef.hasAttached()&&this._popupRef.detach(),this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null),this._calendarPortal&&this._calendarPortal.isAttached&&this._calendarPortal.detach();var e=function(){t._opened&&(t._opened=!1,t.closedStream.emit(),t._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(e)):e()}},t.prototype._openAsDialog=function(){var t=this;this._dialogRef=this._dialog.open(fr,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog"}),this._dialogRef.afterClosed().subscribe(function(){return t.close()}),this._dialogRef.componentInstance.datepicker=this},t.prototype._openAsPopup=function(){var t=this;(this._calendarPortal||(this._calendarPortal=new d.ComponentPortal(fr,this._viewContainerRef)),this._popupRef||this._createPopup(),this._popupRef.hasAttached())||(this._popupRef.attach(this._calendarPortal).instance.datepicker=this,this._ngZone.onStable.asObservable().pipe(f.take(1)).subscribe(function(){t._popupRef.updatePosition()}))},t.prototype._createPopup=function(){var t=this,e=new p.OverlayConfig({positionStrategy:this._createPopupPositionStrategy(),hasBackdrop:!0,backdropClass:"mat-overlay-transparent-backdrop",direction:this._dir?this._dir.value:"ltr",scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(e),x.merge(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(h.filter(function(t){return t.keyCode===c.ESCAPE}))).subscribe(function(){return t.close()})},t.prototype._createPopupPositionStrategy=function(){var t=this._datepickerInput._getPopupFallbackOffset();return this._overlay.position().connectedTo(this._datepickerInput.getPopupConnectionElementRef(),{originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}).withFallbackPosition({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"},void 0,t).withFallbackPosition({originX:"end",originY:"bottom"},{overlayX:"end",overlayY:"top"}).withFallbackPosition({originX:"end",originY:"top"},{overlayX:"end",overlayY:"bottom"},void 0,t)},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.decorators=[{type:e.Component,args:[{selector:"mat-datepicker",template:"",exportAs:"matDatepicker",changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[{type:Vn},{type:p.Overlay},{type:e.NgZone},{type:e.ViewContainerRef},{type:void 0,decorators:[{type:e.Inject,args:[pr]}]},{type:at,decorators:[{type:e.Optional}]},{type:n.Directionality,decorators:[{type:e.Optional}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[s.DOCUMENT]}]}]},t.propDecorators={startAt:[{type:e.Input}],startView:[{type:e.Input}],touchUi:[{type:e.Input}],disabled:[{type:e.Input}],selectedChanged:[{type:e.Output}],panelClass:[{type:e.Input}],openedStream:[{type:e.Output,args:["opened"]}],closedStream:[{type:e.Output,args:["closed"]}],opened:[{type:e.Input}]},t}(),gr={provide:v.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return br}),multi:!0},yr={provide:v.NG_VALIDATORS,useExisting:e.forwardRef(function(){return br}),multi:!0},vr=function(t,e){this.target=t,this.targetElement=e,this.value=this.target.value},br=function(){function t(t,n,r,i){var o=this;if(this._elementRef=t,this._dateAdapter=n,this._dateFormats=r,this._formField=i,this.dateChange=new e.EventEmitter,this.dateInput=new e.EventEmitter,this._valueChange=new e.EventEmitter,this._disabledChange=new e.EventEmitter,this._onTouched=function(){},this._cvaOnChange=function(){},this._validatorOnChange=function(){},this._datepickerSubscription=O.Subscription.EMPTY,this._localeSubscription=O.Subscription.EMPTY,this._parseValidator=function(){return o._lastValueValid?null:{matDatepickerParse:{text:o._elementRef.nativeElement.value}}},this._minValidator=function(t){var e=o._getValidDateOrNull(o._dateAdapter.deserialize(t.value));return!o.min||!e||o._dateAdapter.compareDate(o.min,e)<=0?null:{matDatepickerMin:{min:o.min,actual:e}}},this._maxValidator=function(t){var e=o._getValidDateOrNull(o._dateAdapter.deserialize(t.value));return!o.max||!e||o._dateAdapter.compareDate(o.max,e)>=0?null:{matDatepickerMax:{max:o.max,actual:e}}},this._filterValidator=function(t){var e=o._getValidDateOrNull(o._dateAdapter.deserialize(t.value));return o._dateFilter&&e&&!o._dateFilter(e)?{matDatepickerFilter:!0}:null},this._validator=v.Validators.compose([this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]),this._lastValueValid=!1,!this._dateAdapter)throw nr("DateAdapter");if(!this._dateFormats)throw nr("MAT_DATE_FORMATS");this._localeSubscription=n.localeChanges.subscribe(function(){o.value=o.value})}return Object.defineProperty(t.prototype,"matDatepicker",{set:function(t){this.registerDatepicker(t)},enumerable:!0,configurable:!0}),t.prototype.registerDatepicker=function(t){t&&(this._datepicker=t,this._datepicker._registerInput(this))},Object.defineProperty(t.prototype,"matDatepickerFilter",{set:function(t){this._dateFilter=t,this._validatorOnChange()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){t=this._dateAdapter.deserialize(t),this._lastValueValid=!t||this._dateAdapter.isValid(t),t=this._getValidDateOrNull(t);var e=this.value;this._value=t,this._elementRef.nativeElement.value=t?this._dateAdapter.format(t,this._dateFormats.display.dateInput):"",this._dateAdapter.sameDate(e,t)||this._valueChange.emit(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this._min},set:function(t){this._min=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._validatorOnChange()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._max},set:function(t){this._max=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._validatorOnChange()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return!!this._disabled},set:function(t){var e=r.coerceBooleanProperty(t);this._disabled!==e&&(this._disabled=e,this._disabledChange.emit(e)),e&&this._elementRef.nativeElement.blur()},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._datepicker&&(this._datepickerSubscription=this._datepicker.selectedChanged.subscribe(function(e){t.value=e,t._cvaOnChange(e),t._onTouched(),t.dateInput.emit(new vr(t,t._elementRef.nativeElement)),t.dateChange.emit(new vr(t,t._elementRef.nativeElement))}))},t.prototype.ngOnDestroy=function(){this._datepickerSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this._valueChange.complete(),this._disabledChange.complete()},t.prototype.registerOnValidatorChange=function(t){this._validatorOnChange=t},t.prototype.validate=function(t){return this._validator?this._validator(t):null},t.prototype.getPopupConnectionElementRef=function(){return this._formField?this._formField.underlineRef:this._elementRef},t.prototype._getPopupFallbackOffset=function(){return this._formField?-this._formField._inputContainerRef.nativeElement.clientHeight:0},t.prototype.writeValue=function(t){this.value=t},t.prototype.registerOnChange=function(t){this._cvaOnChange=t},t.prototype.registerOnTouched=function(t){this._onTouched=t},t.prototype.setDisabledState=function(t){this.disabled=t},t.prototype._onKeydown=function(t){t.altKey&&t.keyCode===c.DOWN_ARROW&&(this._datepicker.open(),t.preventDefault())},t.prototype._onInput=function(t){var e=this._dateAdapter.parse(t,this._dateFormats.parse.dateInput);this._lastValueValid=!e||this._dateAdapter.isValid(e),e=this._getValidDateOrNull(e),this._value=e,this._cvaOnChange(e),this._valueChange.emit(e),this.dateInput.emit(new vr(this,this._elementRef.nativeElement))},t.prototype._onChange=function(){this.dateChange.emit(new vr(this,this._elementRef.nativeElement))},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.decorators=[{type:e.Directive,args:[{selector:"input[matDatepicker]",providers:[gr,yr,{provide:Kn,useExisting:t}],host:{"[attr.aria-haspopup]":"true","[attr.aria-owns]":"(_datepicker?.opened && _datepicker.id) || null","[attr.min]":"min ? _dateAdapter.toIso8601(min) : null","[attr.max]":"max ? _dateAdapter.toIso8601(max) : null","[disabled]":"disabled","(input)":"_onInput($event.target.value)","(change)":"_onChange()","(blur)":"_onTouched()","(keydown)":"_onKeydown($event)"},exportAs:"matDatepickerInput"}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:at,decorators:[{type:e.Optional}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[st]}]},{type:ue,decorators:[{type:e.Optional}]}]},t.propDecorators={matDatepicker:[{type:e.Input}],matDatepickerFilter:[{type:e.Input}],value:[{type:e.Input}],min:[{type:e.Input}],max:[{type:e.Input}],disabled:[{type:e.Input}],dateChange:[{type:e.Output}],dateInput:[{type:e.Output}]},t}(),_r=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[matDatepickerToggleIcon]"}]}],t.ctorParameters=function(){return[]},t}(),wr=function(){function t(t,e){this._intl=t,this._changeDetectorRef=e,this._stateChanges=O.Subscription.EMPTY}return Object.defineProperty(t.prototype,"disabled",{get:function(){return void 0===this._disabled?this.datepicker.disabled:!!this._disabled},set:function(t){this._disabled=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){t.datepicker&&this._watchStateChanges()},t.prototype.ngOnDestroy=function(){this._stateChanges.unsubscribe()},t.prototype.ngAfterContentInit=function(){this._watchStateChanges()},t.prototype._open=function(t){this.datepicker&&!this.disabled&&(this.datepicker.open(),t.stopPropagation())},t.prototype._watchStateChanges=function(){var t=this,e=this.datepicker?this.datepicker._disabledChange:S.of(),n=this.datepicker&&this.datepicker._datepickerInput?this.datepicker._datepickerInput._disabledChange:S.of(),r=this.datepicker?x.merge(this.datepicker.openedStream,this.datepicker.closedStream):S.of();this._stateChanges.unsubscribe(),this._stateChanges=x.merge(this._intl.changes,e,n,r).subscribe(function(){return t._changeDetectorRef.markForCheck()})},t.decorators=[{type:e.Component,args:[{selector:"mat-datepicker-toggle",template:'<button mat-icon-button type="button" [attr.aria-label]="_intl.openCalendarLabel" [disabled]="disabled" (click)="_open($event)"><svg *ngIf="!_customIcon" class="mat-datepicker-toggle-default-icon" viewBox="0 0 24 24" width="24px" height="24px" fill="currentColor" focusable="false"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"/></svg><ng-content select="[matDatepickerToggleIcon]"></ng-content></button>',styles:[".mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}"],host:{class:"mat-datepicker-toggle","[class.mat-datepicker-toggle-active]":"datepicker && datepicker.opened"},exportAs:"matDatepickerToggle",encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:rr},{type:e.ChangeDetectorRef}]},t.propDecorators={datepicker:[{type:e.Input,args:["for"]}],disabled:[{type:e.Input}],_customIcon:[{type:e.ContentChild,args:[_r]}]},t}(),Cr=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,Me,qn,p.OverlayModule,u.A11yModule],exports:[cr,or,mr,fr,br,wr,_r,ar,lr,sr],declarations:[cr,or,mr,fr,br,wr,_r,ar,lr,sr],providers:[rr,hr],entryComponents:[fr]}]}],t.ctorParameters=function(){return[]},t}(),xr=function(){function t(){this._vertical=!1,this._inset=!1}return Object.defineProperty(t.prototype,"vertical",{get:function(){return this._vertical},set:function(t){this._vertical=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inset",{get:function(){return this._inset},set:function(t){this._inset=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.decorators=[{type:e.Component,args:[{selector:"mat-divider",host:{role:"separator","[attr.aria-orientation]":'vertical ? "vertical" : "horizontal"',"[class.mat-divider-vertical]":"vertical","[class.mat-divider-inset]":"inset",class:"mat-divider"},template:"",styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}"],encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[]},t.propDecorators={vertical:[{type:e.Input}],inset:[{type:e.Input}]},t}(),Sr=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[Z,s.CommonModule],exports:[xr,Z],declarations:[xr]}]}],t.ctorParameters=function(){return[]},t}(),Er=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._hideToggle=!1,e.displayMode="default",e}return Y(n,t),Object.defineProperty(n.prototype,"hideToggle",{get:function(){return this._hideToggle},set:function(t){this._hideToggle=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),n.decorators=[{type:e.Directive,args:[{selector:"mat-accordion",exportAs:"matAccordion",host:{class:"mat-accordion"}}]}],n.ctorParameters=function(){return[]},n.propDecorators={hideToggle:[{type:e.Input}],displayMode:[{type:e.Input}]},n}(D.CdkAccordion),kr=function(){function t(t){this._template=t}return t.decorators=[{type:e.Directive,args:[{selector:"ng-template[matExpansionPanelContent]"}]}],t.ctorParameters=function(){return[{type:e.TemplateRef}]},t}(),Or="225ms cubic-bezier(0.4,0.0,0.2,1)",Pr={indicatorRotate:w.trigger("indicatorRotate",[w.state("collapsed",w.style({transform:"rotate(0deg)"})),w.state("expanded",w.style({transform:"rotate(180deg)"})),w.transition("expanded <=> collapsed",w.animate(Or))]),expansionHeaderHeight:w.trigger("expansionHeight",[w.state("collapsed",w.style({height:"{{collapsedHeight}}"}),{params:{collapsedHeight:"48px"}}),w.state("expanded",w.style({height:"{{expandedHeight}}"}),{params:{expandedHeight:"64px"}}),w.transition("expanded <=> collapsed",w.animate(Or))]),bodyExpansion:w.trigger("bodyExpansion",[w.state("collapsed",w.style({height:"0px",visibility:"hidden"})),w.state("expanded",w.style({height:"*",visibility:"visible"})),w.transition("expanded <=> collapsed",w.animate(Or))])},Ar=0,Dr=function(t){function n(e,n,r,o){var a=t.call(this,e,n,r)||this;return a._viewContainerRef=o,a._hideToggle=!1,a._inputChanges=new i.Subject,a._headerId="mat-expansion-panel-header-"+Ar++,a.accordion=e,a}return Y(n,t),Object.defineProperty(n.prototype,"hideToggle",{get:function(){return this._hideToggle},set:function(t){this._hideToggle=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),n.prototype._getHideToggle=function(){return this.accordion?this.accordion.hideToggle:this.hideToggle},n.prototype._hasSpacing=function(){return!!this.accordion&&"default"===(this.expanded?this.accordion.displayMode:this._getExpandedState())},n.prototype._getExpandedState=function(){return this.expanded?"expanded":"collapsed"},n.prototype.ngAfterContentInit=function(){var t=this;this._lazyContent&&this.opened.pipe(_.startWith(null),h.filter(function(){return t.expanded&&!t._portal}),f.take(1)).subscribe(function(){t._portal=new d.TemplatePortal(t._lazyContent._template,t._viewContainerRef)})},n.prototype.ngOnChanges=function(t){this._inputChanges.next(t)},n.prototype.ngOnDestroy=function(){t.prototype.ngOnDestroy.call(this),this._inputChanges.complete()},n.prototype._bodyAnimation=function(t){var e=t.element.classList,n="mat-expanded",r=t.phaseName,i=t.toState;"done"===r&&"expanded"===i?e.add(n):"start"===r&&"collapsed"===i&&e.remove(n)},n.decorators=[{type:e.Component,args:[{styles:[".mat-expansion-panel{transition:box-shadow 280ms cubic-bezier(.4,0,.2,1);box-sizing:content-box;display:block;margin:0;transition:margin 225ms cubic-bezier(.4,0,.2,1)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-expansion-panel-content{overflow:hidden}.mat-expansion-panel-content.mat-expanded{overflow:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion .mat-expansion-panel-spacing:first-child{margin-top:0}.mat-accordion .mat-expansion-panel-spacing:last-child{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row button.mat-button{margin-left:8px}[dir=rtl] .mat-action-row button.mat-button{margin-left:0;margin-right:8px}"],selector:"mat-expansion-panel",exportAs:"matExpansionPanel",template:'<ng-content select="mat-expansion-panel-header"></ng-content><div class="mat-expansion-panel-content" role="region" [@bodyExpansion]="_getExpandedState()" (@bodyExpansion.done)="_bodyAnimation($event)" (@bodyExpansion.start)="_bodyAnimation($event)" [class.mat-expanded]="expanded" [attr.aria-labelledby]="_headerId" [id]="id" #body><div class="mat-expansion-panel-body"><ng-content></ng-content><ng-template [cdkPortalOutlet]="_portal"></ng-template></div><ng-content select="mat-action-row"></ng-content></div>',encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,inputs:["disabled","expanded"],outputs:["opened","closed","expandedChange"],animations:[Pr.bodyExpansion],host:{class:"mat-expansion-panel","[class.mat-expanded]":"expanded","[class.mat-expansion-panel-spacing]":"_hasSpacing()"}}]}],n.ctorParameters=function(){return[{type:Er,decorators:[{type:e.Optional},{type:e.Host}]},{type:e.ChangeDetectorRef},{type:E.UniqueSelectionDispatcher},{type:e.ViewContainerRef}]},n.propDecorators={hideToggle:[{type:e.Input}],_lazyContent:[{type:e.ContentChild,args:[kr]}]},n}(D.CdkAccordionItem),Tr=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-action-row",host:{class:"mat-action-row"}}]}],t.ctorParameters=function(){return[]},t}(),Mr=function(){function t(t,e,n,r){var i=this;this.panel=t,this._element=e,this._focusMonitor=n,this._changeDetectorRef=r,this._parentChangeSubscription=O.Subscription.EMPTY,this._parentChangeSubscription=x.merge(t.opened,t.closed,t._inputChanges.pipe(h.filter(function(t){return!(!t.hideToggle&&!t.disabled)}))).subscribe(function(){return i._changeDetectorRef.markForCheck()}),n.monitor(e.nativeElement)}return t.prototype._toggle=function(){this.panel.toggle()},t.prototype._isExpanded=function(){return this.panel.expanded},t.prototype._getExpandedState=function(){return this.panel._getExpandedState()},t.prototype._getPanelId=function(){return this.panel.id},t.prototype._showToggle=function(){return!this.panel.hideToggle&&!this.panel.disabled},t.prototype._keydown=function(t){switch(t.keyCode){case c.SPACE:case c.ENTER:t.preventDefault(),this._toggle();break;default:return}},t.prototype.ngOnDestroy=function(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element.nativeElement)},t.decorators=[{type:e.Component,args:[{selector:"mat-expansion-panel-header",styles:[".mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:0}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-description,.mat-expansion-panel-header-title{display:flex;flex-grow:1;margin-right:16px}[dir=rtl] .mat-expansion-panel-header-description,[dir=rtl] .mat-expansion-panel-header-title{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:'';display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}"],template:'<span class="mat-content"><ng-content select="mat-panel-title"></ng-content><ng-content select="mat-panel-description"></ng-content><ng-content></ng-content></span><span [@indicatorRotate]="_getExpandedState()" *ngIf="_showToggle()" class="mat-expansion-indicator"></span>',encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[Pr.indicatorRotate,Pr.expansionHeaderHeight],host:{class:"mat-expansion-panel-header",role:"button","[attr.id]":"panel._headerId","[attr.tabindex]":"panel.disabled ? -1 : 0","[attr.aria-controls]":"_getPanelId()","[attr.aria-expanded]":"_isExpanded()","[attr.aria-disabled]":"panel.disabled","[class.mat-expanded]":"_isExpanded()","(click)":"_toggle()","(keydown)":"_keydown($event)","[@expansionHeight]":"{\n        value: _getExpandedState(),\n        params: {\n          collapsedHeight: collapsedHeight,\n          expandedHeight: expandedHeight\n        }\n    }"}}]}],t.ctorParameters=function(){return[{type:Dr,decorators:[{type:e.Host}]},{type:e.ElementRef},{type:u.FocusMonitor},{type:e.ChangeDetectorRef}]},t.propDecorators={expandedHeight:[{type:e.Input}],collapsedHeight:[{type:e.Input}]},t}(),Ir=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-panel-description",host:{class:"mat-expansion-panel-header-description"}}]}],t.ctorParameters=function(){return[]},t}(),Rr=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-panel-title",host:{class:"mat-expansion-panel-header-title"}}]}],t.ctorParameters=function(){return[]},t}(),Nr=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,u.A11yModule,D.CdkAccordionModule,d.PortalModule],exports:[Er,Dr,Tr,Mr,Rr,Ir,kr],declarations:[Er,Dr,Tr,Mr,Rr,Ir,kr],providers:[E.UNIQUE_SELECTION_DISPATCHER_PROVIDER]}]}],t.ctorParameters=function(){return[]},t}();function Lr(t){return""+(t||"")}function jr(t){return"string"==typeof t?parseInt(t,10):t}var Fr=function(){function t(t){this._element=t,this._rowspan=1,this._colspan=1}return Object.defineProperty(t.prototype,"rowspan",{get:function(){return this._rowspan},set:function(t){this._rowspan=jr(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"colspan",{get:function(){return this._colspan},set:function(t){this._colspan=jr(t)},enumerable:!0,configurable:!0}),t.prototype._setStyle=function(t,e){this._element.nativeElement.style[t]=e},t.decorators=[{type:e.Component,args:[{selector:"mat-grid-tile",exportAs:"matGridTile",host:{class:"mat-grid-tile"},template:'<figure class="mat-figure"><ng-content></ng-content></figure>',styles:[".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-figure{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}.mat-grid-tile .mat-grid-tile-footer,.mat-grid-tile .mat-grid-tile-header{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-footer>*,.mat-grid-tile .mat-grid-tile-header>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-tile-footer.mat-2-line,.mat-grid-tile .mat-grid-tile-header.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={rowspan:[{type:e.Input}],colspan:[{type:e.Input}]},t}(),Vr=function(){function t(t){this._element=t}return t.prototype.ngAfterContentInit=function(){this._lineSetter=new St(this._lines,this._element)},t.decorators=[{type:e.Component,args:[{selector:"mat-grid-tile-header, mat-grid-tile-footer",template:'<ng-content select="[mat-grid-avatar], [matGridAvatar]"></ng-content><div class="mat-grid-list-text"><ng-content select="[mat-line], [matLine]"></ng-content></div><ng-content></ng-content>',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={_lines:[{type:e.ContentChildren,args:[xt]}]},t}(),Br=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-grid-avatar], [matGridAvatar]",host:{class:"mat-grid-avatar"}}]}],t.ctorParameters=function(){return[]},t}(),Ur=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-grid-tile-header",host:{class:"mat-grid-tile-header"}}]}],t.ctorParameters=function(){return[]},t}(),Hr=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-grid-tile-footer",host:{class:"mat-grid-tile-footer"}}]}],t.ctorParameters=function(){return[]},t}(),zr=function(){function t(t,e){var n=this;this.columnIndex=0,this.rowIndex=0,this.tracker=new Array(t),this.tracker.fill(0,0,this.tracker.length),this.positions=e.map(function(t){return n._trackTile(t)})}return Object.defineProperty(t.prototype,"rowCount",{get:function(){return this.rowIndex+1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowspan",{get:function(){var t=Math.max.apply(Math,this.tracker);return t>1?this.rowCount+t-1:this.rowCount},enumerable:!0,configurable:!0}),t.prototype._trackTile=function(t){var e=this._findMatchingGap(t.colspan);return this._markTilePosition(e,t),this.columnIndex=e+t.colspan,new Gr(this.rowIndex,e)},t.prototype._findMatchingGap=function(t){if(t>this.tracker.length)throw Error("mat-grid-list: tile with colspan "+t+' is wider than grid with cols="'+this.tracker.length+'".');for(var e=-1,n=-1;this.columnIndex+t>this.tracker.length?this._nextRow():-1!=(e=this.tracker.indexOf(0,this.columnIndex))?(n=this._findGapEndIndex(e),this.columnIndex=e+1):this._nextRow(),n-e<t;);return Math.max(e,0)},t.prototype._nextRow=function(){this.columnIndex=0,this.rowIndex++;for(var t=0;t<this.tracker.length;t++)this.tracker[t]=Math.max(0,this.tracker[t]-1)},t.prototype._findGapEndIndex=function(t){for(var e=t+1;e<this.tracker.length;e++)if(0!=this.tracker[e])return e;return this.tracker.length},t.prototype._markTilePosition=function(t,e){for(var n=0;n<e.colspan;n++)this.tracker[t+n]=e.rowspan},t}(),Gr=function(t,e){this.row=t,this.col=e},Wr=function(){function t(){this._rows=0,this._rowspan=0}return t.prototype.init=function(t,e,n,r){this._gutterSize=Qr(t),this._rows=e.rowCount,this._rowspan=e.rowspan,this._cols=n,this._direction=r},t.prototype.getBaseTileSize=function(t,e){return"("+t+"% - ("+this._gutterSize+" * "+e+"))"},t.prototype.getTilePosition=function(t,e){return 0===e?"0":Kr("("+t+" + "+this._gutterSize+") * "+e)},t.prototype.getTileSize=function(t,e){return"("+t+" * "+e+") + ("+(e-1)+" * "+this._gutterSize+")"},t.prototype.setStyle=function(t,e,n){var r=100/this._cols,i=(this._cols-1)/this._cols;this.setColStyles(t,n,r,i),this.setRowStyles(t,e,r,i)},t.prototype.setColStyles=function(t,e,n,r){var i=this.getBaseTileSize(n,r),o="rtl"===this._direction?"right":"left";t._setStyle(o,this.getTilePosition(i,e)),t._setStyle("width",Kr(this.getTileSize(i,t.colspan)))},t.prototype.getGutterSpan=function(){return this._gutterSize+" * ("+this._rowspan+" - 1)"},t.prototype.getTileSpan=function(t){return this._rowspan+" * "+this.getTileSize(t,1)},t.prototype.getComputedHeight=function(){return null},t}(),qr=function(t){function e(e){var n=t.call(this)||this;return n.fixedRowHeight=e,n}return Y(e,t),e.prototype.init=function(e,n,r,i){t.prototype.init.call(this,e,n,r,i),this.fixedRowHeight=Qr(this.fixedRowHeight)},e.prototype.setRowStyles=function(t,e){t._setStyle("top",this.getTilePosition(this.fixedRowHeight,e)),t._setStyle("height",Kr(this.getTileSize(this.fixedRowHeight,t.rowspan)))},e.prototype.getComputedHeight=function(){return["height",Kr(this.getTileSpan(this.fixedRowHeight)+" + "+this.getGutterSpan())]},e.prototype.reset=function(t){t._setListStyle(["height",null]),t._tiles.forEach(function(t){t._setStyle("top",null),t._setStyle("height",null)})},e}(Wr),Yr=function(t){function e(e){var n=t.call(this)||this;return n._parseRatio(e),n}return Y(e,t),e.prototype.setRowStyles=function(t,e,n,r){var i=n/this.rowHeightRatio;this.baseTileHeight=this.getBaseTileSize(i,r),t._setStyle("marginTop",this.getTilePosition(this.baseTileHeight,e)),t._setStyle("paddingTop",Kr(this.getTileSize(this.baseTileHeight,t.rowspan)))},e.prototype.getComputedHeight=function(){return["paddingBottom",Kr(this.getTileSpan(this.baseTileHeight)+" + "+this.getGutterSpan())]},e.prototype.reset=function(t){t._setListStyle(["paddingBottom",null]),t._tiles.forEach(function(t){t._setStyle("marginTop",null),t._setStyle("paddingTop",null)})},e.prototype._parseRatio=function(t){var e=t.split(":");if(2!==e.length)throw Error('mat-grid-list: invalid ratio given for row-height: "'+t+'"');this.rowHeightRatio=parseFloat(e[0])/parseFloat(e[1])},e}(Wr),$r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Y(e,t),e.prototype.setRowStyles=function(t,e){var n=100/this._rowspan,r=(this._rows-1)/this._rows,i=this.getBaseTileSize(n,r);t._setStyle("top",this.getTilePosition(i,e)),t._setStyle("height",Kr(this.getTileSize(i,t.rowspan)))},e.prototype.reset=function(t){t._tiles.forEach(function(t){t._setStyle("top",null),t._setStyle("height",null)})},e}(Wr);function Kr(t){return"calc("+t+")"}function Qr(t){return t.match(/px|em|rem/)?t:t+"px"}var Xr=function(){function t(t,e){this._element=t,this._dir=e,this._gutter="1px"}return Object.defineProperty(t.prototype,"cols",{get:function(){return this._cols},set:function(t){this._cols=jr(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gutterSize",{get:function(){return this._gutter},set:function(t){this._gutter=Lr(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowHeight",{set:function(t){var e=Lr(t);e!==this._rowHeight&&(this._rowHeight=e,this._setTileStyler(this._rowHeight))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._checkCols(),this._checkRowHeight()},t.prototype.ngAfterContentChecked=function(){this._layoutTiles()},t.prototype._checkCols=function(){if(!this.cols)throw Error('mat-grid-list: must pass in number of columns. Example: <mat-grid-list cols="3">')},t.prototype._checkRowHeight=function(){this._rowHeight||this._setTileStyler("1:1")},t.prototype._setTileStyler=function(t){this._tileStyler&&this._tileStyler.reset(this),"fit"===t?this._tileStyler=new $r:t&&t.indexOf(":")>-1?this._tileStyler=new Yr(t):this._tileStyler=new qr(t)},t.prototype._layoutTiles=function(){var t=this,e=new zr(this.cols,this._tiles),n=this._dir?this._dir.value:"ltr";this._tileStyler.init(this.gutterSize,e,this.cols,n),this._tiles.forEach(function(n,r){var i=e.positions[r];t._tileStyler.setStyle(n,i.row,i.col)}),this._setListStyle(this._tileStyler.getComputedHeight())},t.prototype._setListStyle=function(t){t&&(this._element.nativeElement.style[t[0]]=t[1])},t.decorators=[{type:e.Component,args:[{selector:"mat-grid-list",exportAs:"matGridList",template:"<div><ng-content></ng-content></div>",styles:[".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-figure{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}.mat-grid-tile .mat-grid-tile-footer,.mat-grid-tile .mat-grid-tile-header{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-footer>*,.mat-grid-tile .mat-grid-tile-header>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-tile-footer.mat-2-line,.mat-grid-tile .mat-grid-tile-header.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}"],host:{class:"mat-grid-list"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:n.Directionality,decorators:[{type:e.Optional}]}]},t.propDecorators={_tiles:[{type:e.ContentChildren,args:[Fr]}],cols:[{type:e.Input}],gutterSize:[{type:e.Input}],rowHeight:[{type:e.Input}]},t}(),Zr=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[Et,Z],exports:[Xr,Fr,Vr,Et,Z,Ur,Hr,Br],declarations:[Xr,Fr,Vr,Ur,Hr,Br]}]}],t.ctorParameters=function(){return[]},t}();function Jr(t){return Error('Unable to find icon with the name "'+t+'"')}function ti(){return Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.")}function ei(t){return Error("The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was \""+t+'".')}var ni=function(t){this.url=t,this.svgElement=null},ri=function(){function t(t,e,n){this._httpClient=t,this._sanitizer=e,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._defaultFontSetClass="material-icons",this._document=n}return t.prototype.addSvgIcon=function(t,e){return this.addSvgIconInNamespace("",t,e)},t.prototype.addSvgIconInNamespace=function(t,e,n){var r=si(t,e);return this._svgIconConfigs.set(r,new ni(n)),this},t.prototype.addSvgIconSet=function(t){return this.addSvgIconSetInNamespace("",t)},t.prototype.addSvgIconSetInNamespace=function(t,e){var n=new ni(e),r=this._iconSetConfigs.get(t);return r?r.push(n):this._iconSetConfigs.set(t,[n]),this},t.prototype.registerFontClassAlias=function(t,e){return void 0===e&&(e=t),this._fontCssClassesByAlias.set(t,e),this},t.prototype.classNameForFontAlias=function(t){return this._fontCssClassesByAlias.get(t)||t},t.prototype.setDefaultFontSetClass=function(t){return this._defaultFontSetClass=t,this},t.prototype.getDefaultFontSetClass=function(){return this._defaultFontSetClass},t.prototype.getSvgIconFromUrl=function(t){var n=this,r=this._sanitizer.sanitize(e.SecurityContext.RESOURCE_URL,t);if(!r)throw ei(t);var i=this._cachedIconsByUrl.get(r);return i?S.of(ai(i)):this._loadSvgIconFromConfig(new ni(t)).pipe(g.tap(function(t){return n._cachedIconsByUrl.set(r,t)}),I.map(function(t){return ai(t)}))},t.prototype.getNamedSvgIcon=function(t,e){void 0===e&&(e="");var n=si(e,t),r=this._svgIconConfigs.get(n);if(r)return this._getSvgFromConfig(r);var i=this._iconSetConfigs.get(e);return i?this._getSvgFromIconSetConfigs(t,i):j._throw(Jr(n))},t.prototype._getSvgFromConfig=function(t){return t.svgElement?S.of(ai(t.svgElement)):this._loadSvgIconFromConfig(t).pipe(g.tap(function(e){return t.svgElement=e}),I.map(function(t){return ai(t)}))},t.prototype._getSvgFromIconSetConfigs=function(t,n){var r=this,i=this._extractIconWithNameFromAnySet(t,n);if(i)return S.of(i);var o=n.filter(function(t){return!t.svgElement}).map(function(t){return r._loadSvgIconSetFromConfig(t).pipe(T.catchError(function(n){var i=r._sanitizer.sanitize(e.SecurityContext.RESOURCE_URL,t.url);return console.log("Loading icon set URL: "+i+" failed: "+n),S.of(null)}))});return L.forkJoin(o).pipe(I.map(function(){var e=r._extractIconWithNameFromAnySet(t,n);if(!e)throw Jr(t);return e}))},t.prototype._extractIconWithNameFromAnySet=function(t,e){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.svgElement){var i=this._extractSvgIconFromSet(r.svgElement,t);if(i)return i}}return null},t.prototype._loadSvgIconFromConfig=function(t){var e=this;return this._fetchUrl(t.url).pipe(I.map(function(t){return e._createSvgElementForSingleIcon(t)}))},t.prototype._loadSvgIconSetFromConfig=function(t){var e=this;return t.svgElement?S.of(t.svgElement):this._fetchUrl(t.url).pipe(I.map(function(n){return t.svgElement||(t.svgElement=e._svgElementFromString(n)),t.svgElement}))},t.prototype._createSvgElementForSingleIcon=function(t){var e=this._svgElementFromString(t);return this._setSvgAttributes(e),e},t.prototype._extractSvgIconFromSet=function(t,e){var n=t.querySelector("#"+e);if(!n)return null;var r=n.cloneNode(!0);if(r.id="","svg"===r.nodeName.toLowerCase())return this._setSvgAttributes(r);if("symbol"===r.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(r));var i=this._svgElementFromString("<svg></svg>");return i.appendChild(r),this._setSvgAttributes(i)},t.prototype._svgElementFromString=function(t){if(this._document||"undefined"!=typeof document){var e=(this._document||document).createElement("DIV");e.innerHTML=t;var n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}throw new Error("MatIconRegistry could not resolve document.")},t.prototype._toSvgElement=function(t){for(var e=this._svgElementFromString("<svg></svg>"),n=0;n<t.childNodes.length;n++)t.childNodes[n].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[n].cloneNode(!0));return e},t.prototype._setSvgAttributes=function(t){return t.getAttribute("xmlns")||t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),t},t.prototype._fetchUrl=function(t){var n=this;if(!this._httpClient)throw ti();var r=this._sanitizer.sanitize(e.SecurityContext.RESOURCE_URL,t);if(!r)throw ei(t);var i=this._inProgressUrlFetches.get(r);if(i)return i;var o=this._httpClient.get(r,{responseType:"text"}).pipe(M.finalize(function(){return n._inProgressUrlFetches.delete(r)}),R.share());return this._inProgressUrlFetches.set(r,o),o},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:N.HttpClient,decorators:[{type:e.Optional}]},{type:a.DomSanitizer},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[s.DOCUMENT]}]}]},t}();function ii(t,e,n,r){return t||new ri(e,n,r)}var oi={provide:ri,deps:[[new e.Optional,new e.SkipSelf,ri],[new e.Optional,N.HttpClient],a.DomSanitizer,[new e.Optional,s.DOCUMENT]],useFactory:ii};function ai(t){return t.cloneNode(!0)}function si(t,e){return t+":"+e}var li=function(t){this._elementRef=t},ci=tt(li),ui=function(t){function n(e,n,r){var i=t.call(this,e)||this;return i._iconRegistry=n,r||e.nativeElement.setAttribute("aria-hidden","true"),i}return Y(n,t),Object.defineProperty(n.prototype,"fontSet",{get:function(){return this._fontSet},set:function(t){this._fontSet=this._cleanupFontValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fontIcon",{get:function(){return this._fontIcon},set:function(t){this._fontIcon=this._cleanupFontValue(t)},enumerable:!0,configurable:!0}),n.prototype._splitIconName=function(t){if(!t)return["",""];var e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error('Invalid icon name: "'+t+'"')}},n.prototype.ngOnChanges=function(t){var e=this;if(t.svgIcon)if(this.svgIcon){var n=this._splitIconName(this.svgIcon),r=n[0],i=n[1];this._iconRegistry.getNamedSvgIcon(i,r).pipe(f.take(1)).subscribe(function(t){return e._setSvgElement(t)},function(t){return console.log("Error retrieving icon: "+t.message)})}else this._clearSvgElement();this._usingFontIcon()&&this._updateFontIconClasses()},n.prototype.ngOnInit=function(){this._usingFontIcon()&&this._updateFontIconClasses()},n.prototype._usingFontIcon=function(){return!this.svgIcon},n.prototype._setSvgElement=function(t){this._clearSvgElement(),this._elementRef.nativeElement.appendChild(t)},n.prototype._clearSvgElement=function(){for(var t=this._elementRef.nativeElement,e=t.childNodes.length,n=0;n<e;n++)t.removeChild(t.childNodes[n])},n.prototype._updateFontIconClasses=function(){if(this._usingFontIcon()){var t=this._elementRef.nativeElement,e=this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet):this._iconRegistry.getDefaultFontSetClass();e!=this._previousFontSetClass&&(this._previousFontSetClass&&t.classList.remove(this._previousFontSetClass),e&&t.classList.add(e),this._previousFontSetClass=e),this.fontIcon!=this._previousFontIconClass&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}},n.prototype._cleanupFontValue=function(t){return"string"==typeof t?t.trim().split(" ")[0]:t},n.decorators=[{type:e.Component,args:[{template:"<ng-content></ng-content>",selector:"mat-icon",exportAs:"matIcon",styles:[".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}"],inputs:["color"],host:{role:"img",class:"mat-icon"},encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:ri},{type:void 0,decorators:[{type:e.Attribute,args:["aria-hidden"]}]}]},n.propDecorators={svgIcon:[{type:e.Input}],fontSet:[{type:e.Input}],fontIcon:[{type:e.Input}]},n}(ci),pi=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[Z],exports:[ui,Z],declarations:[ui],providers:[oi]}]}],t.ctorParameters=function(){return[]},t}(),di=function(){},hi=et(di),fi=function(){},mi=et(fi),gi=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Component,args:[{selector:"mat-nav-list",exportAs:"matNavList",host:{role:"navigation",class:"mat-nav-list"},template:"<ng-content></ng-content>",styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}.mat-subheader{display:flex;box-sizing:border-box;padding:16px;align-items:center}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{margin:0}.mat-list,.mat-nav-list,.mat-selection-list{padding-top:8px;display:block}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{height:48px;line-height:16px}.mat-list .mat-subheader:first-child,.mat-nav-list .mat-subheader:first-child,.mat-selection-list .mat-subheader:first-child{margin-top:-8px}.mat-list .mat-list-item,.mat-list .mat-list-option,.mat-nav-list .mat-list-item,.mat-nav-list .mat-list-option,.mat-selection-list .mat-list-item,.mat-selection-list .mat-list-option{display:block;height:48px}.mat-list .mat-list-item .mat-list-item-content,.mat-list .mat-list-option .mat-list-item-content,.mat-nav-list .mat-list-item .mat-list-item-content,.mat-nav-list .mat-list-option .mat-list-item-content,.mat-selection-list .mat-list-item .mat-list-item-content,.mat-selection-list .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list .mat-list-item .mat-list-item-content-reverse,.mat-list .mat-list-option .mat-list-item-content-reverse,.mat-nav-list .mat-list-item .mat-list-item-content-reverse,.mat-nav-list .mat-list-option .mat-list-item-content-reverse,.mat-selection-list .mat-list-item .mat-list-item-content-reverse,.mat-selection-list .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list .mat-list-item .mat-list-item-ripple,.mat-list .mat-list-option .mat-list-item-ripple,.mat-nav-list .mat-list-item .mat-list-item-ripple,.mat-nav-list .mat-list-option .mat-list-item-ripple,.mat-selection-list .mat-list-item .mat-list-item-ripple,.mat-selection-list .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list .mat-list-item.mat-list-item-with-avatar,.mat-list .mat-list-option.mat-list-item-with-avatar,.mat-nav-list .mat-list-item.mat-list-item-with-avatar,.mat-nav-list .mat-list-option.mat-list-item-with-avatar,.mat-selection-list .mat-list-item.mat-list-item-with-avatar,.mat-selection-list .mat-list-option.mat-list-item-with-avatar{height:56px}.mat-list .mat-list-item.mat-2-line,.mat-list .mat-list-option.mat-2-line,.mat-nav-list .mat-list-item.mat-2-line,.mat-nav-list .mat-list-option.mat-2-line,.mat-selection-list .mat-list-item.mat-2-line,.mat-selection-list .mat-list-option.mat-2-line{height:72px}.mat-list .mat-list-item.mat-3-line,.mat-list .mat-list-option.mat-3-line,.mat-nav-list .mat-list-item.mat-3-line,.mat-nav-list .mat-list-option.mat-3-line,.mat-selection-list .mat-list-item.mat-3-line,.mat-selection-list .mat-list-option.mat-3-line{height:88px}.mat-list .mat-list-item.mat-multi-line,.mat-list .mat-list-option.mat-multi-line,.mat-nav-list .mat-list-item.mat-multi-line,.mat-nav-list .mat-list-option.mat-multi-line,.mat-selection-list .mat-list-item.mat-multi-line,.mat-selection-list .mat-list-option.mat-multi-line{height:auto}.mat-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list .mat-list-option.mat-multi-line .mat-list-item-content,.mat-nav-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-nav-list .mat-list-option.mat-multi-line .mat-list-item-content,.mat-selection-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-selection-list .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list .mat-list-item .mat-list-text,.mat-list .mat-list-option .mat-list-text,.mat-nav-list .mat-list-item .mat-list-text,.mat-nav-list .mat-list-option .mat-list-text,.mat-selection-list .mat-list-item .mat-list-text,.mat-selection-list .mat-list-option .mat-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mat-list .mat-list-item .mat-list-text>*,.mat-list .mat-list-option .mat-list-text>*,.mat-nav-list .mat-list-item .mat-list-text>*,.mat-nav-list .mat-list-option .mat-list-text>*,.mat-selection-list .mat-list-item .mat-list-text>*,.mat-selection-list .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-list .mat-list-item .mat-list-text:empty,.mat-list .mat-list-option .mat-list-text:empty,.mat-nav-list .mat-list-item .mat-list-text:empty,.mat-nav-list .mat-list-option .mat-list-text:empty,.mat-selection-list .mat-list-item .mat-list-text:empty,.mat-selection-list .mat-list-option .mat-list-text:empty{display:none}.mat-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-nav-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-nav-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-selection-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-selection-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)){padding-right:0;padding-left:16px}[dir=rtl] .mat-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)){padding-right:16px;padding-left:0}.mat-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-nav-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-nav-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-selection-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-selection-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)){padding-left:0;padding-right:16px}[dir=rtl] .mat-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)){padding-right:0;padding-left:16px}.mat-list .mat-list-item .mat-list-avatar,.mat-list .mat-list-option .mat-list-avatar,.mat-nav-list .mat-list-item .mat-list-avatar,.mat-nav-list .mat-list-option .mat-list-avatar,.mat-selection-list .mat-list-item .mat-list-avatar,.mat-selection-list .mat-list-option .mat-list-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%}.mat-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-nav-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-nav-list .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-selection-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-selection-list .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:72px;width:calc(100% - 72px)}[dir=rtl] .mat-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:72px}.mat-list .mat-list-item .mat-list-icon,.mat-list .mat-list-option .mat-list-icon,.mat-nav-list .mat-list-item .mat-list-icon,.mat-nav-list .mat-list-option .mat-list-icon,.mat-selection-list .mat-list-item .mat-list-icon,.mat-selection-list .mat-list-option .mat-list-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-nav-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-nav-list .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-selection-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-selection-list .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:64px;width:calc(100% - 64px)}[dir=rtl] .mat-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:64px}.mat-list .mat-list-item .mat-divider,.mat-list .mat-list-option .mat-divider,.mat-nav-list .mat-list-item .mat-divider,.mat-nav-list .mat-list-option .mat-divider,.mat-selection-list .mat-list-item .mat-divider,.mat-selection-list .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list .mat-list-item .mat-divider,[dir=rtl] .mat-list .mat-list-option .mat-divider,[dir=rtl] .mat-nav-list .mat-list-item .mat-divider,[dir=rtl] .mat-nav-list .mat-list-option .mat-divider,[dir=rtl] .mat-selection-list .mat-list-item .mat-divider,[dir=rtl] .mat-selection-list .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list .mat-list-item .mat-divider.mat-divider-inset,.mat-list .mat-list-option .mat-divider.mat-divider-inset,.mat-nav-list .mat-list-item .mat-divider.mat-divider-inset,.mat-nav-list .mat-list-option .mat-divider.mat-divider-inset,.mat-selection-list .mat-list-item .mat-divider.mat-divider-inset,.mat-selection-list .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-list[dense],.mat-nav-list[dense],.mat-selection-list[dense]{padding-top:4px;display:block}.mat-list[dense] .mat-subheader,.mat-nav-list[dense] .mat-subheader,.mat-selection-list[dense] .mat-subheader{height:40px;line-height:8px}.mat-list[dense] .mat-subheader:first-child,.mat-nav-list[dense] .mat-subheader:first-child,.mat-selection-list[dense] .mat-subheader:first-child{margin-top:-4px}.mat-list[dense] .mat-list-item,.mat-list[dense] .mat-list-option,.mat-nav-list[dense] .mat-list-item,.mat-nav-list[dense] .mat-list-option,.mat-selection-list[dense] .mat-list-item,.mat-selection-list[dense] .mat-list-option{display:block;height:40px}.mat-list[dense] .mat-list-item .mat-list-item-content,.mat-list[dense] .mat-list-option .mat-list-item-content,.mat-nav-list[dense] .mat-list-item .mat-list-item-content,.mat-nav-list[dense] .mat-list-option .mat-list-item-content,.mat-selection-list[dense] .mat-list-item .mat-list-item-content,.mat-selection-list[dense] .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-list[dense] .mat-list-option .mat-list-item-content-reverse,.mat-nav-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-nav-list[dense] .mat-list-option .mat-list-item-content-reverse,.mat-selection-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-selection-list[dense] .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list[dense] .mat-list-item .mat-list-item-ripple,.mat-list[dense] .mat-list-option .mat-list-item-ripple,.mat-nav-list[dense] .mat-list-item .mat-list-item-ripple,.mat-nav-list[dense] .mat-list-option .mat-list-item-ripple,.mat-selection-list[dense] .mat-list-item .mat-list-item-ripple,.mat-selection-list[dense] .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar{height:48px}.mat-list[dense] .mat-list-item.mat-2-line,.mat-list[dense] .mat-list-option.mat-2-line,.mat-nav-list[dense] .mat-list-item.mat-2-line,.mat-nav-list[dense] .mat-list-option.mat-2-line,.mat-selection-list[dense] .mat-list-item.mat-2-line,.mat-selection-list[dense] .mat-list-option.mat-2-line{height:60px}.mat-list[dense] .mat-list-item.mat-3-line,.mat-list[dense] .mat-list-option.mat-3-line,.mat-nav-list[dense] .mat-list-item.mat-3-line,.mat-nav-list[dense] .mat-list-option.mat-3-line,.mat-selection-list[dense] .mat-list-item.mat-3-line,.mat-selection-list[dense] .mat-list-option.mat-3-line{height:76px}.mat-list[dense] .mat-list-item.mat-multi-line,.mat-list[dense] .mat-list-option.mat-multi-line,.mat-nav-list[dense] .mat-list-item.mat-multi-line,.mat-nav-list[dense] .mat-list-option.mat-multi-line,.mat-selection-list[dense] .mat-list-item.mat-multi-line,.mat-selection-list[dense] .mat-list-option.mat-multi-line{height:auto}.mat-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content,.mat-nav-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-nav-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content,.mat-selection-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-selection-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list[dense] .mat-list-item .mat-list-text,.mat-list[dense] .mat-list-option .mat-list-text,.mat-nav-list[dense] .mat-list-item .mat-list-text,.mat-nav-list[dense] .mat-list-option .mat-list-text,.mat-selection-list[dense] .mat-list-item .mat-list-text,.mat-selection-list[dense] .mat-list-option .mat-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mat-list[dense] .mat-list-item .mat-list-text>*,.mat-list[dense] .mat-list-option .mat-list-text>*,.mat-nav-list[dense] .mat-list-item .mat-list-text>*,.mat-nav-list[dense] .mat-list-option .mat-list-text>*,.mat-selection-list[dense] .mat-list-item .mat-list-text>*,.mat-selection-list[dense] .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-list[dense] .mat-list-item .mat-list-text:empty,.mat-list[dense] .mat-list-option .mat-list-text:empty,.mat-nav-list[dense] .mat-list-item .mat-list-text:empty,.mat-nav-list[dense] .mat-list-option .mat-list-text:empty,.mat-selection-list[dense] .mat-list-item .mat-list-text:empty,.mat-selection-list[dense] .mat-list-option .mat-list-text:empty{display:none}.mat-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-nav-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-nav-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-selection-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-selection-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)){padding-right:0;padding-left:16px}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)){padding-right:16px;padding-left:0}.mat-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-nav-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-nav-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-selection-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-selection-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)){padding-left:0;padding-right:16px}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)){padding-right:0;padding-left:16px}.mat-list[dense] .mat-list-item .mat-list-avatar,.mat-list[dense] .mat-list-option .mat-list-avatar,.mat-nav-list[dense] .mat-list-item .mat-list-avatar,.mat-nav-list[dense] .mat-list-option .mat-list-avatar,.mat-selection-list[dense] .mat-list-item .mat-list-avatar,.mat-selection-list[dense] .mat-list-option .mat-list-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%}.mat-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:68px;width:calc(100% - 68px)}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:68px}.mat-list[dense] .mat-list-item .mat-list-icon,.mat-list[dense] .mat-list-option .mat-list-icon,.mat-nav-list[dense] .mat-list-item .mat-list-icon,.mat-nav-list[dense] .mat-list-option .mat-list-icon,.mat-selection-list[dense] .mat-list-item .mat-list-icon,.mat-selection-list[dense] .mat-list-option .mat-list-icon{flex-shrink:0;width:20px;height:20px;font-size:20px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:60px;width:calc(100% - 60px)}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:60px}.mat-list[dense] .mat-list-item .mat-divider,.mat-list[dense] .mat-list-option .mat-divider,.mat-nav-list[dense] .mat-list-item .mat-divider,.mat-nav-list[dense] .mat-list-option .mat-divider,.mat-selection-list[dense] .mat-list-item .mat-divider,.mat-selection-list[dense] .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-list[dense] .mat-list-option .mat-divider,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-divider,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-divider.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-divider.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-nav-list a{text-decoration:none;color:inherit}.mat-nav-list .mat-list-item-content{cursor:pointer}.mat-nav-list .mat-list-item-content.mat-list-item-focus,.mat-nav-list .mat-list-item-content:hover{outline:0}.mat-list-option:not(.mat-list-item-disabled){cursor:pointer}"],inputs:["disableRipple"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[]},n}(hi),yi=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Component,args:[{selector:"mat-list",exportAs:"matList",template:"<ng-content></ng-content>",host:{class:"mat-list"},styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}.mat-subheader{display:flex;box-sizing:border-box;padding:16px;align-items:center}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{margin:0}.mat-list,.mat-nav-list,.mat-selection-list{padding-top:8px;display:block}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{height:48px;line-height:16px}.mat-list .mat-subheader:first-child,.mat-nav-list .mat-subheader:first-child,.mat-selection-list .mat-subheader:first-child{margin-top:-8px}.mat-list .mat-list-item,.mat-list .mat-list-option,.mat-nav-list .mat-list-item,.mat-nav-list .mat-list-option,.mat-selection-list .mat-list-item,.mat-selection-list .mat-list-option{display:block;height:48px}.mat-list .mat-list-item .mat-list-item-content,.mat-list .mat-list-option .mat-list-item-content,.mat-nav-list .mat-list-item .mat-list-item-content,.mat-nav-list .mat-list-option .mat-list-item-content,.mat-selection-list .mat-list-item .mat-list-item-content,.mat-selection-list .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list .mat-list-item .mat-list-item-content-reverse,.mat-list .mat-list-option .mat-list-item-content-reverse,.mat-nav-list .mat-list-item .mat-list-item-content-reverse,.mat-nav-list .mat-list-option .mat-list-item-content-reverse,.mat-selection-list .mat-list-item .mat-list-item-content-reverse,.mat-selection-list .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list .mat-list-item .mat-list-item-ripple,.mat-list .mat-list-option .mat-list-item-ripple,.mat-nav-list .mat-list-item .mat-list-item-ripple,.mat-nav-list .mat-list-option .mat-list-item-ripple,.mat-selection-list .mat-list-item .mat-list-item-ripple,.mat-selection-list .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list .mat-list-item.mat-list-item-with-avatar,.mat-list .mat-list-option.mat-list-item-with-avatar,.mat-nav-list .mat-list-item.mat-list-item-with-avatar,.mat-nav-list .mat-list-option.mat-list-item-with-avatar,.mat-selection-list .mat-list-item.mat-list-item-with-avatar,.mat-selection-list .mat-list-option.mat-list-item-with-avatar{height:56px}.mat-list .mat-list-item.mat-2-line,.mat-list .mat-list-option.mat-2-line,.mat-nav-list .mat-list-item.mat-2-line,.mat-nav-list .mat-list-option.mat-2-line,.mat-selection-list .mat-list-item.mat-2-line,.mat-selection-list .mat-list-option.mat-2-line{height:72px}.mat-list .mat-list-item.mat-3-line,.mat-list .mat-list-option.mat-3-line,.mat-nav-list .mat-list-item.mat-3-line,.mat-nav-list .mat-list-option.mat-3-line,.mat-selection-list .mat-list-item.mat-3-line,.mat-selection-list .mat-list-option.mat-3-line{height:88px}.mat-list .mat-list-item.mat-multi-line,.mat-list .mat-list-option.mat-multi-line,.mat-nav-list .mat-list-item.mat-multi-line,.mat-nav-list .mat-list-option.mat-multi-line,.mat-selection-list .mat-list-item.mat-multi-line,.mat-selection-list .mat-list-option.mat-multi-line{height:auto}.mat-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list .mat-list-option.mat-multi-line .mat-list-item-content,.mat-nav-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-nav-list .mat-list-option.mat-multi-line .mat-list-item-content,.mat-selection-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-selection-list .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list .mat-list-item .mat-list-text,.mat-list .mat-list-option .mat-list-text,.mat-nav-list .mat-list-item .mat-list-text,.mat-nav-list .mat-list-option .mat-list-text,.mat-selection-list .mat-list-item .mat-list-text,.mat-selection-list .mat-list-option .mat-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mat-list .mat-list-item .mat-list-text>*,.mat-list .mat-list-option .mat-list-text>*,.mat-nav-list .mat-list-item .mat-list-text>*,.mat-nav-list .mat-list-option .mat-list-text>*,.mat-selection-list .mat-list-item .mat-list-text>*,.mat-selection-list .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-list .mat-list-item .mat-list-text:empty,.mat-list .mat-list-option .mat-list-text:empty,.mat-nav-list .mat-list-item .mat-list-text:empty,.mat-nav-list .mat-list-option .mat-list-text:empty,.mat-selection-list .mat-list-item .mat-list-text:empty,.mat-selection-list .mat-list-option .mat-list-text:empty{display:none}.mat-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-nav-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-nav-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-selection-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-selection-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)){padding-right:0;padding-left:16px}[dir=rtl] .mat-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)){padding-right:16px;padding-left:0}.mat-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-nav-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-nav-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-selection-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-selection-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)){padding-left:0;padding-right:16px}[dir=rtl] .mat-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)){padding-right:0;padding-left:16px}.mat-list .mat-list-item .mat-list-avatar,.mat-list .mat-list-option .mat-list-avatar,.mat-nav-list .mat-list-item .mat-list-avatar,.mat-nav-list .mat-list-option .mat-list-avatar,.mat-selection-list .mat-list-item .mat-list-avatar,.mat-selection-list .mat-list-option .mat-list-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%}.mat-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-nav-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-nav-list .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-selection-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-selection-list .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:72px;width:calc(100% - 72px)}[dir=rtl] .mat-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:72px}.mat-list .mat-list-item .mat-list-icon,.mat-list .mat-list-option .mat-list-icon,.mat-nav-list .mat-list-item .mat-list-icon,.mat-nav-list .mat-list-option .mat-list-icon,.mat-selection-list .mat-list-item .mat-list-icon,.mat-selection-list .mat-list-option .mat-list-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-nav-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-nav-list .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-selection-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-selection-list .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:64px;width:calc(100% - 64px)}[dir=rtl] .mat-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:64px}.mat-list .mat-list-item .mat-divider,.mat-list .mat-list-option .mat-divider,.mat-nav-list .mat-list-item .mat-divider,.mat-nav-list .mat-list-option .mat-divider,.mat-selection-list .mat-list-item .mat-divider,.mat-selection-list .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list .mat-list-item .mat-divider,[dir=rtl] .mat-list .mat-list-option .mat-divider,[dir=rtl] .mat-nav-list .mat-list-item .mat-divider,[dir=rtl] .mat-nav-list .mat-list-option .mat-divider,[dir=rtl] .mat-selection-list .mat-list-item .mat-divider,[dir=rtl] .mat-selection-list .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list .mat-list-item .mat-divider.mat-divider-inset,.mat-list .mat-list-option .mat-divider.mat-divider-inset,.mat-nav-list .mat-list-item .mat-divider.mat-divider-inset,.mat-nav-list .mat-list-option .mat-divider.mat-divider-inset,.mat-selection-list .mat-list-item .mat-divider.mat-divider-inset,.mat-selection-list .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-list[dense],.mat-nav-list[dense],.mat-selection-list[dense]{padding-top:4px;display:block}.mat-list[dense] .mat-subheader,.mat-nav-list[dense] .mat-subheader,.mat-selection-list[dense] .mat-subheader{height:40px;line-height:8px}.mat-list[dense] .mat-subheader:first-child,.mat-nav-list[dense] .mat-subheader:first-child,.mat-selection-list[dense] .mat-subheader:first-child{margin-top:-4px}.mat-list[dense] .mat-list-item,.mat-list[dense] .mat-list-option,.mat-nav-list[dense] .mat-list-item,.mat-nav-list[dense] .mat-list-option,.mat-selection-list[dense] .mat-list-item,.mat-selection-list[dense] .mat-list-option{display:block;height:40px}.mat-list[dense] .mat-list-item .mat-list-item-content,.mat-list[dense] .mat-list-option .mat-list-item-content,.mat-nav-list[dense] .mat-list-item .mat-list-item-content,.mat-nav-list[dense] .mat-list-option .mat-list-item-content,.mat-selection-list[dense] .mat-list-item .mat-list-item-content,.mat-selection-list[dense] .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-list[dense] .mat-list-option .mat-list-item-content-reverse,.mat-nav-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-nav-list[dense] .mat-list-option .mat-list-item-content-reverse,.mat-selection-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-selection-list[dense] .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list[dense] .mat-list-item .mat-list-item-ripple,.mat-list[dense] .mat-list-option .mat-list-item-ripple,.mat-nav-list[dense] .mat-list-item .mat-list-item-ripple,.mat-nav-list[dense] .mat-list-option .mat-list-item-ripple,.mat-selection-list[dense] .mat-list-item .mat-list-item-ripple,.mat-selection-list[dense] .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar{height:48px}.mat-list[dense] .mat-list-item.mat-2-line,.mat-list[dense] .mat-list-option.mat-2-line,.mat-nav-list[dense] .mat-list-item.mat-2-line,.mat-nav-list[dense] .mat-list-option.mat-2-line,.mat-selection-list[dense] .mat-list-item.mat-2-line,.mat-selection-list[dense] .mat-list-option.mat-2-line{height:60px}.mat-list[dense] .mat-list-item.mat-3-line,.mat-list[dense] .mat-list-option.mat-3-line,.mat-nav-list[dense] .mat-list-item.mat-3-line,.mat-nav-list[dense] .mat-list-option.mat-3-line,.mat-selection-list[dense] .mat-list-item.mat-3-line,.mat-selection-list[dense] .mat-list-option.mat-3-line{height:76px}.mat-list[dense] .mat-list-item.mat-multi-line,.mat-list[dense] .mat-list-option.mat-multi-line,.mat-nav-list[dense] .mat-list-item.mat-multi-line,.mat-nav-list[dense] .mat-list-option.mat-multi-line,.mat-selection-list[dense] .mat-list-item.mat-multi-line,.mat-selection-list[dense] .mat-list-option.mat-multi-line{height:auto}.mat-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content,.mat-nav-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-nav-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content,.mat-selection-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-selection-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list[dense] .mat-list-item .mat-list-text,.mat-list[dense] .mat-list-option .mat-list-text,.mat-nav-list[dense] .mat-list-item .mat-list-text,.mat-nav-list[dense] .mat-list-option .mat-list-text,.mat-selection-list[dense] .mat-list-item .mat-list-text,.mat-selection-list[dense] .mat-list-option .mat-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mat-list[dense] .mat-list-item .mat-list-text>*,.mat-list[dense] .mat-list-option .mat-list-text>*,.mat-nav-list[dense] .mat-list-item .mat-list-text>*,.mat-nav-list[dense] .mat-list-option .mat-list-text>*,.mat-selection-list[dense] .mat-list-item .mat-list-text>*,.mat-selection-list[dense] .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-list[dense] .mat-list-item .mat-list-text:empty,.mat-list[dense] .mat-list-option .mat-list-text:empty,.mat-nav-list[dense] .mat-list-item .mat-list-text:empty,.mat-nav-list[dense] .mat-list-option .mat-list-text:empty,.mat-selection-list[dense] .mat-list-item .mat-list-text:empty,.mat-selection-list[dense] .mat-list-option .mat-list-text:empty{display:none}.mat-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-nav-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-nav-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-selection-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-selection-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)){padding-right:0;padding-left:16px}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)){padding-right:16px;padding-left:0}.mat-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-nav-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-nav-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-selection-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-selection-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)){padding-left:0;padding-right:16px}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)){padding-right:0;padding-left:16px}.mat-list[dense] .mat-list-item .mat-list-avatar,.mat-list[dense] .mat-list-option .mat-list-avatar,.mat-nav-list[dense] .mat-list-item .mat-list-avatar,.mat-nav-list[dense] .mat-list-option .mat-list-avatar,.mat-selection-list[dense] .mat-list-item .mat-list-avatar,.mat-selection-list[dense] .mat-list-option .mat-list-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%}.mat-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:68px;width:calc(100% - 68px)}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:68px}.mat-list[dense] .mat-list-item .mat-list-icon,.mat-list[dense] .mat-list-option .mat-list-icon,.mat-nav-list[dense] .mat-list-item .mat-list-icon,.mat-nav-list[dense] .mat-list-option .mat-list-icon,.mat-selection-list[dense] .mat-list-item .mat-list-icon,.mat-selection-list[dense] .mat-list-option .mat-list-icon{flex-shrink:0;width:20px;height:20px;font-size:20px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:60px;width:calc(100% - 60px)}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:60px}.mat-list[dense] .mat-list-item .mat-divider,.mat-list[dense] .mat-list-option .mat-divider,.mat-nav-list[dense] .mat-list-item .mat-divider,.mat-nav-list[dense] .mat-list-option .mat-divider,.mat-selection-list[dense] .mat-list-item .mat-divider,.mat-selection-list[dense] .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-list[dense] .mat-list-option .mat-divider,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-divider,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-divider.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-divider.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-nav-list a{text-decoration:none;color:inherit}.mat-nav-list .mat-list-item-content{cursor:pointer}.mat-nav-list .mat-list-item-content.mat-list-item-focus,.mat-nav-list .mat-list-item-content:hover{outline:0}.mat-list-option:not(.mat-list-item-disabled){cursor:pointer}"],inputs:["disableRipple"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[]},n}(hi),vi=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-list-avatar], [matListAvatar]",host:{class:"mat-list-avatar"}}]}],t.ctorParameters=function(){return[]},t}(),bi=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-list-icon], [matListIcon]",host:{class:"mat-list-icon"}}]}],t.ctorParameters=function(){return[]},t}(),_i=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-subheader], [matSubheader]",host:{class:"mat-subheader"}}]}],t.ctorParameters=function(){return[]},t}(),wi=function(t){function n(e,n){var r=t.call(this)||this;return r._element=e,r._navList=n,r._isNavList=!1,r._isNavList=!!n,r}return Y(n,t),n.prototype.ngAfterContentInit=function(){new St(this._lines,this._element)},n.prototype._isRippleDisabled=function(){return!this._isNavList||this.disableRipple||this._navList.disableRipple},n.prototype._handleFocus=function(){this._element.nativeElement.classList.add("mat-list-item-focus")},n.prototype._handleBlur=function(){this._element.nativeElement.classList.remove("mat-list-item-focus")},n.prototype._getHostElement=function(){return this._element.nativeElement},n.decorators=[{type:e.Component,args:[{selector:"mat-list-item, a[mat-list-item]",exportAs:"matListItem",host:{class:"mat-list-item","[class.mat-list-item-avatar]":"_avatar","[class.mat-list-item-with-avatar]":"_avatar","(focus)":"_handleFocus()","(blur)":"_handleBlur()"},inputs:["disableRipple"],template:'<div class="mat-list-item-content"><div class="mat-list-item-ripple" mat-ripple [matRippleTrigger]="_getHostElement()" [matRippleDisabled]="_isRippleDisabled()"></div><ng-content select="[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]"></ng-content><div class="mat-list-text"><ng-content select="[mat-line], [matLine]"></ng-content></div><ng-content></ng-content></div>',encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:gi,decorators:[{type:e.Optional}]}]},n.propDecorators={_lines:[{type:e.ContentChildren,args:[xt]}],_avatar:[{type:e.ContentChild,args:[vi]}]},n}(mi),Ci=function(){},xi=nt(et(J(Ci))),Si=function(){},Ei=et(Si),ki={provide:v.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return Di}),multi:!0},Oi=function(t,e){this.source=t,this.selected=e},Pi=function(t,e){this.source=t,this.option=e},Ai=function(t){function n(n,r,i){var o=t.call(this)||this;return o._element=n,o._changeDetector=r,o.selectionList=i,o._selected=!1,o._disabled=!1,o._hasFocus=!1,o.checkboxPosition="after",o.selectionChange=new e.EventEmitter,o}return Y(n,t),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled||this.selectionList&&this.selectionList.disabled},set:function(t){var e=r.coerceBooleanProperty(t);e!==this._disabled&&(this._disabled=e,this._changeDetector.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selected",{get:function(){return this.selectionList.selectedOptions.isSelected(this)},set:function(t){var e=r.coerceBooleanProperty(t);e!==this._selected&&(this._setSelected(e),this.selectionList._reportValueChange())},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var t=this,e=this._selected;Promise.resolve().then(function(){(t._selected||e)&&(t.selected=!0,t._changeDetector.markForCheck())})},n.prototype.ngAfterContentInit=function(){new St(this._lines,this._element)},n.prototype.ngOnDestroy=function(){var t=this;this.selected&&Promise.resolve().then(function(){return t.selected=!1}),this.selectionList._removeOptionFromList(this)},n.prototype.toggle=function(){this.selected=!this.selected},n.prototype.focus=function(){this._element.nativeElement.focus()},n.prototype.getLabel=function(){return this._text?this._text.nativeElement.textContent:""},n.prototype._isRippleDisabled=function(){return this.disabled||this.disableRipple||this.selectionList.disableRipple},n.prototype._handleClick=function(){this.disabled||(this.toggle(),this.selectionList._emitChangeEvent(this),this._emitDeprecatedChangeEvent())},n.prototype._handleFocus=function(){this._hasFocus=!0,this.selectionList._setFocusedOption(this)},n.prototype._handleBlur=function(){this._hasFocus=!1,this.selectionList._onTouched()},n.prototype._getHostElement=function(){return this._element.nativeElement},n.prototype._setSelected=function(t){t!==this._selected&&(this._selected=t,t?this.selectionList.selectedOptions.select(this):this.selectionList.selectedOptions.deselect(this),this._changeDetector.markForCheck())},n.prototype._emitDeprecatedChangeEvent=function(){this.selectionChange.emit(new Oi(this,this.selected))},n.decorators=[{type:e.Component,args:[{selector:"mat-list-option",exportAs:"matListOption",inputs:["disableRipple"],host:{role:"option",class:"mat-list-item mat-list-option","(focus)":"_handleFocus()","(blur)":"_handleBlur()","(click)":"_handleClick()",tabindex:"-1","[class.mat-list-item-disabled]":"disabled","[class.mat-list-item-focus]":"_hasFocus","[attr.aria-selected]":"selected.toString()","[attr.aria-disabled]":"disabled.toString()"},template:'<div class="mat-list-item-content" [class.mat-list-item-content-reverse]="checkboxPosition == \'after\'" [class.mat-list-item-disabled]="disabled"><div mat-ripple class="mat-list-item-ripple" [matRippleTrigger]="_getHostElement()" [matRippleDisabled]="_isRippleDisabled()"></div><mat-pseudo-checkbox [state]="selected ? \'checked\' : \'unchecked\'" [disabled]="disabled"></mat-pseudo-checkbox><div class="mat-list-text" #text><ng-content></ng-content></div></div>',encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:Di,decorators:[{type:e.Inject,args:[e.forwardRef(function(){return Di})]}]}]},n.propDecorators={_lines:[{type:e.ContentChildren,args:[xt]}],_text:[{type:e.ViewChild,args:["text"]}],checkboxPosition:[{type:e.Input}],value:[{type:e.Input}],disabled:[{type:e.Input}],selected:[{type:e.Input}],selectionChange:[{type:e.Output}]},n}(Ei),Di=function(t){function n(n,r){var i=t.call(this)||this;return i._element=n,i.selectionChange=new e.EventEmitter,i.selectedOptions=new E.SelectionModel(!0),i._onChange=function(t){},i._modelChanges=O.Subscription.EMPTY,i._onTouched=function(){},i.tabIndex=parseInt(r)||0,i}return Y(n,t),n.prototype.ngAfterContentInit=function(){this._keyManager=new u.FocusKeyManager(this.options).withWrap().withTypeAhead(),this._tempValues&&(this._setOptionsFromValues(this._tempValues),this._tempValues=null),this._modelChanges=this.selectedOptions.onChange.subscribe(function(t){if(t.added)for(var e=0,n=t.added;e<n.length;e++){n[e].selected=!0}if(t.removed)for(var r=0,i=t.removed;r<i.length;r++){i[r].selected=!1}})},n.prototype.ngOnDestroy=function(){this._modelChanges.unsubscribe()},n.prototype.focus=function(){this._element.nativeElement.focus()},n.prototype.selectAll=function(){this.options.forEach(function(t){return t._setSelected(!0)}),this._reportValueChange()},n.prototype.deselectAll=function(){this.options.forEach(function(t){return t._setSelected(!1)}),this._reportValueChange()},n.prototype._setFocusedOption=function(t){this._keyManager.updateActiveItemIndex(this._getOptionIndex(t))},n.prototype._removeOptionFromList=function(t){if(t._hasFocus){var e=this._getOptionIndex(t);e>0?this._keyManager.setPreviousItemActive():0===e&&this.options.length>1&&this._keyManager.setNextItemActive()}},n.prototype._keydown=function(t){if(!this.disabled)switch(t.keyCode){case c.SPACE:case c.ENTER:this._toggleSelectOnFocusedOption(),t.preventDefault();break;case c.HOME:case c.END:t.keyCode===c.HOME?this._keyManager.setFirstItemActive():this._keyManager.setLastItemActive(),t.preventDefault();break;default:this._keyManager.onKeydown(t)}},n.prototype._reportValueChange=function(){this.options&&this._onChange(this._getSelectedOptionValues())},n.prototype._emitChangeEvent=function(t){this.selectionChange.emit(new Pi(this,t))},n.prototype.writeValue=function(t){this.options?this._setOptionsFromValues(t||[]):this._tempValues=t},n.prototype.setDisabledState=function(t){this.options&&this.options.forEach(function(e){return e.disabled=t})},n.prototype.registerOnChange=function(t){this._onChange=t},n.prototype.registerOnTouched=function(t){this._onTouched=t},n.prototype._getOptionByValue=function(t){return this.options.find(function(e){return e.value===t})},n.prototype._setOptionsFromValues=function(t){var e=this;this.options.forEach(function(t){return t._setSelected(!1)}),t.map(function(t){return e._getOptionByValue(t)}).filter(Boolean).forEach(function(t){return t._setSelected(!0)})},n.prototype._getSelectedOptionValues=function(){return this.options.filter(function(t){return t.selected}).map(function(t){return t.value})},n.prototype._toggleSelectOnFocusedOption=function(){var t=this._keyManager.activeItemIndex;if(null!=t&&this._isValidIndex(t)){var e=this.options.toArray()[t];e&&(e.toggle(),this._emitChangeEvent(e),e._emitDeprecatedChangeEvent())}},n.prototype._isValidIndex=function(t){return t>=0&&t<this.options.length},n.prototype._getOptionIndex=function(t){return this.options.toArray().indexOf(t)},n.decorators=[{type:e.Component,args:[{selector:"mat-selection-list",exportAs:"matSelectionList",inputs:["disabled","disableRipple","tabIndex"],host:{role:"listbox","[tabIndex]":"tabIndex",class:"mat-selection-list","(focus)":"focus()","(blur)":"_onTouched()","(keydown)":"_keydown($event)","[attr.aria-disabled]":"disabled.toString()"},template:"<ng-content></ng-content>",styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}.mat-subheader{display:flex;box-sizing:border-box;padding:16px;align-items:center}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{margin:0}.mat-list,.mat-nav-list,.mat-selection-list{padding-top:8px;display:block}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{height:48px;line-height:16px}.mat-list .mat-subheader:first-child,.mat-nav-list .mat-subheader:first-child,.mat-selection-list .mat-subheader:first-child{margin-top:-8px}.mat-list .mat-list-item,.mat-list .mat-list-option,.mat-nav-list .mat-list-item,.mat-nav-list .mat-list-option,.mat-selection-list .mat-list-item,.mat-selection-list .mat-list-option{display:block;height:48px}.mat-list .mat-list-item .mat-list-item-content,.mat-list .mat-list-option .mat-list-item-content,.mat-nav-list .mat-list-item .mat-list-item-content,.mat-nav-list .mat-list-option .mat-list-item-content,.mat-selection-list .mat-list-item .mat-list-item-content,.mat-selection-list .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list .mat-list-item .mat-list-item-content-reverse,.mat-list .mat-list-option .mat-list-item-content-reverse,.mat-nav-list .mat-list-item .mat-list-item-content-reverse,.mat-nav-list .mat-list-option .mat-list-item-content-reverse,.mat-selection-list .mat-list-item .mat-list-item-content-reverse,.mat-selection-list .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list .mat-list-item .mat-list-item-ripple,.mat-list .mat-list-option .mat-list-item-ripple,.mat-nav-list .mat-list-item .mat-list-item-ripple,.mat-nav-list .mat-list-option .mat-list-item-ripple,.mat-selection-list .mat-list-item .mat-list-item-ripple,.mat-selection-list .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list .mat-list-item.mat-list-item-with-avatar,.mat-list .mat-list-option.mat-list-item-with-avatar,.mat-nav-list .mat-list-item.mat-list-item-with-avatar,.mat-nav-list .mat-list-option.mat-list-item-with-avatar,.mat-selection-list .mat-list-item.mat-list-item-with-avatar,.mat-selection-list .mat-list-option.mat-list-item-with-avatar{height:56px}.mat-list .mat-list-item.mat-2-line,.mat-list .mat-list-option.mat-2-line,.mat-nav-list .mat-list-item.mat-2-line,.mat-nav-list .mat-list-option.mat-2-line,.mat-selection-list .mat-list-item.mat-2-line,.mat-selection-list .mat-list-option.mat-2-line{height:72px}.mat-list .mat-list-item.mat-3-line,.mat-list .mat-list-option.mat-3-line,.mat-nav-list .mat-list-item.mat-3-line,.mat-nav-list .mat-list-option.mat-3-line,.mat-selection-list .mat-list-item.mat-3-line,.mat-selection-list .mat-list-option.mat-3-line{height:88px}.mat-list .mat-list-item.mat-multi-line,.mat-list .mat-list-option.mat-multi-line,.mat-nav-list .mat-list-item.mat-multi-line,.mat-nav-list .mat-list-option.mat-multi-line,.mat-selection-list .mat-list-item.mat-multi-line,.mat-selection-list .mat-list-option.mat-multi-line{height:auto}.mat-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list .mat-list-option.mat-multi-line .mat-list-item-content,.mat-nav-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-nav-list .mat-list-option.mat-multi-line .mat-list-item-content,.mat-selection-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-selection-list .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list .mat-list-item .mat-list-text,.mat-list .mat-list-option .mat-list-text,.mat-nav-list .mat-list-item .mat-list-text,.mat-nav-list .mat-list-option .mat-list-text,.mat-selection-list .mat-list-item .mat-list-text,.mat-selection-list .mat-list-option .mat-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mat-list .mat-list-item .mat-list-text>*,.mat-list .mat-list-option .mat-list-text>*,.mat-nav-list .mat-list-item .mat-list-text>*,.mat-nav-list .mat-list-option .mat-list-text>*,.mat-selection-list .mat-list-item .mat-list-text>*,.mat-selection-list .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-list .mat-list-item .mat-list-text:empty,.mat-list .mat-list-option .mat-list-text:empty,.mat-nav-list .mat-list-item .mat-list-text:empty,.mat-nav-list .mat-list-option .mat-list-text:empty,.mat-selection-list .mat-list-item .mat-list-text:empty,.mat-selection-list .mat-list-option .mat-list-text:empty{display:none}.mat-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-nav-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-nav-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-selection-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-selection-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)){padding-right:0;padding-left:16px}[dir=rtl] .mat-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)){padding-right:16px;padding-left:0}.mat-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-nav-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-nav-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-selection-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-selection-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)){padding-left:0;padding-right:16px}[dir=rtl] .mat-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)){padding-right:0;padding-left:16px}.mat-list .mat-list-item .mat-list-avatar,.mat-list .mat-list-option .mat-list-avatar,.mat-nav-list .mat-list-item .mat-list-avatar,.mat-nav-list .mat-list-option .mat-list-avatar,.mat-selection-list .mat-list-item .mat-list-avatar,.mat-selection-list .mat-list-option .mat-list-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%}.mat-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-nav-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-nav-list .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-selection-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-selection-list .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:72px;width:calc(100% - 72px)}[dir=rtl] .mat-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:72px}.mat-list .mat-list-item .mat-list-icon,.mat-list .mat-list-option .mat-list-icon,.mat-nav-list .mat-list-item .mat-list-icon,.mat-nav-list .mat-list-option .mat-list-icon,.mat-selection-list .mat-list-item .mat-list-icon,.mat-selection-list .mat-list-option .mat-list-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-nav-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-nav-list .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-selection-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-selection-list .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:64px;width:calc(100% - 64px)}[dir=rtl] .mat-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:64px}.mat-list .mat-list-item .mat-divider,.mat-list .mat-list-option .mat-divider,.mat-nav-list .mat-list-item .mat-divider,.mat-nav-list .mat-list-option .mat-divider,.mat-selection-list .mat-list-item .mat-divider,.mat-selection-list .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list .mat-list-item .mat-divider,[dir=rtl] .mat-list .mat-list-option .mat-divider,[dir=rtl] .mat-nav-list .mat-list-item .mat-divider,[dir=rtl] .mat-nav-list .mat-list-option .mat-divider,[dir=rtl] .mat-selection-list .mat-list-item .mat-divider,[dir=rtl] .mat-selection-list .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list .mat-list-item .mat-divider.mat-divider-inset,.mat-list .mat-list-option .mat-divider.mat-divider-inset,.mat-nav-list .mat-list-item .mat-divider.mat-divider-inset,.mat-nav-list .mat-list-option .mat-divider.mat-divider-inset,.mat-selection-list .mat-list-item .mat-divider.mat-divider-inset,.mat-selection-list .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-list[dense],.mat-nav-list[dense],.mat-selection-list[dense]{padding-top:4px;display:block}.mat-list[dense] .mat-subheader,.mat-nav-list[dense] .mat-subheader,.mat-selection-list[dense] .mat-subheader{height:40px;line-height:8px}.mat-list[dense] .mat-subheader:first-child,.mat-nav-list[dense] .mat-subheader:first-child,.mat-selection-list[dense] .mat-subheader:first-child{margin-top:-4px}.mat-list[dense] .mat-list-item,.mat-list[dense] .mat-list-option,.mat-nav-list[dense] .mat-list-item,.mat-nav-list[dense] .mat-list-option,.mat-selection-list[dense] .mat-list-item,.mat-selection-list[dense] .mat-list-option{display:block;height:40px}.mat-list[dense] .mat-list-item .mat-list-item-content,.mat-list[dense] .mat-list-option .mat-list-item-content,.mat-nav-list[dense] .mat-list-item .mat-list-item-content,.mat-nav-list[dense] .mat-list-option .mat-list-item-content,.mat-selection-list[dense] .mat-list-item .mat-list-item-content,.mat-selection-list[dense] .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-list[dense] .mat-list-option .mat-list-item-content-reverse,.mat-nav-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-nav-list[dense] .mat-list-option .mat-list-item-content-reverse,.mat-selection-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-selection-list[dense] .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list[dense] .mat-list-item .mat-list-item-ripple,.mat-list[dense] .mat-list-option .mat-list-item-ripple,.mat-nav-list[dense] .mat-list-item .mat-list-item-ripple,.mat-nav-list[dense] .mat-list-option .mat-list-item-ripple,.mat-selection-list[dense] .mat-list-item .mat-list-item-ripple,.mat-selection-list[dense] .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar{height:48px}.mat-list[dense] .mat-list-item.mat-2-line,.mat-list[dense] .mat-list-option.mat-2-line,.mat-nav-list[dense] .mat-list-item.mat-2-line,.mat-nav-list[dense] .mat-list-option.mat-2-line,.mat-selection-list[dense] .mat-list-item.mat-2-line,.mat-selection-list[dense] .mat-list-option.mat-2-line{height:60px}.mat-list[dense] .mat-list-item.mat-3-line,.mat-list[dense] .mat-list-option.mat-3-line,.mat-nav-list[dense] .mat-list-item.mat-3-line,.mat-nav-list[dense] .mat-list-option.mat-3-line,.mat-selection-list[dense] .mat-list-item.mat-3-line,.mat-selection-list[dense] .mat-list-option.mat-3-line{height:76px}.mat-list[dense] .mat-list-item.mat-multi-line,.mat-list[dense] .mat-list-option.mat-multi-line,.mat-nav-list[dense] .mat-list-item.mat-multi-line,.mat-nav-list[dense] .mat-list-option.mat-multi-line,.mat-selection-list[dense] .mat-list-item.mat-multi-line,.mat-selection-list[dense] .mat-list-option.mat-multi-line{height:auto}.mat-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content,.mat-nav-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-nav-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content,.mat-selection-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-selection-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list[dense] .mat-list-item .mat-list-text,.mat-list[dense] .mat-list-option .mat-list-text,.mat-nav-list[dense] .mat-list-item .mat-list-text,.mat-nav-list[dense] .mat-list-option .mat-list-text,.mat-selection-list[dense] .mat-list-item .mat-list-text,.mat-selection-list[dense] .mat-list-option .mat-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mat-list[dense] .mat-list-item .mat-list-text>*,.mat-list[dense] .mat-list-option .mat-list-text>*,.mat-nav-list[dense] .mat-list-item .mat-list-text>*,.mat-nav-list[dense] .mat-list-option .mat-list-text>*,.mat-selection-list[dense] .mat-list-item .mat-list-text>*,.mat-selection-list[dense] .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-list[dense] .mat-list-item .mat-list-text:empty,.mat-list[dense] .mat-list-option .mat-list-text:empty,.mat-nav-list[dense] .mat-list-item .mat-list-text:empty,.mat-nav-list[dense] .mat-list-option .mat-list-text:empty,.mat-selection-list[dense] .mat-list-item .mat-list-text:empty,.mat-selection-list[dense] .mat-list-option .mat-list-text:empty{display:none}.mat-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-nav-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-nav-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-selection-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),.mat-selection-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)){padding-right:0;padding-left:16px}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-item-content .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-item-content .mat-list-text:not(:nth-child(2)){padding-right:16px;padding-left:0}.mat-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-nav-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-nav-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-selection-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),.mat-selection-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)){padding-left:0;padding-right:16px}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)),[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)){padding-right:0;padding-left:16px}.mat-list[dense] .mat-list-item .mat-list-avatar,.mat-list[dense] .mat-list-option .mat-list-avatar,.mat-nav-list[dense] .mat-list-item .mat-list-avatar,.mat-nav-list[dense] .mat-list-option .mat-list-avatar,.mat-selection-list[dense] .mat-list-item .mat-list-avatar,.mat-selection-list[dense] .mat-list-option .mat-list-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%}.mat-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:68px;width:calc(100% - 68px)}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:68px}.mat-list[dense] .mat-list-item .mat-list-icon,.mat-list[dense] .mat-list-option .mat-list-icon,.mat-nav-list[dense] .mat-list-item .mat-list-icon,.mat-nav-list[dense] .mat-list-option .mat-list-icon,.mat-selection-list[dense] .mat-list-item .mat-list-icon,.mat-selection-list[dense] .mat-list-option .mat-list-icon{flex-shrink:0;width:20px;height:20px;font-size:20px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:60px;width:calc(100% - 60px)}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:60px}.mat-list[dense] .mat-list-item .mat-divider,.mat-list[dense] .mat-list-option .mat-divider,.mat-nav-list[dense] .mat-list-item .mat-divider,.mat-nav-list[dense] .mat-list-option .mat-divider,.mat-selection-list[dense] .mat-list-item .mat-divider,.mat-selection-list[dense] .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-list[dense] .mat-list-option .mat-divider,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-divider,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-divider.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-divider.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-nav-list a{text-decoration:none;color:inherit}.mat-nav-list .mat-list-item-content{cursor:pointer}.mat-nav-list .mat-list-item-content.mat-list-item-focus,.mat-nav-list .mat-list-item-content:hover{outline:0}.mat-list-option:not(.mat-list-item-disabled){cursor:pointer}"],encapsulation:e.ViewEncapsulation.None,providers:[ki],preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["tabindex"]}]}]},n.propDecorators={options:[{type:e.ContentChildren,args:[Ai]}],selectionChange:[{type:e.Output}]},n}(xi),Ti=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[Et,It,Z,Nt,s.CommonModule],exports:[yi,gi,wi,vi,Et,Z,bi,_i,Nt,Di,Ai,Sr],declarations:[yi,gi,wi,vi,bi,_i,Di,Ai]}]}],t.ctorParameters=function(){return[]},t}(),Mi={transformMenu:w.trigger("transformMenu",[w.state("void",w.style({opacity:0,transform:"scale(0.01, 0.01)"})),w.state("enter-start",w.style({opacity:1,transform:"scale(1, 0.5)"})),w.state("enter",w.style({transform:"scale(1, 1)"})),w.transition("void => enter-start",w.animate("100ms linear")),w.transition("enter-start => enter",w.animate("300ms cubic-bezier(0.25, 0.8, 0.25, 1)")),w.transition("* => void",w.animate("150ms 50ms linear",w.style({opacity:0})))]),fadeInItems:w.trigger("fadeInItems",[w.state("showing",w.style({opacity:1})),w.transition("void => *",[w.style({opacity:0}),w.animate("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},Ii=Mi.fadeInItems,Ri=Mi.transformMenu;var Ni=function(){},Li=et(J(Ni)),ji=function(t){function n(e,n,r){var o=t.call(this)||this;return o._elementRef=e,o._focusMonitor=r,o._hovered=new i.Subject,o._highlighted=!1,o._triggersSubmenu=!1,r&&r.monitor(o._getHostElement(),!1),o._document=n,o}return Y(n,t),n.prototype.focus=function(t){void 0===t&&(t="program"),this._focusMonitor?this._focusMonitor.focusVia(this._getHostElement(),t):this._getHostElement().focus()},n.prototype.ngOnDestroy=function(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._getHostElement()),this._hovered.complete()},n.prototype._getTabIndex=function(){return this.disabled?"-1":"0"},n.prototype._getHostElement=function(){return this._elementRef.nativeElement},n.prototype._checkDisabled=function(t){this.disabled&&(t.preventDefault(),t.stopPropagation())},n.prototype._emitHoverEvent=function(){this.disabled||this._hovered.next(this)},n.prototype.getLabel=function(){var t=this._elementRef.nativeElement,e=this._document?this._document.TEXT_NODE:3,n="";if(t.childNodes)for(var r=t.childNodes.length,i=0;i<r;i++)t.childNodes[i].nodeType===e&&(n+=t.childNodes[i].textContent);return n.trim()},n.decorators=[{type:e.Component,args:[{selector:"[mat-menu-item]",exportAs:"matMenuItem",inputs:["disabled","disableRipple"],host:{role:"menuitem",class:"mat-menu-item","[class.mat-menu-item-highlighted]":"_highlighted","[class.mat-menu-item-submenu-trigger]":"_triggersSubmenu","[attr.tabindex]":"_getTabIndex()","[attr.aria-disabled]":"disabled.toString()","[attr.disabled]":"disabled || null","(click)":"_checkDisabled($event)","(mouseenter)":"_emitHoverEvent()"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,template:'<ng-content></ng-content><div class="mat-menu-ripple" matRipple [matRippleDisabled]="disableRipple || disabled" [matRippleTrigger]="_getHostElement()"></div>'}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]},{type:u.FocusMonitor}]},n}(Li),Fi=function(){function t(t,e,n,r,i,o){this._template=t,this._componentFactoryResolver=e,this._appRef=n,this._injector=r,this._viewContainerRef=i,this._document=o}return t.prototype.attach=function(t){void 0===t&&(t={}),this._portal?this._portal.isAttached&&this._portal.detach():this._portal=new d.TemplatePortal(this._template,this._viewContainerRef),this._outlet||(this._outlet=new d.DomPortalOutlet(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));var e=this._template.elementRef.nativeElement;e.parentNode.insertBefore(this._outlet.outletElement,e),this._portal.attach(this._outlet,t)},t.prototype.ngOnDestroy=function(){this._outlet&&this._outlet.dispose()},t.decorators=[{type:e.Directive,args:[{selector:"ng-template[matMenuContent]"}]}],t.ctorParameters=function(){return[{type:e.TemplateRef},{type:e.ComponentFactoryResolver},{type:e.ApplicationRef},{type:e.Injector},{type:e.ViewContainerRef},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},t}(),Vi=new e.InjectionToken("mat-menu-default-options"),Bi=function(){function t(t,n,r){this._elementRef=t,this._ngZone=n,this._defaultOptions=r,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._tabSubscription=O.Subscription.EMPTY,this._classList={},this._panelAnimationState="void",this._overlapTrigger=this._defaultOptions.overlapTrigger,this.closed=new e.EventEmitter,this.close=this.closed}return Object.defineProperty(t.prototype,"xPosition",{get:function(){return this._xPosition},set:function(t){"before"!==t&&"after"!==t&&function(){throw Error('x-position value must be either \'before\' or after\'.\n      Example: <mat-menu x-position="before" #menu="matMenu"></mat-menu>')}(),this._xPosition=t,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"yPosition",{get:function(){return this._yPosition},set:function(t){"above"!==t&&"below"!==t&&function(){throw Error('y-position value must be either \'above\' or below\'.\n      Example: <mat-menu y-position="above" #menu="matMenu"></mat-menu>')}(),this._yPosition=t,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"overlapTrigger",{get:function(){return this._overlapTrigger},set:function(t){this._overlapTrigger=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"panelClass",{set:function(t){t&&t.length&&(this._classList=t.split(" ").reduce(function(t,e){return t[e]=!0,t},{}),this._elementRef.nativeElement.className="",this.setPositionClasses())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classList",{get:function(){return this.panelClass},set:function(t){this.panelClass=t},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._keyManager=new u.FocusKeyManager(this.items).withWrap().withTypeAhead(),this._tabSubscription=this._keyManager.tabOut.subscribe(function(){return t.close.emit("keydown")})},t.prototype.ngOnDestroy=function(){this._tabSubscription.unsubscribe(),this.closed.complete()},t.prototype._hovered=function(){var t=this;return this.items?this.items.changes.pipe(_.startWith(this.items),m.switchMap(function(t){return x.merge.apply(void 0,t.map(function(t){return t._hovered}))})):this._ngZone.onStable.asObservable().pipe(f.take(1),m.switchMap(function(){return t._hovered()}))},t.prototype._handleKeydown=function(t){switch(t.keyCode){case c.ESCAPE:this.closed.emit("keydown"),t.stopPropagation();break;case c.LEFT_ARROW:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case c.RIGHT_ARROW:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:this._keyManager.onKeydown(t)}},t.prototype.focusFirstItem=function(t){var e=this;void 0===t&&(t="program"),this.lazyContent?this._ngZone.onStable.asObservable().pipe(f.take(1)).subscribe(function(){return e._keyManager.setFocusOrigin(t).setFirstItemActive()}):this._keyManager.setFocusOrigin(t).setFirstItemActive()},t.prototype.resetActiveItem=function(){this._keyManager.setActiveItem(-1)},t.prototype.setPositionClasses=function(t,e){void 0===t&&(t=this.xPosition),void 0===e&&(e=this.yPosition),this._classList["mat-menu-before"]="before"===t,this._classList["mat-menu-after"]="after"===t,this._classList["mat-menu-above"]="above"===e,this._classList["mat-menu-below"]="below"===e},t.prototype.setElevation=function(t){var e="mat-elevation-z"+(2+t),n=Object.keys(this._classList).find(function(t){return t.startsWith("mat-elevation-z")});n&&n!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[e]=!0,this._previousElevation=e)},t.prototype._startAnimation=function(){this._panelAnimationState="enter-start"},t.prototype._resetAnimation=function(){this._panelAnimationState="void"},t.prototype._onAnimationDone=function(t){"enter-start"===t.toState&&(this._panelAnimationState="enter")},t.decorators=[{type:e.Component,args:[{selector:"mat-menu",template:'<ng-template><div class="mat-menu-panel" [ngClass]="_classList" (keydown)="_handleKeydown($event)" (click)="closed.emit(\'click\')" [@transformMenu]="_panelAnimationState" (@transformMenu.done)="_onAnimationDone($event)" tabindex="-1" role="menu"><div class="mat-menu-content" [@fadeInItems]="\'showing\'"><ng-content></ng-content></div></div></ng-template>',styles:[".mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:2px;outline:0}.mat-menu-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-menu-panel.mat-menu-after.mat-menu-below{transform-origin:left top}.mat-menu-panel.mat-menu-after.mat-menu-above{transform-origin:left bottom}.mat-menu-panel.mat-menu-before.mat-menu-below{transform-origin:right top}.mat-menu-panel.mat-menu-before.mat-menu-above{transform-origin:right bottom}[dir=rtl] .mat-menu-panel.mat-menu-after.mat-menu-below{transform-origin:right top}[dir=rtl] .mat-menu-panel.mat-menu-after.mat-menu-above{transform-origin:right bottom}[dir=rtl] .mat-menu-panel.mat-menu-before.mat-menu-below{transform-origin:left top}[dir=rtl] .mat-menu-panel.mat-menu-before.mat-menu-above{transform-origin:left bottom}.mat-menu-panel.ng-animating{pointer-events:none}@media screen and (-ms-high-contrast:active){.mat-menu-panel{outline:solid 1px}}.mat-menu-content{padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;position:relative}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:'';display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"],changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,animations:[Mi.transformMenu,Mi.fadeInItems],exportAs:"matMenu"}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:void 0,decorators:[{type:e.Inject,args:[Vi]}]}]},t.propDecorators={xPosition:[{type:e.Input}],yPosition:[{type:e.Input}],templateRef:[{type:e.ViewChild,args:[e.TemplateRef]}],items:[{type:e.ContentChildren,args:[ji]}],lazyContent:[{type:e.ContentChild,args:[Fi]}],overlapTrigger:[{type:e.Input}],panelClass:[{type:e.Input,args:["class"]}],classList:[{type:e.Input}],closed:[{type:e.Output}],close:[{type:e.Output}]},t}(),Ui=new e.InjectionToken("mat-menu-scroll-strategy");function Hi(t){return function(){return t.scrollStrategies.reposition()}}var zi={provide:Ui,deps:[p.Overlay],useFactory:Hi},Gi=function(){function t(t,n,r,i,o,a,s,l){this._overlay=t,this._element=n,this._viewContainerRef=r,this._scrollStrategy=i,this._parentMenu=o,this._menuItemInstance=a,this._dir=s,this._focusMonitor=l,this._overlayRef=null,this._menuOpen=!1,this._closeSubscription=O.Subscription.EMPTY,this._hoverSubscription=O.Subscription.EMPTY,this._openedByMouse=!1,this.menuOpened=new e.EventEmitter,this.onMenuOpen=this.menuOpened,this.menuClosed=new e.EventEmitter,this.onMenuClose=this.menuClosed,a&&(a._triggersSubmenu=this.triggersSubmenu())}return Object.defineProperty(t.prototype,"_deprecatedMatMenuTriggerFor",{get:function(){return this.menu},set:function(t){this.menu=t},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._checkMenu(),this.menu.close.subscribe(function(e){t._destroyMenu(),"click"===e&&t._parentMenu&&t._parentMenu.closed.emit(e)}),this.triggersSubmenu()&&(this._hoverSubscription=this._parentMenu._hovered().pipe(h.filter(function(e){return e===t._menuItemInstance})).subscribe(function(){t._openedByMouse=!0,t.openMenu()}))},t.prototype.ngOnDestroy=function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._cleanUpSubscriptions()},Object.defineProperty(t.prototype,"menuOpen",{get:function(){return this._menuOpen},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dir",{get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},enumerable:!0,configurable:!0}),t.prototype.triggersSubmenu=function(){return!(!this._menuItemInstance||!this._parentMenu)},t.prototype.toggleMenu=function(){return this._menuOpen?this.closeMenu():this.openMenu()},t.prototype.openMenu=function(){var t=this;this._menuOpen||(this._createOverlay().attach(this._portal),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closeSubscription=this._menuClosingActions().subscribe(function(){return t.closeMenu()}),this._initMenu(),this.menu instanceof Bi&&this.menu._startAnimation())},t.prototype.closeMenu=function(){this.menu.close.emit()},t.prototype.focus=function(t){void 0===t&&(t="program"),this._focusMonitor?this._focusMonitor.focusVia(this._element.nativeElement,t):this._element.nativeElement.focus()},t.prototype._destroyMenu=function(){this._overlayRef&&this.menuOpen&&(this._resetMenu(),this._closeSubscription.unsubscribe(),this._overlayRef.detach(),this.menu instanceof Bi&&this.menu._resetAnimation())},t.prototype._initMenu=function(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedByMouse?"mouse":"program")},t.prototype._setMenuElevation=function(){if(this.menu.setElevation){for(var t=0,e=this.menu.parentMenu;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}},t.prototype._resetMenu=function(){this._setIsMenuOpen(!1),this._openedByMouse?this.triggersSubmenu()||this.focus("mouse"):this.focus(),this._openedByMouse=!1},t.prototype._setIsMenuOpen=function(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)},t.prototype._checkMenu=function(){this.menu||function(){throw Error('mat-menu-trigger: must pass in an mat-menu instance.\n\n    Example:\n      <mat-menu #menu="matMenu"></mat-menu>\n      <button [matMenuTriggerFor]="menu"></button>')}()},t.prototype._createOverlay=function(){if(!this._overlayRef){this._portal=new d.TemplatePortal(this.menu.templateRef,this._viewContainerRef);var t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t)}return this._overlayRef},t.prototype._getOverlayConfig=function(){return new p.OverlayConfig({positionStrategy:this._getPosition(),hasBackdrop:!this.triggersSubmenu(),backdropClass:"cdk-overlay-transparent-backdrop",direction:this.dir,scrollStrategy:this._scrollStrategy()})},t.prototype._subscribeToPositions=function(t){var e=this;t.onPositionChange.subscribe(function(t){var n="start"===t.connectionPair.overlayX?"after":"before",r="top"===t.connectionPair.overlayY?"below":"above";e.menu.setPositionClasses(n,r)})},t.prototype._getPosition=function(){var t="before"===this.menu.xPosition?["end","start"]:["start","end"],e=t[0],n=t[1],r="above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],i=r[0],o=r[1],a=[i,o],s=a[0],l=a[1],c=[e,n],u=c[0],p=c[1],d=0;return this.triggersSubmenu()?(p=e="before"===this.menu.xPosition?"start":"end",n=u="end"===e?"start":"end",d="bottom"===i?8:-8):this.menu.overlapTrigger||(s="top"===i?"bottom":"top",l="top"===o?"bottom":"top"),this._overlay.position().connectedTo(this._element,{originX:e,originY:s},{overlayX:u,overlayY:i}).withDirection(this.dir).withOffsetY(d).withFallbackPosition({originX:n,originY:s},{overlayX:p,overlayY:i}).withFallbackPosition({originX:e,originY:l},{overlayX:u,overlayY:o},void 0,-d).withFallbackPosition({originX:n,originY:l},{overlayX:p,overlayY:o},void 0,-d)},t.prototype._cleanUpSubscriptions=function(){this._closeSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()},t.prototype._menuClosingActions=function(){var t=this,e=this._overlayRef.backdropClick(),n=this._overlayRef.detachments(),r=this._parentMenu?this._parentMenu.close:S.of(),i=this._parentMenu?this._parentMenu._hovered().pipe(h.filter(function(e){return e!==t._menuItemInstance}),h.filter(function(){return t._menuOpen})):S.of();return x.merge(e,r,i,n)},t.prototype._handleMousedown=function(t){u.isFakeMousedownFromScreenReader(t)||(this._openedByMouse=!0,this.triggersSubmenu()&&t.preventDefault())},t.prototype._handleKeydown=function(t){var e=t.keyCode;this.triggersSubmenu()&&(e===c.RIGHT_ARROW&&"ltr"===this.dir||e===c.LEFT_ARROW&&"rtl"===this.dir)&&this.openMenu()},t.prototype._handleClick=function(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()},t.decorators=[{type:e.Directive,args:[{selector:"[mat-menu-trigger-for], [matMenuTriggerFor]",host:{"aria-haspopup":"true","(mousedown)":"_handleMousedown($event)","(keydown)":"_handleKeydown($event)","(click)":"_handleClick($event)"},exportAs:"matMenuTrigger"}]}],t.ctorParameters=function(){return[{type:p.Overlay},{type:e.ElementRef},{type:e.ViewContainerRef},{type:void 0,decorators:[{type:e.Inject,args:[Ui]}]},{type:Bi,decorators:[{type:e.Optional}]},{type:ji,decorators:[{type:e.Optional},{type:e.Self}]},{type:n.Directionality,decorators:[{type:e.Optional}]},{type:u.FocusMonitor}]},t.propDecorators={_deprecatedMatMenuTriggerFor:[{type:e.Input,args:["mat-menu-trigger-for"]}],menu:[{type:e.Input,args:["matMenuTriggerFor"]}],menuData:[{type:e.Input,args:["matMenuTriggerData"]}],menuOpened:[{type:e.Output}],onMenuOpen:[{type:e.Output}],menuClosed:[{type:e.Output}],onMenuClose:[{type:e.Output}]},t}(),Wi={overlapTrigger:!0,xPosition:"after",yPosition:"below"},qi=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[u.A11yModule,s.CommonModule,Z,It,p.OverlayModule,d.PortalModule],exports:[Bi,ji,Gi,Fi,Z],declarations:[Bi,ji,Gi,Fi],providers:[zi,{provide:Vi,useValue:Wi}]}]}],t.ctorParameters=function(){return[]},t}(),Yi={transformPanel:w.trigger("transformPanel",[w.state("showing",w.style({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),w.state("showing-multiple",w.style({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),w.transition("void => *",[w.style({opacity:0,minWidth:"100%",transform:"scaleY(0)"}),w.animate("150ms cubic-bezier(0.25, 0.8, 0.25, 1)")]),w.transition("* => void",[w.animate("250ms 100ms linear",w.style({opacity:0}))])]),fadeInContent:w.trigger("fadeInContent",[w.state("showing",w.style({opacity:1})),w.transition("void => showing",[w.style({opacity:0}),w.animate("150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},$i=Yi.transformPanel,Ki=Yi.fadeInContent;var Qi=0,Xi=new e.InjectionToken("mat-select-scroll-strategy");function Zi(t){return function(){return t.scrollStrategies.reposition()}}var Ji={provide:Xi,deps:[p.Overlay],useFactory:Zi},to=function(t,e){this.source=t,this.value=e},eo=function(t,e,n,r,i){this._elementRef=t,this._defaultErrorStateMatcher=e,this._parentForm=n,this._parentFormGroup=r,this.ngControl=i},no=et(nt(J(rt(eo)))),ro=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-select-trigger"}]}],t.ctorParameters=function(){return[]},t}(),io=function(t){function o(n,r,o,a,s,l,c,u,p,d,h,g){var y=t.call(this,s,a,c,u,d)||this;return y._viewportRuler=n,y._changeDetectorRef=r,y._ngZone=o,y._dir=l,y._parentFormField=p,y.ngControl=d,y._scrollStrategyFactory=g,y._panelOpen=!1,y._required=!1,y._scrollTop=0,y._multiple=!1,y._compareWith=function(t,e){return t===e},y._uid="mat-select-"+Qi++,y._destroy=new i.Subject,y._triggerFontSize=0,y._onChange=function(){},y._onTouched=function(){},y._optionIds="",y._transformOrigin="top",y._panelDoneAnimating=!1,y._scrollStrategy=y._scrollStrategyFactory(),y._offsetY=0,y._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}],y.focused=!1,y.controlType="mat-select",y.ariaLabel="",y.optionSelectionChanges=C.defer(function(){return y.options?x.merge.apply(void 0,y.options.map(function(t){return t.onSelectionChange})):y._ngZone.onStable.asObservable().pipe(f.take(1),m.switchMap(function(){return y.optionSelectionChanges}))}),y.openedChange=new e.EventEmitter,y.onOpen=y._openedStream,y.onClose=y._closedStream,y.selectionChange=new e.EventEmitter,y.change=y.selectionChange,y.valueChange=new e.EventEmitter,y.ngControl&&(y.ngControl.valueAccessor=y),y.tabIndex=parseInt(h)||0,y.id=y.id,y}return Y(o,t),Object.defineProperty(o.prototype,"placeholder",{get:function(){return this._placeholder},set:function(t){this._placeholder=t,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"required",{get:function(){return this._required},set:function(t){this._required=r.coerceBooleanProperty(t),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"multiple",{get:function(){return this._multiple},set:function(t){if(this._selectionModel)throw Error("Cannot change `multiple` mode of select after initialization.");this._multiple=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"compareWith",{get:function(){return this._compareWith},set:function(t){if("function"!=typeof t)throw Error("`compareWith` must be a function.");this._compareWith=t,this._selectionModel&&this._initializeSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"value",{get:function(){return this._value},set:function(t){t!==this._value&&(this.writeValue(t),this._value=t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"id",{get:function(){return this._id},set:function(t){this._id=t||this._uid,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"_openedStream",{get:function(){return this.openedChange.pipe(h.filter(function(t){return t}),I.map(function(){}))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"_closedStream",{get:function(){return this.openedChange.pipe(h.filter(function(t){return!t}),I.map(function(){}))},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){this._selectionModel=new E.SelectionModel(this.multiple,void 0,!1),this.stateChanges.next()},o.prototype.ngAfterContentInit=function(){var t=this;this._initKeyManager(),this.options.changes.pipe(_.startWith(null),A.takeUntil(this._destroy)).subscribe(function(){t._resetOptions(),t._initializeSelection()})},o.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},o.prototype.ngOnChanges=function(t){t.disabled&&this.stateChanges.next()},o.prototype.ngOnDestroy=function(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()},o.prototype.toggle=function(){this.panelOpen?this.close():this.open()},o.prototype.open=function(){var t=this;!this.disabled&&this.options&&this.options.length&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement)["font-size"]),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._calculateOverlayPosition(),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this._ngZone.onStable.asObservable().pipe(f.take(1)).subscribe(function(){t._triggerFontSize&&t.overlayDir.overlayRef&&t.overlayDir.overlayRef.overlayElement&&(t.overlayDir.overlayRef.overlayElement.style.fontSize=t._triggerFontSize+"px")}))},o.prototype.close=function(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())},o.prototype.writeValue=function(t){this.options&&this._setSelectionByValue(t)},o.prototype.registerOnChange=function(t){this._onChange=t},o.prototype.registerOnTouched=function(t){this._onTouched=t},o.prototype.setDisabledState=function(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()},Object.defineProperty(o.prototype,"panelOpen",{get:function(){return this._panelOpen},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"selected",{get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"triggerValue",{get:function(){if(this.empty)return"";if(this._multiple){var t=this._selectionModel.selected.map(function(t){return t.viewValue});return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue},enumerable:!0,configurable:!0}),o.prototype._isRtl=function(){return!!this._dir&&"rtl"===this._dir.value},o.prototype._handleKeydown=function(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))},o.prototype._handleClosedKeydown=function(t){var e=t.keyCode,n=e===c.DOWN_ARROW||e===c.UP_ARROW||e===c.LEFT_ARROW||e===c.RIGHT_ARROW;e===c.ENTER||e===c.SPACE||(this.multiple||t.altKey)&&n?(t.preventDefault(),this.open()):this.multiple||this._keyManager.onKeydown(t)},o.prototype._handleOpenKeydown=function(t){var e=t.keyCode,n=e===c.DOWN_ARROW||e===c.UP_ARROW,r=this._keyManager;if(e===c.HOME||e===c.END)t.preventDefault(),e===c.HOME?r.setFirstItemActive():r.setLastItemActive();else if(n&&t.altKey)t.preventDefault(),this.close();else if(e!==c.ENTER&&e!==c.SPACE||!r.activeItem){var i=r.activeItemIndex;r.onKeydown(t),this._multiple&&n&&t.shiftKey&&r.activeItem&&r.activeItemIndex!==i&&r.activeItem._selectViaInteraction()}else t.preventDefault(),r.activeItem._selectViaInteraction()},o.prototype._onPanelDone=function(){this.panelOpen?(this._scrollTop=0,this.openedChange.emit(!0)):(this.openedChange.emit(!1),this._panelDoneAnimating=!1,this.overlayDir.offsetX=0,this._changeDetectorRef.markForCheck())},o.prototype._onFadeInDone=function(){this._panelDoneAnimating=this.panelOpen,this._changeDetectorRef.markForCheck()},o.prototype._onFocus=function(){this.disabled||(this.focused=!0,this.stateChanges.next())},o.prototype._onBlur=function(){this.focused=!1,this.disabled||this.panelOpen||(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())},o.prototype._onAttached=function(){var t=this;this.overlayDir.positionChange.pipe(f.take(1)).subscribe(function(){t._changeDetectorRef.detectChanges(),t._calculateOverlayOffsetX(),t.panel.nativeElement.scrollTop=t._scrollTop})},o.prototype._getPanelTheme=function(){return this._parentFormField?"mat-"+this._parentFormField.color:""},Object.defineProperty(o.prototype,"empty",{get:function(){return!this._selectionModel||this._selectionModel.isEmpty()},enumerable:!0,configurable:!0}),o.prototype._initializeSelection=function(){var t=this;Promise.resolve().then(function(){t._setSelectionByValue(t.ngControl?t.ngControl.value:t._value)})},o.prototype._setSelectionByValue=function(t,e){var n=this;if(void 0===e&&(e=!1),this.multiple&&t){if(!Array.isArray(t))throw Error("Value must be an array in multiple-selection mode.");this._clearSelection(),t.forEach(function(t){return n._selectValue(t,e)}),this._sortValues()}else{this._clearSelection();var r=this._selectValue(t,e);r&&this._keyManager.setActiveItem(this.options.toArray().indexOf(r))}this._changeDetectorRef.markForCheck()},o.prototype._selectValue=function(t,n){var r=this;void 0===n&&(n=!1);var i=this.options.find(function(n){try{return null!=n.value&&r._compareWith(n.value,t)}catch(t){return e.isDevMode()&&console.warn(t),!1}});return i&&(n?i._selectViaInteraction():i.select(),this._selectionModel.select(i),this.stateChanges.next()),i},o.prototype._clearSelection=function(t){this._selectionModel.clear(),this.options.forEach(function(e){e!==t&&e.deselect()}),this.stateChanges.next()},o.prototype._initKeyManager=function(){var t=this;this._keyManager=new u.ActiveDescendantKeyManager(this.options).withTypeAhead().withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._keyManager.tabOut.pipe(A.takeUntil(this._destroy)).subscribe(function(){return t.close()}),this._keyManager.change.pipe(A.takeUntil(this._destroy)).subscribe(function(){t._panelOpen&&t.panel?t._scrollActiveOptionIntoView():t._panelOpen||t.multiple||!t._keyManager.activeItem||t._keyManager.activeItem._selectViaInteraction()})},o.prototype._resetOptions=function(){var t=this,e=x.merge(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(A.takeUntil(e),h.filter(function(t){return t.isUserInput})).subscribe(function(e){t._onSelect(e.source),!t.multiple&&t._panelOpen&&(t.close(),t.focus())}),x.merge.apply(void 0,this.options.map(function(t){return t._stateChanges})).pipe(A.takeUntil(e)).subscribe(function(){t._changeDetectorRef.markForCheck(),t.stateChanges.next()}),this._setOptionIds()},o.prototype._onSelect=function(t){var e=this._selectionModel.isSelected(t);this.multiple?(this._selectionModel.toggle(t),this.stateChanges.next(),e?t.deselect():t.select(),this._keyManager.setActiveItem(this._getOptionIndex(t)),this._sortValues()):(this._clearSelection(null==t.value?void 0:t),null==t.value?this._propagateChanges(t.value):(this._selectionModel.select(t),this.stateChanges.next())),e!==this._selectionModel.isSelected(t)&&this._propagateChanges()},o.prototype._sortValues=function(){var t=this;this._multiple&&(this._selectionModel.clear(),this.options.forEach(function(e){e.selected&&t._selectionModel.select(e)}),this.stateChanges.next())},o.prototype._propagateChanges=function(t){var e=null;e=this.multiple?this.selected.map(function(t){return t.value}):this.selected?this.selected.value:t,this._value=e,this.valueChange.emit(e),this._onChange(e),this.selectionChange.emit(new to(this,e)),this._changeDetectorRef.markForCheck()},o.prototype._setOptionIds=function(){this._optionIds=this.options.map(function(t){return t.id}).join(" ")},o.prototype._highlightCorrectOption=function(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._getOptionIndex(this._selectionModel.selected[0])))},o.prototype._scrollActiveOptionIntoView=function(){var t=this._keyManager.activeItemIndex||0,e=Gt(t,this.options,this.optionGroups);this.panel.nativeElement.scrollTop=Wt(t+e,this._getItemHeight(),this.panel.nativeElement.scrollTop,256)},o.prototype.focus=function(){this._elementRef.nativeElement.focus()},o.prototype._getOptionIndex=function(t){return this.options.reduce(function(e,n,r){return void 0===e?t===n?r:void 0:e},void 0)},o.prototype._calculateOverlayPosition=function(){var t=this._getItemHeight(),e=this._getItemCount(),n=Math.min(e*t,256),r=e*t-n,i=this.empty?0:this._getOptionIndex(this._selectionModel.selected[0]);i+=Gt(i,this.options,this.optionGroups);var o=n/2;this._scrollTop=this._calculateOverlayScroll(i,o,r),this._offsetY=this._calculateOverlayOffsetY(i,o,r),this._checkOverlayWithinViewport(r)},o.prototype._calculateOverlayScroll=function(t,e,n){var r=this._getItemHeight(),i=r*t-e+r/2;return Math.min(Math.max(0,i),n)},Object.defineProperty(o.prototype,"_ariaLabel",{get:function(){return this.ariaLabelledby?null:this.ariaLabel||this.placeholder},enumerable:!0,configurable:!0}),o.prototype._getAriaActiveDescendant=function(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null},o.prototype._calculateOverlayOffsetX=function(){var t,e=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),r=this._isRtl(),i=this.multiple?60:32;if(this.multiple)t=44;else{var o=this._selectionModel.selected[0]||this.options.first;t=o&&o.group?32:16}r||(t*=-1);var a=0-(e.left+t-(r?i:0)),s=e.right+t-n.width+(r?0:i);a>0?t+=a+8:s>0&&(t-=s+8),this.overlayDir.offsetX=t,this.overlayDir.overlayRef.updatePosition()},o.prototype._calculateOverlayOffsetY=function(t,e,n){var r,i=this._getItemHeight(),o=(i-this._triggerRect.height)/2,a=Math.floor(256/i);if(0===this._scrollTop)r=t*i;else if(this._scrollTop===n){r=(t-(this._getItemCount()-a))*i+(i-(this._getItemCount()*i-256)%i)}else r=e-i/2;return-1*r-o},o.prototype._checkOverlayWithinViewport=function(t){var e=this._getItemHeight(),n=this._viewportRuler.getViewportSize(),r=this._triggerRect.top-8,i=n.height-this._triggerRect.bottom-8,o=Math.abs(this._offsetY),a=Math.min(this._getItemCount()*e,256)-o-this._triggerRect.height;a>i?this._adjustPanelUp(a,i):o>r?this._adjustPanelDown(o,r,t):this._transformOrigin=this._getOriginBasedOnOption()},o.prototype._adjustPanelUp=function(t,e){var n=Math.round(t-e);this._scrollTop-=n,this._offsetY-=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")},o.prototype._adjustPanelDown=function(t,e,n){var r=Math.round(t-e);if(this._scrollTop+=r,this._offsetY+=r,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=n)return this._scrollTop=n,this._offsetY=0,void(this._transformOrigin="50% top 0px")},o.prototype._getOriginBasedOnOption=function(){var t=this._getItemHeight(),e=(t-this._triggerRect.height)/2;return"50% "+(Math.abs(this._offsetY)-e+t/2)+"px 0px"},o.prototype._getItemCount=function(){return this.options.length+this.optionGroups.length},o.prototype._getItemHeight=function(){return 3*this._triggerFontSize},o.prototype.setDescribedByIds=function(t){this._ariaDescribedby=t.join(" ")},o.prototype.onContainerClick=function(){this.focus(),this.open()},Object.defineProperty(o.prototype,"shouldPlaceholderFloat",{get:function(){return this._panelOpen||!this.empty},enumerable:!0,configurable:!0}),o.decorators=[{type:e.Component,args:[{selector:"mat-select",exportAs:"matSelect",template:'<div cdk-overlay-origin class="mat-select-trigger" aria-hidden="true" (click)="toggle()" #origin="cdkOverlayOrigin" #trigger><div class="mat-select-value" [ngSwitch]="empty"><span class="mat-select-placeholder" *ngSwitchCase="true">{{placeholder || \' \'}}</span> <span class="mat-select-value-text" *ngSwitchCase="false" [ngSwitch]="!!customTrigger"><span *ngSwitchDefault>{{triggerValue}}</span><ng-content select="mat-select-trigger" *ngSwitchCase="true"></ng-content></span></div><div class="mat-select-arrow-wrapper"><div class="mat-select-arrow"></div></div></div><ng-template cdk-connected-overlay hasBackdrop cdkConnectedOverlayLockPosition backdropClass="cdk-overlay-transparent-backdrop" [scrollStrategy]="_scrollStrategy" [origin]="origin" [open]="panelOpen" [positions]="_positions" [minWidth]="_triggerRect?.width" [offsetY]="_offsetY" (backdropClick)="close()" (attach)="_onAttached()" (detach)="close()"><div #panel class="mat-select-panel {{ _getPanelTheme() }}" [ngClass]="panelClass" [@transformPanel]="multiple ? \'showing-multiple\' : \'showing\'" (@transformPanel.done)="_onPanelDone()" [style.transformOrigin]="_transformOrigin" [class.mat-select-panel-done-animating]="_panelDoneAnimating" [style.font-size.px]="_triggerFontSize" (keydown)="_handleKeydown($event)"><div class="mat-select-content" [@fadeInContent]="\'showing\'" (@fadeInContent.done)="_onFadeInDone()"><ng-content></ng-content></div></div></ng-template>',styles:[".mat-select{display:inline-block;width:100%;outline:0}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%}.mat-select-panel:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){.mat-select-panel{outline:solid 1px}}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;transition:none}"],inputs:["disabled","disableRipple","tabIndex"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,host:{role:"listbox","[attr.id]":"id","[attr.tabindex]":"tabIndex","[attr.aria-label]":"_ariaLabel","[attr.aria-labelledby]":"ariaLabelledby","[attr.aria-required]":"required.toString()","[attr.aria-disabled]":"disabled.toString()","[attr.aria-invalid]":"errorState","[attr.aria-owns]":"panelOpen ? _optionIds : null","[attr.aria-multiselectable]":"multiple","[attr.aria-describedby]":"_ariaDescribedby || null","[attr.aria-activedescendant]":"_getAriaActiveDescendant()","[class.mat-select-disabled]":"disabled","[class.mat-select-invalid]":"errorState","[class.mat-select-required]":"required",class:"mat-select","(keydown)":"_handleKeydown($event)","(focus)":"_onFocus()","(blur)":"_onBlur()"},animations:[Yi.transformPanel,Yi.fadeInContent],providers:[{provide:Xt,useExisting:o},{provide:Ht,useExisting:o}]}]}],o.ctorParameters=function(){return[{type:p.ViewportRuler},{type:e.ChangeDetectorRef},{type:e.NgZone},{type:_t},{type:e.ElementRef},{type:n.Directionality,decorators:[{type:e.Optional}]},{type:v.NgForm,decorators:[{type:e.Optional}]},{type:v.FormGroupDirective,decorators:[{type:e.Optional}]},{type:ue,decorators:[{type:e.Optional}]},{type:v.NgControl,decorators:[{type:e.Self},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Attribute,args:["tabindex"]}]},{type:void 0,decorators:[{type:e.Inject,args:[Xi]}]}]},o.propDecorators={trigger:[{type:e.ViewChild,args:["trigger"]}],panel:[{type:e.ViewChild,args:["panel"]}],overlayDir:[{type:e.ViewChild,args:[p.CdkConnectedOverlay]}],options:[{type:e.ContentChildren,args:[zt,{descendants:!0}]}],optionGroups:[{type:e.ContentChildren,args:[Vt]}],panelClass:[{type:e.Input}],customTrigger:[{type:e.ContentChild,args:[ro]}],placeholder:[{type:e.Input}],required:[{type:e.Input}],multiple:[{type:e.Input}],compareWith:[{type:e.Input}],value:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],errorStateMatcher:[{type:e.Input}],id:[{type:e.Input}],openedChange:[{type:e.Output}],_openedStream:[{type:e.Output,args:["opened"]}],_closedStream:[{type:e.Output,args:["closed"]}],onOpen:[{type:e.Output}],onClose:[{type:e.Output}],selectionChange:[{type:e.Output}],change:[{type:e.Output}],valueChange:[{type:e.Output}]},o}(no),oo=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,p.OverlayModule,qt,Z],exports:[pe,io,ro,qt,Z],declarations:[io,ro],providers:[Ji,_t]}]}],t.ctorParameters=function(){return[]},t}(),ao={tooltipState:w.trigger("state",[w.state("initial, void, hidden",w.style({transform:"scale(0)"})),w.state("visible",w.style({transform:"scale(1)"})),w.transition("* => visible",w.animate("150ms cubic-bezier(0.0, 0.0, 0.2, 1)")),w.transition("* => hidden",w.animate("150ms cubic-bezier(0.4, 0.0, 1, 1)"))])},so=20,lo="mat-tooltip-panel";function co(t){return Error('Tooltip position "'+t+'" is invalid.')}var uo=new e.InjectionToken("mat-tooltip-scroll-strategy");function po(t){return function(){return t.scrollStrategies.reposition({scrollThrottle:so})}}var ho={provide:uo,deps:[p.Overlay],useFactory:po},fo=new e.InjectionToken("mat-tooltip-default-options"),mo=function(){function t(t,e,n,r,i,o,a,s,l,c,u){var p=this;this._overlay=t,this._elementRef=e,this._scrollDispatcher=n,this._viewContainerRef=r,this._ngZone=i,this._platform=o,this._ariaDescriber=a,this._focusMonitor=s,this._scrollStrategy=l,this._dir=c,this._defaultOptions=u,this._position="below",this._disabled=!1,this.showDelay=this._defaultOptions?this._defaultOptions.showDelay:0,this.hideDelay=this._defaultOptions?this._defaultOptions.hideDelay:0,this._message="",this._manualListeners=new Map;var d=e.nativeElement;o.IOS?"INPUT"!==d.nodeName&&"TEXTAREA"!==d.nodeName||(d.style.webkitUserSelect=d.style.userSelect=""):(this._manualListeners.set("mouseenter",function(){return p.show()}),this._manualListeners.set("mouseleave",function(){return p.hide()}),this._manualListeners.forEach(function(t,n){return e.nativeElement.addEventListener(n,t)})),s.monitor(d).subscribe(function(t){t?"program"!==t&&i.run(function(){return p.show()}):i.run(function(){return p.hide(0)})})}return Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(t){t!==this._position&&(this._position=t,this._tooltipInstance&&this._disposeTooltip())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=r.coerceBooleanProperty(t),this._disabled&&this.hide(0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_positionDeprecated",{get:function(){return this._position},set:function(t){this._position=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this._message},set:function(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=t?(""+t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._updateTooltipMessage(),this._ariaDescriber.describe(this._elementRef.nativeElement,this.message))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tooltipClass",{get:function(){return this._tooltipClass},set:function(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){var t=this;this._tooltipInstance&&this._disposeTooltip(),this._platform.IOS||(this._manualListeners.forEach(function(e,n){t._elementRef.nativeElement.removeEventListener(n,e)}),this._manualListeners.clear()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.message),this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)},t.prototype.show=function(t){void 0===t&&(t=this.showDelay),!this.disabled&&this.message&&(this._tooltipInstance||this._createTooltip(),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(this._position,t))},t.prototype.hide=function(t){void 0===t&&(t=this.hideDelay),this._tooltipInstance&&this._tooltipInstance.hide(t)},t.prototype.toggle=function(){this._isTooltipVisible()?this.hide():this.show()},t.prototype._isTooltipVisible=function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()},t.prototype._handleKeydown=function(t){this._isTooltipVisible()&&t.keyCode===c.ESCAPE&&(t.stopPropagation(),this.hide(0))},t.prototype._handleTouchend=function(){this.hide(this._defaultOptions?this._defaultOptions.touchendHideDelay:1500)},t.prototype._createTooltip=function(){var t=this,e=this._createOverlay(),n=new d.ComponentPortal(go,this._viewContainerRef);this._tooltipInstance=e.attach(n).instance,x.merge(this._tooltipInstance.afterHidden(),e.detachments()).subscribe(function(){t._tooltipInstance&&t._disposeTooltip()})},t.prototype._createOverlay=function(){var t=this,e=this._getOrigin(),n=this._getOverlayPosition(),r=this._overlay.position().connectedTo(this._elementRef,e.main,n.main).withFallbackPosition(e.fallback,n.fallback),i=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef);r.withScrollableContainers(i),r.onPositionChange.subscribe(function(e){t._tooltipInstance&&(e.scrollableViewProperties.isOverlayClipped&&t._tooltipInstance.isVisible()?t._ngZone.run(function(){return t.hide(0)}):t._tooltipInstance._setTransformOrigin(e.connectionPair))});var o=new p.OverlayConfig({direction:this._dir?this._dir.value:"ltr",positionStrategy:r,panelClass:lo,scrollStrategy:this._scrollStrategy()});return this._overlayRef=this._overlay.create(o),this._overlayRef},t.prototype._disposeTooltip=function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._tooltipInstance=null},t.prototype._getOrigin=function(){var t,e=!this._dir||"ltr"==this._dir.value;if("above"==this.position||"below"==this.position)t={originX:"center",originY:"above"==this.position?"top":"bottom"};else if("left"==this.position||"before"==this.position&&e||"after"==this.position&&!e)t={originX:"start",originY:"center"};else{if(!("right"==this.position||"after"==this.position&&e||"before"==this.position&&!e))throw co(this.position);t={originX:"end",originY:"center"}}var n=this._invertPosition(t.originX,t.originY);return{main:t,fallback:{originX:n.x,originY:n.y}}},t.prototype._getOverlayPosition=function(){var t,e=!this._dir||"ltr"==this._dir.value;if("above"==this.position)t={overlayX:"center",overlayY:"bottom"};else if("below"==this.position)t={overlayX:"center",overlayY:"top"};else if("left"==this.position||"before"==this.position&&e||"after"==this.position&&!e)t={overlayX:"end",overlayY:"center"};else{if(!("right"==this.position||"after"==this.position&&e||"before"==this.position&&!e))throw co(this.position);t={overlayX:"start",overlayY:"center"}}var n=this._invertPosition(t.overlayX,t.overlayY);return{main:t,fallback:{overlayX:n.x,overlayY:n.y}}},t.prototype._updateTooltipMessage=function(){var t=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.asObservable().pipe(f.take(1)).subscribe(function(){t._tooltipInstance&&t._overlayRef.updatePosition()}))},t.prototype._setTooltipClass=function(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())},t.prototype._invertPosition=function(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}},t.decorators=[{type:e.Directive,args:[{selector:"[matTooltip]",exportAs:"matTooltip",host:{"(longpress)":"show()","(keydown)":"_handleKeydown($event)","(touchend)":"_handleTouchend()"}}]}],t.ctorParameters=function(){return[{type:p.Overlay},{type:e.ElementRef},{type:V.ScrollDispatcher},{type:e.ViewContainerRef},{type:e.NgZone},{type:l.Platform},{type:u.AriaDescriber},{type:u.FocusMonitor},{type:void 0,decorators:[{type:e.Inject,args:[uo]}]},{type:n.Directionality,decorators:[{type:e.Optional}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[fo]}]}]},t.propDecorators={position:[{type:e.Input,args:["matTooltipPosition"]}],disabled:[{type:e.Input,args:["matTooltipDisabled"]}],_positionDeprecated:[{type:e.Input,args:["tooltip-position"]}],showDelay:[{type:e.Input,args:["matTooltipShowDelay"]}],hideDelay:[{type:e.Input,args:["matTooltipHideDelay"]}],message:[{type:e.Input,args:["matTooltip"]}],tooltipClass:[{type:e.Input,args:["matTooltipClass"]}]},t}(),go=function(){function t(t,e){this._changeDetectorRef=t,this._breakpointObserver=e,this._visibility="initial",this._closeOnInteraction=!1,this._transformOrigin="bottom",this._onHide=new i.Subject,this._isHandset=this._breakpointObserver.observe(F.Breakpoints.Handset)}return t.prototype.show=function(t,e){var n=this;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),this._closeOnInteraction=!0,this._position=t,this._showTimeoutId=setTimeout(function(){n._visibility="visible",n._markForCheck()},e)},t.prototype.hide=function(t){var e=this;this._showTimeoutId&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(function(){e._visibility="hidden",e._markForCheck()},t)},t.prototype.afterHidden=function(){return this._onHide.asObservable()},t.prototype.isVisible=function(){return"visible"===this._visibility},t.prototype._setTransformOrigin=function(t){var e="X"==("above"===this._position||"below"===this._position?"Y":"X")?t.overlayX:t.overlayY;if("top"===e||"bottom"===e)this._transformOrigin=e;else if("start"===e)this._transformOrigin="left";else{if("end"!==e)throw co(this._position);this._transformOrigin="right"}},t.prototype._animationStart=function(){this._closeOnInteraction=!1},t.prototype._animationDone=function(t){var e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)},t.prototype._handleBodyInteraction=function(){this._closeOnInteraction&&this.hide(0)},t.prototype._markForCheck=function(){this._changeDetectorRef.markForCheck()},t.decorators=[{type:e.Component,args:[{selector:"mat-tooltip-component",template:'<div class="mat-tooltip" [ngClass]="tooltipClass" [class.mat-tooltip-handset]="(_isHandset | async)!.matches" [style.transform-origin]="_transformOrigin" [@state]="_visibility" (@state.start)="_animationStart()" (@state.done)="_animationDone($event)">{{message}}</div>',styles:[".mat-tooltip-panel{pointer-events:none!important}.mat-tooltip{color:#fff;border-radius:2px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px}@media screen and (-ms-high-contrast:active){.mat-tooltip{outline:solid 1px}}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[ao.tooltipState],host:{"[style.zoom]":'_visibility === "visible" ? 1 : null',"(body:click)":"this._handleBodyInteraction()","aria-hidden":"true"}}]}],t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:F.BreakpointObserver}]},t}(),yo={showDelay:0,hideDelay:0,touchendHideDelay:1500},vo=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,p.OverlayModule,Z,l.PlatformModule,u.A11yModule,F.LayoutModule],exports:[mo,go,Z],declarations:[mo,go],entryComponents:[go],providers:[ho,u.ARIA_DESCRIBER_PROVIDER,{provide:fo,useValue:yo}]}]}],t.ctorParameters=function(){return[]},t}(),bo=function(){function t(){this.changes=new i.Subject,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=function(t,e,n){if(0==n||0==e)return"0 of "+n;var r=t*e;return r+1+" - "+(r<(n=Math.max(n,0))?Math.min(r+e,n):r+e)+" of "+n}}return t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}();function _o(t){return t||new bo}var wo={provide:bo,deps:[[new e.Optional,new e.SkipSelf,bo]],useFactory:_o},Co=function(){},xo=function(){function t(t,n){var r=this;this._intl=t,this._changeDetectorRef=n,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.page=new e.EventEmitter,this._intlChanges=t.changes.subscribe(function(){return r._changeDetectorRef.markForCheck()})}return Object.defineProperty(t.prototype,"pageIndex",{get:function(){return this._pageIndex},set:function(t){this._pageIndex=r.coerceNumberProperty(t),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._length},set:function(t){this._length=r.coerceNumberProperty(t),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pageSize",{get:function(){return this._pageSize},set:function(t){this._pageSize=r.coerceNumberProperty(t),this._updateDisplayedPageSizeOptions()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pageSizeOptions",{get:function(){return this._pageSizeOptions},set:function(t){this._pageSizeOptions=(t||[]).map(function(t){return r.coerceNumberProperty(t)}),this._updateDisplayedPageSizeOptions()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hidePageSize",{get:function(){return this._hidePageSize},set:function(t){this._hidePageSize=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showFirstLastButtons",{get:function(){return this._showFirstLastButtons},set:function(t){this._showFirstLastButtons=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._initialized=!0,this._updateDisplayedPageSizeOptions()},t.prototype.ngOnDestroy=function(){this._intlChanges.unsubscribe()},t.prototype.nextPage=function(){this.hasNextPage()&&(this.pageIndex++,this._emitPageEvent())},t.prototype.previousPage=function(){this.hasPreviousPage()&&(this.pageIndex--,this._emitPageEvent())},t.prototype.firstPage=function(){this.hasPreviousPage()&&(this.pageIndex=0,this._emitPageEvent())},t.prototype.lastPage=function(){this.hasNextPage()&&(this.pageIndex=this.getNumberOfPages(),this._emitPageEvent())},t.prototype.hasPreviousPage=function(){return this.pageIndex>=1&&0!=this.pageSize},t.prototype.hasNextPage=function(){var t=this.getNumberOfPages();return this.pageIndex<t&&0!=this.pageSize},t.prototype.getNumberOfPages=function(){return Math.ceil(this.length/this.pageSize)-1},t.prototype._changePageSize=function(t){var e=this.pageIndex*this.pageSize;this.pageIndex=Math.floor(e/t)||0,this.pageSize=t,this._emitPageEvent()},t.prototype._updateDisplayedPageSizeOptions=function(){this._initialized&&(this.pageSize||(this._pageSize=0!=this.pageSizeOptions.length?this.pageSizeOptions[0]:50),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),-1==this._displayedPageSizeOptions.indexOf(this.pageSize)&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort(function(t,e){return t-e}),this._changeDetectorRef.markForCheck())},t.prototype._emitPageEvent=function(){this.page.emit({pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})},t.decorators=[{type:e.Component,args:[{selector:"mat-paginator",exportAs:"matPaginator",template:'<div class="mat-paginator-container"><div class="mat-paginator-page-size" *ngIf="!hidePageSize"><div class="mat-paginator-page-size-label">{{_intl.itemsPerPageLabel}}</div><mat-form-field *ngIf="_displayedPageSizeOptions.length > 1" class="mat-paginator-page-size-select"><mat-select [value]="pageSize" [aria-label]="_intl.itemsPerPageLabel" (change)="_changePageSize($event.value)"><mat-option *ngFor="let pageSizeOption of _displayedPageSizeOptions" [value]="pageSizeOption">{{pageSizeOption}}</mat-option></mat-select></mat-form-field><div *ngIf="_displayedPageSizeOptions.length <= 1">{{pageSize}}</div></div><div class="mat-paginator-range-actions"><div class="mat-paginator-range-label">{{_intl.getRangeLabel(pageIndex, pageSize, length)}}</div><button mat-icon-button type="button" class="mat-paginator-navigation-first" (click)="firstPage()" [attr.aria-label]="_intl.firstPageLabel" [matTooltip]="_intl.firstPageLabel" [matTooltipPosition]="\'above\'" [disabled]="!hasPreviousPage()" *ngIf="showFirstLastButtons"><div class="mat-paginator-first"></div><div class="mat-paginator-decrement"></div></button> <button mat-icon-button type="button" class="mat-paginator-navigation-previous" (click)="previousPage()" [attr.aria-label]="_intl.previousPageLabel" [matTooltip]="_intl.previousPageLabel" [matTooltipPosition]="\'above\'" [disabled]="!hasPreviousPage()"><div class="mat-paginator-decrement"></div></button> <button mat-icon-button type="button" class="mat-paginator-navigation-next" (click)="nextPage()" [attr.aria-label]="_intl.nextPageLabel" [matTooltip]="_intl.nextPageLabel" [matTooltipPosition]="\'above\'" [disabled]="!hasNextPage()"><div class="mat-paginator-increment"></div></button> <button mat-icon-button type="button" class="mat-paginator-navigation-last" (click)="lastPage()" [attr.aria-label]="_intl.lastPageLabel" [matTooltip]="_intl.lastPageLabel" [matTooltipPosition]="\'above\'" [disabled]="!hasNextPage()" *ngIf="showFirstLastButtons"><div class="mat-paginator-increment"></div><div class="mat-paginator-last"></div></button></div></div>',styles:[".mat-paginator{display:block}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;min-height:56px;padding:0 8px;flex-wrap:wrap-reverse}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-decrement-button+.mat-paginator-decrement-button{margin:0 0 0 8px}[dir=rtl] .mat-paginator-decrement-button+.mat-paginator-decrement-button{margin:0 8px 0 0}.mat-paginator-decrement,.mat-paginator-increment{width:8px;height:8px}.mat-paginator-increment,[dir=rtl] .mat-paginator-decrement{transform:rotate(45deg)}.mat-paginator-decrement,[dir=rtl] .mat-paginator-increment{transform:rotate(225deg)}.mat-paginator-increment{margin-left:12px}[dir=rtl] .mat-paginator-increment{margin-right:12px}.mat-paginator-decrement{margin-left:16px}[dir=rtl] .mat-paginator-decrement{margin-right:16px}.mat-paginator-first{transform:rotate(90deg);width:14px;height:8px;float:left;margin-left:3px}.mat-paginator-navigation-first .mat-paginator-decrement{margin-left:21px}.mat-paginator-navigation-last .mat-paginator-increment{float:left;margin-left:9px}.mat-paginator-last{transform:rotate(90deg);width:14px;height:8px;margin-left:15px}.mat-paginator-range-actions{display:flex;align-items:center;min-height:48px}"],host:{class:"mat-paginator"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[{type:bo},{type:e.ChangeDetectorRef}]},t.propDecorators={pageIndex:[{type:e.Input}],length:[{type:e.Input}],pageSize:[{type:e.Input}],pageSizeOptions:[{type:e.Input}],hidePageSize:[{type:e.Input}],showFirstLastButtons:[{type:e.Input}],page:[{type:e.Output}]},t}(),So=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,Me,oo,vo],exports:[xo],declarations:[xo],providers:[wo]}]}],t.ctorParameters=function(){return[]},t}(),Eo=function(t){this._elementRef=t},ko=tt(Eo,"primary"),Oo=0,Po=function(t){function n(e){var n=t.call(this,e)||this;return n._elementRef=e,n._value=0,n._bufferValue=0,n.mode="determinate",n.progressbarId="mat-progress-bar-"+Oo++,n}return Y(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(t){this._value=Ao(t||0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bufferValue",{get:function(){return this._bufferValue},set:function(t){this._bufferValue=Ao(t||0)},enumerable:!0,configurable:!0}),n.prototype._primaryTransform=function(){return{transform:"scaleX("+this.value/100+")"}},n.prototype._bufferTransform=function(){if("buffer"===this.mode)return{transform:"scaleX("+this.bufferValue/100+")"}},n.decorators=[{type:e.Component,args:[{selector:"mat-progress-bar",exportAs:"matProgressBar",host:{role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","[attr.aria-valuenow]":"value","[attr.mode]":"mode",class:"mat-progress-bar"},inputs:["color"],template:'<svg width="100%" height="5" focusable="false" class="mat-progress-bar-background mat-progress-bar-element"><defs><pattern [id]="progressbarId" x="5" y="0" width="10" height="5" patternUnits="userSpaceOnUse"><circle cx="2.5" cy="2.5" r="2.5"/></pattern></defs><rect [attr.fill]="\'url(#\' + progressbarId + \')\'" width="100%" height="100%"/></svg><div class="mat-progress-bar-buffer mat-progress-bar-element" [ngStyle]="_bufferTransform()"></div><div class="mat-progress-bar-primary mat-progress-bar-fill mat-progress-bar-element" [ngStyle]="_primaryTransform()"></div><div class="mat-progress-bar-secondary mat-progress-bar-fill mat-progress-bar-element"></div>',styles:[".mat-progress-bar{display:block;height:5px;overflow:hidden;position:relative;transition:opacity 250ms linear;width:100%}.mat-progress-bar .mat-progress-bar-element,.mat-progress-bar .mat-progress-bar-fill::after{height:100%;position:absolute;width:100%}.mat-progress-bar .mat-progress-bar-background{width:calc(100% + 10px)}.mat-progress-bar .mat-progress-bar-buffer{transform-origin:top left;transition:transform 250ms ease}.mat-progress-bar .mat-progress-bar-secondary{display:none}.mat-progress-bar .mat-progress-bar-fill{animation:none;transform-origin:top left;transition:transform 250ms ease}.mat-progress-bar .mat-progress-bar-fill::after{animation:none;content:'';display:inline-block;left:0}.mat-progress-bar[dir=rtl],[dir=rtl] .mat-progress-bar{transform:rotateY(180deg)}.mat-progress-bar[mode=query]{transform:rotateZ(180deg)}.mat-progress-bar[mode=query][dir=rtl],[dir=rtl] .mat-progress-bar[mode=query]{transform:rotateZ(180deg) rotateY(180deg)}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-fill,.mat-progress-bar[mode=query] .mat-progress-bar-fill{transition:none}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary,.mat-progress-bar[mode=query] .mat-progress-bar-primary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-translate 2s infinite linear;left:-145.166611%}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-primary.mat-progress-bar-fill::after{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-scale 2s infinite linear}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary,.mat-progress-bar[mode=query] .mat-progress-bar-secondary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-translate 2s infinite linear;left:-54.888891%;display:block}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-secondary.mat-progress-bar-fill::after{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-scale 2s infinite linear}.mat-progress-bar[mode=buffer] .mat-progress-bar-background{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-background-scroll 250ms infinite linear}@keyframes mat-progress-bar-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(.5,0,.70173,.49582);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(.30244,.38135,.55,.95635);transform:translateX(83.67142%)}100%{transform:translateX(200.61106%)}}@keyframes mat-progress-bar-primary-indeterminate-scale{0%{transform:scaleX(.08)}36.65%{animation-timing-function:cubic-bezier(.33473,.12482,.78584,1);transform:scaleX(.08)}69.15%{animation-timing-function:cubic-bezier(.06,.11,.6,1);transform:scaleX(.66148)}100%{transform:scaleX(.08)}}@keyframes mat-progress-bar-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(.15,0,.51506,.40969);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(.31033,.28406,.8,.73371);transform:translateX(37.65191%)}48.35%{animation-timing-function:cubic-bezier(.4,.62704,.6,.90203);transform:translateX(84.38617%)}100%{transform:translateX(160.27778%)}}@keyframes mat-progress-bar-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(.15,0,.51506,.40969);transform:scaleX(.08)}19.15%{animation-timing-function:cubic-bezier(.31033,.28406,.8,.73371);transform:scaleX(.4571)}44.15%{animation-timing-function:cubic-bezier(.4,.62704,.6,.90203);transform:scaleX(.72796)}100%{transform:scaleX(.08)}}@keyframes mat-progress-bar-background-scroll{to{transform:translateX(-10px)}}"],changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],n.ctorParameters=function(){return[{type:e.ElementRef}]},n.propDecorators={value:[{type:e.Input}],bufferValue:[{type:e.Input}],mode:[{type:e.Input}]},n}(ko);function Ao(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=100),Math.max(e,Math.min(n,t))}var Do=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,Z],exports:[Po,Z],declarations:[Po]}]}],t.ctorParameters=function(){return[]},t}(),To=100,Mo=function(t){this._elementRef=t},Io=tt(Mo,"primary"),Ro=function(t){function n(e,n,r){var i=t.call(this,e)||this;i._elementRef=e,i._document=r,i._value=0,i._fallbackAnimation=!1,i._elementSize=To,i._diameter=To,i.mode="determinate",i._fallbackAnimation=n.EDGE||n.TRIDENT;var o="mat-progress-spinner-indeterminate"+(i._fallbackAnimation?"-fallback":"")+"-animation";return e.nativeElement.classList.add(o),i}return Y(n,t),Object.defineProperty(n.prototype,"diameter",{get:function(){return this._diameter},set:function(t){this._diameter=r.coerceNumberProperty(t),this._fallbackAnimation||n.diameters.has(this._diameter)||this._attachStyleNode(),this._updateElementSize()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"strokeWidth",{get:function(){return this._strokeWidth||this.diameter/10},set:function(t){this._strokeWidth=r.coerceNumberProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return"determinate"===this.mode?this._value:0},set:function(t){this._value=Math.max(0,Math.min(100,r.coerceNumberProperty(t)))},enumerable:!0,configurable:!0}),n.prototype.ngOnChanges=function(t){(t.strokeWidth||t.diameter)&&this._updateElementSize()},Object.defineProperty(n.prototype,"_circleRadius",{get:function(){return(this.diameter-10)/2},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_viewBox",{get:function(){var t=2*this._circleRadius+this.strokeWidth;return"0 0 "+t+" "+t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_strokeCircumference",{get:function(){return 2*Math.PI*this._circleRadius},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_strokeDashOffset",{get:function(){return"determinate"===this.mode?this._strokeCircumference*(100-this._value)/100:this._fallbackAnimation&&"indeterminate"===this.mode?.2*this._strokeCircumference:null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_circleStrokeWidth",{get:function(){return this.strokeWidth/this._elementSize*100},enumerable:!0,configurable:!0}),n.prototype._attachStyleNode=function(){var t=n.styleTag;t||(t=this._document.createElement("style"),this._document.head.appendChild(t),n.styleTag=t),t&&t.sheet&&t.sheet.insertRule(this._getAnimationText(),0),n.diameters.add(this.diameter)},n.prototype._getAnimationText=function(){return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n    0%      { stroke-dashoffset: START_VALUE;  transform: rotate(0); }\n    12.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(0); }\n    12.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(72.5deg); }\n    25%     { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(72.5deg); }\n\n    25.0001%   { stroke-dashoffset: START_VALUE;  transform: rotate(270deg); }\n    37.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(270deg); }\n    37.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(161.5deg); }\n    50%     { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(161.5deg); }\n\n    50.0001%  { stroke-dashoffset: START_VALUE;  transform: rotate(180deg); }\n    62.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(180deg); }\n    62.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(251.5deg); }\n    75%     { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(251.5deg); }\n\n    75.0001%  { stroke-dashoffset: START_VALUE;  transform: rotate(90deg); }\n    87.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(90deg); }\n    87.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(341.5deg); }\n    100%    { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(341.5deg); }\n  }\n".replace(/START_VALUE/g,""+.95*this._strokeCircumference).replace(/END_VALUE/g,""+.2*this._strokeCircumference).replace(/DIAMETER/g,""+this.diameter)},n.prototype._updateElementSize=function(){this._elementSize=this._diameter+Math.max(this.strokeWidth-10,0)},n.diameters=new Set([To]),n.styleTag=null,n.decorators=[{type:e.Component,args:[{selector:"mat-progress-spinner",exportAs:"matProgressSpinner",host:{role:"progressbar",class:"mat-progress-spinner","[style.width.px]":"_elementSize","[style.height.px]":"_elementSize","[attr.aria-valuemin]":'mode === "determinate" ? 0 : null',"[attr.aria-valuemax]":'mode === "determinate" ? 100 : null',"[attr.aria-valuenow]":"value","[attr.mode]":"mode"},inputs:["color"],template:'<svg [style.width.px]="_elementSize" [style.height.px]="_elementSize" [attr.viewBox]="_viewBox" preserveAspectRatio="xMidYMid meet" focusable="false"><circle cx="50%" cy="50%" [attr.r]="_circleRadius" [style.animation-name]="\'mat-progress-spinner-stroke-rotate-\' + diameter" [style.stroke-dashoffset.px]="_strokeDashOffset" [style.stroke-dasharray.px]="_strokeCircumference" [style.stroke-width.%]="_circleStrokeWidth"></circle></svg>',styles:[".mat-progress-spinner{display:block;position:relative}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{animation:mat-progress-spinner-linear-rotate 2s linear infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4s;animation-timing-function:cubic-bezier(.35,0,.25,1);animation-iteration-count:infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{animation:mat-progress-spinner-stroke-rotate-fallback 10s cubic-bezier(.87,.03,.33,1) infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.60617px;transform:rotate(0)}12.5%{stroke-dashoffset:56.54867px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.60617px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.54867px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.60617px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.54867px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.60617px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.54867px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}"],changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:l.Platform},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[s.DOCUMENT]}]}]},n.propDecorators={diameter:[{type:e.Input}],strokeWidth:[{type:e.Input}],mode:[{type:e.Input}],value:[{type:e.Input}]},n}(Io),No=function(t){function n(e,n,r){var i=t.call(this,e,n,r)||this;return i.mode="indeterminate",i}return Y(n,t),n.decorators=[{type:e.Component,args:[{selector:"mat-spinner",host:{role:"progressbar",mode:"indeterminate",class:"mat-spinner mat-progress-spinner","[style.width.px]":"_elementSize","[style.height.px]":"_elementSize"},inputs:["color"],template:'<svg [style.width.px]="_elementSize" [style.height.px]="_elementSize" [attr.viewBox]="_viewBox" preserveAspectRatio="xMidYMid meet" focusable="false"><circle cx="50%" cy="50%" [attr.r]="_circleRadius" [style.animation-name]="\'mat-progress-spinner-stroke-rotate-\' + diameter" [style.stroke-dashoffset.px]="_strokeDashOffset" [style.stroke-dasharray.px]="_strokeCircumference" [style.stroke-width.%]="_circleStrokeWidth"></circle></svg>',styles:[".mat-progress-spinner{display:block;position:relative}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{animation:mat-progress-spinner-linear-rotate 2s linear infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4s;animation-timing-function:cubic-bezier(.35,0,.25,1);animation-iteration-count:infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{animation:mat-progress-spinner-stroke-rotate-fallback 10s cubic-bezier(.87,.03,.33,1) infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.60617px;transform:rotate(0)}12.5%{stroke-dashoffset:56.54867px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.60617px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.54867px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.60617px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.54867px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.60617px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.54867px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}"],changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:l.Platform},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[s.DOCUMENT]}]}]},n}(Ro),Lo=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[Z,l.PlatformModule],exports:[Ro,No,Z],declarations:[Ro,No]}]}],t.ctorParameters=function(){return[]},t}(),jo=0,Fo={provide:v.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return Ho}),multi:!0},Vo=function(t,e){this.source=t,this.value=e},Bo=function(){},Uo=J(Bo),Ho=function(t){function n(n){var r=t.call(this)||this;return r._changeDetector=n,r._value=null,r._name="mat-radio-group-"+jo++,r._selected=null,r._isInitialized=!1,r._labelPosition="after",r._disabled=!1,r._required=!1,r._controlValueAccessorChangeFn=function(){},r.onTouched=function(){},r.change=new e.EventEmitter,r}return Y(n,t),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},set:function(t){this._name=t,this._updateRadioButtonNames()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"align",{get:function(){return"after"==this.labelPosition?"start":"end"},set:function(t){this.labelPosition="start"==t?"after":"before"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"labelPosition",{get:function(){return this._labelPosition},set:function(t){this._labelPosition="before"==t?"before":"after",this._markRadiosForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(t){this._value!=t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())},enumerable:!0,configurable:!0}),n.prototype._checkSelectedRadioButton=function(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)},Object.defineProperty(n.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=r.coerceBooleanProperty(t),this._markRadiosForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(t){this._required=r.coerceBooleanProperty(t),this._markRadiosForCheck()},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){this._isInitialized=!0},n.prototype._touch=function(){this.onTouched&&this.onTouched()},n.prototype._updateRadioButtonNames=function(){var t=this;this._radios&&this._radios.forEach(function(e){e.name=t.name})},n.prototype._updateSelectedRadioFromValue=function(){var t=this,e=null!=this._selected&&this._selected.value==this._value;null==this._radios||e||(this._selected=null,this._radios.forEach(function(e){e.checked=t.value==e.value,e.checked&&(t._selected=e)}))},n.prototype._emitChangeEvent=function(){this._isInitialized&&this.change.emit(new Vo(this._selected,this._value))},n.prototype._markRadiosForCheck=function(){this._radios&&this._radios.forEach(function(t){return t._markForCheck()})},n.prototype.writeValue=function(t){this.value=t,this._changeDetector.markForCheck()},n.prototype.registerOnChange=function(t){this._controlValueAccessorChangeFn=t},n.prototype.registerOnTouched=function(t){this.onTouched=t},n.prototype.setDisabledState=function(t){this.disabled=t,this._changeDetector.markForCheck()},n.decorators=[{type:e.Directive,args:[{selector:"mat-radio-group",exportAs:"matRadioGroup",providers:[Fo],host:{role:"radiogroup",class:"mat-radio-group"},inputs:["disabled"]}]}],n.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},n.propDecorators={change:[{type:e.Output}],_radios:[{type:e.ContentChildren,args:[e.forwardRef(function(){return Wo}),{descendants:!0}]}],name:[{type:e.Input}],align:[{type:e.Input}],labelPosition:[{type:e.Input}],value:[{type:e.Input}],selected:[{type:e.Input}],disabled:[{type:e.Input}],required:[{type:e.Input}]},n}(Uo),zo=function(t){this._elementRef=t},Go=tt(et(nt(zo)),"accent"),Wo=function(t){function n(n,r,i,o,a){var s=t.call(this,r)||this;return s._changeDetector=i,s._focusMonitor=o,s._radioDispatcher=a,s._uniqueId="mat-radio-"+ ++jo,s.id=s._uniqueId,s.change=new e.EventEmitter,s._checked=!1,s._value=null,s._removeUniqueSelectionListener=function(){},s.radioGroup=n,s._removeUniqueSelectionListener=a.listen(function(t,e){t!=s.id&&e==s.name&&(s.checked=!1)}),s}return Y(n,t),Object.defineProperty(n.prototype,"checked",{get:function(){return this._checked},set:function(t){var e=r.coerceBooleanProperty(t);this._checked!=e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!=this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value==this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(t){this._value!=t&&(this._value=t,null!=this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value==t),this.checked&&(this.radioGroup.selected=this)))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"align",{get:function(){return"after"==this.labelPosition?"start":"end"},set:function(t){this.labelPosition="start"==t?"after":"before"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"labelPosition",{get:function(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"},set:function(t){this._labelPosition=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled||null!=this.radioGroup&&this.radioGroup.disabled},set:function(t){this._disabled=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required||this.radioGroup&&this.radioGroup.required},set:function(t){this._required=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputId",{get:function(){return(this.id||this._uniqueId)+"-input"},enumerable:!0,configurable:!0}),n.prototype.focus=function(){this._focusMonitor.focusVia(this._inputElement.nativeElement,"keyboard")},n.prototype._markForCheck=function(){this._changeDetector.markForCheck()},n.prototype.ngOnInit=function(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.name=this.radioGroup.name)},n.prototype.ngAfterViewInit=function(){var t=this;this._focusMonitor.monitor(this._inputElement.nativeElement).subscribe(function(e){return t._onInputFocusChange(e)})},n.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._inputElement.nativeElement),this._removeUniqueSelectionListener()},n.prototype._emitChangeEvent=function(){this.change.emit(new Vo(this,this._value))},n.prototype._isRippleDisabled=function(){return this.disableRipple||this.disabled},n.prototype._onInputClick=function(t){t.stopPropagation()},n.prototype._onInputChange=function(t){t.stopPropagation();var e=this.radioGroup&&this.value!=this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),this.radioGroup._touch(),e&&this.radioGroup._emitChangeEvent())},n.prototype._onInputFocusChange=function(t){this._focusRipple||"keyboard"!==t?t||(this.radioGroup&&this.radioGroup._touch(),this._focusRipple&&(this._focusRipple.fadeOut(),this._focusRipple=null)):this._focusRipple=this._ripple.launch(0,0,{persistent:!0})},n.decorators=[{type:e.Component,args:[{selector:"mat-radio-button",template:'<label [attr.for]="inputId" class="mat-radio-label" #label><div class="mat-radio-container"><div class="mat-radio-outer-circle"></div><div class="mat-radio-inner-circle"></div><div mat-ripple class="mat-radio-ripple" [matRippleTrigger]="label" [matRippleDisabled]="_isRippleDisabled()" [matRippleCentered]="true" [matRippleRadius]="23" [matRippleAnimation]="{enterDuration: 150}"></div></div><input #input class="mat-radio-input cdk-visually-hidden" type="radio" [id]="inputId" [checked]="checked" [disabled]="disabled" [tabIndex]="tabIndex" [attr.name]="name" [required]="required" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledby" [attr.aria-describedby]="ariaDescribedby" (change)="_onInputChange($event)" (click)="_onInputClick($event)"><div class="mat-radio-label-content" [class.mat-radio-label-before]="labelPosition == \'before\'"><span style="display:none">&nbsp;</span><ng-content></ng-content></div></label>',styles:[".mat-radio-button{display:inline-block}.mat-radio-label{cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(.001)}.mat-radio-checked .mat-radio-inner-circle{transform:scale(.5)}.mat-radio-label-content{display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-ripple{position:absolute;left:calc(50% - 25px);top:calc(50% - 25px);height:50px;width:50px;z-index:1;pointer-events:none}"],inputs:["color","disableRipple","tabIndex"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,exportAs:"matRadioButton",host:{class:"mat-radio-button","[class.mat-radio-checked]":"checked","[class.mat-radio-disabled]":"disabled","[attr.id]":"id","(focus)":"_inputElement.nativeElement.focus()"},changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:Ho,decorators:[{type:e.Optional}]},{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:u.FocusMonitor},{type:E.UniqueSelectionDispatcher}]},n.propDecorators={id:[{type:e.Input}],name:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],ariaDescribedby:[{type:e.Input,args:["aria-describedby"]}],checked:[{type:e.Input}],value:[{type:e.Input}],align:[{type:e.Input}],labelPosition:[{type:e.Input}],disabled:[{type:e.Input}],required:[{type:e.Input}],change:[{type:e.Output}],_ripple:[{type:e.ViewChild,args:[Mt]}],_inputElement:[{type:e.ViewChild,args:["input"]}]},n}(Go),qo=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,It,Z,u.A11yModule],exports:[Ho,Wo,Z],providers:[E.UNIQUE_SELECTION_DISPATCHER_PROVIDER],declarations:[Ho,Wo]}]}],t.ctorParameters=function(){return[]},t}(),Yo={transformDrawer:w.trigger("transform",[w.state("open, open-instant",w.style({transform:"translate3d(0, 0, 0)",visibility:"visible"})),w.state("void",w.style({visibility:"hidden"})),w.transition("void => open-instant",w.animate("0ms")),w.transition("void <=> open, open-instant => void",w.animate("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])};function $o(t){throw Error("A drawer was already declared for 'position=\""+t+"\"'")}var Ko=function(t,e){this.type=t,this.animationFinished=e},Qo=new e.InjectionToken("MAT_DRAWER_DEFAULT_AUTOSIZE"),Xo=function(){function t(t,e){this._changeDetectorRef=t,this._container=e,this._margins={left:null,right:null}}return t.prototype.ngAfterContentInit=function(){var t=this;this._container._contentMargins.subscribe(function(e){t._margins=e,t._changeDetectorRef.markForCheck()})},t.decorators=[{type:e.Component,args:[{selector:"mat-drawer-content",template:"<ng-content></ng-content>",host:{class:"mat-drawer-content","[style.margin-left.px]":"_margins.left","[style.margin-right.px]":"_margins.right"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:Jo,decorators:[{type:e.Inject,args:[e.forwardRef(function(){return Jo})]}]}]},t}(),Zo=function(){function t(t,n,r,o,a){var s=this;this._elementRef=t,this._focusTrapFactory=n,this._focusMonitor=r,this._platform=o,this._doc=a,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._animationStarted=new e.EventEmitter,this._animationState="void",this.openedChange=new e.EventEmitter(!0),this.onOpen=this._openedStream,this.onClose=this._closedStream,this.onPositionChanged=new e.EventEmitter,this.onAlignChanged=new e.EventEmitter,this._modeChanged=new i.Subject,this._opened=!1,this.openedChange.subscribe(function(t){t?(s._doc&&(s._elementFocusedBeforeDrawerWasOpened=s._doc.activeElement),s._isFocusTrapEnabled&&s._focusTrap&&s._trapFocus()):s._restoreFocus()})}return Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(t){(t="end"===t?"end":"start")!=this._position&&(this._position=t,this.onAlignChanged.emit(),this.onPositionChanged.emit())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"align",{get:function(){return this.position},set:function(t){this.position=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return this._mode},set:function(t){this._mode=t,this._modeChanged.next()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableClose",{get:function(){return this._disableClose},set:function(t){this._disableClose=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_openedStream",{get:function(){return this.openedChange.pipe(h.filter(function(t){return t}),I.map(function(){}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"openedStart",{get:function(){return this._animationStarted.pipe(h.filter(function(t){return t.fromState!==t.toState&&0===t.toState.indexOf("open")}),I.map(function(){}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_closedStream",{get:function(){return this.openedChange.pipe(h.filter(function(t){return!t}),I.map(function(){}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"closedStart",{get:function(){return this._animationStarted.pipe(h.filter(function(t){return t.fromState!==t.toState&&"void"===t.toState}),I.map(function(){}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isFocusTrapEnabled",{get:function(){return this.opened&&"side"!==this.mode},enumerable:!0,configurable:!0}),t.prototype._trapFocus=function(){var t=this;this._focusTrap.focusInitialElementWhenReady().then(function(e){e||"function"!=typeof t._elementRef.nativeElement.focus||t._elementRef.nativeElement.focus()})},t.prototype._restoreFocus=function(){var t=this._doc&&this._doc.activeElement;t&&this._elementRef.nativeElement.contains(t)&&(this._elementFocusedBeforeDrawerWasOpened instanceof HTMLElement?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,this._openedVia):this._elementRef.nativeElement.blur()),this._elementFocusedBeforeDrawerWasOpened=null,this._openedVia=null},t.prototype.ngAfterContentInit=function(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._focusTrap.enabled=this._isFocusTrapEnabled},t.prototype.ngAfterContentChecked=function(){this._platform.isBrowser&&(this._enableAnimations=!0)},t.prototype.ngOnDestroy=function(){this._focusTrap&&this._focusTrap.destroy()},Object.defineProperty(t.prototype,"opened",{get:function(){return this._opened},set:function(t){this.toggle(r.coerceBooleanProperty(t))},enumerable:!0,configurable:!0}),t.prototype.open=function(t){return this.toggle(!0,t)},t.prototype.close=function(){return this.toggle(!1)},t.prototype.toggle=function(t,e){var n=this;return void 0===t&&(t=!this.opened),void 0===e&&(e="program"),this._opened=t,t?(this._animationState=this._enableAnimations?"open":"open-instant",this._openedVia=e):(this._animationState="void",this._restoreFocus()),this._focusTrap&&(this._focusTrap.enabled=this._isFocusTrapEnabled),new Promise(function(t){n.openedChange.pipe(f.take(1)).subscribe(function(e){t(new Ko(e?"open":"close",!0))})})},t.prototype.handleKeydown=function(t){t.keyCode!==c.ESCAPE||this.disableClose||(this.close(),t.stopPropagation())},t.prototype._onAnimationStart=function(t){this._animationStarted.emit(t)},t.prototype._onAnimationEnd=function(t){var e=t.fromState,n=t.toState;(0===n.indexOf("open")&&"void"===e||"void"===n&&0===e.indexOf("open"))&&this.openedChange.emit(this._opened)},Object.defineProperty(t.prototype,"_width",{get:function(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0},enumerable:!0,configurable:!0}),t.decorators=[{type:e.Component,args:[{selector:"mat-drawer",exportAs:"matDrawer",template:"<ng-content></ng-content>",animations:[Yo.transformDrawer],host:{class:"mat-drawer","[@transform]":"_animationState","(@transform.start)":"_onAnimationStart($event)","(@transform.done)":"_onAnimationEnd($event)","(keydown)":"handleKeydown($event)","[attr.align]":"null","[class.mat-drawer-end]":'position === "end"',"[class.mat-drawer-over]":'mode === "over"',"[class.mat-drawer-push]":'mode === "push"',"[class.mat-drawer-side]":'mode === "side"',tabIndex:"-1"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:u.FocusTrapFactory},{type:u.FocusMonitor},{type:l.Platform},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[s.DOCUMENT]}]}]},t.propDecorators={position:[{type:e.Input}],align:[{type:e.Input}],mode:[{type:e.Input}],disableClose:[{type:e.Input}],openedChange:[{type:e.Output}],_openedStream:[{type:e.Output,args:["opened"]}],openedStart:[{type:e.Output}],_closedStream:[{type:e.Output,args:["closed"]}],closedStart:[{type:e.Output}],onOpen:[{type:e.Output,args:["open"]}],onClose:[{type:e.Output,args:["close"]}],onPositionChanged:[{type:e.Output,args:["positionChanged"]}],onAlignChanged:[{type:e.Output,args:["align-changed"]}],opened:[{type:e.Input}]},t}(),Jo=function(){function t(t,n,r,o,a){void 0===a&&(a=!1);var s=this;this._dir=t,this._element=n,this._ngZone=r,this._changeDetectorRef=o,this.backdropClick=new e.EventEmitter,this._destroyed=new i.Subject,this._doCheckSubject=new i.Subject,this._contentMargins=new i.Subject,t&&t.change.pipe(A.takeUntil(this._destroyed)).subscribe(function(){s._validateDrawers(),s._updateContentMargins()}),this._autosize=a}return Object.defineProperty(t.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autosize",{get:function(){return this._autosize},set:function(t){this._autosize=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._drawers.changes.pipe(_.startWith(null)).subscribe(function(){t._validateDrawers(),t._drawers.forEach(function(e){t._watchDrawerToggle(e),t._watchDrawerPosition(e),t._watchDrawerMode(e)}),(!t._drawers.length||t._isDrawerOpen(t._start)||t._isDrawerOpen(t._end))&&t._updateContentMargins(),t._changeDetectorRef.markForCheck()}),this._doCheckSubject.pipe(B.debounceTime(10),A.takeUntil(this._destroyed)).subscribe(function(){return t._updateContentMargins()})},t.prototype.ngOnDestroy=function(){this._doCheckSubject.complete(),this._destroyed.next(),this._destroyed.complete()},t.prototype.open=function(){this._drawers.forEach(function(t){return t.open()})},t.prototype.close=function(){this._drawers.forEach(function(t){return t.close()})},t.prototype.ngDoCheck=function(){var t=this;this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(function(){return t._doCheckSubject.next()})},t.prototype._watchDrawerToggle=function(t){var e=this;t._animationStarted.pipe(A.takeUntil(this._drawers.changes),h.filter(function(t){return t.fromState!==t.toState})).subscribe(function(t){"open-instant"!==t.toState&&e._element.nativeElement.classList.add("mat-drawer-transition"),e._updateContentMargins(),e._changeDetectorRef.markForCheck()}),"side"!==t.mode&&t.openedChange.pipe(A.takeUntil(this._drawers.changes)).subscribe(function(){return e._setContainerClass(t.opened)})},t.prototype._watchDrawerPosition=function(t){var e=this;t&&t.onPositionChanged.pipe(A.takeUntil(this._drawers.changes)).subscribe(function(){e._ngZone.onMicrotaskEmpty.asObservable().pipe(f.take(1)).subscribe(function(){e._validateDrawers()})})},t.prototype._watchDrawerMode=function(t){var e=this;t&&t._modeChanged.pipe(A.takeUntil(x.merge(this._drawers.changes,this._destroyed))).subscribe(function(){e._updateContentMargins(),e._changeDetectorRef.markForCheck()})},t.prototype._setContainerClass=function(t){t?this._element.nativeElement.classList.add("mat-drawer-opened"):this._element.nativeElement.classList.remove("mat-drawer-opened")},t.prototype._validateDrawers=function(){var t=this;this._start=this._end=null,this._drawers.forEach(function(e){"end"==e.position?(null!=t._end&&$o("end"),t._end=e):(null!=t._start&&$o("start"),t._start=e)}),this._right=this._left=null,this._dir&&"ltr"!=this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)},t.prototype._isPushed=function(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode},t.prototype._onBackdropClicked=function(){this.backdropClick.emit(),this._closeModalDrawer()},t.prototype._closeModalDrawer=function(){[this._start,this._end].filter(function(t){return t&&!t.disableClose&&"side"!==t.mode}).forEach(function(t){return t.close()})},t.prototype._isShowingBackdrop=function(){return this._isDrawerOpen(this._start)&&"side"!=this._start.mode||this._isDrawerOpen(this._end)&&"side"!=this._end.mode},t.prototype._isDrawerOpen=function(t){return null!=t&&t.opened},t.prototype._updateContentMargins=function(){var t=this,e=0,n=0;if(this._left&&this._left.opened)if("side"==this._left.mode)e+=this._left._width;else if("push"==this._left.mode){var r=this._left._width;e+=r,n-=r}if(this._right&&this._right.opened)if("side"==this._right.mode)n+=this._right._width;else if("push"==this._right.mode){r=this._right._width;n+=r,e-=r}this._ngZone.run(function(){return t._contentMargins.next({left:e,right:n})})},t.decorators=[{type:e.Component,args:[{selector:"mat-drawer-container",exportAs:"matDrawerContainer",template:'<div class="mat-drawer-backdrop" (click)="_onBackdropClicked()" [class.mat-drawer-shown]="_isShowingBackdrop()"></div><ng-content select="mat-drawer"></ng-content><ng-content select="mat-drawer-content"></ng-content><mat-drawer-content *ngIf="!_content" cdkScrollable><ng-content></ng-content></mat-drawer-content>',styles:[".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-opened{overflow:hidden}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:background-color,visibility}@media screen and (-ms-high-contrast:active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%,0,0)}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer{transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%,0,0)}.mat-drawer:not(.mat-drawer-side){box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.mat-sidenav-fixed{position:fixed}"],host:{class:"mat-drawer-container"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[{type:n.Directionality,decorators:[{type:e.Optional}]},{type:e.ElementRef},{type:e.NgZone},{type:e.ChangeDetectorRef},{type:void 0,decorators:[{type:e.Inject,args:[Qo]}]}]},t.propDecorators={_drawers:[{type:e.ContentChildren,args:[Zo]}],_content:[{type:e.ContentChild,args:[Xo]}],autosize:[{type:e.Input}],backdropClick:[{type:e.Output}],scrollable:[{type:e.ViewChild,args:[V.CdkScrollable]}]},t}(),ta=function(t){function n(e,n){return t.call(this,e,n)||this}return Y(n,t),n.decorators=[{type:e.Component,args:[{selector:"mat-sidenav-content",template:"<ng-content></ng-content>",host:{class:"mat-drawer-content mat-sidenav-content","[style.margin-left.px]":"_margins.left","[style.margin-right.px]":"_margins.right"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],n.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:na,decorators:[{type:e.Inject,args:[e.forwardRef(function(){return na})]}]}]},n}(Xo),ea=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._fixedInViewport=!1,e._fixedTopGap=0,e._fixedBottomGap=0,e}return Y(n,t),Object.defineProperty(n.prototype,"fixedInViewport",{get:function(){return this._fixedInViewport},set:function(t){this._fixedInViewport=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fixedTopGap",{get:function(){return this._fixedTopGap},set:function(t){this._fixedTopGap=r.coerceNumberProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fixedBottomGap",{get:function(){return this._fixedBottomGap},set:function(t){this._fixedBottomGap=r.coerceNumberProperty(t)},enumerable:!0,configurable:!0}),n.decorators=[{type:e.Component,args:[{selector:"mat-sidenav",exportAs:"matSidenav",template:"<ng-content></ng-content>",animations:[Yo.transformDrawer],host:{class:"mat-drawer mat-sidenav",tabIndex:"-1","[@transform]":"_animationState","(@transform.start)":"_onAnimationStart($event)","(@transform.done)":"_onAnimationEnd($event)","(keydown)":"handleKeydown($event)","[attr.align]":"null","[class.mat-drawer-end]":'position === "end"',"[class.mat-drawer-over]":'mode === "over"',"[class.mat-drawer-push]":'mode === "push"',"[class.mat-drawer-side]":'mode === "side"',"[class.mat-sidenav-fixed]":"fixedInViewport","[style.top.px]":"fixedInViewport ? fixedTopGap : null","[style.bottom.px]":"fixedInViewport ? fixedBottomGap : null"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],n.ctorParameters=function(){return[]},n.propDecorators={fixedInViewport:[{type:e.Input}],fixedTopGap:[{type:e.Input}],fixedBottomGap:[{type:e.Input}]},n}(Zo),na=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Component,args:[{selector:"mat-sidenav-container",exportAs:"matSidenavContainer",template:'<div class="mat-drawer-backdrop" (click)="_onBackdropClicked()" [class.mat-drawer-shown]="_isShowingBackdrop()"></div><ng-content select="mat-sidenav"></ng-content><ng-content select="mat-sidenav-content"></ng-content><mat-sidenav-content *ngIf="!_content" cdkScrollable><ng-content></ng-content></mat-sidenav-content>',styles:[".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-opened{overflow:hidden}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:background-color,visibility}@media screen and (-ms-high-contrast:active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%,0,0)}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer{transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%,0,0)}.mat-drawer:not(.mat-drawer-side){box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.mat-sidenav-fixed{position:fixed}"],host:{class:"mat-drawer-container mat-sidenav-container"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],n.ctorParameters=function(){return[]},n.propDecorators={_drawers:[{type:e.ContentChildren,args:[ea]}],_content:[{type:e.ContentChild,args:[ta]}]},n}(Jo),ra=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,Z,u.A11yModule,p.OverlayModule,V.ScrollDispatchModule,l.PlatformModule],exports:[Z,Zo,Jo,Xo,ea,na,ta],declarations:[Zo,Jo,Xo,ea,na,ta],providers:[{provide:Qo,useValue:!1}]}]}],t.ctorParameters=function(){return[]},t}(),ia=0,oa={provide:v.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return ca}),multi:!0},aa=function(t,e){this.source=t,this.checked=e},sa=function(t){this._elementRef=t},la=nt(tt(et(J(sa)),"accent")),ca=function(t){function n(n,r,i,o,a){var s=t.call(this,n)||this;return s._platform=r,s._focusMonitor=i,s._changeDetectorRef=o,s.onChange=function(t){},s.onTouched=function(){},s._uniqueId="mat-slide-toggle-"+ ++ia,s._required=!1,s._checked=!1,s.name=null,s.id=s._uniqueId,s.labelPosition="after",s.ariaLabel=null,s.ariaLabelledby=null,s.change=new e.EventEmitter,s.tabIndex=parseInt(a)||0,s}return Y(n,t),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(t){this._required=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"checked",{get:function(){return this._checked},set:function(t){this._checked=r.coerceBooleanProperty(t),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputId",{get:function(){return(this.id||this._uniqueId)+"-input"},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){var t=this;this._slideRenderer=new ua(this._elementRef,this._platform),this._focusMonitor.monitor(this._inputElement.nativeElement).subscribe(function(e){return t._onInputFocusChange(e)})},n.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._inputElement.nativeElement)},n.prototype._onChangeEvent=function(t){t.stopPropagation(),this._slideRenderer.dragging?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())},n.prototype._onInputClick=function(t){t.stopPropagation()},n.prototype.writeValue=function(t){this.checked=!!t},n.prototype.registerOnChange=function(t){this.onChange=t},n.prototype.registerOnTouched=function(t){this.onTouched=t},n.prototype.setDisabledState=function(t){this.disabled=t,this._changeDetectorRef.markForCheck()},n.prototype.focus=function(){this._focusMonitor.focusVia(this._inputElement.nativeElement,"keyboard")},n.prototype.toggle=function(){this.checked=!this.checked},n.prototype._onInputFocusChange=function(t){this._focusRipple||"keyboard"!==t?t||(this.onTouched(),this._focusRipple&&(this._focusRipple.fadeOut(),this._focusRipple=null)):this._focusRipple=this._ripple.launch(0,0,{persistent:!0})},n.prototype._emitChangeEvent=function(){this.onChange(this.checked),this.change.emit(new aa(this,this.checked))},n.prototype._onDragStart=function(){this.disabled||this._slideRenderer.startThumbDrag(this.checked)},n.prototype._onDrag=function(t){this._slideRenderer.dragging&&this._slideRenderer.updateThumbPosition(t.deltaX)},n.prototype._onDragEnd=function(){var t=this;if(this._slideRenderer.dragging){var e=this._slideRenderer.dragPercentage>50;e!==this.checked&&(this.checked=e,this._emitChangeEvent()),setTimeout(function(){return t._slideRenderer.stopThumbDrag()})}},n.prototype._onLabelTextChange=function(){this._changeDetectorRef.markForCheck()},n.decorators=[{type:e.Component,args:[{selector:"mat-slide-toggle",exportAs:"matSlideToggle",host:{class:"mat-slide-toggle","[id]":"id","[class.mat-checked]":"checked","[class.mat-disabled]":"disabled","[class.mat-slide-toggle-label-before]":'labelPosition == "before"'},template:'<label class="mat-slide-toggle-label" #label><div class="mat-slide-toggle-bar" [class.mat-slide-toggle-bar-no-side-margin]="!labelContent.textContent || !labelContent.textContent.trim()"><input #input class="mat-slide-toggle-input cdk-visually-hidden" type="checkbox" [id]="inputId" [required]="required" [tabIndex]="tabIndex" [checked]="checked" [disabled]="disabled" [attr.name]="name" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledby" (change)="_onChangeEvent($event)" (click)="_onInputClick($event)"><div class="mat-slide-toggle-thumb-container" (slidestart)="_onDragStart()" (slide)="_onDrag($event)" (slideend)="_onDragEnd()"><div class="mat-slide-toggle-thumb"></div><div class="mat-slide-toggle-ripple" mat-ripple [matRippleTrigger]="label" [matRippleDisabled]="disableRipple || disabled" [matRippleCentered]="true" [matRippleRadius]="23" [matRippleAnimation]="{enterDuration: 150}"></div></div></div><span class="mat-slide-toggle-content" #labelContent (cdkObserveContent)="_onLabelTextChange()"><ng-content></ng-content></span></label>',styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:0}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px,0,0)}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}.mat-slide-toggle-bar,[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-right:8px;margin-left:0}.mat-slide-toggle-label-before .mat-slide-toggle-bar,[dir=rtl] .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0,0,0);transition:all 80ms linear;transition-property:transform;cursor:-webkit-grab;cursor:grab}.mat-slide-toggle-thumb-container.mat-dragging,.mat-slide-toggle-thumb-container:active{cursor:-webkit-grabbing;cursor:grabbing;transition-duration:0s}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){.mat-slide-toggle-thumb{background:#fff;border:solid 1px #000}}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}@media screen and (-ms-high-contrast:active){.mat-slide-toggle-bar{background:#fff}}.mat-slide-toggle-input{bottom:0;left:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}.mat-slide-toggle-ripple{position:absolute;top:calc(50% - 23px);left:calc(50% - 23px);height:46px;width:46px;z-index:1;pointer-events:none}"],providers:[oa],inputs:["disabled","disableRipple","color","tabIndex"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:l.Platform},{type:u.FocusMonitor},{type:e.ChangeDetectorRef},{type:void 0,decorators:[{type:e.Attribute,args:["tabindex"]}]}]},n.propDecorators={name:[{type:e.Input}],id:[{type:e.Input}],labelPosition:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],required:[{type:e.Input}],checked:[{type:e.Input}],change:[{type:e.Output}],_inputElement:[{type:e.ViewChild,args:["input"]}],_ripple:[{type:e.ViewChild,args:[Mt]}]},n}(la),ua=function(){function t(t,e){this.dragging=!1,e.isBrowser&&(this._thumbEl=t.nativeElement.querySelector(".mat-slide-toggle-thumb-container"),this._thumbBarEl=t.nativeElement.querySelector(".mat-slide-toggle-bar"))}return t.prototype.startThumbDrag=function(t){this.dragging||(this._thumbBarWidth=this._thumbBarEl.clientWidth-this._thumbEl.clientWidth,this._thumbEl.classList.add("mat-dragging"),this._previousChecked=t,this.dragging=!0)},t.prototype.stopThumbDrag=function(){return!!this.dragging&&(this.dragging=!1,this._thumbEl.classList.remove("mat-dragging"),this._thumbEl.style.transform="",this.dragPercentage>50)},t.prototype.updateThumbPosition=function(t){this.dragPercentage=this._getDragPercentage(t);var e=this.dragPercentage/100*this._thumbBarWidth;this._thumbEl.style.transform="translate3d("+e+"px, 0, 0)"},t.prototype._getDragPercentage=function(t){var e=t/this._thumbBarWidth*100;return this._previousChecked&&(e+=100),Math.max(0,Math.min(e,100))},t}(),pa=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[It,Z,l.PlatformModule,k.ObserversModule,u.A11yModule],exports:[ca,Z],declarations:[ca],providers:[{provide:a.HAMMER_GESTURE_CONFIG,useClass:Ct}]}]}],t.ctorParameters=function(){return[]},t}(),da={provide:v.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return ga}),multi:!0},ha=function(){},fa=function(t){this._elementRef=t},ma=nt(tt(J(fa),"accent")),ga=function(t){function i(n,r,i,o,a){var s=t.call(this,n)||this;return s._focusMonitor=r,s._changeDetectorRef=i,s._dir=o,s._invert=!1,s._max=100,s._min=0,s._step=1,s._thumbLabel=!1,s._tickInterval=0,s._value=null,s._vertical=!1,s.change=new e.EventEmitter,s.input=new e.EventEmitter,s.onTouched=function(){},s._percent=0,s._isSliding=!1,s._isActive=!1,s._tickIntervalPercent=0,s._sliderDimensions=null,s._controlValueAccessorChangeFn=function(){},s._dirChangeSubscription=O.Subscription.EMPTY,s.tabIndex=parseInt(a)||0,s}return Y(i,t),Object.defineProperty(i.prototype,"invert",{get:function(){return this._invert},set:function(t){this._invert=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"max",{get:function(){return this._max},set:function(t){this._max=r.coerceNumberProperty(t,this._max),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"min",{get:function(){return this._min},set:function(t){this._min=r.coerceNumberProperty(t,this._min),null===this._value&&(this.value=this._min),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"step",{get:function(){return this._step},set:function(t){this._step=r.coerceNumberProperty(t,this._step),this._step%1!=0&&(this._roundLabelTo=this._step.toString().split(".").pop().length),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"thumbLabel",{get:function(){return this._thumbLabel},set:function(t){this._thumbLabel=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_thumbLabelDeprecated",{get:function(){return this._thumbLabel},set:function(t){this._thumbLabel=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tickInterval",{get:function(){return this._tickInterval},set:function(t){this._tickInterval="auto"===t?"auto":"number"==typeof t||"string"==typeof t?r.coerceNumberProperty(t,this._tickInterval):0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_tickIntervalDeprecated",{get:function(){return this.tickInterval},set:function(t){this.tickInterval=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){return null===this._value&&(this.value=this._min),this._value},set:function(t){t!==this._value&&(this._value=r.coerceNumberProperty(t),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"vertical",{get:function(){return this._vertical},set:function(t){this._vertical=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"displayValue",{get:function(){return this._roundLabelTo&&this.value&&this.value%1!=0?this.value.toFixed(this._roundLabelTo):this.value||0},enumerable:!0,configurable:!0}),i.prototype.focus=function(){this._focusHostElement()},i.prototype.blur=function(){this._blurHostElement()},Object.defineProperty(i.prototype,"percent",{get:function(){return this._clamp(this._percent)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_invertAxis",{get:function(){return this.vertical?!this.invert:this.invert},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_isMinValue",{get:function(){return 0===this.percent},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_thumbGap",{get:function(){return this.disabled?7:this._isMinValue&&!this.thumbLabel?this._isActive?10:7:0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_trackBackgroundStyles",{get:function(){var t=this.vertical?"Y":"X";return{transform:"translate"+t+"("+(this._invertMouseCoords?"-":"")+this._thumbGap+"px) scale"+t+"("+(1-this.percent)+")"}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_trackFillStyles",{get:function(){var t=this.vertical?"Y":"X";return{transform:"translate"+t+"("+(this._invertMouseCoords?"":"-")+this._thumbGap+"px) scale"+t+"("+this.percent+")"}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_ticksContainerStyles",{get:function(){return{transform:"translate"+(this.vertical?"Y":"X")+"("+(this.vertical||"rtl"!=this._direction?"-":"")+this._tickIntervalPercent/2*100+"%)"}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_ticksStyles",{get:function(){var t=100*this._tickIntervalPercent,e={backgroundSize:this.vertical?"2px "+t+"%":t+"% 2px",transform:"translateZ(0) translate"+(this.vertical?"Y":"X")+"("+(this.vertical||"rtl"!=this._direction?"":"-")+t/2+"%)"+(this.vertical||"rtl"!=this._direction?"":" rotate(180deg)")};this._isMinValue&&this._thumbGap&&(e["padding"+(this.vertical?this._invertAxis?"Bottom":"Top":this._invertAxis?"Right":"Left")]=this._thumbGap+"px");return e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_thumbContainerStyles",{get:function(){return{transform:"translate"+(this.vertical?"Y":"X")+"(-"+100*(("rtl"!=this._direction||this.vertical?this._invertAxis:!this._invertAxis)?this.percent:1-this.percent)+"%)"}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_invertMouseCoords",{get:function(){return"rtl"!=this._direction||this.vertical?this._invertAxis:!this._invertAxis},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_direction",{get:function(){return this._dir&&"rtl"==this._dir.value?"rtl":"ltr"},enumerable:!0,configurable:!0}),i.prototype.ngOnInit=function(){var t=this;this._focusMonitor.monitor(this._elementRef.nativeElement,!0).subscribe(function(e){t._isActive=!!e&&"keyboard"!==e,t._changeDetectorRef.detectChanges()}),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(function(){t._changeDetectorRef.markForCheck()}))},i.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement),this._dirChangeSubscription.unsubscribe()},i.prototype._onMouseenter=function(){this.disabled||(this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent())},i.prototype._onClick=function(t){if(!this.disabled){var e=this.value;this._isSliding=!1,this._focusHostElement(),this._updateValueFromPosition({x:t.clientX,y:t.clientY}),e!=this.value&&(this._emitInputEvent(),this._emitChangeEvent())}},i.prototype._onSlide=function(t){if(!this.disabled){this._isSliding||this._onSlideStart(null),t.preventDefault();var e=this.value;this._updateValueFromPosition({x:t.center.x,y:t.center.y}),e!=this.value&&this._emitInputEvent()}},i.prototype._onSlideStart=function(t){this.disabled||this._isSliding||(this._onMouseenter(),this._isSliding=!0,this._focusHostElement(),this._valueOnSlideStart=this.value,t&&(this._updateValueFromPosition({x:t.center.x,y:t.center.y}),t.preventDefault()))},i.prototype._onSlideEnd=function(){this._isSliding=!1,this._valueOnSlideStart==this.value||this.disabled||this._emitChangeEvent(),this._valueOnSlideStart=null},i.prototype._onFocus=function(){this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent()},i.prototype._onBlur=function(){this.onTouched()},i.prototype._onKeydown=function(t){if(!this.disabled){var e=this.value;switch(t.keyCode){case c.PAGE_UP:this._increment(10);break;case c.PAGE_DOWN:this._increment(-10);break;case c.END:this.value=this.max;break;case c.HOME:this.value=this.min;break;case c.LEFT_ARROW:this._increment("rtl"==this._direction?1:-1);break;case c.UP_ARROW:this._increment(1);break;case c.RIGHT_ARROW:this._increment("rtl"==this._direction?-1:1);break;case c.DOWN_ARROW:this._increment(-1);break;default:return}e!=this.value&&(this._emitInputEvent(),this._emitChangeEvent()),this._isSliding=!0,t.preventDefault()}},i.prototype._onKeyup=function(){this._isSliding=!1},i.prototype._increment=function(t){this.value=this._clamp((this.value||0)+this.step*t,this.min,this.max)},i.prototype._updateValueFromPosition=function(t){if(this._sliderDimensions){var e=this.vertical?this._sliderDimensions.top:this._sliderDimensions.left,n=this.vertical?this._sliderDimensions.height:this._sliderDimensions.width,r=this.vertical?t.y:t.x,i=this._clamp((r-e)/n);this._invertMouseCoords&&(i=1-i);var o=this._calculateValue(i),a=Math.round((o-this.min)/this.step)*this.step+this.min;this.value=this._clamp(a,this.min,this.max)}},i.prototype._emitChangeEvent=function(){this._controlValueAccessorChangeFn(this.value),this.change.emit(this._createChangeEvent())},i.prototype._emitInputEvent=function(){this.input.emit(this._createChangeEvent())},i.prototype._updateTickIntervalPercent=function(){if(this.tickInterval&&this._sliderDimensions)if("auto"==this.tickInterval){var t=this.vertical?this._sliderDimensions.height:this._sliderDimensions.width,e=t*this.step/(this.max-this.min),n=Math.ceil(30/e)*this.step;this._tickIntervalPercent=n/t}else this._tickIntervalPercent=this.tickInterval*this.step/(this.max-this.min)},i.prototype._createChangeEvent=function(t){void 0===t&&(t=this.value);var e=new ha;return e.source=this,e.value=t,e},i.prototype._calculatePercentage=function(t){return((t||0)-this.min)/(this.max-this.min)},i.prototype._calculateValue=function(t){return this.min+t*(this.max-this.min)},i.prototype._clamp=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=1),Math.max(e,Math.min(t,n))},i.prototype._getSliderDimensions=function(){return this._sliderWrapper?this._sliderWrapper.nativeElement.getBoundingClientRect():null},i.prototype._focusHostElement=function(){this._elementRef.nativeElement.focus()},i.prototype._blurHostElement=function(){this._elementRef.nativeElement.blur()},i.prototype.writeValue=function(t){this.value=t},i.prototype.registerOnChange=function(t){this._controlValueAccessorChangeFn=t},i.prototype.registerOnTouched=function(t){this.onTouched=t},i.prototype.setDisabledState=function(t){this.disabled=t},i.decorators=[{type:e.Component,args:[{selector:"mat-slider",exportAs:"matSlider",providers:[da],host:{"(focus)":"_onFocus()","(blur)":"_onBlur()","(click)":"_onClick($event)","(keydown)":"_onKeydown($event)","(keyup)":"_onKeyup()","(mouseenter)":"_onMouseenter()","(slide)":"_onSlide($event)","(slideend)":"_onSlideEnd()","(slidestart)":"_onSlideStart($event)",class:"mat-slider",role:"slider","[tabIndex]":"tabIndex","[attr.aria-disabled]":"disabled","[attr.aria-valuemax]":"max","[attr.aria-valuemin]":"min","[attr.aria-valuenow]":"value","[attr.aria-orientation]":'vertical ? "vertical" : "horizontal"',"[class.mat-slider-disabled]":"disabled","[class.mat-slider-has-ticks]":"tickInterval","[class.mat-slider-horizontal]":"!vertical","[class.mat-slider-axis-inverted]":"_invertAxis","[class.mat-slider-sliding]":"_isSliding","[class.mat-slider-thumb-label-showing]":"thumbLabel","[class.mat-slider-vertical]":"vertical","[class.mat-slider-min-value]":"_isMinValue","[class.mat-slider-hide-last-tick]":"disabled || _isMinValue && _thumbGap && _invertAxis"},template:'<div class="mat-slider-wrapper" #sliderWrapper><div class="mat-slider-track-wrapper"><div class="mat-slider-track-background" [ngStyle]="_trackBackgroundStyles"></div><div class="mat-slider-track-fill" [ngStyle]="_trackFillStyles"></div></div><div class="mat-slider-ticks-container" [ngStyle]="_ticksContainerStyles"><div class="mat-slider-ticks" [ngStyle]="_ticksStyles"></div></div><div class="mat-slider-thumb-container" [ngStyle]="_thumbContainerStyles"><div class="mat-slider-focus-ring"></div><div class="mat-slider-thumb"></div><div class="mat-slider-thumb-label"><span class="mat-slider-thumb-label-text">{{displayValue}}</span></div></div></div>',styles:[".mat-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:0;vertical-align:middle}.mat-slider-wrapper{position:absolute}.mat-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mat-slider-track-fill{position:absolute;transform-origin:0 0;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-track-background{position:absolute;transform-origin:100% 100%;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mat-slider-ticks{background-repeat:repeat;background-clip:content-box;box-sizing:border-box;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-thumb-container{position:absolute;z-index:1;transition:transform .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1),opacity .4s cubic-bezier(.25,.8,.25,1)}.cdk-keyboard-focused .mat-slider-focus-ring,.cdk-program-focused .mat-slider-focus-ring{transform:scale(1);opacity:1}.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb-label{cursor:-webkit-grab;cursor:grab}.mat-slider-sliding:not(.mat-slider-disabled) .mat-slider-thumb,.mat-slider-sliding:not(.mat-slider-disabled) .mat-slider-thumb-label,.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb-label:active,.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb:active{cursor:-webkit-grabbing;cursor:grabbing}.mat-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid transparent;border-radius:50%;transform:scale(.7);transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1),border-color .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform .4s cubic-bezier(.25,.8,.25,1),border-radius .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-sliding .mat-slider-thumb-container,.mat-slider-sliding .mat-slider-track-background,.mat-slider-sliding .mat-slider-track-fill{transition-duration:0s}.mat-slider-has-ticks .mat-slider-wrapper::after{content:'';position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after,.mat-slider-has-ticks:hover:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after{opacity:1}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-disabled) .mat-slider-ticks,.mat-slider-has-ticks:hover:not(.mat-slider-disabled) .mat-slider-ticks{opacity:1}.mat-slider-thumb-label-showing .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-thumb-label-showing .mat-slider-thumb-label{display:flex}.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:100% 100%}.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:0 0}.mat-slider:not(.mat-slider-disabled).cdk-focused.mat-slider-thumb-label-showing .mat-slider-thumb{transform:scale(0)}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label{border-radius:50% 50% 0}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label-text{opacity:1}.mat-slider:not(.mat-slider-disabled).cdk-mouse-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-program-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-touch-focused .mat-slider-thumb{border-width:2px;transform:scale(1)}.mat-slider-disabled .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-disabled .mat-slider-thumb{border-width:4px;transform:scale(.5)}.mat-slider-disabled .mat-slider-thumb-label{display:none}.mat-slider-horizontal{height:48px;min-width:128px}.mat-slider-horizontal .mat-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mat-slider-horizontal .mat-slider-wrapper::after{height:2px;border-left-width:2px;right:0;top:0}.mat-slider-horizontal .mat-slider-track-wrapper{height:2px;width:100%}.mat-slider-horizontal .mat-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mat-slider-horizontal .mat-slider-track-background{height:2px;width:100%;transform:scaleX(1)}.mat-slider-horizontal .mat-slider-ticks-container{height:2px;width:100%}@media screen and (-ms-high-contrast:active){.mat-slider-horizontal .mat-slider-ticks-container{height:0;outline:solid 2px;top:1px}}.mat-slider-horizontal .mat-slider-ticks{height:2px;width:100%}.mat-slider-horizontal .mat-slider-thumb-container{width:100%;height:0;top:50%}.mat-slider-horizontal .mat-slider-focus-ring{top:-15px;right:-15px}.mat-slider-horizontal .mat-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(.01) rotate(45deg)}.mat-slider-horizontal .mat-slider-thumb-label-text{transform:rotate(-45deg)}.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label{transform:rotate(45deg)}.mat-slider-vertical{width:48px;min-height:128px}.mat-slider-vertical .mat-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mat-slider-vertical .mat-slider-wrapper::after{width:2px;border-top-width:2px;bottom:0;left:0}.mat-slider-vertical .mat-slider-track-wrapper{height:100%;width:2px}.mat-slider-vertical .mat-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mat-slider-vertical .mat-slider-track-background{height:100%;width:2px;transform:scaleY(1)}.mat-slider-vertical .mat-slider-ticks-container{width:2px;height:100%}@media screen and (-ms-high-contrast:active){.mat-slider-vertical .mat-slider-ticks-container{width:0;outline:solid 2px;left:1px}}.mat-slider-vertical .mat-slider-focus-ring{bottom:-15px;left:-15px}.mat-slider-vertical .mat-slider-ticks{width:2px;height:100%}.mat-slider-vertical .mat-slider-thumb-container{height:100%;width:0;left:50%}.mat-slider-vertical .mat-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-slider-vertical .mat-slider-thumb-label{bottom:-14px;left:-40px;transform:translateX(26px) scale(.01) rotate(-45deg)}.mat-slider-vertical .mat-slider-thumb-label-text{transform:rotate(45deg)}.mat-slider-vertical.cdk-focused .mat-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mat-slider-wrapper::after{left:0;right:auto}[dir=rtl] .mat-slider-horizontal .mat-slider-track-fill{transform-origin:100% 100%}[dir=rtl] .mat-slider-horizontal .mat-slider-track-background{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:100% 100%}"],inputs:["disabled","color","tabIndex"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],i.ctorParameters=function(){return[{type:e.ElementRef},{type:u.FocusMonitor},{type:e.ChangeDetectorRef},{type:n.Directionality,decorators:[{type:e.Optional}]},{type:void 0,decorators:[{type:e.Attribute,args:["tabindex"]}]}]},i.propDecorators={invert:[{type:e.Input}],max:[{type:e.Input}],min:[{type:e.Input}],step:[{type:e.Input}],thumbLabel:[{type:e.Input}],_thumbLabelDeprecated:[{type:e.Input,args:["thumb-label"]}],tickInterval:[{type:e.Input}],_tickIntervalDeprecated:[{type:e.Input,args:["tick-interval"]}],value:[{type:e.Input}],vertical:[{type:e.Input}],change:[{type:e.Output}],input:[{type:e.Output}],_sliderWrapper:[{type:e.ViewChild,args:["sliderWrapper"]}]},i}(ma),ya=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,Z,n.BidiModule,u.A11yModule],exports:[ga,Z],declarations:[ga],providers:[{provide:a.HAMMER_GESTURE_CONFIG,useClass:Ct}]}]}],t.ctorParameters=function(){return[]},t}(),va=function(){function t(t,e){var n=this;this._overlayRef=e,this._afterDismissed=new i.Subject,this._afterOpened=new i.Subject,this._onAction=new i.Subject,this._dismissedByAction=!1,this.containerInstance=t,this.onAction().subscribe(function(){return n.dismiss()}),t._onExit.subscribe(function(){return n._finishDismiss()})}return t.prototype.dismiss=function(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)},t.prototype.dismissWithAction=function(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete())},t.prototype.closeWithAction=function(){this.dismissWithAction()},t.prototype._dismissAfter=function(t){var e=this;this._durationTimeoutId=setTimeout(function(){return e.dismiss()},t)},t.prototype._open=function(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())},t.prototype._finishDismiss=function(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1},t.prototype.afterDismissed=function(){return this._afterDismissed.asObservable()},t.prototype.afterOpened=function(){return this.containerInstance._onEnter},t.prototype.onAction=function(){return this._onAction.asObservable()},t}(),ba=new e.InjectionToken("MatSnackBarData"),_a=function(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.direction="ltr",this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"},wa=Q.ENTERING+" "+K.DECELERATION_CURVE,Ca=Q.EXITING+" "+K.ACCELERATION_CURVE,xa={contentFade:w.trigger("contentFade",[w.transition(":enter",[w.style({opacity:"0"}),w.animate(Q.COMPLEX+" "+K.STANDARD_CURVE)])]),snackBarState:w.trigger("state",[w.state("visible-top, visible-bottom",w.style({transform:"translateY(0%)"})),w.transition("visible-top => hidden-top, visible-bottom => hidden-bottom",w.animate(Ca)),w.transition("void => visible-top, void => visible-bottom",w.animate(wa))])},Sa=function(){function t(t,e){this.snackBarRef=t,this.data=e}return t.prototype.action=function(){this.snackBarRef.dismissWithAction()},Object.defineProperty(t.prototype,"hasAction",{get:function(){return!!this.data.action},enumerable:!0,configurable:!0}),t.decorators=[{type:e.Component,args:[{selector:"simple-snack-bar",template:'{{data.message}} <button class="mat-simple-snackbar-action" *ngIf="hasAction" (click)="action()">{{data.action}}</button>',styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;line-height:20px;opacity:1}.mat-simple-snackbar-action{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;background:0 0;flex-shrink:0;margin-left:48px}[dir=rtl] .mat-simple-snackbar-action{margin-right:48px;margin-left:0}"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[xa.contentFade],host:{"[@contentFade]":"",class:"mat-simple-snackbar"}}]}],t.ctorParameters=function(){return[{type:va},{type:void 0,decorators:[{type:e.Inject,args:[ba]}]}]},t}(),Ea=function(t){function n(e,n,r){var o=t.call(this)||this;return o._ngZone=e,o._elementRef=n,o._changeDetectorRef=r,o._destroyed=!1,o._onExit=new i.Subject,o._onEnter=new i.Subject,o._animationState="void",o}return Y(n,t),n.prototype.attachComponentPortal=function(t){if(this._portalOutlet.hasAttached())throw Error("Attempting to attach snack bar content after content is already attached");var e=this._elementRef.nativeElement;return(this.snackBarConfig.panelClass||this.snackBarConfig.extraClasses)&&(this._setCssClasses(this.snackBarConfig.panelClass),this._setCssClasses(this.snackBarConfig.extraClasses)),"center"===this.snackBarConfig.horizontalPosition&&e.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&e.classList.add("mat-snack-bar-top"),this._portalOutlet.attachComponentPortal(t)},n.prototype.attachTemplatePortal=function(){throw Error("Not yet implemented")},n.prototype.onAnimationEnd=function(t){var e=t.fromState,n=t.toState;if(("void"===n&&"void"!==e||n.startsWith("hidden"))&&this._completeExit(),n.startsWith("visible")){var r=this._onEnter;this._ngZone.run(function(){r.next(),r.complete()})}},n.prototype.enter=function(){this._destroyed||(this._animationState="visible-"+this.snackBarConfig.verticalPosition,this._changeDetectorRef.detectChanges())},n.prototype.exit=function(){return this._animationState="hidden-"+this.snackBarConfig.verticalPosition,this._onExit},n.prototype.ngOnDestroy=function(){this._destroyed=!0,this._completeExit()},n.prototype._completeExit=function(){var t=this;this._ngZone.onMicrotaskEmpty.asObservable().pipe(f.take(1)).subscribe(function(){t._onExit.next(),t._onExit.complete()})},n.prototype._setCssClasses=function(t){if(t){var e=this._elementRef.nativeElement;Array.isArray(t)?t.forEach(function(t){return e.classList.add(t)}):e.classList.add(t)}},n.decorators=[{type:e.Component,args:[{selector:"snack-bar-container",template:"<ng-template cdkPortalOutlet></ng-template>",styles:[".mat-snack-bar-container{border-radius:2px;box-sizing:border-box;display:block;margin:24px;max-width:568px;min-width:288px;padding:14px 24px;transform:translateY(100%) translateY(24px)}.mat-snack-bar-container.mat-snack-bar-center{margin:0;transform:translateY(100%)}.mat-snack-bar-container.mat-snack-bar-top{transform:translateY(-100%) translateY(-24px)}.mat-snack-bar-container.mat-snack-bar-top.mat-snack-bar-center{transform:translateY(-100%)}@media screen and (-ms-high-contrast:active){.mat-snack-bar-container{border:solid 1px}}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:0;max-width:inherit;width:100%}"],changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,animations:[xa.snackBarState],host:{role:"alert",class:"mat-snack-bar-container","[@state]":"_animationState","(@state.done)":"onAnimationEnd($event)"}}]}],n.ctorParameters=function(){return[{type:e.NgZone},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},n.propDecorators={_portalOutlet:[{type:e.ViewChild,args:[d.CdkPortalOutlet]}]},n}(d.BasePortalOutlet),ka=function(){function t(t,e,n,r,i){this._overlay=t,this._live=e,this._injector=n,this._breakpointObserver=r,this._parentSnackBar=i,this._snackBarRefAtThisLevel=null}return Object.defineProperty(t.prototype,"_openedSnackBarRef",{get:function(){var t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel},set:function(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t},enumerable:!0,configurable:!0}),t.prototype.openFromComponent=function(t,e){var n=this,r=Oa(e),i=this._attach(t,r);return i.afterDismissed().subscribe(function(){n._openedSnackBarRef==i&&(n._openedSnackBarRef=null)}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(function(){i.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):i.containerInstance.enter(),r.duration&&r.duration>0&&i.afterOpened().subscribe(function(){return i._dismissAfter(r.duration)}),r.announcementMessage&&this._live.announce(r.announcementMessage,r.politeness),this._openedSnackBarRef=i,this._openedSnackBarRef},t.prototype.open=function(t,e,n){void 0===e&&(e="");var r=Oa(n);return r.data={message:t,action:e},r.announcementMessage=t,this.openFromComponent(Sa,r)},t.prototype.dismiss=function(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()},t.prototype._attachSnackBarContainer=function(t,e){var n=new d.ComponentPortal(Ea,e.viewContainerRef),r=t.attach(n);return r.instance.snackBarConfig=e,r.instance},t.prototype._attach=function(t,e){var n=this._createOverlay(e),r=this._attachSnackBarContainer(n,e),i=new va(r,n),o=this._createInjector(e,i),a=new d.ComponentPortal(t,void 0,o),s=r.attachComponentPortal(a);return i.instance=s.instance,this._breakpointObserver.observe(F.Breakpoints.Handset).pipe(A.takeUntil(n.detachments().pipe(f.take(1)))).subscribe(function(t){t.matches?n.overlayElement.classList.add("mat-snack-bar-handset"):n.overlayElement.classList.remove("mat-snack-bar-handset")}),i},t.prototype._createOverlay=function(t){var e=new p.OverlayConfig;e.direction=t.direction;var n=this._overlay.position().global(),r="rtl"===t.direction,i="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!r||"end"===t.horizontalPosition&&r,o=!i&&"center"!==t.horizontalPosition;return i?n.left("0"):o?n.right("0"):n.centerHorizontally(),"top"===t.verticalPosition?n.top("0"):n.bottom("0"),e.positionStrategy=n,this._overlay.create(e)},t.prototype._createInjector=function(t,e){var n=t&&t.viewContainerRef&&t.viewContainerRef.injector,r=new WeakMap;return r.set(va,e),r.set(ba,t.data),new d.PortalInjector(n||this._injector,r)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:p.Overlay},{type:u.LiveAnnouncer},{type:e.Injector},{type:F.BreakpointObserver},{type:t,decorators:[{type:e.Optional},{type:e.SkipSelf}]}]},t}();function Oa(t){return $({},new _a,t)}var Pa=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[p.OverlayModule,d.PortalModule,s.CommonModule,Z,F.LayoutModule],exports:[Ea,Z],declarations:[Ea,Sa],entryComponents:[Ea,Sa],providers:[ka,u.LIVE_ANNOUNCER_PROVIDER]}]}],t.ctorParameters=function(){return[]},t}();var Aa=function(){},Da=J(Aa),Ta=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.sortables=new Map,n._stateChanges=new i.Subject,n.start="asc",n._direction="",n.sortChange=new e.EventEmitter,n}return Y(n,t),Object.defineProperty(n.prototype,"direction",{get:function(){return this._direction},set:function(t){if(e.isDevMode()&&t&&"asc"!==t&&"desc"!==t)throw Error(t+" is not a valid sort direction ('asc' or 'desc').");this._direction=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disableClear",{get:function(){return this._disableClear},set:function(t){this._disableClear=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),n.prototype.register=function(t){if(!t.id)throw Error("MatSortHeader must be provided with a unique id.");if(this.sortables.has(t.id))throw e=t.id,Error("Cannot have two MatSortables with the same id ("+e+").");var e;this.sortables.set(t.id,t)},n.prototype.deregister=function(t){this.sortables.delete(t.id)},n.prototype.sort=function(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.emit({active:this.active,direction:this.direction})},n.prototype.getNextSortDirection=function(t){if(!t)return"";var e=null!=t.disableClear?t.disableClear:this.disableClear,n=function(t,e){var n=["asc","desc"];"desc"==t&&n.reverse();e||n.push("");return n}(t.start||this.start,e),r=n.indexOf(this.direction)+1;return r>=n.length&&(r=0),n[r]},n.prototype.ngOnChanges=function(){this._stateChanges.next()},n.prototype.ngOnDestroy=function(){this._stateChanges.complete()},n.decorators=[{type:e.Directive,args:[{selector:"[matSort]",exportAs:"matSort",inputs:["disabled: matSortDisabled"]}]}],n.ctorParameters=function(){return[]},n.propDecorators={active:[{type:e.Input,args:["matSortActive"]}],start:[{type:e.Input,args:["matSortStart"]}],direction:[{type:e.Input,args:["matSortDirection"]}],disableClear:[{type:e.Input,args:["matSortDisableClear"]}],sortChange:[{type:e.Output,args:["matSortChange"]}]},n}(Da);var Ma=function(){function t(){this.changes=new i.Subject,this.sortButtonLabel=function(t){return"Change sorting for "+t},this.sortDescriptionLabel=function(t,e){return"Sorted by "+t+" "+("asc"==e?"ascending":"descending")}}return t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}();function Ia(t){return t||new Ma}var Ra={provide:Ma,deps:[[new e.Optional,new e.SkipSelf,Ma]],useFactory:Ia},Na=Q.ENTERING+" "+K.STANDARD_CURVE,La={indicator:w.trigger("indicator",[w.state("active-asc, asc",w.style({transform:"translateY(0px)"})),w.state("active-desc, desc",w.style({transform:"translateY(10px)"})),w.transition("active-asc <=> active-desc",w.animate(Na))]),leftPointer:w.trigger("leftPointer",[w.state("active-asc, asc",w.style({transform:"rotate(-45deg)"})),w.state("active-desc, desc",w.style({transform:"rotate(45deg)"})),w.transition("active-asc <=> active-desc",w.animate(Na))]),rightPointer:w.trigger("rightPointer",[w.state("active-asc, asc",w.style({transform:"rotate(45deg)"})),w.state("active-desc, desc",w.style({transform:"rotate(-45deg)"})),w.transition("active-asc <=> active-desc",w.animate(Na))]),arrowOpacity:w.trigger("arrowOpacity",[w.state("desc-to-active, asc-to-active, active",w.style({opacity:1})),w.state("desc-to-hint, asc-to-hint, hint",w.style({opacity:.54})),w.state("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc",w.style({opacity:0})),w.transition("* => asc, * => desc, * => active, * => hint",w.animate("0ms")),w.transition("* <=> *",w.animate(Na))]),arrowPosition:w.trigger("arrowPosition",[w.transition("* => desc-to-hint, * => desc-to-active",w.animate(Na,w.keyframes([w.style({transform:"translateY(-25%)"}),w.style({transform:"translateY(0)"})]))),w.transition("* => hint-to-desc, * => active-to-desc",w.animate(Na,w.keyframes([w.style({transform:"translateY(0)"}),w.style({transform:"translateY(25%)"})]))),w.transition("* => asc-to-hint, * => asc-to-active",w.animate(Na,w.keyframes([w.style({transform:"translateY(25%)"}),w.style({transform:"translateY(0)"})]))),w.transition("* => hint-to-asc, * => active-to-asc",w.animate(Na,w.keyframes([w.style({transform:"translateY(0)"}),w.style({transform:"translateY(-25%)"})]))),w.state("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",w.style({transform:"translateY(0)"})),w.state("hint-to-desc, active-to-desc, desc",w.style({transform:"translateY(-25%)"})),w.state("hint-to-asc, active-to-asc, asc",w.style({transform:"translateY(25%)"}))]),allowChildren:w.trigger("allowChildren",[w.transition("* <=> *",[w.query("@*",w.animateChild(),{optional:!0})])])},ja=function(){},Fa=J(ja),Va=function(t){function n(e,n,r,i){var o=t.call(this)||this;if(o._intl=e,o._sort=r,o._cdkColumnDef=i,o._showIndicatorHint=!1,o._arrowDirection="",o._disableViewStateAnimation=!1,o.arrowPosition="after",!r)throw Error("MatSortHeader must be placed within a parent element with the MatSort directive.");return o._rerenderSubscription=x.merge(r.sortChange,r._stateChanges,e.changes).subscribe(function(){o._isSorted()&&o._updateArrowDirection(),!o._isSorted()&&o._viewState&&"active"===o._viewState.toState&&(o._disableViewStateAnimation=!1,o._setAnimationTransitionState({fromState:"active",toState:o._arrowDirection})),n.markForCheck()}),o}return Y(n,t),Object.defineProperty(n.prototype,"disableClear",{get:function(){return this._disableClear},set:function(t){this._disableClear=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){!this.id&&this._cdkColumnDef&&(this.id=this._cdkColumnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this)},n.prototype.ngOnDestroy=function(){this._sort.deregister(this),this._rerenderSubscription.unsubscribe()},n.prototype._setIndicatorHintVisible=function(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._showIndicatorHint?this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"hint"}):this._setAnimationTransitionState({fromState:"hint",toState:this._arrowDirection})))},n.prototype._setAnimationTransitionState=function(t){this._viewState=t,this._disableViewStateAnimation&&(this._viewState={toState:t.toState})},n.prototype._handleClick=function(){if(!this._isDisabled()){this._sort.sort(this),"hint"!==this._viewState.toState&&"active"!==this._viewState.toState||(this._disableViewStateAnimation=!0);var t=this._isSorted()?{fromState:this._arrowDirection,toState:"active"}:{fromState:"active",toState:this._arrowDirection};this._setAnimationTransitionState(t),this._showIndicatorHint=!1}},n.prototype._isSorted=function(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)},n.prototype._getArrowDirectionState=function(){return(this._isSorted()?"active-":"")+this._arrowDirection},n.prototype._getArrowViewState=function(){var t=this._viewState.fromState;return(t?t+"-to-":"")+this._viewState.toState},n.prototype._updateArrowDirection=function(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start},n.prototype._isDisabled=function(){return this._sort.disabled||this.disabled},n.decorators=[{type:e.Component,args:[{selector:"[mat-sort-header]",exportAs:"matSortHeader",template:'<div class="mat-sort-header-container" [class.mat-sort-header-sorted]="_isSorted()" [class.mat-sort-header-position-before]="arrowPosition == \'before\'"><button class="mat-sort-header-button" type="button" [attr.disabled]="_isDisabled() || null" [attr.aria-label]="_intl.sortButtonLabel(id)" (focus)="_setIndicatorHintVisible(true)" (blur)="_setIndicatorHintVisible(false)"><ng-content></ng-content></button><div class="mat-sort-header-arrow" [@arrowOpacity]="_getArrowViewState()" [@arrowPosition]="_getArrowViewState()" [@allowChildren]="_getArrowDirectionState()" (@arrowPosition.start)="_disableViewStateAnimation = true" (@arrowPosition.done)="_disableViewStateAnimation = false"><div class="mat-sort-header-stem"></div><div class="mat-sort-header-indicator" [@indicator]="_getArrowDirectionState()"><div class="mat-sort-header-pointer-left" [@leftPointer]="_getArrowDirectionState()"></div><div class="mat-sort-header-pointer-right" [@rightPointer]="_getArrowDirectionState()"></div><div class="mat-sort-header-pointer-middle"></div></div></div></div><span class="cdk-visually-hidden" *ngIf="_isSorted()">&nbsp;{{_intl.sortDescriptionLabel(id, _sort.direction)}}</span>',styles:[".mat-sort-header-container{display:flex;cursor:pointer}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-button{border:none;background:0 0;display:flex;align-items:center;padding:0;cursor:inherit;outline:0;font:inherit;color:currentColor}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;margin:0 0 0 6px;position:relative;display:flex}.mat-sort-header-position-before .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}"],host:{"(click)":"_handleClick()","(mouseenter)":"_setIndicatorHintVisible(true)","(longpress)":"_setIndicatorHintVisible(true)","(mouseleave)":"_setIndicatorHintVisible(false)","[class.mat-sort-header-disabled]":"_isDisabled()"},encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,inputs:["disabled"],animations:[La.indicator,La.leftPointer,La.rightPointer,La.arrowOpacity,La.arrowPosition,La.allowChildren]}]}],n.ctorParameters=function(){return[{type:Ma},{type:e.ChangeDetectorRef},{type:Ta,decorators:[{type:e.Optional}]},{type:U.CdkColumnDef,decorators:[{type:e.Optional}]}]},n.propDecorators={id:[{type:e.Input,args:["mat-sort-header"]}],arrowPosition:[{type:e.Input}],start:[{type:e.Input}],disableClear:[{type:e.Input}]},n}(Fa),Ba=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule],exports:[Ta,Va],declarations:[Ta,Va],providers:[Ra]}]}],t.ctorParameters=function(){return[]},t}(),Ua=function(t){function n(e){return t.call(this,e)||this}return Y(n,t),n.decorators=[{type:e.Directive,args:[{selector:"[matStepLabel]"}]}],n.ctorParameters=function(){return[{type:e.TemplateRef}]},n}(H.CdkStepLabel),Ha=function(){function t(){this.changes=new i.Subject,this.optionalLabel="Optional"}return t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}(),za=function(){function t(t,e,n,r){this._intl=t,this._focusMonitor=e,this._element=n,e.monitor(n.nativeElement,!0),this._intlSubscription=t.changes.subscribe(function(){return r.markForCheck()})}return Object.defineProperty(t.prototype,"index",{get:function(){return this._index},set:function(t){this._index=r.coerceNumberProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this._active},set:function(t){this._active=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"optional",{get:function(){return this._optional},set:function(t){this._optional=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element.nativeElement)},t.prototype._stringLabel=function(){return this.label instanceof Ua?null:this.label},t.prototype._templateLabel=function(){return this.label instanceof Ua?this.label:null},t.prototype._getHostElement=function(){return this._element.nativeElement},t.decorators=[{type:e.Component,args:[{selector:"mat-step-header",template:'<div class="mat-step-header-ripple" mat-ripple [matRippleTrigger]="_getHostElement()"></div><div [class.mat-step-icon]="state !== \'number\' || selected" [class.mat-step-icon-not-touched]="state == \'number\' && !selected" [ngSwitch]="state"><span *ngSwitchCase="\'number\'">{{index + 1}}</span><ng-container *ngSwitchCase="\'edit\'" [ngSwitch]="!!(iconOverrides && iconOverrides.edit)"><ng-container *ngSwitchCase="true" [ngTemplateOutlet]="iconOverrides.edit"></ng-container><mat-icon *ngSwitchDefault>create</mat-icon></ng-container><ng-container *ngSwitchCase="\'done\'" [ngSwitch]="!!(iconOverrides && iconOverrides.done)"><ng-container *ngSwitchCase="true" [ngTemplateOutlet]="iconOverrides.done"></ng-container><mat-icon *ngSwitchDefault>done</mat-icon></ng-container></div><div class="mat-step-label" [class.mat-step-label-active]="active" [class.mat-step-label-selected]="selected"><ng-container *ngIf="_templateLabel()" [ngTemplateOutlet]="_templateLabel()!.template"></ng-container><div class="mat-step-text-label" *ngIf="_stringLabel()">{{label}}</div><div class="mat-step-optional" *ngIf="optional">{{_intl.optionalLabel}}</div></div>',styles:[".mat-step-header{overflow:hidden;outline:0;cursor:pointer;position:relative;box-sizing:content-box}.mat-step-optional{font-size:12px}.mat-step-icon,.mat-step-icon-not-touched{border-radius:50%;height:24px;width:24px;align-items:center;justify-content:center;display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"],host:{class:"mat-step-header",role:"tab"},encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:Ha},{type:u.FocusMonitor},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},t.propDecorators={state:[{type:e.Input}],label:[{type:e.Input}],iconOverrides:[{type:e.Input}],index:[{type:e.Input}],selected:[{type:e.Input}],active:[{type:e.Input}],optional:[{type:e.Input}]},t}(),Ga={horizontalStepTransition:w.trigger("stepTransition",[w.state("previous",w.style({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"})),w.state("current",w.style({transform:"none",visibility:"visible"})),w.state("next",w.style({transform:"translate3d(100%, 0, 0)",visibility:"hidden"})),w.transition("* => *",w.animate("500ms cubic-bezier(0.35, 0, 0.25, 1)"))]),verticalStepTransition:w.trigger("stepTransition",[w.state("previous",w.style({height:"0px",visibility:"hidden"})),w.state("next",w.style({height:"0px",visibility:"hidden"})),w.state("current",w.style({height:"*",visibility:"visible"})),w.transition("* <=> current",w.animate("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])},Wa=function(){function t(t){this.templateRef=t}return t.decorators=[{type:e.Directive,args:[{selector:"ng-template[matStepperIcon]"}]}],t.ctorParameters=function(){return[{type:e.TemplateRef}]},t.propDecorators={name:[{type:e.Input,args:["matStepperIcon"]}]},t}(),qa=H.CdkStep,Ya=H.CdkStepper,$a=function(t){function n(e,n){var r=t.call(this,e)||this;return r._errorStateMatcher=n,r}return Y(n,t),n.prototype.isErrorState=function(t,e){var n=this._errorStateMatcher.isErrorState(t,e),r=!!(t&&t.invalid&&this.interacted);return n||r},n.decorators=[{type:e.Component,args:[{selector:"mat-step",template:"<ng-template><ng-content></ng-content></ng-template>",providers:[{provide:_t,useExisting:n}],encapsulation:e.ViewEncapsulation.None,exportAs:"matStep",preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:Ka,decorators:[{type:e.Inject,args:[e.forwardRef(function(){return Ka})]}]},{type:_t,decorators:[{type:e.SkipSelf}]}]},n.propDecorators={stepLabel:[{type:e.ContentChild,args:[Ua]}]},n}(H.CdkStep),Ka=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._iconOverrides={},e}return Y(n,t),n.prototype.ngAfterContentInit=function(){var t=this,e=this._icons.toArray(),n=e.find(function(t){return"edit"===t.name}),r=e.find(function(t){return"done"===t.name});n&&(this._iconOverrides.edit=n.templateRef),r&&(this._iconOverrides.done=r.templateRef),this._steps.changes.pipe(A.takeUntil(this._destroyed)).subscribe(function(){return t._stateChanged()})},n.decorators=[{type:e.Directive,args:[{selector:"[matStepper]"}]}],n.ctorParameters=function(){return[]},n.propDecorators={_stepHeader:[{type:e.ViewChildren,args:[za,{read:e.ElementRef}]}],_steps:[{type:e.ContentChildren,args:[$a]}],_icons:[{type:e.ContentChildren,args:[Wa]}]},n}(H.CdkStepper),Qa=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Component,args:[{selector:"mat-horizontal-stepper",exportAs:"matHorizontalStepper",template:'<div class="mat-horizontal-stepper-header-container"><ng-container *ngFor="let step of _steps; let i = index; let isLast = last"><mat-step-header class="mat-horizontal-stepper-header" (click)="step.select()" (keydown)="_onKeydown($event)" [tabIndex]="_focusIndex === i ? 0 : -1" [id]="_getStepLabelId(i)" [attr.aria-controls]="_getStepContentId(i)" [attr.aria-selected]="selectedIndex == i" [index]="i" [state]="_getIndicatorType(i)" [label]="step.stepLabel || step.label" [selected]="selectedIndex === i" [active]="step.completed || selectedIndex === i || !linear" [optional]="step.optional" [iconOverrides]="_iconOverrides"></mat-step-header><div *ngIf="!isLast" class="mat-stepper-horizontal-line"></div></ng-container></div><div class="mat-horizontal-content-container"><div *ngFor="let step of _steps; let i = index" class="mat-horizontal-stepper-content" role="tabpanel" [@stepTransition]="_getAnimationDirection(i)" [id]="_getStepContentId(i)" [attr.aria-labelledby]="_getStepLabelId(i)" [attr.aria-expanded]="selectedIndex === i"><ng-container [ngTemplateOutlet]="step.content"></ng-container></div></div>',styles:[".mat-stepper-horizontal,.mat-stepper-vertical{display:block}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px}.mat-horizontal-stepper-header .mat-step-icon,.mat-horizontal-stepper-header .mat-step-icon-not-touched{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon,[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon-not-touched{margin-right:0;margin-left:8px}.mat-vertical-stepper-header{display:flex;align-items:center;padding:24px;max-height:24px}.mat-vertical-stepper-header .mat-step-icon,.mat-vertical-stepper-header .mat-step-icon-not-touched{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon,[dir=rtl] .mat-vertical-stepper-header .mat-step-icon-not-touched{margin-right:0;margin-left:12px}.mat-horizontal-stepper-content{overflow:hidden}.mat-horizontal-stepper-content[aria-expanded=false]{height:0}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:'';position:absolute;top:-16px;bottom:-16px;left:0;border-left-width:1px;border-left-style:solid}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}"],inputs:["selectedIndex"],host:{class:"mat-stepper-horizontal","aria-orientation":"horizontal",role:"tablist"},animations:[Ga.horizontalStepTransition],providers:[{provide:Ka,useExisting:n}],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[]},n}(Ka),Xa=function(t){function r(e,n){var r=t.call(this,e,n)||this;return r._orientation="vertical",r}return Y(r,t),r.decorators=[{type:e.Component,args:[{selector:"mat-vertical-stepper",exportAs:"matVerticalStepper",template:'<div class="mat-step" *ngFor="let step of _steps; let i = index; let isLast = last"><mat-step-header class="mat-vertical-stepper-header" (click)="step.select()" (keydown)="_onKeydown($event)" [tabIndex]="_focusIndex == i ? 0 : -1" [id]="_getStepLabelId(i)" [attr.aria-controls]="_getStepContentId(i)" [attr.aria-selected]="selectedIndex === i" [index]="i" [state]="_getIndicatorType(i)" [label]="step.stepLabel || step.label" [selected]="selectedIndex === i" [active]="step.completed || selectedIndex === i || !linear" [optional]="step.optional" [iconOverrides]="_iconOverrides"></mat-step-header><div class="mat-vertical-content-container" [class.mat-stepper-vertical-line]="!isLast"><div class="mat-vertical-stepper-content" role="tabpanel" [@stepTransition]="_getAnimationDirection(i)" [id]="_getStepContentId(i)" [attr.aria-labelledby]="_getStepLabelId(i)" [attr.aria-expanded]="selectedIndex === i"><div class="mat-vertical-content"><ng-container [ngTemplateOutlet]="step.content"></ng-container></div></div></div></div>',styles:[".mat-stepper-horizontal,.mat-stepper-vertical{display:block}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px}.mat-horizontal-stepper-header .mat-step-icon,.mat-horizontal-stepper-header .mat-step-icon-not-touched{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon,[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon-not-touched{margin-right:0;margin-left:8px}.mat-vertical-stepper-header{display:flex;align-items:center;padding:24px;max-height:24px}.mat-vertical-stepper-header .mat-step-icon,.mat-vertical-stepper-header .mat-step-icon-not-touched{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon,[dir=rtl] .mat-vertical-stepper-header .mat-step-icon-not-touched{margin-right:0;margin-left:12px}.mat-horizontal-stepper-content{overflow:hidden}.mat-horizontal-stepper-content[aria-expanded=false]{height:0}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:'';position:absolute;top:-16px;bottom:-16px;left:0;border-left-width:1px;border-left-style:solid}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}"],inputs:["selectedIndex"],host:{class:"mat-stepper-vertical","aria-orientation":"vertical",role:"tablist"},animations:[Ga.verticalStepTransition],providers:[{provide:Ka,useExisting:r}],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],r.ctorParameters=function(){return[{type:n.Directionality,decorators:[{type:e.Optional}]},{type:e.ChangeDetectorRef}]},r}(Ka),Za=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Directive,args:[{selector:"button[matStepperNext]",host:{"(click)":"_stepper.next()","[type]":"type"},inputs:["type"],providers:[{provide:H.CdkStepper,useExisting:Ka}]}]}],n.ctorParameters=function(){return[]},n}(H.CdkStepperNext),Ja=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Directive,args:[{selector:"button[matStepperPrevious]",host:{"(click)":"_stepper.previous()","[type]":"type"},inputs:["type"],providers:[{provide:H.CdkStepper,useExisting:Ka}]}]}],n.ctorParameters=function(){return[]},n}(H.CdkStepperPrevious),ts=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[Z,s.CommonModule,d.PortalModule,Me,H.CdkStepperModule,pi,u.A11yModule,It],exports:[Z,Qa,Xa,$a,Ua,Ka,Za,Ja,za,Wa],declarations:[Qa,Xa,$a,Ua,Ka,Za,Ja,za,Wa],providers:[Ha,_t]}]}],t.ctorParameters=function(){return[]},t}(),es=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Component,args:[{selector:"mat-table",exportAs:"matTable",template:U.CDK_TABLE_TEMPLATE,styles:[".mat-table{display:block}.mat-header-row{min-height:56px}.mat-row{min-height:48px}.mat-header-row,.mat-row{display:flex;border-bottom-width:1px;border-bottom-style:solid;align-items:center;padding:0 24px;box-sizing:border-box}.mat-header-row::after,.mat-row::after{display:inline-block;min-height:inherit;content:''}.mat-cell,.mat-header-cell{flex:1;overflow:hidden;word-wrap:break-word}"],host:{class:"mat-table"},encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[]},n}(U.CdkTable),ns=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Directive,args:[{selector:"[matCellDef]",providers:[{provide:U.CdkCellDef,useExisting:n}]}]}],n.ctorParameters=function(){return[]},n}(U.CdkCellDef),rs=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Directive,args:[{selector:"[matHeaderCellDef]",providers:[{provide:U.CdkHeaderCellDef,useExisting:n}]}]}],n.ctorParameters=function(){return[]},n}(U.CdkHeaderCellDef),is=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Directive,args:[{selector:"[matColumnDef]",providers:[{provide:U.CdkColumnDef,useExisting:n}]}]}],n.ctorParameters=function(){return[]},n.propDecorators={name:[{type:e.Input,args:["matColumnDef"]}]},n}(U.CdkColumnDef),os=function(t){function n(e,n){var r=t.call(this,e,n)||this;return n.nativeElement.classList.add("mat-column-"+e.cssClassFriendlyName),r}return Y(n,t),n.decorators=[{type:e.Directive,args:[{selector:"mat-header-cell",host:{class:"mat-header-cell",role:"columnheader"}}]}],n.ctorParameters=function(){return[{type:U.CdkColumnDef},{type:e.ElementRef}]},n}(U.CdkHeaderCell),as=function(t){function n(e,n){var r=t.call(this,e,n)||this;return n.nativeElement.classList.add("mat-column-"+e.cssClassFriendlyName),r}return Y(n,t),n.decorators=[{type:e.Directive,args:[{selector:"mat-cell",host:{class:"mat-cell",role:"gridcell"}}]}],n.ctorParameters=function(){return[{type:U.CdkColumnDef},{type:e.ElementRef}]},n}(U.CdkCell),ss=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Directive,args:[{selector:"[matHeaderRowDef]",providers:[{provide:U.CdkHeaderRowDef,useExisting:n}],inputs:["columns: matHeaderRowDef"]}]}],n.ctorParameters=function(){return[]},n}(U.CdkHeaderRowDef),ls=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Directive,args:[{selector:"[matRowDef]",providers:[{provide:U.CdkRowDef,useExisting:n}],inputs:["columns: matRowDefColumns","when: matRowDefWhen"]}]}],n.ctorParameters=function(){return[]},n}(U.CdkRowDef),cs=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Component,args:[{selector:"mat-header-row",template:U.CDK_ROW_TEMPLATE,host:{class:"mat-header-row",role:"row"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,exportAs:"matHeaderRow",preserveWhitespaces:!1}]}],n.ctorParameters=function(){return[]},n}(U.CdkHeaderRow),us=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Y(n,t),n.decorators=[{type:e.Component,args:[{selector:"mat-row",template:U.CDK_ROW_TEMPLATE,host:{class:"mat-row",role:"row"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,exportAs:"matRow",preserveWhitespaces:!1}]}],n.ctorParameters=function(){return[]},n}(U.CdkRow),ps=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[U.CdkTableModule,s.CommonModule,Z],exports:[es,ns,rs,is,os,as,cs,us,ss,ls],declarations:[es,ns,rs,is,os,as,cs,us,ss,ls]}]}],t.ctorParameters=function(){return[]},t}(),ds=function(t){function e(e){void 0===e&&(e=[]);var n=t.call(this)||this;return n._renderData=new z.BehaviorSubject([]),n._filter=new z.BehaviorSubject(""),n.sortingDataAccessor=function(t,e){var n=t[e];return r._isNumberValue(n)?Number(n):n},n.sortData=function(t,e){var r=e.active,i=e.direction;return r&&""!=i?t.sort(function(t,e){var o=n.sortingDataAccessor(t,r),a=n.sortingDataAccessor(e,r),s=0;return o&&a?o>a?s=1:o<a&&(s=-1):o?s=1:a&&(s=-1),s*("asc"==i?1:-1)}):t},n.filterPredicate=function(t,e){var n=Object.keys(t).reduce(function(e,n){return e+t[n]},"").toLowerCase(),r=e.trim().toLowerCase();return-1!=n.indexOf(r)},n._data=new z.BehaviorSubject(e),n._updateChangeSubscription(),n}return Y(e,t),Object.defineProperty(e.prototype,"data",{get:function(){return this._data.value},set:function(t){this._data.next(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter.value},set:function(t){this._filter.next(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sort",{get:function(){return this._sort},set:function(t){this._sort=t,this._updateChangeSubscription()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paginator",{get:function(){return this._paginator},set:function(t){this._paginator=t,this._updateChangeSubscription()},enumerable:!0,configurable:!0}),e.prototype._updateChangeSubscription=function(){var t=this,e=this._sort?this._sort.sortChange:W.empty(),n=this._paginator?this._paginator.page:W.empty();this._renderChangesSubscription&&this._renderChangesSubscription.unsubscribe(),this._renderChangesSubscription=this._data.pipe(G.combineLatest(this._filter),I.map(function(e){var n=e[0];return t._filterData(n)}),G.combineLatest(e.pipe(_.startWith(null))),I.map(function(e){var n=e[0];return t._orderData(n)}),G.combineLatest(n.pipe(_.startWith(null))),I.map(function(e){var n=e[0];return t._pageData(n)})).subscribe(function(e){return t._renderData.next(e)})},e.prototype._filterData=function(t){var e=this;return this.filteredData=this.filter?t.filter(function(t){return e.filterPredicate(t,e.filter)}):t,this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData},e.prototype._orderData=function(t){return this.sort?this.sortData(t.slice(),this.sort):t},e.prototype._pageData=function(t){if(!this.paginator)return t;var e=this.paginator.pageIndex*this.paginator.pageSize;return t.slice().splice(e,this.paginator.pageSize)},e.prototype._updatePaginator=function(t){var e=this;Promise.resolve().then(function(){if(e.paginator&&(e.paginator.length=t,e.paginator.pageIndex>0)){var n=Math.ceil(e.paginator.length/e.paginator.pageSize)-1||0;e.paginator.pageIndex=Math.min(e.paginator.pageIndex,n)}})},e.prototype.connect=function(){return this._renderData},e.prototype.disconnect=function(){},e}(U.DataSource),hs=function(){function t(t,e){this._elementRef=t,this._ngZone=e}return t.prototype.alignToElement=function(t){var e=this;this.show(),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){return e._setStyles(t)})}):this._setStyles(t)},t.prototype.show=function(){this._elementRef.nativeElement.style.visibility="visible"},t.prototype.hide=function(){this._elementRef.nativeElement.style.visibility="hidden"},t.prototype._setStyles=function(t){var e=this._elementRef.nativeElement;e.style.left=t?(t.offsetLeft||0)+"px":"0",e.style.width=t?(t.offsetWidth||0)+"px":"0"},t.decorators=[{type:e.Directive,args:[{selector:"mat-ink-bar",host:{class:"mat-ink-bar"}}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone}]},t}(),fs=function(t){function n(e,n){return t.call(this,e,n)||this}return Y(n,t),n.decorators=[{type:e.Directive,args:[{selector:"[mat-tab-label], [matTabLabel]"}]}],n.ctorParameters=function(){return[{type:e.TemplateRef},{type:e.ViewContainerRef}]},n}(d.CdkPortal),ms=function(){},gs=J(ms),ys=function(t){function n(e){var n=t.call(this)||this;return n._viewContainerRef=e,n.textLabel="",n._contentPortal=null,n._labelChange=new i.Subject,n._disableChange=new i.Subject,n.position=null,n.origin=null,n.isActive=!1,n}return Y(n,t),Object.defineProperty(n.prototype,"content",{get:function(){return this._contentPortal},enumerable:!0,configurable:!0}),n.prototype.ngOnChanges=function(t){t.hasOwnProperty("textLabel")&&this._labelChange.next(),t.hasOwnProperty("disabled")&&this._disableChange.next()},n.prototype.ngOnDestroy=function(){this._disableChange.complete(),this._labelChange.complete()},n.prototype.ngOnInit=function(){this._contentPortal=new d.TemplatePortal(this._content,this._viewContainerRef)},n.decorators=[{type:e.Component,args:[{selector:"mat-tab",template:"<ng-template><ng-content></ng-content></ng-template>",inputs:["disabled"],changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,exportAs:"matTab"}]}],n.ctorParameters=function(){return[{type:e.ViewContainerRef}]},n.propDecorators={templateLabel:[{type:e.ContentChild,args:[fs]}],_content:[{type:e.ViewChild,args:[e.TemplateRef]}],textLabel:[{type:e.Input,args:["label"]}]},n}(gs),vs={translateTab:w.trigger("translateTab",[w.state("center, void, left-origin-center, right-origin-center",w.style({transform:"none"})),w.state("left",w.style({transform:"translate3d(-100%, 0, 0)"})),w.state("right",w.style({transform:"translate3d(100%, 0, 0)"})),w.transition("* => left, * => right, left => center, right => center",w.animate("500ms cubic-bezier(0.35, 0, 0.25, 1)")),w.transition("void => left-origin-center",[w.style({transform:"translate3d(-100%, 0, 0)"}),w.animate("500ms cubic-bezier(0.35, 0, 0.25, 1)")]),w.transition("void => right-origin-center",[w.style({transform:"translate3d(100%, 0, 0)"}),w.animate("500ms cubic-bezier(0.35, 0, 0.25, 1)")])])},bs=function(t){function n(e,n,r){var i=t.call(this,e,n)||this;return i._host=r,i}return Y(n,t),n.prototype.ngOnInit=function(){var t=this;this._host._isCenterPosition(this._host._position)&&this.attach(this._host._content),this._centeringSub=this._host._beforeCentering.subscribe(function(e){e&&(t.hasAttached()||t.attach(t._host._content))}),this._leavingSub=this._host._afterLeavingCenter.subscribe(function(){t.detach()})},n.prototype.ngOnDestroy=function(){this._centeringSub&&!this._centeringSub.closed&&this._centeringSub.unsubscribe(),this._leavingSub&&!this._leavingSub.closed&&this._leavingSub.unsubscribe()},n.decorators=[{type:e.Directive,args:[{selector:"[matTabBodyHost]"}]}],n.ctorParameters=function(){return[{type:e.ComponentFactoryResolver},{type:e.ViewContainerRef},{type:_s,decorators:[{type:e.Inject,args:[e.forwardRef(function(){return _s})]}]}]},n}(d.CdkPortalOutlet),_s=function(){function t(t,n){this._elementRef=t,this._dir=n,this._onCentering=new e.EventEmitter,this._beforeCentering=new e.EventEmitter,this._afterLeavingCenter=new e.EventEmitter,this._onCentered=new e.EventEmitter(!0)}return Object.defineProperty(t.prototype,"position",{set:function(t){this._position=t<0?"ltr"==this._getLayoutDirection()?"left":"right":t>0?"ltr"==this._getLayoutDirection()?"right":"left":"center"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"origin",{set:function(t){if(null!=t){var e=this._getLayoutDirection();this._origin="ltr"==e&&t<=0||"rtl"==e&&t>0?"left":"right"}},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){"center"==this._position&&this._origin&&(this._position="left"==this._origin?"left-origin-center":"right-origin-center")},t.prototype._onTranslateTabStarted=function(t){var e=this._isCenterPosition(t.toState);this._beforeCentering.emit(e),e&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)},t.prototype._onTranslateTabComplete=function(t){this._isCenterPosition(t.toState)&&this._isCenterPosition(this._position)&&this._onCentered.emit(),this._isCenterPosition(t.fromState)&&!this._isCenterPosition(this._position)&&this._afterLeavingCenter.emit()},t.prototype._getLayoutDirection=function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},t.prototype._isCenterPosition=function(t){return"center"==t||"left-origin-center"==t||"right-origin-center"==t},t.decorators=[{type:e.Component,args:[{selector:"mat-tab-body",template:'<div class="mat-tab-body-content" #content [@translateTab]="_position" (@translateTab.start)="_onTranslateTabStarted($event)" (@translateTab.done)="_onTranslateTabComplete($event)"><ng-template matTabBodyHost></ng-template></div>',styles:[".mat-tab-body-content{height:100%;overflow:auto}.mat-tab-group-dynamic-height .mat-tab-body-content{overflow:hidden}"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[vs.translateTab],host:{class:"mat-tab-body"}}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:n.Directionality,decorators:[{type:e.Optional}]}]},t.propDecorators={_onCentering:[{type:e.Output}],_beforeCentering:[{type:e.Output}],_afterLeavingCenter:[{type:e.Output}],_onCentered:[{type:e.Output}],_content:[{type:e.Input,args:["content"]}],position:[{type:e.Input}],origin:[{type:e.Input}]},t}(),ws=0,Cs=function(){},xs=function(t){this._elementRef=t},Ss=tt(et(xs),"primary"),Es=function(t){function n(n,r){var i=t.call(this,n)||this;return i._changeDetectorRef=r,i._indexToSelect=0,i._tabBodyWrapperHeight=0,i._tabsSubscription=O.Subscription.EMPTY,i._tabLabelSubscription=O.Subscription.EMPTY,i._dynamicHeight=!1,i._selectedIndex=null,i.headerPosition="above",i.selectedIndexChange=new e.EventEmitter,i.focusChange=new e.EventEmitter,i.animationDone=new e.EventEmitter,i.selectedTabChange=new e.EventEmitter(!0),i.selectChange=i.selectedTabChange,i._groupId=ws++,i}return Y(n,t),Object.defineProperty(n.prototype,"dynamicHeight",{get:function(){return this._dynamicHeight},set:function(t){this._dynamicHeight=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_dynamicHeightDeprecated",{get:function(){return this._dynamicHeight},set:function(t){this._dynamicHeight=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(t){this._indexToSelect=r.coerceNumberProperty(t,null)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){var e=this._elementRef.nativeElement;e.classList.remove("mat-background-"+this.backgroundColor),t&&e.classList.add("mat-background-"+t),this._backgroundColor=t},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentChecked=function(){var t=this,e=this._indexToSelect=Math.min(this._tabs.length-1,Math.max(this._indexToSelect||0,0));if(this._selectedIndex!=e&&null!=this._selectedIndex){var n=this._createChangeEvent(e);this.selectedTabChange.emit(n),Promise.resolve().then(function(){return t.selectedIndexChange.emit(e)})}this._tabs.forEach(function(n,r){n.position=r-e,n.isActive=r===e,null==t._selectedIndex||0!=n.position||n.origin||(n.origin=e-t._selectedIndex)}),this._selectedIndex!==e&&(this._selectedIndex=e,this._changeDetectorRef.markForCheck())},n.prototype.ngAfterContentInit=function(){var t=this;this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(function(){t._subscribeToTabLabels(),t._changeDetectorRef.markForCheck()})},n.prototype.ngOnDestroy=function(){this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe()},n.prototype._focusChanged=function(t){this.focusChange.emit(this._createChangeEvent(t))},n.prototype._createChangeEvent=function(t){var e=new Cs;return e.index=t,this._tabs&&this._tabs.length&&(e.tab=this._tabs.toArray()[t]),e},n.prototype._subscribeToTabLabels=function(){var t=this;this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=x.merge.apply(void 0,this._tabs.map(function(t){return t._disableChange}).concat(this._tabs.map(function(t){return t._labelChange}))).subscribe(function(){t._changeDetectorRef.markForCheck()})},n.prototype._getTabLabelId=function(t){return"mat-tab-label-"+this._groupId+"-"+t},n.prototype._getTabContentId=function(t){return"mat-tab-content-"+this._groupId+"-"+t},n.prototype._setTabBodyWrapperHeight=function(t){if(this._dynamicHeight&&this._tabBodyWrapperHeight){var e=this._tabBodyWrapper.nativeElement;e.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(e.style.height=t+"px")}},n.prototype._removeTabBodyWrapperHeight=function(){this._tabBodyWrapperHeight=this._tabBodyWrapper.nativeElement.clientHeight,this._tabBodyWrapper.nativeElement.style.height="",this.animationDone.emit()},n.prototype._handleClick=function(t,e,n){t.disabled||(this.selectedIndex=e.focusIndex=n)},n.prototype._getTabIndex=function(t,e){return t.disabled?null:this.selectedIndex===e?0:-1},n.decorators=[{type:e.Component,args:[{selector:"mat-tab-group",exportAs:"matTabGroup",template:'<mat-tab-header #tabHeader [selectedIndex]="selectedIndex" [disableRipple]="disableRipple" (indexFocused)="_focusChanged($event)" (selectFocusedIndex)="selectedIndex = $event"><div class="mat-tab-label" role="tab" matTabLabelWrapper mat-ripple *ngFor="let tab of _tabs; let i = index" [id]="_getTabLabelId(i)" [attr.tabIndex]="_getTabIndex(tab, i)" [attr.aria-controls]="_getTabContentId(i)" [attr.aria-selected]="selectedIndex == i" [class.mat-tab-label-active]="selectedIndex == i" [disabled]="tab.disabled" [matRippleDisabled]="tab.disabled || disableRipple" (click)="_handleClick(tab, tabHeader, i)"><div class="mat-tab-label-content"><ng-template [ngIf]="tab.templateLabel"><ng-template [cdkPortalOutlet]="tab.templateLabel"></ng-template></ng-template><ng-template [ngIf]="!tab.templateLabel">{{tab.textLabel}}</ng-template></div></div></mat-tab-header><div class="mat-tab-body-wrapper" #tabBodyWrapper><mat-tab-body role="tabpanel" *ngFor="let tab of _tabs; let i = index" [id]="_getTabContentId(i)" [attr.aria-labelledby]="_getTabLabelId(i)" [class.mat-tab-body-active]="selectedIndex == i" [content]="tab.content" [position]="tab.position" [origin]="tab.origin" (_onCentered)="_removeTabBodyWrapperHeight()" (_onCentering)="_setTabBodyWrapperHeight($event)"></mat-tab-body></div>',styles:[".mat-tab-group{display:flex;flex-direction:column}.mat-tab-group.mat-tab-group-inverted-header{flex-direction:column-reverse}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:0}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.mat-tab-label.mat-tab-disabled{cursor:default}.mat-tab-label.mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}@media (max-width:599px){.mat-tab-label{padding:0 12px}}@media (max-width:959px){.mat-tab-label{padding:0 12px}}.mat-tab-group[mat-stretch-tabs] .mat-tab-label{flex-basis:0;flex-grow:1}.mat-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height .5s cubic-bezier(.35,0,.25,1)}.mat-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden}.mat-tab-body.mat-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-tab-group.mat-tab-group-dynamic-height .mat-tab-body.mat-tab-body-active{overflow-y:hidden}"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,inputs:["color","disableRipple"],host:{class:"mat-tab-group","[class.mat-tab-group-dynamic-height]":"dynamicHeight","[class.mat-tab-group-inverted-header]":'headerPosition === "below"'}}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},n.propDecorators={_tabs:[{type:e.ContentChildren,args:[ys]}],_tabBodyWrapper:[{type:e.ViewChild,args:["tabBodyWrapper"]}],dynamicHeight:[{type:e.Input}],_dynamicHeightDeprecated:[{type:e.Input,args:["mat-dynamic-height"]}],selectedIndex:[{type:e.Input}],headerPosition:[{type:e.Input}],backgroundColor:[{type:e.Input}],selectedIndexChange:[{type:e.Output}],focusChange:[{type:e.Output}],animationDone:[{type:e.Output}],selectedTabChange:[{type:e.Output}],selectChange:[{type:e.Output}]},n}(Ss),ks=function(){},Os=J(ks),Ps=function(t){function n(e){var n=t.call(this)||this;return n.elementRef=e,n}return Y(n,t),n.prototype.focus=function(){this.elementRef.nativeElement.focus()},n.prototype.getOffsetLeft=function(){return this.elementRef.nativeElement.offsetLeft},n.prototype.getOffsetWidth=function(){return this.elementRef.nativeElement.offsetWidth},n.decorators=[{type:e.Directive,args:[{selector:"[matTabLabelWrapper]",inputs:["disabled"],host:{"[class.mat-tab-disabled]":"disabled"}}]}],n.ctorParameters=function(){return[{type:e.ElementRef}]},n}(Os),As=function(){},Ds=et(As),Ts=function(t){function i(n,r,i,o){var a=t.call(this)||this;return a._elementRef=n,a._changeDetectorRef=r,a._viewportRuler=i,a._dir=o,a._focusIndex=0,a._scrollDistance=0,a._selectedIndexChanged=!1,a._realignInkBar=O.Subscription.EMPTY,a._showPaginationControls=!1,a._disableScrollAfter=!0,a._disableScrollBefore=!0,a._selectedIndex=0,a.selectFocusedIndex=new e.EventEmitter,a.indexFocused=new e.EventEmitter,a}return Y(i,t),Object.defineProperty(i.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(t){t=r.coerceNumberProperty(t),this._selectedIndexChanged=this._selectedIndex!=t,this._selectedIndex=t,this._focusIndex=t},enumerable:!0,configurable:!0}),i.prototype.ngAfterContentChecked=function(){this._tabLabelCount!=this._labelWrappers.length&&(this._updatePagination(),this._tabLabelCount=this._labelWrappers.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())},i.prototype._handleKeydown=function(t){switch(t.keyCode){case c.RIGHT_ARROW:this._focusNextTab();break;case c.LEFT_ARROW:this._focusPreviousTab();break;case c.HOME:this._focusFirstTab(),t.preventDefault();break;case c.END:this._focusLastTab(),t.preventDefault();break;case c.ENTER:case c.SPACE:this.selectFocusedIndex.emit(this.focusIndex),t.preventDefault()}},i.prototype.ngAfterContentInit=function(){var t=this,e=this._dir?this._dir.change:S.of(null),n=this._viewportRuler.change(150),r=function(){t._updatePagination(),t._alignInkBarToSelectedTab()};"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(r):r(),this._realignInkBar=x.merge(e,n).subscribe(r)},i.prototype.ngOnDestroy=function(){this._realignInkBar.unsubscribe()},i.prototype._onContentChanges=function(){this._updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()},i.prototype._updatePagination=function(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()},Object.defineProperty(i.prototype,"focusIndex",{get:function(){return this._focusIndex},set:function(t){this._isValidIndex(t)&&this._focusIndex!=t&&(this._focusIndex=t,this.indexFocused.emit(t),this._setTabFocus(t))},enumerable:!0,configurable:!0}),i.prototype._isValidIndex=function(t){if(!this._labelWrappers)return!0;var e=this._labelWrappers?this._labelWrappers.toArray()[t]:null;return!!e&&!e.disabled},i.prototype._setTabFocus=function(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._labelWrappers&&this._labelWrappers.length){this._labelWrappers.toArray()[t].focus();var e=this._tabListContainer.nativeElement,n=this._getLayoutDirection();e.scrollLeft="ltr"==n?0:e.scrollWidth-e.offsetWidth}},i.prototype._moveFocus=function(t){if(this._labelWrappers)for(var e=this._labelWrappers.toArray(),n=this.focusIndex+t;n<e.length&&n>=0;n+=t)if(this._isValidIndex(n))return void(this.focusIndex=n)},i.prototype._focusNextTab=function(){this._moveFocus("ltr"==this._getLayoutDirection()?1:-1)},i.prototype._focusPreviousTab=function(){this._moveFocus("ltr"==this._getLayoutDirection()?-1:1)},i.prototype._focusFirstTab=function(){for(var t=0;t<this._labelWrappers.length;t++)if(this._isValidIndex(t)){this.focusIndex=t;break}},i.prototype._focusLastTab=function(){for(var t=this._labelWrappers.length-1;t>-1;t--)if(this._isValidIndex(t)){this.focusIndex=t;break}},i.prototype._getLayoutDirection=function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},i.prototype._updateTabScrollPosition=function(){var t=this.scrollDistance,e="ltr"===this._getLayoutDirection()?-t:t;this._tabList.nativeElement.style.transform="translate3d("+e+"px, 0, 0)"},Object.defineProperty(i.prototype,"scrollDistance",{get:function(){return this._scrollDistance},set:function(t){this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),t)),this._scrollDistanceChanged=!0,this._checkScrollingControls()},enumerable:!0,configurable:!0}),i.prototype._scrollHeader=function(t){var e=this._tabListContainer.nativeElement.offsetWidth;this.scrollDistance+=("before"==t?-1:1)*e/3},i.prototype._scrollToLabel=function(t){var e=this._labelWrappers?this._labelWrappers.toArray()[t]:null;if(e){var n,r,i=this._tabListContainer.nativeElement.offsetWidth;"ltr"==this._getLayoutDirection()?r=(n=e.getOffsetLeft())+e.getOffsetWidth():n=(r=this._tabList.nativeElement.offsetWidth-e.getOffsetLeft())-e.getOffsetWidth();var o=this.scrollDistance,a=this.scrollDistance+i;n<o?this.scrollDistance-=o-n+60:r>a&&(this.scrollDistance+=r-a+60)}},i.prototype._checkPaginationEnabled=function(){var t=this._tabList.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;t||(this.scrollDistance=0),t!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=t},i.prototype._checkScrollingControls=function(){this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck()},i.prototype._getMaxScrollDistance=function(){return this._tabList.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0},i.prototype._alignInkBarToSelectedTab=function(){var t=this._labelWrappers&&this._labelWrappers.length?this._labelWrappers.toArray()[this.selectedIndex].elementRef.nativeElement:null;this._inkBar.alignToElement(t)},i.decorators=[{type:e.Component,args:[{selector:"mat-tab-header",template:'<div class="mat-tab-header-pagination mat-tab-header-pagination-before mat-elevation-z4" aria-hidden="true" mat-ripple [matRippleDisabled]="_disableScrollBefore || disableRipple" [class.mat-tab-header-pagination-disabled]="_disableScrollBefore" (click)="_scrollHeader(\'before\')"><div class="mat-tab-header-pagination-chevron"></div></div><div class="mat-tab-label-container" #tabListContainer (keydown)="_handleKeydown($event)"><div class="mat-tab-list" #tabList role="tablist" (cdkObserveContent)="_onContentChanges()"><div class="mat-tab-labels"><ng-content></ng-content></div><mat-ink-bar></mat-ink-bar></div></div><div class="mat-tab-header-pagination mat-tab-header-pagination-after mat-elevation-z4" aria-hidden="true" mat-ripple [matRippleDisabled]="_disableScrollAfter || disableRipple" [class.mat-tab-header-pagination-disabled]="_disableScrollAfter" (click)="_scrollHeader(\'after\')"><div class="mat-tab-header-pagination-chevron"></div></div>',styles:[".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:0}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.mat-tab-label.mat-tab-disabled{cursor:default}.mat-tab-label.mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}@media (max-width:599px){.mat-tab-label{min-width:72px}}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:.5s cubic-bezier(.35,0,.25,1)}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}@media screen and (-ms-high-contrast:active){.mat-ink-bar{outline:solid 2px;height:0}}.mat-tab-header-pagination{position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-pagination-after,.mat-tab-header-rtl .mat-tab-header-pagination-before{padding-right:4px}.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:'';height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-list{flex-grow:1;position:relative;transition:transform .5s cubic-bezier(.35,0,.25,1)}.mat-tab-labels{display:flex}"],inputs:["disableRipple"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,host:{class:"mat-tab-header","[class.mat-tab-header-pagination-controls-enabled]":"_showPaginationControls","[class.mat-tab-header-rtl]":"_getLayoutDirection() == 'rtl'"}}]}],i.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:V.ViewportRuler},{type:n.Directionality,decorators:[{type:e.Optional}]}]},i.propDecorators={_labelWrappers:[{type:e.ContentChildren,args:[Ps]}],_inkBar:[{type:e.ViewChild,args:[hs]}],_tabListContainer:[{type:e.ViewChild,args:["tabListContainer"]}],_tabList:[{type:e.ViewChild,args:["tabList"]}],selectedIndex:[{type:e.Input}],selectFocusedIndex:[{type:e.Output}],indexFocused:[{type:e.Output}]},i}(Ds),Ms=function(t){this._elementRef=t},Is=tt(Ms,"primary"),Rs=function(t){function o(e,n,r,o,a){var s=t.call(this,e)||this;return s._dir=n,s._ngZone=r,s._changeDetectorRef=o,s._viewportRuler=a,s._onDestroy=new i.Subject,s._disableRipple=!1,s}return Y(o,t),Object.defineProperty(o.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){var e=this._elementRef.nativeElement;e.classList.remove("mat-background-"+this.backgroundColor),t&&e.classList.add("mat-background-"+t),this._backgroundColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"disableRipple",{get:function(){return this._disableRipple},set:function(t){this._disableRipple=r.coerceBooleanProperty(t),this._setLinkDisableRipple()},enumerable:!0,configurable:!0}),o.prototype.updateActiveLink=function(t){this._activeLinkChanged=this._activeLinkElement!=t,this._activeLinkElement=t,this._activeLinkChanged&&this._changeDetectorRef.markForCheck()},o.prototype.ngAfterContentInit=function(){var t=this;this._ngZone.runOutsideAngular(function(){var e=t._dir?t._dir.change:S.of(null);return x.merge(e,t._viewportRuler.change(10)).pipe(A.takeUntil(t._onDestroy)).subscribe(function(){return t._alignInkBar()})}),this._setLinkDisableRipple()},o.prototype.ngAfterContentChecked=function(){this._activeLinkChanged&&(this._alignInkBar(),this._activeLinkChanged=!1)},o.prototype.ngOnDestroy=function(){this._onDestroy.next(),this._onDestroy.complete()},o.prototype._alignInkBar=function(){this._activeLinkElement&&this._inkBar.alignToElement(this._activeLinkElement.nativeElement)},o.prototype._setLinkDisableRipple=function(){var t=this;this._tabLinks&&this._tabLinks.forEach(function(e){return e.disableRipple=t.disableRipple})},o.decorators=[{type:e.Component,args:[{selector:"[mat-tab-nav-bar]",exportAs:"matTabNavBar, matTabNav",inputs:["color"],template:'<div class="mat-tab-links" (cdkObserveContent)="_alignInkBar()"><ng-content></ng-content><mat-ink-bar></mat-ink-bar></div>',styles:[".mat-tab-nav-bar{overflow:hidden;position:relative;flex-shrink:0}.mat-tab-links{position:relative}.mat-tab-link{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;vertical-align:top;text-decoration:none;position:relative;overflow:hidden}.mat-tab-link:focus{outline:0}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}.mat-tab-link.mat-tab-disabled{cursor:default}.mat-tab-link.mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}@media (max-width:599px){.mat-tab-link{min-width:72px}}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:.5s cubic-bezier(.35,0,.25,1)}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}@media screen and (-ms-high-contrast:active){.mat-ink-bar{outline:solid 2px;height:0}}"],host:{class:"mat-tab-nav-bar"},encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],o.ctorParameters=function(){return[{type:e.ElementRef},{type:n.Directionality,decorators:[{type:e.Optional}]},{type:e.NgZone},{type:e.ChangeDetectorRef},{type:V.ViewportRuler}]},o.propDecorators={_inkBar:[{type:e.ViewChild,args:[hs]}],_tabLinks:[{type:e.ContentChildren,args:[e.forwardRef(function(){return js}),{descendants:!0}]}],backgroundColor:[{type:e.Input}],disableRipple:[{type:e.Input}]},o}(Is),Ns=function(){},Ls=nt(et(J(Ns))),js=function(t){function n(e,n,r,i,o,a){var s=t.call(this)||this;return s._tabNavBar=e,s._elementRef=n,s._isActive=!1,s.rippleConfig={},s._tabLinkRipple=new Dt(s,r,n,i),s._tabLinkRipple.setupTriggerEvents(n.nativeElement),s.tabIndex=parseInt(a)||0,o&&(s.rippleConfig={terminateOnPointerUp:o.terminateOnPointerUp,speedFactor:o.baseSpeedFactor,animation:o.animation}),s}return Y(n,t),Object.defineProperty(n.prototype,"active",{get:function(){return this._isActive},set:function(t){this._isActive=t,t&&this._tabNavBar.updateActiveLink(this._elementRef)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rippleDisabled",{get:function(){return this.disabled||this.disableRipple},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this._tabLinkRipple._removeTriggerEvents()},n.prototype._handleClick=function(t){this.disabled&&t.preventDefault()},n.decorators=[{type:e.Directive,args:[{selector:"[mat-tab-link], [matTabLink]",exportAs:"matTabLink",inputs:["disabled","disableRipple","tabIndex"],host:{class:"mat-tab-link","[attr.aria-disabled]":"disabled.toString()","[attr.tabIndex]":"tabIndex","[class.mat-tab-disabled]":"disabled","[class.mat-tab-label-active]":"active","(click)":"_handleClick($event)"}}]}],n.ctorParameters=function(){return[{type:Rs},{type:e.ElementRef},{type:e.NgZone},{type:l.Platform},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[Tt]}]},{type:void 0,decorators:[{type:e.Attribute,args:["tabindex"]}]}]},n.propDecorators={active:[{type:e.Input}]},n}(Ls),Fs=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,Z,d.PortalModule,It,k.ObserversModule,V.ScrollDispatchModule],exports:[Z,Es,fs,ys,Rs,js],declarations:[Es,fs,ys,hs,Ps,Rs,js,_s,bs,Ts],providers:[V.VIEWPORT_RULER_PROVIDER]}]}],t.ctorParameters=function(){return[]},t}(),Vs=function(t){this._elementRef=t},Bs=tt(Vs),Us=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-toolbar-row",exportAs:"matToolbarRow",host:{class:"mat-toolbar-row"}}]}],t.ctorParameters=function(){return[]},t}(),Hs=function(t){function n(e,n,r){var i=t.call(this,e)||this;return i._platform=n,i._document=r,i}return Y(n,t),n.prototype.ngAfterViewInit=function(){var t=this;e.isDevMode()&&this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(function(){return t._checkToolbarMixedModes()}))},n.prototype._checkToolbarMixedModes=function(){var t=this;this._toolbarRows.length&&([].slice.call(this._elementRef.nativeElement.childNodes).filter(function(t){return!(t.classList&&t.classList.contains("mat-toolbar-row"))}).filter(function(e){return e.nodeType!==(t._document?t._document.COMMENT_NODE:8)}).some(function(t){return t.textContent.trim()})&&zs())},n.decorators=[{type:e.Component,args:[{selector:"mat-toolbar",exportAs:"matToolbar",template:'<ng-content></ng-content><ng-content select="mat-toolbar-row"></ng-content>',styles:[".mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}.mat-toolbar-multiple-rows{min-height:64px}.mat-toolbar-row,.mat-toolbar-single-row{height:64px}@media (max-width:599px){.mat-toolbar-multiple-rows{min-height:56px}.mat-toolbar-row,.mat-toolbar-single-row{height:56px}}"],inputs:["color"],host:{class:"mat-toolbar","[class.mat-toolbar-multiple-rows]":"this._toolbarRows.length","[class.mat-toolbar-single-row]":"!this._toolbarRows.length"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:l.Platform},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},n.propDecorators={_toolbarRows:[{type:e.ContentChildren,args:[Us]}]},n}(Bs);function zs(){throw Error("MatToolbar: Attempting to combine different toolbar modes. Either specify multiple `<mat-toolbar-row>` elements explicitly or just place content inside of a `<mat-toolbar>` for a single row.")}var Gs=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[Z,l.PlatformModule],exports:[Hs,Us,Z],declarations:[Hs,Us]}]}],t.ctorParameters=function(){return[]},t}(),Ws=new e.Version("5.2.3");t.VERSION=Ws,t.MatAutocompleteSelectedEvent=he,t.MatAutocompleteBase=fe,t._MatAutocompleteMixinBase=me,t.MAT_AUTOCOMPLETE_DEFAULT_OPTIONS=ge,t.MatAutocomplete=ye,t.MatAutocompleteModule=Se,t.AUTOCOMPLETE_OPTION_HEIGHT=48,t.AUTOCOMPLETE_PANEL_HEIGHT=256,t.MAT_AUTOCOMPLETE_SCROLL_STRATEGY=ve,t.MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER_FACTORY=be,t.MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER=_e,t.MAT_AUTOCOMPLETE_VALUE_ACCESSOR=we,t.getMatAutocompleteMissingPanelError=Ce,t.MatAutocompleteTrigger=xe,t.MatButtonModule=Me,t.MatButtonBase=Pe,t._MatButtonMixinBase=Ae,t.MatButton=De,t.MatAnchor=Te,t.MatButtonToggleGroupBase=Ie,t._MatButtonToggleGroupMixinBase=Re,t.MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR=Ne,t.MatButtonToggleChange=je,t.MatButtonToggleGroup=Fe,t.MatButtonToggleGroupMultiple=Ve,t.MatButtonToggle=Be,t.MatButtonToggleModule=Ue,t.MatCardContent=He,t.MatCardTitle=ze,t.MatCardSubtitle=Ge,t.MatCardActions=We,t.MatCardFooter=qe,t.MatCardImage=Ye,t.MatCardSmImage=$e,t.MatCardMdImage=Ke,t.MatCardLgImage=Qe,t.MatCardXlImage=Xe,t.MatCardAvatar=Ze,t.MatCard=Je,t.MatCardHeader=tn,t.MatCardTitleGroup=en,t.MatCardModule=nn,t.MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR=an,t.TransitionCheckState=sn,t.MatCheckboxChange=ln,t.MatCheckboxBase=cn,t._MatCheckboxMixinBase=un,t.MatCheckbox=pn,t.MAT_CHECKBOX_CLICK_ACTION=rn,t.MatCheckboxModule=fn,t.MAT_CHECKBOX_REQUIRED_VALIDATOR=dn,t.MatCheckboxRequiredValidator=hn,t.MatChipsModule=On,t.MatChipListBase=wn,t._MatChipListMixinBase=Cn,t.MatChipListChange=Sn,t.MatChipList=En,t.MatChipSelectionChange=mn,t.MatChipBase=gn,t._MatChipMixinBase=yn,t.MatBasicChip=vn,t.MatChip=bn,t.MatChipRemove=_n,t.MatChipInput=kn,t.MAT_PLACEHOLDER_GLOBAL_OPTIONS=Yt,t.AnimationCurves=K,t.AnimationDurations=Q,t.MatCommonModule=Z,t.MATERIAL_SANITY_CHECKS=X,t.mixinDisabled=J,t.mixinColor=tt,t.mixinDisableRipple=et,t.mixinTabIndex=nt,t.mixinErrorState=rt,t.mixinInitialized=function(t){return function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,e)||this;return r._isInitialized=!1,r._pendingSubscribers=[],r.initialized=new o.Observable(function(t){r._isInitialized?r._notifySubscriber(t):r._pendingSubscribers.push(t)}),r}return Y(e,t),e.prototype._markInitialized=function(){if(this._isInitialized)throw Error("This directive has already been marked as initialized and should not be called twice.");this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null},e.prototype._notifySubscriber=function(t){t.next(),t.complete()},e}(t)},t.NativeDateModule=gt,t.MatNativeDateModule=vt,t.MAT_DATE_LOCALE=it,t.MAT_DATE_LOCALE_PROVIDER=ot,t.DateAdapter=at,t.MAT_DATE_FORMATS=st,t.NativeDateAdapter=ft,t.MAT_NATIVE_DATE_FORMATS=mt,t.ShowOnDirtyErrorStateMatcher=bt,t.ErrorStateMatcher=_t,t.MAT_HAMMER_OPTIONS=wt,t.GestureConfig=Ct,t.MatLine=xt,t.MatLineSetter=St,t.MatLineModule=Et,t.MatOptionModule=qt,t.MatOptionSelectionChange=Ut,t.MAT_OPTION_PARENT_COMPONENT=Ht,t.MatOption=zt,t._countGroupLabelsBeforeOption=Gt,t._getOptionScrollPosition=Wt,t.MatOptgroupBase=Lt,t._MatOptgroupMixinBase=jt,t.MatOptgroup=Vt,t.MAT_LABEL_GLOBAL_OPTIONS=Yt,t.MatRippleModule=It,t.MAT_RIPPLE_GLOBAL_OPTIONS=Tt,t.MatRipple=Mt,t.RippleState=kt,t.RippleRef=Ot,t.defaultRippleAnimationConfig=Pt,t.RippleRenderer=Dt,t.MatPseudoCheckboxModule=Nt,t.MatPseudoCheckbox=Rt,t.JAN=0,t.FEB=1,t.MAR=2,t.APR=3,t.MAY=4,t.JUN=5,t.JUL=6,t.AUG=7,t.SEP=8,t.OCT=9,t.NOV=10,t.DEC=11,t.ɵa31=sr,t.MatDatepickerModule=Cr,t.MatCalendar=cr,t.MatCalendarCell=ir,t.MatCalendarBody=or,t.MAT_DATEPICKER_SCROLL_STRATEGY=pr,t.MAT_DATEPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY=dr,t.MAT_DATEPICKER_SCROLL_STRATEGY_PROVIDER=hr,t.MatDatepickerContent=fr,t.MatDatepicker=mr,t.MAT_DATEPICKER_VALUE_ACCESSOR=gr,t.MAT_DATEPICKER_VALIDATORS=yr,t.MatDatepickerInputEvent=vr,t.MatDatepickerInput=br,t.MatDatepickerIntl=rr,t.MatDatepickerToggleIcon=_r,t.MatDatepickerToggle=wr,t.MatMonthView=ar,t.MatYearView=lr,t.MatDialogModule=qn,t.MAT_DIALOG_DATA=Rn,t.MAT_DIALOG_DEFAULT_OPTIONS=Nn,t.MAT_DIALOG_SCROLL_STRATEGY=Ln,t.MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY=jn,t.MAT_DIALOG_SCROLL_STRATEGY_PROVIDER=Fn,t.MatDialog=Vn,t.throwMatDialogContentAlreadyAttachedError=Dn,t.MatDialogContainer=Tn,t.MatDialogClose=Un,t.MatDialogTitle=Hn,t.MatDialogContent=zn,t.MatDialogActions=Gn,t.MatDialogConfig=Pn,t.MatDialogRef=In,t.matDialogAnimations=An,t.MatDivider=xr,t.MatDividerModule=Sr,t.MatExpansionModule=Nr,t.MatAccordion=Er,t.MatExpansionPanel=Dr,t.MatExpansionPanelActionRow=Tr,t.MatExpansionPanelHeader=Mr,t.MatExpansionPanelDescription=Ir,t.MatExpansionPanelTitle=Rr,t.MatExpansionPanelContent=kr,t.EXPANSION_PANEL_ANIMATION_TIMING=Or,t.matExpansionAnimations=Pr,t.MatFormFieldModule=pe,t.MatError=Kt,t.MatFormFieldBase=se,t._MatFormFieldMixinBase=le,t.MatFormField=ue,t.MatFormFieldControl=Xt,t.getMatFormFieldPlaceholderConflictError=Zt,t.getMatFormFieldDuplicatedHintError=Jt,t.getMatFormFieldMissingControlError=te,t.MatHint=ne,t.MatPlaceholder=ie,t.MatPrefix=oe,t.MatSuffix=ae,t.MatLabel=re,t.matFormFieldAnimations=Qt,t.MatGridListModule=Zr,t.MatGridList=Xr,t.MatGridTile=Fr,t.MatGridTileText=Vr,t.MatGridAvatarCssMatStyler=Br,t.MatGridTileHeaderCssMatStyler=Ur,t.MatGridTileFooterCssMatStyler=Hr,t.MatIconModule=pi,t.MatIconBase=li,t._MatIconMixinBase=ci,t.MatIcon=ui,t.getMatIconNameNotFoundError=Jr,t.getMatIconNoHttpProviderError=ti,t.getMatIconFailedToSanitizeError=ei,t.MatIconRegistry=ri,t.ICON_REGISTRY_PROVIDER_FACTORY=ii,t.ICON_REGISTRY_PROVIDER=oi,t.MatInputModule=er,t.MatTextareaAutosize=Yn,t.MatInputBase=Zn,t._MatInputMixinBase=Jn,t.MatInput=tr,t.getMatInputUnsupportedTypeError=$n,t.MAT_INPUT_VALUE_ACCESSOR=Kn,t.MatListModule=Ti,t.MatListBase=di,t._MatListMixinBase=hi,t.MatListItemBase=fi,t._MatListItemMixinBase=mi,t.MatNavList=gi,t.MatList=yi,t.MatListAvatarCssMatStyler=vi,t.MatListIconCssMatStyler=bi,t.MatListSubheaderCssMatStyler=_i,t.MatListItem=wi,t.MatSelectionListBase=Ci,t._MatSelectionListMixinBase=xi,t.MatListOptionBase=Si,t._MatListOptionMixinBase=Ei,t.MAT_SELECTION_LIST_VALUE_ACCESSOR=ki,t.MatListOptionChange=Oi,t.MatSelectionListChange=Pi,t.MatListOption=Ai,t.MatSelectionList=Di,t.ɵa21=Ni,t.ɵb21=Li,t.ɵd21=zi,t.ɵc21=Hi,t.MAT_MENU_SCROLL_STRATEGY=Ui,t.MatMenuModule=qi,t.MatMenu=Bi,t.MAT_MENU_DEFAULT_OPTIONS=Vi,t.MatMenuItem=ji,t.MatMenuTrigger=Gi,t.matMenuAnimations=Mi,t.fadeInItems=Ii,t.transformMenu=Ri,t.MatMenuContent=Fi,t.MatPaginatorModule=So,t.PageEvent=Co,t.MatPaginator=xo,t.MatPaginatorIntl=bo,t.MAT_PAGINATOR_INTL_PROVIDER_FACTORY=_o,t.MAT_PAGINATOR_INTL_PROVIDER=wo,t.MatProgressBarModule=Do,t.MatProgressBarBase=Eo,t._MatProgressBarMixinBase=ko,t.MatProgressBar=Po,t.MatProgressSpinnerModule=Lo,t.MatProgressSpinnerBase=Mo,t._MatProgressSpinnerMixinBase=Io,t.MatProgressSpinner=Ro,t.MatSpinner=No,t.MatRadioModule=qo,t.MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR=Fo,t.MatRadioChange=Vo,t.MatRadioGroupBase=Bo,t._MatRadioGroupMixinBase=Uo,t.MatRadioGroup=Ho,t.MatRadioButtonBase=zo,t._MatRadioButtonMixinBase=Go,t.MatRadioButton=Wo,t.MatSelectModule=oo,t.SELECT_PANEL_MAX_HEIGHT=256,t.SELECT_PANEL_PADDING_X=16,t.SELECT_PANEL_INDENT_PADDING_X=32,t.SELECT_ITEM_HEIGHT_EM=3,t.SELECT_MULTIPLE_PANEL_PADDING_X=44,t.SELECT_PANEL_VIEWPORT_PADDING=8,t.MAT_SELECT_SCROLL_STRATEGY=Xi,t.MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY=Zi,t.MAT_SELECT_SCROLL_STRATEGY_PROVIDER=Ji,t.MatSelectChange=to,t.MatSelectBase=eo,t._MatSelectMixinBase=no,t.MatSelectTrigger=ro,t.MatSelect=io,t.matSelectAnimations=Yi,t.transformPanel=$i,t.fadeInContent=Ki,t.MatSidenavModule=ra,t.throwMatDuplicatedDrawerError=$o,t.MatDrawerToggleResult=Ko,t.MAT_DRAWER_DEFAULT_AUTOSIZE=Qo,t.MatDrawerContent=Xo,t.MatDrawer=Zo,t.MatDrawerContainer=Jo,t.MatSidenavContent=ta,t.MatSidenav=ea,t.MatSidenavContainer=na,t.matDrawerAnimations=Yo,t.MatSlideToggleModule=pa,t.MAT_SLIDE_TOGGLE_VALUE_ACCESSOR=oa,t.MatSlideToggleChange=aa,t.MatSlideToggleBase=sa,t._MatSlideToggleMixinBase=la,t.MatSlideToggle=ca,t.MatSliderModule=ya,t.MAT_SLIDER_VALUE_ACCESSOR=da,t.MatSliderChange=ha,t.MatSliderBase=fa,t._MatSliderMixinBase=ma,t.MatSlider=ga,t.MatSnackBarModule=Pa,t.MatSnackBar=ka,t.MatSnackBarContainer=Ea,t.MAT_SNACK_BAR_DATA=ba,t.MatSnackBarConfig=_a,t.MatSnackBarRef=va,t.SimpleSnackBar=Sa,t.SHOW_ANIMATION=wa,t.HIDE_ANIMATION=Ca,t.matSnackBarAnimations=xa,t.MatSortModule=Ba,t.MatSortHeaderBase=ja,t._MatSortHeaderMixinBase=Fa,t.MatSortHeader=Va,t.MatSortHeaderIntl=Ma,t.MAT_SORT_HEADER_INTL_PROVIDER_FACTORY=Ia,t.MAT_SORT_HEADER_INTL_PROVIDER=Ra,t.MatSortBase=Aa,t._MatSortMixinBase=Da,t.MatSort=Ta,t.matSortAnimations=La,t.MatStepperModule=ts,t.MatStepLabel=Ua,t._MatStep=qa,t._MatStepper=Ya,t.MatStep=$a,t.MatStepper=Ka,t.MatHorizontalStepper=Qa,t.MatVerticalStepper=Xa,t.MatStepperNext=Za,t.MatStepperPrevious=Ja,t.MatStepHeader=za,t.MatStepperIntl=Ha,t.matStepperAnimations=Ga,t.MatStepperIcon=Wa,t.MatTableModule=ps,t.MatCellDef=ns,t.MatHeaderCellDef=rs,t.MatColumnDef=is,t.MatHeaderCell=os,t.MatCell=as,t.MatTable=es,t.MatHeaderRowDef=ss,t.MatRowDef=ls,t.MatHeaderRow=cs,t.MatRow=us,t.MatTableDataSource=ds,t.ɵe22=ms,t.ɵf22=gs,t.ɵa22=As,t.ɵb22=Ds,t.ɵc22=ks,t.ɵd22=Os,t.ɵi22=Ns,t.ɵg22=Ms,t.ɵj22=Ls,t.ɵh22=Is,t.MatInkBar=hs,t.MatTabBody=_s,t.MatTabBodyPortal=bs,t.MatTabHeader=Ts,t.MatTabLabelWrapper=Ps,t.MatTab=ys,t.MatTabLabel=fs,t.MatTabNav=Rs,t.MatTabLink=js,t.MatTabsModule=Fs,t.MatTabChangeEvent=Cs,t.MatTabGroupBase=xs,t._MatTabGroupMixinBase=Ss,t.MatTabGroup=Es,t.matTabsAnimations=vs,t.MatToolbarModule=Gs,t.MatToolbarBase=Vs,t._MatToolbarMixinBase=Bs,t.MatToolbarRow=Us,t.MatToolbar=Hs,t.throwToolbarMixedModesError=zs,t.MatTooltipModule=vo,t.SCROLL_THROTTLE_MS=so,t.TOOLTIP_PANEL_CLASS=lo,t.getMatTooltipInvalidPositionError=co,t.MAT_TOOLTIP_SCROLL_STRATEGY=uo,t.MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY=po,t.MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER=ho,t.MAT_TOOLTIP_DEFAULT_OPTIONS=fo,t.MatTooltip=mo,t.TooltipComponent=go,t.matTooltipAnimations=ao,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core"),t("@angular/cdk/bidi"),t("@angular/cdk/coercion"),t("rxjs/Subject"),t("rxjs/Observable"),t("@angular/platform-browser"),t("@angular/common"),t("@angular/cdk/platform"),t("@angular/cdk/keycodes"),t("@angular/cdk/a11y"),t("@angular/cdk/overlay"),t("@angular/cdk/portal"),t("rxjs/operators/filter"),t("rxjs/operators/take"),t("rxjs/operators/switchMap"),t("rxjs/operators/tap"),t("rxjs/operators/delay"),t("@angular/forms"),t("rxjs/observable/fromEvent"),t("rxjs/operators/startWith"),t("@angular/animations"),t("rxjs/observable/defer"),t("rxjs/observable/merge"),t("rxjs/observable/of"),t("@angular/cdk/collections"),t("@angular/cdk/observers"),t("rxjs/Subscription"),t("rxjs/operators/auditTime"),t("rxjs/operators/takeUntil"),t("@angular/cdk/accordion"),t("rxjs/operators/catchError"),t("rxjs/operators/finalize"),t("rxjs/operators/map"),t("rxjs/operators/share"),t("@angular/common/http"),t("rxjs/observable/forkJoin"),t("rxjs/observable/throw"),t("@angular/cdk/layout"),t("@angular/cdk/scrolling"),t("rxjs/operators/debounceTime"),t("@angular/cdk/table"),t("@angular/cdk/stepper"),t("rxjs/BehaviorSubject"),t("rxjs/operators/combineLatest"),t("rxjs/observable/empty")):i((r.ng=r.ng||{},r.ng.material=r.ng.material||{}),r.ng.core,r.ng.cdk.bidi,r.ng.cdk.coercion,r.Rx,r.Rx,r.ng.platformBrowser,r.ng.common,r.ng.cdk.platform,r.ng.cdk.keycodes,r.ng.cdk.a11y,r.ng.cdk.overlay,r.ng.cdk.portal,r.Rx.operators,r.Rx.operators,r.Rx.operators,r.Rx.operators,r.Rx.operators,r.ng.forms,r.Rx.Observable,r.Rx.operators,r.ng.animations,r.Rx.Observable,r.Rx.Observable,r.Rx.Observable,r.ng.cdk.collections,r.ng.cdk.observers,r.Rx,r.Rx.operators,r.Rx.operators,r.ng.cdk.accordion,r.Rx.operators,r.Rx.operators,r.Rx.operators,r.Rx.operators,r.ng.common.http,r.Rx.Observable,r.Rx.Observable,r.ng.cdk.layout,r.ng.cdk.scrolling,r.Rx.operators,r.ng.cdk.table,r.ng.cdk.stepper,r.Rx,r.Rx.operators,r.Rx.Observable)},{"@angular/animations":44,"@angular/cdk/a11y":45,"@angular/cdk/accordion":46,"@angular/cdk/bidi":47,"@angular/cdk/coercion":48,"@angular/cdk/collections":49,"@angular/cdk/keycodes":50,"@angular/cdk/layout":51,"@angular/cdk/observers":52,"@angular/cdk/overlay":53,"@angular/cdk/platform":54,"@angular/cdk/portal":55,"@angular/cdk/scrolling":56,"@angular/cdk/stepper":57,"@angular/cdk/table":58,"@angular/common":60,"@angular/common/http":59,"@angular/core":62,"@angular/forms":63,"@angular/platform-browser":67,"rxjs/BehaviorSubject":70,"rxjs/Observable":73,"rxjs/Subject":77,"rxjs/Subscription":80,"rxjs/observable/defer":97,"rxjs/observable/empty":98,"rxjs/observable/forkJoin":99,"rxjs/observable/fromEvent":101,"rxjs/observable/merge":104,"rxjs/observable/of":105,"rxjs/observable/throw":106,"rxjs/operators/auditTime":121,"rxjs/operators/catchError":122,"rxjs/operators/combineLatest":123,"rxjs/operators/debounceTime":126,"rxjs/operators/delay":128,"rxjs/operators/filter":130,"rxjs/operators/finalize":131,"rxjs/operators/map":134,"rxjs/operators/share":142,"rxjs/operators/startWith":143,"rxjs/operators/switchMap":144,"rxjs/operators/take":145,"rxjs/operators/takeUntil":147,"rxjs/operators/tap":148}],65:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i){"use strict";var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function a(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var s,l=((s=new Map).set(e.Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS,n.ANALYZE_FOR_ENTRY_COMPONENTS),s.set(e.Identifiers.ElementRef,n.ElementRef),s.set(e.Identifiers.NgModuleRef,n.NgModuleRef),s.set(e.Identifiers.ViewContainerRef,n.ViewContainerRef),s.set(e.Identifiers.ChangeDetectorRef,n.ChangeDetectorRef),s.set(e.Identifiers.QueryList,n.QueryList),s.set(e.Identifiers.TemplateRef,n.TemplateRef),s.set(e.Identifiers.CodegenComponentFactoryResolver,n.ɵCodegenComponentFactoryResolver),s.set(e.Identifiers.ComponentFactoryResolver,n.ComponentFactoryResolver),s.set(e.Identifiers.ComponentFactory,n.ComponentFactory),s.set(e.Identifiers.ComponentRef,n.ComponentRef),s.set(e.Identifiers.NgModuleFactory,n.NgModuleFactory),s.set(e.Identifiers.createModuleFactory,n.ɵcmf),s.set(e.Identifiers.moduleDef,n.ɵmod),s.set(e.Identifiers.moduleProviderDef,n.ɵmpd),s.set(e.Identifiers.RegisterModuleFactoryFn,n.ɵregisterModuleFactory),s.set(e.Identifiers.Injector,n.Injector),s.set(e.Identifiers.ViewEncapsulation,n.ViewEncapsulation),s.set(e.Identifiers.ChangeDetectionStrategy,n.ChangeDetectionStrategy),s.set(e.Identifiers.SecurityContext,n.SecurityContext),s.set(e.Identifiers.LOCALE_ID,n.LOCALE_ID),s.set(e.Identifiers.TRANSLATIONS_FORMAT,n.TRANSLATIONS_FORMAT),s.set(e.Identifiers.inlineInterpolate,n.ɵinlineInterpolate),s.set(e.Identifiers.interpolate,n.ɵinterpolate),s.set(e.Identifiers.EMPTY_ARRAY,n.ɵEMPTY_ARRAY),s.set(e.Identifiers.EMPTY_MAP,n.ɵEMPTY_MAP),s.set(e.Identifiers.Renderer,n.Renderer),s.set(e.Identifiers.viewDef,n.ɵvid),s.set(e.Identifiers.elementDef,n.ɵeld),s.set(e.Identifiers.anchorDef,n.ɵand),s.set(e.Identifiers.textDef,n.ɵted),s.set(e.Identifiers.directiveDef,n.ɵdid),s.set(e.Identifiers.providerDef,n.ɵprd),s.set(e.Identifiers.queryDef,n.ɵqud),s.set(e.Identifiers.pureArrayDef,n.ɵpad),s.set(e.Identifiers.pureObjectDef,n.ɵpod),s.set(e.Identifiers.purePipeDef,n.ɵppd),s.set(e.Identifiers.pipeDef,n.ɵpid),s.set(e.Identifiers.nodeValue,n.ɵnov),s.set(e.Identifiers.ngContentDef,n.ɵncd),s.set(e.Identifiers.unwrapValue,n.ɵunv),s.set(e.Identifiers.createRendererType2,n.ɵcrt),s.set(e.Identifiers.createComponentFactory,n.ɵccf),s),c=function(){function t(){this.builtinExternalReferences=new Map,this.reflectionCapabilities=new n.ɵReflectionCapabilities}return t.prototype.componentModuleUrl=function(t,r){var i=r.moduleId;if("string"==typeof i)return e.getUrlScheme(i)?i:"package:"+i;if(null!=i)throw e.syntaxError('moduleId should be a string in "'+n.ɵstringify(t)+"\". See https://goo.gl/wIDDiL for more information.\nIf you're using Webpack you should inline the template and the styles, see https://goo.gl/X2J8zc.");return"./"+n.ɵstringify(t)},t.prototype.parameters=function(t){return this.reflectionCapabilities.parameters(t)},t.prototype.annotations=function(t){return this.reflectionCapabilities.annotations(t)},t.prototype.propMetadata=function(t){return this.reflectionCapabilities.propMetadata(t)},t.prototype.hasLifecycleHook=function(t,e){return this.reflectionCapabilities.hasLifecycleHook(t,e)},t.prototype.guards=function(t){return this.reflectionCapabilities.guards(t)},t.prototype.resolveExternalReference=function(t){return l.get(t)||t.runtime},t}();var u=new n.InjectionToken("ErrorCollector"),p={provide:n.PACKAGE_ROOT_URL,useValue:"/"},d={get:function(t){throw new Error("No ResourceLoader implementation has been provided. Can't read the url \""+t+'"')}},h=new n.InjectionToken("HtmlParser"),f=function(){function t(t,n,r,i,o,a,s,l,c,u){this._metadataResolver=n,this._delegate=new e.JitCompiler(n,r,i,o,a,s,l,c,u,this.getExtraNgModuleProviders.bind(this)),this.injector=t}return t.prototype.getExtraNgModuleProviders=function(){return[this._metadataResolver.getProviderMetadata(new e.ProviderMeta(n.Compiler,{useValue:this}))]},t.prototype.compileModuleSync=function(t){return this._delegate.compileModuleSync(t)},t.prototype.compileModuleAsync=function(t){return this._delegate.compileModuleAsync(t)},t.prototype.compileModuleAndAllComponentsSync=function(t){var e=this._delegate.compileModuleAndAllComponentsSync(t);return{ngModuleFactory:e.ngModuleFactory,componentFactories:e.componentFactories}},t.prototype.compileModuleAndAllComponentsAsync=function(t){return this._delegate.compileModuleAndAllComponentsAsync(t).then(function(t){return{ngModuleFactory:t.ngModuleFactory,componentFactories:t.componentFactories}})},t.prototype.loadAotSummaries=function(t){this._delegate.loadAotSummaries(t)},t.prototype.hasAotSummary=function(t){return this._delegate.hasAotSummary(t)},t.prototype.getComponentFactory=function(t){return this._delegate.getComponentFactory(t)},t.prototype.clearCache=function(){this._delegate.clearCache()},t.prototype.clearCacheFor=function(t){this._delegate.clearCacheFor(t)},t}(),m=[{provide:e.CompileReflector,useValue:new c},{provide:e.ResourceLoader,useValue:d},{provide:e.JitSummaryResolver,deps:[]},{provide:e.SummaryResolver,useExisting:e.JitSummaryResolver},{provide:n.ɵConsole,deps:[]},{provide:e.Lexer,deps:[]},{provide:e.Parser,deps:[e.Lexer]},{provide:h,useClass:e.HtmlParser,deps:[]},{provide:e.I18NHtmlParser,useFactory:function(t,r,i,o,a){var s=(r=r||"")?o.missingTranslation:n.MissingTranslationStrategy.Ignore;return new e.I18NHtmlParser(t,r,i,s,a)},deps:[h,[new n.Optional,new n.Inject(n.TRANSLATIONS)],[new n.Optional,new n.Inject(n.TRANSLATIONS_FORMAT)],[e.CompilerConfig],[n.ɵConsole]]},{provide:e.HtmlParser,useExisting:e.I18NHtmlParser},{provide:e.TemplateParser,deps:[e.CompilerConfig,e.CompileReflector,e.Parser,e.ElementSchemaRegistry,e.I18NHtmlParser,n.ɵConsole]},{provide:e.DirectiveNormalizer,deps:[e.ResourceLoader,e.UrlResolver,e.HtmlParser,e.CompilerConfig]},{provide:e.CompileMetadataResolver,deps:[e.CompilerConfig,e.HtmlParser,e.NgModuleResolver,e.DirectiveResolver,e.PipeResolver,e.SummaryResolver,e.ElementSchemaRegistry,e.DirectiveNormalizer,n.ɵConsole,[n.Optional,e.StaticSymbolCache],e.CompileReflector,[n.Optional,u]]},p,{provide:e.StyleCompiler,deps:[e.UrlResolver]},{provide:e.ViewCompiler,deps:[e.CompileReflector]},{provide:e.NgModuleCompiler,deps:[e.CompileReflector]},{provide:e.CompilerConfig,useValue:new e.CompilerConfig},{provide:n.Compiler,useClass:f,deps:[n.Injector,e.CompileMetadataResolver,e.TemplateParser,e.StyleCompiler,e.ViewCompiler,e.NgModuleCompiler,e.SummaryResolver,e.CompileReflector,e.CompilerConfig,n.ɵConsole]},{provide:e.DomElementSchemaRegistry,deps:[]},{provide:e.ElementSchemaRegistry,useExisting:e.DomElementSchemaRegistry},{provide:e.UrlResolver,deps:[n.PACKAGE_ROOT_URL]},{provide:e.DirectiveResolver,deps:[e.CompileReflector]},{provide:e.PipeResolver,deps:[e.CompileReflector]},{provide:e.NgModuleResolver,deps:[e.CompileReflector]}],g=function(){function t(t){var e={useJit:!0,defaultEncapsulation:n.ViewEncapsulation.Emulated,missingTranslation:n.MissingTranslationStrategy.Warning,enableLegacyTemplate:!1};this._defaultOptions=[e].concat(t)}return t.prototype.createCompiler=function(t){void 0===t&&(t=[]);var r,i,o,a={useJit:y((r=this._defaultOptions.concat(t)).map(function(t){return t.useJit})),defaultEncapsulation:y(r.map(function(t){return t.defaultEncapsulation})),providers:(i=r.map(function(t){return t.providers}),o=[],i.forEach(function(t){return t&&o.push.apply(o,t)}),o),missingTranslation:y(r.map(function(t){return t.missingTranslation})),enableLegacyTemplate:y(r.map(function(t){return t.enableLegacyTemplate})),preserveWhitespaces:y(r.map(function(t){return t.preserveWhitespaces}))};return n.Injector.create([m,{provide:e.CompilerConfig,useFactory:function(){return new e.CompilerConfig({useJit:a.useJit,jitDevMode:n.isDevMode(),defaultEncapsulation:a.defaultEncapsulation,missingTranslation:a.missingTranslation,enableLegacyTemplate:a.enableLegacyTemplate,preserveWhitespaces:a.preserveWhitespaces})},deps:[]},a.providers]).get(n.Compiler)},t}();function y(t){for(var e=t.length-1;e>=0;e--)if(void 0!==t[e])return t[e]}var v=n.createPlatformFactory(n.platformCore,"coreDynamic",[{provide:n.COMPILER_OPTIONS,useValue:{},multi:!0},{provide:n.CompilerFactory,useClass:g,deps:[n.COMPILER_OPTIONS]}]),b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.get=function(t){var e,n,r=new Promise(function(t,r){e=t,n=r}),i=new XMLHttpRequest;return i.open("GET",t,!0),i.responseType="text",i.onload=function(){var r=i.response||i.responseText,o=1223===i.status?204:i.status;0===o&&(o=r?200:0),200<=o&&o<=300?e(r):n("Failed to load "+t)},i.onerror=function(){n("Failed to load "+t)},i.send(),r},e.decorators=[{type:n.Injectable}],e.ctorParameters=function(){return[]},e}(e.ResourceLoader),_=[i.ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS,{provide:n.COMPILER_OPTIONS,useValue:{providers:[{provide:e.ResourceLoader,useClass:b,deps:[]}]},multi:!0},{provide:n.PLATFORM_ID,useValue:r.ɵPLATFORM_BROWSER_ID}],w=function(t){function e(){var e=t.call(this)||this;if(e._cache=n.ɵglobal.$templateCache,null==e._cache)throw new Error("CachedResourceLoader: Template cache was not found in $templateCache.");return e}return a(e,t),e.prototype.get=function(t){return this._cache.hasOwnProperty(t)?Promise.resolve(this._cache[t]):Promise.reject("CachedResourceLoader: Did not find cached template for "+t)},e}(e.ResourceLoader),C=new n.Version("5.2.6"),x=[{provide:e.ResourceLoader,useClass:w,deps:[]}],S=n.createPlatformFactory(v,"browserDynamic",_);t.VERSION=C,t.JitCompilerFactory=g,t.RESOURCE_CACHE_PROVIDER=x,t.platformBrowserDynamic=S,t.ɵCompilerImpl=f,t.ɵplatformCoreDynamic=v,t.ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS=_,t.ɵResourceLoaderImpl=b,t.ɵa=w,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/compiler"),t("@angular/core"),t("@angular/common"),t("@angular/platform-browser")):i((r.ng=r.ng||{},r.ng.platformBrowserDynamic={}),r.ng.compiler,r.ng.core,r.ng.common,r.ng.platformBrowser)},{"@angular/common":60,"@angular/compiler":61,"@angular/core":62,"@angular/platform-browser":67}],66:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i){"use strict";var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function a(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var s=function(t){function i(n,r){var i=t.call(this)||this;i._nextAnimationId=0;var o={id:"0",encapsulation:e.ViewEncapsulation.None,styles:[],data:{animation:[]}};return i._renderer=n.createRenderer(r.body,o),i}return a(i,t),i.prototype.build=function(t){var e=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(t)?r.sequence(t):t;return u(this._renderer,null,e,"register",[n]),new l(e,this._renderer)},i.decorators=[{type:e.Injectable}],i.ctorParameters=function(){return[{type:e.RendererFactory2},{type:void 0,decorators:[{type:e.Inject,args:[n.DOCUMENT]}]}]},i}(r.AnimationBuilder),l=function(t){function e(e,n){var r=t.call(this)||this;return r._id=e,r._renderer=n,r}return a(e,t),e.prototype.create=function(t,e){return new c(this._id,t,e||{},this._renderer)},e}(r.AnimationFactory),c=function(){function t(t,e,n,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}return t.prototype._listen=function(t,e){return this._renderer.listen(this.element,"@@"+this.id+":"+t,e)},t.prototype._command=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return u(this._renderer,this.element,this.id,t,e)},t.prototype.onDone=function(t){this._listen("done",t)},t.prototype.onStart=function(t){this._listen("start",t)},t.prototype.onDestroy=function(t){this._listen("destroy",t)},t.prototype.init=function(){this._command("init")},t.prototype.hasStarted=function(){return this._started},t.prototype.play=function(){this._command("play"),this._started=!0},t.prototype.pause=function(){this._command("pause")},t.prototype.restart=function(){this._command("restart")},t.prototype.finish=function(){this._command("finish")},t.prototype.destroy=function(){this._command("destroy")},t.prototype.reset=function(){this._command("reset")},t.prototype.setPosition=function(t){this._command("setPosition",t)},t.prototype.getPosition=function(){return 0},t}();function u(t,e,n,r,i){return t.setProperty(e,"@@"+n+":"+r,i)}var p="@.disabled",d=function(){function t(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=function(t,e){e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}return t.prototype.createRenderer=function(t,e){var n=this,r=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){var i=this._rendererCache.get(r);return i||(i=new h("",r,this.engine),this._rendererCache.set(r,i)),i}var o=e.id,a=e.id+"-"+this._currentId;return this._currentId++,this.engine.register(a,t),e.data.animation.forEach(function(e){return n.engine.registerTrigger(o,a,t,e.name,e)}),new f(this,a,r,this.engine)},t.prototype.begin=function(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()},t.prototype._scheduleCountTask=function(){var t=this;this.promise.then(function(){t._microtaskId++})},t.prototype.scheduleListenerCallback=function(t,e,n){var r=this;t>=0&&t<this._microtaskId?this._zone.run(function(){return e(n)}):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(function(){r._zone.run(function(){r._animationCallbacksBuffer.forEach(function(t){(0,t[0])(t[1])}),r._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,n]))},t.prototype.end=function(){var t=this;this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(function(){t._scheduleCountTask(),t.engine.flush(t._microtaskId)}),this.delegate.end&&this.delegate.end()},t.prototype.whenRenderingDone=function(){return this.engine.whenRenderingDone()},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:e.RendererFactory2},{type:i.ɵAnimationEngine},{type:e.NgZone}]},t}(),h=function(){function t(t,e,n){this.namespaceId=t,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?function(t){return e.destroyNode(t)}:null}return Object.defineProperty(t.prototype,"data",{get:function(){return this.delegate.data},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()},t.prototype.createElement=function(t,e){return this.delegate.createElement(t,e)},t.prototype.createComment=function(t){return this.delegate.createComment(t)},t.prototype.createText=function(t){return this.delegate.createText(t)},t.prototype.appendChild=function(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)},t.prototype.insertBefore=function(t,e,n){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,!0)},t.prototype.removeChild=function(t,e){this.engine.onRemove(this.namespaceId,e,this.delegate)},t.prototype.selectRootElement=function(t){return this.delegate.selectRootElement(t)},t.prototype.parentNode=function(t){return this.delegate.parentNode(t)},t.prototype.nextSibling=function(t){return this.delegate.nextSibling(t)},t.prototype.setAttribute=function(t,e,n,r){this.delegate.setAttribute(t,e,n,r)},t.prototype.removeAttribute=function(t,e,n){this.delegate.removeAttribute(t,e,n)},t.prototype.addClass=function(t,e){this.delegate.addClass(t,e)},t.prototype.removeClass=function(t,e){this.delegate.removeClass(t,e)},t.prototype.setStyle=function(t,e,n,r){this.delegate.setStyle(t,e,n,r)},t.prototype.removeStyle=function(t,e,n){this.delegate.removeStyle(t,e,n)},t.prototype.setProperty=function(t,e,n){"@"==e.charAt(0)&&e==p?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)},t.prototype.setValue=function(t,e){this.delegate.setValue(t,e)},t.prototype.listen=function(t,e,n){return this.delegate.listen(t,e,n)},t.prototype.disableAnimations=function(t,e){this.engine.disableAnimations(t,e)},t}(),f=function(t){function e(e,n,r,i){var o=t.call(this,n,r,i)||this;return o.factory=e,o.namespaceId=n,o}return a(e,t),e.prototype.setProperty=function(t,e,n){"@"==e.charAt(0)?"."==e.charAt(1)&&e==p?(n=void 0===n||!!n,this.disableAnimations(t,n)):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)},e.prototype.listen=function(t,e,n){var r,i,o,a,s,l=this;if("@"==e.charAt(0)){var c=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t),u=e.substr(1),p="";return"@"!=u.charAt(0)&&(i=(r=u).indexOf("."),o=r.substring(0,i),a=r.substr(i+1),u=(s=[o,a])[0],p=s[1]),this.engine.listen(this.namespaceId,c,u,p,function(t){var e=t._data||-1;l.factory.scheduleListenerCallback(e,n,t)})}return this.delegate.listen(t,e,n)},e}(h);var m=function(t){function n(e,n){return t.call(this,e,n)||this}return a(n,t),n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[{type:i.AnimationDriver},{type:i.ɵAnimationStyleNormalizer}]},n}(i.ɵAnimationEngine);function g(){return i.ɵsupportsWebAnimations()?new i.ɵWebAnimationsDriver:new i.ɵNoopAnimationDriver}function y(){return new i.ɵWebAnimationsStyleNormalizer}function v(t,e,n){return new d(t,e,n)}var b=[{provide:r.AnimationBuilder,useClass:s},{provide:i.ɵAnimationStyleNormalizer,useFactory:y},{provide:i.ɵAnimationEngine,useClass:m},{provide:e.RendererFactory2,useFactory:v,deps:[n.ɵDomRendererFactory2,i.ɵAnimationEngine,e.NgZone]}],_=[{provide:i.AnimationDriver,useFactory:g}].concat(b),w=[{provide:i.AnimationDriver,useClass:i.ɵNoopAnimationDriver}].concat(b),C=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{exports:[n.BrowserModule],providers:_}]}],t.ctorParameters=function(){return[]},t}(),x=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{exports:[n.BrowserModule],providers:w}]}],t.ctorParameters=function(){return[]},t}();t.BrowserAnimationsModule=C,t.NoopAnimationsModule=x,t.ɵBrowserAnimationBuilder=s,t.ɵBrowserAnimationFactory=l,t.ɵAnimationRenderer=f,t.ɵAnimationRendererFactory=d,t.ɵa=h,t.ɵf=_,t.ɵg=w,t.ɵb=m,t.ɵd=y,t.ɵe=v,t.ɵc=g,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core"),t("@angular/platform-browser"),t("@angular/animations"),t("@angular/animations/browser")):i((r.ng=r.ng||{},r.ng.platformBrowser=r.ng.platformBrowser||{},r.ng.platformBrowser.animations={}),r.ng.core,r.ng.platformBrowser,r.ng.animations,r.ng.animations.browser)},{"@angular/animations":44,"@angular/animations/browser":43,"@angular/core":62,"@angular/platform-browser":67}],67:[function(t,e,n){var r,i;r=this,i=function(t,e,n){"use strict";var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a=null;function s(){return a}function l(t){a||(a=t)}var c,u=function(){function t(){this.resourceLoaderType=null}return Object.defineProperty(t.prototype,"attrToPropMap",{get:function(){return this._attrToPropMap},set:function(t){this._attrToPropMap=t},enumerable:!0,configurable:!0}),t}(),p=function(t){function e(){var e=t.call(this)||this;e._animationPrefix=null,e._transitionEnd=null;try{var n=e.createElement("div",document);if(null!=e.getStyle(n,"animationName"))e._animationPrefix="";else for(var r=["Webkit","Moz","O","ms"],i=0;i<r.length;i++)if(null!=e.getStyle(n,r[i]+"AnimationName")){e._animationPrefix="-"+r[i].toLowerCase()+"-";break}var o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};Object.keys(o).forEach(function(t){null!=e.getStyle(n,t)&&(e._transitionEnd=o[t])})}catch(t){e._animationPrefix=null,e._transitionEnd=null}return e}return i(e,t),e.prototype.getDistributedNodes=function(t){return t.getDistributedNodes()},e.prototype.resolveAndSetHref=function(t,e,n){t.href=null==n?e:e+"/../"+n},e.prototype.supportsDOMEvents=function(){return!0},e.prototype.supportsNativeShadowDOM=function(){return"function"==typeof document.body.createShadowRoot},e.prototype.getAnimationPrefix=function(){return this._animationPrefix?this._animationPrefix:""},e.prototype.getTransitionEnd=function(){return this._transitionEnd?this._transitionEnd:""},e.prototype.supportsAnimation=function(){return null!=this._animationPrefix&&null!=this._transitionEnd},e}(u),d={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},h={"\b":"Backspace","\t":"Tab","":"Delete","":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},f={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","":"NumLock"};n.ɵglobal.Node&&(c=n.ɵglobal.Node.prototype.contains||function(t){return!!(16&this.compareDocumentPosition(t))});var m,g=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.prototype.parse=function(t){throw new Error("parse not implemented")},n.makeCurrent=function(){l(new n)},n.prototype.hasProperty=function(t,e){return e in t},n.prototype.setProperty=function(t,e,n){t[e]=n},n.prototype.getProperty=function(t,e){return t[e]},n.prototype.invoke=function(t,e,n){var r;(r=t)[e].apply(r,n)},n.prototype.logError=function(t){window.console&&(console.error?console.error(t):console.log(t))},n.prototype.log=function(t){window.console&&window.console.log&&window.console.log(t)},n.prototype.logGroup=function(t){window.console&&window.console.group&&window.console.group(t)},n.prototype.logGroupEnd=function(){window.console&&window.console.groupEnd&&window.console.groupEnd()},Object.defineProperty(n.prototype,"attrToPropMap",{get:function(){return d},enumerable:!0,configurable:!0}),n.prototype.contains=function(t,e){return c.call(t,e)},n.prototype.querySelector=function(t,e){return t.querySelector(e)},n.prototype.querySelectorAll=function(t,e){return t.querySelectorAll(e)},n.prototype.on=function(t,e,n){t.addEventListener(e,n,!1)},n.prototype.onAndCancel=function(t,e,n){return t.addEventListener(e,n,!1),function(){t.removeEventListener(e,n,!1)}},n.prototype.dispatchEvent=function(t,e){t.dispatchEvent(e)},n.prototype.createMouseEvent=function(t){var e=this.getDefaultDocument().createEvent("MouseEvent");return e.initEvent(t,!0,!0),e},n.prototype.createEvent=function(t){var e=this.getDefaultDocument().createEvent("Event");return e.initEvent(t,!0,!0),e},n.prototype.preventDefault=function(t){t.preventDefault(),t.returnValue=!1},n.prototype.isPrevented=function(t){return t.defaultPrevented||null!=t.returnValue&&!t.returnValue},n.prototype.getInnerHTML=function(t){return t.innerHTML},n.prototype.getTemplateContent=function(t){return"content"in t&&this.isTemplateElement(t)?t.content:null},n.prototype.getOuterHTML=function(t){return t.outerHTML},n.prototype.nodeName=function(t){return t.nodeName},n.prototype.nodeValue=function(t){return t.nodeValue},n.prototype.type=function(t){return t.type},n.prototype.content=function(t){return this.hasProperty(t,"content")?t.content:t},n.prototype.firstChild=function(t){return t.firstChild},n.prototype.nextSibling=function(t){return t.nextSibling},n.prototype.parentElement=function(t){return t.parentNode},n.prototype.childNodes=function(t){return t.childNodes},n.prototype.childNodesAsList=function(t){for(var e=t.childNodes,n=new Array(e.length),r=0;r<e.length;r++)n[r]=e[r];return n},n.prototype.clearNodes=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},n.prototype.appendChild=function(t,e){t.appendChild(e)},n.prototype.removeChild=function(t,e){t.removeChild(e)},n.prototype.replaceChild=function(t,e,n){t.replaceChild(e,n)},n.prototype.remove=function(t){return t.parentNode&&t.parentNode.removeChild(t),t},n.prototype.insertBefore=function(t,e,n){t.insertBefore(n,e)},n.prototype.insertAllBefore=function(t,e,n){n.forEach(function(n){return t.insertBefore(n,e)})},n.prototype.insertAfter=function(t,e,n){t.insertBefore(n,e.nextSibling)},n.prototype.setInnerHTML=function(t,e){t.innerHTML=e},n.prototype.getText=function(t){return t.textContent},n.prototype.setText=function(t,e){t.textContent=e},n.prototype.getValue=function(t){return t.value},n.prototype.setValue=function(t,e){t.value=e},n.prototype.getChecked=function(t){return t.checked},n.prototype.setChecked=function(t,e){t.checked=e},n.prototype.createComment=function(t){return this.getDefaultDocument().createComment(t)},n.prototype.createTemplate=function(t){var e=this.getDefaultDocument().createElement("template");return e.innerHTML=t,e},n.prototype.createElement=function(t,e){return(e=e||this.getDefaultDocument()).createElement(t)},n.prototype.createElementNS=function(t,e,n){return(n=n||this.getDefaultDocument()).createElementNS(t,e)},n.prototype.createTextNode=function(t,e){return(e=e||this.getDefaultDocument()).createTextNode(t)},n.prototype.createScriptTag=function(t,e,n){var r=(n=n||this.getDefaultDocument()).createElement("SCRIPT");return r.setAttribute(t,e),r},n.prototype.createStyleElement=function(t,e){var n=(e=e||this.getDefaultDocument()).createElement("style");return this.appendChild(n,this.createTextNode(t,e)),n},n.prototype.createShadowRoot=function(t){return t.createShadowRoot()},n.prototype.getShadowRoot=function(t){return t.shadowRoot},n.prototype.getHost=function(t){return t.host},n.prototype.clone=function(t){return t.cloneNode(!0)},n.prototype.getElementsByClassName=function(t,e){return t.getElementsByClassName(e)},n.prototype.getElementsByTagName=function(t,e){return t.getElementsByTagName(e)},n.prototype.classList=function(t){return Array.prototype.slice.call(t.classList,0)},n.prototype.addClass=function(t,e){t.classList.add(e)},n.prototype.removeClass=function(t,e){t.classList.remove(e)},n.prototype.hasClass=function(t,e){return t.classList.contains(e)},n.prototype.setStyle=function(t,e,n){t.style[e]=n},n.prototype.removeStyle=function(t,e){t.style[e]=""},n.prototype.getStyle=function(t,e){return t.style[e]},n.prototype.hasStyle=function(t,e,n){var r=this.getStyle(t,e)||"";return n?r==n:r.length>0},n.prototype.tagName=function(t){return t.tagName},n.prototype.attributeMap=function(t){for(var e=new Map,n=t.attributes,r=0;r<n.length;r++){var i=n.item(r);e.set(i.name,i.value)}return e},n.prototype.hasAttribute=function(t,e){return t.hasAttribute(e)},n.prototype.hasAttributeNS=function(t,e,n){return t.hasAttributeNS(e,n)},n.prototype.getAttribute=function(t,e){return t.getAttribute(e)},n.prototype.getAttributeNS=function(t,e,n){return t.getAttributeNS(e,n)},n.prototype.setAttribute=function(t,e,n){t.setAttribute(e,n)},n.prototype.setAttributeNS=function(t,e,n,r){t.setAttributeNS(e,n,r)},n.prototype.removeAttribute=function(t,e){t.removeAttribute(e)},n.prototype.removeAttributeNS=function(t,e,n){t.removeAttributeNS(e,n)},n.prototype.templateAwareRoot=function(t){return this.isTemplateElement(t)?this.content(t):t},n.prototype.createHtmlDocument=function(){return document.implementation.createHTMLDocument("fakeTitle")},n.prototype.getDefaultDocument=function(){return document},n.prototype.getBoundingClientRect=function(t){try{return t.getBoundingClientRect()}catch(t){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}},n.prototype.getTitle=function(t){return t.title},n.prototype.setTitle=function(t,e){t.title=e||""},n.prototype.elementMatches=function(t,e){return!!this.isElementNode(t)&&(t.matches&&t.matches(e)||t.msMatchesSelector&&t.msMatchesSelector(e)||t.webkitMatchesSelector&&t.webkitMatchesSelector(e))},n.prototype.isTemplateElement=function(t){return this.isElementNode(t)&&"TEMPLATE"===t.nodeName},n.prototype.isTextNode=function(t){return t.nodeType===Node.TEXT_NODE},n.prototype.isCommentNode=function(t){return t.nodeType===Node.COMMENT_NODE},n.prototype.isElementNode=function(t){return t.nodeType===Node.ELEMENT_NODE},n.prototype.hasShadowRoot=function(t){return null!=t.shadowRoot&&t instanceof HTMLElement},n.prototype.isShadowRoot=function(t){return t instanceof DocumentFragment},n.prototype.importIntoDoc=function(t){return document.importNode(this.templateAwareRoot(t),!0)},n.prototype.adoptNode=function(t){return document.adoptNode(t)},n.prototype.getHref=function(t){return t.getAttribute("href")},n.prototype.getEventKey=function(t){var e=t.key;if(null==e){if(null==(e=t.keyIdentifier))return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&f.hasOwnProperty(e)&&(e=f[e]))}return h[e]||e},n.prototype.getGlobalEventTarget=function(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null},n.prototype.getHistory=function(){return window.history},n.prototype.getLocation=function(){return window.location},n.prototype.getBaseHref=function(t){var e=function(){if(!y&&!(y=document.querySelector("base")))return null;return y.getAttribute("href")}();return null==e?null:function(t){m||(m=document.createElement("a"));return m.setAttribute("href",t),"/"===m.pathname.charAt(0)?m.pathname:"/"+m.pathname}(e)},n.prototype.resetBaseElement=function(){y=null},n.prototype.getUserAgent=function(){return window.navigator.userAgent},n.prototype.setData=function(t,e,n){this.setAttribute(t,"data-"+e,n)},n.prototype.getData=function(t,e){return this.getAttribute(t,"data-"+e)},n.prototype.getComputedStyle=function(t){return getComputedStyle(t)},n.prototype.supportsWebAnimation=function(){return"function"==typeof Element.prototype.animate},n.prototype.performanceNow=function(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()},n.prototype.supportsCookies=function(){return!0},n.prototype.getCookie=function(t){return e.ɵparseCookieValue(document.cookie,t)},n.prototype.setCookie=function(t,e){document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)},n}(p),y=null;var v=e.DOCUMENT;function b(){return!!window.history.pushState}var _=function(t){function e(e){var n=t.call(this)||this;return n._doc=e,n._init(),n}return i(e,t),e.prototype._init=function(){this.location=s().getLocation(),this._history=s().getHistory()},e.prototype.getBaseHrefFromDOM=function(){return s().getBaseHref(this._doc)},e.prototype.onPopState=function(t){s().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)},e.prototype.onHashChange=function(t){s().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)},Object.defineProperty(e.prototype,"pathname",{get:function(){return this.location.pathname},set:function(t){this.location.pathname=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"search",{get:function(){return this.location.search},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hash",{get:function(){return this.location.hash},enumerable:!0,configurable:!0}),e.prototype.pushState=function(t,e,n){b()?this._history.pushState(t,e,n):this.location.hash=n},e.prototype.replaceState=function(t,e,n){b()?this._history.replaceState(t,e,n):this.location.hash=n},e.prototype.forward=function(){this._history.forward()},e.prototype.back=function(){this._history.back()},e.decorators=[{type:n.Injectable}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[v]}]}]},e}(e.PlatformLocation),w=function(){function t(t){this._doc=t,this._dom=s()}return t.prototype.addTag=function(t,e){return void 0===e&&(e=!1),t?this._getOrCreateElement(t,e):null},t.prototype.addTags=function(t,e){var n=this;return void 0===e&&(e=!1),t?t.reduce(function(t,r){return r&&t.push(n._getOrCreateElement(r,e)),t},[]):[]},t.prototype.getTag=function(t){return t&&this._dom.querySelector(this._doc,"meta["+t+"]")||null},t.prototype.getTags=function(t){if(!t)return[];var e=this._dom.querySelectorAll(this._doc,"meta["+t+"]");return e?[].slice.call(e):[]},t.prototype.updateTag=function(t,e){if(!t)return null;e=e||this._parseSelector(t);var n=this.getTag(e);return n?this._setMetaElementAttributes(t,n):this._getOrCreateElement(t,!0)},t.prototype.removeTag=function(t){this.removeTagElement(this.getTag(t))},t.prototype.removeTagElement=function(t){t&&this._dom.remove(t)},t.prototype._getOrCreateElement=function(t,e){if(void 0===e&&(e=!1),!e){var n=this._parseSelector(t),r=this.getTag(n);if(r&&this._containsAttributes(t,r))return r}var i=this._dom.createElement("meta");this._setMetaElementAttributes(t,i);var o=this._dom.getElementsByTagName(this._doc,"head")[0];return this._dom.appendChild(o,i),i},t.prototype._setMetaElementAttributes=function(t,e){var n=this;return Object.keys(t).forEach(function(r){return n._dom.setAttribute(e,r,t[r])}),e},t.prototype._parseSelector=function(t){var e=t.name?"name":"property";return e+'="'+t[e]+'"'},t.prototype._containsAttributes=function(t,e){var n=this;return Object.keys(t).every(function(r){return n._dom.getAttribute(e,r)===t[r]})},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[v]}]}]},t}(),C=new n.InjectionToken("TRANSITION_ID");function x(t,e,r){return function(){r.get(n.ApplicationInitStatus).donePromise.then(function(){var n=s();Array.prototype.slice.apply(n.querySelectorAll(e,"style[ng-transition]")).filter(function(e){return n.getAttribute(e,"ng-transition")===t}).forEach(function(t){return n.remove(t)})})}}var S=[{provide:n.APP_INITIALIZER,useFactory:x,deps:[C,v,n.Injector],multi:!0}],E=function(){function t(){}return t.init=function(){n.setTestabilityGetter(new t)},t.prototype.addToWindow=function(t){n.ɵglobal.getAngularTestability=function(e,n){void 0===n&&(n=!0);var r=t.findTestabilityInTree(e,n);if(null==r)throw new Error("Could not find testability for element.");return r},n.ɵglobal.getAllAngularTestabilities=function(){return t.getAllTestabilities()},n.ɵglobal.getAllAngularRootElements=function(){return t.getAllRootElements()};n.ɵglobal.frameworkStabilizers||(n.ɵglobal.frameworkStabilizers=[]),n.ɵglobal.frameworkStabilizers.push(function(t){var e=n.ɵglobal.getAllAngularTestabilities(),r=e.length,i=!1,o=function(e){i=i||e,0==--r&&t(i)};e.forEach(function(t){t.whenStable(o)})})},t.prototype.findTestabilityInTree=function(t,e,n){if(null==e)return null;var r=t.getTestability(e);return null!=r?r:n?s().isShadowRoot(e)?this.findTestabilityInTree(t,s().getHost(e),!0):this.findTestabilityInTree(t,s().parentElement(e),!0):null},t}(),k=function(){function t(t){this._doc=t}return t.prototype.getTitle=function(){return s().getTitle(this._doc)},t.prototype.setTitle=function(t){s().setTitle(this._doc,t)},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[v]}]}]},t}();function O(t,e){"undefined"!=typeof COMPILED&&COMPILED||((n.ɵglobal.ng=n.ɵglobal.ng||{})[t]=e)}var P={ApplicationRef:n.ApplicationRef,NgZone:n.NgZone},A="probe",D="coreTokens";function T(t){return n.getDebugNode(t)}function M(t){return O(A,T),O(D,o({},P,(t||[]).reduce(function(t,e){return t[e.name]=e.token,t},{}))),function(){return T}}var I=[{provide:n.APP_INITIALIZER,useFactory:M,deps:[[n.NgProbeToken,new n.Optional]],multi:!0}],R=new n.InjectionToken("EventManagerPlugins"),N=function(){function t(t,e){var n=this;this._zone=e,this._eventNameToPlugin=new Map,t.forEach(function(t){return t.manager=n}),this._plugins=t.slice().reverse()}return t.prototype.addEventListener=function(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)},t.prototype.addGlobalEventListener=function(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)},t.prototype.getZone=function(){return this._zone},t.prototype._findPluginFor=function(t){var e=this._eventNameToPlugin.get(t);if(e)return e;for(var n=this._plugins,r=0;r<n.length;r++){var i=n[r];if(i.supports(t))return this._eventNameToPlugin.set(t,i),i}throw new Error("No event manager plugin found for event "+t)},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:Array,decorators:[{type:n.Inject,args:[R]}]},{type:n.NgZone}]},t}(),L=function(){function t(t){this._doc=t}return t.prototype.addGlobalEventListener=function(t,e,n){var r=s().getGlobalEventTarget(this._doc,t);if(!r)throw new Error("Unsupported event target "+r+" for event "+e);return this.addEventListener(r,e,n)},t}(),j=function(){function t(){this._stylesSet=new Set}return t.prototype.addStyles=function(t){var e=this,n=new Set;t.forEach(function(t){e._stylesSet.has(t)||(e._stylesSet.add(t),n.add(t))}),this.onStylesAdded(n)},t.prototype.onStylesAdded=function(t){},t.prototype.getAllStyles=function(){return Array.from(this._stylesSet)},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[]},t}(),F=function(t){function e(e){var n=t.call(this)||this;return n._doc=e,n._hostNodes=new Set,n._styleNodes=new Set,n._hostNodes.add(e.head),n}return i(e,t),e.prototype._addStylesToHost=function(t,e){var n=this;t.forEach(function(t){var r=n._doc.createElement("style");r.textContent=t,n._styleNodes.add(e.appendChild(r))})},e.prototype.addHost=function(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)},e.prototype.removeHost=function(t){this._hostNodes.delete(t)},e.prototype.onStylesAdded=function(t){var e=this;this._hostNodes.forEach(function(n){return e._addStylesToHost(t,n)})},e.prototype.ngOnDestroy=function(){this._styleNodes.forEach(function(t){return s().remove(t)})},e.decorators=[{type:n.Injectable}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[v]}]}]},e}(j),V={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},B=/%COMP%/g,U="_nghost-%COMP%",H="_ngcontent-%COMP%";function z(t){return H.replace(B,t)}function G(t){return U.replace(B,t)}function W(t,e,n){for(var r=0;r<e.length;r++){var i=e[r];Array.isArray(i)?W(t,i,n):(i=i.replace(B,t),n.push(i))}return n}function q(t){return function(e){!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}var Y=function(){function t(t,e){this.eventManager=t,this.sharedStylesHost=e,this.rendererByCompId=new Map,this.defaultRenderer=new $(t)}return t.prototype.createRenderer=function(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case n.ViewEncapsulation.Emulated:var r=this.rendererByCompId.get(e.id);return r||(r=new Z(this.eventManager,this.sharedStylesHost,e),this.rendererByCompId.set(e.id,r)),r.applyToHost(t),r;case n.ViewEncapsulation.Native:return new J(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){var i=W(e.id,e.styles,[]);this.sharedStylesHost.addStyles(i),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}},t.prototype.begin=function(){},t.prototype.end=function(){},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:N},{type:F}]},t}(),$=function(){function t(t){this.eventManager=t,this.data=Object.create(null)}return t.prototype.destroy=function(){},t.prototype.createElement=function(t,e){return e?document.createElementNS(V[e],t):document.createElement(t)},t.prototype.createComment=function(t){return document.createComment(t)},t.prototype.createText=function(t){return document.createTextNode(t)},t.prototype.appendChild=function(t,e){t.appendChild(e)},t.prototype.insertBefore=function(t,e,n){t&&t.insertBefore(e,n)},t.prototype.removeChild=function(t,e){t&&t.removeChild(e)},t.prototype.selectRootElement=function(t){var e="string"==typeof t?document.querySelector(t):t;if(!e)throw new Error('The selector "'+t+'" did not match any elements');return e.textContent="",e},t.prototype.parentNode=function(t){return t.parentNode},t.prototype.nextSibling=function(t){return t.nextSibling},t.prototype.setAttribute=function(t,e,n,r){if(r){e=r+":"+e;var i=V[r];i?t.setAttributeNS(i,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)},t.prototype.removeAttribute=function(t,e,n){if(n){var r=V[n];r?t.removeAttributeNS(r,e):t.removeAttribute(n+":"+e)}else t.removeAttribute(e)},t.prototype.addClass=function(t,e){t.classList.add(e)},t.prototype.removeClass=function(t,e){t.classList.remove(e)},t.prototype.setStyle=function(t,e,r,i){i&n.RendererStyleFlags2.DashCase?t.style.setProperty(e,r,i&n.RendererStyleFlags2.Important?"important":""):t.style[e]=r},t.prototype.removeStyle=function(t,e,r){r&n.RendererStyleFlags2.DashCase?t.style.removeProperty(e):t.style[e]=""},t.prototype.setProperty=function(t,e,n){Q(e,"property"),t[e]=n},t.prototype.setValue=function(t,e){t.nodeValue=e},t.prototype.listen=function(t,e,n){return Q(e,"listener"),"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,q(n)):this.eventManager.addEventListener(t,e,q(n))},t}(),K="@".charCodeAt(0);function Q(t,e){if(t.charCodeAt(0)===K)throw new Error("Found the synthetic "+e+" "+t+'. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.')}var X,Z=function(t){function e(e,n,r){var i=t.call(this,e)||this;i.component=r;var o=W(r.id,r.styles,[]);return n.addStyles(o),i.contentAttr=z(r.id),i.hostAttr=G(r.id),i}return i(e,t),e.prototype.applyToHost=function(e){t.prototype.setAttribute.call(this,e,this.hostAttr,"")},e.prototype.createElement=function(e,n){var r=t.prototype.createElement.call(this,e,n);return t.prototype.setAttribute.call(this,r,this.contentAttr,""),r},e}($),J=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;o.sharedStylesHost=n,o.hostEl=r,o.component=i,o.shadowRoot=r.createShadowRoot(),o.sharedStylesHost.addHost(o.shadowRoot);for(var a=W(i.id,i.styles,[]),s=0;s<a.length;s++){var l=document.createElement("style");l.textContent=a[s],o.shadowRoot.appendChild(l)}return o}return i(e,t),e.prototype.nodeOrShadowRoot=function(t){return t===this.hostEl?this.shadowRoot:t},e.prototype.destroy=function(){this.sharedStylesHost.removeHost(this.shadowRoot)},e.prototype.appendChild=function(e,n){return t.prototype.appendChild.call(this,this.nodeOrShadowRoot(e),n)},e.prototype.insertBefore=function(e,n,r){return t.prototype.insertBefore.call(this,this.nodeOrShadowRoot(e),n,r)},e.prototype.removeChild=function(e,n){return t.prototype.removeChild.call(this,this.nodeOrShadowRoot(e),n)},e.prototype.parentNode=function(e){return this.nodeOrShadowRoot(t.prototype.parentNode.call(this,this.nodeOrShadowRoot(e)))},e}($),tt="undefined"!=typeof Zone&&Zone.__symbol__||function(t){return"__zone_symbol__"+t},et=tt("addEventListener"),nt=tt("removeEventListener"),rt={},it="removeEventListener",ot="__zone_symbol__propagationStopped",at="__zone_symbol__stopImmediatePropagation",st="undefined"!=typeof Zone&&Zone[tt("BLACK_LISTED_EVENTS")];st&&(X={},st.forEach(function(t){X[t]=t}));var lt=function(t){return!!X&&X.hasOwnProperty(t)},ct=function(t){var e=rt[t.type];if(e){var n=this[e];if(n){var r=[t];if(1===n.length)return(a=n[0]).zone!==Zone.current?a.zone.run(a.handler,this,r):a.handler.apply(this,r);for(var i=n.slice(),o=0;o<i.length&&!0!==t[ot];o++){var a;(a=i[o]).zone!==Zone.current?a.zone.run(a.handler,this,r):a.handler.apply(this,r)}}}},ut=function(t){function e(e,n){var r=t.call(this,e)||this;return r.ngZone=n,r.patchEvent(),r}return i(e,t),e.prototype.patchEvent=function(){if(Event&&Event.prototype&&!Event.prototype[at]){var t=Event.prototype[at]=Event.prototype.stopImmediatePropagation;Event.prototype.stopImmediatePropagation=function(){this&&(this[ot]=!0),t&&t.apply(this,arguments)}}},e.prototype.supports=function(t){return!0},e.prototype.addEventListener=function(t,e,r){var i=this,o=t[et],a=r;if(!o||n.NgZone.isInAngularZone()&&!lt(e))t.addEventListener(e,a,!1);else{var s=rt[e];s||(s=rt[e]=tt("ANGULAR"+e+"FALSE"));var l=t[s],c=l&&l.length>0;l||(l=t[s]=[]);var u=lt(e)?Zone.root:Zone.current;if(0===l.length)l.push({zone:u,handler:a});else{for(var p=!1,d=0;d<l.length;d++)if(l[d].handler===a){p=!0;break}p||l.push({zone:u,handler:a})}c||t[et](e,ct,!1)}return function(){return i.removeEventListener(t,e,a)}},e.prototype.removeEventListener=function(t,e,n){var r=t[nt];if(!r)return t[it].apply(t,[e,n,!1]);var i=rt[e],o=i&&t[i];if(!o)return t[it].apply(t,[e,n,!1]);for(var a=!1,s=0;s<o.length;s++)if(o[s].handler===n){a=!0,o.splice(s,1);break}a?0===o.length&&r.apply(t,[e,ct,!1]):t[it].apply(t,[e,n,!1])},e.decorators=[{type:n.Injectable}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[v]}]},{type:n.NgZone}]},e}(L),pt={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0},dt=new n.InjectionToken("HammerGestureConfig"),ht=function(){function t(){this.events=[],this.overrides={}}return t.prototype.buildHammer=function(t){var e=new Hammer(t);for(var n in e.get("pinch").set({enable:!0}),e.get("rotate").set({enable:!0}),this.overrides)e.get(n).set(this.overrides[n]);return e},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[]},t}(),ft=function(t){function e(e,n){var r=t.call(this,e)||this;return r._config=n,r}return i(e,t),e.prototype.supports=function(t){if(!pt.hasOwnProperty(t.toLowerCase())&&!this.isCustomEvent(t))return!1;if(!window.Hammer)throw new Error("Hammer.js is not loaded, can not bind "+t+" event");return!0},e.prototype.addEventListener=function(t,e,n){var r=this,i=this.manager.getZone();return e=e.toLowerCase(),i.runOutsideAngular(function(){var o=r._config.buildHammer(t),a=function(t){i.runGuarded(function(){n(t)})};return o.on(e,a),function(){return o.off(e,a)}})},e.prototype.isCustomEvent=function(t){return this._config.events.indexOf(t)>-1},e.decorators=[{type:n.Injectable}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[v]}]},{type:ht,decorators:[{type:n.Inject,args:[dt]}]}]},e}(L),mt=["alt","control","meta","shift"],gt={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},yt=function(t){function e(e){return t.call(this,e)||this}return i(e,t),e.prototype.supports=function(t){return null!=e.parseEventName(t)},e.prototype.addEventListener=function(t,n,r){var i=e.parseEventName(n),o=e.eventCallback(i.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return s().onAndCancel(t,i.domEventName,o)})},e.parseEventName=function(t){var n=t.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;var i=e._normalizeKey(n.pop()),o="";if(mt.forEach(function(t){var e=n.indexOf(t);e>-1&&(n.splice(e,1),o+=t+".")}),o+=i,0!=n.length||0===i.length)return null;var a={};return a.domEventName=r,a.fullKey=o,a},e.getEventFullKey=function(t){var e="",n=s().getEventKey(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),mt.forEach(function(r){r!=n&&((0,gt[r])(t)&&(e+=r+"."))}),e+=n},e.eventCallback=function(t,n,r){return function(i){e.getEventFullKey(i)===t&&r.runGuarded(function(){return n(i)})}},e._normalizeKey=function(t){switch(t){case"esc":return"escape";default:return t}},e.decorators=[{type:n.Injectable}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[v]}]}]},e}(L),vt=function(){function t(t,e){this.defaultDoc=t,this.DOM=e;var n=this.DOM.createHtmlDocument();if(this.inertBodyElement=n.body,null==this.inertBodyElement){var r=this.DOM.createElement("html",n);this.inertBodyElement=this.DOM.createElement("body",n),this.DOM.appendChild(r,this.inertBodyElement),this.DOM.appendChild(n,r)}this.DOM.setInnerHTML(this.inertBodyElement,'<svg><g onload="this.parentNode.remove()"></g></svg>'),!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.DOM.setInnerHTML(this.inertBodyElement,'<svg><p><style><img src="</style><img src=x onerror=alert(1)//">'),this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(t){return!1}}()?this.getInertBodyElement=this.getInertBodyElement_DOMParser:this.getInertBodyElement=this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return t.prototype.getInertBodyElement_XHR=function(t){t="<body><remove></remove>"+t+"</body>";try{t=encodeURI(t)}catch(t){return null}var e=new XMLHttpRequest;e.responseType="document",e.open("GET","data:text/html;charset=utf-8,"+t,!1),e.send(null);var n=e.response.body;return n.removeChild(n.firstChild),n},t.prototype.getInertBodyElement_DOMParser=function(t){t="<body><remove></remove>"+t+"</body>";try{var e=(new window.DOMParser).parseFromString(t,"text/html").body;return e.removeChild(e.firstChild),e}catch(t){return null}},t.prototype.getInertBodyElement_InertDocument=function(t){var e=this.DOM.createElement("template");return"content"in e?(this.DOM.setInnerHTML(e,t),e):(this.DOM.setInnerHTML(this.inertBodyElement,t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)},t.prototype.stripCustomNsAttrs=function(t){var e=this;this.DOM.attributeMap(t).forEach(function(n,r){"xmlns:ns1"!==r&&0!==r.indexOf("ns1:")||e.DOM.removeAttribute(t,r)});for(var n=0,r=this.DOM.childNodesAsList(t);n<r.length;n++){var i=r[n];this.DOM.isElementNode(i)&&this.stripCustomNsAttrs(i)}},t}();var bt=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,_t=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function wt(t){return(t=String(t)).match(bt)||t.match(_t)?t:(n.isDevMode()&&s().log("WARNING: sanitizing unsafe URL value "+t+" (see http://g.co/ng/security#xss)"),"unsafe:"+t)}function Ct(t){for(var e={},n=0,r=t.split(",");n<r.length;n++){e[r[n]]=!0}return e}function xt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0,i=t;r<i.length;r++){var o=i[r];for(var a in o)o.hasOwnProperty(a)&&(n[a]=!0)}return n}var St,Et=Ct("area,br,col,hr,img,wbr"),kt=Ct("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Ot=Ct("rp,rt"),Pt=xt(Ot,kt),At=xt(kt,Ct("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Dt=xt(Ot,Ct("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Tt=xt(Et,At,Dt,Pt),Mt=Ct("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),It=Ct("srcset"),Rt=Ct("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Nt=xt(Mt,It,Rt),Lt=function(){function t(){this.sanitizedSomething=!1,this.buf=[],this.DOM=s()}return t.prototype.sanitizeChildren=function(t){for(var e=this.DOM.firstChild(t);e;)if(this.DOM.isElementNode(e)?this.startElement(e):this.DOM.isTextNode(e)?this.chars(this.DOM.nodeValue(e)):this.sanitizedSomething=!0,this.DOM.firstChild(e))e=this.DOM.firstChild(e);else for(;e;){this.DOM.isElementNode(e)&&this.endElement(e);var n=this.checkClobberedElement(e,this.DOM.nextSibling(e));if(n){e=n;break}e=this.checkClobberedElement(e,this.DOM.parentElement(e))}return this.buf.join("")},t.prototype.startElement=function(t){var e=this,n=this.DOM.nodeName(t).toLowerCase();Tt.hasOwnProperty(n)?(this.buf.push("<"),this.buf.push(n),this.DOM.attributeMap(t).forEach(function(t,n){var r,i=n.toLowerCase();Nt.hasOwnProperty(i)?(Mt[i]&&(t=wt(t)),It[i]&&(r=t,t=(r=String(r)).split(",").map(function(t){return wt(t.trim())}).join(", ")),e.buf.push(" "),e.buf.push(n),e.buf.push('="'),e.buf.push(Vt(t)),e.buf.push('"')):e.sanitizedSomething=!0}),this.buf.push(">")):this.sanitizedSomething=!0},t.prototype.endElement=function(t){var e=this.DOM.nodeName(t).toLowerCase();Tt.hasOwnProperty(e)&&!Et.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))},t.prototype.chars=function(t){this.buf.push(Vt(t))},t.prototype.checkClobberedElement=function(t,e){if(e&&this.DOM.contains(t,e))throw new Error("Failed to sanitize html because the element is clobbered: "+this.DOM.getOuterHTML(t));return e},t}(),jt=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ft=/([^\#-~ |!])/g;function Vt(t){return t.replace(/&/g,"&amp;").replace(jt,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Ft,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Bt=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:calc|attr))\\([-0-9.%, #a-zA-Z]+\\))$","g"),Ut=/^url\(([^)]+)\)$/;var Ht=function(){},zt=function(t){function e(e){var n=t.call(this)||this;return n._doc=e,n}return i(e,t),e.prototype.sanitize=function(t,e){if(null==e)return null;switch(t){case n.SecurityContext.NONE:return e;case n.SecurityContext.HTML:return e instanceof Wt?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"HTML"),function(t,e){var r=s(),i=null;try{St=St||new vt(t,r);var o=e?String(e):"";i=St.getInertBodyElement(o);var a=5,l=o;do{if(0===a)throw new Error("Failed to sanitize html because the input is unstable");a--,o=l,l=r.getInnerHTML(i),i=St.getInertBodyElement(o)}while(o!==l);var c=new Lt,u=c.sanitizeChildren(r.getTemplateContent(i)||i);return n.isDevMode()&&c.sanitizedSomething&&r.log("WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss)."),u}finally{if(i)for(var p=r.getTemplateContent(i)||i,d=0,h=r.childNodesAsList(p);d<h.length;d++){var f=h[d];r.removeChild(p,f)}}}(this._doc,String(e)));case n.SecurityContext.STYLE:return e instanceof qt?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"Style"),function(t){if(!(t=String(t).trim()))return"";var e=t.match(Ut);return e&&wt(e[1])===e[1]||t.match(Bt)&&function(t){for(var e=!0,n=!0,r=0;r<t.length;r++){var i=t.charAt(r);"'"===i&&n?e=!e:'"'===i&&e&&(n=!n)}return e&&n}(t)?t:(n.isDevMode()&&s().log("WARNING: sanitizing unsafe style value "+t+" (see http://g.co/ng/security#xss)."),"unsafe")}(e));case n.SecurityContext.SCRIPT:if(e instanceof Yt)return e.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(e,"Script"),new Error("unsafe value used in a script context");case n.SecurityContext.URL:return e instanceof Kt||e instanceof $t?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"URL"),wt(String(e)));case n.SecurityContext.RESOURCE_URL:if(e instanceof Kt)return e.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(e,"ResourceURL"),new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext "+t+" (see http://g.co/ng/security#xss)")}},e.prototype.checkNotSafeValue=function(t,e){if(t instanceof Gt)throw new Error("Required a safe "+e+", got a "+t.getTypeName()+" (see http://g.co/ng/security#xss)")},e.prototype.bypassSecurityTrustHtml=function(t){return new Wt(t)},e.prototype.bypassSecurityTrustStyle=function(t){return new qt(t)},e.prototype.bypassSecurityTrustScript=function(t){return new Yt(t)},e.prototype.bypassSecurityTrustUrl=function(t){return new $t(t)},e.prototype.bypassSecurityTrustResourceUrl=function(t){return new Kt(t)},e.decorators=[{type:n.Injectable}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[v]}]}]},e}(Ht),Gt=function(){function t(t){this.changingThisBreaksApplicationSecurity=t}return t.prototype.toString=function(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"},t}(),Wt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.getTypeName=function(){return"HTML"},e}(Gt),qt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.getTypeName=function(){return"Style"},e}(Gt),Yt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.getTypeName=function(){return"Script"},e}(Gt),$t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.getTypeName=function(){return"URL"},e}(Gt),Kt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.getTypeName=function(){return"ResourceURL"},e}(Gt),Qt=[{provide:n.PLATFORM_ID,useValue:e.ɵPLATFORM_BROWSER_ID},{provide:n.PLATFORM_INITIALIZER,useValue:Jt,multi:!0},{provide:e.PlatformLocation,useClass:_,deps:[v]},{provide:v,useFactory:ee,deps:[]}],Xt=[{provide:n.Sanitizer,useExisting:Ht},{provide:Ht,useClass:zt,deps:[v]}],Zt=n.createPlatformFactory(n.platformCore,"browser",Qt);function Jt(){g.makeCurrent(),E.init()}function te(){return new n.ErrorHandler}function ee(){return document}var ne=function(){function t(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}return t.withServerTransition=function(e){return{ngModule:t,providers:[{provide:n.APP_ID,useValue:e.appId},{provide:C,useExisting:n.APP_ID},S]}},t.decorators=[{type:n.NgModule,args:[{providers:[Xt,{provide:n.ErrorHandler,useFactory:te,deps:[]},{provide:R,useClass:ut,multi:!0},{provide:R,useClass:yt,multi:!0},{provide:R,useClass:ft,multi:!0},{provide:dt,useClass:ht},Y,{provide:n.RendererFactory2,useExisting:Y},{provide:j,useExisting:F},F,n.Testability,N,I,w,k],exports:[e.CommonModule,n.ApplicationModule]}]}],t.ctorParameters=function(){return[{type:t,decorators:[{type:n.Optional},{type:n.SkipSelf}]}]},t}(),re="undefined"!=typeof window&&window||{},ie=function(t,e){this.msPerTick=t,this.numTicks=e},oe=function(){function t(t){this.appRef=t.injector.get(n.ApplicationRef)}return t.prototype.timeChangeDetection=function(t){var e=t&&t.record,n="Change Detection",r=null!=re.console.profile;e&&r&&re.console.profile(n);for(var i=s().performanceNow(),o=0;o<5||s().performanceNow()-i<500;)this.appRef.tick(),o++;var a=s().performanceNow();e&&r&&re.console.profileEnd(n);var l=(a-i)/o;return re.console.log("ran "+o+" change detection cycles"),re.console.log(l.toFixed(2)+" ms per check"),new ie(l,o)},t}(),ae="profiler";var se=function(){function t(){this.store={},this.onSerializeCallbacks={}}return t.init=function(e){var n=new t;return n.store=e,n},t.prototype.get=function(t,e){return void 0!==this.store[t]?this.store[t]:e},t.prototype.set=function(t,e){this.store[t]=e},t.prototype.remove=function(t){delete this.store[t]},t.prototype.hasKey=function(t){return this.store.hasOwnProperty(t)},t.prototype.onSerialize=function(t,e){this.onSerializeCallbacks[t]=e},t.prototype.toJson=function(){for(var t in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(t))try{this.store[t]=this.onSerializeCallbacks[t]()}catch(t){console.warn("Exception in onSerialize callback: ",t)}return JSON.stringify(this.store)},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[]},t}();function le(t,e){var n,r,i=t.getElementById(e+"-state"),o={};if(i&&i.textContent)try{o=JSON.parse((n=i.textContent,r={"&a;":"&","&q;":'"',"&s;":"'","&l;":"<","&g;":">"},n.replace(/&[^;]+;/g,function(t){return r[t]})))}catch(t){console.warn("Exception while restoring TransferState for app "+e,t)}return se.init(o)}var ce=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{providers:[{provide:se,useFactory:le,deps:[v,n.APP_ID]}]}]}],t.ctorParameters=function(){return[]},t}(),ue=function(){function t(){}return t.all=function(){return function(t){return!0}},t.css=function(t){return function(e){return null!=e.nativeElement&&s().elementMatches(e.nativeElement,t)}},t.directive=function(t){return function(e){return-1!==e.providerTokens.indexOf(t)}},t}(),pe=new n.Version("5.2.6");t.BrowserModule=ne,t.platformBrowser=Zt,t.Meta=w,t.Title=k,t.disableDebugTools=function(){O(ae,null)},t.enableDebugTools=function(t){return O(ae,new oe(t)),t},t.BrowserTransferStateModule=ce,t.TransferState=se,t.makeStateKey=function(t){return t},t.By=ue,t.DOCUMENT=v,t.EVENT_MANAGER_PLUGINS=R,t.EventManager=N,t.HAMMER_GESTURE_CONFIG=dt,t.HammerGestureConfig=ht,t.DomSanitizer=Ht,t.VERSION=pe,t.ɵBROWSER_SANITIZATION_PROVIDERS=Xt,t.ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS=Qt,t.ɵinitDomAdapter=Jt,t.ɵBrowserDomAdapter=g,t.ɵBrowserPlatformLocation=_,t.ɵTRANSITION_ID=C,t.ɵBrowserGetTestability=E,t.ɵescapeHtml=function(t){var e={"&":"&a;",'"':"&q;","'":"&s;","<":"&l;",">":"&g;"};return t.replace(/[&"'<>]/g,function(t){return e[t]})},t.ɵELEMENT_PROBE_PROVIDERS=I,t.ɵDomAdapter=u,t.ɵgetDOM=s,t.ɵsetRootDomAdapter=l,t.ɵDomRendererFactory2=Y,t.ɵNAMESPACE_URIS=V,t.ɵflattenStyles=W,t.ɵshimContentAttribute=z,t.ɵshimHostAttribute=G,t.ɵDomEventsPlugin=ut,t.ɵHammerGesturesPlugin=ft,t.ɵKeyEventsPlugin=yt,t.ɵDomSharedStylesHost=F,t.ɵSharedStylesHost=j,t.ɵb=ee,t.ɵa=te,t.ɵi=p,t.ɵg=S,t.ɵf=x,t.ɵc=le,t.ɵh=M,t.ɵd=L,t.ɵe=zt,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/common"),t("@angular/core")):i((r.ng=r.ng||{},r.ng.platformBrowser={}),r.ng.common,r.ng.core)},{"@angular/common":60,"@angular/core":62}],68:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i,o,a,s,l,c,u,p,d,h,f,m,g,y,v,b,_,w){"use strict";var C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function x(t,e){function n(){this.constructor=t}C(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var S=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},E=function(t,e){this.id=t,this.url=e},k=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return x(e,t),e.prototype.toString=function(){return"NavigationStart(id: "+this.id+", url: '"+this.url+"')"},e}(E),O=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.urlAfterRedirects=r,i}return x(e,t),e.prototype.toString=function(){return"NavigationEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"')"},e}(E),P=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.reason=r,i}return x(e,t),e.prototype.toString=function(){return"NavigationCancel(id: "+this.id+", url: '"+this.url+"')"},e}(E),A=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.error=r,i}return x(e,t),e.prototype.toString=function(){return"NavigationError(id: "+this.id+", url: '"+this.url+"', error: "+this.error+")"},e}(E),D=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return x(e,t),e.prototype.toString=function(){return"RoutesRecognized(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(E),T=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return x(e,t),e.prototype.toString=function(){return"GuardsCheckStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(E),M=function(t){function e(e,n,r,i,o){var a=t.call(this,e,n)||this;return a.urlAfterRedirects=r,a.state=i,a.shouldActivate=o,a}return x(e,t),e.prototype.toString=function(){return"GuardsCheckEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+", shouldActivate: "+this.shouldActivate+")"},e}(E),I=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return x(e,t),e.prototype.toString=function(){return"ResolveStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(E),R=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return x(e,t),e.prototype.toString=function(){return"ResolveEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(E),N=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadStart(path: "+this.route.path+")"},t}(),L=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadEnd(path: "+this.route.path+")"},t}(),j=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),F=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),V=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),B=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),U="primary",H=function(){function t(t){this.params=t||{}}return t.prototype.has=function(t){return this.params.hasOwnProperty(t)},t.prototype.get=function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e[0]:e}return null},t.prototype.getAll=function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e:[e]}return[]},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}();function z(t){return new H(t)}var G="ngNavigationCancelingError";function W(t,e,n){var r=n.path.split("/");if(r.length>t.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||r.length<t.length))return null;for(var i={},o=0;o<r.length;o++){var a=r[o],s=t[o];if(a.startsWith(":"))i[a.substring(1)]=s;else if(a!==s.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}var q=function(t,e){this.routes=t,this.module=e};function Y(t,e){void 0===e&&(e="");for(var n=0;n<t.length;n++){var r=t[n];$(r,K(e,r))}}function $(t,e){if(!t)throw new Error("\n      Invalid configuration of route '"+e+"': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    ");if(Array.isArray(t))throw new Error("Invalid configuration of route '"+e+"': Array cannot be specified");if(!t.component&&t.outlet&&t.outlet!==U)throw new Error("Invalid configuration of route '"+e+"': a componentless route cannot have a named outlet set");if(t.redirectTo&&t.children)throw new Error("Invalid configuration of route '"+e+"': redirectTo and children cannot be used together");if(t.redirectTo&&t.loadChildren)throw new Error("Invalid configuration of route '"+e+"': redirectTo and loadChildren cannot be used together");if(t.children&&t.loadChildren)throw new Error("Invalid configuration of route '"+e+"': children and loadChildren cannot be used together");if(t.redirectTo&&t.component)throw new Error("Invalid configuration of route '"+e+"': redirectTo and component cannot be used together");if(t.path&&t.matcher)throw new Error("Invalid configuration of route '"+e+"': path and matcher cannot be used together");if(void 0===t.redirectTo&&!t.component&&!t.children&&!t.loadChildren)throw new Error("Invalid configuration of route '"+e+"'. One of the following must be provided: component, redirectTo, children or loadChildren");if(void 0===t.path&&void 0===t.matcher)throw new Error("Invalid configuration of route '"+e+"': routes must have either a path or a matcher specified");if("string"==typeof t.path&&"/"===t.path.charAt(0))throw new Error("Invalid configuration of route '"+e+"': path cannot start with a slash");if(""===t.path&&void 0!==t.redirectTo&&void 0===t.pathMatch){throw new Error("Invalid configuration of route '{path: \""+e+'", redirectTo: "'+t.redirectTo+"\"}': please provide 'pathMatch'. The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.")}if(void 0!==t.pathMatch&&"full"!==t.pathMatch&&"prefix"!==t.pathMatch)throw new Error("Invalid configuration of route '"+e+"': pathMatch can only be set to 'prefix' or 'full'");t.children&&Y(t.children,e)}function K(t,e){return e?t||e.path?t&&!e.path?t+"/":!t&&e.path?e.path:t+"/"+e.path:"":t}function Q(t,e){var n,r=Object.keys(t),i=Object.keys(e);if(r.length!=i.length)return!1;for(var o=0;o<r.length;o++)if(t[n=r[o]]!==e[n])return!1;return!0}function X(t){return Array.prototype.concat.apply([],t)}function Z(t){return t.length>0?t[t.length-1]:null}function J(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)}function tt(t){var e=v.mergeAll.call(t);return g.every.call(e,function(t){return!0===t})}function et(t){return n.ɵisObservable(t)?t:n.ɵisPromise(t)?m.fromPromise(Promise.resolve(t)):o.of(t)}function nt(t,e,n){return n?(r=t.queryParams,i=e.queryParams,Q(r,i)&&function t(e,n){if(!st(e.segments,n.segments))return!1;if(e.numberOfChildren!==n.numberOfChildren)return!1;for(var r in n.children){if(!e.children[r])return!1;if(!t(e.children[r],n.children[r]))return!1}return!0}(t.root,e.root)):(o=t.queryParams,a=e.queryParams,Object.keys(a).length<=Object.keys(o).length&&Object.keys(a).every(function(t){return a[t]===o[t]})&&rt(t.root,e.root));var r,i,o,a}function rt(t,e){return function t(e,n,r){{if(e.segments.length>r.length){var i=e.segments.slice(0,r.length);return!!st(i,r)&&!n.hasChildren()}if(e.segments.length===r.length){if(!st(e.segments,r))return!1;for(var o in n.children){if(!e.children[o])return!1;if(!rt(e.children[o],n.children[o]))return!1}return!0}var i=r.slice(0,e.segments.length),a=r.slice(e.segments.length);return!!st(e.segments,i)&&(!!e.children[U]&&t(e.children[U],n,a))}}(t,e,e.segments)}var it=function(){function t(t,e,n){this.root=t,this.queryParams=e,this.fragment=n}return Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=z(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return pt.serialize(this)},t}(),ot=function(){function t(t,e){var n=this;this.segments=t,this.children=e,this.parent=null,J(e,function(t,e){return t.parent=n})}return t.prototype.hasChildren=function(){return this.numberOfChildren>0},Object.defineProperty(t.prototype,"numberOfChildren",{get:function(){return Object.keys(this.children).length},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return dt(this)},t}(),at=function(){function t(t,e){this.path=t,this.parameters=e}return Object.defineProperty(t.prototype,"parameterMap",{get:function(){return this._parameterMap||(this._parameterMap=z(this.parameters)),this._parameterMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return mt(this)},t}();function st(t,e){return t.length===e.length&&t.every(function(t,n){return t.path===e[n].path})}function lt(t,e){var n=[];return J(t.children,function(t,r){r===U&&(n=n.concat(e(t,r)))}),J(t.children,function(t,r){r!==U&&(n=n.concat(e(t,r)))}),n}var ct=function(){},ut=function(){function t(){}return t.prototype.parse=function(t){var e=new _t(t);return new it(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())},t.prototype.serialize=function(t){var e,n;return""+("/"+function t(e,n){if(!e.hasChildren())return dt(e);{if(n){var r=e.children[U]?t(e.children[U],!1):"",i=[];return J(e.children,function(e,n){n!==U&&i.push(n+":"+t(e,!1))}),i.length>0?r+"("+i.join("//")+")":r}var o=lt(e,function(n,r){return r===U?[t(e.children[U],!1)]:[r+":"+t(n,!1)]});return dt(e)+"/("+o.join("//")+")"}}(t.root,!0))+(e=t.queryParams,(n=Object.keys(e).map(function(t){var n=e[t];return Array.isArray(n)?n.map(function(e){return ht(t)+"="+ht(e)}).join("&"):ht(t)+"="+ht(n)})).length?"?"+n.join("&"):"")+("string"==typeof t.fragment?"#"+encodeURI(t.fragment):"")},t}(),pt=new ut;function dt(t){return t.segments.map(function(t){return mt(t)}).join("/")}function ht(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";")}function ft(t){return decodeURIComponent(t)}function mt(t){return""+ht(t.path)+(e=t.parameters,Object.keys(e).map(function(t){return";"+ht(t)+"="+ht(e[t])}).join(""));var e}var gt=/^[^\/()?;=&#]+/;function yt(t){var e=t.match(gt);return e?e[0]:""}var vt=/^[^=?&#]+/;var bt=/^[^?&#]+/;var _t=function(){function t(t){this.url=t,this.remaining=t}return t.prototype.parseRootSegment=function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new ot([],{}):new ot([],this.parseChildren())},t.prototype.parseQueryParams=function(){var t={};if(this.consumeOptional("?"))for(;this.parseQueryParam(t),this.consumeOptional("&"););return t},t.prototype.parseFragment=function(){return this.consumeOptional("#")?decodeURI(this.remaining):null},t.prototype.parseChildren=function(){if(""===this.remaining)return{};this.consumeOptional("/");var t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());var e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n[U]=new ot(t,e)),n},t.prototype.parseSegment=function(){var t=yt(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '"+this.remaining+"'.");return this.capture(t),new at(ft(t),this.parseMatrixParams())},t.prototype.parseMatrixParams=function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t},t.prototype.parseParam=function(t){var e=yt(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var r=yt(this.remaining);r&&(n=r,this.capture(n))}t[ft(e)]=ft(n)}},t.prototype.parseQueryParam=function(t){var e,n,r=(e=this.remaining,(n=e.match(vt))?n[0]:"");if(r){this.capture(r);var i,o,a="";if(this.consumeOptional("=")){var s=(i=this.remaining,(o=i.match(bt))?o[0]:"");s&&(a=s,this.capture(a))}var l=ft(r),c=ft(a);if(t.hasOwnProperty(l)){var u=t[l];Array.isArray(u)||(u=[u],t[l]=u),u.push(c)}else t[l]=c}},t.prototype.parseParens=function(t){var e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=yt(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error("Cannot parse url '"+this.url+"'");var i=void 0;n.indexOf(":")>-1?(i=n.substr(0,n.indexOf(":")),this.capture(i),this.capture(":")):t&&(i=U);var o=this.parseChildren();e[i]=1===Object.keys(o).length?o[U]:new ot([],o),this.consumeOptional("//")}return e},t.prototype.peekStartsWith=function(t){return this.remaining.startsWith(t)},t.prototype.consumeOptional=function(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)},t.prototype.capture=function(t){if(!this.consumeOptional(t))throw new Error('Expected "'+t+'".')},t}(),wt=function(t){this.segmentGroup=t||null},Ct=function(t){this.urlTree=t};function xt(t){return new c.Observable(function(e){return e.error(new wt(t))})}function St(t){return new c.Observable(function(e){return e.error(new Ct(t))})}function Et(t){return new c.Observable(function(e){return e.error(new Error("Only absolute redirects can have named outlets. redirectTo: '"+t+"'"))})}function kt(t){return new c.Observable(function(e){return e.error((n="Cannot load children because the guard of the route \"path: '"+t.path+"'\" returned false",(r=Error("NavigationCancelingError: "+n))[G]=!0,r));var n,r})}var Ot=function(){function t(t,e,r,i,o){this.configLoader=e,this.urlSerializer=r,this.urlTree=i,this.config=o,this.allowRedirects=!0,this.ngModule=t.get(n.NgModuleRef)}return t.prototype.apply=function(){var t=this,e=this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,U),n=s.map.call(e,function(e){return t.createUrlTree(e,t.urlTree.queryParams,t.urlTree.fragment)});return p._catch.call(n,function(e){if(e instanceof Ct)return t.allowRedirects=!1,t.match(e.urlTree);if(e instanceof wt)throw t.noMatchError(e);throw e})},t.prototype.match=function(t){var e=this,n=this.expandSegmentGroup(this.ngModule,this.config,t.root,U),r=s.map.call(n,function(n){return e.createUrlTree(n,t.queryParams,t.fragment)});return p._catch.call(r,function(t){if(t instanceof wt)throw e.noMatchError(t);throw t})},t.prototype.noMatchError=function(t){return new Error("Cannot match any routes. URL Segment: '"+t.segmentGroup+"'")},t.prototype.createUrlTree=function(t,e,n){var r,i=t.segments.length>0?new ot([],((r={})[U]=t,r)):t;return new it(i,e,n)},t.prototype.expandSegmentGroup=function(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?s.map.call(this.expandChildren(t,e,n),function(t){return new ot([],t)}):this.expandSegment(t,n,e,n.segments,r,!0)},t.prototype.expandChildren=function(t,e,n){var r=this;return function(t,e){if(0===Object.keys(t).length)return o.of({});var n=[],r=[],i={};J(t,function(t,o){var a=s.map.call(e(o,t),function(t){return i[o]=t});o===U?n.push(a):r.push(a)});var a=d.concatAll.call(o.of.apply(void 0,n.concat(r))),l=y.last.call(a);return s.map.call(l,function(){return i})}(n.children,function(n,i){return r.expandSegmentGroup(t,e,i,n)})},t.prototype.expandSegment=function(t,e,n,r,i,a){var l=this,c=o.of.apply(void 0,n),u=s.map.call(c,function(s){var c=l.expandSegmentAgainstRoute(t,e,n,s,r,i,a);return p._catch.call(c,function(t){if(t instanceof wt)return o.of(null);throw t})}),m=d.concatAll.call(u),g=h.first.call(m,function(t){return!!t});return p._catch.call(g,function(t,n){if(t instanceof f.EmptyError||"EmptyError"===t.name){if(l.noLeftoversInUrl(e,r,i))return o.of(new ot([],{}));throw new wt(e)}throw t})},t.prototype.noLeftoversInUrl=function(t,e,n){return 0===e.length&&!t.children[n]},t.prototype.expandSegmentAgainstRoute=function(t,e,n,r,i,o,a){return Tt(r)!==o?xt(e):void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,i):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,r,i,o):xt(e)},t.prototype.expandSegmentAgainstRouteUsingRedirect=function(t,e,n,r,i,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,i,o)},t.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect=function(t,e,n,r){var i=this,o=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?St(o):l.mergeMap.call(this.lineralizeSegments(n,o),function(n){var o=new ot(n,{});return i.expandSegment(t,o,e,n,r,!1)})},t.prototype.expandRegularSegmentAgainstRouteUsingRedirect=function(t,e,n,r,i,o){var a=this,s=Pt(e,r,i),c=s.matched,u=s.consumedSegments,p=s.lastChild,d=s.positionalParamSegments;if(!c)return xt(e);var h=this.applyRedirectCommands(u,r.redirectTo,d);return r.redirectTo.startsWith("/")?St(h):l.mergeMap.call(this.lineralizeSegments(r,h),function(r){return a.expandSegment(t,e,n,r.concat(i.slice(p)),o,!1)})},t.prototype.matchSegmentAgainstRoute=function(t,e,n,r){var i=this;if("**"===n.path)return n.loadChildren?s.map.call(this.configLoader.load(t.injector,n),function(t){return n._loadedConfig=t,new ot(r,{})}):o.of(new ot(r,{}));var a=Pt(e,n,r),c=a.matched,u=a.consumedSegments,p=a.lastChild;if(!c)return xt(e);var d=r.slice(p),h=this.getChildConfig(t,n);return l.mergeMap.call(h,function(t){var n=t.module,r=t.routes,a=function(t,e,n,r){if(n.length>0&&(o=t,a=n,s=r,s.some(function(t){return Dt(o,a,t)&&Tt(t)!==U}))){var i=new ot(e,function(t,e){var n={};n[U]=e;for(var r=0,i=t;r<i.length;r++){var o=i[r];""===o.path&&Tt(o)!==U&&(n[Tt(o)]=new ot([],{}))}return n}(r,new ot(n,t.children)));return{segmentGroup:At(i),slicedSegments:[]}}var o,a,s;if(0===n.length&&(l=t,c=n,u=r,u.some(function(t){return Dt(l,c,t)}))){var i=new ot(t.segments,function(t,e,n,r){for(var i={},o=0,a=n;o<a.length;o++){var s=a[o];Dt(t,e,s)&&!r[Tt(s)]&&(i[Tt(s)]=new ot([],{}))}return S({},r,i)}(t,n,r,t.children));return{segmentGroup:At(i),slicedSegments:n}}var l,c,u;return{segmentGroup:t,slicedSegments:n}}(e,u,d,r),l=a.segmentGroup,c=a.slicedSegments;if(0===c.length&&l.hasChildren()){var p=i.expandChildren(n,r,l);return s.map.call(p,function(t){return new ot(u,t)})}if(0===r.length&&0===c.length)return o.of(new ot(u,{}));var h=i.expandSegment(n,l,r,c,U,!0);return s.map.call(h,function(t){return new ot(u.concat(t.segments),t.children)})})},t.prototype.getChildConfig=function(t,e){var n,r,i,a=this;return e.children?o.of(new q(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?o.of(e._loadedConfig):l.mergeMap.call((n=t.injector,(i=(r=e).canLoad)&&0!==i.length?tt(s.map.call(u.from(i),function(t){var e=n.get(t);return et(e.canLoad?e.canLoad(r):e(r))})):o.of(!0)),function(n){return n?s.map.call(a.configLoader.load(t.injector,e),function(t){return e._loadedConfig=t,t}):kt(e)}):o.of(new q([],t))},t.prototype.lineralizeSegments=function(t,e){for(var n=[],r=e.root;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return o.of(n);if(r.numberOfChildren>1||!r.children[U])return Et(t.redirectTo);r=r.children[U]}},t.prototype.applyRedirectCommands=function(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)},t.prototype.applyRedirectCreatreUrlTree=function(t,e,n,r){var i=this.createSegmentGroup(t,e.root,n,r);return new it(i,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)},t.prototype.createQueryParams=function(t,e){var n={};return J(t,function(t,r){if("string"==typeof t&&t.startsWith(":")){var i=t.substring(1);n[r]=e[i]}else n[r]=t}),n},t.prototype.createSegmentGroup=function(t,e,n,r){var i=this,o=this.createSegments(t,e.segments,n,r),a={};return J(e.children,function(e,o){a[o]=i.createSegmentGroup(t,e,n,r)}),new ot(o,a)},t.prototype.createSegments=function(t,e,n,r){var i=this;return e.map(function(e){return e.path.startsWith(":")?i.findPosParam(t,e,r):i.findOrReturn(e,n)})},t.prototype.findPosParam=function(t,e,n){var r=n[e.path.substring(1)];if(!r)throw new Error("Cannot redirect to '"+t+"'. Cannot find '"+e.path+"'.");return r},t.prototype.findOrReturn=function(t,e){for(var n=0,r=0,i=e;r<i.length;r++){var o=i[r];if(o.path===t.path)return e.splice(n),o;n++}return t},t}();function Pt(t,e,n){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var r=(e.matcher||W)(n,t,e);return r?{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,positionalParamSegments:r.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function At(t){if(1===t.numberOfChildren&&t.children[U]){var e=t.children[U];return new ot(t.segments.concat(e.segments),e.children)}return t}function Dt(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&(""===n.path&&void 0!==n.redirectTo)}function Tt(t){return t.outlet||U}var Mt=function(){function t(t){this._root=t}return Object.defineProperty(t.prototype,"root",{get:function(){return this._root.value},enumerable:!0,configurable:!0}),t.prototype.parent=function(t){var e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null},t.prototype.children=function(t){var e=It(t,this._root);return e?e.children.map(function(t){return t.value}):[]},t.prototype.firstChild=function(t){var e=It(t,this._root);return e&&e.children.length>0?e.children[0].value:null},t.prototype.siblings=function(t){var e=Rt(t,this._root);return e.length<2?[]:e[e.length-2].children.map(function(t){return t.value}).filter(function(e){return e!==t})},t.prototype.pathFromRoot=function(t){return Rt(t,this._root).map(function(t){return t.value})},t}();function It(t,e){if(t===e.value)return e;for(var n=0,r=e.children;n<r.length;n++){var i=It(t,r[n]);if(i)return i}return null}function Rt(t,e){if(t===e.value)return[e];for(var n=0,r=e.children;n<r.length;n++){var i=Rt(t,r[n]);if(i.length)return i.unshift(e),i}return[]}var Nt=function(){function t(t,e){this.value=t,this.children=e}return t.prototype.toString=function(){return"TreeNode("+this.value+")"},t}();function Lt(t){var e={};return t&&t.children.forEach(function(t){return e[t.value.outlet]=t}),e}var jt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.snapshot=n,zt(r,e),r}return x(e,t),e.prototype.toString=function(){return this.snapshot.toString()},e}(Mt);function Ft(t,e){var n,i=(n=new Ut([],{},{},"",{},U,e,null,t.root,-1,{}),new Ht("",new Nt(n,[]))),o=new r.BehaviorSubject([new at("",{})]),a=new r.BehaviorSubject({}),s=new r.BehaviorSubject({}),l=new r.BehaviorSubject({}),c=new r.BehaviorSubject(""),u=new Vt(o,a,l,c,s,U,e,i.root);return u.snapshot=i.root,new jt(new Nt(u,[]),i)}var Vt=function(){function t(t,e,n,r,i,o,a,s){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=o,this.component=a,this._futureSnapshot=s}return Object.defineProperty(t.prototype,"routeConfig",{get:function(){return this._futureSnapshot.routeConfig},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=s.map.call(this.params,function(t){return z(t)})),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=s.map.call(this.queryParams,function(t){return z(t)})),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},t}();function Bt(t,e){void 0===e&&(e="emptyOnly");var n=t.pathFromRoot,r=0;if("always"!==e)for(r=n.length-1;r>=1;){var i=n[r],o=n[r-1];if(i.routeConfig&&""===i.routeConfig.path)r--;else{if(o.component)break;r--}}return n.slice(r).reduce(function(t,e){var n=S({},t.params,e.params),r=S({},t.data,e.data),i=S({},t.resolve,e._resolvedData);return{params:n,data:r,resolve:i}},{params:{},data:{},resolve:{}})}var Ut=function(){function t(t,e,n,r,i,o,a,s,l,c,u){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=o,this.component=a,this.routeConfig=s,this._urlSegment=l,this._lastPathIndex=c,this._resolve=u}return Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=z(this.params)),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=z(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"Route(url:'"+this.url.map(function(t){return t.toString()}).join("/")+"', path:'"+(this.routeConfig?this.routeConfig.path:"")+"')"},t}(),Ht=function(t){function e(e,n){var r=t.call(this,n)||this;return r.url=e,zt(r,n),r}return x(e,t),e.prototype.toString=function(){return Gt(this._root)},e}(Mt);function zt(t,e){e.value._routerState=t,e.children.forEach(function(e){return zt(t,e)})}function Gt(t){var e=t.children.length>0?" { "+t.children.map(Gt).join(", ")+" } ":"";return""+t.value+e}function Wt(t){if(t.snapshot){var e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,Q(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),Q(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;++n)if(!Q(t[n],e[n]))return!1;return!0}(e.url,n.url)||t.url.next(n.url),Q(e.data,n.data)||t.data.next(n.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function qt(t,e){var n,r,i=Q(t.params,e.params)&&(n=t.url,r=e.url,st(n,r)&&n.every(function(t,e){return Q(t.parameters,r[e].parameters)})),o=!t.parent!=!e.parent;return i&&!o&&(!t.parent||qt(t.parent,e.parent))}function Yt(t,e,n){if(n&&t.shouldReuseRoute(e.value,n.value.snapshot)){(c=n.value)._futureSnapshot=e.value;var i=(s=t,l=n,e.children.map(function(t){for(var e=0,n=l.children;e<n.length;e++){var r=n[e];if(s.shouldReuseRoute(r.value.snapshot,t.value))return Yt(s,t,r)}return Yt(s,t)}));return new Nt(c,i)}if(t.retrieve(e.value)){var o=t.retrieve(e.value).route;return function t(e,n){if(e.value.routeConfig!==n.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==n.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");n.value._futureSnapshot=e.value;for(var r=0;r<e.children.length;++r)t(e.children[r],n.children[r])}(e,o),o}var a,s,l,c=(a=e.value,new Vt(new r.BehaviorSubject(a.url),new r.BehaviorSubject(a.params),new r.BehaviorSubject(a.queryParams),new r.BehaviorSubject(a.fragment),new r.BehaviorSubject(a.data),a.outlet,a.component,a));i=e.children.map(function(e){return Yt(t,e)});return new Nt(c,i)}function $t(t,e,n,r,i){if(0===n.length)return Qt(e.root,e.root,e,r,i);var o=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new Xt(!0,0,t);var e=0,n=!1,r=t.reduce(function(t,r,i){if("object"==typeof r&&null!=r){if(r.outlets){var o={};return J(r.outlets,function(t,e){o[e]="string"==typeof t?t.split("/"):t}),t.concat([{outlets:o}])}if(r.segmentPath)return t.concat([r.segmentPath])}return"string"!=typeof r?t.concat([r]):0===i?(r.split("/").forEach(function(r,i){0==i&&"."===r||(0==i&&""===r?n=!0:".."===r?e++:""!=r&&t.push(r))}),t):t.concat([r])},[]);return new Xt(n,e,r)}(n);if(o.toRoot())return Qt(e.root,new ot([],{}),e,r,i);var a=function(t,e,n){if(t.isAbsolute)return new Zt(e.root,!0,0);if(-1===n.snapshot._lastPathIndex)return new Zt(n.snapshot._urlSegment,!0,0);var r=Kt(t.commands[0])?0:1,i=n.snapshot._lastPathIndex+r;return function(t,e,n){var r=t,i=e,o=n;for(;o>i;){if(o-=i,!(r=r.parent))throw new Error("Invalid number of '../'");i=r.segments.length}return new Zt(r,!1,i-o)}(n.snapshot._urlSegment,i,t.numberOfDoubleDots)}(o,e,t),s=a.processChildren?ee(a.segmentGroup,a.index,o.commands):te(a.segmentGroup,a.index,o.commands);return Qt(a.segmentGroup,s,e,r,i)}function Kt(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Qt(t,e,n,r,i){var o={};return r&&J(r,function(t,e){o[e]=Array.isArray(t)?t.map(function(t){return""+t}):""+t}),n.root===t?new it(e,o,i):new it(function t(e,n,r){var i={};J(e.children,function(e,o){i[o]=e===n?r:t(e,n,r)});return new ot(e.segments,i)}(n.root,t,e),o,i)}var Xt=function(){function t(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Kt(n[0]))throw new Error("Root segment cannot have matrix parameters");var r=n.find(function(t){return"object"==typeof t&&null!=t&&t.outlets});if(r&&r!==Z(n))throw new Error("{outlets:{}} has to be the last command")}return t.prototype.toRoot=function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]},t}();var Zt=function(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n};function Jt(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets[U]:""+t}function te(t,e,n){if(t||(t=new ot([],{})),0===t.segments.length&&t.hasChildren())return ee(t,e,n);var r=function(t,e,n){var r=0,i=e,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=n.length)return o;var a=t.segments[i],s=Jt(n[r]),l=r<n.length-1?n[r+1]:null;if(i>0&&void 0===s)break;if(s&&l&&"object"==typeof l&&void 0===l.outlets){if(!oe(s,l,a))return o;r+=2}else{if(!oe(s,{},a))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(t,e,n),i=n.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){var o=new ot(t.segments.slice(0,r.pathIndex),{});return o.children[U]=new ot(t.segments.slice(r.pathIndex),t.children),ee(o,0,i)}return r.match&&0===i.length?new ot(t.segments,{}):r.match&&!t.hasChildren()?ne(t,e,n):r.match?ee(t,0,i):ne(t,e,n)}function ee(t,e,n){if(0===n.length)return new ot(t.segments,{});var r,i,o,a="object"!=typeof(r=n)[0]?((i={})[U]=r,i):void 0===r[0].outlets?((o={})[U]=r,o):r[0].outlets,s={};return J(a,function(n,r){null!==n&&(s[r]=te(t.children[r],e,n))}),J(t.children,function(t,e){void 0===a[e]&&(s[e]=t)}),new ot(t.segments,s)}function ne(t,e,n){for(var r=t.segments.slice(0,e),i=0;i<n.length;){if("object"==typeof n[i]&&void 0!==n[i].outlets){var o=re(n[i].outlets);return new ot(r,o)}if(0===i&&Kt(n[0])){var a=t.segments[e];r.push(new at(a.path,n[0])),i++}else{var s=Jt(n[i]),l=i<n.length-1?n[i+1]:null;s&&l&&Kt(l)?(r.push(new at(s,ie(l))),i+=2):(r.push(new at(s,{})),i++)}}return new ot(r,{})}function re(t){var e={};return J(t,function(t,n){null!==t&&(e[n]=ne(new ot([],{}),0,t))}),e}function ie(t){var e={};return J(t,function(t,n){return e[n]=""+t}),e}function oe(t,e,n){return t==n.path&&Q(e,n.parameters)}var ae=function(t){this.path=t,this.route=this.path[this.path.length-1]},se=function(t,e){this.component=t,this.route=e},le=function(){function t(t,e,n,r){this.future=t,this.curr=e,this.moduleInjector=n,this.forwardEvent=r,this.canActivateChecks=[],this.canDeactivateChecks=[]}return t.prototype.initialize=function(t){var e=this.future._root,n=this.curr?this.curr._root:null;this.setupChildRouteGuards(e,n,t,[e.value])},t.prototype.checkGuards=function(){var t=this;if(!this.isDeactivating()&&!this.isActivating())return o.of(!0);var e=this.runCanDeactivateChecks();return l.mergeMap.call(e,function(e){return e?t.runCanActivateChecks():o.of(!1)})},t.prototype.resolveData=function(t){var e=this;if(!this.isActivating())return o.of(null);var n=u.from(this.canActivateChecks),r=a.concatMap.call(n,function(n){return e.runResolve(n.route,t)});return b.reduce.call(r,function(t,e){return t})},t.prototype.isDeactivating=function(){return 0!==this.canDeactivateChecks.length},t.prototype.isActivating=function(){return 0!==this.canActivateChecks.length},t.prototype.setupChildRouteGuards=function(t,e,n,r){var i=this,o=Lt(e);t.children.forEach(function(t){i.setupRouteGuards(t,o[t.value.outlet],n,r.concat([t.value])),delete o[t.value.outlet]}),J(o,function(t,e){return i.deactivateRouteAndItsChildren(t,n.getContext(e))})},t.prototype.setupRouteGuards=function(t,e,n,r){var i=t.value,o=e?e.value:null,a=n?n.getContext(t.value.outlet):null;if(o&&i.routeConfig===o.routeConfig){var s=this.shouldRunGuardsAndResolvers(o,i,i.routeConfig.runGuardsAndResolvers);if(s?this.canActivateChecks.push(new ae(r)):(i.data=o.data,i._resolvedData=o._resolvedData),i.component?this.setupChildRouteGuards(t,e,a?a.children:null,r):this.setupChildRouteGuards(t,e,n,r),s){var l=a.outlet;this.canDeactivateChecks.push(new se(l.component,o))}}else o&&this.deactivateRouteAndItsChildren(e,a),this.canActivateChecks.push(new ae(r)),i.component?this.setupChildRouteGuards(t,null,a?a.children:null,r):this.setupChildRouteGuards(t,null,n,r)},t.prototype.shouldRunGuardsAndResolvers=function(t,e,n){switch(n){case"always":return!0;case"paramsOrQueryParamsChange":return!qt(t,e)||!Q(t.queryParams,e.queryParams);case"paramsChange":default:return!qt(t,e)}},t.prototype.deactivateRouteAndItsChildren=function(t,e){var n=this,r=Lt(t),i=t.value;J(r,function(t,r){i.component?e?n.deactivateRouteAndItsChildren(t,e.children.getContext(r)):n.deactivateRouteAndItsChildren(t,null):n.deactivateRouteAndItsChildren(t,e)}),i.component&&e&&e.outlet&&e.outlet.isActivated?this.canDeactivateChecks.push(new se(e.outlet.component,i)):this.canDeactivateChecks.push(new se(null,i))},t.prototype.runCanDeactivateChecks=function(){var t=this,e=u.from(this.canDeactivateChecks),n=l.mergeMap.call(e,function(e){return t.runCanDeactivate(e.component,e.route)});return g.every.call(n,function(t){return!0===t})},t.prototype.runCanActivateChecks=function(){var t=this,e=u.from(this.canActivateChecks),n=a.concatMap.call(e,function(e){return tt(u.from([t.fireChildActivationStart(e.route.parent),t.fireActivationStart(e.route),t.runCanActivateChild(e.path),t.runCanActivate(e.route)]))});return g.every.call(n,function(t){return!0===t})},t.prototype.fireActivationStart=function(t){return null!==t&&this.forwardEvent&&this.forwardEvent(new V(t)),o.of(!0)},t.prototype.fireChildActivationStart=function(t){return null!==t&&this.forwardEvent&&this.forwardEvent(new j(t)),o.of(!0)},t.prototype.runCanActivate=function(t){var e=this,n=t.routeConfig?t.routeConfig.canActivate:null;return n&&0!==n.length?tt(s.map.call(u.from(n),function(n){var r,i=e.getToken(n,t);return r=i.canActivate?et(i.canActivate(t,e.future)):et(i(t,e.future)),h.first.call(r)})):o.of(!0)},t.prototype.runCanActivateChild=function(t){var e=this,n=t[t.length-1],r=t.slice(0,t.length-1).reverse().map(function(t){return e.extractCanActivateChild(t)}).filter(function(t){return null!==t});return tt(s.map.call(u.from(r),function(t){return tt(s.map.call(u.from(t.guards),function(r){var i,o=e.getToken(r,t.node);return i=o.canActivateChild?et(o.canActivateChild(n,e.future)):et(o(n,e.future)),h.first.call(i)}))}))},t.prototype.extractCanActivateChild=function(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null},t.prototype.runCanDeactivate=function(t,e){var n=this,r=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!r||0===r.length)return o.of(!0);var i=l.mergeMap.call(u.from(r),function(r){var i,o=n.getToken(r,e);return i=o.canDeactivate?et(o.canDeactivate(t,e,n.curr,n.future)):et(o(t,e,n.curr,n.future)),h.first.call(i)});return g.every.call(i,function(t){return!0===t})},t.prototype.runResolve=function(t,e){var n=t._resolve;return s.map.call(this.resolveNode(n,t),function(n){return t._resolvedData=n,t.data=S({},t.data,Bt(t,e).resolve),null})},t.prototype.resolveNode=function(t,e){var n=this,r=Object.keys(t);if(0===r.length)return o.of({});if(1===r.length){var i=r[0];return s.map.call(this.getResolver(t[i],e),function(t){return(e={})[i]=t,e;var e})}var a={},c=l.mergeMap.call(u.from(r),function(r){return s.map.call(n.getResolver(t[r],e),function(t){return a[r]=t,t})});return s.map.call(y.last.call(c),function(){return a})},t.prototype.getResolver=function(t,e){var n=this.getToken(t,e);return n.resolve?et(n.resolve(e,this.future)):et(n(e,this.future))},t.prototype.getToken=function(t,e){var n=function(t){if(!t)return null;for(var e=t.parent;e;e=e.parent){var n=e.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(e);return(n?n.module.injector:this.moduleInjector).get(t)},t}();var ce=function(){};var ue=function(){function t(t,e,n,r,i){this.rootComponentType=t,this.config=e,this.urlTree=n,this.url=r,this.paramsInheritanceStrategy=i}return t.prototype.recognize=function(){try{var t=he(this.urlTree.root,[],[],this.config).segmentGroup,e=this.processSegmentGroup(this.config,t,U),n=new Ut([],Object.freeze({}),Object.freeze(this.urlTree.queryParams),this.urlTree.fragment,{},U,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Nt(n,e),i=new Ht(this.url,r);return this.inheritParamsAndData(i._root),o.of(i)}catch(t){return new c.Observable(function(e){return e.error(t)})}},t.prototype.inheritParamsAndData=function(t){var e=this,n=t.value,r=Bt(n,this.paramsInheritanceStrategy);n.params=Object.freeze(r.params),n.data=Object.freeze(r.data),t.children.forEach(function(t){return e.inheritParamsAndData(t)})},t.prototype.processSegmentGroup=function(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)},t.prototype.processChildren=function(t,e){var n,r=this,i=lt(e,function(e,n){return r.processSegmentGroup(t,e,n)});return n={},i.forEach(function(t){var e=n[t.value.outlet];if(e){var r=e.url.map(function(t){return t.toString()}).join("/"),i=t.value.url.map(function(t){return t.toString()}).join("/");throw new Error("Two segments cannot have the same outlet name: '"+r+"' and '"+i+"'.")}n[t.value.outlet]=t.value}),i.sort(function(t,e){return t.value.outlet===U?-1:e.value.outlet===U?1:t.value.outlet.localeCompare(e.value.outlet)}),i},t.prototype.processSegment=function(t,e,n,r){for(var i=0,o=t;i<o.length;i++){var a=o[i];try{return this.processSegmentAgainstRoute(a,e,n,r)}catch(t){if(!(t instanceof ce))throw t}}if(this.noLeftoversInUrl(e,n,r))return[];throw new ce},t.prototype.noLeftoversInUrl=function(t,e,n){return 0===e.length&&!t.children[n]},t.prototype.processSegmentAgainstRoute=function(t,e,n,r){if(t.redirectTo)throw new ce;if((t.outlet||U)!==r)throw new ce;var i,o=[],a=[];if("**"===t.path){var s=n.length>0?Z(n).parameters:{};i=new Ut(n,s,Object.freeze(this.urlTree.queryParams),this.urlTree.fragment,ge(t),r,t.component,t,pe(e),de(e)+n.length,ye(t))}else{var l=function(t,e,n){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||n.length>0))throw new ce;return{consumedSegments:[],lastChild:0,parameters:{}}}var r=(e.matcher||W)(n,t,e);if(!r)throw new ce;var i={};J(r.posParams,function(t,e){i[e]=t.path});var o=r.consumed.length>0?S({},i,r.consumed[r.consumed.length-1].parameters):i;return{consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:o}}(e,t,n);o=l.consumedSegments,a=n.slice(l.lastChild),i=new Ut(o,l.parameters,Object.freeze(this.urlTree.queryParams),this.urlTree.fragment,ge(t),r,t.component,t,pe(e),de(e)+o.length,ye(t))}var c=function(t){if(t.children)return t.children;if(t.loadChildren)return t._loadedConfig.routes;return[]}(t),u=he(e,o,a,c),p=u.segmentGroup,d=u.slicedSegments;if(0===d.length&&p.hasChildren()){var h=this.processChildren(c,p);return[new Nt(i,h)]}if(0===c.length&&0===d.length)return[new Nt(i,[])];var f=this.processSegment(c,p,d,U);return[new Nt(i,f)]},t}();function pe(t){for(var e=t;e._sourceSegment;)e=e._sourceSegment;return e}function de(t){for(var e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;e._sourceSegment;)n+=(e=e._sourceSegment)._segmentIndexShift?e._segmentIndexShift:0;return n-1}function he(t,e,n,r){if(n.length>0&&(o=t,a=n,r.some(function(t){return fe(o,a,t)&&me(t)!==U}))){var i=new ot(e,function(t,e,n,r){var i={};i[U]=r,r._sourceSegment=t,r._segmentIndexShift=e.length;for(var o=0,a=n;o<a.length;o++){var s=a[o];if(""===s.path&&me(s)!==U){var l=new ot([],{});l._sourceSegment=t,l._segmentIndexShift=e.length,i[me(s)]=l}}return i}(t,e,r,new ot(n,t.children)));return i._sourceSegment=t,i._segmentIndexShift=e.length,{segmentGroup:i,slicedSegments:[]}}var o,a,s,l;if(0===n.length&&(s=t,l=n,r.some(function(t){return fe(s,l,t)}))){var c=new ot(t.segments,function(t,e,n,r){for(var i={},o=0,a=n;o<a.length;o++){var s=a[o];if(fe(t,e,s)&&!r[me(s)]){var l=new ot([],{});l._sourceSegment=t,l._segmentIndexShift=t.segments.length,i[me(s)]=l}}return S({},r,i)}(t,n,r,t.children));return c._sourceSegment=t,c._segmentIndexShift=e.length,{segmentGroup:c,slicedSegments:n}}var u=new ot(t.segments,t.children);return u._sourceSegment=t,u._segmentIndexShift=e.length,{segmentGroup:u,slicedSegments:n}}function fe(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&(""===n.path&&void 0===n.redirectTo)}function me(t){return t.outlet||U}function ge(t){return t.data||{}}function ye(t){return t.resolve||{}}var ve=function(){},be=function(){function t(){}return t.prototype.shouldDetach=function(t){return!1},t.prototype.store=function(t,e){},t.prototype.shouldAttach=function(t){return!1},t.prototype.retrieve=function(t){return null},t.prototype.shouldReuseRoute=function(t,e){return t.routeConfig===e.routeConfig},t}(),_e=new n.InjectionToken("ROUTES"),we=function(){function t(t,e,n,r){this.loader=t,this.compiler=e,this.onLoadStartListener=n,this.onLoadEndListener=r}return t.prototype.load=function(t,e){var n=this;this.onLoadStartListener&&this.onLoadStartListener(e);var r=this.loadModuleFactory(e.loadChildren);return s.map.call(r,function(r){n.onLoadEndListener&&n.onLoadEndListener(e);var i=r.create(t);return new q(X(i.injector.get(_e)),i)})},t.prototype.loadModuleFactory=function(t){var e=this;return"string"==typeof t?m.fromPromise(this.loader.load(t)):l.mergeMap.call(et(t()),function(t){return t instanceof n.NgModuleFactory?o.of(t):m.fromPromise(e.compiler.compileModuleAsync(t))})},t}(),Ce=function(){},xe=function(){function t(){}return t.prototype.shouldProcessUrl=function(t){return!0},t.prototype.extract=function(t){return t},t.prototype.merge=function(t,e){return t},t}();function Se(t){throw t}function Ee(t){return o.of(null)}var ke=function(){function t(t,e,o,a,s,l,c,u){var p=this;this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=o,this.location=a,this.config=u,this.navigations=new r.BehaviorSubject(null),this.navigationId=0,this.events=new i.Subject,this.errorHandler=Se,this.navigated=!1,this.hooks={beforePreactivation:Ee,afterPreactivation:Ee},this.urlHandlingStrategy=new xe,this.routeReuseStrategy=new be,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly";this.ngModule=s.get(n.NgModuleRef),this.resetConfig(u),this.currentUrlTree=new it(new ot([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.configLoader=new we(l,c,function(t){return p.triggerEvent(new N(t))},function(t){return p.triggerEvent(new L(t))}),this.routerState=Ft(this.currentUrlTree,this.rootComponentType),this.processNavigations()}return t.prototype.resetRootComponentType=function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType},t.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})},t.prototype.setUpLocationChangeListener=function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(e){var n=t.urlSerializer.parse(e.url),r="popstate"===e.type?"popstate":"hashchange";setTimeout(function(){t.scheduleNavigation(n,r,{replaceUrl:!0})},0)}))},Object.defineProperty(t.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!0,configurable:!0}),t.prototype.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){Y(t),this.config=t,this.navigated=!1},t.prototype.ngOnDestroy=function(){this.dispose()},t.prototype.dispose=function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)},t.prototype.createUrlTree=function(t,e){void 0===e&&(e={});var r=e.relativeTo,i=e.queryParams,o=e.fragment,a=e.preserveQueryParams,s=e.queryParamsHandling,l=e.preserveFragment;n.isDevMode()&&a&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var c=r||this.routerState.root,u=l?this.currentUrlTree.fragment:o,p=null;if(s)switch(s){case"merge":p=S({},this.currentUrlTree.queryParams,i);break;case"preserve":p=this.currentUrlTree.queryParams;break;default:p=i||null}else p=a?this.currentUrlTree.queryParams:i||null;return null!==p&&(p=this.removeEmptyProps(p)),$t(c,this.currentUrlTree,t,p,u)},t.prototype.navigateByUrl=function(t,e){void 0===e&&(e={skipLocationChange:!1});var n=t instanceof it?t:this.parseUrl(t),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",e)},t.prototype.navigate=function(t,e){return void 0===e&&(e={skipLocationChange:!1}),function(t){for(var e=0;e<t.length;e++){var n=t[e];if(null==n)throw new Error("The requested path contains "+n+" segment at index "+e)}}(t),this.navigateByUrl(this.createUrlTree(t,e),e)},t.prototype.serializeUrl=function(t){return this.urlSerializer.serialize(t)},t.prototype.parseUrl=function(t){return this.urlSerializer.parse(t)},t.prototype.isActive=function(t,e){if(t instanceof it)return nt(this.currentUrlTree,t,e);var n=this.urlSerializer.parse(t);return nt(this.currentUrlTree,n,e)},t.prototype.removeEmptyProps=function(t){return Object.keys(t).reduce(function(e,n){var r=t[n];return null!=r&&(e[n]=r),e},{})},t.prototype.processNavigations=function(){var t=this;a.concatMap.call(this.navigations,function(e){return e?(t.executeScheduledNavigation(e),e.promise.catch(function(){})):o.of(null)}).subscribe(function(){})},t.prototype.scheduleNavigation=function(t,e,n){var r=this.navigations.value;if(r&&"imperative"!==e&&"imperative"===r.source&&r.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(r&&"hashchange"==e&&"popstate"===r.source&&r.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(r&&"popstate"==e&&"hashchange"===r.source&&r.rawUrl.toString()===t.toString())return Promise.resolve(!0);var i=null,o=null,a=new Promise(function(t,e){i=t,o=e}),s=++this.navigationId;return this.navigations.next({id:s,source:e,rawUrl:t,extras:n,resolve:i,reject:o,promise:a}),a.catch(function(t){return Promise.reject(t)})},t.prototype.executeScheduledNavigation=function(t){var e=this,n=t.id,r=t.rawUrl,i=t.extras,o=t.resolve,a=t.reject,s=this.urlHandlingStrategy.extract(r),l=!this.navigated||s.toString()!==this.currentUrlTree.toString();("reload"===this.onSameUrlNavigation||l)&&this.urlHandlingStrategy.shouldProcessUrl(r)?(this.events.next(new k(n,this.serializeUrl(s))),Promise.resolve().then(function(t){return e.runNavigate(s,r,!!i.skipLocationChange,!!i.replaceUrl,n,null)}).then(o,a)):l&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)?(this.events.next(new k(n,this.serializeUrl(s))),Promise.resolve().then(function(t){return e.runNavigate(s,r,!1,!1,n,Ft(s,e.rootComponentType).snapshot)}).then(o,a)):(this.rawUrlTree=r,o(null))},t.prototype.runNavigate=function(t,e,n,r,i,a){var c=this;return i!==this.navigationId?(this.events.next(new P(i,this.serializeUrl(t),"Navigation ID "+i+" is not equal to the current navigation id "+this.navigationId)),Promise.resolve(!1)):new Promise(function(u,p){var d,h,f,m,g,y;if(a)d=o.of({appliedUrl:t,snapshot:a});else{var v=c.ngModule.injector,b=(h=v,f=c.configLoader,m=c.urlSerializer,g=t,y=c.config,new Ot(h,f,m,g,y).apply());d=l.mergeMap.call(b,function(e){return s.map.call((n=c.rootComponentType,r=c.config,o=e,a=c.serializeUrl(e),void 0===(l=c.paramsInheritanceStrategy)&&(l="emptyOnly"),new ue(n,r,o,a,l).recognize()),function(n){return c.events.next(new D(i,c.serializeUrl(t),c.serializeUrl(e),n)),{appliedUrl:e,snapshot:n}});var n,r,o,a,l})}var _,w=l.mergeMap.call(d,function(t){return s.map.call(c.hooks.beforePreactivation(t.snapshot),function(){return t})}),C=s.map.call(w,function(t){var e=t.appliedUrl,n=t.snapshot,r=c.ngModule.injector;return(_=new le(n,c.routerState.snapshot,r,function(t){return c.triggerEvent(t)})).initialize(c.rootContexts),{appliedUrl:e,snapshot:n}}),x=l.mergeMap.call(C,function(e){var n=e.appliedUrl,r=e.snapshot;return c.navigationId!==i?o.of(!1):(c.triggerEvent(new T(i,c.serializeUrl(t),n,r)),s.map.call(_.checkGuards(),function(e){return c.triggerEvent(new M(i,c.serializeUrl(t),n,r,e)),{appliedUrl:n,snapshot:r,shouldActivate:e}}))}),S=l.mergeMap.call(x,function(e){return c.navigationId!==i?o.of(!1):e.shouldActivate&&_.isActivating()?(c.triggerEvent(new I(i,c.serializeUrl(t),e.appliedUrl,e.snapshot)),s.map.call(_.resolveData(c.paramsInheritanceStrategy),function(){return c.triggerEvent(new R(i,c.serializeUrl(t),e.appliedUrl,e.snapshot)),e})):o.of(e)}),E=l.mergeMap.call(S,function(t){return s.map.call(c.hooks.afterPreactivation(t.snapshot),function(){return t})}),k=s.map.call(E,function(t){var e,n,r,i,o=t.appliedUrl,a=t.snapshot,s=t.shouldActivate;return s?{appliedUrl:o,state:(e=c.routeReuseStrategy,n=a,r=c.routerState,i=Yt(e,n._root,r?r._root:void 0),new jt(i,n)),shouldActivate:s}:{appliedUrl:o,state:null,shouldActivate:s}});c.activateRoutes(k,c.routerState,c.currentUrlTree,i,t,e,n,r,u,p)})},t.prototype.activateRoutes=function(t,e,n,r,i,o,a,s,l,c){var u,p=this;t.forEach(function(t){var n=t.appliedUrl,i=t.state;if(t.shouldActivate&&r===p.navigationId){if(p.currentUrlTree=n,p.rawUrlTree=p.urlHandlingStrategy.merge(p.currentUrlTree,o),p.routerState=i,!a){var l=p.urlSerializer.serialize(p.rawUrlTree);p.location.isCurrentPathEqualTo(l)||s?p.location.replaceState(l):p.location.go(l)}new Oe(p.routeReuseStrategy,i,e,function(t){return p.triggerEvent(t)}).activate(p.rootContexts),u=!0}else u=!1}).then(function(){u?(p.navigated=!0,p.events.next(new O(r,p.serializeUrl(i),p.serializeUrl(p.currentUrlTree))),l(!0)):(p.resetUrlToCurrentUrlTree(),p.events.next(new P(r,p.serializeUrl(i),"")),l(!1))},function(t){if((a=t)&&a[G])p.navigated=!0,p.resetStateAndUrl(e,n,o),p.events.next(new P(r,p.serializeUrl(i),t.message)),l(!1);else{p.resetStateAndUrl(e,n,o),p.events.next(new A(r,p.serializeUrl(i),t));try{l(p.errorHandler(t))}catch(t){c(t)}}var a})},t.prototype.resetStateAndUrl=function(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()},t.prototype.resetUrlToCurrentUrlTree=function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree))},t}(),Oe=function(){function t(t,e,n,r){this.routeReuseStrategy=t,this.futureState=e,this.currState=n,this.forwardEvent=r}return t.prototype.activate=function(t){var e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,t),Wt(this.futureState.root),this.activateChildRoutes(e,n,t)},t.prototype.deactivateChildRoutes=function(t,e,n){var r=this,i=Lt(e);t.children.forEach(function(t){var e=t.value.outlet;r.deactivateRoutes(t,i[e],n),delete i[e]}),J(i,function(t,e){r.deactivateRouteAndItsChildren(t,n)})},t.prototype.deactivateRoutes=function(t,e,n){var r=t.value,i=e?e.value:null;if(r===i)if(r.component){var o=n.getContext(r.outlet);o&&this.deactivateChildRoutes(t,e,o.children)}else this.deactivateChildRoutes(t,e,n);else i&&this.deactivateRouteAndItsChildren(e,n)},t.prototype.deactivateRouteAndItsChildren=function(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)},t.prototype.detachAndStoreRouteSubtree=function(t,e){var n=e.getContext(t.value.outlet);if(n&&n.outlet){var r=n.outlet.detach(),i=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:r,route:t,contexts:i})}},t.prototype.deactivateRouteAndOutlet=function(t,e){var n=this,r=e.getContext(t.value.outlet);if(r){var i=Lt(t),o=t.value.component?r.children:e;J(i,function(t,e){return n.deactivateRouteAndItsChildren(t,o)}),r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated())}},t.prototype.activateChildRoutes=function(t,e,n){var r=this,i=Lt(e);t.children.forEach(function(t){r.activateRoutes(t,i[t.value.outlet],n),r.forwardEvent(new B(t.value.snapshot))}),t.children.length&&this.forwardEvent(new F(t.value.snapshot))},t.prototype.activateRoutes=function(t,e,n){var r=t.value,i=e?e.value:null;if(Wt(r),r===i)if(r.component){var o=n.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,o.children)}else this.activateChildRoutes(t,e,n);else if(r.component){o=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){var a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),Pe(a.route)}else{var s=function(t){for(var e=t.parent;e;e=e.parent){var n=e.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig;if(n&&n.component)return null}return null}(r.snapshot),l=s?s.module.componentFactoryResolver:null;o.route=r,o.resolver=l,o.outlet&&o.outlet.activateWith(r,l),this.activateChildRoutes(t,null,o.children)}}else this.activateChildRoutes(t,null,n)},t}();function Pe(t){Wt(t.value),t.children.forEach(Pe)}var Ae=function(){function t(t,e,n,r,i){this.router=t,this.route=e,this.commands=[],null==n&&r.setAttribute(i.nativeElement,"tabindex","0")}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preserveQueryParams",{set:function(t){n.isDevMode()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated!, use queryParamsHandling instead."),this.preserve=t},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){var t={skipLocationChange:Te(this.skipLocationChange),replaceUrl:Te(this.replaceUrl)};return this.router.navigateByUrl(this.urlTree,t),!0},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:Te(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:Te(this.preserveFragment)})},enumerable:!0,configurable:!0}),t.decorators=[{type:n.Directive,args:[{selector:":not(a)[routerLink]"}]}],t.ctorParameters=function(){return[{type:ke},{type:Vt},{type:void 0,decorators:[{type:n.Attribute,args:["tabindex"]}]},{type:n.Renderer2},{type:n.ElementRef}]},t.propDecorators={queryParams:[{type:n.Input}],fragment:[{type:n.Input}],queryParamsHandling:[{type:n.Input}],preserveFragment:[{type:n.Input}],skipLocationChange:[{type:n.Input}],replaceUrl:[{type:n.Input}],routerLink:[{type:n.Input}],preserveQueryParams:[{type:n.Input}],onClick:[{type:n.HostListener,args:["click"]}]},t}(),De=function(){function t(t,e,n){var r=this;this.router=t,this.route=e,this.locationStrategy=n,this.commands=[],this.subscription=t.events.subscribe(function(t){t instanceof O&&r.updateTargetUrlAndHref()})}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preserveQueryParams",{set:function(t){n.isDevMode()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead."),this.preserve=t},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){this.updateTargetUrlAndHref()},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.onClick=function(t,e,n,r){if(0!==t||e||n||r)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;var i={skipLocationChange:Te(this.skipLocationChange),replaceUrl:Te(this.replaceUrl)};return this.router.navigateByUrl(this.urlTree,i),!1},t.prototype.updateTargetUrlAndHref=function(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:Te(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:Te(this.preserveFragment)})},enumerable:!0,configurable:!0}),t.decorators=[{type:n.Directive,args:[{selector:"a[routerLink]"}]}],t.ctorParameters=function(){return[{type:ke},{type:Vt},{type:e.LocationStrategy}]},t.propDecorators={target:[{type:n.HostBinding,args:["attr.target"]},{type:n.Input}],queryParams:[{type:n.Input}],fragment:[{type:n.Input}],queryParamsHandling:[{type:n.Input}],preserveFragment:[{type:n.Input}],skipLocationChange:[{type:n.Input}],replaceUrl:[{type:n.Input}],href:[{type:n.HostBinding}],routerLink:[{type:n.Input}],preserveQueryParams:[{type:n.Input}],onClick:[{type:n.HostListener,args:["click",["$event.button","$event.ctrlKey","$event.metaKey","$event.shiftKey"]]}]},t}();function Te(t){return""===t||!!t}var Me=function(){function t(t,e,n,r){var i=this;this.router=t,this.element=e,this.renderer=n,this.cdr=r,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.subscription=t.events.subscribe(function(t){t instanceof O&&i.update()})}return t.prototype.ngAfterContentInit=function(){var t=this;this.links.changes.subscribe(function(e){return t.update()}),this.linksWithHrefs.changes.subscribe(function(e){return t.update()}),this.update()},Object.defineProperty(t.prototype,"routerLinkActive",{set:function(t){var e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter(function(t){return!!t})},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){this.update()},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.update=function(){var t=this;this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then(function(){var e=t.hasActiveLinks();t.isActive!==e&&(t.isActive=e,t.classes.forEach(function(n){e?t.renderer.addClass(t.element.nativeElement,n):t.renderer.removeClass(t.element.nativeElement,n)}))})},t.prototype.isLinkActive=function(t){var e=this;return function(n){return t.isActive(n.urlTree,e.routerLinkActiveOptions.exact)}},t.prototype.hasActiveLinks=function(){return this.links.some(this.isLinkActive(this.router))||this.linksWithHrefs.some(this.isLinkActive(this.router))},t.decorators=[{type:n.Directive,args:[{selector:"[routerLinkActive]",exportAs:"routerLinkActive"}]}],t.ctorParameters=function(){return[{type:ke},{type:n.ElementRef},{type:n.Renderer2},{type:n.ChangeDetectorRef}]},t.propDecorators={links:[{type:n.ContentChildren,args:[Ae,{descendants:!0}]}],linksWithHrefs:[{type:n.ContentChildren,args:[De,{descendants:!0}]}],routerLinkActiveOptions:[{type:n.Input}],routerLinkActive:[{type:n.Input}]},t}(),Ie=function(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Re,this.attachRef=null},Re=function(){function t(){this.contexts=new Map}return t.prototype.onChildOutletCreated=function(t,e){var n=this.getOrCreateContext(t);n.outlet=e,this.contexts.set(t,n)},t.prototype.onChildOutletDestroyed=function(t){var e=this.getContext(t);e&&(e.outlet=null)},t.prototype.onOutletDeactivated=function(){var t=this.contexts;return this.contexts=new Map,t},t.prototype.onOutletReAttached=function(t){this.contexts=t},t.prototype.getOrCreateContext=function(t){var e=this.getContext(t);return e||(e=new Ie,this.contexts.set(t,e)),e},t.prototype.getContext=function(t){return this.contexts.get(t)||null},t}(),Ne=function(){function t(t,e,r,i,o){this.parentContexts=t,this.location=e,this.resolver=r,this.changeDetector=o,this.activated=null,this._activatedRoute=null,this.activateEvents=new n.EventEmitter,this.deactivateEvents=new n.EventEmitter,this.name=i||U,t.onChildOutletCreated(this.name,this)}return t.prototype.ngOnDestroy=function(){this.parentContexts.onChildOutletDestroyed(this.name)},t.prototype.ngOnInit=function(){if(!this.activated){var t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}},Object.defineProperty(t.prototype,"isActivated",{get:function(){return!!this.activated},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activatedRoute",{get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activatedRouteData",{get:function(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}},enumerable:!0,configurable:!0}),t.prototype.detach=function(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();var t=this.activated;return this.activated=null,this._activatedRoute=null,t},t.prototype.attach=function(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)},t.prototype.deactivate=function(){if(this.activated){var t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}},t.prototype.activateWith=function(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;var n=t._futureSnapshot.routeConfig.component,r=(e=e||this.resolver).resolveComponentFactory(n),i=this.parentContexts.getOrCreateContext(this.name).children,o=new Le(t,i,this.location.injector);this.activated=this.location.createComponent(r,this.location.length,o),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)},t.decorators=[{type:n.Directive,args:[{selector:"router-outlet",exportAs:"outlet"}]}],t.ctorParameters=function(){return[{type:Re},{type:n.ViewContainerRef},{type:n.ComponentFactoryResolver},{type:void 0,decorators:[{type:n.Attribute,args:["name"]}]},{type:n.ChangeDetectorRef}]},t.propDecorators={activateEvents:[{type:n.Output,args:["activate"]}],deactivateEvents:[{type:n.Output,args:["deactivate"]}]},t}(),Le=function(){function t(t,e,n){this.route=t,this.childContexts=e,this.parent=n}return t.prototype.get=function(t,e){return t===Vt?this.route:t===Re?this.childContexts:this.parent.get(t,e)},t}(),je=function(){},Fe=function(){function t(){}return t.prototype.preload=function(t,e){return p._catch.call(e(),function(){return o.of(null)})},t}(),Ve=function(){function t(){}return t.prototype.preload=function(t,e){return o.of(null)},t}(),Be=function(){function t(t,e,n,r,i){this.router=t,this.injector=r,this.preloadingStrategy=i;this.loader=new we(e,n,function(e){return t.triggerEvent(new N(e))},function(e){return t.triggerEvent(new L(e))})}return t.prototype.setUpPreloading=function(){var t=this,e=w.filter.call(this.router.events,function(t){return t instanceof O});this.subscription=a.concatMap.call(e,function(){return t.preload()}).subscribe(function(){})},t.prototype.preload=function(){var t=this.injector.get(n.NgModuleRef);return this.processRoutes(t,this.router.config)},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.processRoutes=function(t,e){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];if(o.loadChildren&&!o.canLoad&&o._loadedConfig){var a=o._loadedConfig;n.push(this.processRoutes(a.module,a.routes))}else o.loadChildren&&!o.canLoad?n.push(this.preloadConfig(t,o)):o.children&&n.push(this.processRoutes(t,o.children))}return v.mergeAll.call(u.from(n))},t.prototype.preloadConfig=function(t,e){var n=this;return this.preloadingStrategy.preload(e,function(){var r=n.loader.load(t.injector,e);return l.mergeMap.call(r,function(t){return e._loadedConfig=t,n.processRoutes(t.module,t.routes)})})},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:ke},{type:n.NgModuleFactoryLoader},{type:n.Compiler},{type:n.Injector},{type:je}]},t}(),Ue=[Ne,Ae,De,Me],He=new n.InjectionToken("ROUTER_CONFIGURATION"),ze=new n.InjectionToken("ROUTER_FORROOT_GUARD"),Ge=[e.Location,{provide:ct,useClass:ut},{provide:ke,useFactory:Qe,deps:[n.ApplicationRef,ct,Re,e.Location,n.Injector,n.NgModuleFactoryLoader,n.Compiler,_e,He,[Ce,new n.Optional],[ve,new n.Optional]]},Re,{provide:Vt,useFactory:Xe,deps:[ke]},{provide:n.NgModuleFactoryLoader,useClass:n.SystemJsNgModuleLoader},Be,Ve,Fe,{provide:He,useValue:{enableTracing:!1}}];function We(){return new n.NgProbeToken("Router",ke)}var qe=function(){function t(t,e){}return t.forRoot=function(r,i){return{ngModule:t,providers:[Ge,Ke(r),{provide:ze,useFactory:$e,deps:[[ke,new n.Optional,new n.SkipSelf]]},{provide:He,useValue:i||{}},{provide:e.LocationStrategy,useFactory:Ye,deps:[e.PlatformLocation,[new n.Inject(e.APP_BASE_HREF),new n.Optional],He]},{provide:je,useExisting:i&&i.preloadingStrategy?i.preloadingStrategy:Ve},{provide:n.NgProbeToken,multi:!0,useFactory:We},nn()]}},t.forChild=function(e){return{ngModule:t,providers:[Ke(e)]}},t.decorators=[{type:n.NgModule,args:[{declarations:Ue,exports:Ue}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[ze]}]},{type:ke,decorators:[{type:n.Optional}]}]},t}();function Ye(t,n,r){return void 0===r&&(r={}),r.useHash?new e.HashLocationStrategy(t,n):new e.PathLocationStrategy(t,n)}function $e(t){if(t)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function Ke(t){return[{provide:n.ANALYZE_FOR_ENTRY_COMPONENTS,multi:!0,useValue:t},{provide:_e,multi:!0,useValue:t}]}function Qe(t,e,n,r,i,o,a,s,l,c,u){void 0===l&&(l={});var p=new ke(null,e,n,r,i,o,a,X(s));if(c&&(p.urlHandlingStrategy=c),u&&(p.routeReuseStrategy=u),l.errorHandler&&(p.errorHandler=l.errorHandler),l.enableTracing){var d=_.ɵgetDOM();p.events.subscribe(function(t){d.logGroup("Router Event: "+t.constructor.name),d.log(t.toString()),d.log(t),d.logGroupEnd()})}return l.onSameUrlNavigation&&(p.onSameUrlNavigation=l.onSameUrlNavigation),l.paramsInheritanceStrategy&&(p.paramsInheritanceStrategy=l.paramsInheritanceStrategy),p}function Xe(t){return t.routerState.root}var Ze=function(){function t(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new i.Subject}return t.prototype.appInitializer=function(){var t=this;return this.injector.get(e.LOCATION_INITIALIZED,Promise.resolve(null)).then(function(){var e=null,n=new Promise(function(t){return e=t}),r=t.injector.get(ke),i=t.injector.get(He);if(t.isLegacyDisabled(i)||t.isLegacyEnabled(i))e(!0);else if("disabled"===i.initialNavigation)r.setUpLocationChangeListener(),e(!0);else{if("enabled"!==i.initialNavigation)throw new Error("Invalid initialNavigation options: '"+i.initialNavigation+"'");r.hooks.afterPreactivation=function(){return t.initNavigation?o.of(null):(t.initNavigation=!0,e(!0),t.resultOfPreactivationDone)},r.initialNavigation()}return n})},t.prototype.bootstrapListener=function(t){var e=this.injector.get(He),r=this.injector.get(Be),i=this.injector.get(ke),o=this.injector.get(n.ApplicationRef);t===o.components[0]&&(this.isLegacyEnabled(e)?i.initialNavigation():this.isLegacyDisabled(e)&&i.setUpLocationChangeListener(),r.setUpPreloading(),i.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())},t.prototype.isLegacyEnabled=function(t){return"legacy_enabled"===t.initialNavigation||!0===t.initialNavigation||void 0===t.initialNavigation},t.prototype.isLegacyDisabled=function(t){return"legacy_disabled"===t.initialNavigation||!1===t.initialNavigation},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:n.Injector}]},t}();function Je(t){return t.appInitializer.bind(t)}function tn(t){return t.bootstrapListener.bind(t)}var en=new n.InjectionToken("Router Initializer");function nn(){return[Ze,{provide:n.APP_INITIALIZER,multi:!0,useFactory:Je,deps:[Ze]},{provide:en,useFactory:tn,deps:[Ze]},{provide:n.APP_BOOTSTRAP_LISTENER,multi:!0,useExisting:en}]}var rn=new n.Version("5.2.6");t.RouterLink=Ae,t.RouterLinkWithHref=De,t.RouterLinkActive=Me,t.RouterOutlet=Ne,t.ActivationEnd=B,t.ActivationStart=V,t.ChildActivationEnd=F,t.ChildActivationStart=j,t.GuardsCheckEnd=M,t.GuardsCheckStart=T,t.NavigationCancel=P,t.NavigationEnd=O,t.NavigationError=A,t.NavigationStart=k,t.ResolveEnd=R,t.ResolveStart=I,t.RouteConfigLoadEnd=L,t.RouteConfigLoadStart=N,t.RouterEvent=E,t.RoutesRecognized=D,t.RouteReuseStrategy=ve,t.Router=ke,t.ROUTES=_e,t.ROUTER_CONFIGURATION=He,t.ROUTER_INITIALIZER=en,t.RouterModule=qe,t.provideRoutes=Ke,t.ChildrenOutletContexts=Re,t.OutletContext=Ie,t.NoPreloading=Ve,t.PreloadAllModules=Fe,t.PreloadingStrategy=je,t.RouterPreloader=Be,t.ActivatedRoute=Vt,t.ActivatedRouteSnapshot=Ut,t.RouterState=jt,t.RouterStateSnapshot=Ht,t.PRIMARY_OUTLET=U,t.convertToParamMap=z,t.UrlHandlingStrategy=Ce,t.DefaultUrlSerializer=ut,t.UrlSegment=at,t.UrlSegmentGroup=ot,t.UrlSerializer=ct,t.UrlTree=it,t.VERSION=rn,t.ɵROUTER_PROVIDERS=Ge,t.ɵflatten=X,t.ɵa=ze,t.ɵg=Ze,t.ɵh=Je,t.ɵi=tn,t.ɵd=$e,t.ɵc=Ye,t.ɵj=nn,t.ɵf=Xe,t.ɵb=We,t.ɵe=Qe,t.ɵk=Mt,t.ɵl=Nt,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/common"),t("@angular/core"),t("rxjs/BehaviorSubject"),t("rxjs/Subject"),t("rxjs/observable/of"),t("rxjs/operator/concatMap"),t("rxjs/operator/map"),t("rxjs/operator/mergeMap"),t("rxjs/Observable"),t("rxjs/observable/from"),t("rxjs/operator/catch"),t("rxjs/operator/concatAll"),t("rxjs/operator/first"),t("rxjs/util/EmptyError"),t("rxjs/observable/fromPromise"),t("rxjs/operator/every"),t("rxjs/operator/last"),t("rxjs/operator/mergeAll"),t("rxjs/operator/reduce"),t("@angular/platform-browser"),t("rxjs/operator/filter")):i((r.ng=r.ng||{},r.ng.router={}),r.ng.common,r.ng.core,r.Rx,r.Rx,r.Rx.Observable,r.Rx.Observable.prototype,r.Rx.Observable.prototype,r.Rx.Observable.prototype,r.Rx,r.Rx.Observable,r.Rx.Observable.prototype,r.Rx.Observable.prototype,r.Rx.Observable.prototype,r.Rx,r.Rx.Observable,r.Rx.Observable.prototype,r.Rx.Observable.prototype,r.Rx.Observable.prototype,r.Rx.Observable.prototype,r.ng.platformBrowser,r.Rx.Observable.prototype)},{"@angular/common":60,"@angular/core":62,"@angular/platform-browser":67,"rxjs/BehaviorSubject":70,"rxjs/Observable":73,"rxjs/Subject":77,"rxjs/observable/from":100,"rxjs/observable/fromPromise":103,"rxjs/observable/of":105,"rxjs/operator/catch":108,"rxjs/operator/concatAll":109,"rxjs/operator/concatMap":110,"rxjs/operator/every":111,"rxjs/operator/filter":112,"rxjs/operator/first":113,"rxjs/operator/last":114,"rxjs/operator/map":115,"rxjs/operator/mergeAll":116,"rxjs/operator/mergeMap":117,"rxjs/operator/reduce":118,"rxjs/util/EmptyError":157}],69:[function(t,e,n){var r,i;r=this,i=function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t){return"string"==typeof t}function a(t){return null!=t}var s=function(t){this.name=t};s.COPY=new s("copy"),s.LINK=new s("link"),s.MOVE=new s("move"),s.NONE=new s("none");var l=function(t,e,n){if(void 0===e&&(e=0),void 0===n&&(n=0),this.imageElement=t,this.x_offset=e,this.y_offset=n,o(this.imageElement)){var r=this.imageElement;this.imageElement=new HTMLImageElement,this.imageElement.src=r}},c=function(){this.onDragStartClass="dnd-drag-start",this.onDragEnterClass="dnd-drag-enter",this.onDragOverClass="dnd-drag-over",this.onSortableDragClass="dnd-sortable-drag",this.dragEffect=s.MOVE,this.dropEffect=s.MOVE,this.dragCursor="move",this.defaultCursor="pointer"},u=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},p=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},d=function(){};function h(){return new t.DragDropService}function f(e){return new t.DragDropSortableService(e)}t.DragDropService=function(){this.allowedDropZones=[]},t.DragDropService=u([e.Injectable()],t.DragDropService),t.DragDropSortableService=function(){function t(t){this._config=t}return Object.defineProperty(t.prototype,"elem",{get:function(){return this._elem},enumerable:!0,configurable:!0}),t.prototype.markSortable=function(t){a(this._elem)&&this._elem.classList.remove(this._config.onSortableDragClass),a(t)&&(this._elem=t,this._elem.classList.add(this._config.onSortableDragClass))},t}(),t.DragDropSortableService=u([e.Injectable(),p("design:paramtypes",[c])],t.DragDropSortableService);var m=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},g=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};t.AbstractComponent=function(){function t(t,e,n,r){var i=this;this._dragDropService=e,this._config=n,this._cdr=r,this._dragEnabled=!1,this.dropEnabled=!1,this.dropZones=[],this.cloneItem=!1,this._defaultCursor=n.defaultCursor,this._elem=t.nativeElement,this._elem.style.cursor=this._defaultCursor,this._elem.ondragenter=function(t){i._onDragEnter(t)},this._elem.ondragover=function(t){return i._onDragOver(t),null!=t.dataTransfer&&(t.dataTransfer.dropEffect=i._config.dropEffect.name),!1},this._elem.ondragleave=function(t){i._onDragLeave(t)},this._elem.ondrop=function(t){i._onDrop(t)},this._elem.onmousedown=function(t){i._target=t.target},this._elem.ondragstart=function(t){var e,n;if(!i._dragHandle||i._dragHandle.contains(i._target)){if(i._onDragStart(t),null!=t.dataTransfer){if(t.dataTransfer.setData("text",""),t.dataTransfer.effectAllowed=i.effectAllowed||i._config.dragEffect.name,a(i.dragImage))if(o(i.dragImage))t.dataTransfer.setDragImage((e=i.dragImage,(n=new HTMLImageElement).src=e,n));else if("function"==typeof i.dragImage)t.dataTransfer.setDragImage((0,i.dragImage)());else{var r=i.dragImage;t.dataTransfer.setDragImage(r.imageElement,r.x_offset,r.y_offset)}else if(a(i._config.dragImage)){var s=i._config.dragImage;t.dataTransfer.setDragImage(s.imageElement,s.x_offset,s.y_offset)}else i.cloneItem&&(i._dragHelper=i._elem.cloneNode(!0),i._dragHelper.classList.add("dnd-drag-item"),i._dragHelper.style.position="absolute",i._dragHelper.style.top="0px",i._dragHelper.style.left="-1000px",i._elem.parentElement.appendChild(i._dragHelper),t.dataTransfer.setDragImage(i._dragHelper,t.offsetX,t.offsetY));var l=i._dragHandle?i._dragHandle:i._elem;i._dragEnabled?l.style.cursor=i.effectCursor?i.effectCursor:i._config.dragCursor:l.style.cursor=i._defaultCursor}}else t.preventDefault()},this._elem.ondragend=function(t){i._elem.parentElement&&i._dragHelper&&i._elem.parentElement.removeChild(i._dragHelper),i._onDragEnd(t),(i._dragHandle?i._dragHandle:i._elem).style.cursor=i._defaultCursor}}return Object.defineProperty(t.prototype,"dragEnabled",{get:function(){return this._dragEnabled},set:function(t){this._dragEnabled=!!t,this._elem.draggable=this._dragEnabled},enumerable:!0,configurable:!0}),t.prototype.setDragHandle=function(t){this._dragHandle=t},t.prototype.detectChanges=function(){var t=this;setTimeout(function(){t._cdr&&!t._cdr.destroyed&&t._cdr.detectChanges()},250)},t.prototype._onDragEnter=function(t){this._isDropAllowed(t)&&this._onDragEnterCallback(t)},t.prototype._onDragOver=function(t){this._isDropAllowed(t)&&(t.preventDefault&&t.preventDefault(),this._onDragOverCallback(t))},t.prototype._onDragLeave=function(t){this._isDropAllowed(t)&&this._onDragLeaveCallback(t)},t.prototype._onDrop=function(t){this._isDropAllowed(t)&&(this._preventAndStop(t),this._onDropCallback(t),this.detectChanges())},t.prototype._isDropAllowed=function(t){if((this._dragDropService.isDragged||t.dataTransfer&&t.dataTransfer.files)&&this.dropEnabled){if(this.allowDrop)return this.allowDrop(this._dragDropService.dragData);if(0===this.dropZones.length&&0===this._dragDropService.allowedDropZones.length)return!0;for(var e=0;e<this._dragDropService.allowedDropZones.length;e++){var n=this._dragDropService.allowedDropZones[e];if(-1!==this.dropZones.indexOf(n))return!0}}return!1},t.prototype._preventAndStop=function(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation()},t.prototype._onDragStart=function(t){this._dragEnabled&&(this._dragDropService.allowedDropZones=this.dropZones,this._onDragStartCallback(t))},t.prototype._onDragEnd=function(t){this._dragDropService.allowedDropZones=[],this._onDragEndCallback(t)},t.prototype._onDragEnterCallback=function(t){},t.prototype._onDragOverCallback=function(t){},t.prototype._onDragLeaveCallback=function(t){},t.prototype._onDropCallback=function(t){},t.prototype._onDragStartCallback=function(t){},t.prototype._onDragEndCallback=function(t){},t}(),t.AbstractComponent=m([e.Injectable(),g("design:paramtypes",[e.ElementRef,t.DragDropService,c,e.ChangeDetectorRef])],t.AbstractComponent);var y=function(t,e,n,r,i){this._dragDropService=e,this._config=n,this._Component=r,this._cdr=i,this._elem=t.nativeElement,this._Component.setDragHandle(this._elem)},v=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},b=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};t.DraggableComponent=function(t){function n(n,r,i,o){var a=t.call(this,n,r,i,o)||this;return a.onDragStart=new e.EventEmitter,a.onDragEnd=new e.EventEmitter,a.onDragSuccessCallback=new e.EventEmitter,a._defaultCursor=a._elem.style.cursor,a.dragEnabled=!0,a}return i(n,t),Object.defineProperty(n.prototype,"draggable",{set:function(t){this.dragEnabled=!!t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dropzones",{set:function(t){this.dropZones=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"effectallowed",{set:function(t){this.effectAllowed=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"effectcursor",{set:function(t){this.effectCursor=t},enumerable:!0,configurable:!0}),n.prototype._onDragStartCallback=function(t){this._dragDropService.isDragged=!0,this._dragDropService.dragData=this.dragData,this._dragDropService.onDragSuccessCallback=this.onDragSuccessCallback,this._elem.classList.add(this._config.onDragStartClass),this.onDragStart.emit({dragData:this.dragData,mouseEvent:t})},n.prototype._onDragEndCallback=function(t){this._dragDropService.isDragged=!1,this._dragDropService.dragData=null,this._dragDropService.onDragSuccessCallback=null,this._elem.classList.remove(this._config.onDragStartClass),this.onDragEnd.emit({dragData:this.dragData,mouseEvent:t})},n}(t.AbstractComponent),v([e.Input("dragEnabled"),b("design:type",Boolean),b("design:paramtypes",[Boolean])],t.DraggableComponent.prototype,"draggable",null),v([e.Output(),b("design:type",e.EventEmitter)],t.DraggableComponent.prototype,"onDragStart",void 0),v([e.Output(),b("design:type",e.EventEmitter)],t.DraggableComponent.prototype,"onDragEnd",void 0),v([e.Input(),b("design:type",Object)],t.DraggableComponent.prototype,"dragData",void 0),v([e.Output("onDragSuccess"),b("design:type",e.EventEmitter)],t.DraggableComponent.prototype,"onDragSuccessCallback",void 0),v([e.Input("dropZones"),b("design:type",Array),b("design:paramtypes",[Array])],t.DraggableComponent.prototype,"dropzones",null),v([e.Input("effectAllowed"),b("design:type",String),b("design:paramtypes",[String])],t.DraggableComponent.prototype,"effectallowed",null),v([e.Input("effectCursor"),b("design:type",String),b("design:paramtypes",[String])],t.DraggableComponent.prototype,"effectcursor",null),v([e.Input(),b("design:type",Object)],t.DraggableComponent.prototype,"dragImage",void 0),v([e.Input(),b("design:type",Boolean)],t.DraggableComponent.prototype,"cloneItem",void 0),t.DraggableComponent=v([e.Directive({selector:"[dnd-draggable]"}),b("design:paramtypes",[e.ElementRef,t.DragDropService,c,e.ChangeDetectorRef])],t.DraggableComponent),t.DraggableHandleComponent=function(t){function e(e,n,r,i,o){return t.call(this,e,n,r,i,o)||this}return i(e,t),e}(y),t.DraggableHandleComponent=v([e.Directive({selector:"[dnd-draggable-handle]"}),b("design:paramtypes",[e.ElementRef,t.DragDropService,c,t.DraggableComponent,e.ChangeDetectorRef])],t.DraggableHandleComponent);var _=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},w=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};t.DroppableComponent=function(t){function n(n,r,i,o){var a=t.call(this,n,r,i,o)||this;return a.onDropSuccess=new e.EventEmitter,a.onDragEnter=new e.EventEmitter,a.onDragOver=new e.EventEmitter,a.onDragLeave=new e.EventEmitter,a.dropEnabled=!0,a}return i(n,t),Object.defineProperty(n.prototype,"droppable",{set:function(t){this.dropEnabled=!!t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"allowdrop",{set:function(t){this.allowDrop=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dropzones",{set:function(t){this.dropZones=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"effectallowed",{set:function(t){this.effectAllowed=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"effectcursor",{set:function(t){this.effectCursor=t},enumerable:!0,configurable:!0}),n.prototype._onDragEnterCallback=function(t){this._dragDropService.isDragged&&(this._elem.classList.add(this._config.onDragEnterClass),this.onDragEnter.emit({dragData:this._dragDropService.dragData,mouseEvent:t}))},n.prototype._onDragOverCallback=function(t){this._dragDropService.isDragged&&(this._elem.classList.add(this._config.onDragOverClass),this.onDragOver.emit({dragData:this._dragDropService.dragData,mouseEvent:t}))},n.prototype._onDragLeaveCallback=function(t){this._dragDropService.isDragged&&(this._elem.classList.remove(this._config.onDragOverClass),this._elem.classList.remove(this._config.onDragEnterClass),this.onDragLeave.emit({dragData:this._dragDropService.dragData,mouseEvent:t}))},n.prototype._onDropCallback=function(t){var e=t.dataTransfer;(this._dragDropService.isDragged||e&&e.files)&&(this.onDropSuccess.emit({dragData:this._dragDropService.dragData,mouseEvent:t}),this._dragDropService.onDragSuccessCallback&&this._dragDropService.onDragSuccessCallback.emit({dragData:this._dragDropService.dragData,mouseEvent:t}),this._elem.classList.remove(this._config.onDragOverClass),this._elem.classList.remove(this._config.onDragEnterClass))},n}(t.AbstractComponent),_([e.Input("dropEnabled"),w("design:type",Boolean),w("design:paramtypes",[Boolean])],t.DroppableComponent.prototype,"droppable",null),_([e.Output(),w("design:type",e.EventEmitter)],t.DroppableComponent.prototype,"onDropSuccess",void 0),_([e.Output(),w("design:type",e.EventEmitter)],t.DroppableComponent.prototype,"onDragEnter",void 0),_([e.Output(),w("design:type",e.EventEmitter)],t.DroppableComponent.prototype,"onDragOver",void 0),_([e.Output(),w("design:type",e.EventEmitter)],t.DroppableComponent.prototype,"onDragLeave",void 0),_([e.Input("allowDrop"),w("design:type",Function),w("design:paramtypes",[Function])],t.DroppableComponent.prototype,"allowdrop",null),_([e.Input("dropZones"),w("design:type",Array),w("design:paramtypes",[Array])],t.DroppableComponent.prototype,"dropzones",null),_([e.Input("effectAllowed"),w("design:type",String),w("design:paramtypes",[String])],t.DroppableComponent.prototype,"effectallowed",null),_([e.Input("effectCursor"),w("design:type",String),w("design:paramtypes",[String])],t.DroppableComponent.prototype,"effectcursor",null),t.DroppableComponent=_([e.Directive({selector:"[dnd-droppable]"}),w("design:paramtypes",[e.ElementRef,t.DragDropService,c,e.ChangeDetectorRef])],t.DroppableComponent);var C=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},x=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};t.SortableContainer=function(t){function e(e,n,r,i,o){var a=t.call(this,e,n,r,i)||this;return a._sortableDataService=o,a._sortableData=[],a.dragEnabled=!1,a}return i(e,t),Object.defineProperty(e.prototype,"draggable",{set:function(t){this.dragEnabled=!!t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortableData",{get:function(){return this._sortableData},set:function(t){this._sortableData=t,t instanceof n.FormArray?this.sortableHandler=new E:this.sortableHandler=new S,this.dropEnabled=!!this._sortableData},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropzones",{set:function(t){this.dropZones=t},enumerable:!0,configurable:!0}),e.prototype._onDragEnterCallback=function(t){if(this._sortableDataService.isDragged){var e=this._sortableDataService.sortableContainer.getItemAt(this._sortableDataService.index);-1===this.indexOf(e)&&(this._sortableDataService.sortableContainer.removeItemAt(this._sortableDataService.index),0===this._sortableDataService.sortableContainer._sortableData.length&&(this._sortableDataService.sortableContainer.dropEnabled=!0),this.insertItemAt(e,0),this._sortableDataService.sortableContainer=this,this._sortableDataService.index=0),this.detectChanges()}},e.prototype.getItemAt=function(t){return this.sortableHandler.getItemAt(this._sortableData,t)},e.prototype.indexOf=function(t){return this.sortableHandler.indexOf(this._sortableData,t)},e.prototype.removeItemAt=function(t){this.sortableHandler.removeItemAt(this._sortableData,t)},e.prototype.insertItemAt=function(t,e){this.sortableHandler.insertItemAt(this._sortableData,t,e)},e}(t.AbstractComponent),C([e.Input("dragEnabled"),x("design:type",Boolean),x("design:paramtypes",[Boolean])],t.SortableContainer.prototype,"draggable",null),C([e.Input(),x("design:type",Object),x("design:paramtypes",[Object])],t.SortableContainer.prototype,"sortableData",null),C([e.Input("dropZones"),x("design:type",Array),x("design:paramtypes",[Array])],t.SortableContainer.prototype,"dropzones",null),t.SortableContainer=C([e.Directive({selector:"[dnd-sortable-container]"}),x("design:paramtypes",[e.ElementRef,t.DragDropService,c,e.ChangeDetectorRef,t.DragDropSortableService])],t.SortableContainer);var S=function(){function t(){}return t.prototype.getItemAt=function(t,e){return t[e]},t.prototype.indexOf=function(t,e){return t.indexOf(e)},t.prototype.removeItemAt=function(t,e){t.splice(e,1)},t.prototype.insertItemAt=function(t,e,n){t.splice(n,0,e)},t}(),E=function(){function t(){}return t.prototype.getItemAt=function(t,e){return t.at(e)},t.prototype.indexOf=function(t,e){return t.controls.indexOf(e)},t.prototype.removeItemAt=function(t,e){t.removeAt(e)},t.prototype.insertItemAt=function(t,e,n){t.insert(n,e)},t}();t.SortableComponent=function(t){function n(n,r,i,o,a,s){var l=t.call(this,n,r,i,s)||this;return l._sortableContainer=o,l._sortableDataService=a,l.onDragSuccessCallback=new e.EventEmitter,l.onDragStartCallback=new e.EventEmitter,l.onDragOverCallback=new e.EventEmitter,l.onDragEndCallback=new e.EventEmitter,l.onDropSuccessCallback=new e.EventEmitter,l.dropZones=l._sortableContainer.dropZones,l.dragEnabled=!0,l.dropEnabled=!0,l}return i(n,t),Object.defineProperty(n.prototype,"draggable",{set:function(t){this.dragEnabled=!!t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"droppable",{set:function(t){this.dropEnabled=!!t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"effectallowed",{set:function(t){this.effectAllowed=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"effectcursor",{set:function(t){this.effectCursor=t},enumerable:!0,configurable:!0}),n.prototype._onDragStartCallback=function(t){this._sortableDataService.isDragged=!0,this._sortableDataService.sortableContainer=this._sortableContainer,this._sortableDataService.index=this.index,this._sortableDataService.markSortable(this._elem),this._dragDropService.isDragged=!0,this._dragDropService.dragData=this.dragData,this._dragDropService.onDragSuccessCallback=this.onDragSuccessCallback,this.onDragStartCallback.emit(this._dragDropService.dragData)},n.prototype._onDragOverCallback=function(t){this._sortableDataService.isDragged&&this._elem!==this._sortableDataService.elem&&(this._sortableDataService.sortableContainer=this._sortableContainer,this._sortableDataService.index=this.index,this._sortableDataService.markSortable(this._elem),this.onDragOverCallback.emit(this._dragDropService.dragData))},n.prototype._onDragEndCallback=function(t){this._sortableDataService.isDragged=!1,this._sortableDataService.sortableContainer=null,this._sortableDataService.index=null,this._sortableDataService.markSortable(null),this._dragDropService.isDragged=!1,this._dragDropService.dragData=null,this._dragDropService.onDragSuccessCallback=null,this.onDragEndCallback.emit(this._dragDropService.dragData)},n.prototype._onDragEnterCallback=function(t){if(this._sortableDataService.isDragged&&(this._sortableDataService.markSortable(this._elem),this.index!==this._sortableDataService.index||this._sortableDataService.sortableContainer.sortableData!==this._sortableContainer.sortableData)){var e=this._sortableDataService.sortableContainer.getItemAt(this._sortableDataService.index);this._sortableDataService.sortableContainer.removeItemAt(this._sortableDataService.index),0===this._sortableDataService.sortableContainer.sortableData.length&&(this._sortableDataService.sortableContainer.dropEnabled=!0),this._sortableContainer.insertItemAt(e,this.index),this._sortableContainer.dropEnabled&&(this._sortableContainer.dropEnabled=!1),this._sortableDataService.sortableContainer=this._sortableContainer,this._sortableDataService.index=this.index,this.detectChanges()}},n.prototype._onDropCallback=function(t){this._sortableDataService.isDragged&&(this.onDropSuccessCallback.emit(this._dragDropService.dragData),this._dragDropService.onDragSuccessCallback&&this._dragDropService.onDragSuccessCallback.emit(this._dragDropService.dragData),this._sortableContainer.detectChanges())},n}(t.AbstractComponent),C([e.Input("sortableIndex"),x("design:type",Number)],t.SortableComponent.prototype,"index",void 0),C([e.Input("dragEnabled"),x("design:type",Boolean),x("design:paramtypes",[Boolean])],t.SortableComponent.prototype,"draggable",null),C([e.Input("dropEnabled"),x("design:type",Boolean),x("design:paramtypes",[Boolean])],t.SortableComponent.prototype,"droppable",null),C([e.Input(),x("design:type",Object)],t.SortableComponent.prototype,"dragData",void 0),C([e.Input("effectAllowed"),x("design:type",String),x("design:paramtypes",[String])],t.SortableComponent.prototype,"effectallowed",null),C([e.Input("effectCursor"),x("design:type",String),x("design:paramtypes",[String])],t.SortableComponent.prototype,"effectcursor",null),C([e.Output("onDragSuccess"),x("design:type",e.EventEmitter)],t.SortableComponent.prototype,"onDragSuccessCallback",void 0),C([e.Output("onDragStart"),x("design:type",e.EventEmitter)],t.SortableComponent.prototype,"onDragStartCallback",void 0),C([e.Output("onDragOver"),x("design:type",e.EventEmitter)],t.SortableComponent.prototype,"onDragOverCallback",void 0),C([e.Output("onDragEnd"),x("design:type",e.EventEmitter)],t.SortableComponent.prototype,"onDragEndCallback",void 0),C([e.Output("onDropSuccess"),x("design:type",e.EventEmitter)],t.SortableComponent.prototype,"onDropSuccessCallback",void 0),t.SortableComponent=C([e.Directive({selector:"[dnd-sortable]"}),x("design:paramtypes",[e.ElementRef,t.DragDropService,c,t.SortableContainer,t.DragDropSortableService,e.ChangeDetectorRef])],t.SortableComponent),t.SortableHandleComponent=function(t){function e(e,n,r,i,o){return t.call(this,e,n,r,i,o)||this}return i(e,t),e}(y),t.SortableHandleComponent=C([e.Directive({selector:"[dnd-sortable-handle]"}),x("design:paramtypes",[e.ElementRef,t.DragDropService,c,t.SortableComponent,e.ChangeDetectorRef])],t.SortableHandleComponent);var k,O=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},P=[c,{provide:t.DragDropService,useFactory:h},{provide:t.DragDropSortableService,useFactory:f,deps:[c]}];t.DndModule=k=function(){function t(){}return t.forRoot=function(){return{ngModule:k,providers:P}},t}(),t.DndModule=k=O([e.NgModule({declarations:[t.DraggableComponent,t.DraggableHandleComponent,t.DroppableComponent,t.SortableContainer,t.SortableComponent,t.SortableHandleComponent],exports:[t.DraggableComponent,t.DraggableHandleComponent,t.DroppableComponent,t.SortableContainer,t.SortableComponent,t.SortableHandleComponent]})],t.DndModule),t.providers=P,t.AbstractHandleComponent=y,t.DataTransferEffect=s,t.DragImage=l,t.DragDropConfig=c,t.DragDropData=d,t.dragDropServiceFactory=h,t.dragDropSortableServiceFactory=f,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("@angular/core"),t("@angular/forms")):i(r["ng2-dnd"]={},r.ng.core,r.ng.forms)},{"@angular/core":62,"@angular/forms":63}],70:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("./Subject"),o=t("./util/ObjectUnsubscribedError"),a=function(t){function e(e){t.call(this),this._value=e}return r(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.ObjectUnsubscribedError;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.Subject);n.BehaviorSubject=a},{"./Subject":77,"./util/ObjectUnsubscribedError":158}],71:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(e,n,r){t.call(this),this.parent=e,this.outerValue=n,this.outerIndex=r,this.index=0}return r(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(t("./Subscriber").Subscriber);n.InnerSubscriber=i},{"./Subscriber":79}],72:[function(t,e,n){"use strict";var r=t("./Observable"),i=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return r.Observable.of(this.value);case"E":return r.Observable.throw(this.error);case"C":return r.Observable.empty()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();n.Notification=i},{"./Observable":73}],73:[function(t,e,n){"use strict";var r=t("./util/root"),i=t("./util/toSubscriber"),o=t("./symbol/observable"),a=t("./util/pipe"),s=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,o=i.toSubscriber(t,e,n);if(r?r.call(o,this.source):o.add(this.source||!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.syncErrorThrown=!0,t.syncErrorValue=e,t.error(e)}},t.prototype.forEach=function(t,e){var n=this;if(e||(r.root.Rx&&r.root.Rx.config&&r.root.Rx.config.Promise?e=r.root.Rx.config.Promise:r.root.Promise&&(e=r.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,r){var i;i=n.subscribe(function(e){if(i)try{t(e)}catch(t){r(t),i.unsubscribe()}else t(e)},r,e)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[o.observable]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return 0===t.length?this:a.pipeFromArray(t)(this)},t.prototype.toPromise=function(t){var e=this;if(t||(r.root.Rx&&r.root.Rx.config&&r.root.Rx.config.Promise?t=r.root.Rx.config.Promise:r.root.Promise&&(t=r.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,n){var r;e.subscribe(function(t){return r=t},function(t){return n(t)},function(){return t(r)})})},t.create=function(e){return new t(e)},t}();n.Observable=s},{"./symbol/observable":154,"./util/pipe":171,"./util/root":172,"./util/toSubscriber":174}],74:[function(t,e,n){"use strict";n.empty={closed:!0,next:function(t){},error:function(t){throw t},complete:function(){}}},{}],75:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(){t.apply(this,arguments)}return r(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(t("./Subscriber").Subscriber);n.OuterSubscriber=i},{"./Subscriber":79}],76:[function(t,e,n){"use strict";var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=Date.now?Date.now:function(){return+new Date},t}();n.Scheduler=r},{}],77:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("./Observable"),o=t("./Subscriber"),a=t("./Subscription"),s=t("./util/ObjectUnsubscribedError"),l=t("./SubjectSubscription"),c=t("./symbol/rxSubscriber"),u=function(t){function e(e){t.call(this,e),this.destination=e}return r(e,t),e}(o.Subscriber);n.SubjectSubscriber=u;var p=function(t){function e(){t.call(this),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}return r(e,t),e.prototype[c.rxSubscriber]=function(){return new u(this)},e.prototype.lift=function(t){var e=new d(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new s.ObjectUnsubscribedError;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new s.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new s.ObjectUnsubscribedError;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new s.ObjectUnsubscribedError;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new s.ObjectUnsubscribedError;return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.isStopped?(t.complete(),a.Subscription.EMPTY):(this.observers.push(t),new l.SubjectSubscription(this,t))},e.prototype.asObservable=function(){var t=new i.Observable;return t.source=this,t},e.create=function(t,e){return new d(t,e)},e}(i.Observable);n.Subject=p;var d=function(t){function e(e,n){t.call(this),this.destination=e,this.source=n}return r(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):a.Subscription.EMPTY},e}(p);n.AnonymousSubject=d},{"./Observable":73,"./SubjectSubscription":78,"./Subscriber":79,"./Subscription":80,"./symbol/rxSubscriber":155,"./util/ObjectUnsubscribedError":158}],78:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(e,n){t.call(this),this.subject=e,this.subscriber=n,this.closed=!1}return r(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(t("./Subscription").Subscription);n.SubjectSubscription=i},{"./Subscription":80}],79:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("./util/isFunction"),o=t("./Subscription"),a=t("./Observer"),s=t("./symbol/rxSubscriber"),l=function(t){function e(n,r,i){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a.empty;break;case 1:if(!n){this.destination=a.empty;break}if("object"==typeof n){n instanceof e?(this.syncErrorThrowable=n.syncErrorThrowable,this.destination=n,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new c(this,n));break}default:this.syncErrorThrowable=!0,this.destination=new c(this,n,r,i)}}return r(e,t),e.prototype[s.rxSubscriber]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(o.Subscription);n.Subscriber=l;var c=function(t){function e(e,n,r,o){var s;t.call(this),this._parentSubscriber=e;var l=this;i.isFunction(n)?s=n:n&&(s=n.next,r=n.error,o=n.complete,n!==a.empty&&(l=Object.create(n),i.isFunction(l.unsubscribe)&&this.add(l.unsubscribe.bind(l)),l.unsubscribe=this.unsubscribe.bind(this))),this._context=l,this._next=s,this._error=r,this._complete=o}return r(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){throw this.unsubscribe(),t}},e.prototype.__tryOrSetError=function(t,e,n){try{e.call(this._context,n)}catch(e){return t.syncErrorValue=e,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(l)},{"./Observer":74,"./Subscription":80,"./symbol/rxSubscriber":155,"./util/isFunction":165}],80:[function(t,e,n){"use strict";var r=t("./util/isArray"),i=t("./util/isObject"),o=t("./util/isFunction"),a=t("./util/tryCatch"),s=t("./util/errorObject"),l=t("./util/UnsubscriptionError"),c=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,c=this._parents,p=this._unsubscribe,d=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var h=-1,f=c?c.length:0;n;)n.remove(this),n=++h<f&&c[h]||null;if(o.isFunction(p))a.tryCatch(p).call(this)===s.errorObject&&(e=!0,t=t||(s.errorObject.e instanceof l.UnsubscriptionError?u(s.errorObject.e.errors):[s.errorObject.e]));if(r.isArray(d))for(h=-1,f=d.length;++h<f;){var m=d[h];if(i.isObject(m))if(a.tryCatch(m.unsubscribe).call(m)===s.errorObject){e=!0,t=t||[];var g=s.errorObject.e;g instanceof l.UnsubscriptionError?t=t.concat(u(g.errors)):t.push(g)}}if(e)throw new l.UnsubscriptionError(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if("function"!=typeof n._addParent){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(n),n._addParent(this),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.prototype._addParent=function(t){var e=this._parent,n=this._parents;e&&e!==t?n?-1===n.indexOf(t)&&n.push(t):this._parents=[t]:this._parent=t},t.EMPTY=((e=new t).closed=!0,e),t}();function u(t){return t.reduce(function(t,e){return t.concat(e instanceof l.UnsubscriptionError?e.errors:e)},[])}n.Subscription=c},{"./util/UnsubscriptionError":159,"./util/errorObject":160,"./util/isArray":162,"./util/isFunction":165,"./util/isObject":167,"./util/tryCatch":175}],81:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Observable"),o=t("./ScalarObservable"),a=t("./EmptyObservable"),s=function(t){function e(e,n){t.call(this),this.arrayLike=e,this.scheduler=n,n||1!==e.length||(this._isScalar=!0,this.value=e[0])}return r(e,t),e.create=function(t,n){var r=t.length;return 0===r?new a.EmptyObservable:1===r?new o.ScalarObservable(t[0],n):new e(t,n)},e.dispatch=function(t){var e=t.arrayLike,n=t.index,r=t.length,i=t.subscriber;i.closed||(n>=r?i.complete():(i.next(e[n]),t.index=n+1,this.schedule(t)))},e.prototype._subscribe=function(t){var n=this.arrayLike,r=this.scheduler,i=n.length;if(r)return r.schedule(e.dispatch,0,{arrayLike:n,index:0,length:i,subscriber:t});for(var o=0;o<i&&!t.closed;o++)t.next(n[o]);t.complete()},e}(i.Observable);n.ArrayLikeObservable=s},{"../Observable":73,"./EmptyObservable":85,"./ScalarObservable":93}],82:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Observable"),o=t("./ScalarObservable"),a=t("./EmptyObservable"),s=t("../util/isScheduler"),l=function(t){function e(e,n){t.call(this),this.array=e,this.scheduler=n,n||1!==e.length||(this._isScalar=!0,this.value=e[0])}return r(e,t),e.create=function(t,n){return new e(t,n)},e.of=function(){for(var t=[],n=0;n<arguments.length;n++)t[n-0]=arguments[n];var r=t[t.length-1];s.isScheduler(r)?t.pop():r=null;var i=t.length;return i>1?new e(t,r):1===i?new o.ScalarObservable(t[0],r):new a.EmptyObservable(r)},e.dispatch=function(t){var e=t.array,n=t.index,r=t.count,i=t.subscriber;n>=r?i.complete():(i.next(e[n]),i.closed||(t.index=n+1,this.schedule(t)))},e.prototype._subscribe=function(t){var n=this.array,r=n.length,i=this.scheduler;if(i)return i.schedule(e.dispatch,0,{array:n,index:0,count:r,subscriber:t});for(var o=0;o<r&&!t.closed;o++)t.next(n[o]);t.complete()},e}(i.Observable);n.ArrayObservable=l},{"../Observable":73,"../util/isScheduler":169,"./EmptyObservable":85,"./ScalarObservable":93}],83:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subject"),o=t("../Observable"),a=t("../Subscriber"),s=t("../Subscription"),l=t("../operators/refCount"),c=function(t){function e(e,n){t.call(this),this.source=e,this.subjectFactory=n,this._refCount=0,this._isComplete=!1}return r(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new s.Subscription).add(this.source.subscribe(new p(this.getSubject(),this))),t.closed?(this._connection=null,t=s.Subscription.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return l.refCount()(this)},e}(o.Observable);n.ConnectableObservable=c;var u=c.prototype;n.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:u._subscribe},_isComplete:{value:u._isComplete,writable:!0},getSubject:{value:u.getSubject},connect:{value:u.connect},refCount:{value:u.refCount}};var p=function(t){function e(e,n){t.call(this,e),this.connectable=n}return r(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.SubjectSubscriber),d=(function(){function t(t){this.connectable=t}t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new d(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i}}(),function(t){function e(e,n){t.call(this,e),this.connectable=n}return r(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(a.Subscriber))},{"../Observable":73,"../Subject":77,"../Subscriber":79,"../Subscription":80,"../operators/refCount":140}],84:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Observable"),o=t("../util/subscribeToResult"),a=t("../OuterSubscriber"),s=function(t){function e(e){t.call(this),this.observableFactory=e}return r(e,t),e.create=function(t){return new e(t)},e.prototype._subscribe=function(t){return new l(t,this.observableFactory)},e}(i.Observable);n.DeferObservable=s;var l=function(t){function e(e,n){t.call(this,e),this.factory=n,this.tryDefer()}return r(e,t),e.prototype.tryDefer=function(){try{this._callFactory()}catch(t){this._error(t)}},e.prototype._callFactory=function(){var t=this.factory();t&&this.add(o.subscribeToResult(this,t))},e}(a.OuterSubscriber)},{"../Observable":73,"../OuterSubscriber":75,"../util/subscribeToResult":173}],85:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(e){t.call(this),this.scheduler=e}return r(e,t),e.create=function(t){return new e(t)},e.dispatch=function(t){t.subscriber.complete()},e.prototype._subscribe=function(t){var n=this.scheduler;if(n)return n.schedule(e.dispatch,0,{subscriber:t});t.complete()},e}(t("../Observable").Observable);n.EmptyObservable=i},{"../Observable":73}],86:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(e,n){t.call(this),this.error=e,this.scheduler=n}return r(e,t),e.create=function(t,n){return new e(t,n)},e.dispatch=function(t){var e=t.error;t.subscriber.error(e)},e.prototype._subscribe=function(t){var n=this.error,r=this.scheduler;if(t.syncErrorThrowable=!0,r)return r.schedule(e.dispatch,0,{error:n,subscriber:t});t.error(n)},e}(t("../Observable").Observable);n.ErrorObservable=i},{"../Observable":73}],87:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Observable"),o=t("./EmptyObservable"),a=t("../util/isArray"),s=t("../util/subscribeToResult"),l=t("../OuterSubscriber"),c=function(t){function e(e,n){t.call(this),this.sources=e,this.resultSelector=n}return r(e,t),e.create=function(){for(var t=[],n=0;n<arguments.length;n++)t[n-0]=arguments[n];if(null===t||0===arguments.length)return new o.EmptyObservable;var r=null;return"function"==typeof t[t.length-1]&&(r=t.pop()),1===t.length&&a.isArray(t[0])&&(t=t[0]),0===t.length?new o.EmptyObservable:new e(t,r)},e.prototype._subscribe=function(t){return new u(t,this.sources,this.resultSelector)},e}(i.Observable);n.ForkJoinObservable=c;var u=function(t){function e(e,n,r){t.call(this,e),this.sources=n,this.resultSelector=r,this.completed=0,this.haveValues=0;var i=n.length;this.total=i,this.values=new Array(i);for(var o=0;o<i;o++){var a=n[o],l=s.subscribeToResult(this,a,null,o);l&&(l.outerIndex=o,this.add(l))}}return r(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values[n]=e,i._hasValue||(i._hasValue=!0,this.haveValues++)},e.prototype.notifyComplete=function(t){var e=this.destination,n=this.haveValues,r=this.resultSelector,i=this.values,o=i.length;if(t._hasValue){if(this.completed++,this.completed===o){if(n===o){var a=r?r.apply(this,i):i;e.next(a)}e.complete()}}else e.complete()},e}(l.OuterSubscriber)},{"../Observable":73,"../OuterSubscriber":75,"../util/isArray":162,"../util/subscribeToResult":173,"./EmptyObservable":85}],88:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Observable"),o=t("../util/tryCatch"),a=t("../util/isFunction"),s=t("../util/errorObject"),l=t("../Subscription"),c=Object.prototype.toString;var u=function(t){function e(e,n,r,i){t.call(this),this.sourceObj=e,this.eventName=n,this.selector=r,this.options=i}return r(e,t),e.create=function(t,n,r,i){return a.isFunction(r)&&(i=r,r=void 0),new e(t,n,i,r)},e.setupSubscription=function(t,n,r,i,o){var a,s,u,p,d,h;if((h=t)&&"[object NodeList]"===c.call(h)||(d=t)&&"[object HTMLCollection]"===c.call(d))for(var f=0,m=t.length;f<m;f++)e.setupSubscription(t[f],n,r,i,o);else if((p=t)&&"function"==typeof p.addEventListener&&"function"==typeof p.removeEventListener){var g=t;t.addEventListener(n,r,o),a=function(){return g.removeEventListener(n,r)}}else if((u=t)&&"function"==typeof u.on&&"function"==typeof u.off){var y=t;t.on(n,r),a=function(){return y.off(n,r)}}else{if(!(s=t)||"function"!=typeof s.addListener||"function"!=typeof s.removeListener)throw new TypeError("Invalid event target");var v=t;t.addListener(n,r),a=function(){return v.removeListener(n,r)}}i.add(new l.Subscription(a))},e.prototype._subscribe=function(t){var n=this.sourceObj,r=this.eventName,i=this.options,a=this.selector;e.setupSubscription(n,r,a?function(){for(var e=[],n=0;n<arguments.length;n++)e[n-0]=arguments[n];var r=o.tryCatch(a).apply(void 0,e);r===s.errorObject?t.error(s.errorObject.e):t.next(r)}:function(e){return t.next(e)},t,i)},e}(i.Observable);n.FromEventObservable=u},{"../Observable":73,"../Subscription":80,"../util/errorObject":160,"../util/isFunction":165,"../util/tryCatch":175}],89:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../util/isFunction"),o=t("../Observable"),a=t("../Subscription"),s=function(t){function e(e,n,r){t.call(this),this.addHandler=e,this.removeHandler=n,this.selector=r}return r(e,t),e.create=function(t,n,r){return new e(t,n,r)},e.prototype._subscribe=function(t){var e=this,n=this.removeHandler,r=this.selector?function(){for(var n=[],r=0;r<arguments.length;r++)n[r-0]=arguments[r];e._callSelector(t,n)}:function(e){t.next(e)},o=this._callAddHandler(r,t);i.isFunction(n)&&t.add(new a.Subscription(function(){n(r,o)}))},e.prototype._callSelector=function(t,e){try{var n=this.selector.apply(this,e);t.next(n)}catch(e){t.error(e)}},e.prototype._callAddHandler=function(t,e){try{return this.addHandler(t)||null}catch(t){e.error(t)}},e}(o.Observable);n.FromEventPatternObservable=s},{"../Observable":73,"../Subscription":80,"../util/isFunction":165}],90:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../util/isArray"),o=t("../util/isArrayLike"),a=t("../util/isPromise"),s=t("./PromiseObservable"),l=t("./IteratorObservable"),c=t("./ArrayObservable"),u=t("./ArrayLikeObservable"),p=t("../symbol/iterator"),d=t("../Observable"),h=t("../operators/observeOn"),f=t("../symbol/observable"),m=function(t){function e(e,n){t.call(this,null),this.ish=e,this.scheduler=n}return r(e,t),e.create=function(t,n){if(null!=t){if("function"==typeof t[f.observable])return t instanceof d.Observable&&!n?t:new e(t,n);if(i.isArray(t))return new c.ArrayObservable(t,n);if(a.isPromise(t))return new s.PromiseObservable(t,n);if("function"==typeof t[p.iterator]||"string"==typeof t)return new l.IteratorObservable(t,n);if(o.isArrayLike(t))return new u.ArrayLikeObservable(t,n)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")},e.prototype._subscribe=function(t){var e=this.ish,n=this.scheduler;return null==n?e[f.observable]().subscribe(t):e[f.observable]().subscribe(new h.ObserveOnSubscriber(t,n,0))},e}(d.Observable);n.FromObservable=m},{"../Observable":73,"../operators/observeOn":138,"../symbol/iterator":153,"../symbol/observable":154,"../util/isArray":162,"../util/isArrayLike":163,"../util/isPromise":168,"./ArrayLikeObservable":81,"./ArrayObservable":82,"./IteratorObservable":91,"./PromiseObservable":92}],91:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../util/root"),o=t("../Observable"),a=t("../symbol/iterator"),s=function(t){function e(e,n){if(t.call(this),this.scheduler=n,null==e)throw new Error("iterator cannot be null.");this.iterator=function(t){var e=t[a.iterator];if(!e&&"string"==typeof t)return new l(t);if(!e&&void 0!==t.length)return new c(t);if(!e)throw new TypeError("object is not iterable");return t[a.iterator]()}(e)}return r(e,t),e.create=function(t,n){return new e(t,n)},e.dispatch=function(t){var e=t.index,n=t.hasError,r=t.iterator,i=t.subscriber;if(n)i.error(t.error);else{var o=r.next();o.done?i.complete():(i.next(o.value),t.index=e+1,i.closed?"function"==typeof r.return&&r.return():this.schedule(t))}},e.prototype._subscribe=function(t){var n=this.iterator,r=this.scheduler;if(r)return r.schedule(e.dispatch,0,{index:0,iterator:n,subscriber:t});for(;;){var i=n.next();if(i.done){t.complete();break}if(t.next(i.value),t.closed){"function"==typeof n.return&&n.return();break}}},e}(o.Observable);n.IteratorObservable=s;var l=function(){function t(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.length),this.str=t,this.idx=e,this.len=n}return t.prototype[a.iterator]=function(){return this},t.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.str.charAt(this.idx++)}:{done:!0,value:void 0}},t}(),c=function(){function t(t,e,n){void 0===e&&(e=0),void 0===n&&(n=function(t){var e=+t.length;if(isNaN(e))return 0;if(0===e||(n=e,"number"!=typeof n||!i.root.isFinite(n)))return e;var n;if(r=e,o=+r,(e=(0===o?o:isNaN(o)?o:o<0?-1:1)*Math.floor(Math.abs(e)))<=0)return 0;var r,o;if(e>u)return u;return e}(t)),this.arr=t,this.idx=e,this.len=n}return t.prototype[a.iterator]=function(){return this},t.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.arr[this.idx++]}:{done:!0,value:void 0}},t}();var u=Math.pow(2,53)-1},{"../Observable":73,"../symbol/iterator":153,"../util/root":172}],92:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../util/root"),o=function(t){function e(e,n){t.call(this),this.promise=e,this.scheduler=n}return r(e,t),e.create=function(t,n){return new e(t,n)},e.prototype._subscribe=function(t){var e=this,n=this.promise,r=this.scheduler;if(null==r)this._isScalar?t.closed||(t.next(this.value),t.complete()):n.then(function(n){e.value=n,e._isScalar=!0,t.closed||(t.next(n),t.complete())},function(e){t.closed||t.error(e)}).then(null,function(t){i.root.setTimeout(function(){throw t})});else if(this._isScalar){if(!t.closed)return r.schedule(a,0,{value:this.value,subscriber:t})}else n.then(function(n){e.value=n,e._isScalar=!0,t.closed||t.add(r.schedule(a,0,{value:n,subscriber:t}))},function(e){t.closed||t.add(r.schedule(s,0,{err:e,subscriber:t}))}).then(null,function(t){i.root.setTimeout(function(){throw t})})},e}(t("../Observable").Observable);function a(t){var e=t.value,n=t.subscriber;n.closed||(n.next(e),n.complete())}function s(t){var e=t.err,n=t.subscriber;n.closed||n.error(e)}n.PromiseObservable=o},{"../Observable":73,"../util/root":172}],93:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(e,n){t.call(this),this.value=e,this.scheduler=n,this._isScalar=!0,n&&(this._isScalar=!1)}return r(e,t),e.create=function(t,n){return new e(t,n)},e.dispatch=function(t){var e=t.done,n=t.value,r=t.subscriber;e?r.complete():(r.next(n),r.closed||(t.done=!0,this.schedule(t)))},e.prototype._subscribe=function(t){var n=this.value,r=this.scheduler;if(r)return r.schedule(e.dispatch,0,{done:!1,value:n,subscriber:t});t.next(n),t.closed||t.complete()},e}(t("../Observable").Observable);n.ScalarObservable=i},{"../Observable":73}],94:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../util/isNumeric"),o=t("../Observable"),a=t("../scheduler/async"),s=t("../util/isScheduler"),l=t("../util/isDate"),c=function(t){function e(e,n,r){void 0===e&&(e=0),t.call(this),this.period=-1,this.dueTime=0,i.isNumeric(n)?this.period=Number(n)<1?1:Number(n):s.isScheduler(n)&&(r=n),s.isScheduler(r)||(r=a.async),this.scheduler=r,this.dueTime=l.isDate(e)?+e-this.scheduler.now():e}return r(e,t),e.create=function(t,n,r){return void 0===t&&(t=0),new e(t,n,r)},e.dispatch=function(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}},e.prototype._subscribe=function(t){var n=this.period,r=this.dueTime;return this.scheduler.schedule(e.dispatch,r,{index:0,period:n,subscriber:t})},e}(o.Observable);n.TimerObservable=c},{"../Observable":73,"../scheduler/async":152,"../util/isDate":164,"../util/isNumeric":166,"../util/isScheduler":169}],95:[function(t,e,n){"use strict";var r=t("../util/isScheduler"),i=t("../util/isArray"),o=t("./ArrayObservable"),a=t("../operators/combineLatest");n.combineLatest=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n=null,s=null;return r.isScheduler(t[t.length-1])&&(s=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&i.isArray(t[0])&&(t=t[0]),new o.ArrayObservable(t,s).lift(new a.CombineLatestOperator(n))}},{"../operators/combineLatest":123,"../util/isArray":162,"../util/isScheduler":169,"./ArrayObservable":82}],96:[function(t,e,n){"use strict";var r=t("../util/isScheduler"),i=t("./of"),o=t("./from"),a=t("../operators/concatAll");n.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return 1===t.length||2===t.length&&r.isScheduler(t[1])?o.from(t[0]):a.concatAll()(i.of.apply(void 0,t))}},{"../operators/concatAll":124,"../util/isScheduler":169,"./from":100,"./of":105}],97:[function(t,e,n){"use strict";var r=t("./DeferObservable");n.defer=r.DeferObservable.create},{"./DeferObservable":84}],98:[function(t,e,n){"use strict";var r=t("./EmptyObservable");n.empty=r.EmptyObservable.create},{"./EmptyObservable":85}],99:[function(t,e,n){"use strict";var r=t("./ForkJoinObservable");n.forkJoin=r.ForkJoinObservable.create},{"./ForkJoinObservable":87}],100:[function(t,e,n){"use strict";var r=t("./FromObservable");n.from=r.FromObservable.create},{"./FromObservable":90}],101:[function(t,e,n){"use strict";var r=t("./FromEventObservable");n.fromEvent=r.FromEventObservable.create},{"./FromEventObservable":88}],102:[function(t,e,n){"use strict";var r=t("./FromEventPatternObservable");n.fromEventPattern=r.FromEventPatternObservable.create},{"./FromEventPatternObservable":89}],103:[function(t,e,n){"use strict";var r=t("./PromiseObservable");n.fromPromise=r.PromiseObservable.create},{"./PromiseObservable":92}],104:[function(t,e,n){"use strict";var r=t("../Observable"),i=t("./ArrayObservable"),o=t("../util/isScheduler"),a=t("../operators/mergeAll");n.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n=Number.POSITIVE_INFINITY,s=null,l=t[t.length-1];return o.isScheduler(l)?(s=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof l&&(n=t.pop()),null===s&&1===t.length&&t[0]instanceof r.Observable?t[0]:a.mergeAll(n)(new i.ArrayObservable(t,s))}},{"../Observable":73,"../operators/mergeAll":135,"../util/isScheduler":169,"./ArrayObservable":82}],105:[function(t,e,n){"use strict";var r=t("./ArrayObservable");n.of=r.ArrayObservable.of},{"./ArrayObservable":82}],106:[function(t,e,n){"use strict";var r=t("./ErrorObservable");n._throw=r.ErrorObservable.create},{"./ErrorObservable":86}],107:[function(t,e,n){"use strict";var r=t("./TimerObservable");n.timer=r.TimerObservable.create},{"./TimerObservable":94}],108:[function(t,e,n){"use strict";var r=t("../operators/catchError");n._catch=function(t){return r.catchError(t)(this)}},{"../operators/catchError":122}],109:[function(t,e,n){"use strict";var r=t("../operators/concatAll");n.concatAll=function(){return r.concatAll()(this)}},{"../operators/concatAll":124}],110:[function(t,e,n){"use strict";var r=t("../operators/concatMap");n.concatMap=function(t,e){return r.concatMap(t,e)(this)}},{"../operators/concatMap":125}],111:[function(t,e,n){"use strict";var r=t("../operators/every");n.every=function(t,e){return r.every(t,e)(this)}},{"../operators/every":129}],112:[function(t,e,n){"use strict";var r=t("../operators/filter");n.filter=function(t,e){return r.filter(t,e)(this)}},{"../operators/filter":130}],113:[function(t,e,n){"use strict";var r=t("../operators/first");n.first=function(t,e,n){return r.first(t,e,n)(this)}},{"../operators/first":132}],114:[function(t,e,n){"use strict";var r=t("../operators/last");n.last=function(t,e,n){return r.last(t,e,n)(this)}},{"../operators/last":133}],115:[function(t,e,n){"use strict";var r=t("../operators/map");n.map=function(t,e){return r.map(t,e)(this)}},{"../operators/map":134}],116:[function(t,e,n){"use strict";var r=t("../operators/mergeAll");n.mergeAll=function(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),r.mergeAll(t)(this)}},{"../operators/mergeAll":135}],117:[function(t,e,n){"use strict";var r=t("../operators/mergeMap");n.mergeMap=function(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),r.mergeMap(t,e,n)(this)}},{"../operators/mergeMap":136}],118:[function(t,e,n){"use strict";var r=t("../operators/reduce");n.reduce=function(t,e){return arguments.length>=2?r.reduce(t,e)(this):r.reduce(t)(this)}},{"../operators/reduce":139}],119:[function(t,e,n){"use strict";var r=t("../operators/share");n.share=function(){return r.share()(this)}},{"../operators/share":142}],120:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../util/tryCatch"),o=t("../util/errorObject"),a=t("../OuterSubscriber"),s=t("../util/subscribeToResult");n.audit=function(t){return function(e){return e.lift(new l(t))}};var l=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.durationSelector))},t}(),c=function(t){function e(e,n){t.call(this,e),this.durationSelector=n,this.hasValue=!1}return r(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=i.tryCatch(this.durationSelector)(t);if(e===o.errorObject)this.destination.error(o.errorObject.e);else{var n=s.subscribeToResult(this,e);n.closed?this.clearThrottle():this.add(this.throttled=n)}}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,r){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(a.OuterSubscriber)},{"../OuterSubscriber":75,"../util/errorObject":160,"../util/subscribeToResult":173,"../util/tryCatch":175}],121:[function(t,e,n){"use strict";var r=t("../scheduler/async"),i=t("./audit"),o=t("../observable/timer");n.auditTime=function(t,e){return void 0===e&&(e=r.async),i.audit(function(){return o.timer(t,e)})}},{"../observable/timer":107,"../scheduler/async":152,"./audit":120}],122:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../OuterSubscriber"),o=t("../util/subscribeToResult");n.catchError=function(t){return function(e){var n=new a(t),r=e.lift(n);return n.caught=r}};var a=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.selector,this.caught))},t}(),s=function(t){function e(e,n,r){t.call(this,e),this.selector=n,this.caught=r}return r(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle(),this.add(o.subscribeToResult(this,n))}},e}(i.OuterSubscriber)},{"../OuterSubscriber":75,"../util/subscribeToResult":173}],123:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../observable/ArrayObservable"),o=t("../util/isArray"),a=t("../OuterSubscriber"),s=t("../util/subscribeToResult"),l={};n.combineLatest=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n=null;return"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&o.isArray(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(new i.ArrayObservable([e].concat(t)),new c(n))}};var c=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.project))},t}();n.CombineLatestOperator=c;var u=function(t){function e(e,n){t.call(this,e),this.project=n,this.active=0,this.values=[],this.observables=[]}return r(e,t),e.prototype._next=function(t){this.values.push(l),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(s.subscribeToResult(this,r,r,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.values,a=o[n],s=this.toRespond?a===l?--this.toRespond:this.toRespond:0;o[n]=e,0===s&&(this.project?this._tryProject(o):this.destination.next(o.slice()))},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(a.OuterSubscriber);n.CombineLatestSubscriber=u},{"../OuterSubscriber":75,"../observable/ArrayObservable":82,"../util/isArray":162,"../util/subscribeToResult":173}],124:[function(t,e,n){"use strict";var r=t("./mergeAll");n.concatAll=function(){return r.mergeAll(1)}},{"./mergeAll":135}],125:[function(t,e,n){"use strict";var r=t("./mergeMap");n.concatMap=function(t,e){return r.mergeMap(t,e,1)}},{"./mergeMap":136}],126:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber"),o=t("../scheduler/async");n.debounceTime=function(t,e){return void 0===e&&(e=o.async),function(n){return n.lift(new a(t,e))}};var a=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.dueTime,this.scheduler))},t}(),s=function(t){function e(e,n,r){t.call(this,e),this.dueTime=n,this.scheduler=r,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}return r(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(l,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){this.clearDebounce(),this.hasValue&&(this.destination.next(this.lastValue),this.lastValue=null,this.hasValue=!1)},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(i.Subscriber);function l(t){t.debouncedNext()}},{"../Subscriber":79,"../scheduler/async":152}],127:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber");n.defaultIfEmpty=function(t){return void 0===t&&(t=null),function(e){return e.lift(new o(t))}};var o=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.defaultValue))},t}(),a=function(t){function e(e,n){t.call(this,e),this.defaultValue=n,this.isEmpty=!0}return r(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(i.Subscriber)},{"../Subscriber":79}],128:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../scheduler/async"),o=t("../util/isDate"),a=t("../Subscriber"),s=t("../Notification");n.delay=function(t,e){void 0===e&&(e=i.async);var n=o.isDate(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new l(n,e))}};var l=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.delay,this.scheduler))},t}(),c=function(t){function e(e,n,r){t.call(this,e),this.delay=n,this.scheduler=r,this.queue=[],this.active=!1,this.errored=!1}return r(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,i=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o)}else e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new u(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(s.Notification.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t)},e.prototype._complete=function(){this.scheduleNotification(s.Notification.createComplete())},e}(a.Subscriber),u=function(t,e){this.time=t,this.notification=e}},{"../Notification":72,"../Subscriber":79,"../scheduler/async":152,"../util/isDate":164}],129:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber");n.every=function(t,e){return function(n){return n.lift(new o(t,e,n))}};var o=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg,this.source))},t}(),a=function(t){function e(e,n,r,i){t.call(this,e),this.predicate=n,this.thisArg=r,this.source=i,this.index=0,this.thisArg=r||this}return r(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(i.Subscriber)},{"../Subscriber":79}],130:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber");n.filter=function(t,e){return function(n){return n.lift(new o(t,e))}};var o=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg))},t}(),a=function(t){function e(e,n,r){t.call(this,e),this.predicate=n,this.thisArg=r,this.count=0}return r(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(i.Subscriber)},{"../Subscriber":79}],131:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber"),o=t("../Subscription");n.finalize=function(t){return function(e){return e.lift(new a(t))}};var a=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.callback))},t}(),s=function(t){function e(e,n){t.call(this,e),this.add(new o.Subscription(n))}return r(e,t),e}(i.Subscriber)},{"../Subscriber":79,"../Subscription":80}],132:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber"),o=t("../util/EmptyError");n.first=function(t,e,n){return function(r){return r.lift(new a(t,e,n,r))}};var a=function(){function t(t,e,n,r){this.predicate=t,this.resultSelector=e,this.defaultValue=n,this.source=r}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.resultSelector,this.defaultValue,this.source))},t}(),s=function(t){function e(e,n,r,i,o){t.call(this,e),this.predicate=n,this.resultSelector=r,this.defaultValue=i,this.source=o,this.index=0,this.hasCompleted=!1,this._emitted=!1}return r(e,t),e.prototype._next=function(t){var e=this.index++;this.predicate?this._tryPredicate(t,e):this._emit(t,e)},e.prototype._tryPredicate=function(t,e){var n;try{n=this.predicate(t,e,this.source)}catch(t){return void this.destination.error(t)}n&&this._emit(t,e)},e.prototype._emit=function(t,e){this.resultSelector?this._tryResultSelector(t,e):this._emitFinal(t)},e.prototype._tryResultSelector=function(t,e){var n;try{n=this.resultSelector(t,e)}catch(t){return void this.destination.error(t)}this._emitFinal(n)},e.prototype._emitFinal=function(t){var e=this.destination;this._emitted||(this._emitted=!0,e.next(t),e.complete(),this.hasCompleted=!0)},e.prototype._complete=function(){var t=this.destination;this.hasCompleted||void 0===this.defaultValue?this.hasCompleted||t.error(new o.EmptyError):(t.next(this.defaultValue),t.complete())},e}(i.Subscriber)},{"../Subscriber":79,"../util/EmptyError":157}],133:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber"),o=t("../util/EmptyError");n.last=function(t,e,n){return function(r){return r.lift(new a(t,e,n,r))}};var a=function(){function t(t,e,n,r){this.predicate=t,this.resultSelector=e,this.defaultValue=n,this.source=r}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.resultSelector,this.defaultValue,this.source))},t}(),s=function(t){function e(e,n,r,i,o){t.call(this,e),this.predicate=n,this.resultSelector=r,this.defaultValue=i,this.source=o,this.hasValue=!1,this.index=0,void 0!==i&&(this.lastValue=i,this.hasValue=!0)}return r(e,t),e.prototype._next=function(t){var e=this.index++;if(this.predicate)this._tryPredicate(t,e);else{if(this.resultSelector)return void this._tryResultSelector(t,e);this.lastValue=t,this.hasValue=!0}},e.prototype._tryPredicate=function(t,e){var n;try{n=this.predicate(t,e,this.source)}catch(t){return void this.destination.error(t)}if(n){if(this.resultSelector)return void this._tryResultSelector(t,e);this.lastValue=t,this.hasValue=!0}},e.prototype._tryResultSelector=function(t,e){var n;try{n=this.resultSelector(t,e)}catch(t){return void this.destination.error(t)}this.lastValue=n,this.hasValue=!0},e.prototype._complete=function(){var t=this.destination;this.hasValue?(t.next(this.lastValue),t.complete()):t.error(new o.EmptyError)},e}(i.Subscriber)},{"../Subscriber":79,"../util/EmptyError":157}],134:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber");n.map=function(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new o(t,e))}};var o=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.thisArg))},t}();n.MapOperator=o;var a=function(t){function e(e,n,r){t.call(this,e),this.project=n,this.count=0,this.thisArg=r||this}return r(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.Subscriber)},{"../Subscriber":79}],135:[function(t,e,n){"use strict";var r=t("./mergeMap"),i=t("../util/identity");n.mergeAll=function(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),r.mergeMap(i.identity,null,t)}},{"../util/identity":161,"./mergeMap":136}],136:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../util/subscribeToResult"),o=t("../OuterSubscriber");n.mergeMap=function(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return"number"==typeof e&&(n=e,e=null),r.lift(new a(t,e,n))}};var a=function(){function t(t,e,n){void 0===n&&(n=Number.POSITIVE_INFINITY),this.project=t,this.resultSelector=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.project,this.resultSelector,this.concurrent))},t}();n.MergeMapOperator=a;var s=function(t){function e(e,n,r,i){void 0===i&&(i=Number.POSITIVE_INFINITY),t.call(this,e),this.project=n,this.resultSelector=r,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return r(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){this.add(i.subscribeToResult(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){this.resultSelector?this._notifyResultSelector(t,e,n,r):this.destination.next(e)},e.prototype._notifyResultSelector=function(t,e,n,r){var i;try{i=this.resultSelector(t,e,n,r)}catch(t){return void this.destination.error(t)}this.destination.next(i)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(o.OuterSubscriber);n.MergeMapSubscriber=s},{"../OuterSubscriber":75,"../util/subscribeToResult":173}],137:[function(t,e,n){"use strict";var r=t("../observable/ConnectableObservable");n.multicast=function(t,e){return function(n){var o;if(o="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new i(o,e));var a=Object.create(n,r.connectableObservableDescriptor);return a.source=n,a.subjectFactory=o,a}};var i=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}();n.MulticastOperator=i},{"../observable/ConnectableObservable":83}],138:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber"),o=t("../Notification");n.observeOn=function(t,e){return void 0===e&&(e=0),function(n){return n.lift(new a(t,e))}};var a=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.scheduler,this.delay))},t}();n.ObserveOnOperator=a;var s=function(t){function e(e,n,r){void 0===r&&(r=0),t.call(this,e),this.scheduler=n,this.delay=r}return r(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new l(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(o.Notification.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(o.Notification.createError(t))},e.prototype._complete=function(){this.scheduleMessage(o.Notification.createComplete())},e}(i.Subscriber);n.ObserveOnSubscriber=s;var l=function(t,e){this.notification=t,this.destination=e};n.ObserveOnMessage=l},{"../Notification":72,"../Subscriber":79}],139:[function(t,e,n){"use strict";var r=t("./scan"),i=t("./takeLast"),o=t("./defaultIfEmpty"),a=t("../util/pipe");n.reduce=function(t,e){return arguments.length>=2?function(n){return a.pipe(r.scan(t,e),i.takeLast(1),o.defaultIfEmpty(e))(n)}:function(e){return a.pipe(r.scan(function(e,n,r){return t(e,n,r+1)}),i.takeLast(1))(e)}}},{"../util/pipe":171,"./defaultIfEmpty":127,"./scan":141,"./takeLast":146}],140:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber");n.refCount=function(){return function(t){return t.lift(new o(t))}};var o=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new a(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),a=function(t){function e(e,n){t.call(this,e),this.connectable=n}return r(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(i.Subscriber)},{"../Subscriber":79}],141:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber");n.scan=function(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new o(t,e,n))}};var o=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.accumulator,this.seed,this.hasSeed))},t}(),a=function(t){function e(e,n,r,i){t.call(this,e),this.accumulator=n,this._seed=r,this.hasSeed=i,this.index=0}return r(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(i.Subscriber)},{"../Subscriber":79}],142:[function(t,e,n){"use strict";var r=t("./multicast"),i=t("./refCount"),o=t("../Subject");function a(){return new o.Subject}n.share=function(){return function(t){return i.refCount()(r.multicast(a)(t))}}},{"../Subject":77,"./multicast":137,"./refCount":140}],143:[function(t,e,n){"use strict";var r=t("../observable/ArrayObservable"),i=t("../observable/ScalarObservable"),o=t("../observable/EmptyObservable"),a=t("../observable/concat"),s=t("../util/isScheduler");n.startWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){var n=t[t.length-1];s.isScheduler(n)?t.pop():n=null;var l=t.length;return 1===l?a.concat(new i.ScalarObservable(t[0],n),e):l>1?a.concat(new r.ArrayObservable(t,n),e):a.concat(new o.EmptyObservable(n),e)}}},{"../observable/ArrayObservable":82,"../observable/EmptyObservable":85,"../observable/ScalarObservable":93,"../observable/concat":96,"../util/isScheduler":169}],144:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../OuterSubscriber"),o=t("../util/subscribeToResult");n.switchMap=function(t,e){return function(n){return n.lift(new a(t,e))}};var a=function(){function t(t,e){this.project=t,this.resultSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.project,this.resultSelector))},t}(),s=function(t){function e(e,n,r){t.call(this,e),this.project=n,this.resultSelector=r,this.index=0}return r(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=this.innerSubscription;r&&r.unsubscribe(),this.add(this.innerSubscription=o.subscribeToResult(this,t,e,n))},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){this.resultSelector?this._tryNotifyNext(t,e,n,r):this.destination.next(e)},e.prototype._tryNotifyNext=function(t,e,n,r){var i;try{i=this.resultSelector(t,e,n,r)}catch(t){return void this.destination.error(t)}this.destination.next(i)},e}(i.OuterSubscriber)},{"../OuterSubscriber":75,"../util/subscribeToResult":173}],145:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber"),o=t("../util/ArgumentOutOfRangeError"),a=t("../observable/EmptyObservable");n.take=function(t){return function(e){return 0===t?new a.EmptyObservable:e.lift(new s(t))}};var s=function(){function t(t){if(this.total=t,this.total<0)throw new o.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.total))},t}(),l=function(t){function e(e,n){t.call(this,e),this.total=n,this.count=0}return r(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(i.Subscriber)},{"../Subscriber":79,"../observable/EmptyObservable":85,"../util/ArgumentOutOfRangeError":156}],146:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber"),o=t("../util/ArgumentOutOfRangeError"),a=t("../observable/EmptyObservable");n.takeLast=function(t){return function(e){return 0===t?new a.EmptyObservable:e.lift(new s(t))}};var s=function(){function t(t){if(this.total=t,this.total<0)throw new o.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.total))},t}(),l=function(t){function e(e,n){t.call(this,e),this.total=n,this.ring=new Array,this.count=0}return r(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var o=e++%n;t.next(r[o])}t.complete()},e}(i.Subscriber)},{"../Subscriber":79,"../observable/EmptyObservable":85,"../util/ArgumentOutOfRangeError":156}],147:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../OuterSubscriber"),o=t("../util/subscribeToResult");n.takeUntil=function(t){return function(e){return e.lift(new a(t))}};var a=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.notifier))},t}(),s=function(t){function e(e,n){t.call(this,e),this.notifier=n,this.add(o.subscribeToResult(this,n))}return r(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.complete()},e.prototype.notifyComplete=function(){},e}(i.OuterSubscriber)},{"../OuterSubscriber":75,"../util/subscribeToResult":173}],148:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber");n.tap=function(t,e,n){return function(r){return r.lift(new o(t,e,n))}};var o=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.nextOrObserver,this.error,this.complete))},t}(),a=function(t){function e(e,n,r,o){t.call(this,e);var a=new i.Subscriber(n,r,o);a.syncErrorThrowable=!0,this.add(a),this.safeSubscriber=a}return r(e,t),e.prototype._next=function(t){var e=this.safeSubscriber;e.next(t),e.syncErrorThrown?this.destination.error(e.syncErrorValue):this.destination.next(t)},e.prototype._error=function(t){var e=this.safeSubscriber;e.error(t),e.syncErrorThrown?this.destination.error(e.syncErrorValue):this.destination.error(t)},e.prototype._complete=function(){var t=this.safeSubscriber;t.complete(),t.syncErrorThrown?this.destination.error(t.syncErrorValue):this.destination.complete()},e}(i.Subscriber)},{"../Subscriber":79}],149:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(e,n){t.call(this)}return r(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(t("../Subscription").Subscription);n.Action=i},{"../Subscription":80}],150:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../util/root"),o=function(t){function e(e,n){t.call(this,e,n),this.scheduler=e,this.work=n,this.pending=!1}return r(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t,this.pending=!0;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),i.root.setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;i.root.clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(t("./Action").Action);n.AsyncAction=o},{"../util/root":172,"./Action":149}],151:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(){t.apply(this,arguments),this.actions=[],this.active=!1,this.scheduled=void 0}return r(e,t),e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(t("../Scheduler").Scheduler);n.AsyncScheduler=i},{"../Scheduler":76}],152:[function(t,e,n){"use strict";var r=t("./AsyncAction"),i=t("./AsyncScheduler");n.async=new i.AsyncScheduler(r.AsyncAction)},{"./AsyncAction":150,"./AsyncScheduler":151}],153:[function(t,e,n){"use strict";var r=t("../util/root");function i(t){var e=t.Symbol;if("function"==typeof e)return e.iterator||(e.iterator=e("iterator polyfill")),e.iterator;var n=t.Set;if(n&&"function"==typeof(new n)["@@iterator"])return"@@iterator";var r=t.Map;if(r)for(var i=Object.getOwnPropertyNames(r.prototype),o=0;o<i.length;++o){var a=i[o];if("entries"!==a&&"size"!==a&&r.prototype[a]===r.prototype.entries)return a}return"@@iterator"}n.symbolIteratorPonyfill=i,n.iterator=i(r.root),n.$$iterator=n.iterator},{"../util/root":172}],154:[function(t,e,n){"use strict";var r=t("../util/root");function i(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}n.getSymbolObservable=i,n.observable=i(r.root),n.$$observable=n.observable},{"../util/root":172}],155:[function(t,e,n){"use strict";var r=t("../util/root").root.Symbol;n.rxSubscriber="function"==typeof r&&"function"==typeof r.for?r.for("rxSubscriber"):"@@rxSubscriber",n.$$rxSubscriber=n.rxSubscriber},{"../util/root":172}],156:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(){var e=t.call(this,"argument out of range");this.name=e.name="ArgumentOutOfRangeError",this.stack=e.stack,this.message=e.message}return r(e,t),e}(Error);n.ArgumentOutOfRangeError=i},{}],157:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(){var e=t.call(this,"no elements in sequence");this.name=e.name="EmptyError",this.stack=e.stack,this.message=e.message}return r(e,t),e}(Error);n.EmptyError=i},{}],158:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(){var e=t.call(this,"object unsubscribed");this.name=e.name="ObjectUnsubscribedError",this.stack=e.stack,this.message=e.message}return r(e,t),e}(Error);n.ObjectUnsubscribedError=i},{}],159:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(e){t.call(this),this.errors=e;var n=Error.call(this,e?e.length+" errors occurred during unsubscription:\n  "+e.map(function(t,e){return e+1+") "+t.toString()}).join("\n  "):"");this.name=n.name="UnsubscriptionError",this.stack=n.stack,this.message=n.message}return r(e,t),e}(Error);n.UnsubscriptionError=i},{}],160:[function(t,e,n){"use strict";n.errorObject={e:{}}},{}],161:[function(t,e,n){"use strict";n.identity=function(t){return t}},{}],162:[function(t,e,n){"use strict";n.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},{}],163:[function(t,e,n){"use strict";n.isArrayLike=function(t){return t&&"number"==typeof t.length}},{}],164:[function(t,e,n){"use strict";n.isDate=function(t){return t instanceof Date&&!isNaN(+t)}},{}],165:[function(t,e,n){"use strict";n.isFunction=function(t){return"function"==typeof t}},{}],166:[function(t,e,n){"use strict";var r=t("../util/isArray");n.isNumeric=function(t){return!r.isArray(t)&&t-parseFloat(t)+1>=0}},{"../util/isArray":162}],167:[function(t,e,n){"use strict";n.isObject=function(t){return null!=t&&"object"==typeof t}},{}],168:[function(t,e,n){"use strict";n.isPromise=function(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}},{}],169:[function(t,e,n){"use strict";n.isScheduler=function(t){return t&&"function"==typeof t.schedule}},{}],170:[function(t,e,n){"use strict";n.noop=function(){}},{}],171:[function(t,e,n){"use strict";var r=t("./noop");function i(t){return t?1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}:r.noop}n.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return i(t)},n.pipeFromArray=i},{"./noop":170}],172:[function(t,e,n){(function(t){"use strict";var e="undefined"!=typeof window&&window,r="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,i=e||void 0!==t&&t||r;n.root=i,function(){if(!i)throw new Error("RxJS could not find any global context (window, self, global)")}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],173:[function(t,e,n){"use strict";var r=t("./root"),i=t("./isArrayLike"),o=t("./isPromise"),a=t("./isObject"),s=t("../Observable"),l=t("../symbol/iterator"),c=t("../InnerSubscriber"),u=t("../symbol/observable");n.subscribeToResult=function(t,e,n,p){var d=new c.InnerSubscriber(t,n,p);if(d.closed)return null;if(e instanceof s.Observable)return e._isScalar?(d.next(e.value),d.complete(),null):(d.syncErrorThrowable=!0,e.subscribe(d));if(i.isArrayLike(e)){for(var h=0,f=e.length;h<f&&!d.closed;h++)d.next(e[h]);d.closed||d.complete()}else{if(o.isPromise(e))return e.then(function(t){d.closed||(d.next(t),d.complete())},function(t){return d.error(t)}).then(null,function(t){r.root.setTimeout(function(){throw t})}),d;if(e&&"function"==typeof e[l.iterator])for(var m=e[l.iterator]();;){var g=m.next();if(g.done){d.complete();break}if(d.next(g.value),d.closed)break}else if(e&&"function"==typeof e[u.observable]){var y=e[u.observable]();if("function"==typeof y.subscribe)return y.subscribe(new c.InnerSubscriber(t,n,p));d.error(new TypeError("Provided object does not correctly implement Symbol.observable"))}else{var v="You provided "+(a.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";d.error(new TypeError(v))}}return null}},{"../InnerSubscriber":71,"../Observable":73,"../symbol/iterator":153,"../symbol/observable":154,"./isArrayLike":163,"./isObject":167,"./isPromise":168,"./root":172}],174:[function(t,e,n){"use strict";var r=t("../Subscriber"),i=t("../symbol/rxSubscriber"),o=t("../Observer");n.toSubscriber=function(t,e,n){if(t){if(t instanceof r.Subscriber)return t;if(t[i.rxSubscriber])return t[i.rxSubscriber]()}return t||e||n?new r.Subscriber(t,e,n):new r.Subscriber(o.empty)}},{"../Observer":74,"../Subscriber":79,"../symbol/rxSubscriber":155}],175:[function(t,e,n){"use strict";var r,i=t("./errorObject");function o(){try{return r.apply(this,arguments)}catch(t){return i.errorObject.e=t,i.errorObject}}n.tryCatch=function(t){return r=t,o}},{"./errorObject":160}],176:[function(t,e,n){(function(t){var n,r,i,o,a,s,l,c,u,p,d,h,f,m,g,y,v,b,_;!function(n){var r="object"==typeof t?t:"object"==typeof self?self:"object"==typeof this?this:{};function i(t,e){return t!==r&&("function"==typeof Object.create?Object.defineProperty(t,"__esModule",{value:!0}):t.__esModule=!0),function(n,r){return t[n]=e?e(n,r):r}}"object"==typeof e&&"object"==typeof e.exports?n(i(r,i(e.exports))):n(i(r))}(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};n=function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)},r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n},o=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=function(t,e){return function(n,r){e(n,r,t)}},s=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},l=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}l((r=r.apply(t,e||[])).next())})},c=function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},u=function(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])},p=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}},d=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},h=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t},f=function(t){return this instanceof f?(this.v=t,this):new f(t)},m=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||s(t,e)})})}function s(t,e){try{(n=i[t](e)).value instanceof f?Promise.resolve(n.value.v).then(l,c):u(o[0][2],n)}catch(t){u(o[0][3],t)}var n}function l(t){s("next",t)}function c(t){s("throw",t)}function u(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}},g=function(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){t[r]&&(e[r]=function(e){return(n=!n)?{value:f(t[r](e)),done:"return"===r}:i?i(e):e})}},y=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):p(t)},v=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},b=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e},_=function(t){return t&&t.__esModule?t:{default:t}},t("__extends",n),t("__assign",r),t("__rest",i),t("__decorate",o),t("__param",a),t("__metadata",s),t("__awaiter",l),t("__generator",c),t("__exportStar",u),t("__values",p),t("__read",d),t("__spread",h),t("__await",f),t("__asyncGenerator",m),t("__asyncDelegator",g),t("__asyncValues",y),t("__makeTemplateObject",v),t("__importStar",b),t("__importDefault",_)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[41])(41)});
\ No newline at end of file
diff --git a/apps/maarch_entreprise/js/angular/systemjs.config.js b/apps/maarch_entreprise/js/angular/systemjs.config.js
deleted file mode 100755
index d186bd7231e40329ef24b120c5ac0931ec74a489..0000000000000000000000000000000000000000
--- a/apps/maarch_entreprise/js/angular/systemjs.config.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * System configuration for Angular samples
- * Adjust as necessary for your application needs.
- */
-(function (global) {
-  System.config({
-    paths: {
-      // paths serve as alias
-      'npm:': '../../node_modules/'
-    },
-    // map tells the System loader where to look for things
-    map: {
-      app: 'js/angular/app',
-      lang: 'js/angular/lang',
-      plugins: 'js/angular/plugins',
-
-      // angular bundles
-      '@angular/animations': 'npm:@angular/animations/bundles/animations.umd.min.js',
-      '@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.min.js',
-      '@angular/cdk': 'npm:@angular/cdk/bundles/cdk.umd.min.js',
-      '@angular/cdk/a11y': 'npm:@angular/cdk/bundles/cdk-a11y.umd.min.js',
-      '@angular/cdk/accordion': 'npm:@angular/cdk/bundles/cdk-accordion.umd.min.js',
-      '@angular/cdk/bidi': 'npm:@angular/cdk/bundles/cdk-bidi.umd.min.js',
-      '@angular/cdk/coercion': 'npm:@angular/cdk/bundles/cdk-coercion.umd.min.js',
-      '@angular/cdk/collections': 'npm:@angular/cdk/bundles/cdk-collections.umd.min.js',
-      '@angular/cdk/keycodes': 'npm:@angular/cdk/bundles/cdk-keycodes.umd.min.js',
-      '@angular/cdk/layout': 'npm:@angular/cdk/bundles/cdk-layout.umd.min.js',
-      '@angular/cdk/observers': 'npm:@angular/cdk/bundles/cdk-observers.umd.min.js',
-      '@angular/cdk/overlay': 'npm:@angular/cdk/bundles/cdk-overlay.umd.min.js',
-      '@angular/cdk/platform': 'npm:@angular/cdk/bundles/cdk-platform.umd.min.js',
-      '@angular/cdk/portal': 'npm:@angular/cdk/bundles/cdk-portal.umd.min.js',
-      '@angular/cdk/rxjs': 'npm:@angular/cdk/bundles/cdk-rxjs.umd.min.js',
-      '@angular/cdk/scrolling': 'npm:@angular/cdk/bundles/cdk-scrolling.umd.min.js',
-      '@angular/cdk/stepper': 'npm:@angular/cdk/bundles/cdk-stepper.umd.min.js',
-      '@angular/cdk/table': 'npm:@angular/cdk/bundles/cdk-table.umd.min.js',
-      '@angular/common': 'npm:@angular/common/bundles/common.umd.min.js',
-      '@angular/common/http': 'npm:@angular/common/bundles/common-http.umd.min.js',
-      '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.min.js',
-      '@angular/core': 'npm:@angular/core/bundles/core.umd.min.js',
-      '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.min.js',
-      '@angular/http': 'npm:@angular/http/bundles/http.umd.min.js',
-      '@angular/material-moment-adapter': 'npm:@angular/material-moment-adapter/bundles/material-moment-adapter.umd.min.js',
-      '@angular/material': 'npm:@angular/material/bundles/material.umd.min.js',
-      '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.min.js',
-      '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.min.js',
-      '@angular/platform-browser/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.min.js',
-      '@angular/router': 'npm:@angular/router/bundles/router.umd.min.js',
-      'ng2-dnd': 'npm:ng2-dnd/bundles/ng2-dnd.umd.min.js',
-
-      // other libraries
-      'rxjs':     'npm:rxjs',
-      'tslib':    'npm:tslib/tslib.js'
-    },
-    // packages tells the System loader how to load when no filename and/or no extension
-    packages: {
-      app: {
-        defaultExtension: 'js'
-      },
-      lang: {
-        defaultExtension: 'js'
-      },
-      plugins: {
-        defaultExtension: 'js'
-      },
-      rxjs: {
-        defaultExtension: 'js'
-      },
-    }
-  });
-})(this);
diff --git a/apps/maarch_entreprise/js/angular/tsconfig.app.json b/apps/maarch_entreprise/js/angular/tsconfig.app.json
new file mode 100644
index 0000000000000000000000000000000000000000..f4c049cad095e7e276699adf075d01311fa944d4
--- /dev/null
+++ b/apps/maarch_entreprise/js/angular/tsconfig.app.json
@@ -0,0 +1,12 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "outDir": "../out-tsc/app",
+    "baseUrl": "../../",
+    "module": "es2015",
+    "types": []
+  },
+  "exclude": [
+    "**/*.spec.ts"
+  ]
+}
diff --git a/apps/maarch_entreprise/js/angularFunctions.js b/apps/maarch_entreprise/js/angularFunctions.js
index 4c95143d9ef68b45041ac095cd407433f6226e6b..66eb6409d38fcf21149b299f2baed66281b3151d 100755
--- a/apps/maarch_entreprise/js/angularFunctions.js
+++ b/apps/maarch_entreprise/js/angularFunctions.js
@@ -1,88 +1,45 @@
 var angularGlobals = {};
+var alreadyLoaded = false;
 function triggerAngular(prodmode, locationToGo) {
-    var views = [
-        //'header',
-        'administration',
-        'users-administration',
-        'users-administration-redirect-modal',
-        'user-administration',
-        'groups-administration',
-        'groups-administration-redirect-modal',
-        'group-administration',
-        'baskets-administration',
-        'basket-administration',
-        'basket-administration-settings-modal',
-        'basket-administration-groupList-modal',
-        'doctypes-administration',
-        'doctypes-administration-redirect-modal',
-        'diffusionModels-administration',
-        'diffusionModel-administration',
-        'entities-administration',
-        'entities-administration-redirect-modal',
-        'entity-administration',
-        'status-administration',
-        'statuses-administration',
-        'actions-administration',
-        'action-administration',
-        'history-administration',
-        'historyBatch-administration',
-        'update-status-administration',
-        'profile',
-        'signature-book',
-        'parameter-administration',
-        'parameters-administration',
-        'priorities-administration',
-        'priority-administration',
-        'reports-administration',
-        'notifications-administration',
-        'notifications-schedule-administration',
-        'notification-administration'
-    ];
-
     $j.ajax({
         url      : '../../rest/initialize',
-        type     : 'POST',
+        type     : 'GET',
         dataType : 'json',
-        data: {
-            views  : views
-        },
         success: function(answer) {
-
             angularGlobals = answer;
+
             $j('#inner_content').html('<i class="fa fa-spinner fa-spin fa-5x" style="margin-left: 50%;margin-top: 16%;font-size: 8em"></i>');
-            if (prodmode) {
 
-                var alreadyLoaded = false;
-                $j('script').each(function(i, element) {
-                    if (element.src == (answer.coreUrl + "apps/maarch_entreprise/js/angular/main.bundle.min.js")) {
-                        alreadyLoaded = true;
-                    }
-                });
-                if (!alreadyLoaded) {
-                    var head = document.getElementsByTagName('head')[0];
+            if (!alreadyLoaded) {
+                var head = document.getElementsByTagName('head')[0];
+
+                answer['scriptsToinject'].forEach(function(element, i) {
                     var script = document.createElement('script');
                     script.type = 'text/javascript';
-                    script.src = "js/angular/main.bundle.min.js";
+                    script.src = "../../dist/" + element;
 
-                    script.onreadystatechange = changeLocationToAngular(locationToGo);
-                    script.onload = changeLocationToAngular(locationToGo);
+                    if ((i + 1) === answer['scriptsToinject'].length) {
+                        script.onreadystatechange = changeLocationToAngular(locationToGo);
+                        script.onload = changeLocationToAngular(locationToGo);
+                    }
 
                     // Fire the loading
-                    head.appendChild(script);
-                    var meta = document.createElement('meta');
-                    meta.name = 'viewport';
-                    meta.content = "width=device-width, initial-scale=1.0";
-                    head.appendChild(meta);
-                } else {
-                    location.href = locationToGo;
-                }
-            } else {
-                System.import('js/angular/main.js').catch(function(err){ console.error(err); });
-                var head = document.getElementsByTagName('head')[0];
+                    if (i === 2) {
+                        setTimeout(function () {
+                            head.appendChild(script);
+                        }, 400);
+                    } else {
+                        head.appendChild(script);
+                    }
+                });
+
                 var meta = document.createElement('meta');
                 meta.name = 'viewport';
                 meta.content = "width=device-width, initial-scale=1.0";
                 head.appendChild(meta);
+
+                alreadyLoaded = true;
+            } else {
                 location.href = locationToGo;
             }
         }
diff --git a/apps/maarch_entreprise/js/functions.js b/apps/maarch_entreprise/js/functions.js
index 4c0886e4a1c7f8d560082c7272f4573c96dc6d82..6373aa5f6a04e0995a30e3938b0826721168bfef 100755
--- a/apps/maarch_entreprise/js/functions.js
+++ b/apps/maarch_entreprise/js/functions.js
@@ -1806,6 +1806,27 @@ function unlock(path_script, id, coll) // A FAIRE
         });
     }
 }
+function checkCommunication(contactId){
+    if (!contactId || !Number.isInteger(parseInt(contactId))) {
+        Element.setStyle($('type_contact_communication_icon'), {visibility : 'hidden'});
+        return false;
+    }
+
+    $j.ajax({
+        url      : '../../rest/contact/checkCommunication/'+contactId,
+        type     : 'get',
+        data: {
+        },
+        success: function(answer) {
+            if(answer[0]) {
+                Element.setStyle($('type_contact_communication_icon'), {visibility : 'visible'});
+            } else {
+                Element.setStyle($('type_contact_communication_icon'), {visibility : 'hidden'});
+            }
+
+        }
+    });
+}
 
 function setContactType(mode, creation){
     new Ajax.Request("index.php?dir=my_contacts&page=setContactType",
@@ -1918,7 +1939,39 @@ function show_admin_contacts( is_corporate, display)
         {
             //society_mandatory.style.display = 'none';
             society_mandatory.css('display', 'none');
-
+        }
+    }
+}
+/**
+* Show or hide the data related to a person in the external contacts admin
+*
+* @param is_external Bool True the contact is external contact
+**/
+function show_admin_external_contact( is_external, display)
+{
+    var display_value = display || 'inline';
+    var searchDirectory = $("search_directory");
+    var externalContactLabel = $("external_contact_id");
+    if(is_external === false)
+    {
+        if(searchDirectory)
+        {
+            searchDirectory.style.display = "none";
+        }
+        if(externalContactLabel)
+        {
+            externalContactLabel.style.display = "none";
+        }
+    }
+    else
+    {
+        if(searchDirectory)
+        {
+            searchDirectory.style.display = display_value;
+        }
+        if(externalContactLabel)
+        {
+            externalContactLabel.style.display = display_value;
         }
     }
 }
diff --git a/apps/maarch_entreprise/lang/en.php b/apps/maarch_entreprise/lang/en.php
index 2198c2426b2f319dfa46b16d8afca243ca3e0b5d..47123b8f7e5122378a630b14a94da5f49b73bd8a 100755
--- a/apps/maarch_entreprise/lang/en.php
+++ b/apps/maarch_entreprise/lang/en.php
@@ -155,6 +155,7 @@ if (!defined("_EMAIL")) define("_EMAIL", "Email");
 if (!defined("_DOCTYPE"))    define("_DOCTYPE", "Document type");
 if (!defined("_DOCTYPES_MAIL"))    define("_DOCTYPES_MAIL", "Mail type");
 if (!defined("_TYPE"))    define("_TYPE", "Type");
+if (!defined("_URL"))    define("_URL", "URL");
 if (!defined("_WARNING_MESSAGE_DEL_TYPE"))
     define("_WARNING_MESSAGE_DEL_TYPE", "Warning :<br> The deletion of a document type leads to documents reallocation to a new type.");
 if (!defined("_WARNING_MESSAGE_DEL_GROUP"))
@@ -915,6 +916,10 @@ if (!defined("_CONTACT_MODIFIED")) define("_CONTACT_MODIFIED", "Modified contact
 if (!defined("_CONTACT_DELETED")) define("_CONTACT_DELETED", "Deleted contact");
 if (!defined("_MODIFY_CONTACT")) define("_MODIFY_CONTACT", "Modify a contact");
 if (!defined("_IS_CORPORATE_PERSON")) define("_IS_CORPORATE_PERSON", "Corporate body");
+if (!defined("_IS_INTERNAL_CONTACT")) define("_IS_INTERNAL_CONTACT","Internal contact");
+if (!defined("_IS_EXTERNAL_CONTACT")) define("_IS_EXTERNAL_CONTACT","External contact");
+if (!defined("_SEARCH_DIRECTORY")) define("_SEARCH_DIRECTORY","Directory search");
+if (!defined("_EXTERNAL_CONTACT_ID")) define("_EXTERNAL_CONTACT_ID","External contact ID");
 if (!defined("_INDIVIDUAL")) define("_INDIVIDUAL", "Private individual");
 if (!defined("_CONTACT_TARGET")) define("_CONTACT_TARGET", "For what contact is that possible to use this type?");
 if (!defined("_CONTACT_TARGET_LIST")) define("_CONTACT_TARGET_LIST", "Target of the contact type");
@@ -1097,6 +1102,14 @@ if (!defined("_CHOOSE_A_CONTACT")) define("_CHOOSE_A_CONTACT","Choose a contact"
 if (!defined("_CREATE_CONTACTS")) define("_CREATE_CONTACTS","All the contacts");
 if (!defined("_LINKED_CONTACT")) define("_LINKED_CONTACT","Linked to a contact");
 
+if (!defined("_COMMUNICATION_TYPE")) define("_COMMUNICATION_TYPE","Communication type");
+if (!defined("_COMMUNICATION_VALUE")) define("_COMMUNICATION_VALUE","Value");
+if (!defined("_COMMUNICATION_ADDED")) define("_COMMUNICATION_ADDED","Communication added");
+if (!defined("_COMMUNICATION_MODIFIED")) define("_COMMUNICATION_MODIFIED","Communication modified");
+if (!defined("_COMMUNICATION_DELETED")) define("_COMMUNICATION_DELETED","Communication deleted");
+if (!defined("_CHOOSE_COMMUNICATION_TYPES")) define("_CHOOSE_COMMUNICATION_TYPES","Choose communication types");
+if (!defined("_CONTACT_COMMUNICATION_DEFINE")) define("_CONTACT_COMMUNICATION_DEFINE","Communication define");
+
 //// INDEXING SEARCHING
 if (!defined("_NO_COLLECTION_ACCESS_FOR_THIS_USER")) define("_NO_COLLECTION_ACCESS_FOR_THIS_USER", "No access to the documentary collections for this user");
 if (!defined("_CREATION_DATE")) define("_CREATION_DATE", "Creation date");
@@ -2024,6 +2037,8 @@ if (!defined('_UPDATE_DESC_END'))
 if (!defined('_NO_AVAILABLE_TAG_TO_UPDATE'))
     define('_NO_AVAILABLE_TAG_TO_UPDATE', 'No available tag to update');
 if (!defined("_ADDRESS_NB")) define("_ADDRESS_NB","Address number");
+if (!defined('_SAVE_NUMERIC_PACKAGE'))
+    define('_SAVE_NUMERIC_PACKAGE', 'Save numeric package');
 if (!defined('_INVALID'))
     define('_INVALID', 'n\'est pas valide');
 if (!defined('_STATUS_UPDATED'))
diff --git a/apps/maarch_entreprise/lang/fr.php b/apps/maarch_entreprise/lang/fr.php
index 6cf7c1a5286f90a0c4a95586d6c9dce8a10f846a..5dd2ddf8895772e4b36649c6b4586b8833757fe4 100755
--- a/apps/maarch_entreprise/lang/fr.php
+++ b/apps/maarch_entreprise/lang/fr.php
@@ -43,7 +43,7 @@ if (!defined("_ADMIN_USERS_DESC"))    define("_ADMIN_USERS_DESC", "Ajouter, susp
 if (!defined("_ADMIN_DOCSERVERS_DESC"))    define("_ADMIN_DOCSERVERS_DESC", "Ajouter, suspendre, ou modifier des zones de stockage. Placer les zones de stockages par type d'appartenance et définir leur groupe primaire.");
 if (!defined("_ADMIN_GROUPS"))    define("_ADMIN_GROUPS", "Groupes d'utilisateurs");
 if (!defined("_ADMIN_GROUPS_DESC"))    define("_ADMIN_GROUPS_DESC", "Ajouter, suspendre, ou modifier des groupes d'utilisateurs. Attribuer des privilèges ou des autorisations d'accès aux ressources.");
-if (!defined("_ADMIN_ARCHITECTURE"))    define("_ADMIN_ARCHITECTURE", "Typologie documentaire");
+if (!defined("_ADMIN_ARCHITECTURE"))    define("_ADMIN_ARCHITECTURE", "Typologies documentaires");
 if (!defined("_ADMIN_ARCHITECTURE_DESC"))    define("_ADMIN_ARCHITECTURE_DESC", "Définir la structure interne d'un dossier (chemise / sous-chemise / type de document). Définir pour chaque pièce la liste des index à saisir, et leur caractère obligatoire pour la complétude du dossier.");
 if (!defined("_VIEW_HISTORY"))    define("_VIEW_HISTORY", "Historique");
 if (!defined("_VIEW_HISTORY_BATCH"))    define("_VIEW_HISTORY_BATCH", "Historique des batchs");
@@ -153,6 +153,7 @@ if (!defined("_EMAIL")) define("_EMAIL", "Courriel");
 if (!defined("_DOCTYPE"))    define("_DOCTYPE", "Type de document");
 if (!defined("_DOCTYPES_MAIL"))    define("_DOCTYPES_MAIL", "Type(s) de courrier");
 if (!defined("_TYPE"))    define("_TYPE", "Type");
+if (!defined("_URL"))    define("_URL", "URL");
 if (!defined("_WARNING_MESSAGE_DEL_TYPE"))
     define("_WARNING_MESSAGE_DEL_TYPE", "Avertissement :<br> La suppression d'un type de document entraine la réaffectation des documents à un nouveau type.");
 if (!defined("_WARNING_MESSAGE_DEL_GROUP"))
@@ -926,7 +927,11 @@ if (!defined("_CONTACT_MODIFIED")) define("_CONTACT_MODIFIED", "Contact modifié
 if (!defined("_CONTACT_DELETED")) define("_CONTACT_DELETED", "Contact supprimé");
 if (!defined("_MODIFY_CONTACT")) define("_MODIFY_CONTACT", "Modifier un contact");
 if (!defined("_IS_CORPORATE_PERSON")) define("_IS_CORPORATE_PERSON", "Personne morale");
-if (!defined("_INDIVIDUAL")) define("_INDIVIDUAL", "Personne physique");
+if (!defined("_IS_INTERNAL_CONTACT")) define("_IS_INTERNAL_CONTACT","Contact interne");
+if (!defined("_IS_EXTERNAL_CONTACT")) define("_IS_EXTERNAL_CONTACT","Contact externe");
+if (!defined("_SEARCH_DIRECTORY")) define("_SEARCH_DIRECTORY","Recherche annuaire");
+if (!defined("_EXTERNAL_CONTACT_ID")) define("_EXTERNAL_CONTACT_ID","Identifiant contact externe");
+if (!defined("_INDIVIDUAL")) define("_INDIVIDUAL", "Particulier");
 if (!defined("_CONTACT_TARGET")) define("_CONTACT_TARGET", "Pour quel contact est il possible d'utiliser ce type ?");
 if (!defined("_CONTACT_TARGET_LIST")) define("_CONTACT_TARGET_LIST", "Cible du type de contact");
 if (!defined("_CONTACT_TYPE_CREATION")) define("_CONTACT_TYPE_CREATION", "Possibilité de créer un contact de ce type hors panneau d'administration ?");
@@ -1109,6 +1114,14 @@ if (!defined("_CHOOSE_A_CONTACT")) define("_CHOOSE_A_CONTACT","Choisissez un con
 if (!defined("_CREATE_CONTACTS")) define("_CREATE_CONTACTS","Tous les contacts");
 if (!defined("_LINKED_CONTACT")) define("_LINKED_CONTACT","Lié au contact");
 
+if (!defined("_COMMUNICATION_TYPE")) define("_COMMUNICATION_TYPE","Moyen de communication");
+if (!defined("_COMMUNICATION_VALUE")) define("_COMMUNICATION_VALUE","Valeur");
+if (!defined("_COMMUNICATION_ADDED")) define("_COMMUNICATION_ADDED","Communication ajoutée");
+if (!defined("_COMMUNICATION_MODIFIED")) define("_COMMUNICATION_MODIFIED","Communication modifiée");
+if (!defined("_COMMUNICATION_DELETED")) define("_COMMUNICATION_DELETED","Communication supprimée");
+if (!defined("_CHOOSE_COMMUNICATION_TYPES")) define("_CHOOSE_COMMUNICATION_TYPES","Choissisez le moyen de communication");
+if (!defined("_CONTACT_COMMUNICATION_DEFINE")) define("_CONTACT_COMMUNICATION_DEFINE","Moyen de communication défini");
+
 //// INDEXING SEARCHING
 if (!defined("_NO_COLLECTION_ACCESS_FOR_THIS_USER")) define("_NO_COLLECTION_ACCESS_FOR_THIS_USER", "Aucun accès aux collections documentaires pour cet utilisateur");
 if (!defined("_CREATION_DATE")) define("_CREATION_DATE", "Date de création");
@@ -2062,12 +2075,13 @@ if (!defined('_UPDATE_DEPLOY_DETAILS'))
 if (!defined('_DEPLOY_VERSION'))
     define('_DEPLOY_VERSION', 'Déployer la version');
 if (!defined('_UPDATE_END'))
-    define('_UPDATE_END', 'Mise à jour réussi');
+    define('_UPDATE_END', 'Mise à jour réussie');
 if (!defined('_UPDATE_DESC_END'))
-    define('_UPDATE_DESC_END', 'Mise à jour réussi');
+    define('_UPDATE_DESC_END', 'Mise à jour réussie');
 if (!defined('_NO_AVAILABLE_TAG_TO_UPDATE'))
     define('_NO_AVAILABLE_TAG_TO_UPDATE', 'Aucune version disponible pour une mise à jour');
-
+if (!defined('_SAVE_NUMERIC_PACKAGE'))
+    define('_SAVE_NUMERIC_PACKAGE', 'Enregistrer un pli numérique');
 //PARAMETERS
 if(!defined('_ID_IS_EMPTY_CONTROLLER'))
     define('_ID_IS_EMPTY_CONTROLLER',' L\'identifiant est vide');
diff --git a/apps/maarch_entreprise/log.php b/apps/maarch_entreprise/log.php
index c777fe8e010447d9a6f7ebfe320f3c1f587dac19..fafa2d9bd0e16341c05187683309b249a85ffe6d 100755
--- a/apps/maarch_entreprise/log.php
+++ b/apps/maarch_entreprise/log.php
@@ -312,6 +312,9 @@ if (! empty($_SESSION['error'])) {
                     $res['url'] = 'index.php?display=true&page=login';
                 }
             }
+            if ($_SESSION['user']['UserId'] == 'superadmin') {
+                $res['url'] .= '?administration=true';
+            }
             header(
                 'location: ' . $_SESSION['config']['businessappurl'] . $res['url']
             );
diff --git a/apps/maarch_entreprise/my_contacts/info_contact_iframe.php b/apps/maarch_entreprise/my_contacts/info_contact_iframe.php
index 1fc1fee5adfad25c60f303a7da79e4a02aedbd98..a8f75e3219f05a281cfe0e5379d2e8454ab6cbf0 100755
--- a/apps/maarch_entreprise/my_contacts/info_contact_iframe.php
+++ b/apps/maarch_entreprise/my_contacts/info_contact_iframe.php
@@ -72,6 +72,7 @@ $_SESSION['m_admin']['contact']['SOCIETY_SHORT']       = $request->show_string($
 $_SESSION['m_admin']['contact']['FUNCTION']            = $request->show_string($line->function);
 $_SESSION['m_admin']['contact']['OTHER_DATA']          = $request->show_string($line->other_data);
 $_SESSION['m_admin']['contact']['IS_CORPORATE_PERSON'] = $request->show_string($line->is_corporate_person);
+$_SESSION['m_admin']['contact']['IS_EXTERNAL_CONTACT'] = $request->show_string($line->is_external_contact);
 $_SESSION['m_admin']['contact']['CONTACT_TYPE']        = $line->contact_type;
 $_SESSION['m_admin']['contact']['OWNER']               = $line->user_id;
 
@@ -131,8 +132,20 @@ if ($core_tools2->test_admin('update_contacts', 'apps', false) && $mode <> "view
     $_SESSION['m_admin']['address']['IS_PRIVATE']         = $request->show_string($line->is_private);
     $_SESSION['m_admin']['address']['SALUTATION_HEADER']  = $request->show_string($line->salutation_header);
     $_SESSION['m_admin']['address']['SALUTATION_FOOTER']  = $request->show_string($line->salutation_footer);
+    $_SESSION['m_admin']['address']['EXTERNAL_CONTACT_ID']= $request->show_string($line->external_contact_id);
+
+	$core_tools2->load_js();
+
+    $query = "SELECT * FROM ".$_SESSION['tablename']['contact_communication']." WHERE contact_id = ?";
+    $stmt = $db->query($query, array($line->contact_id));
+
+    $_SESSION['m_admin']['communication'] = array();
+    $contactCommunication = $stmt->fetchObject();
+    $_SESSION['m_admin']['communication']['ID']              = $contactCommunication->id;
+    $_SESSION['m_admin']['communication']['CONTACT_ID']      = $contactCommunication->contact_id;
+    $_SESSION['m_admin']['communication']['TYPE']            = functions::show_string($contactCommunication->type);
+    $_SESSION['m_admin']['communication']['VALUE']           = functions::show_string($contactCommunication->value);
 
-    $core_tools2->load_js();
 	?>
 	    <div id="inner_content" class="clearfix" align="center" style="padding:0px;width:100% !important;">
 	    	<div class="block">
diff --git a/apps/maarch_entreprise/xml/IVS/data_types.xml b/apps/maarch_entreprise/xml/IVS/data_types.xml
index 84329872e49f2d1a1196e36de55e164f09cd667e..0cc8d8d093f4cf837116e363a8910f03c1f0ab46 100755
--- a/apps/maarch_entreprise/xml/IVS/data_types.xml
+++ b/apps/maarch_entreprise/xml/IVS/data_types.xml
@@ -53,6 +53,8 @@
       <enumeration value="set" />
       <enumeration value="mass" />
       <enumeration value="search" />
+      <enumeration value="destUser" />
+      <enumeration value="download" />
     </dataType>
     <dataType name="size" base="string">
       <enumeration value="full" />
diff --git a/apps/maarch_entreprise/xml/IVS/validation_rules.xml b/apps/maarch_entreprise/xml/IVS/validation_rules.xml
index a2a46e38f4436b68878158e1d47affdf35e029f7..bb5738f53d87aee110ad97dfd3ef508135e017f5 100755
--- a/apps/maarch_entreprise/xml/IVS/validation_rules.xml
+++ b/apps/maarch_entreprise/xml/IVS/validation_rules.xml
@@ -224,6 +224,7 @@
       <parameter name="website" type="string" />
       <parameter name="mycontact" type="string" />
       <parameter name="dir" type="identifier" />
+      <parameter name="external_contact_id" type="string" />
     </validationRule>
 
     <validationRule name="admin_action" extends="standardForm" mode="error">
@@ -349,12 +350,16 @@
       <parameter name="firstname" type="string" />
       <parameter name="function" type="string" />
       <parameter name="is_corporate" type="YN" />
+      <parameter name="is_external" type="YN" />
+      <parameter name="external_contact_id" type="string" />
       <parameter name="lastname" type="personname" />
       <parameter name="society" type="string" />
       <parameter name="society_short" type="string" />
       <parameter name="title" type="string" />
       <parameter name="dir" type="identifier" />
       <parameter name="mycontact" type="identifier" />
+      <parameter name="communication_type" type="string" />
+      <parameter name="communication_value" type="string" />
     </validationRule>
 
     <validationRule name="contactConfirm" extends="standardForm" mode="error">
diff --git a/apps/maarch_entreprise/xml/config.xml.default b/apps/maarch_entreprise/xml/config.xml.default
index 75cf629ec53d4c4e75ef4251355310b15012850f..2900852c027efb67610d490a1de74b1e9a863297 100755
--- a/apps/maarch_entreprise/xml/config.xml.default
+++ b/apps/maarch_entreprise/xml/config.xml.default
@@ -131,6 +131,11 @@
             <default_category>incoming</default_category>
         </categories>
     </COLLECTION>
+    <COLLECTION>
+        <id>archive_transfer_coll</id>
+        <label>_ARCHVIE_TRANSFER_COLL</label>
+        <table>message_exchange</table>
+    </COLLECTION>
     <HISTORY>
         <usersdel>true</usersdel>
         <usersban>true</usersban>
@@ -190,6 +195,9 @@
         <contact_addresses_del>true</contact_addresses_del>
         <contact_addresses_add>true</contact_addresses_add>
         <contact_addresses_up>true</contact_addresses_up>
+        <contact_communication_del>true</contact_communication_del>
+        <contact_communication_add>true</contact_communication_add>
+        <contact_communication_up>true</contact_communication_up>
     </HISTORY>
     <KEYWORDS>
         <id>ERR</id>
diff --git a/apps/maarch_entreprise/xml/entreprise.xml b/apps/maarch_entreprise/xml/entreprise.xml
index 80bc6ab04df7a9f0f4539bc383da5354a7313d27..948681f3dbd02930e71359e99761ede292c71ae4 100755
--- a/apps/maarch_entreprise/xml/entreprise.xml
+++ b/apps/maarch_entreprise/xml/entreprise.xml
@@ -29,6 +29,10 @@
             <id>courier</id>
             <label>_COURIER</label>
         </nature>
+        <nature with_reference="true">
+            <id>message_exchange</id>
+            <label>_NUMERIC_PACKAGE</label>
+        </nature>
         <nature with_reference="false">
             <id>other</id>
             <label>_OTHER</label>
diff --git a/apps/maarch_entreprise/xml/extensions.xml b/apps/maarch_entreprise/xml/extensions.xml
index adc2241b4b181d1ac4fb4f8d23b3198015025a81..bf5c3cfa834b2765def98065f9beb37d0adf1345 100755
--- a/apps/maarch_entreprise/xml/extensions.xml
+++ b/apps/maarch_entreprise/xml/extensions.xml
@@ -155,6 +155,11 @@
         <mime>application/octet-stream</mime>
         <index_frame_show>false</index_frame_show>
     </FORMAT>
+    <FORMAT>
+        <name>XML</name>
+        <mime>application/xml</mime>
+        <index_frame_show>true</index_frame_show>
+    </FORMAT>
     <FORMAT>
         <name>TXT</name>
         <mime>text/plain</mime>
diff --git a/apps/maarch_entreprise/xml/m2m_config.xml b/apps/maarch_entreprise/xml/m2m_config.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ba15eaff60967ceda3c117a132cb6f490218e94d
--- /dev/null
+++ b/apps/maarch_entreprise/xml/m2m_config.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ROOT>
+    <res_letterbox>
+        <type_id>101</type_id>
+        <status>INIT</status>
+        <priority>2</priority>
+    </res_letterbox>
+    <res_attachments>
+        <attachment_type>simple_attachment</attachment_type>
+    </res_attachments>
+    <contacts_v2>
+        <contact_type>100</contact_type>
+    </contacts_v2>
+    <contact_addresses>
+        <contact_purpose_id>1</contact_purpose_id>
+    </contact_addresses>
+    <basketRedirection_afterUpload>InitBasket</basketRedirection_afterUpload><!--basketId-->
+    <m2m_communication>http://bblier:maarch@192.168.1.202/maarch_v2</m2m_communication><!--moyen de communication de l'instance : email ou uri -->
+</ROOT>
diff --git a/composer.json b/composer.json
index c7f928398cf8675eb93700b21ae1efbf7bacaf18..6d50f84ac0e569e42684b5a6ab0d02b623785a9b 100755
--- a/composer.json
+++ b/composer.json
@@ -25,6 +25,7 @@
 
             "Core\\"          : "core/",
             "Convert\\"       : "modules/convert/",
+            "Sendmail\\"      : "modules/sendmail/",
             "Visa\\"          : "modules/visa/"
     	}
     },
diff --git a/core/Test/ActionControllerTest.php b/core/Test/ActionControllerTest.php
index 4393207e3b7f7afbe3f5f11cfd6a1de73e2a0658..52ec933ebf86c5d33201a2f5c490224e3f24bd17 100755
--- a/core/Test/ActionControllerTest.php
+++ b/core/Test/ActionControllerTest.php
@@ -38,20 +38,9 @@ class ActionsControllerTest extends TestCase
         $response     = $actionController->create($fullRequest, new \Slim\Http\Response());
         $responseBody = json_decode((string)$response->getBody());
 
-        self::$id = $responseBody->action->id;
+        self::$id = $responseBody->actionId;
 
         $this->assertInternalType('int', self::$id);
-        $this->assertSame('indexing', $responseBody->action->keyword);
-        $this->assertSame('TEST-LABEL', $responseBody->action->label_action);
-        $this->assertSame('_NOSTATUS_', $responseBody->action->id_status);
-        $this->assertSame('N', $responseBody->action->is_system);
-        $this->assertSame('N', $responseBody->action->is_folder_action);
-        $this->assertSame('Y', $responseBody->action->enabled);
-        $this->assertSame('index_mlb', $responseBody->action->action_page);
-        $this->assertSame('Y', $responseBody->action->history);
-        $this->assertSame('apps', $responseBody->action->origin);
-        $this->assertSame('N', $responseBody->action->create_id);
-
 
         // FAIL CREATE
         $aArgs = [
@@ -136,17 +125,7 @@ class ActionsControllerTest extends TestCase
         $response         = $actionController->update($fullRequest, new \Slim\Http\Response(), ['id' => self::$id]);
         $responseBody     = json_decode((string)$response->getBody());
 
-        $this->assertSame(self::$id, $responseBody->action->id);
-        $this->assertSame('', $responseBody->action->keyword);
-        $this->assertSame('TEST-LABEL_UPDATED', $responseBody->action->label_action);
-        $this->assertSame('COU', $responseBody->action->id_status);
-        $this->assertSame('N', $responseBody->action->is_system);
-        $this->assertSame('Y', $responseBody->action->is_folder_action);
-        $this->assertSame('Y', $responseBody->action->enabled);
-        $this->assertSame('process', $responseBody->action->action_page);
-        $this->assertSame('N', $responseBody->action->history);
-        $this->assertSame('apps', $responseBody->action->origin);
-        $this->assertSame('N', $responseBody->action->create_id);
+        $this->assertSame('success', $responseBody->success);
 
         // UPDATE FAIL
         $aArgs = [
@@ -177,7 +156,7 @@ class ActionsControllerTest extends TestCase
         $response         = $actionController->delete($request, new \Slim\Http\Response(), ['id' => self::$id]);
         $responseBody     = json_decode((string)$response->getBody());
 
-        $this->assertNotNull($responseBody->action);
+        $this->assertNotNull($responseBody->actions);
 
         $environment  = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
         $request      = \Slim\Http\Request::createFromEnvironment($environment);
@@ -185,7 +164,7 @@ class ActionsControllerTest extends TestCase
         $response     = $actionController->getById($request, new \Slim\Http\Response(), ['id' => self::$id]);
         $responseBody = json_decode((string)$response->getBody());
 
-        $this->assertNull($responseBody->action[0]);
+        $this->assertNull($responseBody->actions[0]);
 
         // FAIL DELETE
         $actionController = new \Action\controllers\ActionController();
diff --git a/core/Test/NotificationControllerTest.php b/core/Test/NotificationControllerTest.php
index e225eb326d179fb9cad2558715819644611e922a..e46d7a10bf68c291d99d62e69502d4bc28a314bb 100644
--- a/core/Test/NotificationControllerTest.php
+++ b/core/Test/NotificationControllerTest.php
@@ -4,11 +4,12 @@
 * See LICENCE.txt file at the root folder for more details.
 * This file is part of Maarch software.
 
+*
 * @brief   NotificationsControllerTest
+*
 * @author  dev <dev@maarch.org>
 * @ingroup core
 */
-
 use PHPUnit\Framework\TestCase;
 
 class NotificationControllerTest extends TestCase
@@ -20,27 +21,27 @@ class NotificationControllerTest extends TestCase
         $NotificationController = new \Notification\controllers\NotificationController();
 
         //  CREATE
-        $environment    = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'POST']);
-        $request        = \Slim\Http\Request::createFromEnvironment($environment);
+        $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'POST']);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
 
         $aArgs = [
-            'notification_id'      => 'testcreatetu',
-            'description'          => 'description de la notification',
-            'is_enabled'           => 'Y',
-            'event_id'             => 'users%',
-            'notification_mode'    => 'EMAIL',
-            'template_id'          =>  4,
-            'diffusion_type'       => 'group',
-            'diffusion_properties' => ['ADMINISTRATEUR','ARCHIVISTE','DIRECTEUR'],
-            'attachfor_type'       => 'entity',
-            'attachfor_properties' => ['COU','PJS']
+            'notification_id' => 'testcreatetu',
+            'description' => 'description de la notification',
+            'is_enabled' => 'Y',
+            'event_id' => 'users%',
+            'notification_mode' => 'EMAIL',
+            'template_id' => 4,
+            'diffusion_type' => 'group',
+            'diffusion_properties' => ['ADMINISTRATEUR', 'ARCHIVISTE', 'DIRECTEUR'],
+            'attachfor_type' => 'entity',
+            'attachfor_properties' => ['COU', 'PJS'],
         ];
 
-        $fullRequest  = \httpRequestCustom::addContentInBody($aArgs, $request);
-        $response     = $NotificationController->create($fullRequest, new \Slim\Http\Response());
-        $responseBody = json_decode((string)$response->getBody());
+        $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
+        $response = $NotificationController->create($fullRequest, new \Slim\Http\Response());
+        $responseBody = json_decode((string) $response->getBody());
 
-        $this->assertInternalType("int", $responseBody->notification_sid);
+        $this->assertInternalType('int', $responseBody->notification_sid);
         self::$id = $responseBody->notification_sid;
 
         $this->assertSame('testcreatetu', $responseBody->notification_id);
@@ -59,26 +60,25 @@ class NotificationControllerTest extends TestCase
     {
         //Fail Create 1
         $NotificationController = new \Notification\controllers\NotificationController();
-        $environment            = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'POST']);
-        $request                = \Slim\Http\Request::createFromEnvironment($environment);
+        $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'POST']);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
 
         $aArgs = [
-            'notification_id'      => '',
-            'description'          => 'description de la notification',
-            'is_enabled'           => 'Y',
-            'event_id'             => '',
-            'notification_mode'    => 'EMAIL',
-            'template_id'          => '',
-            'rss_url_template'     => 'http://localhost/maarch_entreprise',
-            'diffusion_type'       => 'user',
+            'notification_id' => '',
+            'description' => 'description de la notification',
+            'is_enabled' => 'Y',
+            'event_id' => '',
+            'notification_mode' => 'EMAIL',
+            'template_id' => '',
+            'diffusion_type' => 'user',
             'diffusion_properties' => 'superadmin',
-            'attachfor_type'       => 'zz',
-            'attachfor_properties' => 'cc'
+            'attachfor_type' => 'zz',
+            'attachfor_properties' => 'cc',
         ];
 
-        $fullRequest  = \httpRequestCustom::addContentInBody($aArgs, $request);
-        $response     = $NotificationController->create($fullRequest, new \Slim\Http\Response());
-        $responseBody = json_decode((string)$response->getBody());
+        $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
+        $response = $NotificationController->create($fullRequest, new \Slim\Http\Response());
+        $responseBody = json_decode((string) $response->getBody());
 
         $this->assertSame('notification_id is empty', $responseBody->errors[0]);
         $this->assertSame('wrong format for template_id', $responseBody->errors[1]);
@@ -88,25 +88,24 @@ class NotificationControllerTest extends TestCase
     {
         //Fail Create 2
         $NotificationController = new \Notification\controllers\NotificationController();
-        $environment            = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'POST']);
-        $request                = \Slim\Http\Request::createFromEnvironment($environment);
+        $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'POST']);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
 
         $aArgs = [
-            'notification_id'      => 'testcreatetu',
-            'description'          => 'description de la notification',
-            'is_enabled'           => 'Y',
-            'event_id'             => 'users%',
-            'notification_mode'    => 'EMAIL',
-            'template_id'          => 4,
-            'rss_url_template'     => 'http://localhost/maarch_entreprise',
-            'diffusion_type'       => 'user',
+            'notification_id' => 'testcreatetu',
+            'description' => 'description de la notification',
+            'is_enabled' => 'Y',
+            'event_id' => 'users%',
+            'notification_mode' => 'EMAIL',
+            'template_id' => 4,
+            'diffusion_type' => 'user',
             'diffusion_properties' => 'superadmin',
-            'attachfor_type'       => 'zz',
-            'attachfor_properties' => 'cc'
+            'attachfor_type' => 'zz',
+            'attachfor_properties' => 'cc',
         ];
-        $fullRequest  = \httpRequestCustom::addContentInBody($aArgs, $request);
-        $response     = $NotificationController->create($fullRequest, new \Slim\Http\Response());
-        $responseBody = json_decode((string)$response->getBody());
+        $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
+        $response = $NotificationController->create($fullRequest, new \Slim\Http\Response());
+        $responseBody = json_decode((string) $response->getBody());
         $this->assertSame('identifiant déjà existant', $responseBody->errors);
     }
 
@@ -114,10 +113,10 @@ class NotificationControllerTest extends TestCase
     {
         //READ
         $NotificationController = new \Notification\controllers\NotificationController();
-        $environment            = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
-        $request                = \Slim\Http\Request::createFromEnvironment($environment);
-        $response               = $NotificationController->getBySid($request, new \Slim\Http\Response(), ['id' => self::$id]);
-        $responseBody           = json_decode((string)$response->getBody());
+        $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
+        $response = $NotificationController->getBySid($request, new \Slim\Http\Response(), ['id' => self::$id]);
+        $responseBody = json_decode((string) $response->getBody());
 
         $this->assertSame(self::$id, $responseBody->notification->notification_sid);
         $this->assertSame('testcreatetu', $responseBody->notification->notification_id);
@@ -132,10 +131,10 @@ class NotificationControllerTest extends TestCase
     public function testReadFail()
     {
         $NotificationController = new \Notification\controllers\NotificationController();
-        $environment            = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
-        $request                = \Slim\Http\Request::createFromEnvironment($environment);
-        $response               = $NotificationController->getBySid($request, new \Slim\Http\Response(), ['id' => 'test']);
-        $responseBody           = json_decode((string)$response->getBody());
+        $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
+        $response = $NotificationController->getBySid($request, new \Slim\Http\Response(), ['id' => 'test']);
+        $responseBody = json_decode((string) $response->getBody());
         $this->assertSame('Id is not a numeric', $responseBody->errors);
     }
 
@@ -143,20 +142,20 @@ class NotificationControllerTest extends TestCase
     {
         //I CANT READ BECAUSE NO EXIST
         $NotificationController = new \Notification\controllers\NotificationController();
-        $environment            = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
-        $request                = \Slim\Http\Request::createFromEnvironment($environment);
-        $response               = $NotificationController->getBySid($request, new \Slim\Http\Response(), ['id' => '9999999999']);
-        $responseBody           = json_decode((string)$response->getBody());
+        $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
+        $response = $NotificationController->getBySid($request, new \Slim\Http\Response(), ['id' => '9999999999']);
+        $responseBody = json_decode((string) $response->getBody());
         $this->assertSame('Notification not found', $responseBody->errors);
     }
 
     public function testReadAll()
     {
         $NotificationController = new \Notification\controllers\NotificationController();
-        $environment            = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
-        $request                = \Slim\Http\Request::createFromEnvironment($environment);
-        $response               = $NotificationController->get($request, new \Slim\Http\Response());
-        $responseBody           = json_decode((string)$response->getBody());
+        $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
+        $response = $NotificationController->get($request, new \Slim\Http\Response());
+        $responseBody = json_decode((string) $response->getBody());
 
         $this->assertNotNull($responseBody->notifications);
     }
@@ -165,23 +164,23 @@ class NotificationControllerTest extends TestCase
     {
         //  UPDATE
         $NotificationController = new \Notification\controllers\NotificationController();
-        $environment            = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'PUT']);
-        $request                = \Slim\Http\Request::createFromEnvironment($environment);
+        $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'PUT']);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
         $aArgs = [
-            'notification_id'      => 'testcreatetu',
-            'description'          => 'nouvelle description',
-            'is_enabled'           => 'N',
-            'event_id'             => 'users%',
-            'notification_mode'    => 'EMAIL',
-            'template_id'          => 3,
-            'diffusion_type'       => 'group',
-            'diffusion_properties' => ['ADMINISTRATEUR','ARCHIVISTE','DIRECTEUR'],
-            'attachfor_type'       => 'entity',
-            'attachfor_properties' => ['COU','PJS']
+            'notification_id' => 'testcreatetu',
+            'description' => 'nouvelle description',
+            'is_enabled' => 'N',
+            'event_id' => 'users%',
+            'notification_mode' => 'EMAIL',
+            'template_id' => 3,
+            'diffusion_type' => 'group',
+            'diffusion_properties' => ['ADMINISTRATEUR', 'ARCHIVISTE', 'DIRECTEUR'],
+            'attachfor_type' => 'entity',
+            'attachfor_properties' => ['COU', 'PJS'],
         ];
-        $fullRequest  = \httpRequestCustom::addContentInBody($aArgs, $request);
-        $response     = $NotificationController->update($fullRequest, new \Slim\Http\Response(), ['id' => self::$id]);
-        $responseBody = json_decode((string)$response->getBody());
+        $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
+        $response = $NotificationController->update($fullRequest, new \Slim\Http\Response(), ['id' => self::$id]);
+        $responseBody = json_decode((string) $response->getBody());
 
         $this->assertSame(self::$id, $responseBody->notification->notification_sid);
         $this->assertSame('testcreatetu', $responseBody->notification->notification_id);
@@ -200,23 +199,23 @@ class NotificationControllerTest extends TestCase
     {
         //  UPDATE
         $NotificationController = new \Notification\controllers\NotificationController();
-        $environment            = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'PUT']);
-        $request                = \Slim\Http\Request::createFromEnvironment($environment);
+        $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'PUT']);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
         $aArgs = [
-            'notification_id'      => 'testcreatetu',
-            'description'          => '',
-            'is_enabled'           => 'N',
-            'event_id'             => 'users%',
-            'notification_mode'    => 'EMAIL',
-            'template_id'          => '',
-            'diffusion_type'       => 'group',
-            'diffusion_properties' => ['ADMINISTRATEUR','ARCHIVISTE','DIRECTEUR'],
-            'attachfor_type'       => 'entity',
-            'attachfor_properties' => ['COU','PJS']
+            'notification_id' => 'testcreatetu',
+            'description' => '',
+            'is_enabled' => 'N',
+            'event_id' => 'users%',
+            'notification_mode' => 'EMAIL',
+            'template_id' => '',
+            'diffusion_type' => 'group',
+            'diffusion_properties' => ['ADMINISTRATEUR', 'ARCHIVISTE', 'DIRECTEUR'],
+            'attachfor_type' => 'entity',
+            'attachfor_properties' => ['COU', 'PJS'],
         ];
-        $fullRequest  = \httpRequestCustom::addContentInBody($aArgs, $request);
-        $response     = $NotificationController->update($fullRequest, new \Slim\Http\Response(), ['id' => self::$id]);
-        $responseBody = json_decode((string)$response->getBody());
+        $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
+        $response = $NotificationController->update($fullRequest, new \Slim\Http\Response(), ['id' => self::$id]);
+        $responseBody = json_decode((string) $response->getBody());
 
         $this->assertSame('wrong format for description', $responseBody->errors[0]);
         $this->assertSame('wrong format for template_id', $responseBody->errors[1]);
@@ -226,23 +225,23 @@ class NotificationControllerTest extends TestCase
     {
         //  UPDATE
         $NotificationController = new \Notification\controllers\NotificationController();
-        $environment            = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'PUT']);
-        $request                = \Slim\Http\Request::createFromEnvironment($environment);
+        $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'PUT']);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
         $aArgs = [
-            'notification_id'      => 'testcreatetu',
-            'description'          => 'description',
-            'is_enabled'           => 'N',
-            'event_id'             => 'users%',
-            'notification_mode'    => 'EMAIL',
-            'template_id'          => 4,
-            'diffusion_type'       => 'group',
-            'diffusion_properties' => ['ADMINISTRATEUR','ARCHIVISTE','DIRECTEUR'],
-            'attachfor_type'       => 'entity',
-            'attachfor_properties' => ['COU','PJS']
+            'notification_id' => 'testcreatetu',
+            'description' => 'description',
+            'is_enabled' => 'N',
+            'event_id' => 'users%',
+            'notification_mode' => 'EMAIL',
+            'template_id' => 4,
+            'diffusion_type' => 'group',
+            'diffusion_properties' => ['ADMINISTRATEUR', 'ARCHIVISTE', 'DIRECTEUR'],
+            'attachfor_type' => 'entity',
+            'attachfor_properties' => ['COU', 'PJS'],
         ];
-        $fullRequest  = \httpRequestCustom::addContentInBody($aArgs, $request);
-        $response     = $NotificationController->update($fullRequest, new \Slim\Http\Response(), ['id' => 'fail']);
-        $responseBody = json_decode((string)$response->getBody());
+        $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
+        $response = $NotificationController->update($fullRequest, new \Slim\Http\Response(), ['id' => 'fail']);
+        $responseBody = json_decode((string) $response->getBody());
 
         $this->assertSame('notification_sid is not a numeric', $responseBody->errors[0]);
         $this->assertSame('notification does not exists', $responseBody->errors[1]);
@@ -253,24 +252,24 @@ class NotificationControllerTest extends TestCase
         $NotificationController = new \Notification\controllers\NotificationController();
 
         //  DELETE
-        $environment  = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'DELETE']);
-        $request      = \Slim\Http\Request::createFromEnvironment($environment);
+        $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'DELETE']);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
 
-        $response         = $NotificationController->delete($request, new \Slim\Http\Response(), ['id' => self::$id]);
-        $responseBody     = json_decode((string)$response->getBody());
+        $response = $NotificationController->delete($request, new \Slim\Http\Response(), ['id' => self::$id]);
+        $responseBody = json_decode((string) $response->getBody());
 
         $this->assertNotNull($responseBody->notifications[0]);
 
-        $environment  = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
-        $request      = \Slim\Http\Request::createFromEnvironment($environment);
-        $response     = $NotificationController->getBySid($request, new \Slim\Http\Response(), ['id' => self::$id]);
-        $responseBody = json_decode((string)$response->getBody());
+        $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
+        $response = $NotificationController->getBySid($request, new \Slim\Http\Response(), ['id' => self::$id]);
+        $responseBody = json_decode((string) $response->getBody());
 
         $this->assertNull($responseBody->notifications[0]);
 
         // FAIL DELETE
-        $response         = $NotificationController->delete($request, new \Slim\Http\Response(), ['id' => 'gaz']);
-        $responseBody     = json_decode((string)$response->getBody());
+        $response = $NotificationController->delete($request, new \Slim\Http\Response(), ['id' => 'gaz']);
+        $responseBody = json_decode((string) $response->getBody());
 
         $this->assertSame('Id is not a numeric', $responseBody->errors);
     }
@@ -278,12 +277,12 @@ class NotificationControllerTest extends TestCase
     public function testGetInitNotification()
     {
         // InitAction
-        $environment  = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
-        $request      = \Slim\Http\Request::createFromEnvironment($environment);
+        $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
 
         $NotificationController = new \Notification\controllers\NotificationController();
-        $response         = $NotificationController->initNotification($request, new \Slim\Http\Response());
-        $responseBody     = json_decode((string)$response->getBody());
+        $response = $NotificationController->initNotification($request, new \Slim\Http\Response());
+        $responseBody = json_decode((string) $response->getBody());
 
         $this->assertNotNull($responseBody->notification->data->event);
         $this->assertNotNull($responseBody->notification->data->template);
diff --git a/core/Test/NotificationScheduleControllerTest.php b/core/Test/NotificationScheduleControllerTest.php
index 94cc4abb03860ca8e3db501d12a8ac5509c26360..bba1ff30b9d44646b5c790e523fe748417227bd7 100644
--- a/core/Test/NotificationScheduleControllerTest.php
+++ b/core/Test/NotificationScheduleControllerTest.php
@@ -4,11 +4,12 @@
 * See LICENCE.txt file at the root folder for more details.
 * This file is part of Maarch software.
 
+*
 * @brief   NotificationsScheduleControllerTest
+*
 * @author  dev <dev@maarch.org>
 * @ingroup core
 */
-
 use PHPUnit\Framework\TestCase;
 
 class NotificationScheduleControllerTest extends TestCase
@@ -21,33 +22,32 @@ class NotificationScheduleControllerTest extends TestCase
 
         // CREATE FAIL
         $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'POST']);
-        $request     = \Slim\Http\Request::createFromEnvironment($environment);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
 
         $aArgs = [
-            "notification_sid" => "gaz",
-            "notification_id"  => "",
+            'notification_sid' => 'gaz',
+            'notification_id' => '',
         ];
         $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
 
-        $response     = $NotificationScheduleController->createScriptNotification($fullRequest, new \Slim\Http\Response());
-        $responseBody = json_decode((string)$response->getBody());
-
-        $this->assertSame("notification_sid is not a numeric", $responseBody->errors[0]);
-        $this->assertSame("one of arguments is empty", $responseBody->errors[1]);
+        $response = $NotificationScheduleController->createScriptNotification($fullRequest, new \Slim\Http\Response());
+        $responseBody = json_decode((string) $response->getBody());
 
+        $this->assertSame('notification_sid is not a numeric', $responseBody->errors[0]);
+        $this->assertSame('one of arguments is empty', $responseBody->errors[1]);
 
         // CREATE
         $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'POST']);
-        $request     = \Slim\Http\Request::createFromEnvironment($environment);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
 
         $aArgs = [
-            "notification_sid" => 1,
-            "notification_id"  => "USERS",
+            'notification_sid' => 1,
+            'notification_id' => 'USERS',
         ];
         $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
 
-        $response     = $NotificationScheduleController->createScriptNotification($fullRequest, new \Slim\Http\Response());
-        $responseBody = json_decode((string)$response->getBody());
+        $response = $NotificationScheduleController->createScriptNotification($fullRequest, new \Slim\Http\Response());
+        $responseBody = json_decode((string) $response->getBody());
 
         $this->assertSame(true, $responseBody);
     }
@@ -57,55 +57,55 @@ class NotificationScheduleControllerTest extends TestCase
         $NotificationScheduleController = new \Notification\controllers\NotificationScheduleController();
 
         $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
-        $request     = \Slim\Http\Request::createFromEnvironment($environment);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
 
-        $response     = $NotificationScheduleController->get($request, new \Slim\Http\Response());
-        $responseBody = json_decode((string)$response->getBody());
+        $response = $NotificationScheduleController->get($request, new \Slim\Http\Response());
+        $responseBody = json_decode((string) $response->getBody());
 
         // CREATE FAIL
         $aArgs = [];
         $aArgs = $responseBody->crontab;
 
-        $corePath = dirname(__FILE__, 3) . '/';
+        $corePath = dirname(__FILE__, 3).'/';
         $newCrontab = [
-            "m"     => 12,
-            "h"     => 23,
-            "dom"   => "",
-            "mon"   => "*",
-            "dow"   => "*",
-            "cmd"   => $corePath . "modules/notifications/batch/scripts/notification_testtu.sh",
-            "state" => "new",
+            'm' => 12,
+            'h' => 23,
+            'dom' => '',
+            'mon' => '*',
+            'dow' => '*',
+            'cmd' => $corePath.'modules/notifications/batch/scripts/notification_testtu.sh',
+            'state' => 'normal',
         ];
 
         array_push($aArgs, $newCrontab);
-        $fullRequest      = \httpRequestCustom::addContentInBody($aArgs, $request);
-        $response         = $NotificationScheduleController->create($fullRequest, new \Slim\Http\Response());
-        $responseBodyFail = json_decode((string)$response->getBody());
+        $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
+        $response = $NotificationScheduleController->create($fullRequest, new \Slim\Http\Response());
+        $responseBodyFail = json_decode((string) $response->getBody());
 
-        $this->assertSame("dom is empty", $responseBodyFail->errors[0]);
+        $this->assertSame('wrong format for dom', $responseBodyFail->errors[0]);
 
         // CREATE
         $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'POST']);
-        $request     = \Slim\Http\Request::createFromEnvironment($environment);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
 
         $aArgs = [];
         $aArgs = $responseBody->crontab;
 
-        $corePath = dirname(__FILE__, 3) . '/';
+        $corePath = dirname(__FILE__, 3).'/';
         $newCrontab = [
-            "m"     => 12,
-            "h"     => 23,
-            "dom"   => "*",
-            "mon"   => "*",
-            "dow"   => "*",
-            "cmd"   => $corePath . "modules/notifications/batch/scripts/notification_testtu.sh",
-            "state" => "new",
+            'm' => 12,
+            'h' => 23,
+            'dom' => '*',
+            'mon' => '*',
+            'dow' => '*',
+            'cmd' => $corePath.'modules/notifications/batch/scripts/notification_testtu.sh',
+            'state' => 'normal',
         ];
 
         array_push($aArgs, $newCrontab);
-        $fullRequest        = \httpRequestCustom::addContentInBody($aArgs, $request);
-        $response           = $NotificationScheduleController->create($fullRequest, new \Slim\Http\Response());
-        $responseBodyCreate = json_decode((string)$response->getBody());
+        $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
+        $response = $NotificationScheduleController->create($fullRequest, new \Slim\Http\Response());
+        $responseBodyCreate = json_decode((string) $response->getBody());
 
         $this->assertSame(true, $responseBodyCreate);
     }
@@ -113,14 +113,14 @@ class NotificationScheduleControllerTest extends TestCase
     public function testReadAll()
     {
         $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
-        $request     = \Slim\Http\Request::createFromEnvironment($environment);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
 
         $NotificationScheduleController = new \Notification\controllers\NotificationScheduleController();
-        $response                       = $NotificationScheduleController->get($request, new \Slim\Http\Response());
-        $responseBody                   = json_decode((string)$response->getBody());
+        $response = $NotificationScheduleController->get($request, new \Slim\Http\Response());
+        $responseBody = json_decode((string) $response->getBody());
 
         $this->assertInternalType('array', $responseBody->crontab);
-        $this->assertInternalType('object', $responseBody->authorizedNotification);
+        $this->assertInternalType('array', $responseBody->authorizedNotification);
         $this->assertNotNull($responseBody->authorizedNotification);
         $this->assertNotNull($responseBody->crontab);
     }
@@ -129,45 +129,45 @@ class NotificationScheduleControllerTest extends TestCase
     {
         $NotificationScheduleController = new \Notification\controllers\NotificationScheduleController();
         $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
-        $request     = \Slim\Http\Request::createFromEnvironment($environment);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
 
-        $response     = $NotificationScheduleController->get($request, new \Slim\Http\Response());
-        $responseBody = json_decode((string)$response->getBody());
+        $response = $NotificationScheduleController->get($request, new \Slim\Http\Response());
+        $responseBody = json_decode((string) $response->getBody());
 
         //  UPDATE
         $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'POST']);
-        $request     = \Slim\Http\Request::createFromEnvironment($environment);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
 
         $aArgs = [];
         $aArgs = $responseBody->crontab;
 
-        $corePath = dirname(__FILE__, 3) . '/';
+        $corePath = dirname(__FILE__, 3).'/';
 
-        $aArgs[count($aArgs)-1] = [
-            "m"     => 35,
-            "h"     => 22,
-            "dom"   => "*",
-            "mon"   => "*",
-            "dow"   => "*",
-            "cmd"   => $corePath . "modules/notifications/batch/scripts/notification_testtu.sh",
-            "state" => "normal",
+        $aArgs[count($aArgs) - 1] = [
+            'm' => 35,
+            'h' => 22,
+            'dom' => '*',
+            'mon' => '*',
+            'dow' => '*',
+            'cmd' => $corePath.'modules/notifications/batch/scripts/notification_testtu.sh',
+            'state' => 'normal',
         ];
 
         $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
 
-        $response     = $NotificationScheduleController->create($fullRequest, new \Slim\Http\Response());
-        $responseBody = json_decode((string)$response->getBody());
+        $response = $NotificationScheduleController->create($fullRequest, new \Slim\Http\Response());
+        $responseBody = json_decode((string) $response->getBody());
 
         $this->assertSame(true, $responseBody);
 
         $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
-        $request     = \Slim\Http\Request::createFromEnvironment($environment);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
 
-        $response     = $NotificationScheduleController->get($request, new \Slim\Http\Response());
-        $responseBody = json_decode((string)$response->getBody());
+        $response = $NotificationScheduleController->get($request, new \Slim\Http\Response());
+        $responseBody = json_decode((string) $response->getBody());
 
-        $this->assertSame('35', $responseBody->crontab[count($responseBody->crontab)-1]->m);
-        $this->assertSame('22', $responseBody->crontab[count($responseBody->crontab)-1]->h);
+        $this->assertSame('35', $responseBody->crontab[count($responseBody->crontab) - 1]->m);
+        $this->assertSame('22', $responseBody->crontab[count($responseBody->crontab) - 1]->h);
     }
 
     public function testDelete()
@@ -176,43 +176,43 @@ class NotificationScheduleControllerTest extends TestCase
         $NotificationScheduleController = new \Notification\controllers\NotificationScheduleController();
 
         $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
-        $request     = \Slim\Http\Request::createFromEnvironment($environment);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
 
-        $response     = $NotificationScheduleController->get($request, new \Slim\Http\Response());
-        $responseBody = json_decode((string)$response->getBody());
+        $response = $NotificationScheduleController->get($request, new \Slim\Http\Response());
+        $responseBody = json_decode((string) $response->getBody());
 
         $aArgs = [];
         $aArgs = $responseBody->crontab;
 
         foreach ($aArgs as $id => $value) {
-            if ($value->cmd == dirname(__FILE__, 3) . '/' . "modules/notifications/batch/scripts/notification_testtu.sh") {
-                $aArgs[$id]->state = "hidden";
+            if ($value->cmd == dirname(__FILE__, 3).'/'.'modules/notifications/batch/scripts/notification_testtu.sh') {
+                $aArgs[$id]->state = 'hidden';
             }
         }
 
         $environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'POST']);
-        $request     = \Slim\Http\Request::createFromEnvironment($environment);
+        $request = \Slim\Http\Request::createFromEnvironment($environment);
         $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
 
-        $response         = $NotificationScheduleController->create($fullRequest, new \Slim\Http\Response());
-        $responseBodyFail = json_decode((string)$response->getBody());
+        $response = $NotificationScheduleController->create($fullRequest, new \Slim\Http\Response());
+        $responseBodyFail = json_decode((string) $response->getBody());
 
-        $this->assertSame("Problem with crontab", $responseBodyFail->errors);
+        $this->assertSame('Problem with crontab', $responseBodyFail->errors);
 
         // DELETE
         $aArgs = [];
         $aArgs = $responseBody->crontab;
 
         foreach ($aArgs as $id => $value) {
-            if ($value->cmd == dirname(__FILE__, 3) . '/' . "modules/notifications/batch/scripts/notification_testtu.sh") {
-                $aArgs[$id]->state = "deleted";
+            if ($value->cmd == dirname(__FILE__, 3).'/'.'modules/notifications/batch/scripts/notification_testtu.sh') {
+                $aArgs[$id]->state = 'deleted';
             }
         }
 
         $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
 
-        $response     = $NotificationScheduleController->create($fullRequest, new \Slim\Http\Response());
-        $responseBody = json_decode((string)$response->getBody());
+        $response = $NotificationScheduleController->create($fullRequest, new \Slim\Http\Response());
+        $responseBody = json_decode((string) $response->getBody());
 
         $this->assertSame(true, $responseBody);
     }
diff --git a/install/class/Class_Install.php b/install/class/Class_Install.php
index 37e61efa4d9ad985d0b06d1760b57d003bda8a5f..b3b2ef8a9cf81d623544ef5662a82b7c4a060928 100755
--- a/install/class/Class_Install.php
+++ b/install/class/Class_Install.php
@@ -47,6 +47,7 @@ class Install extends functions
         array('FULLTEXT_ATTACH', 'fulltext_attachments'),
         array('FULLTEXT_ATTACH_VERSION', 'fulltext_attachments_version'),
         array('TEMPLATES', 'templates'),
+        array('ARCHIVETRANSFER', 'archive_transfer'),
     );
 
     public function __construct()
diff --git a/install/scripts/testSmtp.php b/install/scripts/testSmtp.php
index 952346d86c25bd3417f32cbbbf7414e64c09e8ce..971443fed09e2e57aafe5b8af68fe1e69adedb38 100755
--- a/install/scripts/testSmtp.php
+++ b/install/scripts/testSmtp.php
@@ -25,7 +25,7 @@
      $MAILER->smtp_host     = $host;
      $MAILER->smtp_user     = $user;
      $MAILER->smtp_password = $pass;
-     $MAILER->mailfrom      = $mailfrom;
+     //$MAILER->mailfrom      = $mailfrom;
      $MAILER->domains       = $smtpDomains;
      if ($auth == 1) {
          $MAILER->smtp_auth = "true";
diff --git a/modules/content_management/save_attachment_from_cm.php b/modules/content_management/save_attachment_from_cm.php
index b862d97cf72715c071c33a4508f6d39dab0333a6..3637af17b4c3d0937cacda2b223f163e1ceb9877 100755
--- a/modules/content_management/save_attachment_from_cm.php
+++ b/modules/content_management/save_attachment_from_cm.php
@@ -152,7 +152,7 @@ if ($arrayIsAllowed['status'] == false) {
                     array_push($_SESSION['data'], array( 'column' => "validation_date", 'value' => $func->format_date_db($_SESSION['attachmentInfo']['back_date']), 'type' => "date", ) );
                 }
 
-                if (isset($_SESSION['attachmentInfo']['contactId']) && $_SESSION['attachmentInfo']['contactId'] != '' && is_numeric($_SESSION['attachmentInfo']['contactId'])) {
+                if (isset($_SESSION['attachmentInfo']['contactId']) && $_SESSION['attachmentInfo']['contactId'] <> '' && is_numeric($_SESSION['attachmentInfo']['contactId'])) {
                     array_push($_SESSION['data'], array( 'column' => 'dest_contact_id', 'value' => $_SESSION['attachmentInfo']['contactId'], 'type' => 'integer' ) );
                 } else if (isset($_SESSION['attachmentInfo']['contactId']) && $_SESSION['attachmentInfo']['contactId'] != '' && !is_numeric($_SESSION['attachmentInfo']['contactId'])) {
                     $_SESSION['data'][] = [
@@ -162,7 +162,7 @@ if ($arrayIsAllowed['status'] == false) {
                         ];
                 }
 
-                if (isset($_SESSION['attachmentInfo']['addressId']) && $_SESSION['attachmentInfo']['addressId'] <> '') {
+                if (isset($_SESSION['attachmentInfo']['addressId']) && $_SESSION['attachmentInfo']['addressId'] <> '' && is_numeric($_SESSION['attachmentInfo']['addressId'])) {
                     array_push($_SESSION['data'], array( 'column' => "dest_address_id", 'value' => $_SESSION['attachmentInfo']['addressId'], 'type' => "integer" ) );
                 }
 
diff --git a/modules/entities/lang/fr.php b/modules/entities/lang/fr.php
index f4b26242fb6c876bdbc1cf7b05a899a5f1dbf49d..a5b81fba0e60c39c032c89a44d664bfb3ae3aea9 100755
--- a/modules/entities/lang/fr.php
+++ b/modules/entities/lang/fr.php
@@ -215,7 +215,7 @@ if (!defined("_WARNING_MESSAGE_DEL_ENTITY"))
 
 /******************** Keywords Helper ************/
 if (!defined("_HELP_KEYWORD1"))
-    define("_HELP_KEYWORD1", "toutes les entités rattachées à l'utilisateur connecté. N'inclue pas les sous-entités");
+    define("_HELP_KEYWORD1", "toutes les entités rattachées à l'utilisateur connecté. N'inclut pas les sous-entités");
 if (!defined("_HELP_KEYWORD2"))
     define("_HELP_KEYWORD2", "entité primaire de l'utilisateur connecté");
 if (!defined("_HELP_KEYWORD3"))
diff --git a/modules/export_seda/AdapterMaarchCourrier.php b/modules/export_seda/AdapterMaarchCourrier.php
old mode 100755
new mode 100644
index 94820c8b1f3908bf02502f9b9c67f88730dac2ba..ddce87f54be337e0523e35575dbcdb4631a1bbe0
--- a/modules/export_seda/AdapterMaarchCourrier.php
+++ b/modules/export_seda/AdapterMaarchCourrier.php
@@ -1,12 +1,58 @@
 <?php
 
+require_once __DIR__. DIRECTORY_SEPARATOR. 'RequestSeda.php';
+
 class AdapterMaarchCourrier{
 
+    private $db;
     public function __construct()
     {
-
+        $this->db = new RequestSeda();
     }
 
-    public function getInformations($reference) {
+    public function getInformations($messageId, $type)
+    {
+        $res = []; // [0] = url, [1] = header, [2] = cookie, [3] = data
+
+        $message = $this->db->getMessageByIdentifier($messageId);
+
+        $messageObject = json_decode($message->data);
+
+        $docserver     = \Docserver\models\DocserverModel::getById(['id' => $message->docserver_id]);
+        $docserverType = \Docserver\models\DocserverTypeModel::getById(
+            ['id' => $docserver[0]['docserver_type_id']]
+        );
+
+        $pathDirectory = str_replace('#', DIRECTORY_SEPARATOR, $message->path);
+        $filePath      = $docserver[0]['path_template'] . $pathDirectory . $message->filename;
+        $fingerprint   = \SrcCore\controllers\StoreController::getFingerPrint([
+            'filePath'              => $filePath,
+            'mode'                  => $docserverType[0]['fingerprint_mode'],
+        ]);
+
+        if ($fingerprint['fingerprint'] != $message->fingerprint) {
+            echo _PB_WITH_FINGERPRINT_OF_DOCUMENT;
+            exit;
+        }
+
+        $pathParts = pathinfo($filePath);
+        $res[0] =  $messageObject->ArchivalAgency->OrganizationDescriptiveMetadata->Communication[0]->value
+            . '?extension='. $pathParts['extension']
+            . '&size='. filesize($filePath)
+            . '&type='. $type;
+
+        $res[1] = [
+            'accept:application/json',
+            'content-type:application/json'
+        ];
+
+        $res[2] = '';
+
+        $postData = new stdClass();
+        $postData->base64 = base64_encode(file_get_contents($filePath));
+
+        $res[3] = json_encode($postData);
+
+        return $res;
     }
-}
\ No newline at end of file
+}
diff --git a/modules/export_seda/AdapterMaarchRM.php b/modules/export_seda/AdapterMaarchRM.php
old mode 100755
new mode 100644
index 7e83e66e3ec5abd7c4afe24b955179f569a5a122..7d263b8c171be59e002d31d8f176186fedf0bcbd
--- a/modules/export_seda/AdapterMaarchRM.php
+++ b/modules/export_seda/AdapterMaarchRM.php
@@ -5,7 +5,29 @@ class AdapterMaarchRM{
 
     public function __construct()
     {
-        $this->xml = simplexml_load_file(__DIR__.DIRECTORY_SEPARATOR. 'xml' . DIRECTORY_SEPARATOR . "config.xml");
+        $getXml = false;
+        $path = '';
+        if (file_exists(
+            $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+            . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+            . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+            . DIRECTORY_SEPARATOR . 'config.xml'
+        ))
+        {
+            $path = $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+                . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+                . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+                . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        } else if (file_exists($_SESSION['config']['corepath'] . 'modules' . DIRECTORY_SEPARATOR . 'export_seda'.  DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'config.xml')) {
+            $path = $_SESSION['config']['corepath'] . 'modules' . DIRECTORY_SEPARATOR . 'export_seda'
+                . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        }
+
+        if ($getXml) {
+            $this->xml = simplexml_load_file($path);
+        }
     }
 
     public function getInformations($reference) {
@@ -22,7 +44,7 @@ class AdapterMaarchRM{
         $res[2] = "LAABS-AUTH=".$token;
 
         $data = new stdClass();
-        $messageDirectory = __DIR__.DIRECTORY_SEPARATOR.'message'.DIRECTORY_SEPARATOR.$reference;
+        $messageDirectory = (string) $this->xml->CONFIG->directoryMessage.DIRECTORY_SEPARATOR.$reference;
         $messageFile = $reference.".xml";
 
         $files = scandir($messageDirectory);
@@ -46,4 +68,4 @@ class AdapterMaarchRM{
 
         return $res;
     }
-}
\ No newline at end of file
+}
diff --git a/modules/export_seda/Ajax_generate_message.php b/modules/export_seda/Ajax_generate_message.php
new file mode 100644
index 0000000000000000000000000000000000000000..ee4ea893ac97828fc6635df60b15ff77f29fe2dc
--- /dev/null
+++ b/modules/export_seda/Ajax_generate_message.php
@@ -0,0 +1,48 @@
+<?php
+/*
+*   Copyright 2008-2017 Maarch
+*
+*   This file is part of Maarch Framework.
+*
+*   Maarch Framework is free software: you can redistribute it and/or modify
+*   it under the terms of the GNU General Public License as published by
+*   the Free Software Foundation, either version 3 of the License, or
+*   (at your option) any later version.
+*
+*   Maarch Framework is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+    require_once __DIR__ . '/RequestSeda.php';
+    require_once __DIR__ . '/class/AbstractMessage.php';
+
+    $status = 0;
+    $error = $content = '';
+    if (!$_REQUEST['messageTitle']) {
+        $status = 1;
+        $error = _MESSAGE_TITLE_EMPTY;
+    } else {
+        if ($_REQUEST['reference']) {
+            if (!file_exists(__DIR__.DIRECTORY_SEPARATOR.'..'. DIRECTORY_SEPARATOR.'message'.DIRECTORY_SEPARATOR. $_REQUEST['reference'] .DIRECTORY_SEPARATOR. $_REQUEST['reference'] . '.xml')) {
+                $abstractMessage = new AbstractMessage();
+                $abstractMessage->addTitleToMessage($_REQUEST['reference'],$_REQUEST['messageTitle']);
+                $abstractMessage->generatePackage($_REQUEST['reference'],'ArchiveTransfer');
+            }
+
+            if ($status != 0) {
+                $error = $res['error'];
+            } else {
+                $content = $res['content'];
+            }
+        } else {
+            $status = 1;
+        }
+    }
+
+	echo "{status : " . $status . ", content : '" . addslashes($content) . "', error : '" . addslashes($error) . "'}";
+	exit ();
\ No newline at end of file
diff --git a/modules/export_seda/Ajax_seda_zip.php b/modules/export_seda/Ajax_seda_zip.php
old mode 100755
new mode 100644
index 5917dd6cc06e83da36d3674098dda1cda01aaf76..b8141d6820f624a57ebbb0ebbc004f95da80812f
--- a/modules/export_seda/Ajax_seda_zip.php
+++ b/modules/export_seda/Ajax_seda_zip.php
@@ -18,49 +18,78 @@
 *   along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-	require_once __DIR__.'/Zip.php';
-    require_once __DIR__ . '/RequestSeda.php';
+require_once __DIR__.'/Zip.php';
+require_once __DIR__ . '/RequestSeda.php';
 
-	$status = 0;
-	$error = $content = '';
-	if ($_REQUEST['reference']) {
-		$extract = new Extract();
-		$zipfile = $extract->exportZip($_REQUEST['reference']);
-		$extract->download($zipfile);
-	} else {
-		$status = 1;
-	}
+$status = 0;
+$error = $content = '';
+if ($_REQUEST['reference']) {
+    $extract = new Extract();
+    $zipfile = $extract->exportZip($_REQUEST['reference']);
+    $extract->download($zipfile);
+} else {
+    $status = 1;
+}
 
-	
-	echo "{status : " . $status . ", content : '" . addslashes($content) . "', error : '" . addslashes($error) . "'}";
-	exit ();
+echo "{status : " . $status . ", content : '" . addslashes($content) . "', error : '" . addslashes($error) . "'}";
+exit ();
 
 class Extract
 {
-	protected $zip;
+    protected $zip;
 
-	public function __construct() 
-	{
-		$this->zip = new Zip();
-	}
+    public function __construct()
+    {
+        $this->zip = new Zip();
+
+        $getXml = false;
+        $path = '';
+        if (file_exists(
+            $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+            . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+            . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+            . DIRECTORY_SEPARATOR . 'config.xml'
+        )) {
+            $path = $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+                . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+                . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+                . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        } else if (file_exists($_SESSION['config']['corepath'] . 'modules' . DIRECTORY_SEPARATOR . 'export_seda'.  DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'config.xml')) {
+            $path = $_SESSION['config']['corepath'] . 'modules' . DIRECTORY_SEPARATOR . 'export_seda'
+                . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        }
 
-	public function exportZip($reference)
-	{
-		$messageDirectory = __DIR__.DIRECTORY_SEPARATOR.'message'.DIRECTORY_SEPARATOR.$reference;
-		$zipfile = __DIR__.DIRECTORY_SEPARATOR.'message'.DIRECTORY_SEPARATOR.$reference. ".zip";
+        if ($getXml) {
+            $this->xml = simplexml_load_file($path);
+        }
+    }
 
-		if (!is_file($zipfile)) {
+    public function exportZip($reference)
+    {
+        $messageDirectory = (string) $this->xml->CONFIG->directoryMessage . DIRECTORY_SEPARATOR . $reference;
+        $zipDirectory = (string) $this->xml->CONFIG->directoryMessage . DIRECTORY_SEPARATOR . $reference . ".zip";
+
+        if (!is_file($zipDirectory)) {
             if (is_dir($messageDirectory)) {
-                $this->zip->add($zipfile, $messageDirectory.DIRECTORY_SEPARATOR."*");
+                $zip = new ZipArchive();
+                $zip->open($zipDirectory, ZipArchive::CREATE);
+
+                $listFiles = scandir($messageDirectory.DIRECTORY_SEPARATOR);
+                foreach ($listFiles as $filename) {
+                    if ($filename != '.' && $filename != '..') {
+                        $zip->addFile($messageDirectory . DIRECTORY_SEPARATOR . $filename, $filename);
+                    }
+
+                }
             }
         }
 
-        $zipContents = file_get_contents($zipfile);
-
-        return $zipfile;
-	}
+        return $zipDirectory;
+    }
 
-	public function download($full_path)
+    public function download($full_path)
     {
         $file_name = basename($full_path);
 
@@ -73,4 +102,4 @@ class Extract
 
         readfile($full_path);
     }
-}
\ No newline at end of file
+}
diff --git a/modules/export_seda/Ajax_transfer_SAE.php b/modules/export_seda/Ajax_transfer_SAE.php
old mode 100755
new mode 100644
index cc70916b99baa3e567c5d30a326133e50593e7c0..aad691463724b5a75300f090e3b91b08369da3d2
--- a/modules/export_seda/Ajax_transfer_SAE.php
+++ b/modules/export_seda/Ajax_transfer_SAE.php
@@ -40,7 +40,30 @@ class TransferToSAE
 
     public function __construct()
     {
-        $this->xml = simplexml_load_file(__DIR__.DIRECTORY_SEPARATOR. 'xml' . DIRECTORY_SEPARATOR . "config.xml");
+        $getXml = false;
+        $path = '';
+        if (file_exists(
+            $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+            . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+            . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+            . DIRECTORY_SEPARATOR . 'config.xml'
+        ))
+        {
+            $path = $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+                . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+                . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+                . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        } else if (file_exists($_SESSION['config']['corepath'] . 'modules' . DIRECTORY_SEPARATOR . 'export_seda'.  DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'config.xml')) {
+            $path = $_SESSION['config']['corepath'] . 'modules' . DIRECTORY_SEPARATOR . 'export_seda'
+                . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        }
+
+        if ($getXml) {
+            $this->xml = simplexml_load_file($path);
+        }
+
     }
 
     public function send($reference)
@@ -60,9 +83,10 @@ class TransferToSAE
             $abstractMessage->changeStatus($reference, 'SEND_SEDA');
             $acknowledgement = new Acknowledgement();
             $resIds = explode(',',$_REQUEST['resIds']);
-            $acknowledgement->send($dataTransfer['content'], $resIds);
+            $acknowledgementObject = $acknowledgement->receive($dataTransfer['content'], $resIds);
             $abstractMessage->changeStatus($reference, 'ACK_SEDA');
-            $res['content'] .= $reference;
+
+            $res['content'] .= $acknowledgementObject->MessageIdentifier->value;
         }
         
         return $res;
diff --git a/modules/export_seda/Ajax_validation.php b/modules/export_seda/Ajax_validation.php
old mode 100755
new mode 100644
index 347e7205292c54254acece0892dfcded6b468d07..f0a6e95822083c60ed7bc207c72e9c453ad38f05
--- a/modules/export_seda/Ajax_validation.php
+++ b/modules/export_seda/Ajax_validation.php
@@ -24,6 +24,7 @@ $error = $content = $res = '';
 
 if ($_REQUEST['reference']) {
     $resIds = explode(',',$_REQUEST['reference']);
+    arsort($resIds);
     if ($_REQUEST['type'] == 'acknowledgement') {
         require_once __DIR__.'/CheckAcknowledgement.php';
 
@@ -31,10 +32,9 @@ if ($_REQUEST['reference']) {
         foreach ($resIds as $id) {
             $res = $checkAcknowledgement->checkAttachment($id);
 
-            if ($res == false) {
+            if ($res === false) {
                 $status = 1;
                 $error = $_SESSION['error'];
-                break;
             }
         }
         $content = $res;
@@ -45,10 +45,9 @@ if ($_REQUEST['reference']) {
         foreach ($resIds as $id) {
             $res = $checkReply->checkAttachment($id);
 
-            if ($res == false) {
+            if ($res === false) {
                 $status = 1;
                 $error = $_SESSION['error'];
-                break;
             }
         }
         $content = $res;
@@ -59,10 +58,9 @@ if ($_REQUEST['reference']) {
         foreach ($resIds as $id) {
             $res = $purge->purge($id);
 
-            if ($res == false) {
+            if ($res === false) {
                 $status = 1;
                 $error = $_SESSION['error'];
-                break;
             }
         }
         $content = $res;
@@ -73,10 +71,9 @@ if ($_REQUEST['reference']) {
         foreach ($resIds as $id) {
             $res = $reset->reset($id);
 
-            if ($res == false) {
+            if ($res === false) {
                 $status = 1;
                 $error = $_SESSION['error'];
-                break;
             }
         }
         $content = $res;
diff --git a/modules/export_seda/CheckAcknowledgement.php b/modules/export_seda/CheckAcknowledgement.php
old mode 100755
new mode 100644
index 92e39c39e2f666148839d852b64bab38378eab69..bd0f87d6d0f39da14019df99d8f54396f7b6b236
--- a/modules/export_seda/CheckAcknowledgement.php
+++ b/modules/export_seda/CheckAcknowledgement.php
@@ -11,8 +11,8 @@ class CheckAcknowledgement
     }
 
     public function checkAttachment($resId) {
-        $letter = $this->db->getLetter($resId);
-        if ($letter->status != "SEND_SEDA") {
+        $status = $this->db->getStatusLetter($resId);
+        if ($status != "SEND_SEDA") {
             $_SESSION['error'] = _ERROR_STATUS_SEDA . $resId;
             return false;
         }
@@ -54,4 +54,4 @@ class CheckAcknowledgement
 
         return $resId;
     }
-}
\ No newline at end of file
+}
diff --git a/modules/export_seda/CheckReply.php b/modules/export_seda/CheckReply.php
old mode 100755
new mode 100644
index 08ad02acd717e38f847aa89e0e3474e760c6b3ac..785a3385c844ffa43ab6c82f8480500c0ded3126
--- a/modules/export_seda/CheckReply.php
+++ b/modules/export_seda/CheckReply.php
@@ -2,19 +2,44 @@
 
 require_once __DIR__ . '/RequestSeda.php';
 require_once __DIR__ . '/class/AbstractMessage.php';
+require_once __DIR__ . '/class/ArchiveTransferReply.php';
 
 Class CheckReply {
     protected $token;
     protected $SAE;
     protected $db;
+    protected $xml;
 
     public function __construct()
     {
-        $xml = simplexml_load_file(__DIR__.DIRECTORY_SEPARATOR. 'xml' . DIRECTORY_SEPARATOR . "config.xml");
-        $this->token = (string) $xml->CONFIG->token;
+        $getXml = false;
+        $path = '';
+        if (file_exists(
+            $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+            . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+            . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+            . DIRECTORY_SEPARATOR . 'config.xml'
+        ))
+        {
+            $path = $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+                . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+                . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+                . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        } else if (file_exists($_SESSION['config']['corepath'] . 'modules' . DIRECTORY_SEPARATOR . 'export_seda'.  DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'config.xml')) {
+            $path = $_SESSION['config']['corepath'] . 'modules' . DIRECTORY_SEPARATOR . 'export_seda'
+                . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        }
+
+        if ($getXml) {
+            $this->xml = simplexml_load_file($path);
+        }
+
+        $this->token = (string) $this->xml->CONFIG->token;
         $tokenEncode = urlencode($this->token);
         $this->token = "LAABS-AUTH=". $tokenEncode;
-        $this->urlService = (string) $xml->CONFIG->urlSAEService . "/medona/ArchiveTransfer/history";
+        $this->urlService = (string) $this->xml->CONFIG->urlSAEService . "/medona/message/reference";
         $this->db = new RequestSeda();
 
     }
@@ -38,25 +63,19 @@ Class CheckReply {
         }
 
         foreach ($unitIdentifiers as $key => $value) {
-            $messageReplyIdentifier = $key. '_Reply';
-            $messageReply = $this->getReply($messageReplyIdentifier);
+            $messages = $this->getReply($key);
 
-            if (empty($messageReply)) {
+            if (!isset($messages->replyMessage)) {
                 continue;
             }
 
             //créer message reply & sauvegarder xml
-            $data = json_decode($messageReply[0]->data);
-            $this->db->insertMessage($data, "ArchiveTransferReply");
-            $abstractMessage->saveXml($data,"ArchiveTransferReply", ".txt");
-
-            //créer attachment
-            //changer status courrier
-            $resIds = explode(',',$value);
-            foreach ($resIds as $resId) {
-                $abstractMessage->addAttachment($messageReplyIdentifier,$resId,$messageReplyIdentifier.".txt","txt","Réponse de transfert",2);
-                $this->db->updateStatusLetterbox($resId,"REPLY_SEDA");
-            }
+            $resIds = explode(',', $value);
+            $data = json_decode($messages->replyMessage->data);
+
+            $archiveTransferReply = new ArchiveTransferReply();
+            $archiveTransferReply->receive($data, $resIds);
+            $abstractMessage->changeStatus($key, 'REPLY_SEDA');
         }
 
         return true;
@@ -107,14 +126,43 @@ Class CheckReply {
             'content-type:application/json'
         ];
 
+        $refEncode = str_replace('.', '%2E', urlencode($reference));
+        $url = $this->urlService .'?reference=' . $refEncode;
+
         try {
             $curl = curl_init();
-
-            curl_setopt($curl, CURLOPT_URL, $this->urlService . "?reference=". $reference);
+            curl_setopt($curl, CURLOPT_URL, $url);
             curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
             curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
             curl_setopt($curl, CURLOPT_COOKIE, $this->token);
 
+            if (empty($this->xml->CONFIG->certificateSSL)) {
+                curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
+            } else {
+                curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
+                curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
+
+                $certificateSSL = $this->xml->CONFIG->certificateSSL;
+                if (is_file($certificateSSL)) {
+                    $ext = ['.crt','.pem'];
+
+                    $filenameExt = strrchr($certificateSSL, '.');
+                    if (in_array($filenameExt, $ext)) {
+                        curl_setopt($curl, CURLOPT_CAINFO, $certificateSSL);
+                    } else {
+                        $res['status'] = 1;
+                        $res['content'] = _ERROR_EXTENSION_CERTIFICATE;
+                        return $res;
+                    }
+                } elseif (is_dir($certificateSSL)) {
+                    curl_setopt($curl, CURLOPT_CAPATH, $certificateSSL);
+                } else {
+                    $res['status'] = 1;
+                    $res['content'] = _ERROR_UNKNOW_CERTIFICATE;
+                    return $res;
+                }
+            }
+
             $data = json_decode(curl_exec($curl));
 
             curl_close($curl);
@@ -124,4 +172,4 @@ Class CheckReply {
             var_dump($e);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/modules/export_seda/Controllers/AdapterEmail.php b/modules/export_seda/Controllers/AdapterEmail.php
new file mode 100644
index 0000000000000000000000000000000000000000..86120ab1bce7c00d86d86b22c2f3371a9d62c099
--- /dev/null
+++ b/modules/export_seda/Controllers/AdapterEmail.php
@@ -0,0 +1,47 @@
+<?php
+
+require_once __DIR__. DIRECTORY_SEPARATOR. '..' . DIRECTORY_SEPARATOR. 'RequestSeda.php';
+
+class AdapterEmail
+{
+    private $db;
+    public function __construct()
+    {
+        $this->db = new RequestSeda();
+        $this->xml = simplexml_load_file(__DIR__. DIRECTORY_SEPARATOR. '..' .DIRECTORY_SEPARATOR. 'xml' . DIRECTORY_SEPARATOR . "config.xml");
+    }
+
+    public function send($messageObject, $messageId)
+    {
+        $res['status'] = 0;
+        $res['content'] = '';
+
+        $gec = strtolower($this->xml->M2M->gec);
+
+        if ($gec == 'maarch_courrier') {
+            $sendmail = new stdClass();
+            $sendmail->coll_id                = 'letterbox_coll';
+            $sendmail->res_id                 = $messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content->OriginatingSystemId;
+            $sendmail->user_id                = $messageObject->TransferringAgency->OrganizationDescriptiveMetadata->UserIdentifier;
+            $sendmail->to_list                = $messageObject->ArchivalAgency->OrganizationDescriptiveMetadata->Communication[0]->value;
+            $sendmail->cc_list                = '';
+            $sendmail->cci_list               = '';
+            $sendmail->email_object           = $messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content->Title[0];
+            $sendmail->email_body             = $messageObject->Comment[0]->value;
+            $sendmail->is_res_master_attached = 'N';
+            $sendmail->email_status           = 'W';
+            $sendmail->sender_email           = $messageObject->TransferringAgency->OrganizationDescriptiveMetadata->Contact[0]->Communication[1]->value;
+
+            $sendmail->message_exchange_id = $messageId;
+
+            $date = new DateTime;
+            $sendmail->creation_date = $date->format(DateTime::ATOM);
+
+            \Sendmail\Models\MailModel::createMail($sendmail);
+
+            $this->db->updateStatusMessage($messageObject->MessageIdentifier->value, 'I');
+        }
+
+        return $res;
+    }
+}
diff --git a/modules/export_seda/Controllers/AdapterWS.php b/modules/export_seda/Controllers/AdapterWS.php
new file mode 100644
index 0000000000000000000000000000000000000000..29255a6b7aa5629c3cdb8c4ce7e99806390f1c88
--- /dev/null
+++ b/modules/export_seda/Controllers/AdapterWS.php
@@ -0,0 +1,28 @@
+<?php
+
+require_once __DIR__. DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Transfer.php';
+require_once __DIR__. DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'RequestSeda.php';
+
+class AdapterWS{
+
+    private $db;
+    public function __construct()
+    {
+        $this->db = new RequestSeda();
+    }
+
+    public function send($messageObject, $messageId, $type)
+    {
+        $transfer = new Transfer();
+
+        $message = $this->db->getMessageByIdentifier($messageId);
+        $res = $transfer->transfer('maarchcourrier', $message->reference, $type);
+
+        if ($res['status'] == 1) {
+            $this->db->updateStatusMessage($messageObject->MessageIdentifier->value, 'E');
+            return $res;
+        }
+
+        $this->db->updateStatusMessage($messageObject->MessageIdentifier->value, 'S');
+    }
+}
\ No newline at end of file
diff --git a/modules/export_seda/Controllers/ReceiveMessage.php b/modules/export_seda/Controllers/ReceiveMessage.php
new file mode 100644
index 0000000000000000000000000000000000000000..ccd539701cd3c0c467c970d6addf51300f217f4b
--- /dev/null
+++ b/modules/export_seda/Controllers/ReceiveMessage.php
@@ -0,0 +1,396 @@
+<?php
+
+/**
+ * Copyright Maarch since 2008 under licence GPLv3.
+ * See LICENCE.txt file at the root folder for more details.
+ * This file is part of Maarch software.
+ *
+ */
+
+/**
+ * @brief Receive Message
+ * @author dev@maarch.org
+ * @ingroup export_seda
+ */
+
+require_once __DIR__ . DIRECTORY_SEPARATOR .'../RequestSeda.php';
+require_once __DIR__. DIRECTORY_SEPARATOR .'../Zip.php';
+
+class ReceiveMessage
+{
+
+    private $db;
+
+    public function __construct()
+    {
+        $this->db = new RequestSeda();
+    }
+
+    /**
+     * @param $messageObject
+     * @return bool|mixed
+     */
+    public function receive($tmpPath, $tmpName, $type)
+    {
+        $res['status'] = 0;
+        $res['content'] = '';
+
+
+        $zipPathParts = pathinfo($tmpPath. DIRECTORY_SEPARATOR. $tmpName);
+        $messageDirectory = $tmpPath . $zipPathParts['filename'];
+
+        $zip = new ZipArchive();
+        $zip->open($tmpPath. DIRECTORY_SEPARATOR. $tmpName);
+        $zip->extractTo($messageDirectory);
+
+        $messageFileName = '';
+
+        foreach (glob($messageDirectory. DIRECTORY_SEPARATOR. '*.xml') as $filename) {
+            $pathParts = pathinfo($filename);
+            if (strpos($pathParts['filename'], 'ArchiveTransfer') === false) {
+                break;
+            } else {
+                $messageFileName = $filename;
+            }
+        }
+
+        if (!$messageFileName) {
+            $res['status'] = 1;
+            $res['content'] = _ERROR_MESSAGE_NOT_PRESENT;
+
+            return $res;
+        }
+
+        libxml_use_internal_errors(true);
+
+        $xml = new DOMDocument();
+        $xml->load($messageFileName);
+
+        // FORMAT MESSAGE XML
+        /*$xsd = __DIR__ . DIRECTORY_SEPARATOR. '..' . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'xsd' . DIRECTORY_SEPARATOR . 'seda-2.0-main.xsd';
+        if (!$xml->schemaValidate($xsd)){
+            $res['status'] = 1;
+            $res['content'] = _ERROR_MESSAGE_STRUCTURE_WRONG;
+
+            $this->libxmlDisplayErrors();
+
+            return $res;
+        }*/
+
+        // TEST ATTACHMENT
+        $listFiles = scandir($messageDirectory);
+        $dataObject = simplexml_load_file($messageFileName);
+        if ($dataObject->DataObjectPackage) {
+            foreach ($dataObject->DataObjectPackage->BinaryDataObject as $binaryDataObject) {
+                $filename = '';
+                // ATTACHMENT FILENAME
+                $filename = $binaryDataObject->Attachment->attributes();
+                if (!array_search($filename, $listFiles)) {
+                    $res['status'] = 1;
+                    $res['content'] = _ERROR_ATTACHMENT_FILE_MISSING . ' : ' . $filename;
+
+                    return $res;
+                }
+
+                // ATTACHMENT BASE 64
+                $data = file_get_contents($messageDirectory . DIRECTORY_SEPARATOR . $filename);
+                $dataBase64 = base64_encode($data);
+
+                if ($dataBase64 != $binaryDataObject->Attachment) {
+                    $res['status'] = 1;
+                    $res['content'] = _ERROR_ATTACHMENT_WRONG_BASE64 . ' : ' . $filename;
+
+                    return $res;
+                }
+            }
+        }
+
+        // ARCHIVER AGENCY CONTACT
+        if ($dataObject->ArchivalAgency) {
+            if (!$this->db->getEntitiesByBusinessId($dataObject->ArchivalAgency->Identifier)) {
+                $res['status'] = 1;
+                $res['content'] = _ERROR_CONTACT_UNKNOW . ' : ' . $dataObject->ArchivalAgency->Identifier;
+
+                return $res;
+            }
+        }
+
+        $res['content'] = json_encode($this->getMessageObject($dataObject, $type));
+
+        return $res;
+    }
+
+
+    private function getMessageObject($dataObject, $type)
+    {
+        $messageObject = new stdClass();
+
+        $listComment= array();
+        $messageObject->Comment = new stdClass();
+        foreach ($dataObject->Comment as $comment) {
+            $tmpComment = new stdClass();
+            $tmpComment->value = (string) $comment;
+
+            $listComment[] = $tmpComment;
+        }
+        $messageObject->Comment = $listComment;
+
+        $messageObject->MessageIdentifier = new stdClass();
+        $messageObject->MessageIdentifier->value = (string) $dataObject->MessageIdentifier;
+
+        if ($dataObject->MessageReceivedIdentifier) {
+            $messageObject->MessageReceivedIdentifier = new stdClass();
+            $messageObject->MessageReceivedIdentifier->value = (string) $dataObject->MessageReceivedIdentifier;
+        }
+
+        if ($dataObject->MessageRequestIdentifier) {
+            $messageObject->MessageRequestIdentifier = new stdClass();
+            $messageObject->MessageRequestIdentifier->value = (string) $dataObject->MessageRequestIdentifier;
+        }
+
+        $messageObject->Date = (string) $dataObject->Date;
+
+        if ($dataObject->DataObjectPackage) {
+            $messageObject->DataObjectPackage = $this->getDataObjectPackage($dataObject->DataObjectPackage);
+        }
+
+        if ($dataObject->ArchivalAgency) {
+            $messageObject->ArchivalAgency = $this->getOrganization($dataObject->ArchivalAgency);
+        }
+
+        if ($dataObject->OriginatingAgency) {
+            $messageObject->OriginatingAgency = $this->getOrganization($dataObject->OriginatingAgency);
+        }
+
+        if ($dataObject->TransferringAgency) {
+            $messageObject->TransferringAgency = $this->getOrganization($dataObject->TransferringAgency);
+        }
+
+        if ($dataObject->Sender) {
+            $messageObject->Sender = $this->getOrganization($dataObject->Sender);
+        }
+
+        if ($dataObject->Receiver) {
+            $messageObject->Receiver = $this->getOrganization($dataObject->Receiver);
+        }
+
+        if ($dataObject->UnitIdentifier) {
+            $messageObject->UnitIdentifier = new stdClass();
+            $messageObject->UnitIdentifier->value = (string) $dataObject->UnitIdentifier;
+        }
+
+        if ($type) {
+            $messageObject->type = $type;
+        }
+
+        return $messageObject;
+    }
+
+    private function getDataObjectPackage($dataObject)
+    {
+        $dataObjectPackage = new stdClass();
+        $dataObjectPackage->BinaryDataObject = new stdClass();
+        $dataObjectPackage->BinaryDataObject = $this->getBinaryDataObject($dataObject->BinaryDataObject);
+
+        $dataObjectPackage->DescriptiveMetadata = new stdClass();
+        $dataObjectPackage->DescriptiveMetadata->ArchiveUnit = new stdClass();
+        $dataObjectPackage->DescriptiveMetadata->ArchiveUnit = $this->getArchiveUnit($dataObject->DescriptiveMetadata->ArchiveUnit);
+
+        return $dataObjectPackage;
+    }
+
+    private function getBinaryDataObject($dataObject)
+    {
+        $listBinaryDataObject = array();
+        $i = 0;
+        foreach ($dataObject as $BinaryDataObject) {
+            $tmpBinaryDataObject = new stdClass();
+            $tmpBinaryDataObject->id = (string) $BinaryDataObject->attributes();
+
+            $tmpBinaryDataObject->MessageDigest = new stdClass();
+            $tmpBinaryDataObject->MessageDigest->value = (string) $BinaryDataObject->MessageDigest;
+            $tmpBinaryDataObject->MessageDigest->algorithm = (string) $BinaryDataObject->MessageDigest->attributes();
+
+            $tmpBinaryDataObject->Size = (string) $BinaryDataObject->Size;
+
+            $tmpBinaryDataObject->Attachment = new stdClass();
+            $tmpBinaryDataObject->Attachment->value = (string) $BinaryDataObject->Attachment;
+            foreach ($BinaryDataObject->Attachment->attributes() as $key => $value) {
+                if ($key == 'filename') {
+                    $tmpBinaryDataObject->Attachment->filename = (string) $value;
+                } elseif ($key == 'uri') {
+                    $tmpBinaryDataObject->Attachment->uri = (string) $value;
+                }
+            }
+
+            $tmpBinaryDataObject->FormatIdentification = new stdClass();
+            $tmpBinaryDataObject->FormatIdentification->MimeType = (string) $BinaryDataObject->FormatIdentification->MimeType;
+
+            $listBinaryDataObject[] = $tmpBinaryDataObject;
+        }
+
+        return $listBinaryDataObject;
+    }
+    
+    private function getArchiveUnit($dataObject)
+    {
+        $listArchiveUnit = array();
+        foreach ($dataObject as $ArchiveUnit) {
+            $tmpArchiveUnit = new stdClass();
+            $tmpArchiveUnit->id = (string) $ArchiveUnit->attributes();
+            $tmpArchiveUnit->Content = new stdClass();
+            $tmpArchiveUnit->Content->DescriptionLevel = (string) $ArchiveUnit->Content->DescriptionLevel;
+
+            $tmpArchiveUnit->Content->Title = array();
+            foreach ($ArchiveUnit->Content->Title as $title) {
+                $tmpArchiveUnit->Content->Title[] = (string) $title;
+            }
+
+            $tmpArchiveUnit->Content->OriginatingSystemId = (string) $ArchiveUnit->Content->OriginatingSystemId;
+            $tmpArchiveUnit->Content->OriginatingAgencyArchiveUnitIdentifier = (string) $ArchiveUnit->Content->OriginatingAgencyArchiveUnitIdentifier;
+            $tmpArchiveUnit->Content->DocumentType = (string) $ArchiveUnit->Content->DocumentType;
+            $tmpArchiveUnit->Content->Status = (string) $ArchiveUnit->Content->Status;
+            $tmpArchiveUnit->Content->CreatedDate = (string) $ArchiveUnit->Content->CreatedDate;
+
+            if ($ArchiveUnit->Content->Writer) {
+                $tmpArchiveUnit->Content->Writer = array();
+                foreach ($ArchiveUnit->Content->Writer as $Writer) {
+                    $tmpWriter = new stdClass();
+                    $tmpWriter->FirstName = (string)$Writer->FirstName;
+                    $tmpWriter->BirthName = (string)$Writer->BirthName;
+
+                    $tmpArchiveUnit->Content->Writer = $tmpWriter;
+                }
+            }
+
+            if ($ArchiveUnit->DataObjectReference) {
+                $tmpArchiveUnit->DataObjectReference = array();
+                foreach ($ArchiveUnit->DataObjectReference as $DataObjectReference) {
+                    $tmpDataObjectReference = new stdClass();
+                    $tmpDataObjectReference->DataObjectReferenceId = (string) $DataObjectReference->DataObjectReferenceId;
+
+                    $tmpArchiveUnit->DataObjectReference[] = $tmpDataObjectReference;
+                }
+            }
+
+            if ($ArchiveUnit->ArchiveUnit) {
+                $tmpArchiveUnit->ArchiveUnit = $this->getArchiveUnit($ArchiveUnit->ArchiveUnit);
+            }
+
+            $listArchiveUnit[] = $tmpArchiveUnit;
+        }
+        return $listArchiveUnit;
+    }
+
+    private function getOrganization($dataObject)
+    {
+        $organization= new stdClass();
+
+        $organization->Identifier = new stdClass();
+        $organization->Identifier->value = (string) $dataObject->Identifier;
+
+        $organization->OrganizationDescriptiveMetadata = new stdClass();
+
+        if ($dataObject->OrganizationDescriptiveMetadata->LegalClassification) {
+            $organization->OrganizationDescriptiveMetadata->LegalClassification = (string) $dataObject->OrganizationDescriptiveMetadata->LegalClassification;
+        }
+
+        if ($dataObject->OrganizationDescriptiveMetadata->Name) {
+            $organization->OrganizationDescriptiveMetadata->Name = (string) $dataObject->OrganizationDescriptiveMetadata->Name;
+        }
+
+        if ($dataObject->OrganizationDescriptiveMetadata->Communication) {
+            $organization->OrganizationDescriptiveMetadata->Communication = $this->getCommunication($dataObject->OrganizationDescriptiveMetadata->Communication);
+        }
+
+        if ($dataObject->OrganizationDescriptiveMetadata->Contact) {
+            $organization->OrganizationDescriptiveMetadata->Contact = $this->getContact($dataObject->OrganizationDescriptiveMetadata->Contact);
+        }
+
+        return $organization;
+    }
+
+    private function getCommunication($dataObject)
+    {
+        $listCommunication = array();
+        foreach ($dataObject as $Communication) {
+            $tmpCommunication = new stdClass();
+            $tmpCommunication->Channel = (string) $Communication->Channel;
+            $tmpCommunication->value = (string) $Communication->CompleteNumber;
+
+            $listCommunication[] = $tmpCommunication;
+        }
+
+        return $listCommunication;
+    }
+
+    private function getAddress($dataObject)
+    {
+        $listAddress = array();
+        foreach ($dataObject as $Address) {
+            $tmpAddress = new stdClass();
+            $tmpAddress->CityName = (string) $Address->CityName;
+            $tmpAddress->Country = (string) $Address->Country;
+            $tmpAddress->Postcode = (string) $Address->Postcode;
+            $tmpAddress->PostOfficeBox = (string) $Address->PostOfficeBox;
+            $tmpAddress->StreetName = (string) $Address->StreetName;
+
+            $listAddress[] = $tmpAddress;
+        }
+
+        return $listAddress;
+    }
+
+    private function getContact($dataObject)
+    {
+        $listContact = array();
+        foreach ($dataObject as $Contact) {
+            $tmpContact = new stdClass();
+            $tmpContact->DepartmentName = (string) $Contact->DepartmentName;
+            $tmpContact->PersonName = (string) $Contact->PersonName;
+
+            if ($Contact->Communication) {
+                $tmpContact->Communication = $this->getCommunication($Contact->Communication);
+            }
+
+            if ($Contact->Address) {
+                $tmpContact->Address = $this->getAddress($Contact->Address);
+            }
+            $listContact[] = $tmpContact;
+        }
+
+        return $listContact;
+    }
+
+    private function libxmlDisplayError($error)
+    {
+        $return = "<br/>\n";
+        switch ($error->level) {
+            case LIBXML_ERR_WARNING:
+                $return .= "<b>Warning $error->code</b>: ";
+                break;
+            case LIBXML_ERR_ERROR:
+                $return .= "<b>Error $error->code</b>: ";
+                break;
+            case LIBXML_ERR_FATAL:
+                $return .= "<b>Fatal Error $error->code</b>: ";
+                break;
+        }
+        $return .= trim($error->message);
+        if ($error->file) {
+            $return .=    " in <b>$error->file</b>";
+        }
+        $return .= " on line <b>$error->line</b>\n";
+
+        return $return;
+    }
+
+    private function libxmlDisplayErrors()
+    {
+        $errors = libxml_get_errors();
+        foreach ($errors as $error) {
+            //var_dump($this->libxmlDisplayError($error));
+        }
+        libxmlDisplayErrors();
+    }
+}
\ No newline at end of file
diff --git a/modules/export_seda/Controllers/SendMessage.php b/modules/export_seda/Controllers/SendMessage.php
new file mode 100644
index 0000000000000000000000000000000000000000..704809aa42a3a5026fc6d72c86e2bc3746f973a4
--- /dev/null
+++ b/modules/export_seda/Controllers/SendMessage.php
@@ -0,0 +1,89 @@
+<?php
+
+/**
+ * Copyright Maarch since 2008 under licence GPLv3.
+ * See LICENCE.txt file at the root folder for more details.
+ * This file is part of Maarch software.
+ *
+ */
+
+/**
+ * @brief Send Message
+ * @author dev@maarch.org
+ * @ingroup export_seda
+ */
+
+require_once __DIR__ . DIRECTORY_SEPARATOR .'../RequestSeda.php';
+require_once __DIR__ . DIRECTORY_SEPARATOR .'../DOMTemplateProcessor.php';
+require_once __DIR__. DIRECTORY_SEPARATOR .'../Zip.php';
+require_once __DIR__. DIRECTORY_SEPARATOR . '/AdapterWS.php';
+require_once __DIR__. DIRECTORY_SEPARATOR . '/AdapterEmail.php';
+
+class SendMessage {
+
+    private $db;
+
+    public function __construct()
+    {
+        $this->db = new RequestSeda();
+    }
+
+    public function send($messageObject, $messageId, $type)
+    {
+        $channel = $messageObject->ArchivalAgency->OrganizationDescriptiveMetadata->Communication[0]->Channel;
+
+        $adapter = '';
+        if ($channel == 'url') {
+            $adapter = new AdapterWS();
+        } elseif ($channel == 'email') {
+            $adapter = new AdapterEmail();
+        } else {
+            return false;
+        }
+        $res = $adapter->send($messageObject, $messageId, $type);
+
+        return $res;
+    }
+
+    public function generateMessageFile($messageObject, $type, $tmpPath)
+    {
+        $DOMTemplate = new DOMDocument();
+        $DOMTemplate->load(__DIR__ .DIRECTORY_SEPARATOR. '..'. DIRECTORY_SEPARATOR.'resources'.DIRECTORY_SEPARATOR.$type.'.xml');
+        $DOMTemplateProcessor = new DOMTemplateProcessor($DOMTemplate);
+        $DOMTemplateProcessor->setSource($type, $messageObject);
+        $DOMTemplateProcessor->merge();
+        $DOMTemplateProcessor->removeEmptyNodes();
+
+        file_put_contents($tmpPath . $messageObject->MessageIdentifier->value . ".xml", $DOMTemplate->saveXML());
+
+        if ($messageObject->DataObjectPackage) {
+            foreach ($messageObject->DataObjectPackage->BinaryDataObject as $binaryDataObject) {
+                $base64_decoded = base64_decode($binaryDataObject->Attachment->value);
+                $file = fopen($tmpPath . $binaryDataObject->Attachment->filename, 'w');
+                fwrite($file, $base64_decoded);
+                fclose($file);
+            }
+        }
+        $filename = $this->generateZip($messageObject, $tmpPath);
+
+        return $filename;
+    }
+
+    private function generateZip($messageObject,$tmpPath)
+    {
+        $zip = new ZipArchive();
+        $filename = $tmpPath.$messageObject->MessageIdentifier->value. ".zip";
+
+        $zip->open($filename, ZipArchive::CREATE);
+
+        $zip->addFile($tmpPath . $messageObject->MessageIdentifier->value . ".xml", $messageObject->MessageIdentifier->value . ".xml");
+
+        if ($messageObject->DataObjectPackage) {
+            foreach ($messageObject->DataObjectPackage->BinaryDataObject as $binaryDataObject) {
+                $zip->addFile($tmpPath . $binaryDataObject->Attachment->filename, $binaryDataObject->Attachment->filename);
+            }
+        }
+
+        return $filename;
+    }
+}
\ No newline at end of file
diff --git a/modules/export_seda/DOMTemplateProcessor.php b/modules/export_seda/DOMTemplateProcessor.php
old mode 100755
new mode 100644
index ecc69be511e3d86ccee4abae9078b4532822b36b..7283ae50eba192b07dfa0607cda0838f19cdfd35
--- a/modules/export_seda/DOMTemplateProcessor.php
+++ b/modules/export_seda/DOMTemplateProcessor.php
@@ -17,9 +17,10 @@
  * You should have received a copy of the GNU Lesser General Public License
  * along with dependency xml.  If not, see <http://www.gnu.org/licenses/>.
  */
+
 /**
  * Process DOM XML Template documents
- * 
+ *
  * @author Cyril Vazquez <cyril.vazquez@maarch.org>
  */
 class DOMTemplateProcessor
@@ -69,9 +70,6 @@ class DOMTemplateProcessor
     {
         parent::__construct($document);
 
-        
-        $this->xinclude();
-        $this->xinclude();
         $this->xinclude();
         $this->xinclude();
         $this->xinclude();
@@ -91,12 +89,12 @@ class DOMTemplateProcessor
      * Process xinclude processing instructions
      * @param DOMNode $node The context node. If omitted the method processes the entire document tree.
      */
-    protected function xinclude($node=null)
+    protected function xinclude($node = null)
     {
         if ($pis = $this->query("descendant-or-self::processing-instruction('xinclude')", $node)) {
             foreach ($pis as $pi) {
                 $includeFragment = $this->document->createDocumentFragment();
-                $source = file_get_contents(__DIR__.trim($pi->data));
+                $source = file_get_contents(__DIR__ . trim($pi->data));
                 if (!$source) {
                     throw new \Exception("Error including Xml fragment: fragment '$pi->data' could not be parsed");
                 }
@@ -110,7 +108,7 @@ class DOMTemplateProcessor
 
     /**
      * Bind a variable
-     * @param string $name      The name of the variable
+     * @param string $name The name of the variable
      * @param string &$variable The reference of the value
      */
     public function bindVariable($name, &$variable)
@@ -120,7 +118,7 @@ class DOMTemplateProcessor
 
     /**
      * Set a source for merge
-     * @param string $name  The name of the data source
+     * @param string $name The name of the data source
      * @param string $value The value
      */
     public function setSource($name, $value)
@@ -141,7 +139,7 @@ class DOMTemplateProcessor
         switch($node->nodeType) {
             case \XML_ELEMENT_NODE:
                 $childNodeList = $node->childNodes;
-                for ($i=0, $l=$childNodeList->length; $i<$l; $i++) {
+                for ($i=$childNodeList->length-1; $i>=0; $i--) {
                     $this->removeEmptyNodes($childNodeList->item($i));
                 }
 
@@ -158,7 +156,7 @@ class DOMTemplateProcessor
                 break;
 
             case \XML_TEXT_NODE:
-                if (ctype_space($node->nodeValue) && $node->previousSibling && $node->previousSibling->nodeType == \XML_TEXT_NODE) {
+                if (ctype_space($node->nodeValue)) { //&& $node->previousSibling && $node->previousSibling->nodeType == \XML_TEXT_NODE) {
                     $node->nodeValue = trim($node->nodeValue);
                 }
                 break;
@@ -170,11 +168,11 @@ class DOMTemplateProcessor
     ------------------------------------------------------------------------- */
     /**
      * Merges the processing instructions on the given node and its chil nodes.
-     * 
-     * @param string $node   The context node. If omitted the entire document will be processed.
+     *
+     * @param string $node The context node. If omitted the entire document will be processed.
      * @param string $source The data source. If omitted, all merge instruction path must be existing sources
      */
-    public function merge($node=null, $source=null)
+    public function merge($node = null, $source = null)
     {
         // Avoid garbage nodes merge
         if (!isset($this->mergedNodes)) {
@@ -184,7 +182,7 @@ class DOMTemplateProcessor
         if (!isset($this->mergedForms)) {
             $this->mergedForms = new \SplObjectStorage();
         }
-        
+
         if ($node && $this->mergedNodes->contains($node)) {
             return;
         }
@@ -227,7 +225,7 @@ class DOMTemplateProcessor
         }
     }
 
-    protected function mergePi($pi, $instr, $source=null)
+    protected function mergePi($pi, $instr, $source = null)
     {
         // Get value by reference
         $value = &$this->getData($instr, $source);
@@ -235,7 +233,7 @@ class DOMTemplateProcessor
         // Use value with selected target
         if (isset($instr->params['var'])) {
             $this->addVar($instr->params['var'], $value);
-            
+
             $pi->parentNode->removeChild($pi);
 
             return false;
@@ -247,7 +245,7 @@ class DOMTemplateProcessor
         //if (isset($instr->params['source']))
         //    var_dump($instr->params['source']);
 
-        switch(true) {
+        switch (true) {
             // If value is scalar, merge text before Pi
             case $type == 'string':
             case $type == 'integer':
@@ -283,7 +281,7 @@ class DOMTemplateProcessor
 
                     // If value is an object but no form : merge string version if possible
                     case method_exists($value, '__toString'):
-                        return $this->mergeText($pi, $instr, (string) $value);                    
+                        return $this->mergeText($pi, $instr, (string)$value);
                 }
 
         }
@@ -317,17 +315,17 @@ class DOMTemplateProcessor
         }
     }
 
-    protected function mergeTextNodes($node=null, $source=null)
+    protected function mergeTextNodes($node = null, $source = null)
     {
         $textNodes = $this->query("descendant-or-self::text()[contains(., '[?merge')] | descendant-or-self::*/@*[contains(., '[?merge')]", $node);
 
-        for ($i=0, $l=$textNodes->length; $i<$l; $i++) {
+        for ($i = 0, $l = $textNodes->length; $i < $l; $i++) {
             $textNode = $textNodes->item($i);
             $this->mergeTextNode($textNode, $source);
         }
     }
 
-    protected function mergeTextNode($textNode, $source=null)
+    protected function mergeTextNode($textNode, $source = null)
     {
         //$nodeXml = $this->saveXml($textNode);
         $nodeValue = $textNode->nodeValue;
@@ -345,7 +343,7 @@ class DOMTemplateProcessor
         foreach ($instructions as $pi => $instr) {
             $value = $this->getData($instr, $source);
             if (is_scalar($value) || is_null($value) || (is_object($value) && method_exists($value, '__toString'))) {
-                $mergedValue = str_replace($pi, (string) $value, $textNode->nodeValue);
+                $mergedValue = str_replace($pi, (string)$value, $textNode->nodeValue);
                 $mergedValue = htmlentities($mergedValue);
                 $textNode->nodeValue = str_replace($pi, $value, $mergedValue);
             }
@@ -360,31 +358,31 @@ class DOMTemplateProcessor
     protected function mergeText($pi, $instr, $value)
     {
         $params = $instr->params;
-        switch(true) {
-        case isset($params['attr']):
-            if (!$targetNode = $this->query("following-sibling::*", $pi)->item(0)) {
-                return true;
-            }
-            $targetNode->setAttribute($params['attr'], $value);
-            break;
-
-        case isset($params['render']):
-            if (!$params['render']) {
-                $fragment = $value;
-            } else { 
-                $fragment = $params['render'];
-            }
-            if (!isset($this->fragments[$fragment])) {
-                return true;
-            }
-            $targetNode = $this->fragments[$fragment]->cloneNode(true);
-            $this->merge($targetNode);
-            $pi->parentNode->insertBefore($targetNode, $pi);
-            break;
-
-        default:
-            $targetNode = $this->document->createTextNode($value);
-            $pi->parentNode->insertBefore($targetNode, $pi);
+        switch (true) {
+            case isset($params['attr']):
+                if (!$targetNode = $this->query("following-sibling::*", $pi)->item(0)) {
+                    return true;
+                }
+                $targetNode->setAttribute($params['attr'], $value);
+                break;
+
+            case isset($params['render']):
+                if (!$params['render']) {
+                    $fragment = $value;
+                } else {
+                    $fragment = $params['render'];
+                }
+                if (!isset($this->fragments[$fragment])) {
+                    return true;
+                }
+                $targetNode = $this->fragments[$fragment]->cloneNode(true);
+                $this->merge($targetNode);
+                $pi->parentNode->insertBefore($targetNode, $pi);
+                break;
+
+            default:
+                $targetNode = $this->document->createTextNode($value);
+                $pi->parentNode->insertBefore($targetNode, $pi);
         }
 
         return true;
@@ -396,7 +394,7 @@ class DOMTemplateProcessor
 
         if (isset($params['include'])) {
             $filename = $params['include'];
-            $source = file_get_contents(__DIR__."/".$filename);
+            $source = file_get_contents(__DIR__ . "/" . $filename);
 
             $targetNode = $this->document->createDocumentFragment();
             $targetNode->appendXML($source);
@@ -407,9 +405,9 @@ class DOMTemplateProcessor
 
         reset($array);
         if ($count = count($array)) {
-            $i=0;
-            while ($i<$count) {
-            //do {
+            $i = 0;
+            while ($i < $count) {
+                //do {
                 $itemNode = $targetNode->cloneNode(true);
                 $itemData = current($array);
                 if (isset($params['source'])) {
@@ -421,9 +419,9 @@ class DOMTemplateProcessor
 
                 @next($array);
                 $i++;
-            /*} while (
-                @next($array) !== false
-            );*/
+                /*} while (
+                    @next($array) !== false
+                );*/
             }
         }
         // Remove targetNode (row template)
@@ -453,7 +451,7 @@ class DOMTemplateProcessor
         return true;
     }
 
-    protected function mergeObjectProperties($targetNode, $object, $params, $oname=false)
+    protected function mergeObjectProperties($targetNode, $object, $params, $oname = false)
     {
         foreach ($object as $pname => $pvalue) {
             if ($oname) {
@@ -474,12 +472,12 @@ class DOMTemplateProcessor
     protected function mergeObjectProperty($targetNode, $value, $params, $name)
     {
         $elements = $this->query("descendant-or-self::*[@name='$name']", $targetNode);
-        for ($i=0, $l=$elements->length; $i<$l; $i++) {
+        for ($i = 0, $l = $elements->length; $i < $l; $i++) {
             $element = $elements->item($i);
             switch (strtolower($element->nodeName)) {
                 // Form Input
                 case 'input':
-                    switch($element->getAttribute('type')) {
+                    switch ($element->getAttribute('type')) {
                         case 'checkbox':
                             if (is_bool($value)) {
                                 if ($value) {
@@ -494,7 +492,7 @@ class DOMTemplateProcessor
                                     $element->removeAttribute('checked');
                                 }
                             }
-                            
+
                             break;
 
                         case 'radio':
@@ -513,7 +511,7 @@ class DOMTemplateProcessor
                 // Select
                 case 'select':
                     $value = $this->quote($value);
-                    if ($option = $this->query(".//option[@value=".$value."]", $element)->item(0)) {
+                    if ($option = $this->query(".//option[@value=" . $value . "]", $element)->item(0)) {
                         $option->setAttribute('selected', 'true');
                         if ($optGroup = $this->query("parent::optgroup", $option)->item(0)) {
                             $optGroup->removeAttribute('disabled');
@@ -532,13 +530,13 @@ class DOMTemplateProcessor
     /**
      * Merge a boolean
      * @param DOMNode $pi
-     * @param string  $instr
+     * @param string $instr
      * @param boolean $bool
-     * 
+     *
      * @return bool
      */
     protected function mergeBool($pi, $instr, $bool)
-    { 
+    {
         $params = $instr->params;
         if (isset($params['include'])) {
             $res = $params['include'];
@@ -574,9 +572,9 @@ class DOMTemplateProcessor
     /**
      * Merge a node
      * @param DOMNode $pi
-     * @param string  $instr
+     * @param string $instr
      * @param DOMNode $DOMNode
-     * 
+     *
      * @return bool
      */
     public function mergeNode($pi, $instr, $DOMNode)
@@ -589,7 +587,7 @@ class DOMTemplateProcessor
     /* ------------------------------------------------------------------------
         Data sources management
     ------------------------------------------------------------------------ */
-    protected function &getData($instr, $source=null)
+    protected function &getData($instr, $source = null)
     {
         //var_dump("getData");
         //var_dump($instr);
@@ -601,7 +599,7 @@ class DOMTemplateProcessor
 
         // First step defines source
         $type = $steps[0][0];
-        switch($type) {
+        switch ($type) {
             case 'arg':
                 $value = &$source;
                 break;
@@ -630,7 +628,7 @@ class DOMTemplateProcessor
                 break;
         }
 
-        for ($i=1, $l=count($steps); $i<$l; $i++) {
+        for ($i = 1, $l = count($steps); $i < $l; $i++) {
             $value = &$this->stepData($steps[$i], $value);
         }
 
@@ -643,29 +641,29 @@ class DOMTemplateProcessor
         //var_dump($step);
         //var_dump("from " . gettype($source));
         $value = null;
-        switch($step[0]) {
-        case 'func':
-            $value = &$this->stepFunc($step[1], $step[2], $source);
-            break;
-
-        case 'offset':
-            $key = &$this->getParamValue($step[1], $source);
-            if (is_array($source) && isset($source[$key])) {
-                $value = &$source[$key];
-            }
-            break;
+        switch ($step[0]) {
+            case 'func':
+                $value = &$this->stepFunc($step[1], $step[2], $source);
+                break;
 
-        case 'prop':
-            if (isset($source->{$step[1]})) {
-                $value = &$source->{$step[1]};
-            }
-            break;
+            case 'offset':
+                $key = &$this->getParamValue($step[1], $source);
+                if (is_array($source) && isset($source[$key])) {
+                    $value = &$source[$key];
+                }
+                break;
+
+            case 'prop':
+                if (isset($source->{$step[1]})) {
+                    $value = &$source->{$step[1]};
+                }
+                break;
         }
-        
+
         return $value;
     }
 
-    protected function &stepFunc($name, $params=array(), $source=null)
+    protected function &stepFunc($name, $params = array(), $source = null)
     {
         $value = null;
         foreach ($params as $i => $param) {
@@ -678,7 +676,7 @@ class DOMTemplateProcessor
             return $value;
         }
         //var_dump($params);
-        switch($name) {
+        switch ($name) {
             // Callback functions
             case 'func':
                 $func = $params[0];
@@ -716,7 +714,7 @@ class DOMTemplateProcessor
                 break;
             case 'pos':
                 $pos = null;
-                foreach ((array) $source as $key => $value) {
+                foreach ((array)$source as $key => $value) {
                     $pos++;
                     if ($key == @key($source)) {
                         break;
@@ -727,7 +725,7 @@ class DOMTemplateProcessor
                 }
                 break;
             case 'islast':
-                $value = ((@key($source)+1) == @count($source));
+                $value = ((@key($source) + 1) == @count($source));
                 break;
             case 'slice':
                 $value = @array_slice($source, $params[0], $params[1]);
@@ -796,7 +794,7 @@ class DOMTemplateProcessor
                 $value = @strval($source);
                 break;
             case 'bool':
-                $value = @(bool) $source;
+                $value = @(bool)$source;
                 break;
             case 'array':
                 if (!is_array($source)) {
@@ -857,7 +855,7 @@ class DOMTemplateProcessor
                 $value = (strrpos($source, $params[0]) === (strlen($source) - strlen($params[0]) + 1));
                 break;
             case 'bit':
-                $value = ($source & (int) $params[0]) > 0;
+                $value = ($source & (int)$params[0]) > 0;
                 break;
 
             case 'then':
@@ -882,7 +880,7 @@ class DOMTemplateProcessor
                 $value = @sprintf($params[0], $source);
                 break;
             case 'match':
-                $value = (bool) @preg_match($params[0], $source);
+                $value = (bool)@preg_match($params[0], $source);
                 break;
             case 'upper':
                 $value = @strtoupper($source);
@@ -989,7 +987,7 @@ class DOMTemplateProcessor
         return $value;
     }
 
-    protected function &getParamValue($param, $source=null)
+    protected function &getParamValue($param, $source = null)
     {
         if ($param[0] == "'" || $param[0] == '"') {
             $value = substr($param, 1, -1);
@@ -999,14 +997,14 @@ class DOMTemplateProcessor
             $instr = $this->parse($param);
             $value = &$this->getData($instr, $source);
         }
-        
+
         return $value;
     }
 
     /* ------------------------------------------------------------------------
         Merge instructions parser
     ------------------------------------------------------------------------ */
-    protected function parse($instructionString, $sep=" ")
+    protected function parse($instructionString, $sep = " ")
     {
         $args = $this->explode(trim($instructionString), $sep);
 
@@ -1027,17 +1025,17 @@ class DOMTemplateProcessor
         foreach ($args as $arg) {
             if (preg_match('#^(?<name>\w+)\s*(=(["\'])(?<value>(?:[^\3\\\\]|\\\\.)*)\3)$#', $arg, $pair)) {
                 $parser->params[$pair['name']] = isset($pair['value']) ? $pair['value'] : null;
-            } elseif ($arg[0]=="@") {
-                $parser->params["attr"]  = substr($arg, 1);
-            } elseif ($arg[0]=="$") {
-                $parser->params["var"]  = substr($arg, 1);
-            } elseif ($arg[0]=="/") {
-                $parser->params["include"]  = substr($arg, 1);
+            } elseif ($arg[0] == "@") {
+                $parser->params["attr"] = substr($arg, 1);
+            } elseif ($arg[0] == "$") {
+                $parser->params["var"] = substr($arg, 1);
+            } elseif ($arg[0] == "/") {
+                $parser->params["include"] = substr($arg, 1);
             } else {
-                $parser->params["source"]  = $arg;
+                $parser->params["source"] = $arg;
             }
         }
-        
+
         return $parser;
     }
 
@@ -1045,9 +1043,9 @@ class DOMTemplateProcessor
     {
         $source = array();
         $steps = $this->tokenize($data);
-        for ($i=0, $l=count($steps); $i<$l; $i++) {
+        for ($i = 0, $l = count($steps); $i < $l; $i++) {
             $step = $steps[$i];
-            switch(true) {
+            switch (true) {
                 case $step == "" :
                 case $step == false :
                     if ($i == 0) {
@@ -1084,14 +1082,14 @@ class DOMTemplateProcessor
                     break;
 
                 default:
-                    if ($i==0) {
+                    if ($i == 0) {
                         $source[] = array('source', $step);
                     } else {
                         $source[] = array('prop', $step);
                     }
             }
         }
-        
+
         return $source;
     }
 
@@ -1100,17 +1098,17 @@ class DOMTemplateProcessor
         $l = strlen($str);
         $o = 0;
         $esc = false;
-        $sq  = false;
-        $dq  = false;
-        $br  = 0;
+        $sq = false;
+        $dq = false;
+        $br = 0;
         $sbr = 0;
         $tok = array();
 
-        for ($i=0; $i<$l; $i++) {
+        for ($i = 0; $i < $l; $i++) {
             // Add token if separator found out of enclosures and brackets
             if ($str[$i] == $sep && !$dq && !$sq && !$br && !$sbr) {
-                $tok[] = trim(substr($str, $o, $i-$o));
-                $o = $i+1;
+                $tok[] = trim(substr($str, $o, $i - $o));
+                $o = $i + 1;
                 continue;
             }
 
@@ -1121,33 +1119,33 @@ class DOMTemplateProcessor
             }
 
             // Special characters that affect parsing
-            switch($str[$i]) {
-            case "'":
-                if (!$sq) $sq = true;
-                else $sq = false;
-                break;
-            case '"':
-                if (!$dq) $dq = true;
-                else $dq = false;
-                break;
-            case '(':
-                if (!$sq && !$dq) $br++;
-                break;
-            case ')':
-                if (!$sq && !$dq) $br--;
-                break;
-            case '[':
-                if (!$sq && !$dq) $sbr++;
-                break;
-            case ']':
-                if (!$sq && !$dq) $sbr--;
-                break;
-            case '\\':
-                $esc = true;
-                break;
+            switch ($str[$i]) {
+                case "'":
+                    if (!$sq) $sq = true;
+                    else $sq = false;
+                    break;
+                case '"':
+                    if (!$dq) $dq = true;
+                    else $dq = false;
+                    break;
+                case '(':
+                    if (!$sq && !$dq) $br++;
+                    break;
+                case ')':
+                    if (!$sq && !$dq) $br--;
+                    break;
+                case '[':
+                    if (!$sq && !$dq) $sbr++;
+                    break;
+                case ']':
+                    if (!$sq && !$dq) $sbr--;
+                    break;
+                case '\\':
+                    $esc = true;
+                    break;
             }
         }
-        $tail = trim(substr($str, $o, $i-$o));
+        $tail = trim(substr($str, $o, $i - $o));
         if ($tail !== "") {
             $tok[] = $tail;
         }
@@ -1164,36 +1162,36 @@ class DOMTemplateProcessor
         $l = strlen($str);
         $o = 0;
         $esc = false;
-        $sq  = false;
-        $dq  = false;
-        $br  = 0;
+        $sq = false;
+        $dq = false;
+        $br = 0;
         $sbr = false;
         $steps = array();
         $step = false;
 
         // Function
-        for ($i=0; $i<$l; $i++) {
+        for ($i = 0; $i < $l; $i++) {
             // Tokenize only of out of enclosures
             if (!$dq && !$sq && !$br) {
                 // Add token if dot found
                 if ($str[$i] == ".") {
-                    $steps[] = trim(substr($str, $o, $i-$o));
-                    $o = $i+1;
+                    $steps[] = trim(substr($str, $o, $i - $o));
+                    $o = $i + 1;
                     continue;
                 }
 
                 // Add token if opening square bracket
                 if ($str[$i] == "[") {
-                    $steps[] = trim(substr($str, $o, $i-$o));
-                    $o = $i+1;
+                    $steps[] = trim(substr($str, $o, $i - $o));
+                    $o = $i + 1;
                     $sbr = true;
                     continue;
                 }
 
                 // Add token enclosed by square brackets
                 if ($str[$i] == "]" && $sbr) {
-                    $steps[] = trim(substr($str, $o-1, $i-$o+2));
-                    $o = $i+1;
+                    $steps[] = trim(substr($str, $o - 1, $i - $o + 2));
+                    $o = $i + 1;
                     $sbr = false;
                     continue;
                 }
@@ -1206,27 +1204,27 @@ class DOMTemplateProcessor
             }
 
             // Special characters that affect parsing
-            switch($str[$i]) {
-            case "'":
-                if (!$sq) $sq = true;
-                else $sq = false;
-                break;
-            case '"':
-                if (!$dq) $dq = true;
-                else $dq = false;
-                break;
-            case '(':
-                if (!$sq && !$dq) $br++;
-                break;
-            case ')':
-                if (!$sq && !$dq) $br--;
-                break;
-            case '\\':
-                $esc = true;
-                break;
+            switch ($str[$i]) {
+                case "'":
+                    if (!$sq) $sq = true;
+                    else $sq = false;
+                    break;
+                case '"':
+                    if (!$dq) $dq = true;
+                    else $dq = false;
+                    break;
+                case '(':
+                    if (!$sq && !$dq) $br++;
+                    break;
+                case ')':
+                    if (!$sq && !$dq) $br--;
+                    break;
+                case '\\':
+                    $esc = true;
+                    break;
             }
         }
-        $tail = trim(substr($str, $o, $i-$o));
+        $tail = trim(substr($str, $o, $i - $o));
         if ($tail !== false)
             $steps[] = $tail;
 
@@ -1235,4 +1233,4 @@ class DOMTemplateProcessor
 
         return $steps;
     }
-}
\ No newline at end of file
+}
diff --git a/modules/export_seda/Purge.php b/modules/export_seda/Purge.php
index 3d8748c4471b35bcabeda0ffc35b062206ba6f22..57fa0aeb7b2fa09d05cc5ee350a37c8ff503569c 100755
--- a/modules/export_seda/Purge.php
+++ b/modules/export_seda/Purge.php
@@ -4,21 +4,47 @@ require_once 'vendor/autoload.php';
 require_once __DIR__.'/RequestSeda.php';
 
 Class Purge{
+    protected $xml;
     public function __construct()
     {
         $this->db = new RequestSeda();
-        $xml = simplexml_load_file(__DIR__.DIRECTORY_SEPARATOR. 'xml' . DIRECTORY_SEPARATOR . "config.xml");
-        $this->deleteData = (string) $xml->CONFIG->deleteData;
+
+        $getXml = false;
+        $path = '';
+        if (file_exists(
+            $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+            . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+            . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+            . DIRECTORY_SEPARATOR . 'config.xml'
+        ))
+        {
+            $path = $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+                . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+                . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+                . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        } else if (file_exists($_SESSION['config']['corepath'] . 'modules' . DIRECTORY_SEPARATOR . 'export_seda'.  DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'config.xml')) {
+            $path = $_SESSION['config']['corepath'] . 'modules' . DIRECTORY_SEPARATOR . 'export_seda'
+                . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        }
+
+        if ($getXml) {
+            $this->xml = simplexml_load_file($path);
+        }
+
+        $this->deleteData = (string) $this->xml->CONFIG->deleteData;
     }
 
-    public function purge($resId) {
+    public function purge($resId)
+    {
         $reply = $this->db->getReply($resId);
         if (!$reply) {
             $_SESSION['error'] = _ERROR_NO_REPLY . $resId;
             return false;
         }
 
-        $tabDir = explode('#',$reply->path);
+        $tabDir = explode('#', $reply->path);
 
         $dir = '';
         for ($i = 0; $i < count($tabDir); $i++) {
@@ -29,16 +55,20 @@ Class Purge{
         $fileName = $docServer->path_template. DIRECTORY_SEPARATOR . $dir . $reply->filename;
         $xml = simplexml_load_file($fileName);
 
-        if ($xml->ReplyCode != "000") {
+        if (strpos($xml->ReplyCode, '000') === false) {
             $_SESSION['error'] = _LETTER_NO_ARCHIVED. $resId;
             return false;
         }
+
         $letter = $this->db->getLetter($resId);
         $message = $this->db->getMessageByReference($xml->MessageRequestIdentifier);
 
         $this->db->deleteUnitIdentifier($resId);
         $this->purgeResource($resId);
-        $this->purgeContact($letter->contact_id);
+
+        if ($letter->contact_id) {
+            $this->purgeContact($letter->contact_id);
+        }
 
         $unitIdentifiers = $this->db->getUnitIdentifierByMessageId($message->message_id);
         if (!$unitIdentifiers) {
@@ -74,4 +104,4 @@ Class Purge{
     {
         \Contact\models\ContactModel::purgeContact(['id' => $contactId]);
     }
-}
\ No newline at end of file
+}
diff --git a/modules/export_seda/RequestSeda.php b/modules/export_seda/RequestSeda.php
old mode 100755
new mode 100644
index 911725901f7c20619299a17101266b80f3ce2677..458e75b3202fd74733fda45825b930c328fc98cc
--- a/modules/export_seda/RequestSeda.php
+++ b/modules/export_seda/RequestSeda.php
@@ -25,27 +25,87 @@ require_once "core/class/docservers_controler.php";
 
 class RequestSeda
 {
-	private $db;
+    private $db;
 
-	public function __construct($db = null)
-	{
-	    if ($db) {
-	        $this->db = $db;
+    protected $statement;
+
+    public function __construct($db = null)
+    {
+        $this->statement = [];
+        if ($db) {
+            $this->db = $db;
         } else {
             $this->db = new Database();
         }
-	}
 
-	public function getMessageByReference($reference)
+        $query = "SELECT * FROM message_exchange WHERE reference = ?";
+        $this->statement['getMessageByReference'] = $this->db->prepare($query);
+
+        $query = "SELECT status FROM res_letterbox WHERE res_id = ?";
+        $this->statement['getStatusLetter'] = $this->db->prepare($query);
+
+        $query = "SELECT destination FROM res_letterbox WHERE res_id = ?";
+        $this->statement['getDestinationLetter'] = $this->db->prepare($query);
+
+        $query = "SELECT res_id, contact_id, filename, docserver_id, path, creation_date, modification_date, type_id, doc_date, admission_date, creation_date, exp_contact_id, dest_contact_id, destination, nature_id, type_label, alt_identifier, subject, title
+                  FROM res_view_letterbox
+                  WHERE res_id = ?";
+        $this->statement['getLetter'] = $this->db->prepare($query);
+
+        $query = "SELECT * FROM entities WHERE entity_id = ?";
+        $this->statement['getEntity'] = $this->db->prepare($query);
+
+        $query = "SELECT * FROM notes WHERE identifier = ?";
+        $this->statement['getNotes'] = $this->db->prepare($query);
+
+        $query = "SELECT * FROM sendmail WHERE res_id = ?";
+        $this->statement['getMails'] = $this->db->prepare($query);
+
+        $query = "SELECT * FROM doctypes WHERE type_id = ?";
+        $this->statement['getDocTypes'] = $this->db->prepare($query);
+
+        $query = "SELECT * FROM unit_identifier WHERE res_id = ?";
+        $this->statement['getUnitIdentifierByResId'] = $this->db->prepare($query);
+
+        $query =
+            "SELECT res_parent,res_child 
+            FROM res_linked 
+            WHERE coll_id = 'letterbox_coll' 
+            AND  (res_child = ? OR res_parent = ?)";
+        $this->statement['getLinks'] = $this->db->prepare($query);
+
+        $query = "SELECT * FROM contacts_v2 WHERE contact_id = ?";
+        $this->statement['getContact'] = $this->db->prepare($query);
+
+        $query = "SELECT * FROM docservers WHERE docserver_id = ?";
+        $this->statement['getDocServer'] = $this->db->prepare($query);
+
+        $query = "SELECT * FROM res_attachments WHERE res_id_master = ? AND status != 'DEL'";
+        $this->statement['getAttachments'] = $this->db->prepare($query);
+
+        $query = "SELECT * FROM history WHERE table_name = ? and record_id = ?";
+        $this->statement['getHistory'] = $this->db->prepare($query);
+
+        $query = "INSERT INTO unit_identifier VALUES (?,?,?,?)";
+        $this->statement['insertUnitIdentifier'] = $this->db->prepare($query);
+
+        $query = "DELETE FROM message_exchange WHERE message_id = ?";
+        $this->statement['deleteMessage'] = $this->db->prepare($query);
+
+        $query = "DELETE FROM unit_identifier WHERE res_id = ?";
+        $this->statement['deleteUnitIdentifier'] = $this->db->prepare($query);
+    }
+
+    public function getMessageByReference($reference)
     {
         $queryParams = [];
 
         $queryParams[] = $reference;
 
-        $query = "SELECT * FROM seda WHERE reference = ?";
+        $query = "SELECT * FROM message_exchange WHERE reference = ?";
+
+        $smtp = $this->db->query($query, $queryParams);
 
-        $smtp = $this->db->query($query,$queryParams);
-        
         $message = $smtp->fetchObject();
 
         return $message;
@@ -57,9 +117,9 @@ class RequestSeda
 
         $queryParams[] = $id;
 
-        $query = "SELECT * FROM seda WHERE message_id = ?";
+        $query = "SELECT * FROM message_exchange WHERE message_id = ?";
 
-        $smtp = $this->db->query($query,$queryParams);
+        $smtp = $this->db->query($query, $queryParams);
 
         $message = $smtp->fetchObject();
 
@@ -72,9 +132,9 @@ class RequestSeda
 
         $queryParams[] = $messageId;
 
-        $query = "SELECT res_id FROM unit_identifier WHERE message_id = ?";
+        $query = "SELECT * FROM unit_identifier WHERE message_id = ?";
 
-        $smtp = $this->db->query($query,$queryParams);
+        $smtp = $this->db->query($query, $queryParams);
         
         $unitIdentifier = [];
         while ($res = $smtp->fetchObject()) {
@@ -84,20 +144,18 @@ class RequestSeda
         return $unitIdentifier;
     }
 
-	public function getUnitIdentifierByResId($resId)
-	{
-		$queryParams = [];
+    public function getUnitIdentifierByResId($resId)
+    {
+        $queryParams = [];
 
-		$queryParams[] = $resId;
+        $queryParams[] = $resId;
 
-		$query = "SELECT * FROM unit_identifier WHERE res_id = ?";
+        $this->statement['getUnitIdentifierByResId']->execute($queryParams);
 
-		$smtp = $this->db->query($query,$queryParams);
-		
-		$unitIdentifier = $res = $smtp->fetchObject();
+        $unitIdentifier = $res = $this->statement['getUnitIdentifierByResId']->fetchObject();
 
-		return $unitIdentifier;
-	}
+        return $unitIdentifier;
+    }
 
     public function getLetter($resId)
     {
@@ -105,15 +163,59 @@ class RequestSeda
 
         $queryParams[] = $resId;
 
-        $query = "SELECT * FROM res_view_letterbox WHERE res_id = ?";
-
-        $smtp = $this->db->query($query,$queryParams);
+        $this->statement['getLetter']->execute($queryParams);
 
-        $letterbox = $smtp->fetchObject();
+        $letterbox = $this->statement['getLetter']->fetchObject();
 
         return $letterbox;
     }
 
+    public function getStatusLetter($resId)
+    {
+        $queryParams = [];
+
+        $queryParams[] = $resId;
+
+        $this->statement['getStatusLetter']->execute($queryParams);
+
+        $res = $this->statement['getStatusLetter']->fetchObject();
+
+        return $res->status;
+    }
+
+    public function getDestinationLetter($resId)
+    {
+        $queryParams = [];
+
+        $queryParams[] = $resId;
+
+        $this->statement['getDestinationLetter']->execute($queryParams);
+
+        $res = $this->statement['getDestinationLetter']->fetchObject();
+
+        return $res->destination;
+    }
+
+    public function getLinks($resId)
+    {
+        $queryParams = [];
+
+        $queryParams[] = $resId;
+        $queryParams[] = $resId;
+
+        $this->statement['getLinks']->execute($queryParams);
+        $links = [];
+        while ($res = $this->statement['getLinks']->fetchObject()) {
+            if ($resId == $res->res_parent) {
+                $links[] = $res->res_child;
+            } else {
+                $links[] = $res->res_parent;
+            }
+        }
+
+        return $links;
+    }
+
     public function getLettersByStatus($status)
     {
         $queryParams = [];
@@ -122,7 +224,7 @@ class RequestSeda
 
         $query = "SELECT * FROM res_letterbox WHERE status = ?";
 
-        $smtp = $this->db->query($query,$queryParams);
+        $smtp = $this->db->query($query, $queryParams);
 
         $letters = [];
         while ($res = $smtp->fetchObject()) {
@@ -132,167 +234,270 @@ class RequestSeda
         return $letters;
     }
 
-	public function getDocTypes($typeId)
-	{
-		$queryParams = [];
+    public function getDocTypes($typeId)
+    {
+        $queryParams = [];
 
-		$queryParams[] = $typeId;
+        $queryParams[] = $typeId;
 
-		$query = "SELECT * FROM doctypes WHERE type_id = ?";
+        $this->statement['getDocTypes']->execute($queryParams);
 
-		$smtp = $this->db->query($query,$queryParams);
-		
-		$docTypes = $smtp->fetchObject();
+        $docTypes = $this->statement['getDocTypes']->fetchObject();
 
-		return $docTypes;
-	}
+        return $docTypes;
+    }
 
-	public function getUserInformation($userId) 
-	{
-		$queryParams = [];
+    public function getUserInformation($userId)
+    {
+        $queryParams = [];
+
+        $queryParams[] = $userId;
 
-		$queryParams[] = $userId;
+        $query = "SELECT * FROM users WHERE user_id = ?";
 
-		$query = "SELECT * FROM users WHERE user_id = ?";
+        $smtp = $this->db->query($query, $queryParams);
 
-		$smtp = $this->db->query($query,$queryParams);
-		
-		$user = $smtp->fetchObject();
+        $user = $smtp->fetchObject();
+
+        return $user;
+    }
 
-		return $user;
-	}
+    public function getNotes($letterboxId)
+    {
+        $queryParams = [];
 
-	public function getNotes($letterboxId) 
-	{
-		$queryParams = [];
+        $queryParams[] = $letterboxId;
 
-		$queryParams[] = $letterboxId;
+        $this->statement['getNotes']->execute($queryParams);
 
-		$query = "SELECT * FROM notes WHERE identifier = ?";
+        $notes = [];
+        while ($res = $this->statement['getEntity']->fetchObject()) {
+            $notes[] = $res;
+        }
 
-		$smtp = $this->db->query($query,$queryParams);
+        return $notes;
+    }
+
+    public function getMails($letterboxId)
+    {
+        $queryParams = [];
+
+        $queryParams[] = $letterboxId;
+
+        $this->statement['getMails']->execute($queryParams);
+
+        $mails = [];
+        while ($res = $this->statement['getMails']->fetchObject()) {
+            $mails[] = $res;
+        }
 
-		$notes = [];
-		while ($res = $smtp->fetchObject()) {
-			$notes[] = $res;
-		}
+        return $mails;
+    }
 
-		return $notes;
-	}
+    public function getEntity($entityId)
+    {
+        $queryParams = [];
 
-	public function getEntitie($entityId)
-	{
-		$queryParams = [];
+        $queryParams[] = $entityId;
 
-		$queryParams[] = $entityId;
+        $this->statement['getEntity']->execute($queryParams);
 
-		$query = "SELECT * FROM entities WHERE entity_id = ?";
+        $entity = $this->statement['getEntity']->fetchObject();
 
-		$smtp = $this->db->query($query,$queryParams);
-		
-		$entitie = $smtp->fetchObject();
+        return $entity;
+    }
 
-		return $entitie;
-	}
+    public function getContact($contactId)
+    {
+        $queryParams = [];
 
-	public function getContact($contactId)
-	{
-		$queryParams = [];
+        $queryParams[] = $contactId;
 
-		$queryParams[] = $contactId;
+        $this->statement['getContact']->execute($queryParams);
 
-		$query = "SELECT * FROM contacts_v2 WHERE contact_id = ?";
+        $contact = $this->statement['getContact']->fetchObject();
 
-		$smtp = $this->db->query($query,$queryParams);
-		
-		$contact = $smtp->fetchObject();
+        return $contact;
+    }
 
-		return $contact;
-	}
+    public function getDocServer($docServerId)
+    {
+        $queryParams = [];
 
-	public function getDocServer($docServerId)
-	{
-		$queryParams = [];
+        $queryParams[] = $docServerId;
 
-		$queryParams[] = $docServerId;
+        $this->statement['getDocServer']->execute($queryParams);
 
-		$query = "SELECT * FROM docservers WHERE docserver_id = ?";
+        $docServers = $this->statement['getDocServer']->fetchObject();
 
-		$smtp = $this->db->query($query,$queryParams);
-		
-		$docServers = $smtp->fetchObject();
+        return $docServers;
+    }
 
-		return $docServers;
-	}
+    public function getAttachments($resIdMaster)
+    {
+        $queryParams = [];
 
-	public function getAttachments($resIdMaster)
-	{
-		$queryParams = [];
+        $queryParams[] = $resIdMaster;
 
-		$queryParams[] = $resIdMaster;
+        $this->statement['getAttachments']->execute($queryParams);
 
-		$query = "SELECT * FROM res_attachments WHERE res_id_master = ? AND status != 'DEL'";
+        $attachments = [];
+        while ($res = $this->statement['getAttachments']->fetchObject()) {
+            $attachments[] = $res;
+        }
 
-		$smtp = $this->db->query($query,$queryParams);
-		
-		while ($res = $smtp->fetchObject()) {
-			$attachments[] = $res;
-		}
+        return $attachments;
+    }
 
-		return $attachments;
-	}
+    public function getUseContact($orgIdentifier)
+    {
+        $queryParams = [];
 
-	public function getUseContact($orgIdentifier)
-	{
-		$queryParams = [];
+        $queryParams[] = $orgIdentifier;
+        $queryParams[] = $orgIdentifier;
 
-		$queryParams[] = $orgIdentifier;
-		$queryParams[] = $orgIdentifier;
+        $query = "SELECT COUNT(*) FROM message_exchange WHERE sender_org_identifier = ? OR recipient_org_identifier = ?";
 
-		$query = "SELECT COUNT(*) FROM seda WHERE sender_org_identifier = ? OR recipient_org_identifier = ?";
+        $smtp = $this->db->query($query, $queryParams);
 
-		$smtp = $this->db->query($query,$queryParams);
-		
-		$res = $smtp->fetchObject();
+        $res = $smtp->fetchObject();
 
-		return $res;
-	}
+        return $res;
+    }
 
-	public function getAcknowledgement($resIdMaster) {
+    public function getAcknowledgement($resIdMaster)
+    {
         $queryParams = [];
 
         $queryParams[] = $resIdMaster;
 
         $query = "SELECT * FROM res_attachments WHERE res_id_master = ? and type_id = 1 and status != 'DEL'";
 
-        $smtp = $this->db->query($query,$queryParams);
+        $smtp = $this->db->query($query, $queryParams);
 
         $res = $smtp->fetchObject();
 
         return $res;
     }
 
-    public function getReply($resIdMaster) {
+    public function getReply($resIdMaster)
+    {
         $queryParams = [];
 
         $queryParams[] = $resIdMaster;
 
         $query = "SELECT * FROM res_attachments WHERE res_id_master = ? and type_id = 2 and status != 'DEL'";
 
-        $smtp = $this->db->query($query,$queryParams);
+        $smtp = $this->db->query($query, $queryParams);
 
         $res = $smtp->fetchObject();
 
         return $res;
     }
 
-	public function insertMessage($messageObject, $type)
-	{
-		$queryParams = [];
-		$messageId = uniqid();
+    public function getHistory($tableName, $recordId)
+    {
+        $queryParams = [];
+
+        $queryParams[] = $tableName;
+        $queryParams[] = $recordId;
+
+        $this->statement['getHistory']->execute($queryParams);
+
+        $history = [];
+        while ($res = $this->statement['getHistory']->fetchObject()) {
+            $history[] = $res;
+        }
+
+        return $history;
+    }
+
+    /*** Generates a local unique identifier
+    @return string The unique id*/
+    public function generateUniqueId()
+    {
+        $parts = explode('.', microtime(true));
+        $sec   = $parts[0];
+        if (!isset($parts[1])) {
+            $msec = 0;
+        } else {
+            $msec = $parts[1];
+        }
+        $uniqueId = str_pad(base_convert($sec, 10, 36), 6, '0', STR_PAD_LEFT) . str_pad(base_convert($msec, 10, 16), 4, '0', STR_PAD_LEFT);
+        $uniqueId .= str_pad(base_convert(mt_rand(), 10, 36), 6, '0', STR_PAD_LEFT);
+
+        return $uniqueId;
+    }
+
+
+    public function insertMessage($messageObject, $type, $aArgs = [])
+    {
+        $queryParams = [];
+
+        if (empty($messageObject->messageId)) {
+            $messageObject->messageId = $this->generateUniqueId();
+        }
+
+        if (empty($aArgs['status'])) {
+            $status = "sent";
+        } else {
+            $status = $aArgs['status'];
+        }
+
+        if (empty($aArgs['fullMessageObject'])) {
+            $messageObjectToSave = $messageObject;
+        } else {
+            $messageObjectToSave = $aArgs['fullMessageObject'];
+        }
+
+        if (empty($aArgs['resIdMaster'])) {
+            $resIdMaster = null;
+        } else {
+            $resIdMaster = $aArgs['resIdMaster'];
+        }
+
+        if (empty($aArgs['filePath'])) {
+            $filePath = null;
+        } else {
+            $filePath = $aArgs['filePath'];
+            $pathInfo = pathinfo($filePath);
+            $filesize = filesize($filePath);
+
+            //Store resource on docserver
+            $aFileInfo = [
+                'collId' => 'archive_transfer_coll',
+                'fileInfos' =>
+                    [
+                        'tmpDir'        => $_SESSION['config']['tmppath'],
+                        'size'          => $filesize,
+                        'format'        => $pathInfo['extension'],
+                        'tmpFileName'   => $pathInfo['basename'],
+                    ]
+            ];
+
+            $ds          =  new docservers_controler();
+            $storeResult = $ds->storeResourceOnDocserver('archive_transfer_coll', $aFileInfo);
+            if(!empty($storeResult['error'])){
+                var_dump($storeResult['error']);
+            }
+            $docserver_id = $storeResult['docserver_id'];
+            $filepath     = $storeResult['destination_dir'];
+            $filename     = $storeResult['file_destination_name'];
+            $docserver     = \Docserver\models\DocserverModel::getById(['id' => $docserver_id]);
+
+            $docserverType = \Docserver\models\DocserverTypeModel::getById(
+                ['id' => $docserver[0]['docserver_type_id']]
+            );
+
+            $fingerprint = \SrcCore\controllers\StoreController::getFingerPrint([
+                'filePath'              => $filePath,
+                'mode'                  => $docserverType[0]['fingerprint_mode'],
+            ]);
 
-		try {
-			$query = ("INSERT INTO seda (
+        }
+
+        try {
+            $query = ("INSERT INTO message_exchange (
 				message_id,
 				schema,
 				type,
@@ -309,40 +514,53 @@ class RequestSeda
 				size,
 				data,
 				active,
-				archived)
-				VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
-
-			$queryParams[] = $messageId; // Message Id
-			$queryParams[] = "2.1"; //Schema
-			$queryParams[] = $type; // Type
-			$queryParams[] = "sent"; // Status
-			$queryParams[] = $messageObject->date; // Date
-			$queryParams[] = $messageObject->messageIdentifier->value; // Reference
-			$queryParams[] = $_SESSION['user']['UserId']; // Account Id
-			$queryParams[] = $messageObject->transferringAgency->identifier->value; // Sender org identifier id
-			$queryParams[] = ""; //SenderOrgNAme
-			$queryParams[] = $messageObject->archivalAgency->identifier->value; // Recipient org identifier id
-			$queryParams[] = ""; //RecipientOrgNAme
-			$queryParams[] = $messageObject->archivalAgreement->value; // Archival agreement reference
-			$queryParams[] = $messageObject->replyCode->value; //ReplyCode
-			$queryParams[] = 0; // size
-			$queryParams[] = json_encode($messageObject);//$messageObject; // Data
-			$queryParams[] = 1; // active
-			$queryParams[] = 0; // archived
-
-			$res = $this->db->query($query,$queryParams);
-
-		} catch (Exception $e) {
-			return false;
-		}
-
-		return $messageId;
-	}
-
-	public function insertAttachment($data,$type) {
+				archived,
+                res_id_master,
+                docserver_id,
+                path,
+                filename,
+                fingerprint,
+                filesize)
+				VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
+
+            $queryParams[] = $messageObject->messageId; // Message Id
+            $queryParams[] = "2.1"; //Schema
+            $queryParams[] = $type; // Type
+            $queryParams[] = $status; // Status
+            $queryParams[] = $messageObject->date; // Date
+            $queryParams[] = $messageObject->MessageIdentifier->value; // Reference
+            $queryParams[] = $_SESSION['user']['UserId']; // Account Id
+            $queryParams[] = $messageObject->TransferringAgency->Identifier->value; // Sender org identifier id
+            $queryParams[] = $aArgs['SenderOrgNAme']; //SenderOrgNAme
+            $queryParams[] = $messageObject->ArchivalAgency->Identifier->value; // Recipient org identifier id
+            $queryParams[] = $aArgs['RecipientOrgNAme']; //RecipientOrgNAme
+            $queryParams[] = $messageObject->ArchivalAgreement->value; // Archival agreement reference
+            $queryParams[] = $messageObject->ReplyCode; //ReplyCode
+            $queryParams[] = 0; // size
+            $queryParams[] = json_encode($messageObjectToSave);//$messageObject; // Data
+            $queryParams[] = 1; // active
+            $queryParams[] = 0; // archived
+            $queryParams[] = $resIdMaster; // res_id_master
+            $queryParams[] = $docserver_id;
+            $queryParams[] = $filepath;
+            $queryParams[] = $filename;
+            $queryParams[] = $fingerprint['fingerprint'];
+            $queryParams[] = $filesize;
+
+            $res = $this->db->query($query, $queryParams);
+
+        } catch (Exception $e) {
+            return false;
+        }
+
+        return $messageObject->messageId;
+    }
+
+    public function insertAttachment($data, $type)
+    {
         $docserverControler = new docservers_controler();
 
-	    $fileInfos = array(
+        $fileInfos = array(
             "tmpDir"      => $data->tmpDir,
             "size"        => $data->size,
             "format"      => $data->format,
@@ -352,7 +570,8 @@ class RequestSeda
         $storeResult = array();
 
         $storeResult = $docserverControler->storeResourceOnDocserver(
-            $_SESSION['collection_id_choice'], $fileInfos
+            $_SESSION['collection_id_choice'],
+            $fileInfos
         );
 
         if (isset($storeResult['error']) && $storeResult['error'] <> '') {
@@ -510,33 +729,52 @@ class RequestSeda
         return true;
     }
 
-	public function insertUnitIdentifier($messageId, $tableName, $resId) 
-	{
-		try {
-			$query = ("INSERT INTO unit_identifier VALUES (?,?,?)");
-			$queryParams = [];
+    public function insertUnitIdentifier($messageId, $tableName, $resId, $disposition = "")
+    {
+        try {
+            $queryParams = [];
 
-			$queryParams[] = $messageId;
-			$queryParams[] = $tableName;
-			$queryParams[] = $resId;
+            $queryParams[] = $messageId;
+            $queryParams[] = $tableName;
+            $queryParams[] = $resId;
+            $queryParams[] = $disposition;
 
-			$res = $this->db->query($query,$queryParams);
-		} catch (Exception $e) {
-			return false;
-		}
-		
-		return true;
-	}
+            $this->statement['insertUnitIdentifier']->execute($queryParams);
+        } catch (Exception $e) {
+            return false;
+        }
+
+        return true;
+    }
 
-	public function updateStatusMessage($reference, $status){
+    public function updateDataMessage($reference, $data)
+    {
+
+        $queryParams = [];
+        $queryParams[] = $data;
+        $queryParams[] = $reference;
+
+        try {
+            $query = "UPDATE message_exchange SET data = ? WHERE reference = ?";
+
+            $smtp = $this->db->query($query, $queryParams);
+        } catch (Exception $e) {
+            return false;
+        }
+
+        return true;
+    }
+
+    public function updateStatusMessage($reference, $status)
+    {
         $queryParams = [];
         $queryParams[] = $status;
         $queryParams[] = $reference;
 
         try {
-            $query = "UPDATE seda SET status = ? WHERE reference = ?";
+            $query = "UPDATE message_exchange SET status = ? WHERE reference = ?";
 
-            $smtp = $this->db->query($query,$queryParams);
+            $smtp = $this->db->query($query, $queryParams);
         } catch (Exception $e) {
             return false;
         }
@@ -544,7 +782,8 @@ class RequestSeda
         return true;
     }
 
-	public function updateStatusLetterbox($resId,$status) {
+    public function updateStatusLetterbox($resId, $status)
+    {
         $queryParams = [];
         $queryParams[] = $status;
         $queryParams[] = $resId;
@@ -552,7 +791,7 @@ class RequestSeda
         try {
             $query = "UPDATE res_letterbox SET status = ? WHERE res_id = ?";
 
-            $smtp = $this->db->query($query,$queryParams);
+            $smtp = $this->db->query($query, $queryParams);
         } catch (Exception $e) {
             return false;
         }
@@ -560,7 +799,8 @@ class RequestSeda
         return true;
     }
 
-    public function updateStatusAttachment($resId,$status) {
+    public function updateStatusAttachment($resId, $status)
+    {
         $queryParams = [];
         $queryParams[] = $status;
         $queryParams[] = $resId;
@@ -568,7 +808,7 @@ class RequestSeda
         try {
             $query = "UPDATE res_attachments SET status = ? WHERE res_id_master = ? AND type_id IN (1,2) ";
 
-            $smtp = $this->db->query($query,$queryParams);
+            $smtp = $this->db->query($query, $queryParams);
         } catch (Exception $e) {
             return false;
         }
@@ -576,35 +816,115 @@ class RequestSeda
         return true;
     }
 
-	public function deleteMessage($messageId)
-	{
-		$queryParams = [];
-		$queryParams[] = $messageId;
-		try {
-			$query = "DELETE FROM seda WHERE message_id = ?";
+    public function deleteMessage($messageId)
+    {
+        $queryParams = [];
+        $queryParams[] = $messageId;
+        try {
+            $this->statement['deleteMessage']->execute($queryParams);
+        } catch (Exception $e) {
+            return false;
+        }
 
-			$smtp = $this->db->query($query,$queryParams);
-		} catch (Exception $e) {
-			return false;
-		}
+        return true;
+    }
 
-		return true;
-	}
+    public function deleteUnitIdentifier($resId)
+    {
+        $queryParams = [];
 
-	public function deleteUnitIdentifier($resId)
-	{
-		$queryParams = [];
+        $queryParams[] = $resId;
+        try {
+            $this->statement['deleteUnitIdentifier']->execute($queryParams);
+        } catch (Exception $e) {
+            return false;
+        }
+
+        return true;
+    }
+
+    public function getMessagesByReference($id)
+    {
+        $queryParams = [];
+
+        $queryParams[] = $id;
+
+        $query = "SELECT * FROM message_exchange WHERE reference = ?";
+
+        return $this->db->query($query, $queryParams);
+    }
+
+    public function getMessagesByReferenceByDate($id)
+    {
+        $queryParams = [];
+
+        $queryParams[] = $id;
+
+        $query = "SELECT * FROM message_exchange WHERE reference = ? ORDER BY date asc";
+
+        return $this->db->query($query, $queryParams);
+    }
+
+    public function getMessageByIdentifierAndResId($aArgs = [])
+    {
+        $queryParams = [];
+
+        $query = "SELECT * FROM message_exchange WHERE message_id = ? and res_id_master = ?";
+        $queryParams[] = $aArgs['message_id'];
+        $queryParams[] = $aArgs['res_id_master'];
+
+        $smtp = $this->db->query($query, $queryParams);
+
+        $message = $smtp->fetchObject();
+
+        return $message;
+    }
+
+    public function getEntitiesByBusinessId($businessId) {
+        $queryParams = [];
+
+        $queryParams[] = $businessId;
+
+        $query = "SELECT * FROM entities WHERE business_id = ?";
+
+        $smtp = $this->db->query($query, $queryParams);
+
+        while ($res = $smtp->fetchObject()) {
+            $entities[] = $res;
+        }
+
+        return $entities;
+    }
+    public function updateOperationDateMessage($aArgs = []){
+        $queryParams = [];
+        $queryParams[] = $aArgs['operation_date'];
+        $queryParams[] = $aArgs['message_id'];
+
+        try {
+            $query = "UPDATE message_exchange SET operation_date = ? WHERE message_id = ?";
 
-		$queryParams[] = $resId;
-		try {
-			$query = "DELETE FROM unit_identifier WHERE res_id = ?";
+            $smtp = $this->db->query($query, $queryParams);
+        } catch (Exception $e) {
+            return false;
+        }
+
+        return true;
+    }
 
-			$smtp = $this->db->query($query,$queryParams);
-		} catch (Exception $e) {
-			return false;
-		}
+    public function updateReceptionDateMessage($aArgs = []){
+        $queryParams = [];
+        $queryParams[] = $aArgs['reception_date'];
+        $queryParams[] = $aArgs['message_id'];
 
-		return true;
-	}
+        try {
+            $query = "UPDATE message_exchange SET reception_date = ? WHERE message_id = ?";
+
+            $smtp = $this->db->query($query, $queryParams);
+        } catch (Exception $e) {
+            return false;
+        }
+
+        return true;
+    }
 
-}
\ No newline at end of file
+}
diff --git a/modules/export_seda/Reset.php b/modules/export_seda/Reset.php
old mode 100755
new mode 100644
index 6c29e83a66d05c0f029c269ed5272b7fb1556ec0..93b30d832cb20763b9393ac0712ce03528aaa746
--- a/modules/export_seda/Reset.php
+++ b/modules/export_seda/Reset.php
@@ -20,10 +20,15 @@ Class Reset{
 
         $docServer = $this->db->getDocServer($reply->docserver_id);
         $fileName = $docServer->path_template. DIRECTORY_SEPARATOR . $dir . $reply->filename;
-        $xml = simplexml_load_file($fileName);
 
+        if (!file_exists($fileName)) {
+            $_SESSION['error'] = _ERROR_REPLY_NOT_EXIST . $resId;
+            return;
+        }
+
+        $xml = simplexml_load_file($fileName);
 
-        if ((string) $xml->ReplyCode == "000") {
+        if (strpos($xml->ReplyCode, '000') !== false) {
             $_SESSION['error'] = _ERROR_LETTER_ARCHIVED. $resId;
             return false;
         }
@@ -44,4 +49,4 @@ Class Reset{
 
         return $resId;
     }
-}
\ No newline at end of file
+}
diff --git a/modules/export_seda/Transfer.php b/modules/export_seda/Transfer.php
old mode 100755
new mode 100644
index bea51c1199e6a5423d022f9ead1a973d71cdf318..e8a94e52936c5857c90818b00498a9ab02f187d1
--- a/modules/export_seda/Transfer.php
+++ b/modules/export_seda/Transfer.php
@@ -3,7 +3,30 @@
 require_once __DIR__ . '/AdapterMaarchRM.php';
 require_once __DIR__ . '/AdapterMaarchCourrier.php';
 class Transfer{
-    public function __construct(){}
+    public function __construct(){
+        $getXml = false;
+        $path = '';
+        if (file_exists(
+            $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+            . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+            . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+            . DIRECTORY_SEPARATOR . 'config.xml'
+        )) {
+            $path = $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+                . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+                . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+                . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        } else if (file_exists($_SESSION['config']['corepath'] . 'modules' . DIRECTORY_SEPARATOR . 'export_seda'.  DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'config.xml')) {
+            $path = $_SESSION['config']['corepath'] . 'modules' . DIRECTORY_SEPARATOR . 'export_seda'
+                . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        }
+
+        if ($getXml) {
+            $this->xml = simplexml_load_file($path);
+        }
+    }
 
     public function transfer($target, $reference, $communicationType = 'url') {
         $adapter = '';
@@ -12,11 +35,12 @@ class Transfer{
 
         if ($target == 'maarchrm') {
             $adapter = new AdapterMaarchRM();
-        } elseif ($target == 'maarchcourrier' ) {
+        } elseif ($target == 'maarchcourrier') {
             $adapter = new AdapterMaarchCourrier();
         } else {
-            $_SESSION['error'] = _UNKNOWN_TARGET;
-            return false;
+            $res['status'] = 0;
+            $res['content'] = _UNKNOWN_TARGET;
+            return $res;
         }
 
         $param = $adapter->getInformations($reference); // [0] = url, [1] = header, [2] = cookie, [3] = data
@@ -30,13 +54,46 @@ class Transfer{
             curl_setopt($curl, CURLOPT_HTTPHEADER, $param[1]);
             curl_setopt($curl, CURLOPT_COOKIE, $param[2]);
             curl_setopt($curl, CURLOPT_POSTFIELDS, $param[3]);
+            curl_setopt($curl, CURLOPT_FAILONERROR, true);
+
+            if (empty($this->xml->CONFIG->certificateSSL)) {
+                curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
+            } else {
+                curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
+                curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
+
+                $certificateSSL = $this->xml->CONFIG->certificateSSL;
+                if (is_file($certificateSSL)) {
+                    $ext = ['.crt','.pem'];
+
+                    $filenameExt = strrchr($certificateSSL, '.');
+                    if (in_array($filenameExt, $ext)) {
+                        curl_setopt($curl, CURLOPT_CAINFO, $certificateSSL);
+                    } else {
+                        $res['status'] = 1;
+                        $res['content'] = _ERROR_EXTENSION_CERTIFICATE;
+                        return $res;
+                    }
+                } elseif (is_dir($certificateSSL)) {
+                    curl_setopt($curl, CURLOPT_CAPATH, $certificateSSL);
+                } else {
+                    $res['status'] = 1;
+                    $res['content'] = _ERROR_UNKNOW_CERTIFICATE;
+                    return $res;
+                }
+            }
 
             $exec = curl_exec($curl);
             $data = json_decode($exec);
 
             if (!$data) {
                 $res['status'] = 1;
-                $res['content'] = curl_error($curl);
+                if (curl_error($curl)) {
+                    $res['content'] = curl_error($curl);
+                } else {
+                    $res['content'] = $exec;
+                }
+
             } else {
                 $res['content'] = $data;
             }
@@ -48,4 +105,4 @@ class Transfer{
 
         return $res;
     }
-}
\ No newline at end of file
+}
diff --git a/modules/export_seda/batch/BatchPurge.php b/modules/export_seda/batch/BatchPurge.php
new file mode 100644
index 0000000000000000000000000000000000000000..29e32434642f2f72913c17eee537448435372939
--- /dev/null
+++ b/modules/export_seda/batch/BatchPurge.php
@@ -0,0 +1,84 @@
+<?php
+$batchPurge = new BatchPurge();
+
+require_once __DIR__ . '/../RequestSeda.php';
+require_once __DIR__ . '/../class/AbstractMessage.php';
+require_once __DIR__ . '/../Purge.php';
+
+$batchPurge->purge();
+
+Class BatchPurge {
+    protected $db;
+
+    public function __construct()
+    {
+        $this->initSession();
+    }
+
+    private function initSession()
+    {
+        try {
+            include('Maarch_CLITools/ArgsParser.php');;
+        } catch (IncludeFileError $e) {
+            echo 'Maarch_CLITools required ! \n (pear.maarch.org)\n';
+            exit(106);
+        }
+
+        // Defines scripts arguments
+        $argsparser = new ArgsParser();
+        // The config file
+        $argsparser->add_arg(
+            'config',
+            array(
+                'short' => 'c',
+                'long' => 'config',
+                'mandatory' => true,
+                'help' => 'Config file path is mandatory.',
+            )
+        );
+
+        $options = $argsparser->parse_args($GLOBALS['argv']);
+        // If option = help then options = false and the script continues ...
+        if ($options == false) {
+            exit(0);
+        }
+
+        $txt = '';
+        foreach (array_keys($options) as $key) {
+            if (isset($options[$key]) && $options[$key] == false) {
+                $txt .= $key . '=false,';
+            } else {
+                $txt .= $key . '=' . $options[$key] . ',';
+            }
+        }
+
+        $xml = simplexml_load_file($options['config']);
+
+        $_SESSION['config']['lang'] = $xml->CONFIG->Lang;
+        $_SESSION['config']['corepath'] = $xml->CONFIG->MaarchDirectory;
+        $_SESSION['config']['custom_override_id'] = $xml->CONFIG->CustomId;
+        $_SESSION['config']['app_id'] = $xml->CONFIG->MaarchApps;
+
+        $_SESSION['config']['databaseserver'] = $xml->CONFIG_BASE->databaseserver;
+        $_SESSION['config']['databaseserverport'] = $xml->CONFIG_BASE->databaseserverport;
+        $_SESSION['config']['databaseuser'] = $xml->CONFIG_BASE->databaseuser;
+        $_SESSION['config']['databasepassword'] = $xml->CONFIG_BASE->databasepassword;
+        $_SESSION['config']['databasename'] = $xml->CONFIG_BASE->databasename;
+        $_SESSION['config']['databasetype'] = $xml->CONFIG_BASE->databasetype;
+        $_SESSION['custom_override_id'] = $xml->CONFIG->CustomId;
+        $_SESSION['collection_id_choice'] = $xml->COLLECTION->Id;
+        $_SESSION['tablename']['docservers'] = 'docservers';
+    }
+
+    public function purge()
+    {
+        $db = new RequestSeda();
+        $letters = $db->getLettersByStatus('REPLY_SEDA');
+
+
+        $purge = new Purge();
+        foreach ($letters as $letter) {
+            $purge->purge($letter->res_id);
+        }
+    }
+}
\ No newline at end of file
diff --git a/modules/export_seda/batch/CheckAllReply.php b/modules/export_seda/batch/CheckAllReply.php
old mode 100755
new mode 100644
index 484bae85e91e23140ce6ada341a8d33ff6c46841..eb56df8a616c627782732a30a9040bc5c1adf5f9
--- a/modules/export_seda/batch/CheckAllReply.php
+++ b/modules/export_seda/batch/CheckAllReply.php
@@ -1,11 +1,12 @@
 <?php
+$checkAllReply = new CheckAllReply();
 
 require_once __DIR__ . '/../RequestSeda.php';
 require_once __DIR__ . '/../class/AbstractMessage.php';
 require_once __DIR__ . '/../CheckReply.php';
 
-$checkAllReply = new CheckAllReply();
-$checkAllReply->checkAll();
+$CheckReply = new CheckReply();
+$CheckReply->checkAll();
 
 Class CheckAllReply {
     protected $token;
@@ -16,59 +17,59 @@ Class CheckAllReply {
     public function __construct()
     {
         $this->initSession();
-        $this->db = new RequestSeda();
-        $this->checkReply = new CheckReply();
     }
 
     private function initSession() {
-        $xml = simplexml_load_file(__DIR__ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . "config.xml");
-
-        $_SESSION['config']['databaseserver'] = $xml->CONFIG_BASE->databaseserver;
-        $_SESSION['config']['databaseserverport'] = $xml->CONFIG_BASE->databaseserverport;
-        $_SESSION['config']['databaseuser'] = $xml->CONFIG_BASE->databaseuser;
-        $_SESSION['config']['databasepassword'] = $xml->CONFIG_BASE->databasepassword;
-        $_SESSION['config']['databasename'] = $xml->CONFIG_BASE->databasename;
-        $_SESSION['config']['databasetype'] = $xml->CONFIG_BASE->databasetype;
-        $_SESSION['collection_id_choice'] = $xml->COLLECTION->Id;
-        $_SESSION['tablename']['docservers'] = 'docservers';
-    }
-    public function checkAll()
-    {
-        $abstractMessage = new AbstractMessage();
+        try {
+            include('Maarch_CLITools/ArgsParser.php');;
+        } catch (IncludeFileError $e) {
+            echo 'Maarch_CLITools required ! \n (pear.maarch.org)\n';
+            exit(106);
+        }
 
-        $letters = $this->db->getLettersByStatus("ACK_SEDA");
+        // Defines scripts arguments
+        $argsparser = new ArgsParser();
+        // The config file
+                $argsparser->add_arg(
+                    'config',
+                    array(
+                        'short' => 'c',
+                        'long' => 'config',
+                        'mandatory' => true,
+                        'help' => 'Config file path is mandatory.',
+                    )
+                );
 
-        $unitIdentifiers = [];
-        foreach ($letters as $letter) {
-            $unitIdentifier = $this->db->getUnitIdentifierByResId($letter->res_id);
-            $message = $this->db->getMessageByIdentifier($unitIdentifier->message_id);
+        $options = $argsparser->parse_args($GLOBALS['argv']);
+        // If option = help then options = false and the script continues ...
+        if ($options == false) {
+            exit(0);
+        }
 
-            if(array_key_exists($message->reference, $unitIdentifiers)) {
-                $unitIdentifiers[$message->reference] .= "," . $unitIdentifier->res_id;
+        $txt = '';
+        foreach (array_keys($options) as $key) {
+            if (isset($options[$key]) && $options[$key] == false) {
+                $txt .= $key . '=false,';
             } else {
-                $unitIdentifiers[$message->reference] = $unitIdentifier->res_id;
+                $txt .= $key . '=' . $options[$key] . ',';
             }
         }
 
-        foreach ($unitIdentifiers as $key => $value) {
-            $messageReplyIdentifier = $key. '_Reply';
-            $messageReply = $this->checkReply->getReply($messageReplyIdentifier);
-
-            if (empty($messageReply)) {
-                continue;
-            }
+        $xml = simplexml_load_file($options['config']);
 
-            $data = json_decode($messageReply[0]->data);
-            $this->db->insertMessage($data, "ArchiveTransferReply");
-            $abstractMessage->saveXml($data,"ArchiveTransferReply", ".txt");
+        $_SESSION['config']['lang'] = $xml->CONFIG->Lang;
+        $_SESSION['config']['corepath'] = $xml->CONFIG->MaarchDirectory;
+        $_SESSION['config']['custom_override_id'] = $xml->CONFIG->CustomId;
+        $_SESSION['config']['app_id'] = $xml->CONFIG->MaarchApps;
 
-            $resIds = explode(',',$value);
-            foreach ($resIds as $resId) {
-                $abstractMessage->addAttachment($messageReplyIdentifier,$resId,$messageReplyIdentifier.".txt","txt","Réponse de transfert",2);
-                $this->db->updateStatusLetterbox($resId,"REPLY_SEDA");
-            }
-        }
-
-        return true;
+        $_SESSION['config']['databaseserver'] = $xml->CONFIG_BASE->databaseserver;
+        $_SESSION['config']['databaseserverport'] = $xml->CONFIG_BASE->databaseserverport;
+        $_SESSION['config']['databaseuser'] = $xml->CONFIG_BASE->databaseuser;
+        $_SESSION['config']['databasepassword'] = $xml->CONFIG_BASE->databasepassword;
+        $_SESSION['config']['databasename'] = $xml->CONFIG_BASE->databasename;
+        $_SESSION['config']['databasetype'] = $xml->CONFIG_BASE->databasetype;
+        $_SESSION['custom_override_id'] = $xml->CONFIG->CustomId;
+        $_SESSION['collection_id_choice'] = $xml->COLLECTION->Id;
+        $_SESSION['tablename']['docservers'] = 'docservers';
     }
-}
\ No newline at end of file
+}
diff --git a/modules/export_seda/batch/config/config.xml.default b/modules/export_seda/batch/config/config.xml.default
old mode 100755
new mode 100644
index 8a0c2e0dfa6da307db541f402a207d39f3019f6f..dfa529a6c26c7ac247f2020ce3438fda8492a9a6
--- a/modules/export_seda/batch/config/config.xml.default
+++ b/modules/export_seda/batch/config/config.xml.default
@@ -1,6 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <ROOT>
-<!-- le nom du fichier doit etre config.xml ou config_{custom_id}.xml -->
+    <CONFIG>
+        <Lang>fr</Lang> <!-- fr, en-->
+        <MaarchDirectory>/var/www/MaarchCourrier/</MaarchDirectory>
+        <MaarchUrl>http://localhost/maarch/</MaarchUrl>
+        <MaarchApps>maarch_entreprise</MaarchApps>
+		<CustomId>cs_maarch_courrier</CustomId>
+    </CONFIG>
     <COLLECTION>
         <Id>letterbox_coll</Id>
         <Table>res_letterbox</Table>
@@ -13,8 +19,8 @@
         <databaseserver>127.0.0.1</databaseserver>
         <databaseserverport>5432</databaseserverport>
         <databasetype>POSTGRESQL</databasetype>
-        <databasename>maarch</databasename>
-        <databaseuser>postgres</databaseuser>
-        <databasepassword>postgres</databasepassword>
+        <databasename>maarchcourrier</databasename>
+        <databaseuser>maarch</databaseuser>
+        <databasepassword>maarch</databasepassword>
     </CONFIG_BASE>
 </ROOT>
diff --git a/modules/export_seda/class/AbstractMessage.php b/modules/export_seda/class/AbstractMessage.php
old mode 100755
new mode 100644
index d538a3839af5f82783edc9e52f57d6397f0cc029..ba4ea1f3db39048fcc27206111a3614c54b854df
--- a/modules/export_seda/class/AbstractMessage.php
+++ b/modules/export_seda/class/AbstractMessage.php
@@ -3,11 +3,82 @@
 require_once __DIR__ .  DIRECTORY_SEPARATOR .'../RequestSeda.php';
 require_once __DIR__ . DIRECTORY_SEPARATOR .'../DOMTemplateProcessor.php';
 
-Class AbstractMessage{
+if ($_SESSION['config']['app_id']) {
+    require_once 'apps/maarch_entreprise/class/class_pdf.php';
+}
+
+class AbstractMessage{
+
+    private $db;
+    private $xml;
+    private $directoryMessage;
+    public function __construct()
+    {
+        $this->db = new RequestSeda();
+
+        $getXml = false;
+        $path = '';
+        if (file_exists(
+            $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+            . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+            . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+            . DIRECTORY_SEPARATOR . 'config.xml'
+        )) {
+            $path = $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+                . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+                . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+                . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        } elseif (file_exists(
+            $_SESSION['config']['corepath'] . 'modules'
+            . DIRECTORY_SEPARATOR . 'export_seda'.  DIRECTORY_SEPARATOR . 'xml'
+            . DIRECTORY_SEPARATOR . 'config.xml'
+        )) {
+            $path = $_SESSION['config']['corepath'] . 'modules' . DIRECTORY_SEPARATOR . 'export_seda'
+                . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        }
+
+        if ($getXml) {
+            $this->xml = simplexml_load_file($path);
+
+            $this->directoryMessage = (string) $this->xml->CONFIG->directoryMessage;
+        }
+    }
+
+    public function generatePackage($reference, $name)
+    {
+        $message = $this->db->getMessageByReference($reference);
+        $messageObject = json_decode($message->data);
+
+        if (!is_dir($this->directoryMessage)) {
+            umask(0);
+            mkdir($this->directoryMessage, 0777, true);
+        }
+
+        if (!is_dir($this->directoryMessage . DIRECTORY_SEPARATOR . $messageObject->MessageIdentifier->value)) {
+            umask(0);
+            mkdir($this->directoryMessage . DIRECTORY_SEPARATOR . $messageObject->MessageIdentifier->value, 0777, true);
+        }
+
+        $this->sendAttachment($messageObject);
+
+        $this->saveXml($messageObject, $name, ".xml");
+    }
 
     public function saveXml($messageObject, $name, $extension)
     {
+        if (isset($messageObject->DataObjectPackage)) {
+            if ($messageObject->DataObjectPackage->BinaryDataObject) {
+                foreach ($messageObject->DataObjectPackage->BinaryDataObject as $binaryDataObject) {
+                    unset($binaryDataObject->Attachment->value);
+                }
+            }
+        }
+
         $DOMTemplate = new DOMDocument();
+        $DOMTemplate->preserveWhiteSpace = false;
+        $DOMTemplate->formatOutput = true;
         $DOMTemplate->load(__DIR__ .DIRECTORY_SEPARATOR. '..'. DIRECTORY_SEPARATOR.'resources'.DIRECTORY_SEPARATOR.$name.'.xml');
         $DOMTemplateProcessor = new DOMTemplateProcessor($DOMTemplate);
         $DOMTemplateProcessor->setSource($name, $messageObject);
@@ -15,18 +86,18 @@ Class AbstractMessage{
         $DOMTemplateProcessor->removeEmptyNodes();
 
         try {
-            if (!is_dir(__DIR__ . DIRECTORY_SEPARATOR . '..'. DIRECTORY_SEPARATOR.'message')) {
+            if (!is_dir($this->directoryMessage)) {
                 umask(0);
-                mkdir(__DIR__ . DIRECTORY_SEPARATOR . '..'. DIRECTORY_SEPARATOR.'message', 0777, true);
+                mkdir($this->directoryMessage, 0777, true);
             }
 
-            if (!is_dir(__DIR__ . DIRECTORY_SEPARATOR . '..'. DIRECTORY_SEPARATOR.'message' . DIRECTORY_SEPARATOR . $messageObject->messageIdentifier->value)) {
+            if (!is_dir($this->directoryMessage . DIRECTORY_SEPARATOR . $messageObject->MessageIdentifier->value)) {
                 umask(0);
-                mkdir(__DIR__ . DIRECTORY_SEPARATOR . '..'. DIRECTORY_SEPARATOR.'message' . DIRECTORY_SEPARATOR . $messageObject->messageIdentifier->value, 0777, true);
+                mkdir($this->directoryMessage . DIRECTORY_SEPARATOR . $messageObject->MessageIdentifier->value, 0777, true);
             }
 
-            if (!file_exists(__DIR__.DIRECTORY_SEPARATOR.'..'. DIRECTORY_SEPARATOR.'message'.DIRECTORY_SEPARATOR.$messageObject->messageIdentifier->value.DIRECTORY_SEPARATOR. $messageObject->messageIdentifier->value . $extension)) {
-                file_put_contents(__DIR__.DIRECTORY_SEPARATOR.'..'. DIRECTORY_SEPARATOR.'message'.DIRECTORY_SEPARATOR.$messageObject->messageIdentifier->value.DIRECTORY_SEPARATOR. $messageObject->messageIdentifier->value . $extension, $DOMTemplate->saveXML());
+            if (!file_exists($this->directoryMessage . DIRECTORY_SEPARATOR.$messageObject->MessageIdentifier->value.DIRECTORY_SEPARATOR. $messageObject->MessageIdentifier->value . $extension)) {
+                $DOMTemplate->save($this->directoryMessage . DIRECTORY_SEPARATOR.$messageObject->MessageIdentifier->value.DIRECTORY_SEPARATOR. $messageObject->MessageIdentifier->value . $extension);
             }
 
         } catch (Exception $e) {
@@ -37,7 +108,7 @@ Class AbstractMessage{
     public function addAttachment($reference, $resIdMaster, $fileName, $extension, $title, $type) {
         $db = new RequestSeda();
         $object = new stdClass();
-        $dir =  __DIR__.DIRECTORY_SEPARATOR.'..'. DIRECTORY_SEPARATOR.'message'.DIRECTORY_SEPARATOR.$reference.DIRECTORY_SEPARATOR;
+        $dir =  $this->directoryMessage . DIRECTORY_SEPARATOR . $reference . DIRECTORY_SEPARATOR;
 
         $object->tmpDir = $dir;
         $object->size = filesize($dir);
@@ -50,15 +121,64 @@ Class AbstractMessage{
         return $db->insertAttachment($object, $type);
     }
 
-    public function changeStatus($reference, $status) {
-        $db = new RequestSeda();
-        $message = $db->getMessageByReference($reference);
-        $listResId = $db->getUnitIdentifierByMessageId($message->message_id);
+    private function sendAttachment($messageObject)
+    {
+        $messageId = $messageObject->MessageIdentifier->value;
+
+        foreach ($messageObject->DataObjectPackage->BinaryDataObject as $binaryDataObject) {
+            $dest = $this->directoryMessage . DIRECTORY_SEPARATOR . $messageId . DIRECTORY_SEPARATOR . $binaryDataObject->Attachment->filename;
+
+            if (!file_exists($dest)) {
+                copy($binaryDataObject->Uri, $dest);
+
+                unset($binaryDataObject->Uri);
+            }
+        }
+
+        $this->db->updateDataMessage($messageObject->MessageIdentifier->value, json_encode($messageObject));
+    }
+
+    public function addTitleToMessage($reference, $title = ' ')
+    {
+        $message = $this->db->getMessageByReference($reference);
+
+        $messageObject = json_decode($message->data);
+
+        $messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content->Title[0] = $title;
+
+        $this->db->updateDataMessage($reference, json_encode($messageObject));
+
+        return true;
+    }
+
+    public function changeStatus($reference, $status)
+    {
+        $message = $this->db->getMessageByReference($reference);
+        $listResId = $this->db->getUnitIdentifierByMessageId($message->message_id);
 
         for ($i=0; $i < count($listResId); $i++) {
-            $db->updateStatusLetterbox($listResId[$i]->res_id,$status);
+            $this->db->updateStatusLetterbox($listResId[$i]->res_id, $status);
         }
 
         return true;
     }
-}
\ No newline at end of file
+
+    public function createPDF($name, $body)
+    {
+        $pdf = new PDF("p", "pt", "A4");
+        $pdf->SetAuthor("MAARCH");
+        $pdf->SetTitle($name);
+
+        $pdf->SetFont('times', '', 12);
+        $pdf->SetTextColor(50, 60, 100);
+
+        $pdf->AddPage('P');
+
+        $pdf->SetAlpha(1);
+
+        $pdf->MultiCell(0, 10, utf8_decode($body), 0, 'L');
+
+        $dir = $_SESSION['config']['tmppath'] . $name . '.pdf';
+        $pdf->Output($dir, "F");
+    }
+}
diff --git a/modules/export_seda/class/Acknowledgement.php b/modules/export_seda/class/Acknowledgement.php
old mode 100755
new mode 100644
index 8c22902d673c5e712231d2733c284a45d05c2ac0..a4546c8bf9d9d3622fc4cba75b64298ecd143af6
--- a/modules/export_seda/class/Acknowledgement.php
+++ b/modules/export_seda/class/Acknowledgement.php
@@ -28,15 +28,110 @@ class Acknowledgement {
 	{
 	}
 
-	public function send($data, $resIds)
+	public function receive($data, $resIds)
 	{
+	    $messageObject = $this->getMessageObject($data);
 	    $abstractMessage = new AbstractMessage();
-        $abstractMessage->saveXml($data,"Acknowledgement", ".txt");
+        $abstractMessage->saveXml($messageObject,"Acknowledgement", ".xml");
 
 		foreach ($resIds as $resId) {
-            $abstractMessage->addAttachment($data->messageIdentifier->value, $resId, $data->messageIdentifier->value.".txt", "txt", "Accusé de reception",1);
+            $abstractMessage->addAttachment($messageObject->MessageIdentifier->value, $resId, $messageObject->MessageIdentifier->value.".xml", "xml", "Accusé de réception",1);
         }
+
+        return $messageObject;
 	}
 
+    private function getMessageObject($data)
+    {
+        $messageObject = new stdClass();
+
+        $messageObject->Comment = $data->comment;
+        $messageObject->Date = $data->date;
+        $messageObject->MessageIdentifier = $data->messageIdentifier;
+        $messageObject->MessageReceivedIdentifier = $data->messageReceivedIdentifier;
+
+        $messageObject->Receiver = $this->getOrganisation($data->receiver);
+        $messageObject->Sender = $this->getOrganisation($data->sender);
+
+        return $messageObject;
+    }
+
+    private function getOrganisation($data)
+    {
+        $organisationObject = new stdClass();
+        $organisationObject->Identifier = new stdClass();
+        $organisationObject->Identifier->value = $data->id;
+
+        $organisationObject->OrganizationDescriptiveMetadata = new stdClass();
+        $organisationObject->OrganizationDescriptiveMetadata->Name = $data->name;
+        $organisationObject->OrganizationDescriptiveMetadata->LegalClassification = $data->legalClassification;
+
+        if ($data->address) {
+            $organisationObject->OrganizationDescriptiveMetadata->Address = $this->getAddress($data->address);
+        }
+
+        if ($data->communication) {
+            $organisationObject->OrganizationDescriptiveMetadata->Communication = $this->getCommunication($data->communication);
+        }
+
+        if ($data->contact) {
+            $organisationObject->OrganizationDescriptiveMetadata->Contact = $this->getContact($data->contact);
+        }
+
+        return $organisationObject;
+    }
+
+    private function getContact($data)
+    {
+        $listContact = [];
+        foreach ($data as $contact) {
+            $tmpContact =  new stdClass();
+            $tmpContact->DepartmentName = $contact->departmentName;
+            $tmpContact->PersonName = $contact->personName;
+
+            if ($contact->address){
+                $tmpContact->Address = [];
+                $tmpContact->Address = $this->getAddress($contact->address);
+            }
+
+            if ($contact->communication) {
+                $tmpContact->Communication = [];
+                $tmpContact->Communication = $this->getCommunication($contact->communication);
+            }
+            $listContact[] = $tmpContact;
+        }
+        return $listContact;
+    }
 
-}
\ No newline at end of file
+    private function getAddress($data)
+    {
+	    $listAddress = [];
+        foreach ($data as $address) {
+            $tmpAddress = new stdClass();
+            $tmpAddress->CityName = $address->cityName;
+            $tmpAddress->Country = $address->country;
+            $tmpAddress->PostCode = $address->postCode;
+            $tmpAddress->StreetName = $address->streetName;
+
+            $listAddress[] = $tmpAddress;
+        }
+        return $listAddress;
+    }
+
+    private function getCommunication($data)
+    {
+        $listCommunication = [];
+        foreach ($data as $communication) {
+            $tmpCommunication = new stdClass();
+            $tmpCommunication->Channel = $communication->channel;
+
+            if ($communication->completeNumber) {
+                $tmpCommunication->value = $communication->completeNumber;
+            } else {
+                $tmpCommunication->value = $communication->URIID;
+            }
+            $listCommunication[] = $tmpCommunication;
+        }
+        return $listCommunication;
+    }
+}
diff --git a/modules/export_seda/class/ArchiveTransfer.php b/modules/export_seda/class/ArchiveTransfer.php
old mode 100755
new mode 100644
index c033e85b45b1fea0b85a977b39a90c8aa47ae572..c3db7a64372faa38a8a73512a79497de1aa60250
--- a/modules/export_seda/class/ArchiveTransfer.php
+++ b/modules/export_seda/class/ArchiveTransfer.php
@@ -26,11 +26,45 @@ require_once __DIR__ . '/AbstractMessage.php';
 class ArchiveTransfer
 {
     private $db;
+    private $abstractMessage;
+    private $externalLink;
+    private $xml;
+    protected $entities;
 
     public function __construct()
     {
         $this->db = new RequestSeda();
+        $this->abstractMessage = new AbstractMessage();
         $_SESSION['error'] = "";
+
+        $getXml = false;
+        $path = '';
+        if (file_exists(
+            $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+            . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+            . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+            . DIRECTORY_SEPARATOR . 'config.xml'
+        )) {
+            $path = $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR
+                . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'modules'
+                . DIRECTORY_SEPARATOR . 'export_seda'. DIRECTORY_SEPARATOR . 'xml'
+                . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        } elseif (file_exists(
+            $_SESSION['config']['corepath'] . 'modules'
+            . DIRECTORY_SEPARATOR . 'export_seda'.  DIRECTORY_SEPARATOR . 'xml'
+            . DIRECTORY_SEPARATOR . 'config.xml'
+        )) {
+            $path = $_SESSION['config']['corepath'] . 'modules' . DIRECTORY_SEPARATOR . 'export_seda'
+                . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'config.xml';
+            $getXml = true;
+        }
+
+        if ($getXml) {
+            $this->xml = simplexml_load_file($path);
+        }
+
+        $this->entities = [];
     }
 
     public function receive($listResId)
@@ -42,8 +76,24 @@ class ArchiveTransfer
         $messageObject = new stdClass();
         $messageObject = $this->initMessage($messageObject);
 
-        $result = '';
+        if (!empty($_SESSION['error'])) {
+            return;
+        }
+
+        $messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[] = $this->getArchiveUnit(
+            "RecordGrp",
+            null,
+            null,
+            'group_1',
+            null,
+            null
+        );
+
+        $result = $startDate = $endDate = '';
+        $i = 1;
         foreach ($listResId as $resId) {
+            $this->externalLink = false;
+
             if (!empty($result)) {
                 $result .= ',';
             }
@@ -51,44 +101,165 @@ class ArchiveTransfer
 
             $letterbox = $this->db->getLetter($resId);
             $attachments = $this->db->getAttachments($letterbox->res_id);
+            $notes = $this->db->getNotes($letterbox->res_id);
+            $mails = $this->db->getMails($letterbox->res_id);
+            $links = $this->db->getLinks($letterbox->res_id);
+
+            $relatedObjectReference = [];
+            if (is_array($links)) {
+                foreach ($links as $link) {
+                    if (!array_search($link, $listResId)) {
+                        $relatedObjectReference[$link] = false;
+                    } else {
+                        $relatedObjectReference[$link] = true;
+                    }
+                }
+            } else {
+                if (!array_search($links, $listResId)) {
+                    $relatedObjectReference[$links] = false;
+                } else {
+                    $relatedObjectReference[$links] = true;
+                }
+            }
 
-            $archiveUnitId = uniqid();
+            $archiveUnitId = 'letterbox_' . $resId;
             if ($letterbox->filename) {
-                $messageObject->dataObjectPackage->descriptiveMetadata[] = $this->getArchiveUnit($letterbox, "File", $attachments, $archiveUnitId, $letterbox->res_id, null);
-                $messageObject->dataObjectPackage->binaryDataObject[] = $this->getBinaryDataObject($letterbox);
+                $docServers = $this->db->getDocServer($letterbox->docserver_id);
+                $uri = str_replace("##", DIRECTORY_SEPARATOR, $letterbox->path);
+                $uri = str_replace("#", DIRECTORY_SEPARATOR, $uri);
+                $uri .= $letterbox->filename;
+                $filePath = $docServers->path_template . $uri;
+
+                if (!file_exists($filePath)) {
+                    $_SESSION['error'] = _ERROR_FILE_NOT_EXIST;
+                    return;
+                }
+
+                $messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->ArchiveUnit[] = $this->getArchiveUnit(
+                    "File",
+                    $letterbox,
+                    $attachments,
+                    $archiveUnitId,
+                    $letterbox->res_id,
+                    $relatedObjectReference
+                );
+
+                $messageObject->DataObjectPackage->BinaryDataObject[] = $this->getBinaryDataObject(
+                    $filePath,
+                    $_SESSION['collections'][0]['table'] . '_' . $letterbox->res_id
+                );
             } else {
-                $messageObject->dataObjectPackage->descriptiveMetadata[] = $this->getArchiveUnit($letterbox, "File");
+                $messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->ArchiveUnit[] = $this->getArchiveUnit(
+                    "File",
+                    $letterbox,
+                    null,
+                    null,
+                    null,
+                    $relatedObjectReference
+                );
             }
 
             if ($attachments) {
+                $j = 1;
                 foreach ($attachments as $attachment) {
-                    //if ($attachment->attachment_type == "simple_attachment" || $attachment->attachment_type == "signed_response") {
+                    $docServers = $this->db->getDocServer($attachment->docserver_id);
+
+                    $uri = str_replace("##", DIRECTORY_SEPARATOR, $attachment->path);
+                    $uri = str_replace("#", DIRECTORY_SEPARATOR, $uri);
+                    $uri .= $attachment->filename;
+
+                    $filePath = $docServers->path_template . $uri;
                     if ($attachment->attachment_type == "signed_response") {
-                        $messageObject->dataObjectPackage->descriptiveMetadata[] = $this->getArchiveUnit($attachment, "Response", null, null, "response_" . $attachment->res_id, "arch_" . $archiveUnitId);
-                        $messageObject->dataObjectPackage->binaryDataObject[] = $this->getBinaryDataObject($attachment, "response");
+                        $messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->ArchiveUnit[] = $this->getArchiveUnit(
+                            "Response",
+                            $attachment,
+                            null,
+                            'attachment_'. $i. '_'. $j,
+                            "response_" . $attachment->res_id,
+                            $archiveUnitId
+                        );
+
+                        $messageObject->DataObjectPackage->BinaryDataObject[] = $this->getBinaryDataObject(
+                            $filePath,
+                            $_SESSION['collections'][1]['table'] . '_'.  $attachment->res_id
+                        );
+                        $j++;
                     } else {
-                        $messageObject->dataObjectPackage->binaryDataObject[] = $this->getBinaryDataObject($attachment, "attachment");
+                        $messageObject->DataObjectPackage->BinaryDataObject[] = $this->getBinaryDataObject(
+                            $filePath,
+                            $_SESSION['collections'][1]['table']. '_'.  $attachment->res_id
+                        );
                     }
+                }
+            }
 
+            if ($notes) {
+                foreach ($notes as $note) {
+                    $id = 'note_'.$note->id;
+                    $filePath = $_SESSION['config']['tmppath']. DIRECTORY_SEPARATOR. $id. '.pdf';
 
-                    //}
+                    $this->abstractMessage->createPDF($id, $note->note_text);
+                    $messageObject->DataObjectPackage->BinaryDataObject[] = $this->getBinaryDataObject($filePath, $id);
                 }
             }
-        }
 
-        $messageId = $this->db->insertMessage($messageObject, "ArchiveTransfer");
+            if ($mails) {
+                foreach ($mails as $mail) {
+                    $id = 'email_'.$mail->email_id;
+                    $filePath = $_SESSION['config']['tmppath']. DIRECTORY_SEPARATOR. $id. '.pdf';
+                    $body = str_replace('###', ';', $mail->email_body);
+                    $data = 'email n°' . $mail->email_id . '
+' .'de ' . $mail->sender_email . '
+' . 'à ' . $mail->to_list . '
+' . 'objet : ' . $mail->email_object . '
+' . 'corps : ' . strip_tags(html_entity_decode($body));
+
+                    $this->abstractMessage->createPDF($id, $data);
+                    $messageObject->DataObjectPackage->BinaryDataObject[] = $this->getBinaryDataObject($filePath, $id);
+                }
+            }
 
-        foreach ($listResId as $resId) {
-            $this->db->insertUnitIdentifier($messageId, "res_letterbox", $resId);
+            $format = 'Y-m-d H:i:s.u';
+            $creationDate = DateTime::createFromFormat($format, $letterbox->creation_date);
+            if ($startDate == '') {
+                $startDate = $creationDate;
+            } elseif ( date_diff($startDate, $creationDate) > 0 ) {
+                $startDate = $creationDate;
+            }
+
+            $modificationDate = DateTime::createFromFormat($format, $letterbox->modification_date);
+            if ($endDate == '') {
+                $endDate = $modificationDate;
+            } elseif ( date_diff($endDate, $modificationDate) < 0) {
+                $endDate = $modificationDate;
+            }
+
+            $i++;
         }
 
-        if ($messageId) {
-            $abstractMessage = new AbstractMessage();
-            $abstractMessage->saveXml($messageObject,"ArchiveTransfer",".xml");
+        $originator = "";
+        foreach ($messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->ArchiveUnit as $archiveUnit) {
+            if (!empty($archiveUnit->Content->OriginatingAgency->Identifier->value)) {
+                $originator = $archiveUnit->Content->OriginatingAgency->Identifier->value;
+                break;
+            }
+        }
 
-            $this->sendAttachment($messageObject);
+        if (!empty($originator)) {
+            $messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content->OriginatingAgency = new stdClass();
+            $messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content->OriginatingAgency->Identifier = new stdClass();
+            $messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content->OriginatingAgency->Identifier->value = $messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->ArchiveUnit[0]->Content->OriginatingAgency->Identifier->value;
         } else {
-            return false;
+            $_SESSION['error'] = _ERROR_ORIGINATOR_EMPTY;
+        }
+
+        $messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content->StartDate = $startDate->format('Y-m-d');
+        $messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content->EndDate = $endDate->format('Y-m-d');
+
+        $messageId = $this->saveMessage($messageObject);
+
+        foreach ($listResId as $resId) {
+            $this->db->insertUnitIdentifier($messageId, "res_letterbox", $resId);
         }
 
         return $result;
@@ -117,63 +288,111 @@ class ArchiveTransfer
         return true;
     }
 
-    private function sendAttachment($messageObject)
+    private function saveMessage($messageObject)
     {
-        $messageId = $messageObject->messageIdentifier->value;
+        $data = new stdClass();
 
-        foreach ($messageObject->dataObjectPackage->binaryDataObject as $binaryDataObject) {
-            $basename = basename($binaryDataObject->uri);
-            $dest = __DIR__ . DIRECTORY_SEPARATOR . '..'. DIRECTORY_SEPARATOR.'message' . DIRECTORY_SEPARATOR . $messageId . DIRECTORY_SEPARATOR . $basename;
+        $data->messageId                             = $messageObject->MessageIdentifier->value;
+        $data->date                                  = $messageObject->Date;
 
-            copy($binaryDataObject->uri, $dest);
-        }
+        $data->MessageIdentifier                     = new stdClass();
+        $data->MessageIdentifier->value              = $messageObject->MessageIdentifier->value;
+
+        $data->TransferringAgency                    = new stdClass();
+        $data->TransferringAgency->Identifier        = new stdClass();
+        $data->TransferringAgency->Identifier->value = $messageObject->TransferringAgency->Identifier->value;
+
+        $data->ArchivalAgency                        = new stdClass();
+        $data->ArchivalAgency->Identifier            = new stdClass();
+        $data->ArchivalAgency->Identifier->value     = $messageObject->ArchivalAgency->Identifier->value;
+
+        $data->ArchivalAgreement                     = new stdClass();
+        $data->ArchivalAgreement->value              = $messageObject->ArchivalAgreement->value;
+
+        $data->ReplyCode                             = $messageObject->ReplyCode;
+
+        $aArgs                                       = [];
+        $aArgs['fullMessageObject']                  = $messageObject;
+        $aArgs['SenderOrgNAme']                      = "";
+        $aArgs['RecipientOrgNAme']                   = "";
+
+        $messageId = $this->db->insertMessage($data, "ArchiveTransfer", $aArgs);
+
+        return $messageId;
     }
 
     private function initMessage($messageObject)
     {
+
+        $this->directoryMessage = (string) $this->xml->CONFIG->directoryMessage;
+
+        if (!$this->directoryMessage || !is_dir($this->directoryMessage)) {
+            $_SESSION['error'] .= _DIRECTORY_MESSAGE_REQUIRED;
+            return;
+        }
+
         $date = new DateTime;
-        $messageObject->date = $date->format(DateTime::ATOM);
-        $messageObject->messageIdentifier = new stdClass();
-        $messageObject->messageIdentifier->value = $_SESSION['user']['UserId'] . "-" . date('Ymd-His');
+        $messageObject->Date = $date->format(DateTime::ATOM);
+        $messageObject->MessageIdentifier = new stdClass();
+        $messageObject->MessageIdentifier->value = $_SESSION['user']['UserId'] . "-" . date('Ymd-His');
+
+        $messageObject->TransferringAgency = new stdClass();
+        $messageObject->TransferringAgency->Identifier = new stdClass();
+
+        $messageObject->ArchivalAgency = new stdClass();
+        $messageObject->ArchivalAgency->Identifier = new stdClass();
 
-        $messageObject->transferringAgency = new stdClass();
-        $messageObject->transferringAgency->identifier = new stdClass();
+        $messageObject->ArchivalAgreement = new stdClass();
 
-        $messageObject->archivalAgency = new stdClass();
-        $messageObject->archivalAgency->identifier = new stdClass();
+        foreach ($_SESSION['user']['entities'] as $entity) {
+            $res = array_key_exists($entity['ENTITY_ID'], $this->entities);
+            if ($res === false) {
+                $this->entities[$entity['ENTITY_ID']] = $entity = $this->db->getEntity($entity['ENTITY_ID']);
+            } else {
+                $entity = $this->entities[$entity['ENTITY_ID']];
+            }
 
-        $messageObject->archivalAgreement = new stdClass();
+            if ($entity) {
+                if (!(string) $this->xml->CONFIG->senderOrgRegNumber) {
+                    $_SESSION['error'] .= _TRANSFERRING_AGENCY_SIREN_REQUIRED;
+                }
 
-        foreach ($_SESSION['user']['entities'] as $entitie) {
-            $entitie = $this->db->getEntitie($entitie['ENTITY_ID']);
-            if ($entitie) {
-                $messageObject->transferringAgency->identifier->value = $entitie->business_id;
-                $messageObject->archivalAgency->identifier->value = $entitie->archival_agency;
+                if (!$entity->archival_agency) {
+                    $_SESSION['error'] .= _ARCHIVAL_AGENCY_SIREN_REQUIRED;
+                }
 
-                if (!$entitie->business_id) {
-                    $_SESSION['error'] .= _TRANSFERRING_AGENCY_SIREN_COMPULSORY;
+                if (!$entity->archival_agreement) {
+                    $_SESSION['error'] .= _ARCHIVAL_AGREEMENT_REQUIRED;
                 }
 
-                if (!$entitie->archival_agency) {
-                    $_SESSION['error'] .= _ARCHIVAL_AGENCY_SIREN_COMPULSORY;
+                if (!empty($_SESSION['error'])) {
+                    return;
                 }
 
-                $messageObject->archivalAgreement->value = $entitie->archival_agreement;
+                $messageObject->TransferringAgency->Identifier->value = (string) $this->xml->CONFIG->senderOrgRegNumber;
+                $messageObject->ArchivalAgency->Identifier->value = $entity->archival_agency;
+                $messageObject->ArchivalAgreement->value = $entity->archival_agreement;
             } else {
                 $_SESSION['error'] .= _NO_ENTITIES;
             }
         }
 
-        $messageObject->dataObjectPackage = new stdClass();
-        $messageObject->dataObjectPackage->binaryDataObject = [];
-        $messageObject->dataObjectPackage->descriptiveMetadata = [];
-        $messageObject->dataObjectPackage->managementMetadata = new stdClass();
+        $messageObject->DataObjectPackage = new stdClass();
+        $messageObject->DataObjectPackage->BinaryDataObject = [];
+        $messageObject->DataObjectPackage->DescriptiveMetadata = new stdClass();
+        $messageObject->DataObjectPackage->ManagementMetadata = new stdClass();
 
         return $messageObject;
     }
 
-    private function getArchiveUnit($object, $type, $attachments = null, $archiveUnitId = null, $dataObjectReferenceId = null, $relatedObjectReference = null)
-    {
+    private function getArchiveUnit(
+        $type,
+        $object = null,
+        $attachments = null,
+        $archiveUnitId = null,
+        $dataObjectReferenceId = null,
+        $relatedObjectReference = null
+    ) {
         $archiveUnit = new stdClass();
 
         if ($archiveUnitId) {
@@ -182,171 +401,314 @@ class ArchiveTransfer
             $archiveUnit->id = uniqid();
         }
 
-        if ($relatedObjectReference) {
-            $archiveUnit->content = $this->getContent($object, $type, $relatedObjectReference);
+        if (isset($object)) {
+            if ($relatedObjectReference) {
+                $archiveUnit->Content = $this->getContent($type, $object, $relatedObjectReference);
+            } else {
+                $archiveUnit->Content = $this->getContent($type, $object);
+            }
+
+            $archiveUnit->Management = $this->getManagement($object);
         } else {
-            $archiveUnit->content = $this->getContent($object, $type);
+            $archiveUnit->Content = $this->getContent($type);
+            $archiveUnit->Management = $this->getManagement();
         }
 
-        if ($object->type_id != 0) {
-            $archiveUnit->management = $this->getManagement($object);
-        }
 
         if ($dataObjectReferenceId) {
-            $archiveUnit->dataObjectReference = new stdClass();
-            $archiveUnit->dataObjectReference->dataObjectReferenceId = "doc_" . $dataObjectReferenceId;
+            $archiveUnit->DataObjectReference = new stdClass();
+            if ($type == 'File') {
+                $archiveUnit->DataObjectReference->DataObjectReferenceId = $_SESSION['collections'][0]['table'] . '_' .$dataObjectReferenceId;
+            } elseif ($type == 'Note') {
+                $archiveUnit->DataObjectReference->DataObjectReferenceId = 'note_' .$dataObjectReferenceId;
+            } elseif ($type == 'Email') {
+                $archiveUnit->DataObjectReference->DataObjectReferenceId = 'email_' .$dataObjectReferenceId;
+            } else {
+                $archiveUnit->DataObjectReference->DataObjectReferenceId = $_SESSION['collections'][1]['table'] . '_' .$dataObjectReferenceId;
+            }
+
         }
 
+        $archiveUnit->ArchiveUnit = [];
         if ($attachments) {
-            $archiveUnit->archiveUnit = [];
+            $i = 1;
             foreach ($attachments as $attachment) {
                 if ($attachment->res_id_master == $object->res_id) {
                     if ($attachment->attachment_type != "signed_response") {
-                        $archiveUnit->archiveUnit[] = $this->getArchiveUnit($attachment, "Item", null, null, "attachment_" . $attachment->res_id);
+                        $archiveUnit->ArchiveUnit[] = $this->getArchiveUnit(
+                            "Item",
+                            $attachment,
+                            null,
+                            $archiveUnitId. '_attachment_' . $i,
+                            $attachment->res_id
+                        );
                     }
                 }
+                $i++;
             }
-            if (count($archiveUnit->archiveUnit) == 0) {
-                unset($archiveUnit->archiveUnit);
+        }
+
+        if ($object->res_id) {
+            if ($type != 'Note' && $type != 'Email') {
+                $notes = $this->db->getNotes($object->res_id);
+                if ($notes) {
+                    $i = 1;
+                    foreach ($notes as $note) {
+                        $note->title = 'Note n° ' . $note->id;
+                        $archiveUnit->ArchiveUnit[] = $this->getArchiveUnit(
+                            "Note",
+                            $note,
+                            null,
+                            $archiveUnitId . '_note_' . $i,
+                            $note->id
+                        );
+                        $i++;
+                    }
+                }
             }
+
+            if ($type != 'Email' && $type != 'Note') {
+                $emails = $this->db->getMails($object->res_id);
+                if ($emails) {
+                    $i = 1;
+                    foreach ($emails as $email) {
+                        $email->title = 'Email n° ' . $email->email_id;
+                        $archiveUnit->ArchiveUnit[] = $this->getArchiveUnit(
+                            "Email",
+                            $email,
+                            null,
+                            $archiveUnitId . '_email_' . $i,
+                            $email->email_id
+                        );
+                        $i++;
+                    }
+                }
+            }
+        }
+        if (count($archiveUnit->ArchiveUnit) == 0) {
+            unset($archiveUnit->ArchiveUnit);
         }
 
         return $archiveUnit;
     }
 
-    private function getContent($object, $type, $relatedObjectReference = null)
+    private function getContent($type, $object = null, $relatedObjectReference = null)
     {
 
         $content = new stdClass();
 
-        if ($type == "File") {
-            $content->descriptionLevel = $type;
+        switch ($type) {
+            case 'RecordGrp':
+                $content->DescriptionLevel = $type;
+                $content->Title = [];
+                $content->DocumentType = 'Dossier';
+
+                return $content;
+                break;
+            case 'File':
+                $content->DescriptionLevel = $type;
+
+                $sentDate = new DateTime($object->doc_date);
+                $receivedDate = new DateTime($object->admission_date);
+                $acquiredDate = new DateTime($object->creaction_date);
+                $content->SentDate = $sentDate->format(DateTime::ATOM);
+                $content->ReceivedDate = $receivedDate->format(DateTime::ATOM);
+                $content->AcquiredDate = $acquiredDate->format(DateTime::ATOM);
+
+                $content->Addressee = [];
+                $content->Keyword = [];
+
+                $keyword = $addressee = $entity = "";
+
+                if ($object->destination) {
+                    $res = array_key_exists($object->destination, $this->entities);
+                    if ($res === false) {
+                        $this->entities[$object->destination] = $entity = $this->db->getEntity($object->destination);
+                    } else {
+                        $entity = $this->entities[$object->destination];
+                    }
+                }
 
-            $content->receivedDate = $object->admission_date;
-            $sentDate = new DateTime($object->doc_date);
-            $receivedDate = new DateTime($object->admission_date);
-            $acquiredDate = new DateTime();
-            $content->sentDate = $sentDate->format(DateTime::ATOM);
-            $content->receivedDate = $receivedDate->format(DateTime::ATOM);
-            $content->acquiredDate = $acquiredDate->format(DateTime::ATOM);
+                if ($object->exp_contact_id) {
+                    $contact = $this->db->getContact($object->exp_contact_id);
+                    $keyword = $this->getKeyword($contact);
+                    $addressee = $this->getAddresse($entity, "entity");
+                } elseif ($object->dest_contact_id) {
+                    $contact = $this->db->getContact($object->dest_contact_id);
+                    $addressee = $this->getAddresse($contact);
+                    $keyword = $this->getKeyword($entity, "entity");
+                } elseif ($object->exp_user_id) {
+                    $user = $this->db->getUserInformation($object->exp_user_id);
+                    $keyword = $this->getKeyword($user);
+                    $addressee = $this->getAddresse($entity, "entity");
+                }
 
-            $content->addressee = [];
-            $content->keyword = [];
+                if (!empty($keyword)) {
+                    $content->Keyword[] = $keyword;
+                }
 
-            if ($object->exp_contact_id) {
+                if (!empty($addressee)) {
+                    $content->Addressee[] = $addressee;
+                }
 
-                $contact = $this->db->getContact($object->exp_contact_id);
-                $entitie = $this->db->getEntitie($object->destination);
+                $content->Source = $_SESSION['mail_nature'][$object->nature_id];
+
+                $content->DocumentType = $object->type_label;
+                $content->OriginatingAgencyArchiveUnitIdentifier = $object->alt_identifier;
+                $content->OriginatingSystemId = $object->res_id;
+
+                $content->Title = [];
+                $content->Title[] = $object->subject;
+                break;
+            case 'Item':
+            case 'Attachment':
+            case 'Response':
+            case 'Note':
+            case 'Email':
+                $content->DescriptionLevel = "Item";
+                $content->Title = [];
+                $content->Title[] = $object->title;
+
+                if ($type == "Item") {
+                    $content->DocumentType = "Pièce jointe";
+                    $date = new DateTime($object->creation_date);
+                    $content->CreatedDate = $date->format('Y-m-d');
+                } elseif ($type == "Note") {
+                    $content->DocumentType = "Note";
+                    $date = new DateTime($object->date_note);
+                    $content->CreatedDate = $date->format('Y-m-d');
+                } elseif ($type == "Email") {
+                    $content->DocumentType = "Courriel";
+                    $date = new DateTime($object->creation_date);
+                    $content->CreatedDate = $date->format('Y-m-d');
+                } elseif ($type == "Response") {
+                    $content->DocumentType = "Réponse";
+                    $date = new DateTime($object->creation_date);
+                    $content->CreatedDate = $date->format('Y-m-d');
+                }
 
-                $content->keyword[] = $this->getKeyword($contact);
-                $content->addressee[] = $this->getAddresse($entitie, "entitie");
-            } else if ($object->dest_contact_id) {
-                $contact = $this->db->getContact($object->dest_contact_id);
-                $entitie = $this->db->getEntitie($object->destination);
+                break;
+        }
 
-                $content->addressee[] = $this->getAddresse($contact);
-                $content->keyword[] = $this->getKeyword($entitie, "entitie");
-            } else if ($object->exp_user_id) {
-                $user = $this->db->getUserInformation($object->exp_user_id);
-                $entitie = $this->db->getEntitie($object->initiator);
-                //$entitie = $this->getEntitie($letterbox->destination);
+        if (isset($relatedObjectReference)) {
+            $content->RelatedObjectReference = new stdClass();
+            $content->RelatedObjectReference->References = [];
 
-                $content->keyword[] = $this->getKeyword($user);
-                $content->addressee[] = $this->getAddresse($entitie, "entitie");
+            foreach ($relatedObjectReference as $key => $value) {
+                $reference = new stdClass();
+                if ($value) {
+                    $reference->ArchiveUnitRefId = 'letterbox_' . $key;
+                    $content->RelatedObjectReference->References[] = $reference;
+                } else {
+                    $destination = $this->db->getDestinationLetter($key);
+                    if (isset($destination)) {
+                        $res = array_key_exists($destination, $this->entities);
+                        if ($res === false) {
+                            $this->entities[$destination] = $entity = $this->db->getEntity($destination);
+                        } else {
+                            $entity = $this->entities[$destination];
+                        }
+
+                        $reference->RepositoryArchiveUnitPID = 'originator:' . $entity->business_id . ':' . $key;
+                        $content->RelatedObjectReference->References[] = $reference;
+                    }
+                }
             }
 
-            $content->source = $_SESSION['mail_nature'][$object->nature_id];
-
-            $content->documentType = $object->type_label;
-            $content->originatingAgencyArchiveUnitIdentifier = $object->alt_identifier;
-            $content->originatingSystemId = $object->res_id;
-
-            $content->title = [];
-            $content->title[] = $object->subject;
-
-        } else {
-            $content->descriptionLevel = "Item";
-            $content->title = [];
-            $content->title[] = $object->title;
-            $content->originatingSystemId = $object->res_id;
-            $content->documentType = "Attachment";
-
-            if ($type == "Response") {
-                $content->documentType = "Reply";
-
+        }
 
-                $content->relatedObjectReference = new stdClass();
-                $content->relatedObjectReference->references = [];
+        if (isset($object->destination)) {
+            $content->OriginatingAgency = new stdClass();
+            $content->OriginatingAgency->Identifier = new stdClass();
 
-                $reference = new stdClass();
-                $reference->archiveUnitRefId = $relatedObjectReference;
-                $content->relatedObjectReference->references[] = $reference;
+            $res = array_key_exists($object->destination, $this->entities);
+            if ($res === false) {
+                $this->entities[$object->destination] = $entity = $this->db->getEntity($object->destination);
+            } else {
+                $entity = $this->entities[$object->destination];
+            }
+            $content->OriginatingAgency->Identifier->value = $entity->business_id;
 
+            if (empty($content->OriginatingAgency->Identifier->value)) {
+                unset($content->OriginatingAgency);
             }
         }
 
-        if (isset($object->initiator)) {
-            $content->originatingAgency = new stdClass();
-            $content->originatingAgency->identifier = new stdClass();
-            $content->originatingAgency->identifier->value = $this->db->getEntitie($object->initiator)->business_id;
-        }
+        if (isset($object->res_id)) {
+            $content->CustodialHistory = new stdClass();
+            $content->CustodialHistory->CustodialHistoryItem = [];
 
-        /*$notes = $this->getNotes($letterbox->res_id);
-        $content->custodialHistory = new stdClass();
-        $content->custodialHistory->custodialHistoryItem = [];
+            $histories = $this->db->getHistory($_SESSION['collections'][0]['view'], $object->res_id);
+            foreach ($histories as $history) {
+                if ($history->event_type != 'VIEW') {
+                    $content->CustodialHistory->CustodialHistoryItem[] = $this->getCustodialHistoryItem($history);
+                }
+            }
 
-        foreach ($notes as $note) {
-            $content->custodialHistory->custodialHistoryItem[] = $this->getCustodialHistoryItem($note);
-        }*/
+            if (count($content->CustodialHistory->CustodialHistoryItem) == 0) {
+                unset($content->CustodialHistory);
+            }
+        }
 
         return $content;
     }
 
-    private function getManagement($letterbox)
+    private function getManagement($letterbox = null)
     {
         $management = new stdClass();
 
-        $docTypes = $this->db->getDocTypes($letterbox->type_id);
+        if ($letterbox && $letterbox->type_id != 0) {
+            $docTypes = $this->db->getDocTypes($letterbox->type_id);
 
-        $management->appraisalRule = new stdClass();
-        $management->appraisalRule->rule = new stdClass();
-        $management->appraisalRule->rule->value = $docTypes->retention_rule;
-        if ($docTypes->retention_final_disposition == "preservation") {
-            $management->appraisalRule->finalAction = "Keep";
-        } else {
-            $management->appraisalRule->finalAction = "Destroy";
+            $management->AppraisalRule = new stdClass();
+            $management->AppraisalRule->Rule = new stdClass();
+            $management->AppraisalRule->Rule->value = $docTypes->retention_rule;
+            $management->AppraisalRule->StartDate = date("Y-m-d");
+            if ($docTypes->retention_final_disposition == "conservation") {
+                $management->AppraisalRule->FinalAction = "Keep";
+            } else {
+                $management->AppraisalRule->FinalAction = "Destroy";
+            }
         }
 
+        if ((string) $this->xml->CONFIG->accessRuleCode) {
+            $management->AccessRule = new stdClass();
+            $management->AccessRule->Rule = new stdClass();
+            $management->AccessRule->Rule->value = (string)$this->xml->CONFIG->accessRuleCode;
+            $management->AccessRule->StartDate = date("Y-m-d");
+        }
 
         return $management;
     }
 
-    private function getBinaryDataObject($object, $attachment = false)
+    private function getBinaryDataObject($filePath, $id)
     {
-        $docServers = $this->db->getDocServer($object->docserver_id);
-
         $binaryDataObject = new stdClass();
 
-        if ($attachment) {
-            $binaryDataObject->id = $attachment . "_" . $object->res_id;
+        $pathInfo = pathinfo($filePath);
+
+        if ($id && $id != $pathInfo['filename']) {
+            $filename = $pathInfo['filename'] . '_' . $id . '.' . $pathInfo['extension'];
         } else {
-            $binaryDataObject->id = $object->res_id;
+            $filename = $pathInfo['filename'] . '_' . rand() . '.' . $pathInfo['extension'];
         }
 
-        $binaryDataObject->messageDigest = new stdClass();
-        $binaryDataObject->messageDigest->value = $object->fingerprint;
-        $binaryDataObject->messageDigest->algorithm = "sha256";
+        $binaryDataObject->id = $id;
+        $binaryDataObject->Uri = $filePath;
+        $binaryDataObject->MessageDigest = new stdClass();
+        $binaryDataObject->MessageDigest->value = hash_file('sha256', $filePath);
+        $binaryDataObject->MessageDigest->algorithm = "sha256";
+        $binaryDataObject->Size = filesize($filePath);
 
-        $binaryDataObject->size = new stdClass();
-        $binaryDataObject->size->value = $object->filesize;
 
-        $uri = str_replace("##", DIRECTORY_SEPARATOR, $object->path);
-        $uri = str_replace("#", DIRECTORY_SEPARATOR, $uri);
-        $uri .= $object->filename;
-        $binaryDataObject->uri = $docServers->path_template . $uri;
+        $binaryDataObject->Attachment = new stdClass();
+        $binaryDataObject->Attachment->filename = $filename;
 
-        $binaryDataObject->fileInfo = new stdClass();
-        $binaryDataObject->fileInfo->filename = basename($binaryDataObject->uri);
+        $binaryDataObject->FileInfo = new stdClass();
+        $binaryDataObject->FileInfo->Filename = $filename;
+
+        $binaryDataObject->FormatIdentification = new stdClass();
+        $binaryDataObject->FormatIdentification->MimeType = mime_content_type($filePath);
 
         return $binaryDataObject;
     }
@@ -354,17 +716,21 @@ class ArchiveTransfer
     private function getKeyword($informations, $type = null)
     {
         $keyword = new stdClass();
-        $keyword->keywordContent = new stdClass();
-
-        if ($type == "entitie") {
-            $keyword->keywordType = "corpname";
-            $keyword->keywordContent->value = $informations->business_id;
-        } else if ($informations->is_corporate_person == "Y") {
-            $keyword->keywordType = "corpname";
-            $keyword->keywordContent->value = $informations->society;
+        $keyword->KeywordContent = new stdClass();
+
+        if ($type == "entity") {
+            $keyword->KeywordType = "corpname";
+            $keyword->KeywordContent->value = $informations->business_id;
+        } elseif ($informations->is_corporate_person == "Y") {
+            $keyword->KeywordType = "corpname";
+            $keyword->KeywordContent->value = $informations->society;
         } else {
-            $keyword->keywordType = "persname";
-            $keyword->keywordContent->value = $informations->lastname . " " . $informations->firstname;
+            $keyword->KeywordType = "persname";
+            $keyword->KeywordContent->value = $informations->lastname . " " . $informations->firstname;
+        }
+
+        if (empty($keyword->KeywordContent->value)) {
+            return null;
         }
 
         return $keyword;
@@ -373,104 +739,138 @@ class ArchiveTransfer
     private function getAddresse($informations, $type = null)
     {
         $addressee = new stdClass();
-        if ($type == "entitie") {
-            $addressee->corpname = $informations->entity_label;
-            $addressee->identifier = $informations->business_id;
-        } else if ($informations->is_corporate_person == "Y") {
-            $addressee->corpname = $informations->society;
-            $addressee->identifier = $informations->contact_id;
+        if ($type == "entity") {
+            $addressee->Corpname = $informations->entity_label;
+            $addressee->Identifier = $informations->business_id;
+        } elseif ($informations->is_corporate_person == "Y") {
+            $addressee->Corpname = $informations->society;
+            $addressee->Identifier = $informations->contact_id;
         } else {
-            $addressee->firstName = $informations->firstname;
-            $addressee->birthName = $informations->lastname;
+            $addressee->FirstName = $informations->firstname;
+            $addressee->BirthName = $informations->lastname;
         }
 
+        if ((empty($addressee->Identifier) || empty($addressee->Corpname)) && (empty($addressee->FirstName) || empty($addressee->BirthName))) {
+            return null;
+        }
 
         return $addressee;
     }
 
-    private function getCustodialHistoryItem($note)
+    private function getCustodialHistoryItem($history)
     {
-        $custodialHistoryItem = new stdClass();
+        $date = new DateTime($history->event_date);
 
-        $custodialHistoryItem->value = $note->note_text;
-        $custodialHistoryItem->when = $note->date_note;
+        $custodialHistoryItem = new stdClass();
+        $custodialHistoryItem->value = $history->info;
+        $custodialHistoryItem->when = $date->format('Y-m-d');
 
         return $custodialHistoryItem;
     }
 
-    private function getEntitie($entityId, $param) {
-        $entitie = $this->db->getEntitie($entityId);
+    private function getEntity($entityId, $param)
+    {
+        $res = array_key_exists($entityId, $this->entities);
+        if ($res === false) {
+            $this->entities[$entityId] = $entity = $this->db->getEntity($entityId);
+        } else {
+            $entity = $this->entities[$entityId];
+        }
 
-        if (!$entitie) {
+        if (!$entity) {
             return false;
         }
 
-        if (!$entitie->business_id) {
-            $businessId = $this->getEntitieParent($entitie->parent_entity_id,'business_id');
+        if (!$entity->business_id) {
+            $businessId = $this->getEntityParent(
+                $entity->parent_entity_id,
+                'business_id'
+            );
 
             if (!$businessId) {
                 return false;
             }
 
-            $entitie->business_id = $businessId;
+            $entity->business_id = $businessId;
         }
 
-        if (!$entitie->archival_agreement) {
-            $archivalAgreement = $this->getEntitieParent($entitie->parent_entity_id,'archival_agreement');
+        if (!$entity->archival_agreement) {
+            $archivalAgreement = $this->getEntityParent(
+                $entity->parent_entity_id,
+                'archival_agreement'
+            );
 
             if (!$archivalAgreement) {
                 return false;
             }
 
-            $entitie->archival_agreement = $archivalAgreement;
+            $entity->archival_agreement = $archivalAgreement;
         }
 
-        if (!$entitie->archival_agency) {
-            $archivalAgency = $this->getEntitieParent($entitie->parent_entity_id,'archival_agency');
+        if (!$entity->archival_agency) {
+            $archivalAgency = $this->getEntityParent(
+                $entity->parent_entity_id,
+                'archival_agency'
+            );
 
             if (!$archivalAgency) {
                 return false;
             }
 
-            $entitie->archival_agency = $archivalAgency;
+            $entity->archival_agency = $archivalAgency;
         }
 
-        return $entitie;
+        return $entity;
     }
 
-    private function getEntitieParent($parentId,$param) {
-        $entitie = $this->db->getEntitie($parentId);
+    private function getEntityParent($parentId, $param)
+    {
+        $res = array_key_exists($parentId, $this->entities);
+        if ($res === false) {
+            $this->entities[$parentId] = $entity = $this->db->getEntity($parentId);
+        } else {
+            $entity = $this->entities[$parentId];
+        }
 
-        if (!$entitie) {
+        if (!$entity) {
             return false;
         }
 
         $res = false;
 
         if ($param == 'business_id') {
-            if (!$entitie->business_id) {
-                $res = $this->getEntitieParent($entitie->parent_entity_id,'business_id');
+            if (!$entity->business_id) {
+                $res = $this->getEntityParent(
+                    $entity->parent_entity_id,
+                    'business_id'
+                );
             } else {
-                $res = $entitie->business_id;
+                $res = $entity->business_id;
             }
         }
 
         if ($param == 'archival_agreement') {
-            if (!$entitie->archival_agreement) {
-                $res = $this->getEntitieParent($entitie->parent_entity_id,'archival_agreement');
+            if (!$entity->archival_agreement) {
+                $res = $this->getEntityParent(
+                    $entity->parent_entity_id,
+                    'archival_agreement'
+                );
             } else {
-                $res = $entitie->archival_agreement;
+                $res = $entity->archival_agreement;
             }
         }
 
         if ($param == 'archival_agency') {
-            if (!$entitie->archival_agency) {
-                $res = $this->getEntitieParent($entitie->parent_entity_id,'archival_agency');
+            if (!$entity->archival_agency) {
+                $res = $this->getEntityParent(
+                    $entity->parent_entity_id,
+                    'archival_agency'
+                );
             } else {
-                $res = $entitie->archival_agency;
+                $res = $entity->archival_agency;
             }
         }
 
         return $res;
     }
-}
\ No newline at end of file
+}
diff --git a/modules/export_seda/class/ArchiveTransferReply.php b/modules/export_seda/class/ArchiveTransferReply.php
old mode 100755
new mode 100644
index cde8d0fbbed8d2e8996dd9b75f95e2cd9163a310..957c7ec52445f3680909f063cf05029d644a7a0b
--- a/modules/export_seda/class/ArchiveTransferReply.php
+++ b/modules/export_seda/class/ArchiveTransferReply.php
@@ -20,49 +20,124 @@
 */
 
 require_once __DIR__ . DIRECTORY_SEPARATOR .'../DOMTemplateProcessor.php';
+require_once __DIR__ . '/AbstractMessage.php';
 
 class ArchiveTransferReply {
 
+    private $db;
     public function __construct()
     {
+        $this->db = new RequestSeda();
     }
 
-    public function send($data, $resIds)
+    public function receive($data, $resIds)
+    {
+        $messageObject = $this->getMessageObject($data);
+        $abstractMessage = new AbstractMessage();
+        //$this->db->insertMessage($data, "ArchiveTransferReply");
+        $abstractMessage->saveXml($messageObject,"ArchiveTransferReply", ".xml");
+
+        foreach ($resIds as $resId) {
+            $abstractMessage->addAttachment($messageObject->MessageIdentifier->value, $resId, $messageObject->MessageIdentifier->value.".xml", "xml", "Réponse au transfert",2);
+        }
+    }
+
+    private function getMessageObject($data)
     {
-        //$xml = simplexml_load_file($fileName);
         $messageObject = new stdClass();
 
-        if ($data->comments) {
-            $messageObject->comment = [];
-            if (is_array($data->comments)) {
-                foreach ($data->comments as $comment) {
-                    $messageObject->comment[] = $comment;
-                }
-            } else {
-                $messageObject->comment[] = $data->comments;
-            }
+        $messageObject->Comment = $data->comment;
+        $messageObject->Date = $data->date;
+        $messageObject->MessageIdentifier =  new stdClass();
+        $messageObject->MessageIdentifier->value = $data->messageIdentifier->value;
+
+        $messageObject->MessageRequestIdentifier =  new stdClass();
+        $messageObject->MessageRequestIdentifier->value = $data->messageRequestIdentifier->value;
+
+        $messageObject->ReplyCode = $data->replyCode->value . ' : ' . $data->replyCode->name;
+
+        $messageObject->ArchivalAgency = $this->getOrganisation($data->archivalAgency);
+        $messageObject->TransferringAgency = $this->getOrganisation($data->transferringAgency);
+
+        return $messageObject;
+    }
+
+    private function getOrganisation($data)
+    {
+        $organisationObject = new stdClass();
+        $organisationObject->Identifier = new stdClass();
+        $organisationObject->Identifier->value = $data->id;
+
+        $organisationObject->OrganizationDescriptiveMetadata = new stdClass();
+        $organisationObject->OrganizationDescriptiveMetadata->Name = $data->name;
+        $organisationObject->OrganizationDescriptiveMetadata->LegalClassification = $data->legalClassification;
+
+        if ($data->address) {
+            $organisationObject->OrganizationDescriptiveMetadata->Address = $this->getAddress($data->address);
         }
 
-        $messageObject->date = $data->date;
-        $messageObject->messageIdentifier =  new stdClass();
-        $messageObject->messageIdentifier->value = $data->reference;
+        if ($data->communication) {
+            $organisationObject->OrganizationDescriptiveMetadata->Communication = $this->getCommunication($data->communication);
+        }
 
-        $messageObject->messageReceivedIdentifier =  new stdClass();
-        $messageObject->messageReceivedIdentifier->value = $data->requestReference;
+        if ($data->contact) {
+            $organisationObject->OrganizationDescriptiveMetadata->Contact = $this->getContact($data->contact);
+        }
 
-        $messageObject->sender = new stdClass();
-        $messageObject->sender->identifier = new stdClass();
-        $messageObject->sender->identifier->value = $data->senderOrgRegNumber;
+        return $organisationObject;
+    }
 
-        $messageObject->receiver = new stdClass();
-        $messageObject->receiver->identifier = new stdClass();
-        $messageObject->receiver->identifier->value = $data->recipientOrgRegNumber;
+    private function getContact($data)
+    {
+        $listContact = [];
+        foreach ($data as $contact) {
+            $tmpContact =  new stdClass();
+            $tmpContact->DepartmentName = $contact->departmentName;
+            $tmpContact->PersonName = $contact->personName;
 
-        $this->saveXml($messageObject);
+            if ($contact->address){
+                $tmpContact->Address = [];
+                $tmpContact->Address = $this->getAddress($contact->address);
+            }
 
-        foreach ($resIds as $resId) {
-            $this->addAttachment($messageObject->messageIdentifier->value, $resId, $messageObject->messageIdentifier->value.".txt", "txt", "Accusé de reception");
+            if ($contact->communication) {
+                $tmpContact->Communication = [];
+                $tmpContact->Communication = $this->getCommunication($contact->communication);
+            }
+            $listContact[] = $tmpContact;
         }
+        return $listContact;
     }
 
-}
\ No newline at end of file
+    private function getAddress($data)
+    {
+        $listAddress = [];
+        foreach ($data as $address) {
+            $tmpAddress = new stdClass();
+            $tmpAddress->CityName = $address->cityName;
+            $tmpAddress->Country = $address->country;
+            $tmpAddress->PostCode = $address->postCode;
+            $tmpAddress->StreetName = $address->streetName;
+
+            $listAddress[] = $tmpAddress;
+        }
+        return $listAddress;
+    }
+
+    private function getCommunication($data)
+    {
+        $listCommunication = [];
+        foreach ($data as $communication) {
+            $tmpCommunication = new stdClass();
+            $tmpCommunication->Channel = $communication->channel;
+
+            if ($communication->completeNumber) {
+                $tmpCommunication->value = $communication->completeNumber;
+            } else {
+                $tmpCommunication->value = $communication->URIID;
+            }
+            $listCommunication[] = $tmpCommunication;
+        }
+        return $listCommunication;
+    }
+}
diff --git a/modules/export_seda/export_seda.php b/modules/export_seda/export_seda.php
old mode 100755
new mode 100644
index e252bafa28fa6220bb23ec14937818489a895cc9..56c27523f58db1aa6b43975d842de32ce812ddd2
--- a/modules/export_seda/export_seda.php
+++ b/modules/export_seda/export_seda.php
@@ -33,22 +33,22 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module,
     $archiveTransfer = new ArchiveTransfer();
     $db = new RequestSeda();
     foreach ($values as $value) {
-        $letter = $db->getLetter($value);
+        $status = $db->getStatusLetter($value);
 
-        if ($letter->status == 'SEND_SEDA') {
+        if ($status == 'SEND_SEDA') {
             $_SESSION['error'] = _ERROR_MESSAGE_ALREADY_SENT . " " . $value;
         }
     }
 
-    if (!$_SESSION['error']) {
-        $result = $archiveTransfer->deleteMessage($values);
+    $result = $archiveTransfer->deleteMessage($values);
 
-        $result = $archiveTransfer->receive($values);
+    $result = $archiveTransfer->receive($values);
 
+    if (!$_SESSION['error']) {
         $db = new Database();
         $stmt = $db->query("select message_id from unit_identifier where res_id = ?", array($values[0]));
         $unitIdentifier = $stmt->fetchObject();
-        $stmt = $db->query("select data from seda where message_id = ?", array($unitIdentifier->message_id));
+        $stmt = $db->query("select data from message_exchange where message_id = ?", array($unitIdentifier->message_id));
 
         $messageData = $stmt->fetchObject();
 
@@ -56,27 +56,29 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module,
 
 
         $frm_str = '<div id="frm_error_'.$id_action.'" class="error"></div>';
-        $frm_str .= '<h2 class="title">'._MESSAGE.' '. $messageObject->messageIdentifier->value;
+        $frm_str .= '<h2 class="title">'._MESSAGE.' '. $messageObject->MessageIdentifier->value;
         $frm_str .= '</h2><br/>';
         $frm_str .= '<div class="block forms details" >';
 
         // Information Message
-        $frm_str .= '<h3 class="title">'._INFORMATION_MESSAGE.'</h3>';
+        $frm_str .= '<div align="center"><h3>'. _PACKAGE_TITLE.'</h3><br/>';
+        $frm_str .= '<input type="text" id="messageTitle" name="messageTitle" placeholder="'._PACKAGE_TITLE.'"></div><br/>';
+        $frm_str .= '<h4 class="title">'._INFORMATION_MESSAGE.'</h4>';
         $frm_str .= '<table width="100%" cellspacing="2" cellpading="2" border="0"><tbody><tr class="col"><br/>';
         $frm_str .='<td><b>'._MESSAGE_IDENTIFIER.':</b></td>';
-        $frm_str .= '<td><input type="text" id="messageIdentifier" name="messageIdentifier" value="'.$messageObject->messageIdentifier->value. '" disabled></td>';
+        $frm_str .= '<td><input type="text" id="messageIdentifier" name="messageIdentifier" value="'.$messageObject->MessageIdentifier->value. '" disabled></td>';
         $frm_str .='<td><b>'._DATE.':</b></td>';
-        $frm_str .= '<td><input type="text" id="date" name="date" value="'.$messageObject->date. '" disabled></td></tr><tr class="col">';
+        $frm_str .= '<td><input type="text" id="date" name="date" value="'.$messageObject->Date. '" disabled></td></tr><tr class="col">';
         $frm_str .='<td><b>'._ARCHIVAL_AGREEMENT.':</b></td>';
-        $frm_str .= '<td><input type="text" id="archivalAgreement" name="archivalAgreement" value="'.$messageObject->archivalAgreement->value. '" disabled></td>';
+        $frm_str .= '<td><input type="text" id="archivalAgreement" name="archivalAgreement" value="'.$messageObject->ArchivalAgreement->value. '" disabled></td>';
         $frm_str .='<td><b>'._ARCHIVAL_AGENCY_SIREN.':</b></td>';
-        $frm_str .= '<td><input type="text" id="archivalAgency" name="archivalAgency" value="'.$messageObject->archivalAgency->identifier->value. '" disabled></td></tr><tr class="col">';
+        $frm_str .= '<td><input type="text" id="archivalAgency" name="archivalAgency" value="'.$messageObject->ArchivalAgency->Identifier->value. '" disabled></td></tr><tr class="col">';
         $frm_str .='<td><b>'._TRANSFERRING_AGENCY_SIREN.':</b></td>';
-        $frm_str .= '<td><input type="text" id="transferringAgency" name="transferringAgency" value="'.$messageObject->transferringAgency->identifier->value. '" disabled></td>';
+        $frm_str .= '<td><input type="text" id="transferringAgency" name="transferringAgency" value="'.$messageObject->TransferringAgency->Identifier->value. '" disabled></td>';
         $frm_str .= '</tr></tbody></table><hr />';
 
 
-        foreach ($messageObject->dataObjectPackage->descriptiveMetadata as $archiveUnit) {
+        foreach ($messageObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->ArchiveUnit as $archiveUnit) {
             $frm_str .= viewArchiveUnit($archiveUnit);
         }
 
@@ -84,13 +86,14 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module,
 
         $frm_str .= '</div>';
         $frm_str .='<div align="center">';
-        $frm_str .='<input type="button" name="zip" id="zip" class="button"  value="'._ZIP.'" onclick="actionSeda(\''.$path_to_script.'&page=Ajax_seda_zip&reference='.$messageObject->messageIdentifier->value.'\',\'zip\');"/>&nbsp&nbsp&nbsp';
+        //$frm_str .='<input type="button" name="generateMessage" id="generateMessage" class="button"  value="'._GENERATE_MESSAGE.'" onclick="actionSeda(\''.$path_to_script.'&page=Ajax_generate_message&reference='.$messageObject->MessageIdentifier->value.'\',\'generateMessage\');"/>&nbsp&nbsp&nbsp';
+        $frm_str .='<input type="button" name="zip" id="zip" class="button"  value="'._ZIP.'" onclick="actionSeda(\''.$path_to_script.'&page=Ajax_generate_message&reference='.$messageObject->MessageIdentifier->value.'|'.$path_to_script.'&page=Ajax_seda_zip&reference='.$messageObject->MessageIdentifier->value.'\',\'zip\');"/>&nbsp&nbsp&nbsp';
         if (file_exists(__DIR__.DIRECTORY_SEPARATOR. 'xml' . DIRECTORY_SEPARATOR . "config.xml")) {
-            $frm_str .= '<input type="button" name="sendMessage" id="sendMessage" class="button"  value="' . _SEND_MESSAGE . '" onclick="actionSeda(\'' . $path_to_script . '&page=Ajax_transfer_SAE&reference=' . $messageObject->messageIdentifier->value . '&resIds=' . $result . '\',\'sendMessage\');"/>';
+            $frm_str .= '<input type="button" name="sendMessage" id="sendMessage" style="disabled: disabled " class="button"  value="' . _SEND_MESSAGE . '" onclick="actionSeda(\''.$path_to_script.'&page=Ajax_generate_message&reference='.$messageObject->MessageIdentifier->value.'|'. $path_to_script . '&page=Ajax_transfer_SAE&reference=' . $messageObject->MessageIdentifier->value . '&resIds=' . $result . '\',\'sendMessage\');"/>';
         }
             $frm_str .='</div>';
 
-        $frm_str .='<div align="center"  name="validSend" id="validSend" style="display: none "><input type="button" class="button" name="validateMessage" id="validateMessage" value="'._VALIDATE_MANUAL_DELIVERY.'" onclick="actionSeda(\''.$path_to_script.'&page=Ajax_validate_change_status&reference='.$messageObject->messageIdentifier->value.'\',\'validateMessage\');"/></div>';
+        $frm_str .='<div align="center"  name="validSend" id="validSend" style="display: none "><input type="button" class="button" name="validateMessage" id="validateMessage" value="'._VALIDATE_MANUAL_DELIVERY.'" onclick="actionSeda(\''.$path_to_script.'&page=Ajax_validate_change_status&reference='.$messageObject->MessageIdentifier->value.'\',\'validateMessage\');"/></div>';
     } else {
         $frm_str .='<div align="center" style="color:red">';
         $frm_str .= $_SESSION['error'];
@@ -108,46 +111,35 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module,
     return addslashes($frm_str);
 }
 
-function manage_form($arr_id, $history, $id_action, $label_action, $status)
-{
-    // récupérer l'entité racine du courrier *
-    // récupérer archival_agency et archival_agreement *
-
-    // récupérer la retention_final_disposition et retention_rule du type de doc du courrier *
-
-    // appel fonction de transfert et génération bdx *
-
-    
-
-    // historisation du transfert
-
-    // modification statut -> fait automatiquement par mécanique bannette
-
-    // ensuite il y a aura une suppression logique des documents et des contacts (si plus de courriers associés)
-
-    //return array('result' => $result, 'history_msg' => '');
-}
-
 function viewArchiveUnit($archiveUnit, $archiveUnitChildren = false) 
 {
     $frm_str = '';
+    $frm_str .= '<h4 onclick="new Effect.toggle(\''. $archiveUnit->id .'_fields\', \'blind\', {delay:0.2});'
+        . 'whatIsTheDivStatus(\''. $archiveUnit->id .'_fields\', \'divStatus_'. $archiveUnit->id .'_fields\');" '
+        . 'class="categorie" style="width:90%;" onmouseover="this.style.cursor=\'pointer\';">';
+
     if (!$archiveUnitChildren) {
-        $frm_str .= '<h3 class="title">'._INFORMATION_ARCHIVE. ' "'. $archiveUnit->content->title[0].'"</h3>';
+        $frm_str .= ' <span id="divStatus_'. $archiveUnit->id .'_fields" style="color:#1C99C5;"><i class="fa fa-plus-square-o"></i></span>&nbsp;'
+            . _INFORMATION_ARCHIVE. ' "'. $archiveUnit->Content->Title[0];
     } else {
-        $frm_str .= '<h4 class="title">'._INFORMATION_ARCHIVE_CHILDREN. ' "'. $archiveUnit->content->title[0].'"</h4>';
+        $frm_str .= ' <span style="margin-left:2%" id="divStatus_'. $archiveUnit->id .'_fields" style="color:#1C99C5;"><i class="fa fa-plus-square-o"></i></span>&nbsp;'
+            . _INFORMATION_ARCHIVE_CHILDREN. ' "'. $archiveUnit->Content->Title[0];
     }
+
+    $frm_str .= '</h4>';
+    $frm_str .= '<div id="'. $archiveUnit->id .'_fields"  style="display:none">';
     
     $frm_str .= '<table width="100%" cellspacing="2" cellpading="2" border="0"><tbody><tr class="col"><br/>';
     $frm_str .='<td><b>'._ARCHIVE_IDENTIFIER.':</b></td>';
     $frm_str .= '<td><input type="text" id="archiveIdentifier" name="archiveIdentifier" value="'.$archiveUnit->id. '" disabled></td></tr>';
 
-    if ($archiveUnit->management) {
+    if ($archiveUnit->Management) {
         
         $frm_str .='<tr class="col"><td><b>'._APPRAISAL_RULE.':</b></td>';
-        $frm_str .= '<td><input type="text" id="rule" name="rule" value="'.$archiveUnit->management->appraisalRule->rule->value. '" disabled></td>';
+        $frm_str .= '<td><input type="text" id="rule" name="rule" value="'.$archiveUnit->Management->AppraisalRule->Rule->value. '" disabled></td>';
         $frm_str .='<td><b>'._APPRAISAL_FINAL_DISPOSITION.':</b></td>';
 
-        if ($archiveUnit->management->appraisalRule->finalAction == 'Destroy') {
+        if ($archiveUnit->Management->AppraisalRule->FinalAction == 'Destroy') {
             $frm_str .= '<td><input type="text" id="finalAction" name="finalAction" value="'._DESTROY. '" disabled></td>';
         } else {
             $frm_str .= '<td><input type="text" id="finalAction" name="finalAction" value="'._KEEP. '" disabled></td>';
@@ -157,43 +149,44 @@ function viewArchiveUnit($archiveUnit, $archiveUnitChildren = false)
 
     $frm_str .= '<tr class="col"><td><b>'._DESCRIPTION_LEVEL.':</b></td>';
 
-    if ($archiveUnit->content->descriptionLevel == "File") {
+    if ($archiveUnit->Content->DescriptionLevel == "File") {
         $frm_str .= '<td><input type="text" id="descriptionLevel" name="descriptionLevel" value="'._FILE. '" disabled></td>';
-    }elseif ($archiveUnit->content->descriptionLevel == "Item") {
+    }elseif ($archiveUnit->Content->DescriptionLevel == "Item") {
         $frm_str .= '<td><input type="text" id="descriptionLevel" name="descriptionLevel" value="'._ITEM. '" disabled></td>';
     }else {
-        $frm_str .= '<td><input type="text" id="descriptionLevel" name="descriptionLevel" value="'.$archiveUnit->content->descriptionLevel. '" disabled></td>';
+        $frm_str .= '<td><input type="text" id="descriptionLevel" name="descriptionLevel" value="'.$archiveUnit->Content->DescriptionLevel. '" disabled></td>';
     }
     
     $frm_str .= '<td><b>'._DOCUMENT_TYPE.':</b></td>';
 
-    if ($archiveUnit->content->documentType == "Reply") {
+    if ($archiveUnit->Content->DocumentType == "Reply") {
         $frm_str .= '<td><input type="text" id="documentType" name="documentType" value="'._REPLY. '" disabled></td></tr>';
-    }elseif ($archiveUnit->content->documentType == "Attachment") {
+    }elseif ($archiveUnit->Content->DocumentType == "Attachment") {
         $frm_str .= '<td><input type="text" id="documentType" name="documentType" value="'._ATTACHMENT. '" disabled></td></tr>';
     } else {
-        $frm_str .= '<td><input type="text" id="documentType" name="documentType" value="'.$archiveUnit->content->documentType. '" disabled></td></tr>';
+        $frm_str .= '<td><input type="text" id="documentType" name="documentType" value="'.$archiveUnit->Content->DocumentType. '" disabled></td></tr>';
     }
 
-    
-    
-    if ($archiveUnit->content->receivedDate) {
-        $frm_str .= '<tr class="col"><td><b>'._RECEIVED_DATE.':</b></td>';
-        $frm_str .= '<td><input type="text" id="receivedDate" name="receivedDate" value="'.$archiveUnit->content->receivedDate. '" disabled></td>';
+    if ($archiveUnit->Content->SentDate) {
+        $frm_str .= '<tr class="col"><td><b>'._SENT_DATE.':</b></td>';
+        $frm_str .= '<td><input type="text" id="sentDate" name="sentDate" value="'.$archiveUnit->Content->SentDate. '" disabled></td>';
     }
-    
-    if ($archiveUnit->content->sentDate) {
-        $frm_str .= '<td><b>'._SENT_DATE.':</b></td>';
-        $frm_str .= '<td><input type="text" id="sentDate" name="sentDate" value="'.$archiveUnit->content->sentDate. '" disabled></td></tr>';
+
+    if ($archiveUnit->Content->ReceivedDate) {
+        $frm_str .= '<td><b>'._RECEIVED_DATE.':</b></td>';
+        $frm_str .= '<td><input type="text" id="receivedDate" name="receivedDate" value="'.$archiveUnit->Content->ReceivedDate. '" disabled></td></tr>';
     }
-    
-    $frm_str .= '</tr></tbody></table>';
 
-    if ($archiveUnit->archiveUnit) {
-        foreach ($archiveUnit->archiveUnit as $archiveUnitChildren) {
+    $frm_str .= '</tr></tbody></table><br>';
+
+    if ($archiveUnit->ArchiveUnit) {
+        foreach ($archiveUnit->ArchiveUnit as $archiveUnitChildren) {
             $frm_str .= viewArchiveUnit($archiveUnitChildren,true);
         }
     }
 
+    $frm_str .= '<div>';
+    $frm_str .= '</div></div><br>';
+
     return $frm_str;
 }
diff --git a/modules/export_seda/export_seda_list.php b/modules/export_seda/export_seda_list.php
new file mode 100644
index 0000000000000000000000000000000000000000..401de4ff5806752bd74e3f4ceb751709fd3a37cc
--- /dev/null
+++ b/modules/export_seda/export_seda_list.php
@@ -0,0 +1,578 @@
+<?php
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
+
+* @brief   documents_list_with_avis
+* @author  dev <dev@maarch.org>
+* @ingroup avis
+*/
+
+require_once 'core/class/class_request.php';
+require_once 'core/class/class_security.php';
+require_once 'apps/' . $_SESSION['config']['app_id'] . '/class/class_contacts_v2.php';
+require_once 'core/class/class_manage_status.php';
+require_once 'apps/' . $_SESSION['config']['app_id'] . '/class/class_lists.php';
+
+$status_obj = new manage_status();
+$security   = new security();
+$core_tools = new core_tools();
+$request    = new request();
+$contact    = new contacts_v2();
+$list       = new lists();
+
+//Include definition fields
+require_once 'apps/' . $_SESSION['config']['app_id'] . '/definition_mail_categories.php';
+
+//Order
+$order = $order_field = '';
+$order = $list->getOrder();
+$order_field = $list->getOrderField();
+$_SESSION['save_list']['order'] = $order;
+$_SESSION['save_list']['order_field'] = $order_field;
+//URL extra Parameters
+$parameters = '';
+$start = $list->getStart();
+if (!empty($order_field) && !empty($order)) $parameters .= '&order='.$order.'&order_field='.$order_field;
+if (!empty($what)) $parameters .= '&what='.$what;
+if (!empty($selectedTemplate)) $parameters .= '&template='.$selectedTemplate;
+if (!empty($start)) $parameters .= '&start='.$start;
+$_SESSION['save_list']['start'] = $start;
+
+
+
+//Keep some parameters
+$parameters = '';
+if (isset($_REQUEST['order']) && !empty($_REQUEST['order'])) {
+
+    $parameters .= '&order='.$_REQUEST['order'];
+    $_SESSION['save_list']['order'] = $_REQUEST['order'];
+
+    if (isset($_REQUEST['order_field']) && !empty($_REQUEST['order_field'])) {
+        $parameters .= '&order_field='.$_REQUEST['order_field'];
+        $_SESSION['save_list']['order_field'] = $_REQUEST['order_field'];
+    }
+}
+if (isset($_REQUEST['what']) && !empty($_REQUEST['what'])) {
+    $parameters .= '&what='.$_REQUEST['what'];
+}
+if (isset($_REQUEST['template']) && !empty($_REQUEST['template'])) {
+    $parameters .= '&template='.$_REQUEST['template'];
+}
+if (isset($_REQUEST['start']) && !empty($_REQUEST['start'])) {
+    $parameters .= '&start='.$_REQUEST['start'];
+    $_SESSION['save_list']['start'] = $_REQUEST['start'];
+}
+
+//URL extra parameters
+$urlParameters = '';
+
+//origin
+if ($_REQUEST['origin'] == 'searching') $urlParameters .= '&origin=searching';
+
+//Basket information
+if (!empty($_SESSION['current_basket']['view'])) {
+    $table = $_SESSION['current_basket']['view'];
+} else {
+    $table = $_SESSION['current_basket']['table'];
+}
+$_SESSION['origin'] = 'basket';
+$_SESSION['collection_id_choice'] = $_SESSION['current_basket']['coll_id'];//Collection
+
+//Table
+$select[$table]= array();
+
+//Fields
+/*array_push(
+    $select[$table], "res_id", "status", "category_id as category_img",
+    "contact_firstname", "contact_lastname", "contact_society", "user_lastname",
+    "user_firstname", "priority", "creation_date", 'modification_date', "admission_date", "date_current_use", "subject",
+    "process_limit_date", 'recommendation_limit_date', "entity_label", "dest_user", "category_id", "type_label",
+    "exp_user_id", "count_attachment", "alt_identifier", "is_multicontacts", "locker_user_id", "locker_time", "address_id"
+);*/
+
+array_push(
+    $select[$table], "res_id", "status", "category_id as category_img",
+    "contact_firstname", "contact_lastname", "contact_society", "user_lastname",
+    "user_firstname", "priority", "creation_date", 'modification_date', "admission_date", "subject",
+    "process_limit_date", 'recommendation_limit_date', "entity_label", "dest_user", "category_id", "type_label",
+    "exp_user_id", "count_attachment", "alt_identifier", "is_multicontacts", "locker_user_id", "locker_time", "address_id"
+);
+
+$arrayPDO = array();
+//Where clause
+$where_tab = array();
+//From basket
+if (!empty($_SESSION['current_basket']['clause'])) $where_tab[] = '('.stripslashes($_SESSION['current_basket']['clause']).')'; //Basket clause
+//From filters
+$filterClause = $list->getFilters();
+if (!empty($filterClause)) $where_tab[] = $filterClause;//Filter clause
+//From search
+if ((isset($_REQUEST['origin']) && $_REQUEST['origin'] == 'searching')
+    && !empty($_SESSION['searching']['where_request'])
+) {
+    $where_tab[] = $_SESSION['searching']['where_request']. '(1=1)';
+    $arrayPDO = array_merge($arrayPDO, $_SESSION['searching']['where_request_parameters']);
+}
+//Build where
+$where = implode(' and ', $where_tab);
+
+//Order
+$order = $order_field = '';
+$order = $list->getOrder();
+$order_field = $list->getOrderField();
+if (!empty($order_field) && !empty($order)) {
+    if ($_REQUEST['order_field'] == 'alt_identifier') {
+        $orderstr = "order by order_alphanum(alt_identifier)"." ".$order;
+    } else {
+        $orderstr = "order by ".$order_field." ".$order;
+    }
+    $_SESSION['last_order_basket'] = $orderstr;
+} else if (!empty($_SESSION['save_list']['order']) && !empty($_SESSION['save_list']['order_field'])) {
+    if ($_SESSION['save_list']['order_field'] == 'alt_identifier') {
+        $orderstr = "order by order_alphanum(alt_identifier)"." ".$_SESSION['save_list']['order'];
+    } else {
+        $orderstr = "order by ".$_SESSION['save_list']['order_field']." ".$_SESSION['save_list']['order'];
+    }
+    $_SESSION['last_order_basket'] = $orderstr;
+} else {
+    $list->setOrder();
+    $list->setOrderField('modification_date');
+    $orderstr = "order by modification_date desc";
+    $_SESSION['last_order_basket'] = $orderstr;
+}
+
+//Request
+$tab=$request->PDOselect($select, $where, $arrayPDO, $orderstr, $_SESSION['config']['databasetype'], $_SESSION['config']['databasesearchlimit'], false, "", "", "", false, false, 'distinct');
+// $request->show(); exit;
+//Templates
+$defaultTemplate = 'documents_list_with_attachments';
+$selectedTemplate = $list->getTemplate();
+if (empty($selectedTemplate)) {
+    if (!empty($defaultTemplate)) {
+        $list->setTemplate($defaultTemplate);
+        $selectedTemplate = $list->getTemplate();
+    }
+}
+
+
+//For status icon
+$extension_icon = '';
+if($selectedTemplate <> 'none') $extension_icon = "_big";
+
+$db = new Database();
+
+//Result Array
+
+$tabI = count($tab);
+for ($i=0;$i<$tabI;$i++) {
+
+    $tabJ = count($tab[$i]);
+    for ($j=0;$j<$tabJ;$j++) {
+
+        foreach (array_keys($tab[$i][$j]) as $value) {
+
+            if ($tab[$i][$j][$value]=="res_id") {
+
+                $tab[$i][$j]["res_id"]=$tab[$i][$j]['value'];
+                $tab[$i][$j]["label"]=_GED_NUM;
+                $tab[$i][$j]["size"]="4";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=true;
+                $tab[$i][$j]["order"]='res_id';
+                $_SESSION['mlb_search_current_res_id'] = $tab[$i][$j]['value'];
+
+                // notes
+                $query = "SELECT ";
+                $query .= "notes.id ";
+                $query .= "FROM ";
+                $query .= "notes ";
+                $query .= "left join ";
+                $query .= "note_entities ";
+                $query .= "on ";
+                $query .= "notes.id = note_entities.note_id ";
+                $query .= "WHERE ";
+                $query .= "tablename = 'res_letterbox' ";
+                $query .= "AND ";
+                $query .= "coll_id = 'letterbox_coll' ";
+                $query .= "AND ";
+                $query .= "identifier = ? ";
+                $arrayPDOnotes = array($tab[$i][$j]['value']);
+                $query .= "AND ";
+                $query .= "( ";
+                $query .= "( ";
+                $query .= "item_id IN (";
+
+                foreach ($_SESSION['user']['entities'] as $entitiestmpnote) {
+                    $query .= "?, ";
+                    $arrayPDOnotes = array_merge($arrayPDOnotes, array($entitiestmpnote['ENTITY_ID']));
+                }
+                $query = substr($query, 0, -2);
+
+                $query .= ") ";
+                $query .= "OR ";
+                $query .= "item_id IS NULL ";
+                $query .= ") ";
+                $query .= "OR ";
+                $query .= "user_id = ? ";
+                $arrayPDOnotes = array_merge($arrayPDOnotes, array($_SESSION['user']['UserId']));
+                $query .= ") ";
+                $stmt = $db->query($query, $arrayPDOnotes);
+                $tab[$i][$j]['hasNotes'] = $stmt->fetchObject();
+                $tab[$i][$j]['res_multi_contacts'] = $_SESSION['mlb_search_current_res_id'];
+            }
+            if ($tab[$i][$j][$value]=="creation_date") {
+
+                $tab[$i][$j]["value"]=$core_tools->format_date_db($tab[$i][$j]["value"], false, '', true);
+                $tab[$i][$j]["label"]=_CREATION_DATE;
+                $tab[$i][$j]["size"]="10";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=true;
+                $tab[$i][$j]["order"]='creation_date';
+            }
+            if ($tab[$i][$j][$value]=="modification_date") {
+
+                $tab[$i][$j]["value"] = $core_tools->format_date_db($tab[$i][$j]["value"], false, '', true);
+                $tab[$i][$j]["label"] = _MODIFICATION_DATE;
+                $tab[$i][$j]["size"]="10";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=true;
+                $tab[$i][$j]["order"]='modification_date';
+            }
+            /*if ($tab[$i][$j][$value]=="date_current_use") {
+
+                $tab[$i][$j]["value"] = $core_tools->format_date_db($tab[$i][$j]["value"], false, '', true);
+                $tab[$i][$j]["label"] = _DATE_CURRENT_USE;
+                $tab[$i][$j]["size"]="10";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=true;
+                $tab[$i][$j]["order"]='date_current_use';
+            }*/
+            if ($tab[$i][$j][$value]=="admission_date") {
+
+                $tab[$i][$j]["value"]=$core_tools->format_date_db($tab[$i][$j]["value"], false);
+                $tab[$i][$j]["label"]=_ADMISSION_DATE;
+                $tab[$i][$j]["size"]="10";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=false;
+                $tab[$i][$j]["order"]='admission_date';
+            }
+            if ($tab[$i][$j][$value]=="process_limit_date") {
+
+                $tab[$i][$j]["value"]=$core_tools->format_date_db($tab[$i][$j]["value"], false);
+                $compareDate = "";
+                if ($tab[$i][$j]["value"] <> "" && ($statusCmp == "NEW" || $statusCmp == "COU" || $statusCmp == "VAL" || $statusCmp == "RET")) {
+
+                    $compareDate = $core_tools->compare_date($tab[$i][$j]["value"], date("d-m-Y"));
+                    if ($compareDate == "date2") {
+
+                        $tab[$i][$j]["value"] = "<span style='color:red;'><b>".$tab[$i][$j]["value"]."<br><small>(".$core_tools->nbDaysBetween2Dates($tab[$i][$j]["value"], date("d-m-Y"))." "._DAYS.")<small></b></span>";
+
+                    } elseif ($compareDate == "date1") {
+
+                        $tab[$i][$j]["value"] = $tab[$i][$j]["value"]."<br><small>(".$core_tools->nbDaysBetween2Dates(date("d-m-Y"), $tab[$i][$j]["value"])." "._DAYS.")<small>";
+
+                    } elseif ($compareDate == "equal") {
+
+                        $tab[$i][$j]["value"] = "<span style='color:blue;'><b>".$tab[$i][$j]["value"]."<br><small>("._LAST_DAY.")<small></b></span>";
+                    }
+                }
+                $tab[$i][$j]["label"]=_PROCESS_LIMIT_DATE;
+                $tab[$i][$j]["size"]="10";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=true;
+                $tab[$i][$j]["order"]='process_limit_date';
+            }
+            if ($tab[$i][$j][$value]=="recommendation_limit_date") {
+
+                $tab[$i][$j]["value"]=$core_tools->format_date_db($tab[$i][$j]["value"], false);
+                $tab[$i][$j]["label"]=_RECOMMENDATION_LIMIT_DATE;
+                $tab[$i][$j]["size"]="10";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=false;
+                $tab[$i][$j]["order"]='recommendation_limit_date';
+            }
+            if ($tab[$i][$j][$value]=="category_id") {
+
+                $_SESSION['mlb_search_current_category_id'] = $tab[$i][$j]["value"];
+                $tab[$i][$j]["value"] = $_SESSION['coll_categories'][$_SESSION['collection_id_choice']][$tab[$i][$j]["value"]];
+                $tab[$i][$j]["label"]=_CATEGORY;
+                $tab[$i][$j]["size"]="10";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=true;
+                $tab[$i][$j]["order"]='category_id';
+            }
+            if ($tab[$i][$j][$value]=="priority") {
+
+                $tab[$i][$j]["value"] = $_SESSION['mail_priorities'][$tab[$i][$j]["value"]];
+                $tab[$i][$j]["label"]=_PRIORITY;
+                $tab[$i][$j]["size"]="10";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=false;
+                $tab[$i][$j]["order"]='priority';
+            }
+            if ($tab[$i][$j][$value]=="subject") {
+
+                $tab[$i][$j]["value"] = $request->cut_string($request->show_string($tab[$i][$j]["value"], '', '', '', false), 250);
+                $tab[$i][$j]["label"]=_SUBJECT;
+                $tab[$i][$j]["size"]="12";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=true;
+                $tab[$i][$j]["order"]='subject';
+            }
+            if ($tab[$i][$j][$value]=="contact_firstname") {
+
+                $contact_firstname = $tab[$i][$j]["value"];
+                $tab[$i][$j]["show"]=false;
+            }
+            if ($tab[$i][$j][$value]=="contact_lastname") {
+
+                $contact_lastname = $tab[$i][$j]["value"];
+                $tab[$i][$j]["show"]=false;
+            }
+            if ($tab[$i][$j][$value]=="contact_society") {
+
+                $contact_society = $tab[$i][$j]["value"];
+                $tab[$i][$j]["show"]=false;
+            }
+            if ($tab[$i][$j][$value]=="user_firstname") {
+
+                $user_firstname = $tab[$i][$j]["value"];
+                $tab[$i][$j]["show"]=false;
+            }
+            if ($tab[$i][$j][$value]=="user_lastname") {
+
+                $user_lastname = $tab[$i][$j]["value"];
+                $tab[$i][$j]["show"]=false;
+            }
+            if ($tab[$i][$j][$value]=="exp_user_id") {
+
+                if (empty($contact_lastname) && empty($contact_firstname) && empty($user_lastname) && empty($user_firstname)) {
+                    $query = "SELECT ca.firstname, ca.lastname FROM contact_addresses ca, res_view_letterbox rvl
+                                WHERE rvl.res_id = ?
+                                AND rvl.address_id = ca.id AND rvl.exp_contact_id = ca.contact_id";
+                    $arrayPDO = array($tab[$i][0]['res_id']);
+                    $stmt2 = $db->query($query, $arrayPDO);
+                    $return_contact = $stmt2->fetchObject();
+                    if (!empty($return_contact)) {
+                        $contact_firstname = $return_contact->firstname;
+                        $contact_lastname = $return_contact->lastname;
+                    }
+                }
+
+                $tab[$i][$j]["label"]=_CONTACT;
+                $tab[$i][$j]["size"]="10";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=false;
+                $tab[$i][$j]["value_export"] = $tab[$i][$j]['value'];
+                $tab[$i][$j]["value"] = $contact->get_contact_information_from_view($_SESSION['mlb_search_current_category_id'], $contact_lastname, $contact_firstname, $contact_society, $user_lastname, $user_firstname);
+                $tab[$i][$j]["order"]=false;
+            }
+            if ($tab[$i][$j][$value]=="dest_user") {
+
+                $tab[$i][$j]["label"]="dest_user";
+                $tab[$i][$j]["size"]="10";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=false;
+                $tab[$i][$j]["value_export"] = $tab[$i][$j]['value'];
+                if ($tab[$i][15]["value"]=='outgoing') {
+                    $tab[$i][$j]["value"] = "<b>"._TO_CONTACT_C."</b>".$tab[$i][$j]['value'];
+                } else {
+                    $tab[$i][$j]["value"] = "<b>"._FOR_CONTACT_C."</b>".$tab[$i][$j]['value'];
+
+                }
+                $tab[$i][$j]["order"]=false;
+            }
+            if ($tab[$i][$j][$value]=="is_multicontacts") {
+
+                if ($tab[$i][$j]['value'] == 'Y') {
+                    $tab[$i][$j]["label"]=_CONTACT;
+                    $tab[$i][$j]["size"]="10";
+                    $tab[$i][$j]["label_align"]="left";
+                    $tab[$i][$j]["align"]="left";
+                    $tab[$i][$j]["valign"]="bottom";
+                    $tab[$i][$j]["show"]=false;
+                    $tab[$i][$j]["value_export"] = $tab[$i][$j]['value'];
+                    $tab[$i][$j]["value"] = _MULTI_CONTACT;
+                    $tab[$i][$j]["order"]=false;
+                    $tab[$i][$j]["is_multi_contacts"] = 'Y';
+                }
+            }
+            if ($tab[$i][$j][$value]=="type_label") {
+
+                $tab[$i][$j]["value"] = $request->show_string($tab[$i][$j]["value"]);
+                $tab[$i][$j]["label"]=_TYPE;
+                $tab[$i][$j]["size"]="12";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=true;
+                $tab[$i][$j]["order"]='type_label';
+            }
+            if ($tab[$i][$j][$value]=="status") {
+                //couleurs des priorités
+                if ($tab[$i][8]["value"]=='0') {
+
+                    $style="style='color:".$_SESSION['mail_priorities_color'][$tab[$i][8]["value"]].";'";
+                } else if ($tab[$i][8]["value"]=='1') {
+                    $style="style='color:".$_SESSION['mail_priorities_color'][$tab[$i][8]["value"]].";'";
+                } else {
+                    $style="style='color:".$_SESSION['mail_priorities_color'][$tab[$i][8]["value"]].";'";
+                }
+                $res_status = $status_obj->get_status_data($tab[$i][$j]['value'], $extension_icon);
+                $statusCmp = $tab[$i][$j]['value'];
+                $img_class = substr($res_status['IMG_SRC'], 0, 2);
+                if (!isset($res_status['IMG_SRC']) ||  empty($res_status['IMG_SRC'])) {
+                    $tab[$i][$j]['value'] = "<i  ".$style." class = 'fm fm-letter-status-new fm-3x' alt = '".$res_status['LABEL']."' title = '".$res_status['LABEL']."'></i>";
+                } else {
+                    $tab[$i][$j]['value'] = "<i ".$style." class = '".$img_class." ".$res_status['IMG_SRC']." ".$img_class."-3x' alt = '".$res_status['LABEL']."' title = '".$res_status['LABEL']."'></i>";
+                }
+                $tab[$i][$j]["label"]=_STATUS;
+                $tab[$i][$j]["size"]="4";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=true;
+                $tab[$i][$j]["order"]='status';
+            }
+            if ($tab[$i][$j][$value]=="category_img") {
+
+                $tab[$i][$j]["label"]=_CATEGORY;
+                $tab[$i][$j]["size"]="10";
+                $tab[$i][$j]["label_align"]="right";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=false;
+                $tab[$i][$j]["value_export"] = $tab[$i][$j]['value'];
+                $my_imgcat = get_img_cat($tab[$i][$j]['value'], $extension_icon);
+                $tab[$i][$j]['value'] = $my_imgcat;
+                $tab[$i][$j]["value"] = $tab[$i][$j]['value'];
+                $tab[$i][$j]["order"]="category_id";
+            }
+            if ($tab[$i][$j][$value]=="count_attachment") {
+
+                $query = "SELECT count(*) as total FROM res_view_attachments
+                            WHERE res_id_master = ?
+                            AND status NOT IN ('DEL', 'OBS') AND attachment_type NOT IN ('converted_pdf', 'print_folder') AND coll_id = ? AND (status <> 'TMP' or (typist = ? and status = 'TMP'))";
+                $arrayPDO = array($tab[$i][0]['res_id'], $_SESSION['collection_id_choice'], $_SESSION['user']['UserId']);
+                $stmt2 = $db->query($query, $arrayPDO);
+                $return_count = $stmt2->fetchObject();
+
+                $tab[$i][$j]["label"]=_ATTACHMENTS;
+                $tab[$i][$j]["size"]="12";
+                $tab[$i][$j]["label_align"]="left";
+                $tab[$i][$j]["align"]="left";
+                $tab[$i][$j]["valign"]="bottom";
+                $tab[$i][$j]["show"]=false;
+                $tab[$i][$j]['value'] = "$return_count->total";
+                $tab[$i][$j]["order"]='count_attachment';
+            }
+        }
+    }
+}
+//Cle de la liste
+$listKey = 'res_id';
+
+//Initialiser le tableau de parametres
+$paramsTab = array();
+$paramsTab['pageTitle'] =  _RESULTS." : ".count($tab).' '._FOUND_DOCS;              //Titre de la page
+$paramsTab['listCss'] = 'listing largerList spec';                                  //css
+$paramsTab['bool_sortColumn'] = true;                                               //Affichage Tri
+$paramsTab['bool_bigPageTitle'] = false;                                            //Affichage du titre en grand
+$paramsTab['bool_showIconDocument'] = true;                                         //Affichage de l'icone du document
+$paramsTab['bool_showIconDetails'] = true;                                          //Affichage de l'icone de la page de details
+$paramsTab['urlParameters'] = 'baskets='.$_SESSION['current_basket']['id']
+            .$urlParameters;                                                        //Parametres d'url supplementaires
+//$paramsTab['filters'] = array('entity', 'entity_subentities', 'category', 'priority', 'identifier','date_current_use');          //Filtres
+$paramsTab['filters'] = array('entity', 'entity_subentities', 'category', 'priority', 'identifier');          //Filtres
+if (count($template_list) > 0 ) {                                                   //Templates
+    $paramsTab['templates'] = array();
+    $paramsTab['templates'] = $template_list;
+}
+$paramsTab['bool_showTemplateDefaultList'] = true;                                  //Default list (no template)
+$paramsTab['defaultTemplate'] = $defaultTemplate;                                   //Default template
+$paramsTab['tools'] = array();                                                      //Icones dans la barre d'outils
+//Fileplan
+if ($core_tools->test_service('fileplan', 'fileplan', false)) {
+    include_once "modules" . DIRECTORY_SEPARATOR . "fileplan" . DIRECTORY_SEPARATOR
+        . "class" . DIRECTORY_SEPARATOR . "class_modules_tools.php";
+    $fileplan = new fileplan();
+    if (count($fileplan->getUserFileplan()) > 0
+        || (count($fileplan->getEntitiesFileplan()) > 0
+        && $core_tools->test_service('put_doc_in_fileplan', 'fileplan', false))
+    ) {
+        $paramsTab['bool_checkBox'] = true;
+        $paramsTab['bool_standaloneForm'] = true;
+        $positions = array(
+                "script"        =>  "showFileplanList('".$_SESSION['config']['businessappurl']
+                                        . "index.php?display=true&module=fileplan&page=fileplan_ajax_script"
+                                        . "&mode=setPosition&origin=basket&coll_id=".$_SESSION['current_basket']['coll_id']
+                                        . $parameters."', 'formList', '600px', '510px', '"
+                                        . _CHOOSE_ONE_DOC."')",
+                "icon"          =>  'bookmark',
+                "tooltip"       =>  _FILEPLAN,
+                "disabledRules" =>  count($tab)." == 0"
+                );
+        array_push($paramsTab['tools'], $positions);
+    }
+}
+if (isset($_REQUEST['origin']) && $_REQUEST['origin'] == 'searching') {
+    $save = array(
+            "script"        =>  "createModal(form_txt, 'save_search', '100px', '500px');window.location.href='#top';",
+            "icon"          =>  'save',
+            "tooltip"       =>  _SAVE_QUERY,
+            "disabledRules" =>  count($tab)." == 0"
+            );
+    array_push($paramsTab['tools'], $save);
+}
+$export = array(
+        "script"        =>  "window.open('".$_SESSION['config']['businessappurl']."index.php?display=true&page=export', '_blank');",
+        "icon"          =>  'cloud-download',
+        "tooltip"       =>  _EXPORT_LIST,
+        "disabledRules" =>  count($tab)." == 0"
+        );
+array_push($paramsTab['tools'], $export);
+if ($core_tools->test_service('print_doc_details_from_list', 'apps', false)) {
+    $print = array(
+                "script"        =>  "window.open('".$_SESSION['config']['businessappurl']."index.php?display=true&page=print', '_blank');",
+                "icon"          =>  'print',
+                "tooltip"       =>  _PRINT_LIST,
+                "disabledRules" =>  count($tab)." == 0"
+             );
+    array_push($paramsTab['tools'], $print);
+}
+
+//Afficher la liste
+$status = 0;
+$content = $list->showList($tab, $paramsTab, $listKey, $_SESSION['current_basket']);
+// $debug = $list->debug(false);
+
+$content .= '<script>$j(\'#container\').attr(\'style\', \'width: 90%; min-width: 1000px;\');$j(\'#content\').attr(\'style\', \'width: auto; min-width: 1000px;\');';
+$content .= '$j(\'#inner_content\').attr(\'style\', \'width: auto; min-width: 1000px;\');</script>';
+
+echo "{'status' : " . $status . ", 'content' : '" . addslashes($debug.$content) . "', 'error' : '" . addslashes(functions::xssafe($error)) . "'}";
diff --git a/modules/export_seda/js/functions.js b/modules/export_seda/js/functions.js
old mode 100755
new mode 100644
index c97b4da5b7e8485588177277b5722da193437051..9021a124b440c322db3231d43c1132cea6346393
--- a/modules/export_seda/js/functions.js
+++ b/modules/export_seda/js/functions.js
@@ -1,40 +1,67 @@
-function actionSeda($path,$type) {
-    if ($type == 'zip') {
-        window.open($path);
-        $("validSend").style.display = 'block';
-    } else {
-    	new Ajax.Request($path,
-            {
-                method:'post',
-                parameters: { url : $path,
-                            },
-                onSuccess: function(answer) {
-                    eval("response = "+answer.responseText);
-                    if(response.status == 0){
-                        if ($type != "validateMessage") {
-                            $("valid").style.display = 'block';
-                            $("validSend").style.display = 'none';
-                            $("cancel").style.display = 'none';
-                            $("sendMessage").style.display = 'none';
+function actionSeda(path,type) {
+    var resPath = path.split('|');
 
-                            alert(response.content);
-                        } else {
-                            $("cancel").click();
-                            location.reload();
-                        }
+    if (type == 'zip' || type == 'sendMessage') {
+        resPath[0] += '&messageTitle=' + $('messageTitle').value;
+    }
+
+    new Ajax.Request(resPath[0],
+        {
+            method: 'post',
+            parameters: {
+                url: resPath[0]
+            },
+            onSuccess: function (answer) {
+                eval("response = " + answer.responseText);
+                if (response.status == 0) {
+                    if (type == "validateMessage") {
+                        $("cancel").click();
+                        location.reload();
                     } else {
-                        alert(response.error);
+                        $('messageTitle').disabled = true;
+
+                        if (type == 'zip') {
+                            window.open(resPath[1]);
+
+                            if ($("cancel").style.display != 'none') {
+                                $("validSend").style.display = 'block';
+                            }
+                        } else if (type == 'sendMessage') {
+                            new Ajax.Request(resPath[1],
+                                {
+                                    method:'post',
+                                    parameters: { url : resPath[1]
+                                    },
+                                    onSuccess: function(answer) {
+                                        eval("response = "+answer.responseText);
+                                        if(response.status == 0){
+                                            $("valid").style.display = 'block';
+                                            $("validSend").style.display = 'none';
+                                            $("cancel").style.display = 'none';
+                                            $("sendMessage").style.display = 'none';
+
+                                            alert(response.content);
+                                        } else {
+                                            alert(response.error);
+                                        }
+                                    }
+                                }
+                            );
+                        }
                     }
+                } else {
+                    alert(response.error);
                 }
-            });
-    }
+            }
+        }
+    );
 }
 
-function actionValidation($path,$type) {
-    new Ajax.Request($path,
+function actionValidation(path,type) {
+    new Ajax.Request(path,
         {
             method:'post',
-            parameters: { url : $path},
+            parameters: { url : path},
             onSuccess: function(answer) {
                 eval("response = "+answer.responseText);
                 if(response.status == 0){
@@ -45,4 +72,4 @@ function actionValidation($path,$type) {
                 location.reload();
             }
         });
-}
\ No newline at end of file
+}
diff --git a/modules/export_seda/lang/en.php b/modules/export_seda/lang/en.php
old mode 100755
new mode 100644
index df78e68698b39947dc2d3260b6f2017d90f525e1..df0ec8bc98bfb296fb53991cc4fd472d66327957
--- a/modules/export_seda/lang/en.php
+++ b/modules/export_seda/lang/en.php
@@ -2,6 +2,8 @@
 
 if (!defined("_EXPORT_SEDA_COMMENT"))
     define("_EXPORT_SEDA_COMMENT", "Export");
+if (!defined("_EXPORT_SEDA_LIST"))
+    define("_EXPORT_SEDA_LIST", "List of letter to archive");
 
 if (!defined("_EXPORT_SEDA"))
     define("_EXPORT_SEDA", "Export");
@@ -24,6 +26,15 @@ if (!defined("_INFORMATION_ARCHIVE"))
 if (!defined("_ARCHIVE_IDENTIFIER"))
     define("_ARCHIVE_IDENTIFIER", "Archive identifier");
 
+if (!defined("_PACKAGE_TITLE"))
+    define("_PACKAGE_TITLE", "Package title");
+
+if (!defined("_GENERATE_MESSAGE"))
+    define("_GENERATE_MESSAGE", "Generate message");
+
+if (!defined("_MESSAGE_TITLE_EMPTY"))
+    define("_MESSAGE_TITLE_EMPTY", "Message title empty");
+
 if (!defined("_DESCRIPTION_LEVEL"))
     define("_DESCRIPTION_LEVEL", "Description level");
 if (!defined("_ITEM"))
@@ -67,14 +78,20 @@ if (!defined("_RECEIVED_MESSAGE"))
 if (!defined("_ERROR_MESSAGE"))
     define("_RECEIVED_MESSAGE", "Message non-reçu");
 
+if (!defined("_DIRECTORY_MESSAGE_REQUIRED"))
+    define("_DIRECTORY_MESSAGE_REQUIRED", "Directory message not configured");
+
 if (!defined("_ACKNOWLEDGEMENT_REFERENCE"))
     define("_ACKNOWLEDGEMENT_REFERENCE", "Acknowledgement reference");
 
-if (!defined("_TRANSFERRING_AGENCY_SIREN_COMPULSORY"))
-    define("_TRANSFERRING_AGENCY_SIREN_COMPULSORY", "Transferring agency SIREN compulsory");
+if (!defined("_TRANSFERRING_AGENCY_SIREN_REQUIRED"))
+    define("_TRANSFERRING_AGENCY_SIREN_REQUIRED", "Transferring agency SIREN required");
 
-if (!defined("_ARCHIVAL_AGENCY_SIREN_COMPULSORY"))
-    define("_ARCHIVAL_AGENCY_SIREN_COMPULSORY", "Archive agency SIREN compulsory");
+if (!defined("_ARCHIVAL_AGENCY_SIREN_REQUIRED"))
+    define("_ARCHIVAL_AGENCY_SIREN_REQUIRED", "Archive agency SIREN required");
+
+if (!defined("_ARCHIVAL_AGREEMENT_REQUIRED"))
+    define("_ARCHIVAL_AGREEMENT_REQUIRED", "Archival agreement required");
 
 if (!defined("_VALIDATE_MANUAL_DELIVERY"))
     define("_VALIDATE_MANUAL_DELIVERY", "Validate manual delivery");
@@ -88,6 +105,12 @@ if (!defined("_ERROR_STATUS_SEDA"))
 if (!defined("_ERROR_NO_ACKNOWLEDGEMENT"))
     define("_ERROR_NO_ACKNOWLEDGEMENT", "No acknowledgement for this letter : ");
 
+if (!defined("_NO_LETTER_PURGE"))
+    define("_NO_LETTER_PURGE", "No letter to purge");
+
+if (!defined("_PURGE"))
+    define("_PURGE", "letters purge");
+
 if (!defined("_ERROR_NO_XML_ACKNOWLEDGEMENT"))
     define("_ERROR_NO_XML_ACKNOWLEDGEMENT", "The acknowledgement is malformed. Letter number : ");
 
@@ -113,4 +136,22 @@ if (!defined("_LETTER_NO_ARCHIVED"))
     define("_LETTER_NO_ARCHIVED", "The letter not archived. Look the transfer reply. Letter number : ");
 
 if (!defined("_ERROR_LETTER_ARCHIVED"))
-    define("_ERROR_LETTER_ARCHIVED", "You can not reset an archived letter. Letter number : ");
\ No newline at end of file
+    define("_ERROR_LETTER_ARCHIVED", "You can not reset an archived letter. Letter number : ");
+
+if (!defined("_ERROR_ORIGINATOR_EMPTY"))
+    define("_ERROR_ORIGINATOR_EMPTY", "At least one originator must be retained");
+
+if (!defined("_ERROR_FILE_NOT_EXIST"))
+    define("_ERROR_FILE_NOT_EXIST", "All the documents must be present in the storage areas");
+
+if (!defined("_ERROR_REPLY_NOT_EXIST"))
+    define("_ERROR_REPLY_NOT_EXIST", "Reply not exist. Letter number : ");
+
+if (!defined("_ERROR_EXTENSION_CERTIFICATE"))
+    define("_ERROR_EXTENSION_CERTIFICATE", "Wrong certificate format (.crt or .pem)");
+
+if (!defined("_ERROR_UNKNOW_CERTIFICATE"))
+    define("_ERROR_UNKNOW_CERTIFICATE", "Unknow certificate");
+
+if (!defined("_UNKNOWN_TARGET"))
+    define("_UNKNOWN_TARGET", "Unknown target");
diff --git a/modules/export_seda/lang/fr.php b/modules/export_seda/lang/fr.php
old mode 100755
new mode 100644
index efca4350aa308298b163ab8f1f39a1fa2ec361bf..73e3c8d287571f2926a8b2e7bebf32de0b747ddf
--- a/modules/export_seda/lang/fr.php
+++ b/modules/export_seda/lang/fr.php
@@ -1,7 +1,10 @@
 <?php
 
-if (!defined("_EXPORTSEDA_COMMENT"))
+if (!defined("_EXPORT_SEDA_COMMENT"))
     define("_EXPORT_SEDA_COMMENT", "Export");
+if (!defined("_EXPORT_SEDA_LIST"))
+    define("_EXPORT_SEDA_LIST", "Liste des courriers à archiver");
+
 
 if (!defined("_EXPORT_SEDA"))
     define("_EXPORT_SEDA","Transferer vos courriers");
@@ -21,6 +24,15 @@ if (!defined("_EXPORT_SEDA_VIEW"))
 if (!defined("_INFORMATION_MESSAGE"))
     define("_INFORMATION_MESSAGE", "Information bordereau");
 
+if (!defined("_PACKAGE_TITLE"))
+    define("_PACKAGE_TITLE", "Titre du paquet");
+
+if (!defined("_GENERATE_MESSAGE"))
+    define("_GENERATE_MESSAGE", "Générer bordereau");
+
+if (!defined("_MESSAGE_TITLE_EMPTY"))
+    define("_MESSAGE_TITLE_EMPTY", "Titre du paquet vide");
+
 if (!defined("_MESSAGE_IDENTIFIER"))
     define("_MESSAGE_IDENTIFIER", "Identifiant bordereau");
 if (!defined("_ARCHIVAL_AGENCY_SIREN"))
@@ -80,15 +92,27 @@ if (!defined("_RECEIVED_MESSAGE"))
 if (!defined("_ERROR_MESSAGE"))
     define("_ERROR_MESSAGE", "Bordereau non-reçu");
 
-if (!defined("_TRANSFERRING_AGENCY_SIREN_COMPULSORY"))
-    define("_TRANSFERRING_AGENCY_SIREN_COMPULSORY", "Numéro SIREN service versant obligatoire");
+if (!defined("_DIRECTORY_MESSAGE_REQUIRED"))
+    define("_DIRECTORY_MESSAGE_REQUIRED", "Répertoire des messages non configuré");
 
-if (!defined("_ARCHIVAL_AGENCY_SIREN_COMPULSORY"))
-    define("_ARCHIVAL_AGENCY_SIREN_COMPULSORY", "Numéro SIREN service d'archive obligatoire");
+if (!defined("_TRANSFERRING_AGENCY_SIREN_REQUIRED"))
+    define("_TRANSFERRING_AGENCY_SIREN_REQUIRED", "Numéro SIREN service versant obligatoire");
+
+if (!defined("_ARCHIVAL_AGENCY_SIREN_REQUIRED"))
+    define("_ARCHIVAL_AGENCY_SIREN_REQUIRED", "Numéro SIREN service d'archive obligatoire");
+
+if (!defined("_ARCHIVAL_AGREEMENT_REQUIRED"))
+    define("_ARCHIVAL_AGREEMENT_REQUIRED", "Convention d'archivage obligatoire");
 
 if (!defined("_VALIDATE_MANUAL_DELIVERY"))
     define("_VALIDATE_MANUAL_DELIVERY", "Valider l'envoi manuel du bordereau");
 
+if (!defined("_NO_LETTER_PURGE"))
+    define("_NO_LETTER_PURGE", "Aucun document à supprimer");
+
+if (!defined("_PURGE"))
+    define("_PURGE", "document(s) supprimé(s)");
+
 if (!defined("_ERROR_MESSAGE_ALREADY_SENT"))
     define("_ERROR_MESSAGE_ALREADY_SENT", "L'archivage d'un courrier sélectionné est déjà en cours, vous ne pouvez pas archiver deux fois le même courrier. Veuillez le désélectionner pour continuer. Numéro de courrier en cours d'archivage : ");
 
@@ -124,3 +148,21 @@ if (!defined("_LETTER_NO_ARCHIVED"))
 
 if (!defined("_ERROR_LETTER_ARCHIVED"))
     define("_ERROR_LETTER_ARCHIVED", "Vous ne pouvez pas remettre à zéro un courrier archivé. Numéro du courrier : ");
+
+if (!defined("_ERROR_ORIGINATOR_EMPTY"))
+    define("_ERROR_ORIGINATOR_EMPTY", "Au moins un producteur doit être renseigné");
+
+if (!defined("_ERROR_FILE_NOT_EXIST"))
+    define("_ERROR_FILE_NOT_EXIST", "Tous les documents doivent être présent dans les zones de stockage");
+
+if (!defined("_ERROR_REPLY_NOT_EXIST"))
+    define("_ERROR_REPLY_NOT_EXIST", "La réponse au transfert doit être présente pour effectuer une action. Numéro du courrier : ");
+
+if (!defined("_ERROR_EXTENSION_CERTIFICATE"))
+    define("_ERROR_EXTENSION_CERTIFICATE", "Le certificat n'est pas dans le bon format (.crt ou .pem)");
+
+if (!defined("_ERROR_UNKNOW_CERTIFICATE"))
+    define("_ERROR_UNKNOW_CERTIFICATE", "Erreur avec le certificat SSL ou TLS.");
+
+if (!defined("_UNKNOWN_TARGET"))
+    define("_UNKNOWN_TARGET", "Cible inconnue");
diff --git a/modules/export_seda/resources/AbstractRule.xml b/modules/export_seda/resources/AbstractRule.xml
old mode 100755
new mode 100644
index bea6adcdfddbdd4776f349204dcbe1623a660b70..228090918d19024d6b69cf3406414dde3c03c631
--- a/modules/export_seda/resources/AbstractRule.xml
+++ b/modules/export_seda/resources/AbstractRule.xml
@@ -1,4 +1,4 @@
-<?merge $abstractRule.rule.bool() ?><Rule><?merge $abstractRule.rule.value ?></Rule>
-<?merge $abstractRule.startDate.bool() ?><StartDate><?merge $abstractRule.startDate.value ?></StartDate>
-<PreventInheritance><?merge $abstractRule.preventInheritance ?></PreventInheritance>
-<RefNonRuleId><?merge $abstractRule.refNonRuleId ?></RefNonRuleId>
\ No newline at end of file
+<?merge $abstractRule.Rule.bool() ?><Rule><?merge $abstractRule.Rule.value ?></Rule>
+<?merge $abstractRule.StartDate.bool() ?><StartDate><?merge $abstractRule.StartDate.value ?></StartDate>
+<PreventInheritance><?merge $abstractRule.PreventInheritance ?></PreventInheritance>
+<RefNonRuleId><?merge $abstractRule.RefNonRuleId ?></RefNonRuleId>
\ No newline at end of file
diff --git a/modules/export_seda/resources/Acknowledgement.xml b/modules/export_seda/resources/Acknowledgement.xml
old mode 100755
new mode 100644
index 95a0ddd219e9b2a59c96500e765d83cbceda3f82..977b6f0e0868c256a9924e4eea544e8deeae83da
--- a/modules/export_seda/resources/Acknowledgement.xml
+++ b/modules/export_seda/resources/Acknowledgement.xml
@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Acknowledgement xmlns="fr:gouv:culture:archivesdefrance:seda:v2.0">
-	<?merge Acknowledgement.comment ?><Comment><?merge .value ?></Comment>
-	<Date><?merge Acknowledgement.date ?></Date>
-	<?merge Acknowledgement.messageIdentifier $messageIdentifier ?><?xinclude /resources/MessageIdentifier.xml ?>
-	<?merge Acknowledgement.signature.bool() ?>
-	<Signature><?merge Acknowledgement.signature ?></Signature>
-	<?merge Acknowledgement.messageReceivedIdentifier $messageReceivedIdentifier ?><?xinclude /resources/MessageReceivedIdentifier.xml ?>
+	<?merge Acknowledgement.Comment ?><Comment><?merge .value ?></Comment>
+	<Date><?merge Acknowledgement.Date ?></Date>
+	<?merge Acknowledgement.MessageIdentifier $messageIdentifier ?><?xinclude /resources/MessageIdentifier.xml ?>
+	<?merge Acknowledgement.Signature.bool() ?>
+	<Signature><?merge Acknowledgement.Signature ?></Signature>
+	<?merge Acknowledgement.MessageReceivedIdentifier $messageReceivedIdentifier ?><?xinclude /resources/MessageReceivedIdentifier.xml ?>
 	<Sender>
-		<?merge Acknowledgement.sender $organization ?>
+		<?merge Acknowledgement.Sender $organization ?>
 		<?xinclude /resources/Organization.xml ?>
 	</Sender>
 	<Receiver>
-		<?merge Acknowledgement.receiver $organization ?>
+		<?merge Acknowledgement.Receiver $organization ?>
 		<?xinclude /resources/Organization.xml ?>
 	</Receiver>
 </Acknowledgement>
\ No newline at end of file
diff --git a/modules/export_seda/resources/Agent.xml b/modules/export_seda/resources/Agent.xml
old mode 100755
new mode 100644
index 142f6cc36f3ed56a09f5b712a0e9a726512d60e6..f7907a56bcdcff5678cdd42016ce2ffe71eeed11
--- a/modules/export_seda/resources/Agent.xml
+++ b/modules/export_seda/resources/Agent.xml
@@ -1,15 +1,15 @@
-<?merge $agent.firstName.bool() ?><FirstName><?merge $agent.firstName ?></FirstName>
-<?merge $agent.birthName.bool() ?><BirthName><?merge $agent.birthName ?></BirthName>
-<?merge $agent.givenName.bool() ?><GivenName><?merge $agent.givenName ?></GivenName>
-<?merge $agent.gender.bool() ?><Gender><?merge $agent.gender ?></Gender>
-<?merge $agent.birthDate.bool() ?><BirthDate><?merge $agent.birthDate ?></BirthDate>
-<?merge $agent.birthPlace.bool() ?><BirthPlace><?merge $agent.birthPlace ?></BirthPlace>
-<?merge $agent.deathDate.bool() ?><DeathDate><?merge $agent.deathDate ?></DeathDate>
-<?merge $agent.deathPlace.bool() ?><DeathPlace><?merge $agent.deathPlace ?></DeathPlace>
-<?merge $agent.nationality.bool() ?><Nationality><?merge $agent.nationality ?></Nationality>
-<?merge $agent.function.bool() ?><Function><?merge $agent.function ?></Function>
-<?merge $agent.activity.bool() ?><Activity><?merge $agent.activity ?></Activity>
-<?merge $agent.position.bool() ?><Position><?merge $agent.position ?></Position>
-<?merge $agent.role.bool() ?><Role><?merge $agent.role ?></Role>
-<?merge $agent.corpname.bool() ?><Corpname><?merge $agent.corpname ?></Corpname>
-<?merge $agent.identifier.bool() ?><Identifier><?merge $agent.identifier ?></Identifier>
\ No newline at end of file
+<?merge $agent.FirstName.bool() ?><FirstName><?merge $agent.FirstName ?></FirstName>
+<?merge $agent.BirthName.bool() ?><BirthName><?merge $agent.BirthName ?></BirthName>
+<?merge $agent.GivenName.bool() ?><GivenName><?merge $agent.GivenName ?></GivenName>
+<?merge $agent.Gender.bool() ?><Gender><?merge $agent.Gender ?></Gender>
+<?merge $agent.BirthDate.bool() ?><BirthDate><?merge $agent.BirthDate ?></BirthDate>
+<?merge $agent.BirthPlace.bool() ?><BirthPlace><?merge $agent.BirthPlace ?></BirthPlace>
+<?merge $agent.DeathDate.bool() ?><DeathDate><?merge $agent.DeathDate ?></DeathDate>
+<?merge $agent.DeathPlace.bool() ?><DeathPlace><?merge $agent.DeathPlace ?></DeathPlace>
+<?merge $agent.Nationality.bool() ?><Nationality><?merge $agent.Nationality ?></Nationality>
+<?merge $agent.Function.bool() ?><Function><?merge $agent.Function ?></Function>
+<?merge $agent.Activity.bool() ?><Activity><?merge $agent.Activity ?></Activity>
+<?merge $agent.Position.bool() ?><Position><?merge $agent.Position ?></Position>
+<?merge $agent.Role.bool() ?><Role><?merge $agent.Role ?></Role>
+<?merge $agent.Corpname.bool() ?><Corpname><?merge $agent.Corpname ?></Corpname>
+<?merge $agent.Identifier.bool() ?><Identifier><?merge $agent.Identifier ?></Identifier>
\ No newline at end of file
diff --git a/modules/export_seda/resources/ArchiveModificationNotification.xml b/modules/export_seda/resources/ArchiveModificationNotification.xml
new file mode 100644
index 0000000000000000000000000000000000000000..dbe515b16c7834fb8f448c43b4fbd9f428bbdebf
--- /dev/null
+++ b/modules/export_seda/resources/ArchiveModificationNotification.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ArchiveModificationNotification xmlns="fr:gouv:culture:archivesdefrance:seda:v2.0">
+    <?merge ArchiveModificationNotification.Comment ?><Comment><?merge .value ?></Comment>
+    <Date><?merge ArchiveModificationNotification.Date ?></Date>
+    <?merge ArchiveModificationNotification.MessageIdentifier $messageIdentifier ?><?xinclude /resources/MessageIdentifier.xml ?>
+    <?xinclude /resources/CodeListVersions.xml ?>
+    <UnitIdentifier><?merge ArchiveModificationNotification.UnitIdentifier.value ?></UnitIdentifier>
+    <ArchivalAgency>
+        <?merge ArchiveModificationNotification.ArchivalAgency $organization ?>
+        <?xinclude /resources/Organization.xml ?>
+    </ArchivalAgency>
+    <OriginatingAgency>
+        <?merge ArchiveModificationNotification.OriginatingAgency $organization ?>
+        <?xinclude /resources/Organization.xml ?>
+    </OriginatingAgency>
+</ArchiveModificationNotification>
\ No newline at end of file
diff --git a/modules/export_seda/resources/ArchiveTransfer.xml b/modules/export_seda/resources/ArchiveTransfer.xml
old mode 100755
new mode 100644
index 64c4639aea6157fd9fc2a626761ffc93193c2d36..051e049ba8622c6466f69059ca9dc3f6b0e41e6b
--- a/modules/export_seda/resources/ArchiveTransfer.xml
+++ b/modules/export_seda/resources/ArchiveTransfer.xml
@@ -1,18 +1,18 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <ArchiveTransfer xmlns="fr:gouv:culture:archivesdefrance:seda:v2.0">
-    <?merge ArchiveTransfer.comment ?><Comment><?merge .value ?></Comment>
-    <Date><?merge ArchiveTransfer.date ?></Date>
-    <?merge ArchiveTransfer.messageIdentifier $messageIdentifier ?><?xinclude /resources/MessageIdentifier.xml ?>
-    <?merge ArchiveTransfer.archivalAgreement $archivalAgreement ?><?xinclude /resources/ArchivalAgreement.xml ?>
+    <?merge ArchiveTransfer.Comment ?><Comment><?merge .value ?></Comment>
+    <Date><?merge ArchiveTransfer.Date ?></Date>
+    <?merge ArchiveTransfer.MessageIdentifier $messageIdentifier ?><?xinclude /resources/MessageIdentifier.xml ?>
+    <?merge ArchiveTransfer.ArchivalAgreement $archivalAgreement ?><?xinclude /resources/ArchivalAgreement.xml ?>
     <?xinclude /resources/CodeListVersions.xml ?>
-    <?merge ArchiveTransfer.dataObjectPackage $dataObjectPackage ?>
+    <?merge ArchiveTransfer.DataObjectPackage $dataObjectPackage ?>
     <?xinclude /resources/DataObjectPackage.xml ?>
     <ArchivalAgency>
-        <?merge ArchiveTransfer.archivalAgency $organization ?>
+        <?merge ArchiveTransfer.ArchivalAgency $organization ?>
         <?xinclude /resources/Organization.xml ?>
     </ArchivalAgency>
     <TransferringAgency>
-        <?merge ArchiveTransfer.transferringAgency $organization ?>
+        <?merge ArchiveTransfer.TransferringAgency $organization ?>
         <?xinclude /resources/Organization.xml ?>
     </TransferringAgency>
 </ArchiveTransfer>
\ No newline at end of file
diff --git a/modules/export_seda/resources/ArchiveTransferReply.xml b/modules/export_seda/resources/ArchiveTransferReply.xml
old mode 100755
new mode 100644
index decc409a7efe14dbc05e3e64e6227ac46c463375..d803a3418b914f773490b1eec87a0691caa29546
--- a/modules/export_seda/resources/ArchiveTransferReply.xml
+++ b/modules/export_seda/resources/ArchiveTransferReply.xml
@@ -1,22 +1,22 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <ArchiveTransferReply xmlns="fr:gouv:culture:archivesdefrance:seda:v2.0">
-    <?merge ArchiveTransferReply.comment ?><Comment><?merge .value ?></Comment>
-    <Date><?merge ArchiveTransferReply.date ?></Date>
-    <?merge ArchiveTransferReply.messageIdentifier $messageIdentifier ?><?xinclude /resources/MessageIdentifier.xml ?>
-    <?merge ArchiveTransferReply.archivalAgreement $archivalAgreement ?><?xinclude /resources/ArchivalAgreement.xml ?>
-    <ReplyCode><?merge ArchiveTransferReply.replyCode.value ?></ReplyCode>
+    <?merge ArchiveTransferReply.Comment ?><Comment><?merge .value ?></Comment>
+    <Date><?merge ArchiveTransferReply.Date ?></Date>
+    <?merge ArchiveTransferReply.MessageIdentifier $messageIdentifier ?><?xinclude /resources/MessageIdentifier.xml ?>
+    <?merge ArchiveTransferReply.MessageRequestIdentifier $messageRequestIdentifier ?><?xinclude /resources/MessageRequestIdentifier.xml ?>
+    <?merge ArchiveTransferReply.ArchivalAgreement $archivalAgreement ?><?xinclude /resources/ArchivalAgreement.xml ?>
+    <ReplyCode><?merge ArchiveTransferReply.ReplyCode ?></ReplyCode>
     <?xinclude /resources/CodeListVersions.xml ?>
-    <?merge ArchiveTransferReply.dataObjectPackage $dataObjectPackage ?>
-    <?merge ArchiveTransferReply.dataObjectPackage.bool() ?>
+    <?merge ArchiveTransferReply.DataObjectPackage $dataObjectPackage ?>
+    <?merge ArchiveTransferReply.DataObjectPackage.bool() ?>
     <?xinclude /resources/DataObjectPackage.xml ?>
-    <?merge ArchiveTransferReply.messageRequestIdentifier $messageRequestIdentifier ?><?xinclude /resources/MessageRequestIdentifier.xml ?>
-    <GrantDate><?merge ArchiveTransferReplyCode.grantDate ?></GrantDate>
+    <GrantDate><?merge ArchiveTransferReplyCode.GrantDate ?></GrantDate>
     <ArchivalAgency>
-        <?merge ArchiveTransferReply.archivalAgency $organization ?>
+        <?merge ArchiveTransferReply.ArchivalAgency $organization ?>
         <?xinclude /resources/Organization.xml ?>
     </ArchivalAgency>
     <TransferringAgency>
-        <?merge ArchiveTransferReply.transferringAgency $organization ?>
+        <?merge ArchiveTransferReply.TransferringAgency $organization ?>
         <?xinclude /resources/Organization.xml ?>
     </TransferringAgency>
-</ArchiveTransferReply>
\ No newline at end of file
+</ArchiveTransferReply>
diff --git a/modules/export_seda/resources/ArchiveUnit.xml b/modules/export_seda/resources/ArchiveUnit.xml
old mode 100755
new mode 100644
index 9f3988eb15a8bdb502c40b1497a245750020c847..09a14872757fadc0df58d0ff7541cb118971e527
--- a/modules/export_seda/resources/ArchiveUnit.xml
+++ b/modules/export_seda/resources/ArchiveUnit.xml
@@ -1,138 +1,205 @@
 <?merge $archiveUnit ?>
-<ArchiveUnit id="arch_[?merge .id ?]">
-    <ArchiveUnitRefId><?merge .archiveUnitRefId ?></ArchiveUnitRefId>
-    <ArchiveUnitProfile schemeID="[?merge .archiveUnitProfile.schemeID ?]" schemeName="[?merge .archiveUnitProfile.schemeName ?]" schemeAgencyID="[?merge .archiveUnitProfile.schemeAgencyID ?]" schemeAgencyName="[?merge .archiveUnitProfile.schemeAgencyName ?]" schemeVersionID="[?merge .archiveUnitProfile.schemeVersionID ?]" schemeDataURI="[?merge .archiveUnitProfile.schemeDataURI ?]" schemeURI="[?merge .archiveUnitProfile.schemeURI ?]"><?merge .archiveUnitProfile ?></ArchiveUnitProfile>
-    <?merge .management.bool() ?>
+<ArchiveUnit id="[?merge .id ?]">
+    <ArchiveUnitRefId><?merge .ArchiveUnitRefId ?></ArchiveUnitRefId>
+    <ArchiveUnitProfile schemeID="[?merge .ArchiveUnitProfile.schemeID ?]" schemeName="[?merge .ArchiveUnitProfile.schemeName ?]" schemeAgencyID="[?merge .ArchiveUnitProfile.schemeAgencyID ?]" schemeAgencyName="[?merge .ArchiveUnitProfile.schemeAgencyName ?]" schemeVersionID="[?merge .ArchiveUnitProfile.schemeVersionID ?]" schemeDataURI="[?merge .ArchiveUnitProfile.schemeDataURI ?]" schemeURI="[?merge .ArchiveUnitProfile.schemeURI ?]"><?merge .ArchiveUnitProfile ?></ArchiveUnitProfile>
+    <?merge .Management.bool() ?>
     <Management>
-        <?merge .management.storageRule.bool() ?>
+        <?merge .Management.ArchivalProfile.bool() ?><ArchivalProfile><?merge .Management.ArchivalProfile.value ?></ArchivalProfile>
+        <?merge .Management.ServiceLevel.bool() ?><ServiceLevel><?merge .Management.ServiceLevel.value ?></ServiceLevel>
+        <?merge .Management.StorageRule.bool() ?>
         <StorageRule>
-            <?merge .management.storageRule $abstractRule ?>
-            <?xinclude /resources/AbstractRule.xml ?>
-            <FinalAction><?merge .management.storageRule.finalAction ?></FinalAction>
+            <?merge .Management.StorageRule.Rule.bool() ?><Rule><?merge .Management.StorageRule.Rule.value ?></Rule>
+            <?merge .Management.StorageRule.StartDate.bool() ?><StartDate><?merge .Management.StorageRule.StartDate ?></StartDate>
+            <PreventInheritance><?merge .Management.StorageRule.PreventInheritance ?></PreventInheritance>
+            <RefNonRuleId><?merge .Management.StorageRule.RefNonRuleId ?></RefNonRuleId>
+            <FinalAction><?merge .Management.StorageRule.FinalAction ?></FinalAction>
         </StorageRule>
-        <?merge .management.appraisalRule.bool() ?>
+        <?merge .Management.AppraisalRule.bool() ?>
         <AppraisalRule>
-            <?merge .management.appraisalRule $abstractRule ?>
-            <?xinclude /resources/AbstractRule.xml ?>
-            <FinalAction><?merge .management.appraisalRule.finalAction ?></FinalAction>
+            <?merge .Management.AppraisalRule.Rule.bool() ?><Rule><?merge .Management.AppraisalRule.Rule.value ?></Rule>
+            <?merge .Management.AppraisalRule.StartDate.bool() ?><StartDate><?merge .Management.AppraisalRule.StartDate ?></StartDate>
+            <PreventInheritance><?merge .Management.AppraisalRule.PreventInheritance ?></PreventInheritance>
+            <RefNonRuleId><?merge .Management.AppraisalRule.RefNonRuleId ?></RefNonRuleId>
+            <FinalAction><?merge .Management.AppraisalRule.FinalAction ?></FinalAction>
         </AppraisalRule>
-        <?merge .management.accessRule.bool() ?>
+        <?merge .Management.AccessRule.bool() ?>
         <AccessRule>
-            <?merge .management.accessRule $abstractRule ?>
-            <?xinclude /resources/AbstractRule.xml ?>
+            <?merge .Management.AccessRule.Rule.bool() ?><Rule><?merge .Management.AccessRule.Rule.value ?></Rule>
+            <?merge .Management.AccessRule.StartDate.bool() ?><StartDate><?merge .Management.AccessRule.StartDate ?></StartDate>
+            <PreventInheritance><?merge .Management.AccessRule.PreventInheritance ?></PreventInheritance>
+            <RefNonRuleId><?merge .Management.AccessRule.RefNonRuleId ?></RefNonRuleId>
         </AccessRule>
-        <?merge .management.disseminationRule.bool() ?>
+        <?merge .Management.DisseminationRule.bool() ?>
         <DisseminationRule>
-            <?merge .management.disseminationRule $abstractRule ?>
-            <?xinclude /resources/AbstractRule.xml ?>
+            <?merge .Management.DisseminationRule.Rule.bool() ?><Rule><?merge .Management.DisseminationRule.Rule.value ?></Rule>
+            <?merge .Management.DisseminationRule.StartDate.bool() ?><StartDate><?merge .Management.DisseminationRule.StartDate ?></StartDate>
+            <PreventInheritance><?merge .Management.DisseminationRule.PreventInheritance ?></PreventInheritance>
+            <RefNonRuleId><?merge .Management.DisseminationRule.RefNonRuleId ?></RefNonRuleId>
         </DisseminationRule>
-        <?merge .management.reuseRule.bool() ?>
+        <?merge .Management.ReuseRule.bool() ?>
         <ReuseRule>
-            <?merge .management.reuseRule $abstractRule ?>
-            <?xinclude /resources/AbstractRule.xml ?>
+            <?merge .Management.ReuseRule.Rule.bool() ?><Rule><?merge .Management.ReuseRule.Rule.value ?></Rule>
+            <?merge .Management.ReuseRule.StartDate.bool() ?><StartDate><?merge .Management.ReuseRule.StartDate ?></StartDate>
+            <PreventInheritance><?merge .Management.ReuseRule.PreventInheritance ?></PreventInheritance>
+            <RefNonRuleId><?merge .Management.ReuseRule.RefNonRuleId ?></RefNonRuleId>
         </ReuseRule>
-        <?merge .management.classificationRule.bool() ?>
+        <?merge .Management.ClassificationRule.bool() ?>
         <ClassificationRule>
-            <?merge .management.classificationRule $abstractRule ?>
-            <?xinclude /resources/AbstractRule.xml ?>
-            <ClassificationLevel><?merge .management.classificationRule.classificationLevel ?></ClassificationLevel>
-            <ClassificationOwner><?merge .management.classificationRule.classificationOwner ?></ClassificationOwner>
-            <ClassificationReassessingDate><?merge .management.classificationRule.classificationReassessingDate ?></ClassificationReassessingDate>
-            <NeedReassessingAuthorization><?merge .management.classificationRule.needReassessingAuthorization ?></NeedReassessingAuthorization>
+            <?merge .Management.ClassificationRule.Rule.bool() ?><Rule><?merge .Management.ClassificationRule.Rule.value ?></Rule>
+            <?merge .Management.ClassificationRule.StartDate.bool() ?><StartDate><?merge .Management.ClassificationRule.StartDate ?></StartDate>
+            <PreventInheritance><?merge .Management.ClassificationRule.PreventInheritance ?></PreventInheritance>
+            <RefNonRuleId><?merge .Management.ClassificationRule.RefNonRuleId ?></RefNonRuleId>
+            <ClassificationLevel><?merge .Management.ClassificationRule.ClassificationLevel ?></ClassificationLevel>
+            <ClassificationOwner><?merge .Management.ClassificationRule.ClassificationOwner ?></ClassificationOwner>
+            <ClassificationReassessingDate><?merge .Management.ClassificationRule.ClassificationReassessingDate ?></ClassificationReassessingDate>
+            <NeedReassessingAuthorization><?merge .Management.ClassificationRule.NeedReassessingAuthorization ?></NeedReassessingAuthorization>
         </ClassificationRule>
-        <?merge .management.needAuthorization.bool() ?>
+        <?merge .Management.NeedAuthorization.bool() ?>
         <NeedAuthorization>
-            <?merge .management.needAuthorization ?>
+            <?merge .Management.NeedAuthorization ?>
         </NeedAuthorization>
-        <?merge .management.otherManagementAbstract.bool() ?>
+        <?merge .Management.OtherManagementAbstract.bool() ?>
         <OtherManagementAbstract>
-            <?merge .management.otherManagementAbstract ?>
+            <?merge .Management.OtherManagementAbstract ?>
         </OtherManagementAbstract>
     </Management>
-    <?merge .content.bool() ?>
+    <?merge .Content.bool() ?>
     <Content>
-        <DescriptionLevel listVersionID="[?merge .descriptionLevel ?]"><?merge .content.descriptionLevel ?></DescriptionLevel>
-        <?merge .content.title ?><Title><?merge . ?></Title>
-        <?merge .content.filePlanPosition ?><FilePlanPosition schemeID="[?merge .schemeID @schemeID ?]" schemeName="[?merge .schemeName @schemeName ?]" schemeAgencyID="[?merge .schemeAgencyID @schemeAgencyID ?]" schemeAgencyName="[?merge .schemeAgencyName @schemeAgencyName ?]" schemeVersionID="[?merge .schemeVersionID @schemeVersionID ?]" schemeDataURI="[?merge .schemeDataURI @schemeDataURI ?]" schemeURI="[?merge .schemeURI @schemeURI ?]"><?merge .value ?></FilePlanPosition>
-        <?merge .originatingSystemId ?><OriginatingSystemId><?merge .content.originatingSystemId ?></OriginatingSystemId>
-        <OriginatingAgencyArchiveUnitIdentifier><?merge .content.originatingAgencyArchiveUnitIdentifier ?></OriginatingAgencyArchiveUnitIdentifier>
-        <?merge .content.description.bool() ?><Description><?merge .content.description ?></Description>
-        <?merge .content.custodialHistory.bool() ?>
+        <DescriptionLevel><?merge .Content.DescriptionLevel ?></DescriptionLevel>
+        <?merge .Content.Title ?><Title><?merge . ?></Title>
+        <?merge .Content.FilePlanPosition ?><FilePlanPosition schemeID="[?merge .schemeID @schemeID ?]" schemeName="[?merge .schemeName @schemeName ?]" schemeAgencyID="[?merge .schemeAgencyID @schemeAgencyID ?]" schemeAgencyName="[?merge .schemeAgencyName @schemeAgencyName ?]" schemeVersionID="[?merge .schemeVersionID @schemeVersionID ?]" schemeDataURI="[?merge .schemeDataURI @schemeDataURI ?]" schemeURI="[?merge .schemeURI @schemeURI ?]"><?merge .value ?></FilePlanPosition>
+        <?merge .Content.OriginatingSystemId.bool() ?><OriginatingSystemId><?merge .Content.OriginatingSystemId ?></OriginatingSystemId>
+        <OriginatingAgencyArchiveUnitIdentifier><?merge .Content.OriginatingAgencyArchiveUnitIdentifier ?></OriginatingAgencyArchiveUnitIdentifier>
+        <?merge .Content.Description.bool() ?><Description><?merge .Content.Description ?></Description>
+        <?merge .Content.CustodialHistory.bool() ?>
         <CustodialHistory>
-            <?merge .content.custodialHistory.custodialHistoryItem ?>
+            <?merge .Content.CustodialHistory.CustodialHistoryItem ?>
             <CustodialHistoryItem when="[?merge .when ?]"><?merge .value ?></CustodialHistoryItem>
         </CustodialHistory>
-        <Type><?merge .content.type ?></Type>
-        <DocumentType><?merge .content.documentType ?></DocumentType>
-        <Language><?merge .content.language ?></Language>
-        <DescriptionLanguage><?merge .content.descriptionLanguage ?></DescriptionLanguage>
-        <Status><?merge .content.status ?></Status>
-        <Version><?merge .content.version ?></Version>
-        <?merge .content.tag ?><Tag><?merge .value ?></Tag>
-        <?merge .content.keyword.array() ?><Keyword>
-            <KeywordContent role="[?merge .keywordContent.role @role ?]"><?merge .keywordContent.value ?></KeywordContent>
-            <KeywordReference schemeID="[?merge .keywordReference.schemeID @schemeID ?]" schemeName="[?merge .keywordReference.schemeName @schemeName ?]" schemeAgencyID="[?merge .keywordReference.schemeAgencyID @schemeAgencyID ?]" schemeAgencyName="[?merge .keywordReference.schemeAgencyName @schemeAgencyName ?]" schemeVersionID="[?merge .keywordReference.schemeVersionID @schemeVersionID ?]" schemeDataURI="[?merge .keywordReference.schemeDataURI @schemeDataURI ?]" schemeURI="[?merge .keywordReference.schemeURI @schemeURI ?]"><?merge .keywordReference.value ?></KeywordReference>
-            <KeywordType listVersionID="[?merge .keywordType.listVersionID @listVersionID ?]"><?merge .keywordType ?></KeywordType>
-        </Keyword>
-        <?merge .content.originatingAgency.bool() ?>
+        <Type><?merge .Content.Type ?></Type>
+        <DocumentType><?merge .Content.DocumentType ?></DocumentType>
+        <Language><?merge .Content.Language ?></Language>
+        <DescriptionLanguage><?merge .Content.DescriptionLanguage ?></DescriptionLanguage>
+        <Status><?merge .Content.Status ?></Status>
+        <Version><?merge .Content.Version ?></Version>
+        <?merge .Content.Tag ?><Tag><?merge .value ?></Tag>
+        <?merge .Content.Keyword.array() ?><Keyword>
+        <KeywordContent role="[?merge .KeywordContent.role @role ?]"><?merge .KeywordContent.value ?></KeywordContent>
+        <KeywordReference schemeID="[?merge .KeywordReference.schemeID @schemeID ?]" schemeName="[?merge .KeywordReference.schemeName @schemeName ?]" schemeAgencyID="[?merge .KeywordReference.schemeAgencyID @schemeAgencyID ?]" schemeAgencyName="[?merge .KeywordReference.schemeAgencyName @schemeAgencyName ?]" schemeVersionID="[?merge .KeywordReference.schemeVersionID @schemeVersionID ?]" schemeDataURI="[?merge .KeywordReference.schemeDataURI @schemeDataURI ?]" schemeURI="[?merge .KeywordReference.schemeURI @schemeURI ?]"><?merge .KeywordReference.value ?></KeywordReference>
+        <KeywordType listVersionID="[?merge .KeywordType.listVersionID @listVersionID ?]"><?merge .KeywordType ?></KeywordType>
+    </Keyword>
+        <?merge .Content.OriginatingAgency.bool() ?>
         <OriginatingAgency>
-            <Identifier><?merge .content.originatingAgency.identifier.value ?></Identifier>
+            <Identifier><?merge .Content.OriginatingAgency.Identifier.value ?></Identifier>
         </OriginatingAgency>
-        <?merge .content.submissionAgency.bool() ?>
+        <?merge .Content.SubmissionAgency.bool() ?>
         <SubmissionAgency>
-            <?merge .content.submissionAgency $organization ?>
+            <?merge .Content.SubmissionAgency $organization ?>
             <?xinclude /resources/Organization.xml ?>
         </SubmissionAgency>
-        <?merge .content.authorizedAgend.bool() ?>
+        <?merge .Content.AuthorizedAgend.bool() ?>
         <AuthorizedAgent>
-            <?merge .authorizedAgent $agent ?>
-            <?xinclude /resources/Agent.xml ?>
+            <FirstName><?merge .Content.AuthorizedAgend.FirstName ?></FirstName>
+            <BirthName><?merge .Content.AuthorizedAgend.BirthName ?></BirthName>
+            <GivenName><?merge .Content.AuthorizedAgend.GivenName ?></GivenName>
+            <Gender><?merge .Content.AuthorizedAgend.Gender ?></Gender>
+            <BirthDate><?merge .Content.AuthorizedAgend.BirthDate ?></BirthDate>
+            <BirthPlace><?merge .Content.AuthorizedAgend.BirthPlace ?></BirthPlace>
+            <DeathDate><?merge .Content.AuthorizedAgend.DeathDate ?></DeathDate>
+            <DeathPlace><?merge .Content.AuthorizedAgend.DeathPlace ?></DeathPlace>
+            <Nationality><?merge .Content.AuthorizedAgend.Nationality ?></Nationality>
+            <Function><?merge .Content.AuthorizedAgend.Function ?></Function>
+            <Activity><?merge .Content.AuthorizedAgend.Activity ?></Activity>
+            <Position><?merge .Content.AuthorizedAgend.Position ?></Position>
+            <Role><?merge .Content.AuthorizedAgend.Role ?></Role>
+            <Corpname><?merge .Content.AuthorizedAgend.Corpname ?></Corpname>
+            <Identifier><?merge .Content.AuthorizedAgend.Identifier ?></Identifier>
         </AuthorizedAgent>
-        <?merge .content.writter.array() ?>
-        <Writter>
-            <?merge . $agent ?>
-            <?xinclude /resources/Agent.xml ?>
-        </Writter>
-        <?merge .content.addressee.array()?>
+        <?merge .Content.Writer.array() ?>
+        <Writer>
+            <FirstName><?merge .FirstName ?></FirstName>
+            <BirthName><?merge .BirthName ?></BirthName>
+            <GivenName><?merge .GivenName ?></GivenName>
+            <Gender><?merge .Gender ?></Gender>
+            <BirthDate><?merge .BirthDate ?></BirthDate>
+            <BirthPlace><?merge .BirthPlace ?></BirthPlace>
+            <DeathDate><?merge .DeathDate ?></DeathDate>
+            <DeathPlace><?merge .DeathPlace ?></DeathPlace>
+            <Nationality><?merge .Nationality ?></Nationality>
+            <Function><?merge .Function ?></Function>
+            <Activity><?merge .Activity ?></Activity>
+            <Position><?merge .Position ?></Position>
+            <Role><?merge .Role ?></Role>
+            <Corpname><?merge .Corpname ?></Corpname>
+            <Identifier><?merge .Identifier ?></Identifier>
+        </Writer>
+        <?merge .Content.Addressee.array()?>
         <Addressee>
-            <?merge . $agent ?>
-            <?xinclude /resources/Agent.xml ?>
+            <FirstName><?merge .FirstName ?></FirstName>
+            <BirthName><?merge .BirthName ?></BirthName>
+            <GivenName><?merge .GivenName ?></GivenName>
+            <Gender><?merge .Gender ?></Gender>
+            <BirthDate><?merge .BirthDate ?></BirthDate>
+            <BirthPlace><?merge .BirthPlace ?></BirthPlace>
+            <DeathDate><?merge .DeathDate ?></DeathDate>
+            <DeathPlace><?merge .DeathPlace ?></DeathPlace>
+            <Nationality><?merge .Nationality ?></Nationality>
+            <Function><?merge .Function ?></Function>
+            <Activity><?merge .Activity ?></Activity>
+            <Position><?merge .Position ?></Position>
+            <Role><?merge .Role ?></Role>
+            <Corpname><?merge .Corpname ?></Corpname>
+            <Identifier><?merge .Identifier ?></Identifier>
         </Addressee>
-        <?merge .content.recipient.array() ?>
+        <?merge .Content.Recipient.array() ?>
         <Recipient>
-            <?merge . $agent ?>
-            <?xinclude /resources/Agent.xml ?>
+            <FirstName><?merge .FirstName ?></FirstName>
+            <BirthName><?merge .BirthName ?></BirthName>
+            <GivenName><?merge .GivenName ?></GivenName>
+            <Gender><?merge .Gender ?></Gender>
+            <BirthDate><?merge .BirthDate ?></BirthDate>
+            <BirthPlace><?merge .BirthPlace ?></BirthPlace>
+            <DeathDate><?merge .DeathDate ?></DeathDate>
+            <DeathPlace><?merge .DeathPlace ?></DeathPlace>
+            <Nationality><?merge .Nationality ?></Nationality>
+            <Function><?merge .Function ?></Function>
+            <Activity><?merge .Activity ?></Activity>
+            <Position><?merge .Position ?></Position>
+            <Role><?merge .Role ?></Role>
+            <Corpname><?merge .Corpname ?></Corpname>
+            <Identifier><?merge .Identifier ?></Identifier>
         </Recipient>
-        <Source><?merge .content.source ?></Source>
-        <?merge .content.relatedObjectReference.bool() ?>
+        <Source><?merge .Content.Source ?></Source>
+        <?merge .Content.RelatedObjectReference.bool() ?>
         <RelatedObjectReference>
-            <?merge .content.relatedObjectReference.references ?>
+            <?merge .Content.RelatedObjectReference.References ?>
             <References>
-                <ArchiveUnitRefId><?merge .archiveUnitRefId ?></ArchiveUnitRefId>
+                <ArchiveUnitRefId><?merge .ArchiveUnitRefId ?></ArchiveUnitRefId>
+                <RepositoryArchiveUnitPID><?merge .RepositoryArchiveUnitPID ?></RepositoryArchiveUnitPID>
             </References>
         </RelatedObjectReference>
-        <CreatedDate><?merge .content.createdDate ?></CreatedDate>
-        <TransactedDate><?merge .content.transactedDate ?></TransactedDate>
-        <AcquiredDate><?merge .content.acquiredDate ?></AcquiredDate>
-        <SentDate><?merge .content.sentDate ?></SentDate>
-        <ReceivedDate><?merge .content.receivedDate ?></ReceivedDate>
-        <RegisteredDate><?merge .content.registeredDate ?></RegisteredDate>
-        <StartDate><?merge .content.startDate ?></StartDate>
-        <EndDate><?merge .content.endDate ?></EndDate>
-        <?merge .content.event.array() ?>
+        <CreatedDate><?merge .Content.CreatedDate ?></CreatedDate>
+        <TransactedDate><?merge .Content.TransactedDate ?></TransactedDate>
+        <AcquiredDate><?merge .Content.AcquiredDate ?></AcquiredDate>
+        <SentDate><?merge .Content.SentDate ?></SentDate>
+        <ReceivedDate><?merge .Content.ReceivedDate ?></ReceivedDate>
+        <RegisteredDate><?merge .Content.RegisteredDate ?></RegisteredDate>
+        <StartDate><?merge .Content.StartDate ?></StartDate>
+        <EndDate><?merge .Content.EndDate ?></EndDate>
+        <?merge .Content.Event.array() ?>
         <Event>
-            <EventIdentifier><?merge .eventIdentifier ?></EventIdentifier>
-            <EventType><?merge .eventType ?></EventType>
-            <EventDateTime><?merge .eventDateTime ?></EventDateTime>
-            <EventDetail><?merge .eventDetail ?></EventDetail>
-        </Event> 
+            <EventIdentifier><?merge .EventIdentifier ?></EventIdentifier>
+            <EventType><?merge .EventType ?></EventType>
+            <EventDateTime><?merge .EventDateTime ?></EventDateTime>
+            <EventDetail><?merge .EventDetail ?></EventDetail>
+        </Event>
     </Content>
-    <?merge .archiveUnit /resources/ArchiveUnit.xml?>
-    <?merge .dataObjectReference.bool() ?>
+    <?merge .ArchiveUnit /resources/ArchiveUnit.xml?>
+    <?merge .DataObjectReference.array() ?>
     <DataObjectReference>
-        <?merge .dataObjectReference.dataObjectReferenceId.bool() ?>
-        <DataObjectReferenceId><?merge .dataObjectReference.dataObjectReferenceId ?></DataObjectReferenceId>
-        <?merge .dataObjectReference.dataObjectGroupReferenceId.bool() ?>
-        <DataObjectGroupReferenceId><?merge .dataObjectReference.dataObjectGroupReferenceId ?></DataObjectGroupReferenceId>
+        <?merge .DataObjectReferenceId.bool() ?>
+        <DataObjectReferenceId><?merge .DataObjectReferenceId ?></DataObjectReferenceId>
+        <?merge .DataObjectGroupReferenceId.bool() ?>
+        <DataObjectGroupReferenceId><?merge .DataObjectGroupReferenceId ?></DataObjectGroupReferenceId>
     </DataObjectReference>
-</ArchiveUnit>
\ No newline at end of file
+</ArchiveUnit>
diff --git a/modules/export_seda/resources/ArchiveUnitChildren.xml b/modules/export_seda/resources/ArchiveUnitChildren.xml
old mode 100755
new mode 100644
index 201a6884ea2d84bf90bc72225c7a55b2c8bad705..ad90dcf2a309ae68e4f205f8ade7944f243469b5
--- a/modules/export_seda/resources/ArchiveUnitChildren.xml
+++ b/modules/export_seda/resources/ArchiveUnitChildren.xml
@@ -1,136 +1,131 @@
 <ArchiveUnit id="arch_child_[?merge .id ?]">
-    <ArchiveUnitRefId><?merge .archiveUnitRefId ?></ArchiveUnitRefId>
-    <ArchiveUnitProfile schemeID="[?merge .archiveUnitProfile.schemeID ?]" schemeName="[?merge .archiveUnitProfile.schemeName ?]" schemeAgencyID="[?merge .archiveUnitProfile.schemeAgencyID ?]" schemeAgencyName="[?merge .archiveUnitProfile.schemeAgencyName ?]" schemeVersionID="[?merge .archiveUnitProfile.schemeVersionID ?]" schemeDataURI="[?merge .archiveUnitProfile.schemeDataURI ?]" schemeURI="[?merge .archiveUnitProfile.schemeURI ?]"><?merge .archiveUnitProfile ?></ArchiveUnitProfile>
-    <?merge .management.bool() ?>
+    <ArchiveUnitRefId><?merge .ArchiveUnitRefId ?></ArchiveUnitRefId>
+    <ArchiveUnitProfile schemeID="[?merge .ArchiveUnitProfile.schemeID ?]" schemeName="[?merge .ArchiveUnitProfile.schemeName ?]" schemeAgencyID="[?merge .ArchiveUnitProfile.schemeAgencyID ?]" schemeAgencyName="[?merge .ArchiveUnitProfile.schemeAgencyName ?]" schemeVersionID="[?merge .ArchiveUnitProfile.schemeVersionID ?]" schemeDataURI="[?merge .ArchiveUnitProfile.schemeDataURI ?]" schemeURI="[?merge .ArchiveUnitProfile.schemeURI ?]"><?merge .ArchiveUnitProfile ?></ArchiveUnitProfile>
+    <?merge .Management.bool() ?>
     <Management>
-        <?merge .management.storageRule.bool() ?>
+        <?merge .Management.StorageRule.bool() ?>
         <StorageRule>
-            <?merge .management.storageRule $abstractRule ?>
+            <?merge .management.StorageRule $abstractRule ?>
             <?xinclude /resources/AbstractRule.xml ?>
-            <FinalAction><?merge .management.storageRule.finalAction ?></FinalAction>
+            <FinalAction><?merge .Management.StorageRule.FinalAction ?></FinalAction>
         </StorageRule>
-        <?merge .management.appraisalRule.bool() ?>
+        <?merge .Management.AppraisalRule.bool() ?>
         <AppraisalRule>
-            <?merge .management.appraisalRule $abstractRule ?>
+            <?merge .Management.AppraisalRule $abstractRule ?>
             <?xinclude /resources/AbstractRule.xml ?>
-            <FinalAction><?merge .management.appraisalRule.finalAction ?></FinalAction>
+            <FinalAction><?merge .Management.AppraisalRule.finalAction ?></FinalAction>
         </AppraisalRule>
-        <?merge .management.accessRule.bool() ?>
+        <?merge .Management.AccessRule.bool() ?>
         <AccessRule>
-            <?merge .management.accessRule $abstractRule ?>
+            <?merge .Management.AccessRule $abstractRule ?>
             <?xinclude /resources/AbstractRule.xml ?>
         </AccessRule>
-        <?merge .management.disseminationRule.bool() ?>
+        <?merge .Management.DisseminationRule.bool() ?>
         <DisseminationRule>
-            <?merge .management.disseminationRule $abstractRule ?>
+            <?merge .Management.DisseminationRule $abstractRule ?>
             <?xinclude /resources/AbstractRule.xml ?>
         </DisseminationRule>
-        <?merge .management.reuseRule.bool() ?>
+        <?merge .Management.ReuseRule.bool() ?>
         <ReuseRule>
-            <?merge .management.reuseRule $abstractRule ?>
+            <?merge .Management.ReuseRule $abstractRule ?>
             <?xinclude /resources/AbstractRule.xml ?>
         </ReuseRule>
-        <?merge .management.classificationRule.bool() ?>
+        <?merge .Management.ClassificationRule.bool() ?>
         <ClassificationRule>
-            <?merge .management.classificationRule $abstractRule ?>
+            <?merge .Management.ClassificationRule $abstractRule ?>
             <?xinclude /resources/AbstractRule.xml ?>
-            <ClassificationLevel><?merge .management.classificationRule.classificationLevel ?></ClassificationLevel>
-            <ClassificationOwner><?merge .management.classificationRule.classificationOwner ?></ClassificationOwner>
-            <ClassificationReassessingDate><?merge .management.classificationRule.classificationReassessingDate ?></ClassificationReassessingDate>
-            <NeedReassessingAuthorization><?merge .management.classificationRule.needReassessingAuthorization ?></NeedReassessingAuthorization>
+            <ClassificationLevel><?merge .Management.ClassificationRule.ClassificationLevel ?></ClassificationLevel>
+            <ClassificationOwner><?merge .Management.ClassificationRule.ClassificationOwner ?></ClassificationOwner>
+            <ClassificationReassessingDate><?merge .Management.ClassificationRule.ClassificationReassessingDate ?></ClassificationReassessingDate>
+            <NeedReassessingAuthorization><?merge .Management.ClassificationRule.NeedReassessingAuthorization ?></NeedReassessingAuthorization>
         </ClassificationRule>
-        <?merge .management.needAuthorization.bool() ?>
+        <?merge .Management.NeedAuthorization.bool() ?>
         <NeedAuthorization>
-            <?merge .management.needAuthorization ?>
+            <?merge .Management.NeedAuthorization ?>
         </NeedAuthorization>
-        <?merge .management.otherManagementAbstract.bool() ?>
+        <?merge .Management.OtherManagementAbstract.bool() ?>
         <OtherManagementAbstract>
-            <?merge .management.otherManagementAbstract ?>
+            <?merge .Management.OtherManagementAbstract ?>
         </OtherManagementAbstract>
     </Management>
-    <?merge .content.bool() ?>
+    <?merge .Content.bool() ?>
     <Content>
-        <DescriptionLevel listVersionID="[?merge .descriptionLevel ?]"><?merge .content.descriptionLevel ?></DescriptionLevel>
-        <?merge .content.title ?><Title><?merge . ?></Title>
-        <?merge .content.filePlanPosition ?><FilePlanPosition schemeID="[?merge .schemeID @schemeID ?]" schemeName="[?merge .schemeName @schemeName ?]" schemeAgencyID="[?merge .schemeAgencyID @schemeAgencyID ?]" schemeAgencyName="[?merge .schemeAgencyName @schemeAgencyName ?]" schemeVersionID="[?merge .schemeVersionID @schemeVersionID ?]" schemeDataURI="[?merge .schemeDataURI @schemeDataURI ?]" schemeURI="[?merge .schemeURI @schemeURI ?]"><?merge .value ?></FilePlanPosition>
-        <?merge .originatingSystemId ?><OriginatingSystemId><?merge .content.originatingSystemId ?></OriginatingSystemId>
-        <OriginatingAgencyArchiveIdentifier><?merge .content.originatingAgencyArchiveIdentifier ?></OriginatingAgencyArchiveIdentifier>
-        <?merge .content.description.bool() ?><Description><?merge .content.description ?></Description>
-        <?merge .content.custodialHistory.bool() ?>
+        <DescriptionLevel><?merge .Content.DescriptionLevel ?></DescriptionLevel>
+        <?merge .Content.Title ?><Title><?merge . ?></Title>
+        <?merge .Content.FilePlanPosition ?><FilePlanPosition schemeID="[?merge .schemeID @schemeID ?]" schemeName="[?merge .schemeName @schemeName ?]" schemeAgencyID="[?merge .schemeAgencyID @schemeAgencyID ?]" schemeAgencyName="[?merge .schemeAgencyName @schemeAgencyName ?]" schemeVersionID="[?merge .schemeVersionID @schemeVersionID ?]" schemeDataURI="[?merge .schemeDataURI @schemeDataURI ?]" schemeURI="[?merge .schemeURI @schemeURI ?]"><?merge .value ?></FilePlanPosition>
+        <?merge .Content.OriginatingSystemId ?><OriginatingSystemId><?merge .Content.OriginatingSystemId ?></OriginatingSystemId>
+        <OriginatingAgencyArchiveUnitIdentifier><?merge .Content.OriginatingAgencyArchiveUnitIdentifier ?></OriginatingAgencyArchiveUnitIdentifier>
+        <?merge .Content.Description.bool() ?><Description><?merge .Content.Description ?></Description>
+        <?merge .Content.CustodialHistory.bool() ?>
         <CustodialHistory>
-            <?merge .content.custodialHistory.custodialHistoryItem ?>
+            <?merge .Content.CustodialHistory.CustodialHistoryItem ?>
             <CustodialHistoryItem when="[?merge .when ?]"><?merge .value ?></CustodialHistoryItem>
         </CustodialHistory>
-        <Type><?merge .content.type ?></Type>
-        <DocumentType><?merge .content.documentType ?></DocumentType>
-        <Language><?merge .content.language ?></Language>
-        <DescriptionLanguage><?merge .content.descriptionLanguage ?></DescriptionLanguage>
-        <Status><?merge .content.status ?></Status>
-        <Version><?merge .content.version ?></Version>
-        <?merge .content.tag ?><Tag><?merge .value ?></Tag>
-        <?merge .content.keyword.array() ?><Keyword>
-            <KeywordContent role="[?merge .keywordContent.role @role ?]"><?merge .keywordContent.value ?></KeywordContent>
-            <KeywordReference schemeID="[?merge .keywordReference.schemeID @schemeID ?]" schemeName="[?merge .keywordReference.schemeName @schemeName ?]" schemeAgencyID="[?merge .keywordReference.schemeAgencyID @schemeAgencyID ?]" schemeAgencyName="[?merge .keywordReference.schemeAgencyName @schemeAgencyName ?]" schemeVersionID="[?merge .keywordReference.schemeVersionID @schemeVersionID ?]" schemeDataURI="[?merge .keywordReference.schemeDataURI @schemeDataURI ?]" schemeURI="[?merge .keywordReference.schemeURI @schemeURI ?]"><?merge .keywordReference.value ?></KeywordReference>
-            <KeywordType listVersionID="[?merge .keywordType.listVersionID @listVersionID ?]"><?merge .keywordType ?></KeywordType>
+        <Type><?merge .Content.Type ?></Type>
+        <DocumentType><?merge .Content.DocumentType ?></DocumentType>
+        <Language><?merge .Content.Language ?></Language>
+        <DescriptionLanguage><?merge .Content.DescriptionLanguage ?></DescriptionLanguage>
+        <Status><?merge .Content.Status ?></Status>
+        <Version><?merge .Content.Version ?></Version>
+        <?merge .Content.Tag ?><Tag><?merge .value ?></Tag>
+        <?merge .Content.Keyword.array() ?>
+        <Keyword>
+            <KeywordContent role="[?merge .KeywordContent.role @role ?]"><?merge .KeywordContent.value ?></KeywordContent>
+            <KeywordReference schemeID="[?merge .KeywordReference.schemeID @schemeID ?]" schemeName="[?merge .KeywordReference.schemeName @schemeName ?]" schemeAgencyID="[?merge .KeywordReference.schemeAgencyID @schemeAgencyID ?]" schemeAgencyName="[?merge .KeywordReference.schemeAgencyName @schemeAgencyName ?]" schemeVersionID="[?merge .KeywordReference.schemeVersionID @schemeVersionID ?]" schemeDataURI="[?merge .KeywordReference.schemeDataURI @schemeDataURI ?]" schemeURI="[?merge .KeywordReference.schemeURI @schemeURI ?]"><?merge .KeywordReference.value ?></KeywordReference>
+            <KeywordType listVersionID="[?merge .KeywordType.listVersionID @listVersionID ?]"><?merge .KeywordType ?></KeywordType>
         </Keyword>
-        <Coverage>
-            <SpatialCoverage><?merge .content.spatialCoverage ?></SpatialCoverage>
-            <TemporalCoverage><?merge .content.temporalCoverage ?></TemporalCoverage>
-            <JuridicationalCoverage><?merge .content.juridictionalCoverage ?></JuridicationalCoverage>
-        </Coverage>
-        <?merge .content.originatingAgency.bool() ?>
+        <?merge .Content.OriginatingAgency.bool() ?>
         <OriginatingAgency>
-            <?merge .content.originatingAgency $organization ?>
-            <?xinclude /resources/Organization.xml ?>
+            <Identifier><?merge .Content.OriginatingAgency.Identifier.value ?></Identifier>
         </OriginatingAgency>
-        <?merge .content.submissionAgency.bool() ?>
+        <?merge .Content.SubmissionAgency.bool() ?>
         <SubmissionAgency>
-            <?merge .content.submissionAgency $organization ?>
+            <?merge .Content.SubmissionAgency $organization ?>
             <?xinclude /resources/Organization.xml ?>
         </SubmissionAgency>
-        <?merge .content.authorizedAgend.bool() ?>
+        <?merge .Content.AuthorizedAgend.bool() ?>
         <AuthorizedAgent>
-            <?merge .authorizedAgent $agent ?>
+            <?merge .AuthorizedAgent $agent ?>
             <?xinclude /resources/Agent.xml ?>
         </AuthorizedAgent>
-        <?merge .content.writter.array() ?>
+        <?merge .Content.Writter.array() ?>
         <Writter>
             <?merge . $agent ?>
             <?xinclude /resources/Agent.xml ?>
         </Writter>
-        <?merge .content.addressee.array()?>
+        <?merge .Content.Addressee.array()?>
         <Addressee>
             <?merge . $agent ?>
             <?xinclude /resources/Agent.xml ?>
         </Addressee>
-        <?merge .content.recipient.array() ?>
+        <?merge .Content.Recipient.array() ?>
         <Recipient>
             <?merge . $agent ?>
             <?xinclude /resources/Agent.xml ?>
         </Recipient>
-        <Source><?merge .content.source ?></Source>
-        <CreatedDate><?merge .content.createdDate ?></CreatedDate>
-        <TransactedDate><?merge .content.transactedDate ?></TransactedDate>
-        <AcquiredDate><?merge .content.acquiredDate ?></AcquiredDate>
-        <SentDate><?merge .content.sentDate ?></SentDate>
-        <ReceivedDate><?merge .content.receivedDate ?></ReceivedDate>
-        <RegisteredDate><?merge .content.registeredDate ?></RegisteredDate>
-        <StartDate><?merge .content.startDate ?></StartDate>
-        <EndDate><?merge .content.endDate ?></EndDate>
-        <?merge .content.event.array() ?>
+        <Source><?merge .Content.Source ?></Source>
+        <CreatedDate><?merge .Content.CreatedDate ?></CreatedDate>
+        <TransactedDate><?merge .Content.TransactedDate ?></TransactedDate>
+        <AcquiredDate><?merge .Content.AcquiredDate ?></AcquiredDate>
+        <SentDate><?merge .Content.SentDate ?></SentDate>
+        <ReceivedDate><?merge .Content.ReceivedDate ?></ReceivedDate>
+        <RegisteredDate><?merge .Content.RegisteredDate ?></RegisteredDate>
+        <StartDate><?merge .Content.StartDate ?></StartDate>
+        <EndDate><?merge .Content.EndDate ?></EndDate>
+        <?merge .Content.Event.array() ?>
         <Event>
-            <EventIdentifier><?merge .eventIdentifier ?></EventIdentifier>
-            <EventType><?merge .eventType ?></EventType>
-            <EventDateTime><?merge .eventDateTime ?></EventDateTime>
-            <EventDetail><?merge .eventDetail ?></EventDetail>
-        </Event> 
+            <EventIdentifier><?merge .EventIdentifier ?></EventIdentifier>
+            <EventType><?merge .EventType ?></EventType>
+            <EventDateTime><?merge .EventDateTime ?></EventDateTime>
+            <EventDetail><?merge .EventDetail ?></EventDetail>
+        </Event>
     </Content>
-    
-    <?merge .dataObjectReference.bool() ?>
+
+    <?merge .DataObjectReference.bool() ?>
     <DataObjectReference>
-        <?merge .dataObjectReference.dataObjectReferenceId.bool() ?>
-        <DataObjectReferenceId><?merge .dataObjectReference.dataObjectReferenceId ?></DataObjectReferenceId>
-        <?merge .dataObjectReference.dataObjectGroupReferenceId.bool() ?>
-        <DataObjectGroupReferenceId><?merge .dataObjectReference.dataObjectGroupReferenceId ?></DataObjectGroupReferenceId>
+        <?merge .DataObjectReference.DataObjectReferenceId.bool() ?>
+        <DataObjectReferenceId><?merge .DataObjectReference.DataObjectReferenceId ?></DataObjectReferenceId>
+        <?merge .DataObjectReference.DataObjectGroupReferenceId.bool() ?>
+        <DataObjectGroupReferenceId><?merge .DataObjectReference.DataObjectGroupReferenceId ?></DataObjectGroupReferenceId>
     </DataObjectReference>
 </ArchiveUnit>
\ No newline at end of file
diff --git a/modules/export_seda/resources/DataObjectPackage.xml b/modules/export_seda/resources/DataObjectPackage.xml
old mode 100755
new mode 100644
index d4031c27708e9fbab500e2a231dce04b0523936e..497103b15773b51278ab9f3d4c1abccf03fa17f3
--- a/modules/export_seda/resources/DataObjectPackage.xml
+++ b/modules/export_seda/resources/DataObjectPackage.xml
@@ -1,28 +1,27 @@
 <DataObjectPackage>
-    <?merge $dataObjectPackage.binaryDataObject ?>
-    <BinaryDataObject id="doc_[?merge .id ?]">
-        <Attachment filename="[?merge .attachment.filename ?]"/>
-        <Uri><?merge .uri ?></Uri>
-        <MessageDigest algorithm="[?merge .messageDigest.algorithm ?]"><?merge .messageDigest.value ?></MessageDigest>
-        <Size><?merge .size.value ?></Size>
+    <?merge $dataObjectPackage.BinaryDataObject ?>
+    <BinaryDataObject id="[?merge .id ?]">
+        <?merge .Attachment.bool() ?><Attachment filename="[?merge .Attachment.filename ?]" uri="[?merge .Attachment.uri ?]"><?merge .Attachment.value ?></Attachment>
+        <?merge .Uri.bool() ?><Uri><?merge .Uri ?></Uri>
+        <MessageDigest algorithm="[?merge .MessageDigest.algorithm ?]"><?merge .MessageDigest.value ?></MessageDigest>
+        <Size><?merge .Size ?></Size>
         <FormatIdentification>
-            <MimeType><?merge .formatIdentification.mimeType ?></MimeType>
-            <FormatId><?merge .formatIdentification.formatId ?></FormatId>
+            <MimeType><?merge .FormatIdentification.MimeType ?></MimeType>
+            <FormatId><?merge .FormatIdentification.FormatId ?></FormatId>
         </FormatIdentification>
-        <?merge .fileInfo.bool() ?>
+        <?merge .FileInfo.bool() ?>
         <FileInfo>
-            <Filename><?merge .fileInfo.filename ?></Filename>
+            <Filename><?merge .FileInfo.Filename ?></Filename>
         </FileInfo>
     </BinaryDataObject>
-    <?merge $dataObjectPackage.physicalDataObject.bool() ?>
+    <?merge $dataObjectPackage.PhysicalDataObject.bool() ?>
     <PhysicalDataObject>
         <?merge .bool() ?>
-        <PhysicalId schemeID="[?merge .physicalId.schemeID ?]" schemeName="[?merge .physicalId.schemeName ?]" schemeAgencyID="[?merge .physicalId.schemeAgencyID ?]" schemeAgencyName="[?merge .physicalId.schemeAgencyName ?]" schemeVersionID="[?merge .physicalId.schemeVersionID ?]" schemeDataURI="[?merge .physicalId.schemeDataURI ?]" schemeURI="[?merge .physicalId.schemeURI ?]"><?merge .physicalId.value ?></PhysicalId>
+        <PhysicalId schemeID="[?merge .PhysicalId.schemeID ?]" schemeName="[?merge .PhysicalId.schemeName ?]" schemeAgencyID="[?merge .PhysicalId.schemeAgencyID ?]" schemeAgencyName="[?merge .PhysicalId.schemeAgencyName ?]" schemeVersionID="[?merge .PhysicalId.schemeVersionID ?]" schemeDataURI="[?merge .PhysicalId.schemeDataURI ?]" schemeURI="[?merge .PhysicalId.schemeURI ?]"><?merge .PhysicalId.value ?></PhysicalId>
     </PhysicalDataObject>
     <DescriptiveMetadata>
-        <?merge $dataObjectPackage.descriptiveMetadata ?>
-        <?xinclude /resources/ArchiveUnit.xml ?>
+        <?merge $dataObjectPackage.DescriptiveMetadata.ArchiveUnit /resources/ArchiveUnit.xml?>
     </DescriptiveMetadata>
-    <?merge $dataObjectPackage.managementMetadata $managementMetadata ?>
+    <?merge $dataObjectPackage.ManagementMetadata $managementMetadata ?>
     <?xinclude /resources/ManagementMetadata.xml ?>
 </DataObjectPackage>
\ No newline at end of file
diff --git a/modules/export_seda/resources/ManagementMetadata.xml b/modules/export_seda/resources/ManagementMetadata.xml
old mode 100755
new mode 100644
index 0fd3fc090426c84995263f0e176852048fae38ee..66229a9ab12dfe11d6e1fad40f757ed9fbe908bb
--- a/modules/export_seda/resources/ManagementMetadata.xml
+++ b/modules/export_seda/resources/ManagementMetadata.xml
@@ -1,48 +1,60 @@
 <ManagementMetadata>
-    <?merge $managementMetadata.archivalProfile.bool() ?><ArchivalProfile><?merge $managementMetadata.archivalProfile.value ?></ArchivalProfile>
-    <?merge $managementMetadata.serviceLevel.bool() ?><ServiceLevel><?merge $managementMetadata.serviceLevel.value ?></ServiceLevel>
-    <?merge $managementMetadata.storageRule.bool() ?>
+    <?merge $managementMetadata.ArchivalProfile.bool() ?><ArchivalProfile><?merge $managementMetadata.ArchivalProfile.value ?></ArchivalProfile>
+    <?merge $managementMetadata.ServiceLevel.bool() ?><ServiceLevel><?merge $managementMetadata.ServiceLevel.value ?></ServiceLevel>
+    <?merge $managementMetadata.StorageRule.bool() ?>
     <StorageRule>
-        <?merge $managementMetadata.storageRule $abstractRule ?>
-        <?xinclude /resources/AbstractRule.xml ?>
-        <FinalAction><?merge $managementMetadata.storageRule.finalAction ?></FinalAction>
+        <?merge $managementMetadata.StorageRule.Rule.bool() ?><Rule><?merge $managementMetadata.StorageRule.Rule.value ?></Rule>
+        <?merge $managementMetadata.StorageRule.StartDate.bool() ?><StartDate><?merge $managementMetadata.StorageRule.StartDate.value ?></StartDate>
+        <PreventInheritance><?merge $managementMetadata.StorageRule.PreventInheritance ?></PreventInheritance>
+        <RefNonRuleId><?merge $managementMetadata.StorageRule.RefNonRuleId ?></RefNonRuleId>
+        <FinalAction><?merge $managementMetadata.StorageRule.FinalAction ?></FinalAction>
     </StorageRule>
-    <?merge $managementMetadata.appraisalRule.bool() ?>
+    <?merge $managementMetadata.AppraisalRule.bool() ?>
     <AppraisalRule>
-        <?merge $managementMetadata.appraisalRule $abstractRule ?>
-        <?xinclude /resources/AbstractRule.xml ?>
-        <FinalAction><?merge $managementMetadata.appraisalRule.finalAction ?></FinalAction>
+        <?merge $managementMetadata.AppraisalRule.Rule.bool() ?><Rule><?merge $managementMetadata.AppraisalRule.Rule.value ?></Rule>
+        <?merge $managementMetadata.AppraisalRule.StartDate.bool() ?><StartDate><?merge $managementMetadata.AppraisalRule.StartDate.value ?></StartDate>
+        <PreventInheritance><?merge $managementMetadata.AppraisalRule.PreventInheritance ?></PreventInheritance>
+        <RefNonRuleId><?merge $managementMetadata.AppraisalRule.RefNonRuleId ?></RefNonRuleId>
+        <FinalAction><?merge $managementMetadata.AppraisalRule.FinalAction ?></FinalAction>
     </AppraisalRule>
-    <?merge $managementMetadata.accessRule.bool() ?>
+    <?merge $managementMetadata.AccessRule.bool() ?>
     <AccessRule>
-        <?merge $managementMetadata.accessRule $abstractRule ?>
-        <?xinclude /resources/AbstractRule.xml ?>
+        <?merge $managementMetadata.AccessRule.Rule.bool() ?><Rule><?merge $managementMetadata.AccessRule.Rule.value ?></Rule>
+        <?merge $managementMetadata.AccessRule.StartDate.bool() ?><StartDate><?merge $managementMetadata.AccessRule.StartDate.value ?></StartDate>
+        <PreventInheritance><?merge $managementMetadata.AccessRule.PreventInheritance ?></PreventInheritance>
+        <RefNonRuleId><?merge $managementMetadata.AccessRule.RefNonRuleId ?></RefNonRuleId>
     </AccessRule>
-    <?merge $managementMetadata.disseminationRule.bool() ?>
+    <?merge $managementMetadata.DisseminationRule.bool() ?>
     <DisseminationRule>
-        <?merge $managementMetadata.disseminationRule $abstractRule ?>
-        <?xinclude /resources/AbstractRule.xml ?>
+        <?merge $managementMetadata.DisseminationRule.Rule.bool() ?><Rule><?merge $managementMetadata.DisseminationRule.Rule.value ?></Rule>
+        <?merge $managementMetadata.DisseminationRule.StartDate.bool() ?><StartDate><?merge $managementMetadata.DisseminationRule.StartDate.value ?></StartDate>
+        <PreventInheritance><?merge $managementMetadata.DisseminationRule.PreventInheritance ?></PreventInheritance>
+        <RefNonRuleId><?merge $managementMetadata.DisseminationRule.RefNonRuleId ?></RefNonRuleId>
     </DisseminationRule>
-    <?merge $managementMetadata.reuseRule.bool() ?>
+    <?merge $managementMetadata.ReuseRule.bool() ?>
     <ReuseRule>
-        <?merge $managementMetadata.reuseRule $abstractRule ?>
-        <?xinclude /resources/AbstractRule.xml ?>
+        <?merge $managementMetadata.ReuseRule.Rule.bool() ?><Rule><?merge $managementMetadata.ReuseRule.Rule.value ?></Rule>
+        <?merge $managementMetadata.ReuseRule.StartDate.bool() ?><StartDate><?merge $managementMetadata.ReuseRule.StartDate.value ?></StartDate>
+        <PreventInheritance><?merge $managementMetadata.ReuseRule.PreventInheritance ?></PreventInheritance>
+        <RefNonRuleId><?merge $managementMetadata.ReuseRule.RefNonRuleId ?></RefNonRuleId>
     </ReuseRule>
-    <?merge $managementMetadata.classificationRule.bool() ?>
+    <?merge $managementMetadata.ClassificationRule.bool() ?>
     <ClassificationRule>
-        <?merge $managementMetadata.classificationRule $abstractRule ?>
-        <?xinclude /resources/AbstractRule.xml ?>
-        <ClassificationLevel><?merge $managementMetadata.classificationRule.classificationLevel ?></ClassificationLevel>
-        <ClassificationOwner><?merge $managementMetadata.classificationRule.classificationOwner ?></ClassificationOwner>
-        <ClassificationReassessingDate><?merge $managementMetadata.classificationRule.classificationReassessingDate ?></ClassificationReassessingDate>
-        <NeedReassessingAuthorization><?merge $managementMetadata.classificationRule.needReassessingAuthorization ?></NeedReassessingAuthorization>
+        <?merge $managementMetadata.ClassificationRule.Rule.bool() ?><Rule><?merge $managementMetadata.ClassificationRule.Rule.value ?></Rule>
+        <?merge $managementMetadata.ClassificationRule.StartDate.bool() ?><StartDate><?merge $managementMetadata.ClassificationRule.StartDate.value ?></StartDate>
+        <PreventInheritance><?merge $managementMetadata.ClassificationRule.PreventInheritance ?></PreventInheritance>
+        <RefNonRuleId><?merge $managementMetadata.ClassificationRule.RefNonRuleId ?></RefNonRuleId>
+        <ClassificationLevel><?merge $managementMetadata.ClassificationRule.ClassificationLevel ?></ClassificationLevel>
+        <ClassificationOwner><?merge $managementMetadata.ClassificationRule.ClassificationOwner ?></ClassificationOwner>
+        <ClassificationReassessingDate><?merge $managementMetadata.ClassificationRule.ClassificationReassessingDate ?></ClassificationReassessingDate>
+        <NeedReassessingAuthorization><?merge $managementMetadata.ClassificationRule.NeedReassessingAuthorization ?></NeedReassessingAuthorization>
     </ClassificationRule>
-    <?merge $managementMetadata.needAuthorization.bool() ?>
+    <?merge $managementMetadata.NeedAuthorization.bool() ?>
     <NeedAuthorization>
-        <?merge $managementMetadata.needAuthorization ?>
+        <?merge $managementMetadata.NeedAuthorization ?>
     </NeedAuthorization>
-    <?merge $managementMetadata.otherManagementAbstract.bool() ?>
+    <?merge $managementMetadata.OtherManagementAbstract.bool() ?>
     <OtherManagementAbstract>
-        <?merge $managementMetadata.otherManagementAbstract ?>
+        <?merge $managementMetadata.OtherManagementAbstract ?>
     </OtherManagementAbstract>
-</ManagementMetadata>
\ No newline at end of file
+</ManagementMetadata>
diff --git a/modules/export_seda/resources/Organization.xml b/modules/export_seda/resources/Organization.xml
old mode 100755
new mode 100644
index 61967de7d4797f01c459e8122cbbf067ac67eb67..f7c20b479b67ebe95e48057e6f0294f964c8f397
--- a/modules/export_seda/resources/Organization.xml
+++ b/modules/export_seda/resources/Organization.xml
@@ -1,2 +1,41 @@
-<Identifier schemeID="[?merge $organization.identifier.schemeID @schemeID ?]" schemeName="[?merge $organization.identifier.schemeName @schemeName ?]" schemeAgencyID="[?merge $organization.identifier.schemeAgencyID @schemeAgencyID ?]" schemeAgencyName="[?merge $organization.identifier.schemeAgencyName @schemeAgencyName ?]" schemeVersionID="[?merge $organization.identifier.schemeVersionID @schemeVersionID ?]" schemeDataURI="[?merge $organization.identifier.schemeDataURI @schemeDataURI ?]" schemeURI="[?merge $organization.identifier.schemeURI @schemeURI ?]"><?merge $organization.identifier.value ?></Identifier>
-<OrganizationDescriptiveMetadata></OrganizationDescriptiveMetadata>
\ No newline at end of file
+<Identifier schemeID="[?merge $organization.Identifier.schemeID @schemeID ?]" schemeName="[?merge $organization.Identifier.schemeName @schemeName ?]" schemeAgencyID="[?merge $organization.Identifier.schemeAgencyID @schemeAgencyID ?]" schemeAgencyName="[?merge $organization.Identifier.schemeAgencyName @schemeAgencyName ?]" schemeVersionID="[?merge $organization.Identifier.schemeVersionID @schemeVersionID ?]" schemeDataURI="[?merge $organization.Identifier.schemeDataURI @schemeDataURI ?]" schemeURI="[?merge $organization.Identifier.schemeURI @schemeURI ?]"><?merge $organization.Identifier.value ?></Identifier>
+        <?merge $organization.OrganizationDescriptiveMetadata.bool() ?>
+<OrganizationDescriptiveMetadata>
+    <?merge $organization.OrganizationDescriptiveMetadata.LegalClassification.bool() ?>
+    <LegalClassification><?merge $organization.OrganizationDescriptiveMetadata.LegalClassification ?></LegalClassification>
+    <?merge $organization.OrganizationDescriptiveMetadata.Name.bool() ?>
+    <Name><?merge $organization.OrganizationDescriptiveMetadata.Name ?></Name>
+    <?merge $organization.OrganizationDescriptiveMetadata.Address.array() ?>
+    <Address>
+        <CityName><?merge .CityName ?></CityName>
+        <Country><?merge .Country ?></Country>
+        <PostCode><?merge .PostCode ?></PostCode>
+        <PostOfficeBox><?merge .PostOfficeBox ?></PostOfficeBox>
+        <StreetName><?merge .StreetName ?></StreetName>
+    </Address>
+    <?merge $organization.OrganizationDescriptiveMetadata.Communication.array() ?>
+    <Communication>
+        <Channel><?merge .Channel ?></Channel>
+        <CompleteNumber><?merge .value ?></CompleteNumber>
+    </Communication>
+    <?merge $organization.OrganizationDescriptiveMetadata.Contact.array() ?>
+    <Contact>
+        <?merge .DepartmentName.bool() ?>
+        <DepartmentName><?merge .DepartmentName ?></DepartmentName>
+        <?merge .PersonName.bool() ?>
+        <PersonName><?merge .PersonName ?></PersonName>
+        <?merge .Communication ?>
+        <Communication>
+            <Channel><?merge .Channel ?></Channel>
+            <CompleteNumber><?merge .value ?></CompleteNumber>
+        </Communication>
+   	<?merge .Address ?>
+    	<Address>
+        	<CityName><?merge .CityName ?></CityName>
+        	<Country><?merge .Country ?></Country>
+		<PostCode><?merge .PostCode ?></PostCode>
+		<PostOfficeBox><?merge .PostOfficeBox ?></PostOfficeBox>
+		<StreetName><?merge .StreetName ?></StreetName>
+    	</Address>
+    </Contact>
+</OrganizationDescriptiveMetadata>
diff --git a/modules/export_seda/resources/xsd/seda-2.0-descriptive.xsd b/modules/export_seda/resources/xsd/seda-2.0-descriptive.xsd
new file mode 100644
index 0000000000000000000000000000000000000000..c31866cb892647a42631436c6489ae76e43ba014
--- /dev/null
+++ b/modules/export_seda/resources/xsd/seda-2.0-descriptive.xsd
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="fr:gouv:culture:archivesdefrance:seda:v2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="fr:gouv:culture:archivesdefrance:seda:v2.0"
+    elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
+    <xsd:include schemaLocation="seda-2.0-types.xsd"/>
+    <xsd:include schemaLocation="seda-2.0-management.xsd"/>
+    <xsd:include schemaLocation="seda-2.0-ontology.xsd"/>
+    
+    <!-- Hierarchy and recursivity -->
+    <xsd:complexType name="ArchiveUnitType">
+        <xsd:annotation>
+            <xsd:documentation>Unité de base des métadonnées de description contenant la gestion de l'arborescence.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:choice>
+            <xsd:element name="ArchiveUnitRefId" type="ArchiveUnitRefIdType">
+                <xsd:annotation>
+                    <xsd:documentation>Permet de faire une référence à d'autres ArchiveUnit dans la même transaction.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:sequence>
+                <xsd:element name="ArchiveUnitProfile" type="IdentifierType" minOccurs="0">
+                    <xsd:annotation>
+                        <xsd:documentation>Référence à une partie d'un profil d’archivage applicable à un ArchiveUnit en particulier. Permet par exemple de faire référence à une typologie documentaire dans un profil d'archivage.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+                <xsd:element name="Management" minOccurs="0">
+                    <xsd:annotation>
+                        <xsd:documentation>Métadonnées de gestion applicables à l’ArchiveUnit concernée et à ses héritiers.</xsd:documentation>
+                    </xsd:annotation>
+                    <xsd:complexType>
+                        <xsd:group ref="ManagementGroup"/>
+                    </xsd:complexType>
+                </xsd:element>
+                <xsd:element name="Content" type="DescriptiveMetadataContentType" minOccurs="1" maxOccurs="unbounded" >
+                    <xsd:annotation>
+                        <xsd:documentation>Métadonnées de description associées à un ArchiveUnit.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+                <!-- Hierarchy -->
+                <xsd:choice>
+                    <xsd:choice minOccurs="0" maxOccurs="unbounded">
+                        <xsd:element name="ArchiveUnit" type="ArchiveUnitType">
+                            <xsd:annotation>
+                                <xsd:documentation>Gestion de la récursivité. Un &lt;ArchiveUnit&gt; peut être contenu dans un ature &lt;ArchiveUnit&gt;.</xsd:documentation>
+                            </xsd:annotation>
+                        </xsd:element>
+                        <xsd:element ref="ArchiveUnitReferenceAbstract">
+                            <xsd:annotation>
+                                <xsd:documentation>Permet de faire référence à une sous unité d'archives, pouvant être déjà présente dans le système d'archivage provenant d'une transaction précédente.</xsd:documentation>
+                            </xsd:annotation>
+                        </xsd:element>
+                        <xsd:element name="DataObjectReference" type="DataObjectRefType">
+                            <xsd:annotation>
+                                <xsd:documentation>Permet de faire référence à un objet-donnée binaire ou physique déjà présent dans les métadonnées du bordereau.</xsd:documentation>
+                            </xsd:annotation>
+                        </xsd:element>
+                    </xsd:choice>
+                </xsd:choice>
+            </xsd:sequence>
+        </xsd:choice>
+        <xsd:attribute name="id" type="ArchiveUnitIdType" use="required">
+            <xsd:annotation>
+                <xsd:documentation>Identifiant de l'unité d'archives utilisé par exemple dans le cas de multiples héritages, pour savoir quel noeud contient une erreur.</xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+    </xsd:complexType>
+
+    <!-- In ArchiveUnitType from seda-2.0-descriptive.xsd: Descriptive Metadata Content -->
+    <xsd:complexType name="DescriptiveMetadataContentType">
+        <xsd:annotation>
+            <xsd:documentation>Permet de définir les métadonnées de description. Peut être étendu.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:group ref="ObjectGroup"/>
+        </xsd:sequence>
+        <xsd:attribute name="restrictionRuleIdRef" type="xsd:IDREF" use="optional">
+            <xsd:annotation>
+                <xsd:documentation>Permet d'indiquer les restrictions à appliquer sur le noeud. Si rien n'est spécifié, aucune restriction ne s'applique.</xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="restrictionValue" type="NonEmptyTokenType" use="optional">
+            <xsd:annotation>
+                <xsd:documentation>Valeur de la restriction.</xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="restrictionEndDate" type="xsd:date" use="optional">
+            <xsd:annotation>
+                <xsd:documentation>Date de la fin de la restriction.</xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attributeGroup ref="OpenTypeAttributeGroup"/>
+    </xsd:complexType>
+    
+</xsd:schema>
diff --git a/modules/export_seda/resources/xsd/seda-2.0-main.xsd b/modules/export_seda/resources/xsd/seda-2.0-main.xsd
new file mode 100644
index 0000000000000000000000000000000000000000..08fd37638339dd5b0442ac2be82358145bb03587
--- /dev/null
+++ b/modules/export_seda/resources/xsd/seda-2.0-main.xsd
@@ -0,0 +1,816 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="fr:gouv:culture:archivesdefrance:seda:v2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="fr:gouv:culture:archivesdefrance:seda:v2.0"
+    elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
+
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
+    <xsd:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
+
+    <!--
+                *****************************
+                ***   Types de base
+                *****************************
+        -->
+    <xsd:include schemaLocation="seda-2.0-types.xsd"/>
+    <!--
+                *****************************
+                ***   Base technique
+                *****************************
+        -->
+    <xsd:include schemaLocation="seda-2.0-technical.xsd"/>
+    <!--
+                *****************************
+                ***   Base de gestion
+                *****************************
+        -->
+    <xsd:include schemaLocation="seda-2.0-management.xsd"/>
+    <!--
+                *****************************
+                ***   Base descriptive
+                *****************************
+        -->
+    <xsd:include schemaLocation="seda-2.0-descriptive.xsd"/>
+
+    <!--
+                *****************************
+                ***   Code List
+                *****************************
+ 
+        -->
+    <!-- Liste des versions des référentiels issue de MEDONA -->
+    <xsd:group name="TransportCodeListsGroup">
+        <xsd:annotation>
+            <xsd:documentation>Liste des codes de réponses souhaitée par l'expéditeur.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:group ref="ReplyCodeListGroup"/>
+        </xsd:sequence>
+    </xsd:group>
+    <!-- Reply Code list -->
+    <xsd:group name="ReplyCodeListGroup">
+        <xsd:sequence>
+            <xsd:element name="ReplyCodeListVersion" type="CodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Liste des codes de réponses à utiliser.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:simpleType name="ReplyCodeType">
+        <xsd:annotation>
+            <xsd:documentation>Code de réponses spécifié dans la liste de réponses.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="NonEmptyTokenType"/>
+    </xsd:simpleType>
+
+
+    <!-- Liste des versions des référentiels utilisés globalement -->
+    <xsd:complexType name="CodeListVersionsType">
+        <xsd:sequence>
+            <xsd:group ref="TransportCodeListsGroup"/>
+            <xsd:group ref="TechnicalCodeListsGroup"/>
+            <xsd:group ref="ManagementCodeListsGroup"/>
+            <xsd:element name="AuthorizationReasonCodeListVersion" type="CodeType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Version de la liste de codes d'autorisation.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="RelationshipCodeListVersion" type="CodeType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Version de la liste de codes des relations.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element ref="OtherCodeListAbstract" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Permet d'ajouter de nouvelles listes de codes si l'ajout d'autres métadonnées l'impose.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+        <xsd:attribute ref="xml:id" use="optional"/>
+    </xsd:complexType>
+
+    <!--
+                *****************************
+                ***   Types métier
+                *****************************
+ 
+        -->
+
+    <!-- Paquet d'Objets-données -->
+    <xsd:complexType name="DataObjectPackageType">
+        <xsd:sequence>
+            <xsd:choice minOccurs="0" maxOccurs="unbounded">
+                <xsd:element name="BinaryDataObject" type="BinaryDataObjectType">
+                    <xsd:annotation>
+                        <xsd:documentation>Bloc de métadonnées techniques des objets-données numériques. Le caractère facultatif est requis afin de permettre le transfert d'un plan de classement sans DataObject joint.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+                <xsd:element name="PhysicalDataObject" type="PhysicalDataObjectType">
+                    <xsd:annotation>
+                        <xsd:documentation>Bloc de métadonnées techniques des objets-données physiques.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:choice>
+            <xsd:element name="DescriptiveMetadata" type="DescriptiveMetadataType">
+                <xsd:annotation>
+                    <xsd:documentation>Bloc de métadonnées descriptives des objets-données.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="ManagementMetadata" type="ManagementMetadataType">
+                <xsd:annotation>
+                    <xsd:documentation>Bloc des métadonnées de gestion par défaut des objets-données.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+        <xsd:attribute ref="xml:id" use="optional"/>
+    </xsd:complexType>
+
+    <!-- Métadonnées de gestion -->
+    <xsd:complexType name="ManagementMetadataType">
+        <xsd:sequence>
+            <xsd:element name="ArchivalProfile" type="IdentifierType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Profil d’archivage applicable aux ArchiveUnit.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="ServiceLevel" type="IdentifierType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Niveau de service applicable aux unités d’archives.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:group ref="ManagementGroup" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Métadonnées de gestion associées à l'ensemble des unités d'archives.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:group>
+        </xsd:sequence>
+        <xsd:attribute ref="xml:id" use="optional"/>
+    </xsd:complexType>
+
+    <!-- Demande d'autorisation -->
+    <xsd:complexType name="AuthorizationRequestContentType">
+        <xsd:sequence>
+            <xsd:element name="AuthorizationReason" type="xsd:token">
+                <xsd:annotation>
+                    <xsd:documentation>Motif de l'autorisation.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Comment" type="TextType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Commentaire sur la transaction.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="RequestDate" type="xsd:date">
+                <xsd:annotation>
+                    <xsd:documentation>Date de la demande d'autorisation.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="UnitIdentifier" type="IdentifierType" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant de l'unité documentaire.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Requester" type="OrganizationType">
+                <xsd:annotation>
+                    <xsd:documentation>Demandeur de l'autorisation.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="AuthorizationRequestReply"
+                type="BusinessAuthorizationRequestReplyMessageType" minOccurs="0"
+                maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Réponse à la demande d’autorisation.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+        <xsd:attribute ref="xml:id" use="optional"/>
+    </xsd:complexType>
+
+    <!--
+                ***************************** 
+                ***   Base de l'arborescence
+                *****************************
+        -->
+
+    <!-- Métadonnées descriptives pour un paquet d'Objets-données -->
+    <xsd:complexType name="DescriptiveMetadataType">
+        <xsd:sequence>
+            <xsd:element name="ArchiveUnit" type="ArchiveUnitType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Correspond à la notion de composant en ISAD(G). ArchiveUnit permet à la fois de gérer la hiérarchie intellectuelle, 
+                        tout en contenant les métadonnées de description et de gestion propres à chaque niveau de description archivistique.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <!--
+                *****************************
+                ***   Déclaration des types de message
+                *****************************
+        -->
+
+    <!-- Message -->
+    <xsd:complexType name="MessageType" abstract="true">
+        <xsd:sequence>
+            <xsd:element name="Comment" type="TextType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Commentaire sur le message.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Date" type="xsd:dateTime">
+                <xsd:annotation>
+                    <xsd:documentation>Date du message.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="MessageIdentifier" type="IdentifierType">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant du message.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Signature" type="SignatureType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Signature du message.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+        <xsd:attribute ref="xml:id" use="optional"/>
+    </xsd:complexType>
+
+
+    <!-- Message métier -->
+    <xsd:complexType name="BusinessMessageType" abstract="true">
+        <xsd:complexContent>
+            <xsd:extension base="MessageType">
+                <xsd:sequence>
+                    <xsd:element name="ArchivalAgreement" type="IdentifierType" minOccurs="0">
+                        <xsd:annotation>
+                            <xsd:documentation>Accord de service.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="CodeListVersions" type="CodeListVersionsType">
+                        <xsd:annotation>
+                            <xsd:documentation>Listes de codes de références utilisés dans le message.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="DataObjectPackage" type="DataObjectPackageType" minOccurs="0">
+                        <xsd:annotation>
+                            <xsd:documentation>Objets-données échangés dans le message.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!-- Message de demande -->
+    <xsd:complexType name="BusinessRequestMessageType" abstract="true">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessMessageType"/>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!-- Message de demande d'autorisation -->
+    <xsd:complexType name="BusinessAuthorizationRequestMessageType" abstract="true">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessRequestMessageType">
+                <xsd:sequence>
+                    <xsd:element name="AuthorizationRequestContent"
+                        type="AuthorizationRequestContentType">
+                        <xsd:annotation>
+                            <xsd:documentation>Demande d’autorisation.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!-- Message de reponse à une demande -->
+    <xsd:complexType name="BusinessReplyMessageType" abstract="true">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessMessageType">
+                <xsd:sequence>
+                    <xsd:element name="ReplyCode" type="NonEmptyTokenType" minOccurs="0">
+                        <xsd:annotation>
+                            <xsd:documentation>Code de la réponse.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="MessageRequestIdentifier" type="IdentifierType">
+                        <xsd:annotation>
+                            <xsd:documentation>Identifiant de la demande.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!-- Message de demande d'autorisation -->
+    <xsd:complexType name="BusinessAuthorizationRequestReplyMessageType" abstract="true">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessReplyMessageType"/>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!-- Message de notification -->
+    <xsd:complexType name="BusinessNotificationMessageType" abstract="true">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessMessageType"/>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!-- Défintion des organisations avec Id -->
+    <xsd:complexType name="OrganizationWithIdType">
+        <xsd:complexContent>
+            <xsd:extension base="OrganizationType">
+                <xsd:attribute ref="xml:id" use="optional"/>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+
+    <!--
+                *****************************
+                ***   Le message d'accusé de réception
+                *****************************
+        -->
+    <xsd:element name="Acknowledgement" type="AcknowledgementType">
+        <xsd:annotation>
+            <xsd:documentation>Accusé de réception d'un message.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="AcknowledgementType">
+        <xsd:complexContent>
+            <xsd:extension base="MessageType">
+                <xsd:sequence>
+                    <xsd:element name="MessageReceivedIdentifier" type="IdentifierType">
+                        <xsd:annotation>
+                            <xsd:documentation>Identifiant du message reçu.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="Sender" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Expéditeur du message.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="Receiver" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Destinataire du message.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!--
+                *****************************
+                ***   Les messages de requete
+                *****************************
+        -->
+    <!-- Message de demande de communication -->
+    <xsd:element name="ArchiveDeliveryRequest" type="ArchiveDeliveryRequestType">
+        <xsd:annotation>
+            <xsd:documentation>Demande de communication d'archives.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="ArchiveDeliveryRequestType">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessRequestMessageType">
+                <xsd:sequence>
+                    <xsd:element name="Derogation" type="xsd:boolean">
+                        <xsd:annotation>
+                            <xsd:documentation>Indique si une procédure de dérogation est nécessaire avant de communiquer l’unité documentaire ArchiveUnit.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="UnitIdentifier" type="IdentifierType" maxOccurs="unbounded">
+                        <xsd:annotation>
+                            <xsd:documentation>Identifiant de l'unité documentaire.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="ArchivalAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service d'archives responsable de la communication.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="Requester" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Demandeur de la communication.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <!-- Message de demande de restitution -->
+    <xsd:element name="ArchiveRestitutionRequest" type="ArchiveRestitutionRequestType">
+        <xsd:annotation>
+            <xsd:documentation>Demande de restitution d'archives.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="ArchiveRestitutionRequestType">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessRequestMessageType">
+                <xsd:sequence>
+                    <xsd:element name="UnitIdentifier" type="IdentifierType" maxOccurs="unbounded">
+                        <xsd:annotation>
+                            <xsd:documentation>Identifiant de l'unité documentaire.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="ArchivalAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service d'archives responsable de la restitution.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="OriginatingAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service producteur demandant la restitution.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <!-- Message de transfert (attention le paquet de données est facultatif)-->
+    <xsd:element name="ArchiveTransfer" type="ArchiveTransferType">
+        <xsd:annotation>
+            <xsd:documentation>Transfert d'archives.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="ArchiveTransferType">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessRequestMessageType">
+                <xsd:sequence>
+                    <xsd:element name="RelatedTransferReference" type="IdentifierType" minOccurs="0"
+                        maxOccurs="unbounded">
+                        <xsd:annotation>
+                            <xsd:documentation>Identifiant d’un transfert associé.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="TransferRequestReplyIdentifier" type="IdentifierType"
+                        minOccurs="0">
+                        <xsd:annotation>
+                            <xsd:documentation>Identifiant de la réponse à une demande de transfert.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="ArchivalAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service d'archives responsable du transfert.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="TransferringAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service versant chargé de réaliser le transport.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <!-- Message de demande de transfert -->
+    <xsd:element name="ArchiveTransferRequest" type="ArchiveTransferRequestType">
+        <xsd:annotation>
+            <xsd:documentation>Demande de transfert d’archives.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="ArchiveTransferRequestType">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessRequestMessageType">
+                <xsd:sequence>
+                    <xsd:element name="RelatedTransferReference" type="IdentifierType" minOccurs="0"
+                        maxOccurs="unbounded">
+                        <xsd:annotation>
+                            <xsd:documentation>Référence à un transfert d'archives lié.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="TransferDate" type="xsd:dateTime" minOccurs="0">
+                        <xsd:annotation>
+                            <xsd:documentation>Date retenue pour le transfert.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="ArchivalAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service d'archives responsable du transfert.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="TransferringAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service versant responsable du transfert.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!--
+                *****************************
+                ***   Les messages de demande d'autorisation
+                *****************************
+        -->
+    <!-- Message de demande d'autorisation au service de contrôle -->
+    <xsd:element name="AuthorizationControlAuthorityRequest"
+        type="AuthorizationControlAuthorityRequestType">
+        <xsd:annotation>
+            <xsd:documentation>Demande d'autorisation au service de contrôle.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="AuthorizationControlAuthorityRequestType">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessAuthorizationRequestMessageType">
+                <xsd:sequence>
+                    <xsd:element name="ArchivalAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service d'archives responsable de la demande d'autorisation.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="ControlAuthority" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Autorité de contrôle.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <!-- Message de demande d'autorisation au service producteur -->
+    <xsd:element name="AuthorizationOriginatingAgencyRequest"
+        type="AuthorizationOriginatingAgencyRequestType">
+        <xsd:annotation>
+            <xsd:documentation>Demande d'autorisation au service producteur.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="AuthorizationOriginatingAgencyRequestType">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessAuthorizationRequestMessageType">
+                <xsd:sequence>
+                    <xsd:element name="ArchivalAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service d'archives responsable de la demande d'autorisation.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="OriginatingAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service producteur responsable de l’instruction de la demande d’autorisation.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!--
+                ***************************** 
+				                ***   Les messages de reponse à une requete
+                *****************************
+        -->
+    <!-- Message de réponse à une demande de communication -->
+    <xsd:element name="ArchiveDeliveryRequestReply" type="ArchiveDeliveryRequestReplyType">
+        <xsd:annotation>
+            <xsd:documentation>Réponse à une demande de communication d'archives.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="ArchiveDeliveryRequestReplyType">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessReplyMessageType">
+                <xsd:sequence>
+                    <xsd:element name="AuthorizationRequestReplyIdentifier" type="IdentifierType"
+                        minOccurs="0">
+                        <xsd:annotation>
+                            <xsd:documentation>Identifiant de la réponse à une demande d’autorisation.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="UnitIdentifier" type="IdentifierType" maxOccurs="unbounded">
+                        <xsd:annotation>
+                            <xsd:documentation>Identifiant de l'unité documentaire.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="ArchivalAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service d'archives responsable de la demande de communication.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="Requester" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Demandeur de la communication.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <!-- Message de réponse à une demande de restitution -->
+    <xsd:element name="ArchiveRestitutionRequestReply" type="ArchiveRestitutionRequestReplyType">
+        <xsd:annotation>
+            <xsd:documentation>Réponse à une demande de restitution d'archives.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="ArchiveRestitutionRequestReplyType">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessReplyMessageType">
+                <xsd:sequence>
+                    <xsd:element name="UnitIdentifier" type="IdentifierType" maxOccurs="unbounded">
+                        <xsd:annotation>
+                            <xsd:documentation>Identifiant de l'unité documentaire.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="ArchivalAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service d'archives responsable de la demande de restitution.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="OriginatingAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service producteur responsable de la demande de restitution.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <!-- Message de réponse à un transfert -->
+    <xsd:element name="ArchiveTransferReply" type="ArchiveTransferReplyType">
+        <xsd:annotation>
+            <xsd:documentation>Réponse à un transfert d'archives (acceptation, rejet, anomalie..).</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="ArchiveTransferReplyType">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessReplyMessageType">
+                <xsd:sequence>
+                    <xsd:element name="GrantDate" type="xsd:dateTime" minOccurs="0">
+                        <xsd:annotation>
+                            <xsd:documentation>Date de prise en charge effective du transfert.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="ArchivalAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service d'archives responsable de la réponse à un transfert.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="TransferringAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service versant responsable de la réponse à un transfert.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <!-- Message de réponse à une demande de transfert -->
+    <xsd:element name="ArchiveTransferRequestReply" type="ArchiveTransferRequestReplyType">
+        <xsd:annotation>
+            <xsd:documentation>Réponse à une demande de transfert d’archives.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="ArchiveTransferRequestReplyType">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessReplyMessageType">
+                <xsd:sequence>
+                    <xsd:element name="TransferDate" type="xsd:dateTime" minOccurs="0">
+                        <xsd:annotation>
+                            <xsd:documentation>Date de transfert.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="ArchivalAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service d'archives responsable de la réponse à une demande de transfert.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="TransferringAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service versant responsable de la réponse à une demande de transfert.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <!--
+                *****************************
+                ***   Les messages de reponse à une demande d'autorisation
+                *****************************
+        -->
+    <!-- Message de réponse à une demande d'autorisation au service de contrôle -->
+    <xsd:element name="AuthorizationControlAuthorityRequestReply"
+        type="AuthorizationControlAuthorityRequestReplyType">
+        <xsd:annotation>
+            <xsd:documentation>Réponse donnée à une demande d'autorisation au service de contrôle.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="AuthorizationControlAuthorityRequestReplyType">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessAuthorizationRequestReplyMessageType">
+                <xsd:sequence>
+                    <xsd:element name="ArchivalAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service d'archives responsable de la réponse à une demande d'autorisation à un service de contrôle.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="ControlAuthority" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service de contrôle responsable de la réponse à une demande d'autorisation à un service de contrôle.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <!-- Message de réponse à une demande d'autorisation au service producteur -->
+    <xsd:element name="AuthorizationOriginatingAgencyRequestReply"
+        type="AuthorizationOriginatingAgencyRequestReplyType">
+        <xsd:annotation>
+            <xsd:documentation>Réponse donnée à une demande d'autorisation au service producteur.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="AuthorizationOriginatingAgencyRequestReplyType">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessAuthorizationRequestReplyMessageType">
+                <xsd:sequence>
+                    <xsd:element name="ArchivalAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service d’archives à l’origine de la demande d’autorisation.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="OriginatingAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service producteur responsable de l’instruction de la demande d’autorisation.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!--
+                *****************************
+                ***   Les messages de notification
+                *****************************
+        -->
+    <!-- Message de notification d'élimination -->
+    <xsd:element name="ArchiveDestructionNotification" type="ArchiveDestructionNotificationType">
+        <xsd:annotation>
+            <xsd:documentation>Notification d'élimination d'archives.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="ArchiveDestructionNotificationType">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessNotificationMessageType">
+                <xsd:sequence>
+                    <xsd:element name="AuthorizationRequestReplyIdentifier" type="IdentifierType">
+                        <xsd:annotation>
+                            <xsd:documentation>Identifiant de la réponse à une demande d'autorisation d'élimination.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="UnitIdentifier" type="IdentifierType" maxOccurs="unbounded">
+                        <xsd:annotation>
+                            <xsd:documentation>Identifiant de l'unité documentaire.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="ArchivalAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service d'archives responsable de la notification d'élimination.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="OriginatingAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service producteur responsable de la notification d'élimination.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!-- Message de notification de modification -->
+    <xsd:element name="ArchiveModificationNotification" type="ArchiveModificationNotificationType">
+        <xsd:annotation>
+            <xsd:documentation>Notification de modification d'archives (format ou métadonnées).</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    <xsd:complexType name="ArchiveModificationNotificationType">
+        <xsd:complexContent>
+            <xsd:extension base="BusinessNotificationMessageType">
+                <xsd:sequence>
+                    <xsd:element name="UnitIdentifier" type="IdentifierType" maxOccurs="unbounded">
+                        <xsd:annotation>
+                            <xsd:documentation>Identifiant de l'unité documentaire.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="ArchivalAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service d'archives responsable de la notification de modification.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="OriginatingAgency" type="OrganizationWithIdType">
+                        <xsd:annotation>
+                            <xsd:documentation>Service producteur responsable de la notification de modification.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+</xsd:schema>
diff --git a/modules/export_seda/resources/xsd/seda-2.0-management.xsd b/modules/export_seda/resources/xsd/seda-2.0-management.xsd
new file mode 100644
index 0000000000000000000000000000000000000000..2c1a6f4552389fdb7c983ca09e48c678f56a41af
--- /dev/null
+++ b/modules/export_seda/resources/xsd/seda-2.0-management.xsd
@@ -0,0 +1,446 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
+    targetNamespace="fr:gouv:culture:archivesdefrance:seda:v2.0"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:xlink="http://www.w3.org/1999/xlink"
+    xmlns="fr:gouv:culture:archivesdefrance:seda:v2.0"
+    elementFormDefault="qualified"
+    attributeFormDefault="unqualified"
+    version="1.0">
+    <xsd:include schemaLocation="seda-2.0-types.xsd"/>
+    
+    <!--
+                *****************************
+                ***   Code List
+                *****************************
+ 
+        -->
+    <xsd:group name="ManagementCodeListsGroup">
+        <xsd:annotation>
+            <xsd:documentation>Listes de codes nécessaires dans les métadonnées de gestion.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:group ref="StorageRuleCodeListGroup" minOccurs="0"/>
+            <xsd:group ref="AppraisalRuleCodeListGroup" minOccurs="0"/>
+            <xsd:group ref="AccessRuleCodeListGroup" minOccurs="0"/>
+            <xsd:group ref="DisseminationRuleCodeListGroup" minOccurs="0"/>
+            <xsd:group ref="ReuseRuleCodeListGroup" minOccurs="0"/>
+            <xsd:group ref="ClassificationRuleCodeListGroup" minOccurs="0"/>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- Management Lists and Codes -->
+    <xsd:complexType name="RuleIdType">
+        <xsd:annotation>
+            <xsd:documentation>Identifiant de la règle de gestion.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:simpleContent>
+            <xsd:extension base="NonEmptyTokenType">
+                <xsd:attribute name="id" type="xsd:ID" use="optional"/>
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+    
+    <xsd:group name="AccessRuleCodeListGroup">
+        <xsd:sequence>
+            <xsd:element name="AccessRuleCodeListVersion" type="CodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Version des listes de codes pour les règles de communicabilité.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    
+    <xsd:group name="DisseminationRuleCodeListGroup">
+        <xsd:sequence>
+            <xsd:element name="DisseminationRuleCodeListVersion" type="CodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Version des listes de codes pour les règles de diffusion.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    
+    <xsd:group name="ReuseRuleCodeListGroup">
+        <xsd:sequence>
+            <xsd:element name="ReuseRuleCodeListVersion" type="CodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Version des listes de codes pour les règles de réutilisation.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    
+    <xsd:group name="ClassificationRuleCodeListGroup">
+        <xsd:sequence>
+            <xsd:element name="ClassificationRuleCodeListVersion" type="CodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Version des listes de codes pour les règles de classification.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    
+    <xsd:group name="AppraisalRuleCodeListGroup">
+        <xsd:sequence>
+            <xsd:element name="AppraisalRuleCodeListVersion" type="CodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Version des listes de codes pour les règles de durée d'utilité administrative.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    
+    <xsd:group name="StorageRuleCodeListGroup">
+        <xsd:sequence>
+            <xsd:element name="StorageRuleCodeListVersion" type="CodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Version des listes de codes pour les règles de durée d'utilité courante.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    
+    <!-- Management content -->
+    <xsd:group name="ManagementGroup">
+        <xsd:annotation>
+            <xsd:documentation>Contient les métadonnées de gestion.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:element name="StorageRule" type="StorageRuleType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Gestion de la durée d’utilité courante.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="AppraisalRule" type="AppraisalRuleType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Gestion de la durée d’utilité administrative.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="AccessRule" type="AccessRuleType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Gestion de la communicabilité.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="DisseminationRule" type="DisseminationRuleType"
+                minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Gestion de la diffusion.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="ReuseRule" type="ReuseRuleType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Gestion de la réutilisation.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="ClassificationRule" type="ClassificationRuleType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Gestion de la classification.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="NeedAuthorization" type="xsd:boolean" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Indique si une autorisation humaine est nécessaire pour vérifier ou valider les opérations de gestion des ArchiveUnit.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element ref="OtherManagementAbstract" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Autres métadonnées de gestion.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    
+    <!-- Example of codification of one Rule Code oustide SEDA in an external referential -->
+    <xsd:complexType name="DurationRuleType">
+        <xsd:annotation>
+            <xsd:documentation>Permet d'exprimer pour une règle de gestion quelles informations doivent en découler.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:element name="RuleId" type="RuleIdType">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant de la règle</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Value" type="MeasurementDurationType"/>
+            <xsd:element name="Description" type="xsd:string"/>
+        </xsd:sequence>
+    </xsd:complexType>
+    <xsd:simpleType name="MeasurementDurationUnitsType">
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="day"/>
+            <xsd:enumeration value="DAY"/>
+            <xsd:enumeration value="month"/>
+            <xsd:enumeration value="MON"/>
+            <xsd:enumeration value="year"/>
+            <xsd:enumeration value="ANN"/>
+        </xsd:restriction>
+    </xsd:simpleType>
+    <xsd:complexType name="MeasurementDurationType">
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:nonNegativeInteger">
+                <xsd:attribute name="unit" type="MeasurementDurationUnitsType" use="required"/>
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+        
+    <!-- Global inheritance control -->
+    <xsd:group name="PreventInheritanceGroup">
+        <xsd:choice>
+            <xsd:element name="PreventInheritance" type="xsd:boolean" default="false" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Indique si les règles de gestion héritées des ArchiveUnit parents doivent être ignorées pour l’ArchiveUnit concerné.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:choice>
+    </xsd:group>
+    
+    <xsd:complexType name="AccessRuleType">
+        <xsd:annotation>
+            <xsd:documentation>Gestion de la communicabilité.</xsd:documentation>
+            <xsd:documentation>Chaque règle a une startDate et un Identifiant de règle de référence pour la durée.
+                Si aucune règle n'est spécifiée et que la date actuelle est dans la StarDate, la réponse de restriction est "Aucune restriction".
+                Si la date est vide, la réponse de restriction est "Restreint" car il n'y a aucun moyen de calculer la date de fin.
+                Si une règle et une date sont précisées, alors la date de fin d'application de la règle peut être calculée et comparée avec la date courante..</xsd:documentation>
+            <xsd:documentation>La liste d'identifiants de règles à appliquer et à ignorer qui doit être appliquée à partir de cet ArchiveUnit.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+                <xsd:element name="Rule" type="RuleIdType">
+                    <xsd:annotation>
+                        <xsd:documentation>Référence à la règle de communicabilité.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+                <xsd:element name="StartDate" type="xsd:date" nillable="true" minOccurs="0">
+                    <xsd:annotation>
+                        <xsd:documentation>Date de départ de calcul de la règle de communicabilité.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:sequence>
+            <xsd:choice minOccurs="0">
+                <xsd:group ref="PreventInheritanceGroup"/>
+                <xsd:element name="RefNonRuleId" type="RuleIdType" maxOccurs="unbounded">
+                    <xsd:annotation>
+                        <xsd:documentation>Identifiant de la règle à désactiver à partir de cette ArchiveUnit.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:choice>
+        </xsd:sequence>
+    </xsd:complexType>
+    
+    <xsd:complexType name="DisseminationRuleType">
+        <xsd:annotation>
+            <xsd:documentation>Gestion de la diffusion.</xsd:documentation>
+            <xsd:documentation>Chaque règle a une startDate et un Identifiant de règle de référence pour la durée.
+                Si aucune règle n'est spécifiée et que la date actuelle est dans la StarDate, la réponse de restriction est "Aucune restriction".
+                Si la date est vide, la réponse de restriction est "Restreint" car il n'y a aucun moyen de calculer la date de fin.
+                Si une règle et une date sont précisées, alors la règle est valable (restriction appliquée).</xsd:documentation>
+            <xsd:documentation>La liste d'identifiants de règles à appliquer et à ignorer qui doit être appliquée à partir de cet ArchiveUnit.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+                <xsd:element name="Rule" type="RuleIdType">
+                    <xsd:annotation>
+                        <xsd:documentation>Référence à la règle de diffusion.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+                <xsd:element name="StartDate" type="xsd:date" nillable="true" minOccurs="0">
+                    <xsd:annotation>
+                        <xsd:documentation>Date de départ de calcul de la règle de diffusion.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:sequence>
+            <xsd:choice minOccurs="0">
+                <xsd:group ref="PreventInheritanceGroup"/>
+                <xsd:element name="RefNonRuleId" type="RuleIdType" maxOccurs="unbounded">
+                    <xsd:annotation>
+                        <xsd:documentation>L'identifiant de la règle spécifiée pourra être retirée de l'héritage dans ce noeud.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:choice>
+        </xsd:sequence>
+    </xsd:complexType>
+    
+    <xsd:complexType name="ReuseRuleType">
+        <xsd:annotation>
+            <xsd:documentation>Gestion de la réutilisation.</xsd:documentation>
+            <xsd:documentation>Chaque règle a une startDate et un Identifiant de règle de référence pour la durée.
+                Si aucune règle n'est spécifiée et que la date actuelle est dans la StarDate, la réponse de restriction est "Aucune restriction".
+                Si la date est vide, la réponse de restriction est "Restreint" car il n'y a aucun moyen de calculer la date de fin.
+                Si une règle et une date sont précisées, alors la règle est valable (restriction appliquée).</xsd:documentation>
+            <xsd:documentation>La liste d'identifiants de règles à appliquer et à ignorer qui doit être appliquée à partir de cet ArchiveUnit.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+                <xsd:element name="Rule" type="RuleIdType">
+                    <xsd:annotation>
+                        <xsd:documentation>Référence à la règle de réutilisation.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+                <xsd:element name="StartDate" type="xsd:date" nillable="true" minOccurs="0">
+                    <xsd:annotation>
+                        <xsd:documentation>Date de départ de calcul de la règle de réutilisation.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:sequence>
+            <xsd:choice minOccurs="0">
+                <xsd:group ref="PreventInheritanceGroup"/>
+                <xsd:element name="RefNonRuleId" type="RuleIdType" maxOccurs="unbounded">
+                    <xsd:annotation>
+                        <xsd:documentation>L'identifiant de la règle spécifiée pourra être retirée de l'héritage dans ce noeud.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:choice>
+        </xsd:sequence>
+    </xsd:complexType>
+    
+    <xsd:complexType name="ClassificationRuleType">
+        <xsd:annotation>
+            <xsd:documentation>Gestion de la classification.</xsd:documentation>
+            <xsd:documentation>Chaque règle a une startDate et un Identifiant de règle de référence pour la durée.
+                Si aucune règle n'est spécifiée et que la date actuelle est dans la StarDate, la réponse de restriction est "Aucune restriction".
+                Si la date est vide, la réponse de restriction est "Restreint" car il n'y a aucun moyen de calculer la date de fin.
+                Si une règle et une date sont précisées, alors la règle est valable (restriction appliquée).</xsd:documentation>
+            <xsd:documentation>La liste d'identifiants de règles à appliquer et à ignorer qui doit être appliquée à partir de cet ArchiveUnit.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+                <xsd:element name="Rule" type="RuleIdType">
+                    <xsd:annotation>
+                        <xsd:documentation>Référence à la règle de classification.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+                <xsd:element name="StartDate" type="xsd:date" nillable="true" minOccurs="0">
+                    <xsd:annotation>
+                        <xsd:documentation>Date de départ de calcul de la règle de classification.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:sequence>
+            <xsd:choice minOccurs="0">
+                <xsd:group ref="PreventInheritanceGroup"/>
+                <xsd:element name="RefNonRuleId" type="RuleIdType" maxOccurs="unbounded">
+                    <xsd:annotation>
+                        <xsd:documentation>L'identifiant de la règle spécifiée pourra être retirée de l'héritage dans ce noeud.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:choice>
+            <xsd:element name="ClassificationLevel" type="NonEmptyTokenType">
+                <xsd:annotation>
+                    <xsd:documentation>Référence au niveau de classification.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="ClassificationOwner" type="NonEmptyTokenType">
+                <xsd:annotation>
+                    <xsd:documentation>Propriétaire de la classification. Service émetteur au sens de l’IGI 1300.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="ClassificationReassessingDate" type="xsd:date" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Date de réévaluation de la classification.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="NeedReassessingAuthorization" type="xsd:boolean" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Indique si une autorisation humaine est nécessaire pour réévaluer la classification.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:complexType>
+    
+    <xsd:simpleType name="FinalActionStorageCodeType">
+        <xsd:annotation>
+            <xsd:documentation>Code correspondant à l’action à entreprendre au terme de la durée d’utilité courante.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="NonEmptyTokenType">
+            <xsd:enumeration value="RestrictAccess"/>
+            <xsd:enumeration value="Transfer"/>
+            <xsd:enumeration value="Copy"/>
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:complexType name="StorageRuleType">
+        <xsd:annotation>
+            <xsd:documentation>Gestion de la durée d'utilité courante.</xsd:documentation>
+            <xsd:documentation>Chaque règle a une startDate et un Identifiant de règle de référence pour la durée.
+                Si aucune règle n'est spécifiée et que la date actuelle est dans la StarDate, la réponse de restriction est "Aucune restriction".
+                Si la date est vide, la réponse de restriction est "Restreint" car il n'y a aucun moyen de calculer la date de fin.
+                Si une règle et une date sont précisées, alors la règle est valable (restriction appliquée).</xsd:documentation>
+            <xsd:documentation>La liste d'identifiants de règles à appliquer et à ignorer qui doit être appliquée à partir de cet ArchiveUnit.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+                <xsd:element name="Rule" type="RuleIdType">
+                    <xsd:annotation>
+                        <xsd:documentation>Référence à la règle de durée d'utilité courante.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+                <xsd:element name="StartDate" type="xsd:date" nillable="true" minOccurs="0">
+                    <xsd:annotation>
+                        <xsd:documentation>Date de départ de calcul de la règle d'utilité courante.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:sequence>
+            <xsd:choice minOccurs="0">
+                <xsd:group ref="PreventInheritanceGroup"/>
+                <xsd:element name="RefNonRuleId" type="RuleIdType" maxOccurs="unbounded">
+                    <xsd:annotation>
+                        <xsd:documentation>L'identifiant de la règle spécifiée pourra être retirée de l'héritage dans ce noeud.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:choice>
+            <xsd:element name="FinalAction" type="FinalActionStorageCodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Action à mettre en œuvre au terme de la durée de gestion.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:complexType>
+    
+    <xsd:simpleType name="FinalActionAppraisalCodeType">
+        <xsd:annotation>
+            <xsd:documentation>Code correspondant à l’action à entreprendre au terme de la durée d’utilité administrative.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="NonEmptyTokenType">
+            <xsd:enumeration value="Keep"/>
+            <xsd:enumeration value="Destroy"/>
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:complexType name="AppraisalRuleType">
+        <xsd:annotation>
+            <xsd:documentation>Gestion de la durée d'utilité administrative.</xsd:documentation>
+            <xsd:documentation>Chaque règle a une startDate et un Identifiant de règle de référence pour la durée.
+                Si aucune règle n'est spécifiée et que la date actuelle est dans la StarDate, la réponse de restriction est "Aucune restriction".
+                Si la date est vide, la réponse de restriction est "Restreint" car il n'y a aucun moyen de calculer la date de fin.
+                Si une règle et une date sont précisées, alors la règle est valable (restriction appliquée).</xsd:documentation>
+            <xsd:documentation>La liste d'identifiants de règles à appliquer et à ignorer qui doit être appliquée à partir de cet ArchiveUnit.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+                <xsd:element name="Rule" type="RuleIdType">
+                    <xsd:annotation>
+                        <xsd:documentation>Référence à la règle de durée d'utilité administrative.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+                <xsd:element name="StartDate" type="xsd:date" nillable="true" minOccurs="0">
+                    <xsd:annotation>
+                        <xsd:documentation>Date de départ de calcul de durée d'utilité administrative.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:sequence>
+            <xsd:choice minOccurs="0">
+                <xsd:group ref="PreventInheritanceGroup"/>
+                <xsd:element name="RefNonRuleId" type="RuleIdType" maxOccurs="unbounded">
+                    <xsd:annotation>
+                        <xsd:documentation>L'identifiant de la règle spécifiée pourra être retirée de l'héritage dans ce noeud.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:choice>
+            <xsd:element name="FinalAction" type="FinalActionAppraisalCodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Action à mettre en œuvre au terme de la durée de gestion.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:complexType>
+</xsd:schema>
diff --git a/modules/export_seda/resources/xsd/seda-2.0-ontology.xsd b/modules/export_seda/resources/xsd/seda-2.0-ontology.xsd
new file mode 100644
index 0000000000000000000000000000000000000000..5b64db279840671e82d78829f47a0ff56441ad4d
--- /dev/null
+++ b/modules/export_seda/resources/xsd/seda-2.0-ontology.xsd
@@ -0,0 +1,950 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="fr:gouv:culture:archivesdefrance:seda:v2.0"
+    xmlns:pr="info:lc/xmlns/premis-v2" xmlns="fr:gouv:culture:archivesdefrance:seda:v2.0" elementFormDefault="qualified"
+    attributeFormDefault="unqualified" version="1.0">
+    <xsd:include schemaLocation="seda-2.0-types.xsd"/>
+
+    <xsd:group name="ObjectGroup">
+        <xsd:annotation>
+            <xsd:documentation>Contient les éléments nécessaires à
+                la description de l'ArchiveUnit et est sensé être la racine du bloc des métadonnées de
+                description.</xsd:documentation>
+            <xsd:documentation>Chaque sous-type ou sous-groupe peut aussi être utilisé pour
+                construire de nouveaux types ou groupes.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:group ref="BaseObjectGroup"/>
+            <xsd:element ref="ObjectGroupExtenstionAbstract" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+    </xsd:group>
+
+    <xsd:group name="BaseObjectGroup">
+        <xsd:sequence>
+            <xsd:group ref="LevelGroup" minOccurs="1"/>
+            <xsd:group ref="TitleGroup" minOccurs="1"/>
+            <xsd:group ref="IdentifierGroup"/>
+            <xsd:group ref="DescriptionGroup"/>
+            <xsd:group ref="CustodialHistoryGroup"/>
+            <xsd:group ref="TypeGroup"/>
+            <xsd:group ref="DocumentTypeGroup"/>
+            <xsd:group ref="LanguageGroup"/>
+            <xsd:group ref="StatusGroup"/>
+            <xsd:group ref="VersionGroup"/>
+            <xsd:group ref="KeywordsGroup"/>
+            <xsd:group ref="CoverageGroup"/>
+            <xsd:group ref="OriginatingAgencyGroup"/>
+            <xsd:group ref="SubmissionAgencyGroup"/>
+            <xsd:group ref="AuthorizedAgentGroup"/>
+            <xsd:group ref="WritingGroup"/>
+            <xsd:group ref="AudienceGroup"/>
+            <xsd:group ref="SourceGroup"/>
+            <xsd:group ref="RelationGroup"/>
+            <xsd:group ref="DateGroup"/>
+            <xsd:group ref="EventGroup"/>
+            <xsd:group ref="SignatureGroup"/>
+            <xsd:group ref="GpsGroup"/>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- Level description -->
+    <xsd:group name="LevelGroup">
+        <xsd:sequence>
+            <xsd:element name="DescriptionLevel" type="LevelType" minOccurs="1">
+                <xsd:annotation>
+                    <xsd:documentation>Niveau de description au sens de la norme ISAD (G). Indique si l’ArchiveUnit correspond à un fonds, 
+                        à un sous-fonds, à une classe, à une série organique, à une sous-série organique, à un dossier, à un sous-dossier ou à une pièce.</xsd:documentation>
+                    <xsd:documentation>Référence : seda.DescriptionLevel</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:simpleType name="LevelType">
+        <xsd:annotation>
+            <xsd:documentation>Valeurs de DescriptionLevel.</xsd:documentation>
+            <xsd:documentation>Références : descriptionlevel_code SEDA 1.0</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="xsd:token">
+            <xsd:enumeration value="Fonds"/>
+            <xsd:enumeration value="Subfonds"/>
+            <xsd:enumeration value="Class"/>
+            <xsd:enumeration value="Collection"/>
+            <xsd:enumeration value="Series"/>
+            <xsd:enumeration value="Subseries"/>
+            <xsd:enumeration value="RecordGrp"/>
+            <xsd:enumeration value="SubGrp"/>
+            <xsd:enumeration value="File"/>
+            <xsd:enumeration value="Item"/>
+        </xsd:restriction>
+    </xsd:simpleType>
+    <!-- Title description -->
+    <xsd:group name="TitleGroup">
+        <xsd:sequence>
+            <xsd:element name="Title" type="TextType" minOccurs="1" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Intitulé de l'ArchiveUnit.</xsd:documentation>
+                    <xsd:documentation>Références : DC.Title ead.unittitle</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    
+    <!-- Identification description -->
+    <xsd:group name="IdentifierGroup">
+        <xsd:sequence>
+            <xsd:element name="FilePlanPosition" type="NonEmptyTokenType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Position de l’ArchiveUnit dans le plan de classement du service producteur.</xsd:documentation>
+                    <xsd:documentation>Références : seda.FilePlanPosition</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="SystemId" type="NonEmptyTokenType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant attribué aux objets. Il est attribué par le SAE et correspond à un identifiant interne.</xsd:documentation>
+                    <xsd:documentation>Références : ARMS</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="OriginatingSystemId" type="NonEmptyTokenType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant système attribué à l’ArchiveUnit par l’application du service producteur.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="ArchivalAgencyArchiveUnitIdentifier" type="NonEmptyTokenType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant métier attribué à l'ArchiveUnit par le service d'archives. Peut être comparé à une cote.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="OriginatingAgencyArchiveUnitIdentifier" type="NonEmptyTokenType"
+                minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant métier attribué à l’ArchiveUnit par le service producteur.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="TransferringAgencyArchiveUnitIdentifier" type="NonEmptyTokenType"
+                minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant attribué à l'ArchiveUnit par le service versant.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- General description -->
+    <xsd:group name="DescriptionGroup">
+        <xsd:sequence>
+            <xsd:element name="Description" type="TextType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Description détaillée de l’ArchiveUnit. Correspond à la présentation du contenu au sens de la norme ISAD(G).</xsd:documentation>
+                    <xsd:documentation>Références : DC:Documentation</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- CustodialHistory type -->
+    <xsd:group name="CustodialHistoryGroup">
+        <xsd:sequence>
+            <xsd:element name="CustodialHistory" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Énumère les changements successifs de propriété, de responsabilité et de conservation des ArchiveUnit avant 
+                        leur entrée dans le lieu de conservation. On peut notamment y indiquer comment s'est effectué le passage de l'application 
+                        d'origine au fichier archivable. Correspond à l'historique de la conservation en ISAD(G).</xsd:documentation>
+                    <xsd:documentation>Références : seda.CustodialHistory</xsd:documentation>
+                </xsd:annotation>
+               <xsd:complexType>
+                   <xsd:sequence>
+                       <xsd:element name="CustodialHistoryItem" minOccurs="1" maxOccurs="unbounded">
+                           <xsd:annotation>
+                               <xsd:documentation>Description d'une période ou d'un événement précis dans l'historique.</xsd:documentation>
+                               <xsd:documentation>Références : seda.CustodialHistoryItem</xsd:documentation>
+                           </xsd:annotation>
+                           <xsd:complexType>
+                               <xsd:complexContent>
+                                   <xsd:extension base="TextType">
+                                       <xsd:attribute name="when" type="DateType" use="optional"/>
+                                   </xsd:extension>
+                               </xsd:complexContent>
+                           </xsd:complexType>
+                       </xsd:element>
+                       <xsd:element name="CustodialHistoryFile" type="DataObjectRefType" minOccurs="0">
+                           <xsd:annotation>
+                               <xsd:documentation>Référence à un fichier de journalisation externe.</xsd:documentation>
+                           </xsd:annotation>
+                       </xsd:element>
+                   </xsd:sequence>
+               </xsd:complexType>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- OAIS type description -->
+    <xsd:group name="TypeGroup">
+        <xsd:sequence>
+            <xsd:element name="Type" type="TextType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Type d’information au sens de l’OAIS (information de représentation, information de pérennisation, etc.).</xsd:documentation>
+                    <xsd:documentation>Références : seda.DocumentType</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- Document type description -->
+    <xsd:group name="DocumentTypeGroup">
+        <xsd:sequence>
+            <xsd:element name="DocumentType" type="TextType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Type de document au sens diplomatique du terme (ex. compte-rendu de réunion, note, correspondance, etc.). Ne pas confondre avec Type.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- Language description -->
+    <xsd:group name="LanguageGroup">
+        <xsd:sequence>
+            <xsd:element name="Language" type="xsd:language" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Langue du contenu des objets-données.</xsd:documentation>
+                    <xsd:documentation>Références : seda.Language</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="DescriptionLanguage" type="xsd:language" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Langue utilisée pour les informations de représentation et de pérennisation.</xsd:documentation>
+                    <xsd:documentation>Références : seda.DescriptionLanguage</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- Status description -->
+    <xsd:group name="StatusGroup">
+        <xsd:sequence>
+            <xsd:element name="Status" type="NonEmptyTokenType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Etat de l'objet-données (par rapport avec son cycle de vie). Permet par exemple d'indiquer si la signature du fichier a été vérifiée avant le transfert aux archives.</xsd:documentation>
+                    <xsd:documentation>Références : seda.Status</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- Version description -->
+    <xsd:group name="VersionGroup">
+        <xsd:sequence>
+            <xsd:element name="Version" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Permet d'indiquer quelle est la version du document.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- Keywords description -->
+    <xsd:group name="KeywordsGroup">
+        <xsd:sequence>
+            <xsd:element name="Tag" type="NonEmptyTokenType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Mots-clés ou liste de mots-clés génériques. En ce qui concerne l'indexation, on pourra utiliser Tag ou Keyword en fonction de ce que l'on souhaite décrire.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Keyword" type="KeywordsType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Mots-clef avec contexte inspiré du SEDA 1.0. En ce qui concerne l'indexation, on pourra utiliser Tag ou Keyword en fonction de ce que l'on souhaite décrire.</xsd:documentation>
+                    <xsd:documentation>Références : seda.Keyword</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <!-- Repris du SEDA 1.0 -->
+    <xsd:complexType name="KeywordsType">
+        <xsd:annotation>
+            <xsd:documentation>Mots-clés.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:element name="KeywordContent" type="TextType">
+                <xsd:annotation>
+                    <xsd:documentation>Valeur du mot-clé. A utiliser avec Keyword.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="KeywordReference" type="IdentifierType" minOccurs="0" maxOccurs="1">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant du mot clé dans un référentiel donné. Par exemple, pour un lieu, il pourrait s'agir de son code officiel géographique selon l'INSEE.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="KeywordType" minOccurs="0" maxOccurs="1">
+                <xsd:annotation>
+                    <xsd:documentation>Type de mot clé.</xsd:documentation>
+                </xsd:annotation>
+                <xsd:complexType>
+                    <xsd:simpleContent>
+                        <xsd:extension base="CodeKeywordType">
+                            <xsd:attribute name="listVersionID" type="xsd:token" use="optional"
+                                default="edition 2009">
+                            </xsd:attribute>
+                        </xsd:extension>
+                    </xsd:simpleContent>
+                </xsd:complexType>
+            </xsd:element>
+        </xsd:sequence>
+        <xsd:attribute name="id" type="xsd:ID" use="optional"/>
+    </xsd:complexType>
+    <!-- =============================================================== -->
+    <!-- ===== Code List KeywordType: KeywordType Code           ======= -->
+    <!-- =============================================================== -->
+    <xsd:simpleType name="CodeKeywordType">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="fr">Table des types de mots-clés.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="xsd:token">
+            <xsd:enumeration value="corpname">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="fr">Collectivité.</xsd:documentation>
+                    <xsd:documentation>Références : ead.corpname</xsd:documentation>
+                </xsd:annotation>
+            </xsd:enumeration>
+            <xsd:enumeration value="famname">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="fr">Nom de famille.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:enumeration>
+            <xsd:enumeration value="geogname">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="fr">Nom géographique.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:enumeration>
+            <xsd:enumeration value="name">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="fr">Nom.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:enumeration>
+            <xsd:enumeration value="occupation">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="fr">Fonction.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:enumeration>
+            <xsd:enumeration value="persname">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="fr">Nom de personne.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:enumeration>
+            <xsd:enumeration value="subject">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="fr">Mot-matière.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:enumeration>
+            <xsd:enumeration value="genreform">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="fr">Type de document.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:enumeration>
+            <xsd:enumeration value="function">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="fr">Activité.</xsd:documentation>
+                    <xsd:documentation xml:lang="fr">Références : ead.function</xsd:documentation>
+                </xsd:annotation>
+            </xsd:enumeration>
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <!-- Coverage description -->
+    <xsd:group name="CoverageGroup">
+        <xsd:sequence>
+            <xsd:element name="Coverage" type="CoverageType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Couverture spatiale, temporelle ou juridictionnelle de l’ArchiveUnit</xsd:documentation>
+                    <xsd:documentation>Références : DC.Coverage</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:complexType name="CoverageType">
+        <xsd:sequence>
+            <xsd:element name="Spatial" type="TextType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Couverture spatiale ou couverture géographique.</xsd:documentation>
+                    <xsd:documentation>Références: AGKRMS.spatialCoverage</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Temporal" type="TextType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Couverture temporelle.</xsd:documentation>
+                    <xsd:documentation>Références: AGKRMS.temporalCoverage</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Juridictional" type="TextType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Juridiction administrative ou ressort administratif.</xsd:documentation>
+                    <xsd:documentation>Références: AGKRMS.juridictionalCoverage</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:complexType>
+    
+    <!-- OriginatingAgency description -->
+    <xsd:group name="OriginatingAgencyGroup">
+        <xsd:sequence>
+            <xsd:element name="OriginatingAgency" type="OrganizationType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Service producteur. "Personne physique ou morale, publique ou privée, qui a produit, reçu et conservé des archives  dans l'exercice de son activité", Dictionnaire de terminologie archivistique, direction des archives de France, 2002.</xsd:documentation>
+                    <xsd:documentation>Références : seda.OriginatingAgency</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- SubmissionAgency description -->
+    <xsd:group name="SubmissionAgencyGroup">
+        <xsd:sequence>
+            <xsd:element name="SubmissionAgency" type="OrganizationType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Service versant responsable du transfert des données.</xsd:documentation>
+                    <xsd:documentation>Références : seda.SubmissionAgency</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    
+    <!-- Proxy description -->
+    <xsd:group name="AuthorizedAgentGroup">
+        <xsd:sequence>
+            <xsd:element name="AuthorizedAgent" type="AgentType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Titulaire des droits de propriété intellectuelle.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- Writing description -->
+    <xsd:group name="WritingGroup">
+        <xsd:sequence>
+            <xsd:annotation>
+                <xsd:documentation>Rédacteur de l'objet d'archive.</xsd:documentation>
+            </xsd:annotation>
+            <xsd:element name="Writer" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Rédacteur Rédacteur de l’ArchiveUnit.</xsd:documentation>
+                    <xsd:documentation>Références : interpares.Writer</xsd:documentation>
+                </xsd:annotation>
+                <xsd:complexType>
+                    <xsd:group ref="WriterGroup"/>
+                </xsd:complexType>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:group name="WriterGroup">
+        <xsd:sequence>
+            <xsd:group ref="PersonGroup"/>
+            <xsd:group ref="BusinessGroup"/>
+        </xsd:sequence>
+    </xsd:group>
+    
+
+    <!-- Audience description -->
+    <xsd:group name="AudienceGroup">
+        <xsd:sequence>
+            <xsd:annotation>
+                <xsd:documentation>Audience du document. Permet de gérer les questions de "diffusion restreinte", de "spécial France" et de "Confidentiel Industrie".</xsd:documentation>
+            </xsd:annotation>
+            <xsd:group ref="AddresseeGroup"/>
+            <xsd:group ref="RecipientGroup"/>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- Source description -->
+    <xsd:group name="SourceGroup">
+        <xsd:sequence>
+            <xsd:element name="Source" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>En cas de substitution numérique, permet de faire référence au papier.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- Relation description -->
+    <xsd:group name="RelationGroup">
+        <xsd:annotation>
+            <xsd:documentation>Les valeurs sont des identifiants au choix : - d'un autre objet données (DataObjectRefIdType ou GroupIdType s'ils sont dans le même transfert, ou identifiant dans le SAE sinon) - d'un autre ArchiveUnit (ArchiveUnitRefIdType s'il est dans le même transfert, ou identifiant dans le SAE sinon).</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:element name="RelatedObjectReference" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Référence à un objet faisant ou ne faisant pas partie du présent paquet d'information.</xsd:documentation>
+                </xsd:annotation>
+                <xsd:complexType>
+                    <xsd:sequence>
+                        <xsd:element name="IsVersionOf" type="DataObjectOrArchiveUnitReferenceType"
+                            minOccurs="0" maxOccurs="unbounded">
+                            <xsd:annotation>
+                                <xsd:documentation>Est une version de. Edition, adaptation, traduction. Cette relation permet d'indiquer les modifications dans le contenu.</xsd:documentation>
+                                <xsd:documentation>Références : DC.Relation.isVersionOf</xsd:documentation>
+                            </xsd:annotation>
+                        </xsd:element>
+                        <xsd:element name="Replaces" type="DataObjectOrArchiveUnitReferenceType" minOccurs="0"
+                            maxOccurs="unbounded">
+                            <xsd:annotation>
+                                <xsd:documentation>Remplace. Cette relation permet d'indiquer les objets remplacés par le niveau courant de description.</xsd:documentation>
+                                <xsd:documentation>DC.Relation.replaces</xsd:documentation>
+                            </xsd:annotation>
+                        </xsd:element>
+                        <xsd:element name="Requires" type="DataObjectOrArchiveUnitReferenceType" minOccurs="0"
+                            maxOccurs="unbounded">
+                            <xsd:annotation>
+                                <xsd:documentation>Requiert. Cette relation permet d'indiquer les objets nécessaire à la compréhension du niveau courant de description.</xsd:documentation>
+                                <xsd:documentation>Références : DC.Relation.requires</xsd:documentation>
+                            </xsd:annotation>
+                        </xsd:element>
+                        <xsd:element name="IsPartOf" type="DataObjectOrArchiveUnitReferenceType" minOccurs="0"
+                            maxOccurs="unbounded">
+                            <xsd:annotation>
+                                <xsd:documentation>Est une partie de. Cette relation permet d'indique qu'un objet est une partie d'un autre.</xsd:documentation>
+                                <xsd:documentation>Références : DC.Relation.isPartOf</xsd:documentation>
+                            </xsd:annotation>
+                        </xsd:element>
+                        <xsd:element name="References" type="DataObjectOrArchiveUnitReferenceType" minOccurs="0"
+                            maxOccurs="unbounded">
+                            <xsd:annotation>
+                                <xsd:documentation>Référence. Cette relation permet d'indiquer qu'un objet en référence un autre.</xsd:documentation>
+                                <xsd:documentation>DC.Relation.references</xsd:documentation>
+                            </xsd:annotation>
+                        </xsd:element>
+                    </xsd:sequence>
+                </xsd:complexType>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:complexType name="DataObjectOrArchiveUnitReferenceType">
+        <xsd:choice>
+            <xsd:element name="ArchiveUnitRefId" type="ArchiveUnitRefIdType">
+                <xsd:annotation>
+                    <xsd:documentation>Référence à un ArchiveUnit interne.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="DataObjectReference" type="DataObjectRefType">
+                <xsd:annotation>
+                    <xsd:documentation>Référence à un objet-données ou à un groupe d'objets-données interne(s).</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="RepositoryArchiveUnitPID" type="NonEmptyTokenType">
+                <xsd:annotation>
+                    <xsd:documentation>Référence à un ArchiveUnit déjà conservé dans un système d'archivage.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="RepositoryObjectPID" type="NonEmptyTokenType">
+                <xsd:annotation>
+                    <xsd:documentation>Référence à un un objet-données ou à un groupe d'objets-données déjà conservé(s) dans un système d'archivage.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:choice>
+    </xsd:complexType>
+    <!-- Date description -->
+    <xsd:group name="DateGroup">
+        <xsd:sequence>
+            <xsd:element name="CreatedDate" type="DateType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Date de création.</xsd:documentation>
+                    <xsd:documentation>Références : ARKMS.DateCreated</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="TransactedDate" type="DateType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Date de la transaction.</xsd:documentation>
+                    <xsd:documentation>Références : ARKMS.DateTransacted</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="AcquiredDate" type="DateType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Date de numérisation.</xsd:documentation>
+                    <xsd:documentation>Références : ARKMS.DateAcquired</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="SentDate" type="DateType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Date d'envoi.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="ReceivedDate" type="DateType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Date de réception.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="RegisteredDate" type="DateType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Date d'enregistrement.</xsd:documentation>
+                    <xsd:documentation>Références : ARMS.DateDeclared</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="StartDate" type="DateType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Date d'ouverture / date de début.</xsd:documentation>
+                    <xsd:documentation>Références : AGKRMS.StartDate</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="EndDate" type="DateType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Date de fermeture / Date de fin.</xsd:documentation>
+                    <xsd:documentation>Références : AGKRMS.EndDate</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:simpleType name="DateType">
+        <xsd:union memberTypes="xsd:date xsd:dateTime"/>
+    </xsd:simpleType>
+    <!-- Event description -->
+    <xsd:group name="EventGroup">
+        <xsd:sequence>
+            <xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Informations décrivant un événement survenu au cours d’une procédure (ex. publication d’un marché, notification d’un marché, recueil d’un avis administratif, etc.).</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:complexType name="EventType">
+        <xsd:sequence>
+            <xsd:element name="EventIdentifier" type="NonEmptyTokenType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant de l'événement.</xsd:documentation>
+                    <xsd:documentation>Références : premis.eventIdentifier</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="EventType" type="NonEmptyTokenType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Type d'événement.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="EventDateTime" type="xsd:dateTime">
+                <xsd:annotation>
+                    <xsd:documentation>Date et heure de l'événement.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="EventDetail" type="TextType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Détail sur l'événement.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:complexType>
+    <!-- Signature description -->
+    <xsd:group name="SignatureGroup">
+        <xsd:sequence>
+            <xsd:element name="Signature" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Contient toutes les informations relatives à la signature.</xsd:documentation>
+                </xsd:annotation>
+                <xsd:complexType>
+                    <xsd:sequence>
+                        <xsd:element name="DateSignature" type="xsd:dateTime">
+                            <xsd:annotation>
+                                <xsd:documentation>Date de l'objet signature.</xsd:documentation>
+                            </xsd:annotation>
+                        </xsd:element>
+                        <xsd:element name="Signer">
+                            <xsd:annotation>
+                                <xsd:documentation>Signataire(s) de la transaction ou de l'objet.</xsd:documentation>
+                                <xsd:documentation>Références : premis.signer</xsd:documentation>
+                            </xsd:annotation>
+                            <xsd:complexType>
+                                <xsd:group ref="SignerGroup"/>
+                            </xsd:complexType>
+                        </xsd:element>
+                        <xsd:element name="Validator">
+                            <xsd:annotation>
+                                <xsd:documentation>Validateur de la signature.</xsd:documentation>
+                            </xsd:annotation>
+                            <xsd:complexType>
+                                <xsd:group ref="ValidatorGroup"/>
+                            </xsd:complexType>
+                        </xsd:element>
+                        <xsd:element name="Masterdata" type="CodeType" minOccurs="0">
+                            <xsd:annotation>
+                                <xsd:documentation>Référentiel des personnes et des organisations au moment de la vérification de la signature et de sa validation.</xsd:documentation>
+                            </xsd:annotation>
+                        </xsd:element>
+                        <xsd:element name="ReferencedObject" type="ReferencedObjectType">
+                            <xsd:annotation>
+                                <xsd:documentation>Référence à l'objet signé.</xsd:documentation>
+                            </xsd:annotation>
+                        </xsd:element>
+                    </xsd:sequence>
+                </xsd:complexType>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:complexType name="ReferencedObjectType">
+        <xsd:annotation>
+            <xsd:documentation>Contient la référence à l'objet signé (et son empreinte jusqu'à la fin de la phase de versement dans le SAE).</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:element name="SignedObjectId" type="DataObjectRefIdType">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant de l'objet-données signé.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="SignedObjectDigest" type="MessageDigestBinaryObjectType">
+                <xsd:annotation>
+                    <xsd:documentation>Empreinte obligatoire jusqu'au processus de versement pour assurer la portabilité de la valeur probante. Le SAE peut ne pas la conserver si l'on considère que l'identifiant de l'objet correspondant suffit. Ce procédé permet de résister au temps lorsque les informations binaires du paquet seront converties au gré des opérations de préservation de la lisibilité des formats. Au cours de ces opérations, l'identifiant ne changera pas, contrairement au format dufichier et donc à son empreinte.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:complexType>
+    <xsd:group name="SignerGroup">
+        <xsd:sequence>
+            <xsd:group ref="PersonOrEntityGroup"/>
+            <xsd:element name="SigningTime" type="xsd:dateTime">
+                <xsd:annotation>
+                    <xsd:documentation>Date de signature.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:group ref="BusinessGroup"/>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:group name="ValidatorGroup">
+        <xsd:sequence>
+            <xsd:group ref="PersonOrEntityGroup"/>
+            <xsd:element name="ValidationTime" type="xsd:dateTime">
+                <xsd:annotation>
+                    <xsd:documentation>Date de la validation de la signature.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:group ref="BusinessGroup"/>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- Addressee description -->
+    <xsd:group name="AddresseeGroup">
+        <xsd:sequence>
+            <xsd:element name="Addressee" minOccurs="0" maxOccurs="unbounded" type="AgentType">
+                <xsd:annotation>
+                    <xsd:documentation>Destinataire pour action. Utilisé pour indiquer le nom du destinatire par exemple dans un courrier électronique.</xsd:documentation>
+                    <xsd:documentation>Références : ARMS.Addressee, Interpares.Addressee</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <!-- Recipient description -->
+    <xsd:group name="RecipientGroup">
+        <xsd:sequence>
+            <xsd:element name="Recipient" minOccurs="0" maxOccurs="unbounded" type="AgentType">
+                <xsd:annotation>
+                    <xsd:documentation>Destinataire pour information. Utilisé pour indiquer le nom du destinatire en copie, pour information, par exemple dans un courrier électronique.</xsd:documentation>
+                    <xsd:documentation>Références : Interpares.Recipient</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <!-- Person description -->
+    <xsd:group name="PersonGroup">
+        <xsd:sequence>
+            <xsd:element name="FirstName" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation>Prénom d'une personne.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="BirthName" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation>Nom de naissance d'une personne.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="GivenName" type="xsd:string" minOccurs="0" maxOccurs="1">
+                <xsd:annotation>
+                    <xsd:documentation>Nom d'usage d'une personne.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Gender" type="NonEmptyTokenType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Sexe de la personne.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="BirthDate" type="xsd:date" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Date de naissance de la personne.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="BirthPlace" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Lieu de naissance de la personne.</xsd:documentation>
+                </xsd:annotation>
+                <xsd:complexType>
+                    <xsd:group ref="LocationGroup"/>
+                </xsd:complexType>
+            </xsd:element>
+            <xsd:element name="DeathDate" type="xsd:date" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Date de décès d'une personne.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="DeathPlace" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Lieu de décès d'une personne.</xsd:documentation>
+                </xsd:annotation>
+                <xsd:complexType>
+                    <xsd:group ref="LocationGroup"/>
+                </xsd:complexType>
+            </xsd:element>
+            <xsd:element name="Nationality" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Nationalité d'une personne.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Identifier" type="NonEmptyTokenType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Dans le PersonGroup, Identifiant de type numéro matricule.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <!-- Entity description -->
+    <xsd:group name="EntityGroup">
+        <xsd:sequence>
+            <xsd:element name="Corpname" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation>Nom d'une entité.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Identifier" type="NonEmptyTokenType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant de l'entité.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <!-- Agent description -->
+    <xsd:complexType name="AgentType">
+        <xsd:annotation>
+            <xsd:documentation>Informations décrivant une personne physique ou morale.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:group ref="PersonOrEntityGroup"/>
+        </xsd:sequence>
+    </xsd:complexType>
+    <xsd:group name="PersonOrEntityGroup">
+        <xsd:choice>
+            <xsd:group ref="PersonGroup"/>
+            <xsd:group ref="EntityGroup"/>
+        </xsd:choice>
+    </xsd:group>
+    <!-- Business description -->
+    <xsd:group name="BusinessGroup">
+        <xsd:annotation>
+            <xsd:documentation>Références : AGKRMS.Business</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:element name="Function" type="TextType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>En plus des balises Tag et Keyword, il est possible d'indexer les objets avec des éléments pré-définis : Fonction.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Activity" type="TextType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>En plus des balises Tag et Keyword, il est possible d'indexer les objets avec des éléments pré-définis : Activité.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Position" type="TextType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Intitulé du poste de travail occupé par la personne.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Role" type="TextType" minOccurs="0" maxOccurs="unbounded">
+                <xsd:annotation>
+                    <xsd:documentation>Droits avec lesquels un utilisateur a réalisé une opération, notamment dans une application.</xsd:documentation>
+                    <xsd:documentation>Références : moreq.role</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <!-- Location description -->
+    <xsd:group name="LocationGroup">
+        <xsd:annotation>
+            <xsd:documentation>Localisation.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:all>
+            <xsd:element name="Geogname" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>En plus des balises Tag et Keyword, il est possible d'indexer les objets avec des éléments pré-définis : Nom géographique.</xsd:documentation>
+                    <xsd:documentation>Références : ead.geogname</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Address" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>En plus des balises Tag et Keyword, il est possible d'indexer les objets avec des éléments pré-définis : Adresse.</xsd:documentation>
+                    <xsd:documentation>Références : ead.address</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="PostalCode" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>En plus des balises Tag et Keyword, il est possible d'indexer les objets avec des éléments pré-définis : Code postal.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="City" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>En plus des balises Tag et Keyword, il est possible d'indexer les objets avec des éléments pré-définis : Ville.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Region" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>En plus des balises Tag et Keyword, il est possible d'indexer les objets avec des éléments pré-définis : Région.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Country" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>En plus des balises Tag et Keyword, il est possible d'indexer les objets avec des éléments pré-définis : Pays.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:all>
+    </xsd:group>
+    <!-- GPS Description: shared with Descriptive and Technical -->
+    <xsd:group name="GpsGroup">
+        <xsd:sequence>
+            <xsd:element name="Gps" type="GpsType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Coordonnées gps complétées ou vérifiées par un utilisateur. Fait référence à des coordonnées traitées par un utilisateur et non à des coordonnées captées.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:complexType name="GpsType">
+        <xsd:sequence>
+            <xsd:element name="GpsVersionID" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant de la version du GPS.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="GpsAltitude" type="xsd:integer" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Altitude de la position GPS.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="GpsAltitudeRef" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>0 (niveau de la mer) / 1 (référence au niveau de la mer - valeur négative -).</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="GpsLatitude" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>N (Nord) /  S (Sud).</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="GpsLatitudeRef" type="xsd:string" minOccurs="0"/>
+            <xsd:element name="GpsLongitude" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Latitude de la position GPS.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="GpsLongitudeRef" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>E (Est) / W (Ouest).</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="GpsDateStamp" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Heure et Date de la position GPS.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:complexType>
+
+</xsd:schema>
diff --git a/modules/export_seda/resources/xsd/seda-2.0-technical.xsd b/modules/export_seda/resources/xsd/seda-2.0-technical.xsd
new file mode 100644
index 0000000000000000000000000000000000000000..9e557ee06d1ab537a212df6b0e466d0fef100520
--- /dev/null
+++ b/modules/export_seda/resources/xsd/seda-2.0-technical.xsd
@@ -0,0 +1,481 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="fr:gouv:culture:archivesdefrance:seda:v2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="fr:gouv:culture:archivesdefrance:seda:v2.0"
+    elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
+    <xsd:include schemaLocation="seda-2.0-types.xsd"/>
+
+    <!--
+                *****************************
+                ***   Code List
+                *****************************
+ 
+        -->
+    <xsd:group name="TechnicalCodeListsGroup">
+        <xsd:annotation>
+            <xsd:documentation>Liste de codes à utiliser dans les métadonnées techniques.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:group ref="DigestAlgorithmCodeListGroup"/>
+            <xsd:group ref="MimeTypeCodeListGroup" minOccurs="0"/>
+            <xsd:group ref="EncodingCodeListGroup" minOccurs="0"/>
+            <xsd:group ref="FileFormatCodeListGroup"/>
+            <xsd:group ref="CompressionAlgorithmCodeListGroup" minOccurs="0"/>
+            <xsd:group ref="DataObjectVersionCodeListGroup" minOccurs="0"/>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- Identification of format code -->
+    <xsd:simpleType name="MimeTypeType">
+        <xsd:annotation>
+            <xsd:documentation>Code de type Mime.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="NonEmptyTokenType"/>
+    </xsd:simpleType>
+    <xsd:group name="MimeTypeCodeListGroup">
+        <xsd:sequence>
+            <xsd:element name="MimeTypeCodeListVersion" type="CodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Version de la liste de code du type Mime.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:simpleType name="EncodingType">
+        <xsd:annotation>
+            <xsd:documentation>Encodage du fichier.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="NonEmptyTokenType"/>
+    </xsd:simpleType>
+    <xsd:group name="EncodingCodeListGroup">
+        <xsd:sequence>
+            <xsd:element name="EncodingCodeListVersion" type="CodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Version de la liste de code d'encodage du fichier.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:simpleType name="FileFormatType">
+        <xsd:annotation>
+            <xsd:documentation>Identification du format de fichier.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="NonEmptyTokenType"/>
+    </xsd:simpleType>
+    <xsd:group name="FileFormatCodeListGroup">
+        <xsd:sequence>
+            <xsd:element name="FileFormatCodeListVersion" type="CodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Version de la liste de code d'identification du format.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:simpleType name="CompressionAlgorithmType">
+        <xsd:annotation>
+            <xsd:documentation>Algorithme de compression utilisée.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="NonEmptyTokenType"/>
+    </xsd:simpleType>
+    <xsd:group name="CompressionAlgorithmCodeListGroup">
+        <xsd:sequence>
+            <xsd:element name="CompressionAlgorithmCodeListVersion" type="CodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Version de la liste de code de l'algorithme de compression.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    
+    <!-- Identification d'une version pour un même objet intellectuel  -->
+    <xsd:group name="DataObjectVersionCodeListGroup">
+        <xsd:sequence>
+            <xsd:element name="DataObjectVersionCodeListVersion" type="CodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Liste de codes correspondant aux diverses versions d'un objet-données au sein d’un groupe d'objets-données (ex. original papier, conservation, diffusion, vignette, txt).</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:simpleType name="VersionIdType">
+        <xsd:annotation>
+            <xsd:documentation>Identifiant utilisé pour référencer les versions (conservation, diffusion, thumbnail/vignette, raw/brut, txt, ...).</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="NonEmptyTokenType"/>
+    </xsd:simpleType>
+
+    <!-- Paquet d'Objets-données -->
+    <xsd:group name="DataObjectVersionGroup">
+        <xsd:annotation>
+            <xsd:documentation>Groupe d’objets-données (numériques ou physiques), correspondant aux différentes versions d’un même objet intellectuellement unique. Chaque version peut être par exemple : original papier, version de conservation, version de diffusion, version vignette, version texte ascii…
+                Lorsqu'un objet-donnée fait partie d'un groupe, le référencement dans les ArchiveUnit ne peut se faire que via ce groupe (DataObjectGroupId).</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:choice>
+                <xsd:element name="DataObjectGroupReferenceId" type="GroupRefIdType">
+                    <xsd:annotation>
+                        <xsd:documentation>Référence à un Identifiant du groupe d'objets-données DataObjectVersionGroup.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+                <xsd:element name="DataObjectGroupId" type="GroupIdType">
+                    <xsd:annotation>
+                        <xsd:documentation>Identifiant du groupe d'objets-données DataObjectVersionGroup (première et unique définition).</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>                
+            </xsd:choice>
+            <xsd:element name="DataObjectVersion" type="VersionIdType">
+                <xsd:annotation>
+                    <xsd:documentation>Version d’un objet-données (par exemple : original papier, conservation, diffusion, vignette, txt, …).</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:complexType name="MinimalDataObjectType" abstract="true">
+        <xsd:sequence>
+            <xsd:element name="Relationship" minOccurs="0" maxOccurs="unbounded"
+                type="RelationshipType">
+                <xsd:annotation>
+                    <xsd:documentation>Permet de spécifier un lien technique entre un objet-données et une signature.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:group ref="DataObjectVersionGroup" minOccurs="0"/>
+        </xsd:sequence>
+        <xsd:attribute name="id" type="DataObjectIdType" use="required">
+            <xsd:annotation>
+                <xsd:documentation>Identifiant de l'objet-données associé.</xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+    </xsd:complexType>
+
+    <!-- Objet de donnees numérique -->
+    <xsd:complexType name="BinaryDataObjectType">
+        <xsd:annotation>
+            <xsd:documentation>Objet-données numérique.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:extension base="MinimalDataObjectType">
+                <xsd:annotation>
+                    <xsd:documentation>Métadonnées techniques minimales : URI, Digest, Poids.</xsd:documentation>
+                </xsd:annotation>
+                <xsd:sequence>
+                    <xsd:choice>
+                        <xsd:element name="Attachment" type="BinaryObjectType">
+                            <xsd:annotation>
+                                <xsd:documentation>Objet-données (contenu binaire ou fichier joint).</xsd:documentation>
+                            </xsd:annotation>
+                        </xsd:element>
+                        <xsd:element name="Uri" type="xsd:anyURI">
+                            <xsd:annotation>
+                                <xsd:documentation>L'URI spécifie où se trouve l'objet-données numérique. Peut correspondre à un chemin relatif.</xsd:documentation>
+                            </xsd:annotation>
+                        </xsd:element>
+                    </xsd:choice>
+                    <xsd:element name="MessageDigest" type="MessageDigestBinaryObjectType">
+                        <xsd:annotation>
+                            <xsd:documentation>Empreinte de l'objet-données.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="Size" type="SizeInBytesType">
+                        <xsd:annotation>
+                            <xsd:documentation>Permet de spécifier la taille de l'objet-données en octet.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="Compressed" minOccurs="0">
+                        <xsd:annotation>
+                            <xsd:documentation>Indique si l’objet-données est compressé et doit être décompressé.</xsd:documentation>
+                        </xsd:annotation>
+                        <xsd:complexType>
+                            <xsd:simpleContent>
+                                <xsd:extension base="xsd:boolean">
+                                    <xsd:attribute name="algorithm" type="CompressionAlgorithmType" use="required"/>
+                                    <xsd:attribute name="uncompressedSize" type="SizeInBytesType"
+                                        use="required"/>
+                                </xsd:extension>
+                            </xsd:simpleContent>
+                        </xsd:complexType>
+                    </xsd:element>
+                    <xsd:group ref="BinaryTechnicalDescriptionGroup">
+                        <xsd:annotation>
+                            <xsd:documentation>Métadonnées techniques pour les objets-données numériques.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:group>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <xsd:group name="BinaryTechnicalDescriptionGroup">
+        <xsd:annotation>
+            <xsd:documentation>Métadonnées techniques pour les objets-données numériques.</xsd:documentation>
+            <xsd:documentation>Inspiré du schéma FITS.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:element name="FormatIdentification" type="FormatIdentificationType">
+                <xsd:annotation>
+                    <xsd:documentation>Identification du format de l'objet-données.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="FileInfo" type="FileInfoType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Propriétés techniques génériques du fichier (nom d’origine, logiciel de création, système d’exploitation de création).</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Metadata" type="CoreMetadataType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Propriétés techniques spécifiques du fichier en fonction de sa nature technique (texte, document, image, audio, vidéo, etc.).</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="OtherMetadata" type="DescriptiveTechnicalMetadataType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Autres métadonnées techniques si celles définies précédemment ne suffisent pas.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+
+    <!-- FormatIdentification elements -->
+    <xsd:complexType name="FormatIdentificationType">
+        <xsd:sequence>
+            <xsd:element name="FormatLitteral" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Forme littérale du nom du format.</xsd:documentation>
+                    <xsd:documentation>Exemple : Microsoft Word Document.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="MimeType" type="MimeTypeType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Type Mime associé, potentiellement stable mais pas assez précis.</xsd:documentation>
+                    <xsd:documentation>Exemple : application/msword</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="FormatId" type="FileFormatType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Type spécifique du format tel que défini dans FormatIdCodeList.</xsd:documentation>
+                    <xsd:documentation>Exemple : (Pronom)fmt/40</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Encoding" type="EncodingType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Encodage du fichier tel que défini dans EncodingIdCodeList.</xsd:documentation>
+                    <xsd:documentation>Exemple : Utf-8</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <!-- File info elements -->
+    <xsd:complexType name="FileInfoType">
+        <xsd:annotation>
+            <xsd:documentation>Informations sur le fichier lui-même (d'un point de vue technique).</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:element name="Filename" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation>Nom du fichier d'origine.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="CreatingApplicationName" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Nom de l'application utilisée pour créer le fichier.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="CreatingApplicationVersion" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Version de l'application utilisée pour créer le fichier.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="DateCreatedByApplication" type="xsd:dateTime" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Date de création du fichier.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="CreatingOs" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Système d’exploitation utilisé pour créer le fichier.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="CreatingOsVersion" type="xsd:string" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Version du système d'exploitation utilisé pour créer le fichier.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="LastModified" type="xsd:dateTime" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Date de la dernière modification du fichier.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <!-- Objet de donnees physique -->
+    <xsd:group name="PhysicalTechnicalDescriptionGroup">
+        <xsd:annotation>
+            <xsd:documentation>Objet-données physique.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:element name="PhysicalDimensions" type="DimensionsType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Dimensions d'un objet-données physique.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element ref="OtherDimensionsAbstract" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:complexType name="PhysicalDataObjectType">
+        <xsd:complexContent>
+            <xsd:extension base="MinimalDataObjectType">
+                <xsd:sequence>
+                    <xsd:element name="PhysicalId" type="IdentifierType">
+                        <xsd:annotation>
+                            <xsd:documentation>Identifiant physique d’un objet-données physique, externe à celui-ci (ex. code-barres).</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:group ref="PhysicalTechnicalDescriptionGroup"/>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!-- Metadata types: inspired from various Library of Congress schema -->
+    <xsd:complexType name="CoreMetadataType">
+        <xsd:annotation>
+            <xsd:documentation>Métadonnées de base par type d'objet-données.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:choice>
+            <xsd:element name="Text" type="TextTechnicalMetadataType">
+                <xsd:annotation>
+                    <xsd:documentation>Métadonnées pour un objet-données de type textuel.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Document" type="DocumentTechnicalMetadataType">
+                <xsd:annotation>
+                    <xsd:documentation>Métadonnées pour un objet-données de type document.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Image" type="ImageTechnicalMetadataType">
+                <xsd:annotation>
+                    <xsd:documentation>Métadonnées pour un objet-données de type image.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Audio" type="AudioTechnicalMetadataType">
+                <xsd:annotation>
+                    <xsd:documentation>Métadonnées pour un objet-données de type audio.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="Video" type="VideoTechnicalMetadataType">
+                <xsd:annotation>
+                    <xsd:documentation>Métadonnées pour un objet-données de type vidéo.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element ref="OtherCoreTechnicalMetadataAbstract">
+                <xsd:annotation>
+                    <xsd:documentation>Métadonnées pour un objet-données d’un autre type (base de données, 3D, programmes, formats propriétaires, etc.).</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:choice>
+    </xsd:complexType>
+
+    <!-- Physical description: inspired from AudioMD of Library of Congress and UNECE_MeasurementUnitCommonCode -->
+    <xsd:complexType name="DimensionsType">
+        <xsd:annotation>
+            <xsd:documentation>Permet d'exprimer les mesures de dimensions basiques.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:extension base="BaseDimensionsType">
+                <xsd:sequence>
+                    <xsd:element name="Width" type="MeasurementType" minOccurs="0" maxOccurs="1">
+                        <xsd:annotation>
+                            <xsd:documentation>Métadonnée de dimension physique : largeur.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="Height" type="MeasurementType" minOccurs="0" maxOccurs="1">
+                        <xsd:annotation>
+                            <xsd:documentation>Métadonnée de dimension physique : hauteur.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="Depth" type="MeasurementType" minOccurs="0" maxOccurs="1">
+                        <xsd:annotation>
+                            <xsd:documentation>Métadonnée de dimension physique : profondeur.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="Shape" type="xsd:string" minOccurs="0" maxOccurs="1">
+                        <xsd:annotation>
+                            <xsd:documentation>Métadonnée de dimension physique : forme.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="Diameter" type="MeasurementType" minOccurs="0" maxOccurs="1">
+                        <xsd:annotation>
+                            <xsd:documentation>Métadonnée de dimension physique : diamètre.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="Length" type="MeasurementType" minOccurs="0" maxOccurs="1">
+                        <xsd:annotation>
+                            <xsd:documentation>Métadonnée de dimension physique : longueur.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="Thickness" type="MeasurementType" minOccurs="0" maxOccurs="1">
+                        <xsd:annotation>
+                            <xsd:documentation>Métadonnée de dimension physique : épaisseur.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="Weight" type="MeasurementWeightType" minOccurs="0" maxOccurs="1">
+                        <xsd:annotation>
+                            <xsd:documentation>Métadonnée de dimension physique : poids.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                    <xsd:element name="NumberOfPage" type="xsd:int" minOccurs="0" maxOccurs="1">
+                        <xsd:annotation>
+                            <xsd:documentation>Métadonnée de dimension physique : nombre de pages.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:element>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <xsd:complexType name="BaseDimensionsType" abstract="true"/>
+    <xsd:complexType name="MeasurementType">
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:decimal">
+                <xsd:attribute name="unit" type="MeasurementUnitsType" use="required">
+                    <xsd:annotation>
+                        <xsd:documentation>Références : Voir UNECE_MeasurementUnitCommonCode_8.xsd</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+    <xsd:simpleType name="MeasurementUnitsType">
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="micrometre"/>
+            <xsd:enumeration value="4H"/>
+            <xsd:enumeration value="millimetre"/>
+            <xsd:enumeration value="MMT"/>
+            <xsd:enumeration value="centimetre"/>
+            <xsd:enumeration value="CMT"/>
+            <xsd:enumeration value="metre"/>
+            <xsd:enumeration value="inch"/>
+            <xsd:enumeration value="INH"/>
+            <xsd:enumeration value="foot"/>
+            <xsd:enumeration value="FOT"/>
+        </xsd:restriction>
+    </xsd:simpleType>
+    <xsd:complexType name="MeasurementWeightType">
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:decimal">
+                <xsd:attribute name="unit" type="MeasurementWeightUnitsType" use="required"/>
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+    <xsd:simpleType name="MeasurementWeightUnitsType">
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="microgram"/>
+            <xsd:enumeration value="MC"/>
+            <xsd:enumeration value="milligram"/>
+            <xsd:enumeration value="MGM"/>
+            <xsd:enumeration value="gram"/>
+            <xsd:enumeration value="GRM"/>
+            <xsd:enumeration value="kilogram"/>
+            <xsd:enumeration value="KGM"/>
+        </xsd:restriction>
+    </xsd:simpleType>
+
+</xsd:schema>
diff --git a/modules/export_seda/resources/xsd/seda-2.0-types.xsd b/modules/export_seda/resources/xsd/seda-2.0-types.xsd
new file mode 100644
index 0000000000000000000000000000000000000000..0e2a36bb77e42db720a775a9f593236418951f92
--- /dev/null
+++ b/modules/export_seda/resources/xsd/seda-2.0-types.xsd
@@ -0,0 +1,349 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
+        targetNamespace="fr:gouv:culture:archivesdefrance:seda:v2.0"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:xlink="http://www.w3.org/1999/xlink"
+        xmlns="fr:gouv:culture:archivesdefrance:seda:v2.0"
+        elementFormDefault="qualified"
+        attributeFormDefault="unqualified"
+        version="1.0">
+
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
+    <xsd:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
+
+    <!--
+                *****************************
+                ***   Types de base
+                *****************************
+        -->
+    <!-- Code -->
+    <xsd:complexType name="CodeType">
+        <xsd:simpleContent>
+            <xsd:extension base="NonEmptyTokenType">
+                <xsd:attribute name="listID" type="xsd:token" use="optional"/>
+                <xsd:attribute name="listAgencyID" type="xsd:token" use="optional"/>
+                <xsd:attribute name="listAgencyName" type="xsd:string" use="optional"/>
+                <xsd:attribute name="listName" type="xsd:string" use="optional"/>
+                <xsd:attribute name="listVersionID" type="xsd:token" use="optional"/>
+                <xsd:attribute name="name" type="xsd:string" use="optional"/>
+                <xsd:attribute name="languageID" type="xsd:language" use="optional"/>
+                <xsd:attribute name="listURI" type="xsd:anyURI" use="optional"/>
+                <xsd:attribute name="listSchemeURI" type="xsd:anyURI" use="optional"/>
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+    
+    <!-- Texte -->
+    <xsd:complexType name="TextType">
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:string">
+                <xsd:attribute ref="xml:lang" use="optional"/>
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+    
+    <!-- Identifiant -->
+    <xsd:complexType name="IdentifierType">
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:token">
+                <xsd:attribute name="schemeID" type="xsd:token" use="optional"/>
+                <xsd:attribute name="schemeName" type="xsd:string" use="optional"/>
+                <xsd:attribute name="schemeAgencyID" type="xsd:token" use="optional"/>
+                <xsd:attribute name="schemeAgencyName" type="xsd:string" use="optional"/>
+                <xsd:attribute name="schemeVersionID" type="xsd:token" use="optional"/>
+                <xsd:attribute name="schemeDataURI" type="xsd:anyURI" use="optional"/>
+                <xsd:attribute name="schemeURI" type="xsd:anyURI" use="optional"/>
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+    
+    <!-- Type à spécifier -->
+    <xsd:attributeGroup name="OpenTypeAttributeGroup">
+        <xsd:attribute ref="xml:id" use="optional"/>
+        <xsd:attribute ref="xlink:href" use="optional"/>
+    </xsd:attributeGroup>
+    <xsd:complexType name="OpenType" abstract="true">
+        <xsd:sequence>
+            <xsd:any namespace="##other" processContents="lax" minOccurs="0"/>
+        </xsd:sequence>
+        <xsd:attributeGroup ref="OpenTypeAttributeGroup"/>
+    </xsd:complexType> 
+
+    <xsd:simpleType name="NonEmptyTokenType">
+        <xsd:annotation>
+            <xsd:documentation>Elément ne pouvant être vide.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="xsd:token">
+            <xsd:minLength value="1"/>
+        </xsd:restriction>
+    </xsd:simpleType>
+    <!-- ID -->
+    <xsd:simpleType name="DataObjectIdType">
+        <xsd:annotation>
+            <xsd:documentation>Identifiant utilisé pour les objets-données.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="xsd:ID"/>
+    </xsd:simpleType>
+    <xsd:simpleType name="DataObjectRefIdType">
+        <xsd:annotation>
+            <xsd:documentation>Identifiant servant aux relations des objets-données.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="xsd:IDREF"/>
+    </xsd:simpleType>
+    <xsd:simpleType name="GroupIdType">
+        <xsd:annotation>
+            <xsd:documentation>Identifiant utilisé pour les groupes d'objets-données.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:union>
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:ID"/>
+            </xsd:simpleType>
+        </xsd:union>
+    </xsd:simpleType>
+    <xsd:simpleType name="GroupRefIdType">
+        <xsd:annotation>
+            <xsd:documentation>Identifiant utilisé pour référencer les groupes d'objets-données.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="xsd:IDREF"/>
+    </xsd:simpleType>
+    <xsd:complexType name="DataObjectRefType">
+        <xsd:annotation>
+            <xsd:documentation>Référence à un objet-données ou à un groupe d'objets-données.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:choice>
+                <xsd:element name="DataObjectReferenceId" type="DataObjectRefIdType">
+                    <xsd:annotation>
+                        <xsd:documentation>Référence à un objet-données listé dans les métadonnées de transport.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+                <xsd:element name="DataObjectGroupReferenceId" type="GroupRefIdType">
+                    <xsd:annotation>
+                        <xsd:documentation>Référence à un groupe d'objets-données listé dans les métadonnées de transport.</xsd:documentation>
+                    </xsd:annotation>
+                </xsd:element>
+            </xsd:choice>
+        </xsd:sequence>
+        <xsd:attribute name="id" type="xsd:ID" use="optional"/>
+    </xsd:complexType>
+    
+    <!-- ID of an ArchiveUnit -->
+    <xsd:simpleType name="ArchiveUnitIdType">
+        <xsd:annotation>
+            <xsd:documentation>Identifiant utilisé pour les unités d'archives.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="xsd:ID"/>
+    </xsd:simpleType>
+    <xsd:simpleType name="ArchiveUnitRefIdType">
+        <xsd:annotation>
+            <xsd:documentation>Référence aux identifiants utilisés pour les unités d'archives.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="xsd:IDREF"/>
+    </xsd:simpleType>
+    
+    <xsd:simpleType name="SizeInBytesType">
+        <xsd:annotation>
+            <xsd:documentation>Poids des objets-données binaires en bytes.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="xsd:positiveInteger"/>
+    </xsd:simpleType>
+
+    <!-- Binary encoding -->
+    <xsd:simpleType name="BinaryType">
+        <xsd:annotation>
+            <xsd:documentation>Représentation binaire : utilisation possible de base64 ou d'hexadécimal.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:union memberTypes="xsd:base64Binary xsd:hexBinary"/>
+    </xsd:simpleType>
+    
+    <!-- Digest -->
+    <xsd:group name="DigestAlgorithmCodeListGroup">
+        <xsd:sequence>
+            <xsd:element name="MessageDigestAlgorithmCodeListVersion" type="CodeType">
+                <xsd:annotation>
+                    <xsd:documentation>Liste de l'algorithme de hachage utilisé dans le message.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:group>
+    <xsd:simpleType name="DigestAlgorithmCodeType">
+        <xsd:annotation>
+            <xsd:documentation>Algorithme de hachage spécifié dans DigestAlgorithmCodeList.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="NonEmptyTokenType"/>
+    </xsd:simpleType>
+    <xsd:complexType name="MessageDigestBinaryObjectType">
+        <xsd:simpleContent>
+            <xsd:extension base="BinaryType">
+                <xsd:attribute name="algorithm" type="DigestAlgorithmCodeType" use="required"/>
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+    
+    <!--
+                *****************************
+                ***   Types métier
+                *****************************
+ 
+        -->
+    
+    <!-- Contenu de données binaire -->
+    <xsd:complexType name="BinaryObjectType"> 
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:base64Binary">
+                <xsd:attribute name="filename" type="xsd:string" use="optional"/>
+                <xsd:attribute name="uri" type="xsd:anyURI" use="optional"/>
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType> 
+    
+    <!-- Données liées -->
+    <xsd:complexType name="RelationshipType">
+        <xsd:attribute name="target" type="xsd:IDREF" use="required"/>
+        <xsd:attribute name="type" type="NonEmptyTokenType" use="required"/>
+    </xsd:complexType>
+    
+    <!-- Organisation -->
+    <xsd:complexType name="OrganizationType">
+        <xsd:sequence>
+            <xsd:element name="Identifier" type="IdentifierType">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant de l'organisation.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="OrganizationDescriptiveMetadata" type="OrganizationDescriptiveMetadataType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Métadonnées de description de l'organisation.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:complexType>
+    
+    <!--
+                ***************************** 
+                ***   Objets à redéfinir
+                *****************************
+                La redéfinition permet de fixer le nom de la balise tout en permettant la définition du type ultérieurement
+        -->
+    
+    <!-- Métadonnées descriptives pour une organisation -->
+    <xsd:complexType name="OrganizationDescriptiveMetadataType">
+        <xsd:annotation>
+            <xsd:documentation>Contient toutes les métadonnées de description des organisations.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:extension base="OpenType"/>
+        </xsd:complexContent>
+    </xsd:complexType>
+        
+    <!-- Signature in Main message block -->
+    <xsd:complexType name="SignatureType">
+        <xsd:annotation>
+            <xsd:documentation>Contient toutes les métadonnées dsur la signature.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:extension base="OpenType"/>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <!-- In CoreMetadataType from seda-2.0-technical.xsd: Technical Metadata Content -->
+    <xsd:complexType name="TextTechnicalMetadataType">
+        <xsd:annotation>
+            <xsd:documentation>Contient toutes les métadonnées techniques de base pour les objets-données de type texte(XML, JSON, CSV, ...).</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:extension base="OpenType"/>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <xsd:complexType name="DocumentTechnicalMetadataType">
+        <xsd:annotation>
+            <xsd:documentation>Contient toutes les métadonnées techniques de base pour les objets-données de type document (Word, PDF, XLS, LibreOffice, ...).</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:extension base="OpenType"/>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <xsd:complexType name="ImageTechnicalMetadataType">
+        <xsd:annotation>
+            <xsd:documentation>Contient toutes les métadonnées techniques de base pour les objets-données de type image.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:extension base="OpenType"/>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <xsd:complexType name="AudioTechnicalMetadataType">
+        <xsd:annotation>
+            <xsd:documentation>Contient toutes les métadonnées techniques de base pour les objets-données de type audio.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:extension base="OpenType"/>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <xsd:complexType name="VideoTechnicalMetadataType">
+        <xsd:annotation>
+            <xsd:documentation>Contient toutes les métadonnées techniques de base pour les objets-données de type video.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:extension base="OpenType"/>
+        </xsd:complexContent>
+    </xsd:complexType>
+    <xsd:complexType name="DescriptiveTechnicalMetadataType">
+        <xsd:annotation>
+            <xsd:documentation>Contient toutes les métadonnées techniques et/ou descriptives définies dans un schéma par un service producteur ou versant mais n'étant pas présentes dans les métadonnées de base.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexContent>
+            <xsd:extension base="OpenType"/>
+        </xsd:complexContent>
+    </xsd:complexType>
+    
+    <!--
+                ******************************************* 
+                ***   Objets à spécifier par substitution
+                *******************************************
+                La substitution permet de ne pas fixer le nom de la balise, d'en autoriser plusieurs et de laisser l'implémentation choisir en fonction de ses besoins.
+        -->
+    <!-- In ObjectGroup from seda-2-0-ontology.xsd: Extra Descriptive Metadata Content -->
+    <xsd:element name="ObjectGroupExtenstionAbstract" abstract="true">
+        <xsd:annotation>
+            <xsd:documentation>Permet d'étendre ObjectGroup avec d'autres métadonnées descriptives.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    
+    <!-- In PhysicalTechnicalDescriptionGroup from seda-2.0-technical.xsd: extra dimension techncal description for PhysicalDataObject -->
+    <xsd:element name="OtherDimensionsAbstract" abstract="true">
+        <xsd:annotation>
+            <xsd:documentation>Permet d'étendre &lt;OtherDimensions&gt; avec d'autres métadonnées de description des objets-données physiques.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    
+    <!-- In CoreMetadataType from seda-2.0-technical.xsd: extra Core TechnicalMetadata (Database, 3D, plan, ...) -->
+    <xsd:element name="OtherCoreTechnicalMetadataAbstract" abstract="true" type="OpenType">
+        <xsd:annotation>
+            <xsd:documentation>Contient toutes les métadonnées techniques de base pour d'autres types.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    
+    <!-- In ArchiveUnitType from seda-2.0-descriptive.xsd: Abstract for ArchiveUnit reference from within EAS -->
+    <xsd:element name="ArchiveUnitReferenceAbstract" abstract="true">
+        <xsd:annotation>
+            <xsd:documentation>Contient les requêtes nécessaires pour trouver un ArchiveUnit et pointer sur lui dans un prochain ArchiveUnit.
+                Permet de référencer un noeud déjà existant dans un arbre à partir d'un transfert précédent.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    
+    <!-- In ManagementGroup from seda-2.0-management.xsd: for Management extension -->
+    <xsd:element name="OtherManagementAbstract" abstract="true">
+        <xsd:annotation>
+            <xsd:documentation>Utilisé par exemple pour manipuler un ArchiveUnit déjà existant dans le système d'archivage électronique.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    
+    <!-- In CodeListVersionsType from seda-2.0-main.xsd: If needed, extra CodeList could be added -->
+    <xsd:element name="OtherCodeListAbstract" abstract="true" type="CodeType">
+        <xsd:annotation>
+            <xsd:documentation>Permet d'ajouter de nouvelles listes de codes si l'ajout d'autres métadonnées l'impose.</xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    
+</xsd:schema>
+ 
diff --git a/modules/export_seda/resources/xsd/xlink.xsd b/modules/export_seda/resources/xsd/xlink.xsd
new file mode 100644
index 0000000000000000000000000000000000000000..6f4d0a274d80d3e74f7915cafe2d7c0797475764
--- /dev/null
+++ b/modules/export_seda/resources/xsd/xlink.xsd
@@ -0,0 +1,270 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink">
+ 
+ <xs:annotation>
+  <xs:documentation>This schema document provides attribute declarations and
+attribute group, complex type and simple type definitions which can be used in
+the construction of user schemas to define the structure of particular linking
+constructs, e.g.
+<![CDATA[
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:xl="http://www.w3.org/1999/xlink">
+
+ <xs:import namespace="http://www.w3.org/1999/xlink"
+            location="http://www.w3.org/1999/xlink.xsd">
+
+ <xs:element name="mySimple">
+  <xs:complexType>
+   ...
+   <xs:attributeGroup ref="xl:simpleAttrs"/>
+   ...
+  </xs:complexType>
+ </xs:element>
+ ...
+</xs:schema>]]></xs:documentation>
+ </xs:annotation>
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
+
+ <xs:attribute name="type" type="xlink:typeType"/>
+
+ <xs:simpleType name="typeType">
+  <xs:restriction base="xs:token">
+   <xs:enumeration value="simple"/>
+   <xs:enumeration value="extended"/>
+   <xs:enumeration value="title"/>
+   <xs:enumeration value="resource"/>
+   <xs:enumeration value="locator"/>
+   <xs:enumeration value="arc"/>
+  </xs:restriction>
+ </xs:simpleType>
+
+ <xs:attribute name="href" type="xlink:hrefType"/>
+
+ <xs:simpleType name="hrefType">
+  <xs:restriction base="xs:anyURI"/>
+ </xs:simpleType>
+
+ <xs:attribute name="role" type="xlink:roleType"/>
+
+ <xs:simpleType name="roleType">
+  <xs:restriction base="xs:anyURI">
+   <xs:minLength value="1"/>
+  </xs:restriction>
+ </xs:simpleType>
+
+ <xs:attribute name="arcrole" type="xlink:arcroleType"/>
+
+ <xs:simpleType name="arcroleType">
+  <xs:restriction base="xs:anyURI">
+   <xs:minLength value="1"/>
+  </xs:restriction>
+ </xs:simpleType>
+
+ <xs:attribute name="title" type="xlink:titleAttrType"/>
+
+ <xs:simpleType name="titleAttrType">
+  <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+
+ <xs:attribute name="show" type="xlink:showType"/>
+
+ <xs:simpleType name="showType">
+  <xs:restriction base="xs:token">
+   <xs:enumeration value="new"/>
+   <xs:enumeration value="replace"/>
+   <xs:enumeration value="embed"/>
+   <xs:enumeration value="other"/>
+   <xs:enumeration value="none"/>
+  </xs:restriction>
+ </xs:simpleType>
+
+ <xs:attribute name="actuate" type="xlink:actuateType"/>
+
+ <xs:simpleType name="actuateType">
+  <xs:restriction base="xs:token">
+   <xs:enumeration value="onLoad"/>
+   <xs:enumeration value="onRequest"/>
+   <xs:enumeration value="other"/>
+   <xs:enumeration value="none"/>
+  </xs:restriction>
+ </xs:simpleType>
+
+ <xs:attribute name="label" type="xlink:labelType"/>
+
+ <xs:simpleType name="labelType">
+  <xs:restriction base="xs:NCName"/>
+ </xs:simpleType>
+
+ <xs:attribute name="from" type="xlink:fromType"/>
+
+ <xs:simpleType name="fromType">
+  <xs:restriction base="xs:NCName"/>
+ </xs:simpleType>
+
+ <xs:attribute name="to" type="xlink:toType"/>
+
+ <xs:simpleType name="toType">
+  <xs:restriction base="xs:NCName"/>
+ </xs:simpleType>
+
+ <xs:attributeGroup name="simpleAttrs">
+  <xs:attribute ref="xlink:type" fixed="simple"/>
+  <xs:attribute ref="xlink:href"/>
+  <xs:attribute ref="xlink:role"/>
+  <xs:attribute ref="xlink:arcrole"/>
+  <xs:attribute ref="xlink:title"/>
+  <xs:attribute ref="xlink:show"/>
+  <xs:attribute ref="xlink:actuate"/>
+ </xs:attributeGroup>
+
+ <xs:group name="simpleModel">
+  <xs:sequence>
+   <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+  </xs:sequence>
+ </xs:group>
+
+ <xs:complexType mixed="true" name="simple">
+  <xs:annotation>
+   <xs:documentation>
+    Intended for use as the type of user-declared elements to make them
+    simple links.
+   </xs:documentation>
+  </xs:annotation>
+  <xs:group ref="xlink:simpleModel"/>
+  <xs:attributeGroup ref="xlink:simpleAttrs"/>
+ </xs:complexType>
+
+ <xs:attributeGroup name="extendedAttrs">
+  <xs:attribute ref="xlink:type" fixed="extended" use="required"/>
+  <xs:attribute ref="xlink:role"/>
+  <xs:attribute ref="xlink:title"/>
+ </xs:attributeGroup>
+
+ <xs:group name="extendedModel">
+   <xs:choice>
+    <xs:element ref="xlink:title"/>
+    <xs:element ref="xlink:resource"/>
+    <xs:element ref="xlink:locator"/>
+    <xs:element ref="xlink:arc"/>
+  </xs:choice>
+ </xs:group>
+
+ <xs:complexType name="extended">
+  <xs:annotation>
+   <xs:documentation>
+    Intended for use as the type of user-declared elements to make them
+    extended links.
+    Note that the elements referenced in the content model are all abstract.
+    The intention is that by simply declaring elements with these as their
+    substitutionGroup, all the right things will happen.
+   </xs:documentation>
+  </xs:annotation>
+  <xs:group ref="xlink:extendedModel" minOccurs="0" maxOccurs="unbounded"/>
+  <xs:attributeGroup ref="xlink:extendedAttrs"/>
+ </xs:complexType>
+
+ <xs:element name="title" type="xlink:titleEltType" abstract="true"/>
+
+ <xs:attributeGroup name="titleAttrs">
+  <xs:attribute ref="xlink:type" fixed="title" use="required"/>
+  <xs:attribute ref="xml:lang">
+   <xs:annotation>
+    <xs:documentation>
+     xml:lang is not required, but provides much of the
+     motivation for title elements in addition to attributes, and so
+     is provided here for convenience.
+    </xs:documentation>
+   </xs:annotation>
+  </xs:attribute>
+ </xs:attributeGroup>
+
+ <xs:group name="titleModel">
+  <xs:sequence>
+   <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+  </xs:sequence>
+ </xs:group>
+
+ <xs:complexType mixed="true" name="titleEltType">
+  <xs:group ref="xlink:titleModel"/>
+  <xs:attributeGroup ref="xlink:titleAttrs"/>
+ </xs:complexType>
+
+ <xs:element name="resource" type="xlink:resourceType" abstract="true"/>
+
+ <xs:attributeGroup name="resourceAttrs">
+  <xs:attribute ref="xlink:type" fixed="resource" use="required"/>
+  <xs:attribute ref="xlink:role"/>
+  <xs:attribute ref="xlink:title"/>
+  <xs:attribute ref="xlink:label"/>
+ </xs:attributeGroup>
+
+ <xs:group name="resourceModel">
+  <xs:sequence>
+   <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+  </xs:sequence>
+ </xs:group>
+
+ <xs:complexType mixed="true" name="resourceType">
+  <xs:group ref="xlink:resourceModel"/>
+  <xs:attributeGroup ref="xlink:resourceAttrs"/>
+ </xs:complexType>
+
+ <xs:element name="locator" type="xlink:locatorType" abstract="true"/>
+
+ <xs:attributeGroup name="locatorAttrs">
+  <xs:attribute ref="xlink:type" fixed="locator" use="required"/>
+  <xs:attribute ref="xlink:href" use="required"/>
+  <xs:attribute ref="xlink:role"/>
+  <xs:attribute ref="xlink:title"/>
+  <xs:attribute ref="xlink:label">
+   <xs:annotation>
+    <xs:documentation>
+     label is not required, but locators have no particular
+     XLink function if they are not labeled.
+    </xs:documentation>
+   </xs:annotation>
+  </xs:attribute>
+ </xs:attributeGroup>
+
+ <xs:group name="locatorModel">
+  <xs:sequence>
+   <xs:element ref="xlink:title" minOccurs="0" maxOccurs="unbounded"/>
+  </xs:sequence>
+ </xs:group>
+
+ <xs:complexType name="locatorType">
+  <xs:group ref="xlink:locatorModel"/>
+  <xs:attributeGroup ref="xlink:locatorAttrs"/>
+ </xs:complexType>
+
+ <xs:element name="arc" type="xlink:arcType" abstract="true"/>
+
+ <xs:attributeGroup name="arcAttrs">
+  <xs:attribute ref="xlink:type" fixed="arc" use="required"/>
+  <xs:attribute ref="xlink:arcrole"/>
+  <xs:attribute ref="xlink:title"/>
+  <xs:attribute ref="xlink:show"/>
+  <xs:attribute ref="xlink:actuate"/>
+  <xs:attribute ref="xlink:from"/>
+  <xs:attribute ref="xlink:to">
+   <xs:annotation>
+    <xs:documentation>
+     from and to have default behavior when values are missing
+    </xs:documentation>
+   </xs:annotation>
+  </xs:attribute>
+ </xs:attributeGroup>
+
+ <xs:group name="arcModel">
+  <xs:sequence>
+   <xs:element ref="xlink:title" minOccurs="0" maxOccurs="unbounded"/>
+  </xs:sequence>
+ </xs:group>
+
+ <xs:complexType name="arcType">
+  <xs:group ref="xlink:arcModel"/>
+  <xs:attributeGroup ref="xlink:arcAttrs"/>
+ </xs:complexType>
+
+</xs:schema>
diff --git a/modules/export_seda/resources/xsd/xml.xsd b/modules/export_seda/resources/xsd/xml.xsd
new file mode 100644
index 0000000000000000000000000000000000000000..85bea7906ab3611cc59a0761154b22d582c419a9
--- /dev/null
+++ b/modules/export_seda/resources/xsd/xml.xsd
@@ -0,0 +1,287 @@
+<?xml version='1.0'?>
+<?xml-stylesheet href="../2008/09/xsd.xsl" type="text/xsl"?>
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" 
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+  xmlns   ="http://www.w3.org/1999/xhtml"
+  xml:lang="en">
+
+ <xs:annotation>
+  <xs:documentation>
+   <div>
+    <h1>About the XML namespace</h1>
+
+    <div class="bodytext">
+     <p>
+      This schema document describes the XML namespace, in a form
+      suitable for import by other schema documents.
+     </p>
+     <p>
+      See <a href="http://www.w3.org/XML/1998/namespace.html">
+      http://www.w3.org/XML/1998/namespace.html</a> and
+      <a href="http://www.w3.org/TR/REC-xml">
+      http://www.w3.org/TR/REC-xml</a> for information 
+      about this namespace.
+     </p>
+     <p>
+      Note that local names in this namespace are intended to be
+      defined only by the World Wide Web Consortium or its subgroups.
+      The names currently defined in this namespace are listed below.
+      They should not be used with conflicting semantics by any Working
+      Group, specification, or document instance.
+     </p>
+     <p>   
+      See further below in this document for more information about <a
+      href="#usage">how to refer to this schema document from your own
+      XSD schema documents</a> and about <a href="#nsversioning">the
+      namespace-versioning policy governing this schema document</a>.
+     </p>
+    </div>
+   </div>
+  </xs:documentation>
+ </xs:annotation>
+
+ <xs:attribute name="lang">
+  <xs:annotation>
+   <xs:documentation>
+    <div>
+     
+      <h3>lang (as an attribute name)</h3>
+      <p>
+       denotes an attribute whose value
+       is a language code for the natural language of the content of
+       any element; its value is inherited.  This name is reserved
+       by virtue of its definition in the XML specification.</p>
+     
+    </div>
+    <div>
+     <h4>Notes</h4>
+     <p>
+      Attempting to install the relevant ISO 2- and 3-letter
+      codes as the enumerated possible values is probably never
+      going to be a realistic possibility.  
+     </p>
+     <p>
+      See BCP 47 at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">
+       http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a>
+      and the IANA language subtag registry at
+      <a href="http://www.iana.org/assignments/language-subtag-registry">
+       http://www.iana.org/assignments/language-subtag-registry</a>
+      for further information.
+     </p>
+     <p>
+      The union allows for the 'un-declaration' of xml:lang with
+      the empty string.
+     </p>
+    </div>
+   </xs:documentation>
+  </xs:annotation>
+  <xs:simpleType>
+   <xs:union memberTypes="xs:language">
+    <xs:simpleType>    
+     <xs:restriction base="xs:string">
+      <xs:enumeration value=""/>
+     </xs:restriction>
+    </xs:simpleType>
+   </xs:union>
+  </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="space">
+  <xs:annotation>
+   <xs:documentation>
+    <div>
+     
+      <h3>space (as an attribute name)</h3>
+      <p>
+       denotes an attribute whose
+       value is a keyword indicating what whitespace processing
+       discipline is intended for the content of the element; its
+       value is inherited.  This name is reserved by virtue of its
+       definition in the XML specification.</p>
+     
+    </div>
+   </xs:documentation>
+  </xs:annotation>
+  <xs:simpleType>
+   <xs:restriction base="xs:NCName">
+    <xs:enumeration value="default"/>
+    <xs:enumeration value="preserve"/>
+   </xs:restriction>
+  </xs:simpleType>
+ </xs:attribute>
+ 
+ <xs:attribute name="base" type="xs:anyURI"> <xs:annotation>
+   <xs:documentation>
+    <div>
+     
+      <h3>base (as an attribute name)</h3>
+      <p>
+       denotes an attribute whose value
+       provides a URI to be used as the base for interpreting any
+       relative URIs in the scope of the element on which it
+       appears; its value is inherited.  This name is reserved
+       by virtue of its definition in the XML Base specification.</p>
+     
+     <p>
+      See <a
+      href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a>
+      for information about this attribute.
+     </p>
+    </div>
+   </xs:documentation>
+  </xs:annotation>
+ </xs:attribute>
+ 
+ <xs:attribute name="id" type="xs:ID">
+  <xs:annotation>
+   <xs:documentation>
+    <div>
+     
+      <h3>id (as an attribute name)</h3> 
+      <p>
+       denotes an attribute whose value
+       should be interpreted as if declared to be of type ID.
+       This name is reserved by virtue of its definition in the
+       xml:id specification.</p>
+     
+     <p>
+      See <a
+      href="http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/</a>
+      for information about this attribute.
+     </p>
+    </div>
+   </xs:documentation>
+  </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="specialAttrs">
+  <xs:attribute ref="xml:base"/>
+  <xs:attribute ref="xml:lang"/>
+  <xs:attribute ref="xml:space"/>
+  <xs:attribute ref="xml:id"/>
+ </xs:attributeGroup>
+
+ <xs:annotation>
+  <xs:documentation>
+   <div>
+   
+    <h3>Father (in any context at all)</h3> 
+
+    <div class="bodytext">
+     <p>
+      denotes Jon Bosak, the chair of 
+      the original XML Working Group.  This name is reserved by 
+      the following decision of the W3C XML Plenary and 
+      XML Coordination groups:
+     </p>
+     <blockquote>
+       <p>
+	In appreciation for his vision, leadership and
+	dedication the W3C XML Plenary on this 10th day of
+	February, 2000, reserves for Jon Bosak in perpetuity
+	the XML name "xml:Father".
+       </p>
+     </blockquote>
+    </div>
+   </div>
+  </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+  <xs:documentation>
+   <div xml:id="usage" id="usage">
+    <h2><a name="usage">About this schema document</a></h2>
+
+    <div class="bodytext">
+     <p>
+      This schema defines attributes and an attribute group suitable
+      for use by schemas wishing to allow <code>xml:base</code>,
+      <code>xml:lang</code>, <code>xml:space</code> or
+      <code>xml:id</code> attributes on elements they define.
+     </p>
+     <p>
+      To enable this, such a schema must import this schema for
+      the XML namespace, e.g. as follows:
+     </p>
+     <pre>
+          &lt;schema . . .>
+           . . .
+           &lt;import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+     </pre>
+     <p>
+      or
+     </p>
+     <pre>
+           &lt;import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
+     </pre>
+     <p>
+      Subsequently, qualified reference to any of the attributes or the
+      group defined below will have the desired effect, e.g.
+     </p>
+     <pre>
+          &lt;type . . .>
+           . . .
+           &lt;attributeGroup ref="xml:specialAttrs"/>
+     </pre>
+     <p>
+      will define a type which will schema-validate an instance element
+      with any of those attributes.
+     </p>
+    </div>
+   </div>
+  </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+  <xs:documentation>
+   <div id="nsversioning" xml:id="nsversioning">
+    <h2><a name="nsversioning">Versioning policy for this schema document</a></h2>
+    <div class="bodytext">
+     <p>
+      In keeping with the XML Schema WG's standard versioning
+      policy, this schema document will persist at
+      <a href="http://www.w3.org/2009/01/xml.xsd">
+       http://www.w3.org/2009/01/xml.xsd</a>.
+     </p>
+     <p>
+      At the date of issue it can also be found at
+      <a href="http://www.w3.org/2001/xml.xsd">
+       http://www.w3.org/2001/xml.xsd</a>.
+     </p>
+     <p>
+      The schema document at that URI may however change in the future,
+      in order to remain compatible with the latest version of XML
+      Schema itself, or with the XML namespace itself.  In other words,
+      if the XML Schema or XML namespaces change, the version of this
+      document at <a href="http://www.w3.org/2001/xml.xsd">
+       http://www.w3.org/2001/xml.xsd 
+      </a> 
+      will change accordingly; the version at 
+      <a href="http://www.w3.org/2009/01/xml.xsd">
+       http://www.w3.org/2009/01/xml.xsd 
+      </a> 
+      will not change.
+     </p>
+     <p>
+      Previous dated (and unchanging) versions of this schema 
+      document are at:
+     </p>
+     <ul>
+      <li><a href="http://www.w3.org/2009/01/xml.xsd">
+	http://www.w3.org/2009/01/xml.xsd</a></li>
+      <li><a href="http://www.w3.org/2007/08/xml.xsd">
+	http://www.w3.org/2007/08/xml.xsd</a></li>
+      <li><a href="http://www.w3.org/2004/10/xml.xsd">
+	http://www.w3.org/2004/10/xml.xsd</a></li>
+      <li><a href="http://www.w3.org/2001/03/xml.xsd">
+	http://www.w3.org/2001/03/xml.xsd</a></li>
+     </ul>
+    </div>
+   </div>
+  </xs:documentation>
+ </xs:annotation>
+
+</xs:schema>
+
diff --git a/modules/export_seda/script/checkReply.sh b/modules/export_seda/script/checkReply.sh
old mode 100755
new mode 100644
index bdf3bad8a95091b70701886c9e693687fb64520e..c9217c3f98ea51b0ca66b784274743a1221ff658
--- a/modules/export_seda/script/checkReply.sh
+++ b/modules/export_seda/script/checkReply.sh
@@ -1,4 +1,4 @@
 #!/bin/sh
 path='/var/www/html/maarch_courrier'
 cd $path
-php  './modules/export_seda/batch/CheckAllReply.php'
\ No newline at end of file
+php  './modules/export_seda/batch/CheckAllReply.php' -c /var/www/html/maarch_courrier/modules/export_seda/batch/config/config.xml
diff --git a/modules/export_seda/script/purge.sh b/modules/export_seda/script/purge.sh
new file mode 100644
index 0000000000000000000000000000000000000000..ec603cc2ef27739e5430f890269cdb66b6880a0e
--- /dev/null
+++ b/modules/export_seda/script/purge.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+path='/var/www/html/maarch_courrier'
+cd $path
+php  './modules/export_seda/batch/BatchPurge.php' -c /var/www/html/maarch_courrier/modules/export_seda/batch/config/config.xml
\ No newline at end of file
diff --git a/modules/export_seda/xml/config.xml b/modules/export_seda/xml/config.xml
old mode 100755
new mode 100644
index 23af5be2b8c6d9b8f584fd2048644980758df2e3..ddb10efdd0d90a7d504c44b1cfce2e4cace49b6d
--- a/modules/export_seda/xml/config.xml
+++ b/modules/export_seda/xml/config.xml
@@ -9,7 +9,11 @@
         <token></token>
         <urlSAEService>http://srv-maarchrm-ap</urlSAEService>
         <urlSAE>http://maarchrm/transfer/sent</urlSAE>
+        <directoryMessage></directoryMessage>
+        <senderOrgRegNumber></senderOrgRegNumber>
+        <accessRuleCode></accessRuleCode>
         <deleteData>true</deleteData>
+        <certificateSSL></certificateSSL>
     </CONFIG>
     <TABLENAME/>
     <HISTORY>
@@ -17,4 +21,7 @@
         <sedaadd>true</sedaadd>
         <sedadel>true</sedadel>
     </HISTORY>
-</root>
\ No newline at end of file
+    <M2M>
+        <gec>maarch_courrier</gec>
+    </M2M>
+</root>
diff --git a/modules/export_seda/xml/config.xml.default b/modules/export_seda/xml/config.xml.default
old mode 100755
new mode 100644
index 23af5be2b8c6d9b8f584fd2048644980758df2e3..ddb10efdd0d90a7d504c44b1cfce2e4cace49b6d
--- a/modules/export_seda/xml/config.xml.default
+++ b/modules/export_seda/xml/config.xml.default
@@ -9,7 +9,11 @@
         <token></token>
         <urlSAEService>http://srv-maarchrm-ap</urlSAEService>
         <urlSAE>http://maarchrm/transfer/sent</urlSAE>
+        <directoryMessage></directoryMessage>
+        <senderOrgRegNumber></senderOrgRegNumber>
+        <accessRuleCode></accessRuleCode>
         <deleteData>true</deleteData>
+        <certificateSSL></certificateSSL>
     </CONFIG>
     <TABLENAME/>
     <HISTORY>
@@ -17,4 +21,7 @@
         <sedaadd>true</sedaadd>
         <sedadel>true</sedadel>
     </HISTORY>
-</root>
\ No newline at end of file
+    <M2M>
+        <gec>maarch_courrier</gec>
+    </M2M>
+</root>
diff --git a/modules/folder/class/class_modules_tools_Abstract.php b/modules/folder/class/class_modules_tools_Abstract.php
index 3af77e1fd66174a7715811a836cb90fae064b564..2ee8d79ab61195b437397a96ed9e0cbf3ee86b55 100755
--- a/modules/folder/class/class_modules_tools_Abstract.php
+++ b/modules/folder/class/class_modules_tools_Abstract.php
@@ -999,7 +999,7 @@ abstract class folder_Abstract extends request
 	{
 		$folders = array();
 		$db = new Database();
-		$stmt = $db->query('SELECT folders_system_id, folder_name, parent_id, folder_level FROM folders WHERE foldertype_id not in (100) AND status NOT IN (\'DEL\') AND parent_id = \''.$parent_id.'\' order by folder_id asc', array());
+		$stmt = $db->query('SELECT folders_system_id, folder_name, parent_id, folder_level FROM folders WHERE foldertype_id not in (100) AND status NOT IN (\'DEL\') AND parent_id = \''.$parent_id.'\' AND (destination IS NULL OR destination = ?) order by folder_id asc', array($_SESSION['user']['primaryentity']['id']));
 		while($row=$stmt->fetch(PDO::FETCH_ASSOC)){
 			$stmt3 = $db->query(
 				"SELECT count(folders_system_id) as total FROM folders WHERE foldertype_id not in (100) AND parent_id IN (".$row['folders_system_id'].")  AND status NOT IN ('DEL')"
diff --git a/modules/life_cycle/batch/scripts/purge_document.sh.default b/modules/life_cycle/batch/scripts/purge_document.sh.default
new file mode 100644
index 0000000000000000000000000000000000000000..5507fa1b42a22938827ae6c5aab3722287e3dc09
--- /dev/null
+++ b/modules/life_cycle/batch/scripts/purge_document.sh.default
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+path='/var/www/html/maarch_courrier/modules/life_cycle/batch'
+cd $path
+php  'process_purge.php' -c /var/www/html/maarch_courrier/modules/life_cycle/batch/config/config_purge.xml -coll "letterbox_coll"
\ No newline at end of file
diff --git a/modules/notifications/batch/basket_event_stack.php b/modules/notifications/batch/basket_event_stack.php
index 6b8f4c4b4826103850f3f139677ca8b96cf3ba10..912d3e48bd2f20f30c46151af6d13b1baecc62b4 100755
--- a/modules/notifications/batch/basket_event_stack.php
+++ b/modules/notifications/batch/basket_event_stack.php
@@ -14,287 +14,291 @@
 
 /* begin */
 // load the config and prepare to process
-include('load_basket_event_stack.php');
+include 'load_basket_event_stack.php';
 $state = 'LOAD_NOTIFICATIONS';
-while ($state <> 'END') {
+while ($state != 'END') {
     if (isset($logger)) {
-        $logger->write('STATE:' . $state, 'INFO');
+        $logger->write('STATE:'.$state, 'INFO');
     }
     switch ($state) {
- 
-    /**********************************************************************/
-    /*                          LOAD_NOTIFICATIONS                        */
-    /* Load notification defsidentified with notification id              */
-    /**********************************************************************/
-    case 'LOAD_NOTIFICATIONS':
-        $logger->write("Loading configuration for notification id " . $notificationId, 'INFO');
-        $notification = $notifications_controler->getByNotificationId($notificationId);
-        if ($notification === false) {
-            Bt_exitBatch(1, "Notification '".$notificationId."' not found");
-        }
-        if ($notification->is_enabled === 'N') {
-            Bt_exitBatch(100, "Notification '".$notificationId."' is disabled");
-        }
-        $state = 'ADD_EVENTS';
-        break;
-        
-    /**********************************************************************/
-    /*                          LOAD_EVENTS                               */
-    /* Checking if the stack has notifications to proceed                 */
-    /**********************************************************************/
-    case 'ADD_EVENTS':
-        $db       = new Database();
-        $secCtrl  = new SecurityControler();
-        $entities = new entities();
+        /**********************************************************************/
+        /*                          LOAD_NOTIFICATIONS                        */
+        /* Load notification defsidentified with notification id              */
+        /**********************************************************************/
+        case 'LOAD_NOTIFICATIONS':
+            $logger->write('Loading configuration for notification id '.$notificationId, 'INFO');
+            $notification = $notifications_controler->getByNotificationId($notificationId);
+            if ($notification === false) {
+                Bt_exitBatch(1, "Notification '".$notificationId."' not found");
+            }
+            if ($notification->is_enabled === 'N') {
+                Bt_exitBatch(100, "Notification '".$notificationId."' is disabled");
+            }
+            //Attach Mode ?
+            if (!empty($notification->attachfor_type) || $notification->attachfor_type != null) {
+                $attachMode = true;
+                $logger->write('The document will be attached for each recipient', 'INFO');
+            } else {
+                $attachMode = false;
+            }
+            $state = 'ADD_EVENTS';
+            break;
 
-        $stmt = $db->query("SELECT basket_id, except_notif, basket_clause FROM baskets WHERE flag_notif = 'Y'");
+        /**********************************************************************/
+        /*                          LOAD_EVENTS                               */
+        /* Checking if the stack has notifications to proceed                 */
+        /**********************************************************************/
+        case 'ADD_EVENTS':
+            $db = new Database();
+            $secCtrl = new SecurityControler();
+            $entities = new entities();
 
-        while ($line = $stmt->fetchObject()) {
-            $logger->write("BASKET: " . $line->basket_id . " in progess ...", 'INFO');
-            $exceptUsers[$line->basket_id] = array();
-            if ($line->except_notif != '' || $line->except_notif != null) {
-                $arrayExceptNotif = explode(',', $line->except_notif);
-                $exceptUsers[$line->basket_id]=$arrayExceptNotif;
-            }
-            $stmt2 = $db->query("SELECT group_id FROM groupbasket WHERE basket_id = ?", array($line->basket_id));
+            $stmt = $db->query("SELECT basket_id, except_notif, basket_clause FROM baskets WHERE flag_notif = 'Y'");
 
-            $u=1;
-            while ($line2 = $stmt2->fetchObject()) {
-                if ($notification->diffusion_type == "groups"){
-                    $recipients = array();
-                    $recipients = $diffusion_type_controler->getRecipients($notification, '');
-                    $aRecipients = [];
-                    foreach ($recipients as $itemRecipient) {
-                        array_push($aRecipients, $itemRecipient->user_id);
-                    }
-                    if(empty($aRecipients)){
-                        $aRecipients = "0=1";
-                    }
-                    $stmt3 = $db->query("SELECT usergroup_content.user_id,users.status FROM usergroup_content, users WHERE group_id = ? and users.status in ('OK') and usergroup_content.user_id=users.user_id and users.user_id in (?)", array($line2->group_id, $aRecipients));
-                } else {
-                    $stmt3 = $db->query("SELECT usergroup_content.user_id,users.status FROM usergroup_content, users WHERE group_id = ? and users.status in ('OK') and usergroup_content.user_id=users.user_id",array($line2->group_id));
+            while ($line = $stmt->fetchObject()) {
+                $logger->write('BASKET: '.$line->basket_id.' in progess ...', 'INFO');
+                $exceptUsers[$line->basket_id] = array();
+                if ($line->except_notif != '' || $line->except_notif != null) {
+                    $arrayExceptNotif = explode(',', $line->except_notif);
+                    $exceptUsers[$line->basket_id] = $arrayExceptNotif;
                 }
+                $stmt2 = $db->query('SELECT group_id FROM groupbasket WHERE basket_id = ?', array($line->basket_id));
 
-                $baskets_notif = array();
-                $rowCount3 = $stmt3->rowCount();
-                $logger->write("GROUP: " . $line2->group_id . " ... " . $rowCount3 . " user(s) to notify", 'INFO');
-                $z=1;
-                while ($line3 = $stmt3->fetchObject()) {
-                    $whereClause = $secCtrl->process_security_where_clause($line->basket_clause, $line3->user_id);
-                    $whereClause = $entities->process_where_clause($whereClause, $line3->user_id);
-                    $user_id = $line3->user_id;
-                    if ($line3->status == 'ABS') {
-                        $query    = "SELECT new_user FROM user_abs WHERE user_abs = ?";
-                        $testStmt = $db->query($query, array($line3->user_id));
-                        $abs_user = $testStmt->fetchObject();
-                        $user_id  = $abs_user->new_user;
+                $u = 1;
+                while ($line2 = $stmt2->fetchObject()) {
+                    if ($notification->diffusion_type == 'groups') {
+                        $recipients = array();
+                        $recipients = $diffusion_type_controler->getRecipients($notification, '');
+                        $aRecipients = [];
+                        foreach ($recipients as $itemRecipient) {
+                            array_push($aRecipients, $itemRecipient->user_id);
+                        }
+                        if (empty($aRecipients)) {
+                            $aRecipients = '0=1';
+                        }
+                        $stmt3 = $db->query("SELECT usergroup_content.user_id,users.status FROM usergroup_content, users WHERE group_id = ? and users.status in ('OK') and usergroup_content.user_id=users.user_id and users.user_id in (?)", array($line2->group_id, $aRecipients));
+                    } else {
+                        $stmt3 = $db->query("SELECT usergroup_content.user_id,users.status FROM usergroup_content, users WHERE group_id = ? and users.status in ('OK') and usergroup_content.user_id=users.user_id", array($line2->group_id));
                     }
-                        
-                    $stmt4 = $db->query("SELECT res_id FROM res_view_letterbox ".$whereClause);
-                    if(!empty($stmt4)){
-                        $userNbDoc = $stmt4->rowCount();
-                        $logger->write($userNbDoc . " document(s) to process for ".$line3->user_id, 'INFO');
-                        $i=1;
-                        $info = "Notification [".$line->basket_id."] pour ".$line3->user_id;
-                        $stmt6 = $db->query("SELECT record_id FROM notif_event_stack WHERE event_info = ? and user_id = ?", array($info, $line3->user_id));
-                        $aRecordId = [];
-                        while($line6 = $stmt6->fetchObject()){
-                            $aRecordId[$line6->record_id] = $line6->record_id;
+
+                    $baskets_notif = array();
+                    $rowCount3 = $stmt3->rowCount();
+                    $logger->write('GROUP: '.$line2->group_id.' ... '.$rowCount3.' user(s) to notify', 'INFO');
+                    $z = 1;
+                    while ($line3 = $stmt3->fetchObject()) {
+                        $whereClause = $secCtrl->process_security_where_clause($line->basket_clause, $line3->user_id);
+                        $whereClause = $entities->process_where_clause($whereClause, $line3->user_id);
+                        $user_id = $line3->user_id;
+                        if ($line3->status == 'ABS') {
+                            $query = 'SELECT new_user FROM user_abs WHERE user_abs = ?';
+                            $testStmt = $db->query($query, array($line3->user_id));
+                            $abs_user = $testStmt->fetchObject();
+                            $user_id = $abs_user->new_user;
                         }
-                        $queryValues = "";
-                        while ($line4 = $stmt4->fetchObject()) {
-                            echo "DOCUMENT " . $i . "/" . $userNbDoc . " for USER " . $z . "/" . $rowCount3." and GROUP ".$u."/".$stmt2->rowCount()."\n";
-                            if (empty($aRecordId[$line4->res_id])) {
-                                $queryValues .= "('res_letterbox','500','".$line4->res_id."','".$user_id."','".$info."',CURRENT_DATE),";
-                                preg_match_all('#\[(\w+)]#', $info, $result);
-                                $basket_id = $result[1];
-                                if (!in_array($basket_id[0], $baskets_notif)) {
-                                    $baskets_notif[] = $basket_id[0];
+
+                        $stmt4 = $db->query('SELECT res_id FROM res_view_letterbox '.$whereClause);
+                        if (!empty($stmt4)) {
+                            $userNbDoc = $stmt4->rowCount();
+                            $logger->write($userNbDoc.' document(s) to process for '.$line3->user_id, 'INFO');
+                            $i = 1;
+                            $info = 'Notification ['.$line->basket_id.'] pour '.$line3->user_id;
+                            $stmt6 = $db->query('SELECT record_id FROM notif_event_stack WHERE event_info = ? and user_id = ?', array($info, $line3->user_id));
+                            $aRecordId = [];
+                            while ($line6 = $stmt6->fetchObject()) {
+                                $aRecordId[$line6->record_id] = $line6->record_id;
+                            }
+                            $queryValues = '';
+                            while ($line4 = $stmt4->fetchObject()) {
+                                echo 'DOCUMENT '.$i.'/'.$userNbDoc.' for USER '.$z.'/'.$rowCount3.' and GROUP '.$u.'/'.$stmt2->rowCount()."\n";
+                                if (empty($aRecordId[$line4->res_id])) {
+                                    $queryValues .= "('res_letterbox','500','".$line4->res_id."','".$user_id."','".$info."',CURRENT_DATE),";
+                                    preg_match_all('#\[(\w+)]#', $info, $result);
+                                    $basket_id = $result[1];
+                                    if (!in_array($basket_id[0], $baskets_notif)) {
+                                        $baskets_notif[] = $basket_id[0];
+                                    }
                                 }
+                                ++$i;
+                            }
+                            if (!empty($queryValues)) {
+                                $db->query('INSERT INTO notif_event_stack (table_name, notification_sid, record_id, user_id, event_info, event_date) VALUES '.substr($queryValues, 0, -1));
                             }
-                            $i++;
-                        }
-                        if(!empty($queryValues)){
-                            $db->query("INSERT INTO notif_event_stack (table_name, notification_sid, record_id, user_id, event_info, event_date) VALUES " . substr($queryValues, 0, -1));
                         }
+                        ++$z;
                     }
-                    $z++;
+                    ++$u;
                 }
-                $u++;
             }
-        }
-        $logger->write("Scanning events for notification sid " . $notification->notification_sid, 'INFO');
-        $events = $events_controler->getEventsByNotificationSid('500');
-        $totalEventsToProcess = count($events);
-        $currentEvent = 0;
-        if ($totalEventsToProcess === 0) {
-            Bt_exitBatch(0, 'No event to process');
-        }
-        $logger->write($totalEventsToProcess . ' event(s) to scan', 'INFO');
-        $tmpNotifs = array();
-        $state = 'SCAN_EVENT';
-        break;
-        
-    /**********************************************************************/
-    /*                  MERGE_EVENT                                       */
-    /* Process event stack to get recipients                              */
-    /**********************************************************************/
-    case 'SCAN_EVENT':
-        $i = 1;
-        
-        foreach ($events as $event) {
-            $logger->write("scanning EVENT : " .$i."/".$totalEventsToProcess." (BASKET => ".$basket_id[0].", DOCUMENT => ".$res_id.", RECIPIENT => ".$user_id.")", 'INFO');
-            preg_match_all('#\[(\w+)]#', $event->event_info, $result);
-            $basket_id = $result[1];
-            //$logger->write("Basket => " .$basket_id[0], 'INFO');
-
-            // Diffusion type specific res_id
-            $res_id = false;
-            if ($event->table_name == $coll_table || $event->table_name == $coll_view) {
-                $res_id = $event->record_id;
-            } else {
-                $res_id = $diffusion_type_controler->getResId($notification, $event);
+            $logger->write('Scanning events for notification sid '.$notification->notification_sid, 'INFO');
+            $events = $events_controler->getEventsByNotificationSid('500');
+            $totalEventsToProcess = count($events);
+            $currentEvent = 0;
+            if ($totalEventsToProcess === 0) {
+                Bt_exitBatch(0, 'No event to process');
             }
-            $event->res_id = $res_id;
-        
-            //$logger->write('Document => ' . $res_id, 'INFO');
-            $user_id = $event->user_id;
-            //$logger->write('Recipient => ' . $user_id, 'INFO');
+            $logger->write($totalEventsToProcess.' event(s) to scan', 'INFO');
+            $tmpNotifs = array();
+            $state = 'SCAN_EVENT';
+            break;
+
+        /**********************************************************************/
+        /*                  MERGE_EVENT                                       */
+        /* Process event stack to get recipients                              */
+        /**********************************************************************/
+        case 'SCAN_EVENT':
+            $i = 1;
+
+            foreach ($events as $event) {
+                $logger->write('scanning EVENT : '.$i.'/'.$totalEventsToProcess.' (BASKET => '.$basket_id[0].', DOCUMENT => '.$res_id.', RECIPIENT => '.$user_id.')', 'INFO');
+                preg_match_all('#\[(\w+)]#', $event->event_info, $result);
+                $basket_id = $result[1];
+                //$logger->write("Basket => " .$basket_id[0], 'INFO');
+
+                // Diffusion type specific res_id
+                $res_id = false;
+                if ($event->table_name == $coll_table || $event->table_name == $coll_view) {
+                    $res_id = $event->record_id;
+                } else {
+                    $res_id = $diffusion_type_controler->getResId($notification, $event);
+                }
+                $event->res_id = $res_id;
+
+                //$logger->write('Document => ' . $res_id, 'INFO');
+                $user_id = $event->user_id;
+                //$logger->write('Recipient => ' . $user_id, 'INFO');
+
+                if (!isset($tmpNotifs[$user_id])) {
+                    $query = 'SELECT * FROM users WHERE user_id = ?';
+                    $arrayPDO = array($user_id);
+                    $stmt = $db->query($query, $arrayPDO);
+                    $tmpNotifs[$user_id]['recipient'] = $stmt->fetchObject();
+                    //$tmpNotifs[$user_id]['recipient'] = $user_id;
+                }
+                preg_match_all('#\[(\w+)]#', $event->event_info, $result);
+                $basket_id = $result[1];
+                $tmpNotifs[$user_id]['baskets'][$basket_id[0]]['events'][] = $event;
 
-            if (!isset($tmpNotifs[$user_id])) {
-                $query    = "SELECT * FROM users WHERE user_id = ?";
-                $arrayPDO = array($user_id);
-                $stmt     = $db->query($query, $arrayPDO);
-                $tmpNotifs[$user_id]['recipient'] = $stmt->fetchObject();
-                //$tmpNotifs[$user_id]['recipient'] = $user_id;
-                $tmpNotifs[$user_id]['attach'] = $diffusion_type_controler->getAttachFor($notification, $user_id);
-                //$logger->write('Checking if attachment required for ' . $user_id . ': ' . $tmpNotifs[$user_id]['attach'], 'INFO');
+                ++$i;
             }
-            preg_match_all('#\[(\w+)]#', $event->event_info, $result);
-            $basket_id = $result[1];
-            $tmpNotifs[$user_id]['baskets'][$basket_id[0]]['events'][] = $event;
+            $totalNotificationsToProcess = count($tmpNotifs);
+            $logger->write($totalNotificationsToProcess.' notifications to process', 'INFO');
+
+        /**********************************************************************/
+        /*                      FILL_EMAIL_STACK                              */
+        /* Merge template and fill notif_email_stack                          */
+        /**********************************************************************/
+            $logger->write('STATE:MERGE NOTIF', 'INFO');
+            $i = 1;
+            foreach ($tmpNotifs as $user_id => $tmpNotif) {
+                foreach ($tmpNotif['baskets'] as $key => $basket_list) {
+                    $basketId = $key;
+                    $stmt6 = $db->query('SELECT basket_name FROM baskets WHERE basket_id = ?', array($key));
+                    $line6 = $stmt6->fetchObject();
+                    $subject = $line6->basket_name;
+
+                    // Merge template with data and style
+                    $logger->write('generate e-mail '.$i.'/'.$totalNotificationsToProcess.' (TEMPLATE =>'.$notification->template_id.', SUBJECT => '.$subject.', RECIPIENT => '.$user_id.', DOCUMENT(S) => '.count($basket_list['events']), 'INFO');
 
-        $i++;
-        }
-        $totalNotificationsToProcess = count($tmpNotifs);
-        $logger->write($totalNotificationsToProcess .' notifications to process', 'INFO');
+                    //$logger->write('Merging template #' . $notification->template_id
+                    //    . ' to basket '.$subject.' for user ' . $user_id . ' ('.count($basket_list['events']).' documents)', 'INFO');
 
-    /**********************************************************************/
-    /*                      FILL_EMAIL_STACK                              */
-    /* Merge template and fill notif_email_stack                          */
-    /**********************************************************************/
-        $logger->write('STATE:MERGE NOTIF', 'INFO');
-        $i=1;
-        foreach ($tmpNotifs as $user_id => $tmpNotif) {
-            foreach ($tmpNotif['baskets'] as $key => $basket_list) {
-                $basketId = $key;
-                $stmt6    = $db->query("SELECT basket_name FROM baskets WHERE basket_id = ?", array($key));
-                $line6    = $stmt6->fetchObject();
-                $subject  = $line6->basket_name;
-            
-                // Merge template with data and style
-                $logger->write('generate e-mail '.$i.'/'.$totalNotificationsToProcess.' (TEMPLATE =>' . $notification->template_id .', SUBJECT => '.$subject.', RECIPIENT => '.$user_id.', DOCUMENT(S) => '.count($basket_list['events']), 'INFO');
+                    $params = array(
+                        'recipient' => $tmpNotif['recipient'],
+                        'events' => $basket_list['events'],
+                        'notification' => $notification,
+                        'maarchUrl' => $maarchUrl,
+                        'maarchApps' => $maarchApps,
+                        'coll_id' => $coll_id,
+                        'res_table' => $coll_table,
+                        'res_view' => $coll_view,
+                    );
+                    $html = $templates_controler->merge($notification->template_id, $params, 'content');
 
-                //$logger->write('Merging template #' . $notification->template_id
-                //    . ' to basket '.$subject.' for user ' . $user_id . ' ('.count($basket_list['events']).' documents)', 'INFO');
-                
-                $params = array(
-                    'recipient'    => $tmpNotif['recipient'],
-                    'events'       => $basket_list['events'],
-                    'notification' => $notification,
-                    'maarchUrl'    => $maarchUrl,
-                    'maarchApps'   => $maarchApps,
-                    'coll_id'      => $coll_id,
-                    'res_table'    => $coll_table,
-                    'res_view'     => $coll_view
-                );
-                $html = $templates_controler->merge($notification->template_id, $params, 'content');
-           
-                if (strlen($html) === 0) {
-                    foreach ($tmpNotif['events'] as $event) {
-                        $events_controler->commitEvent($event->event_stack_sid, "FAILED: Error when merging template");
+                    if (strlen($html) === 0) {
+                        foreach ($tmpNotif['events'] as $event) {
+                            $events_controler->commitEvent($event->event_stack_sid, 'FAILED: Error when merging template');
+                        }
+                        Bt_exitBatch(8, 'Could not merge template with the data');
                     }
-                    Bt_exitBatch(8, "Could not merge template with the data");
-                }
-            
-                // Prepare e-mail for stack
-                $sender         = (string)$mailerParams->mailfrom;
-                $recipient_mail = $tmpNotif['recipient']->mail;
 
-                //$subject = $notification->description;
-                $html = $func->protect_string_db($html, '', 'no');
-                $html = str_replace('&amp;', '&', $html);
-                $html = str_replace('&', '#and#', $html);
-                
-                // Attachments
-                $attachments = array();
-                if ($tmpNotif['attach']) {
-                    $logger->write('Adding attachments', 'INFO');
-                    foreach ($basket_list['events'] as $event) {
-                        // Check if event is related to document in collection
-                        if ($event->res_id != '') {
-                            $query = "SELECT "
-                                . "ds.path_template ,"
-                                . "mlb.path, "
-                                . "mlb.filename "
-                                . "FROM ".$coll_view." mlb LEFT JOIN docservers ds ON mlb.docserver_id = ds.docserver_id "
-                                . "WHERE mlb.res_id = ?";
-                            $stmt          = Bt_doQuery($db, $query, array($event->res_id));
-                            $path_parts    = $stmt->fetchObject();
-                            $path          = $path_parts->path_template . str_replace('#', '/', $path_parts->path) . $path_parts->filename;
-                            $path          = str_replace('//', '/', $path);
-                            $path          = str_replace('\\', '/', $path);
-                            $attachments[] = $path;
+                    // Prepare e-mail for stack
+                    $sender = (string) $mailerParams->mailfrom;
+                    $recipient_mail = $tmpNotif['recipient']->mail;
+
+                    //$subject = $notification->description;
+                    $html = $func->protect_string_db($html, '', 'no');
+                    $html = str_replace('&amp;', '&', $html);
+                    $html = str_replace('&', '#and#', $html);
+
+                    // Attachments
+                    $attachments = array();
+                    if ($attachMode) {
+                        $logger->write('Adding attachments', 'INFO');
+                        foreach ($basket_list['events'] as $event) {
+                            // Check if event is related to document in collection
+                            if ($event->res_id != '') {
+                                $query = 'SELECT '
+                                    .'ds.path_template ,'
+                                    .'mlb.path, '
+                                    .'mlb.filename '
+                                    .'FROM '.$coll_view.' mlb LEFT JOIN docservers ds ON mlb.docserver_id = ds.docserver_id '
+                                    .'WHERE mlb.res_id = ?';
+                                $stmt = Bt_doQuery($db, $query, array($event->res_id));
+                                $path_parts = $stmt->fetchObject();
+                                $path = $path_parts->path_template.str_replace('#', '/', $path_parts->path).$path_parts->filename;
+                                $path = str_replace('//', '/', $path);
+                                $path = str_replace('\\', '/', $path);
+                                $attachments[] = $path;
+                            }
                         }
+                        $logger->write(count($attachments).' attachment(s) added', 'INFO');
                     }
-                    $logger->write(count($attachments) . ' attachment(s) added', 'INFO');
-                }
-                if (in_array($user_id, $exceptUsers[$basketId])) {
-                    $logger->write('Notification disabled for '.$user_id, 'WARNING');
-                } else {
-                    $logger->write('... adding e-mail to email stack', 'INFO');
-                    if ($_SESSION['config']['databasetype'] == 'ORACLE') {
-                        $query = "DECLARE
-                                  vString notif_email_stack.html_body%type;
-                                BEGIN
-                                  vString := '" . $html ."';
-                                  INSERT INTO " . _NOTIF_EMAIL_STACK_TABLE_NAME . "
-                                  (sender, recipient, subject, html_body, charset, attachments, module) 
-                                  VALUES (?, ?, ?, vString, ?, '".implode(',', $attachments)."', 'notifications');
-                                END;";
-                        $arrayPDO = array($sender, $recipient_mail, $subject, $mailerParams->charset);
+                    if (in_array($user_id, $exceptUsers[$basketId])) {
+                        $logger->write('Notification disabled for '.$user_id, 'WARNING');
                     } else {
-                        if (count($attachments) > 0) {
-                            $query = "INSERT INTO " . _NOTIF_EMAIL_STACK_TABLE_NAME
-                            . " (sender, recipient, subject, html_body, charset, attachments, module) "
-                            . "VALUES (?, ?, ?, ?, ?, '".implode(',', $attachments)."', 'notifications')";
+                        $logger->write('... adding e-mail to email stack', 'INFO');
+                        if ($_SESSION['config']['databasetype'] == 'ORACLE') {
+                            $query = "DECLARE
+                                    vString notif_email_stack.html_body%type;
+                                    BEGIN
+                                    vString := '".$html."';
+                                    INSERT INTO "._NOTIF_EMAIL_STACK_TABLE_NAME."
+                                    (sender, recipient, subject, html_body, charset, attachments, module) 
+                                    VALUES (?, ?, ?, vString, ?, '".implode(',', $attachments)."', 'notifications');
+                                    END;";
+                            $arrayPDO = array($sender, $recipient_mail, $subject, $mailerParams->charset);
                         } else {
-                            $query = "INSERT INTO " . _NOTIF_EMAIL_STACK_TABLE_NAME
-                            . " (sender, recipient, subject, html_body, charset, module) "
-                            . "VALUES (?, ?, ?, ?, ?, 'notifications')";
+                            if (count($attachments) > 0) {
+                                $query = 'INSERT INTO '._NOTIF_EMAIL_STACK_TABLE_NAME
+                                .' (sender, recipient, subject, html_body, charset, attachments, module) '
+                                ."VALUES (?, ?, ?, ?, ?, '".implode(',', $attachments)."', 'notifications')";
+                            } else {
+                                $query = 'INSERT INTO '._NOTIF_EMAIL_STACK_TABLE_NAME
+                                .' (sender, recipient, subject, html_body, charset, module) '
+                                ."VALUES (?, ?, ?, ?, ?, 'notifications')";
+                            }
+                            $arrayPDO = array($sender, $recipient_mail, $subject, $html, $mailerParams->charset);
                         }
-                        $arrayPDO = array($sender, $recipient_mail, $subject, $html, $mailerParams->charset);
-                    }
 
-                    $db->query($query, $arrayPDO);
-                }
-                foreach ($basket_list['events'] as $event) {
-                    if (in_array($event->user_id, $exceptUsers[$basketId])) {
-                        $events_controler->commitEvent($event->event_stack_sid, "WARNING : Notification disabled for ".$event->user_id);
-                    } else {
-                        $events_controler->commitEvent($event->event_stack_sid, "SUCCESS");
+                        $db->query($query, $arrayPDO);
+                    }
+                    foreach ($basket_list['events'] as $event) {
+                        if (in_array($event->user_id, $exceptUsers[$basketId])) {
+                            $events_controler->commitEvent($event->event_stack_sid, 'WARNING : Notification disabled for '.$event->user_id);
+                        } else {
+                            $events_controler->commitEvent($event->event_stack_sid, 'SUCCESS');
+                        }
                     }
                 }
+                ++$i;
             }
-            $i++;
-        }
-        $state = 'END';
+            $state = 'END';
     }
 }
 
 //clean tmp directory
 echo "clean tmp path ....\n";
-array_map('unlink', glob($_SESSION['config']['tmppath']."/*.html"));
+array_map('unlink', glob($_SESSION['config']['tmppath'].'/*.html'));
 
 $logger->write('End of process', 'INFO');
 Bt_logInDataBase(
diff --git a/modules/notifications/batch/process_event_stack.php b/modules/notifications/batch/process_event_stack.php
index e403618a6d527f53fba4c8515e371e8afcba720e..7078dcaccea38f42bd5a372e1889d6adaaf67e88 100755
--- a/modules/notifications/batch/process_event_stack.php
+++ b/modules/notifications/batch/process_event_stack.php
@@ -3,300 +3,268 @@
  BATCH PROCESS EVENT STACK
 
  Processes events from table event_stack
- 
- 1 - Groups events by 
+
+ 1 - Groups events by
     * Recipient
     * Event
 
  2 - Merge template for each recipient / event
- 
+
  3 - Prepare e-mail and add to e-mail stack
- 
+
 ******************************************************************************/
 
 /* begin */
 // load the config and prepare to process
-include('load_process_event_stack.php');
+include 'load_process_event_stack.php';
 $state = 'LOAD_NOTIFICATIONS';
-while ($state <> 'END') {
+while ($state != 'END') {
     if (isset($logger)) {
-        $logger->write('STATE:' . $state, 'INFO');
+        $logger->write('STATE:'.$state, 'INFO');
     }
     switch ($state) {
- 
-    /**********************************************************************/
-    /*                          LOAD_NOTIFICATIONS                        */
-    /* Load notification defsidentified with notification id              */
-    /**********************************************************************/
-    case 'LOAD_NOTIFICATIONS' :
-        $logger->write("Loading configuration for notification id " . $notificationId, 'INFO');
-        $notification = $notifications_controler->getByNotificationId($notificationId);
-        if ($notification === FALSE) {
-            Bt_exitBatch(1, "Notification '".$notificationId."' not found");
-        }
-        if ($notification->is_enabled === 'N') {
-            Bt_exitBatch(100, "Notification '".$notificationId."' is disabled");
-        }
-        $state = 'LOAD_EVENTS';
-        break;
-        
-    /**********************************************************************/
-    /*                          LOAD_EVENTS                               */
-    /* Checking if the stack has notifications to proceed                 */
-    /**********************************************************************/
-    case 'LOAD_EVENTS' :
-        $logger->write("Loading events for notification sid " . $notification->notification_sid, 'INFO');
-        $events = $events_controler->getEventsByNotificationSid($notification->notification_sid);
-        $totalEventsToProcess = count($events);
-        $currentEvent = 0;
-        if ($totalEventsToProcess === 0) {
-            Bt_exitBatch(0, 'No event to process');
-        }
-        $logger->write($totalEventsToProcess . ' events to process', 'INFO');
-        $tmpNotifs = array();
-        $state = 'MERGE_EVENT';
-        break;
-        
-    /**********************************************************************/
-    /*                  MERGE_EVENT                                       */
-    /* Process event stack to get recipients                              */
-    /**********************************************************************/
-    case 'MERGE_EVENT' :
-        foreach($events as $event) {
-            $logger->write("Getting recipients using diffusion type '" .$notification->diffusion_type . "'", 'INFO');
-            // Diffusion type specific recipients
-            $recipients = array();
-            $recipients = $diffusion_type_controler->getRecipients($notification, $event);
-            // Diffusion type specific res_id
-            $logger->write("Getting document ids using diffusion type '" .$notification->diffusion_type . "'", 'INFO');
-            $res_id = false;
-            if($event->table_name == $coll_table || $event->table_name == $coll_view) {
-                $res_id = $event->record_id;
-            } else {
-                $res_id = $diffusion_type_controler->getResId($notification, $event);
-            } 
-            $event->res_id = $res_id;
-            
-            $nbRecipients = count($recipients);
-            
-            $logger->write($nbRecipients .' recipients found, checking active and absences', 'INFO');
-
-            if ($notification->diffusion_type === 'dest_entity') {
+        /**********************************************************************/
+        /*                          LOAD_NOTIFICATIONS                        */
+        /* Load notification defsidentified with notification id              */
+        /**********************************************************************/
+        case 'LOAD_NOTIFICATIONS':
+            $logger->write('Loading configuration for notification id '.$notificationId, 'INFO');
+            $notification = $notifications_controler->getByNotificationId($notificationId);
+            if ($notification === false) {
+                Bt_exitBatch(1, "Notification '".$notificationId."' not found");
+            }
+            if ($notification->is_enabled === 'N') {
+                Bt_exitBatch(100, "Notification '".$notificationId."' is disabled");
+            }
+            $state = 'LOAD_EVENTS';
+            break;
 
-                for($i=0; $i<$nbRecipients; $i++) {
-                    $recipient = $recipients[$i];
-                    $entity_id = $recipient->entity_id;
-                    $logger->write('Recipient entity ' . $entity_id, 'INFO');
+        /**********************************************************************/
+        /*                          LOAD_EVENTS                               */
+        /* Checking if the stack has notifications to proceed                 */
+        /**********************************************************************/
+        case 'LOAD_EVENTS':
+            $logger->write('Loading events for notification sid '.$notification->notification_sid, 'INFO');
+            $events = $events_controler->getEventsByNotificationSid($notification->notification_sid);
+            $totalEventsToProcess = count($events);
+            $currentEvent = 0;
+            if ($totalEventsToProcess === 0) {
+                Bt_exitBatch(0, 'No event to process');
+            }
+            $logger->write($totalEventsToProcess.' events to process', 'INFO');
+            $tmpNotifs = array();
+            $state = 'MERGE_EVENT';
+            break;
 
-                    $db = new Database();
-                    $query = 'SELECT param_value_int FROM parameters WHERE id = ?';
-                    $stmt = $db -> query($query, array('user_quota'));
-                    if(($recipient->enabled == 'N' AND $stmt -> fetchColumn() == 0) || $recipient->mail == '') {
-                        $logger->write($entity_id .' is disabled or mail is invalid, this notification will not be send', 'INFO');
-                        unset($recipients[$i]);
-                        continue;
-                    }
+        /**********************************************************************/
+        /*                  MERGE_EVENT                                       */
+        /* Process event stack to get recipients                              */
+        /**********************************************************************/
+        case 'MERGE_EVENT':
+            foreach ($events as $event) {
+                $logger->write("Getting recipients using diffusion type '".$notification->diffusion_type."'", 'INFO');
+                // Diffusion type specific recipients
+                $recipients = array();
+                $recipients = $diffusion_type_controler->getRecipients($notification, $event);
+                // Diffusion type specific res_id
+                $logger->write("Getting document ids using diffusion type '".$notification->diffusion_type."'", 'INFO');
+                $res_id = false;
+                if ($event->table_name == $coll_table || $event->table_name == $coll_view) {
+                    $res_id = $event->record_id;
+                } else {
+                    $res_id = $diffusion_type_controler->getResId($notification, $event);
+                }
+                $event->res_id = $res_id;
 
-                    if(!isset($tmpNotifs[$entity_id])) {
-                        $tmpNotifs[$entity_id]['recipient'] = $recipient;
-                        $tmpNotifs[$entity_id]['attach'] = $diffusion_type_controler->getAttachFor($notification, $entity_id);
-                        $logger->write('Checking if attachment required for ' . $entity_id . ': ' . $tmpNotifs[$entity_id]['attach'], 'INFO');
-                    }
-                    $tmpNotifs[$entity_id]['events'][] = $event;
+                //Attach Mode ?
+                if (!empty($notification->attachfor_type) || $notification->attachfor_type != null) {
+                    $attachMode = true;
+                    $logger->write('The document will be attached for each recipient', 'INFO');
+                } else {
+                    $attachMode = false;
                 }
 
-            } else {
+                $nbRecipients = count($recipients);
 
-                for($i=0; $i<$nbRecipients; $i++) {
-                    $recipient = $recipients[$i];
-                    $user_id = $recipient->user_id;
-                    $logger->write('Recipient ' . $user_id, 'INFO');
+                $logger->write($nbRecipients.' recipients found, checking active and absences', 'INFO');
 
-                    $db = new Database();
-                    $query = 'SELECT param_value_int FROM parameters WHERE id = ?';
-                    $stmt = $db -> query($query, array('user_quota'));
-                    if(($recipient->enabled == 'N' AND $stmt -> fetchColumn() == 0) || $recipient->status == 'DEL') {
-                        $logger->write($user_id .' is disabled or deleted, this notification will not be send', 'INFO');
-                        unset($recipients[$i]);
-                        continue;
-                    }
+                if ($notification->diffusion_type === 'dest_entity') {
+                    for ($i = 0; $i < $nbRecipients; ++$i) {
+                        $recipient = $recipients[$i];
+                        $entity_id = $recipient->entity_id;
+                        $logger->write('Recipient entity '.$entity_id, 'INFO');
 
-                    if($recipient->status == 'ABS') {
-                        $logger->write($user_id .' is absent, routing to replacent', 'INFO');
-                        unset($recipients[$i]);
-                        $query = "SELECT us.* FROM users us"
-                            . " JOIN user_abs abs ON us.user_id = abs.new_user "
-                            . " WHERE abs.user_abs = ? AND us.enabled='Y'";
-                        $dbAbs = new Database();
-                        $stmt = $dbAbs->query($query, array($user_id));
-                        if($stmt->rowCount() > 0) {
-                            //$recipient = $dbAbs->fetchObject($user_id);
-                            $recipient = $stmt->fetchObject();
-                            $user_id = $recipient->user_id;
-                            $logger->write($user_id .' is the replacent', 'INFO');
-                            $recipients[] = $recipient;
-                        } else {
-                            $logger->write('No replacent found (probably disabled)', 'INFO');
+                        $db = new Database();
+                        $query = 'SELECT param_value_int FROM parameters WHERE id = ?';
+                        $stmt = $db -> query($query, array('user_quota'));
+                        if (($recipient->enabled == 'N' AND $stmt -> fetchColumn() == 0) || $recipient->mail == '') {
+                            $logger->write($entity_id.' is disabled or mail is invalid, this notification will not be send', 'INFO');
+                            unset($recipients[$i]);
                             continue;
                         }
+
+                        if (!isset($tmpNotifs[$entity_id])) {
+                            $tmpNotifs[$entity_id]['recipient'] = $recipient;
+                        }
+                        $tmpNotifs[$entity_id]['events'][] = $event;
                     }
-                    if(!isset($tmpNotifs[$user_id])) {
-                        $tmpNotifs[$user_id]['recipient'] = $recipient;
-                        $tmpNotifs[$user_id]['attach'] = $diffusion_type_controler->getAttachFor($notification, $user_id);
-                        $logger->write('Checking if attachment required for ' . $user_id . ': ' . $tmpNotifs[$user_id]['attach'], 'INFO');
+                } else {
+                    for ($i = 0; $i < $nbRecipients; ++$i) {
+                        $recipient = $recipients[$i];
+                        $user_id = $recipient->user_id;
+                        $logger->write('Recipient '.$user_id, 'INFO');
+
+                        $db = new Database();
+                        $query = 'SELECT param_value_int FROM parameters WHERE id = ?';
+                        $stmt = $db -> query($query, array('user_quota'));
+                        if (($recipient->enabled == 'N' AND $stmt -> fetchColumn() == 0) || $recipient->status == 'DEL') {
+                            $logger->write($user_id.' is disabled or deleted, this notification will not be send', 'INFO');
+                            unset($recipients[$i]);
+                            continue;
+                        }
+
+                        if ($recipient->status == 'ABS') {
+                            $logger->write($user_id.' is absent, routing to replacent', 'INFO');
+                            unset($recipients[$i]);
+                            $query = 'SELECT us.* FROM users us'
+                                .' JOIN user_abs abs ON us.user_id = abs.new_user '
+                                ." WHERE abs.user_abs = ? AND us.enabled='Y'";
+                            $dbAbs = new Database();
+                            $stmt = $dbAbs->query($query, array($user_id));
+                            if ($stmt->rowCount() > 0) {
+                                //$recipient = $dbAbs->fetchObject($user_id);
+                                $recipient = $stmt->fetchObject();
+                                $user_id = $recipient->user_id;
+                                $logger->write($user_id.' is the replacent', 'INFO');
+                                $recipients[] = $recipient;
+                            } else {
+                                $logger->write('No replacent found (probably disabled)', 'INFO');
+                                continue;
+                            }
+                        }
+                        if (!isset($tmpNotifs[$user_id])) {
+                            $tmpNotifs[$user_id]['recipient'] = $recipient;
+                        }
+                        $tmpNotifs[$user_id]['events'][] = $event;
                     }
-                    $tmpNotifs[$user_id]['events'][] = $event;
                 }
 
+                if (count($recipients) === 0) {
+                    $logger->write('No recipient found', 'WARNING');
+                    $events_controler->commitEvent($event->event_stack_sid, 'INFO: no recipient found');
+                }
+            }
+            $totalNotificationsToProcess = count($tmpNotifs);
+            $logger->write($totalNotificationsToProcess.' notifications to process', 'INFO');
+            switch ($notification->notification_mode) {
+                case 'EMAIL':
+                    $state = 'FILL_EMAIL_STACK';
+                    break;
+                case 'RSS':
+                    $state = 'FILL_RSS_STACK';
+                    break;
             }
-
-            if (count($recipients) === 0) {
-                $logger->write('No recipient found' , 'WARNING');
-                $events_controler->commitEvent($event->event_stack_sid, "INFO: no recipient found");
-            }            
-        } 
-        $totalNotificationsToProcess = count($tmpNotifs);
-        $logger->write($totalNotificationsToProcess .' notifications to process', 'INFO');
-        switch($notification->notification_mode) {
-        case 'EMAIL':
-            $state = 'FILL_EMAIL_STACK';
-            break;
-        case 'RSS':
-            $state = 'FILL_RSS_STACK';
             break;
-        }
-        break;
-        
-    /**********************************************************************/
-    /*                      FILL_EMAIL_STACK                              */
-    /* Merge template and fill notif_email_stack                          */
-    /**********************************************************************/
-    case 'FILL_EMAIL_STACK' :
-        foreach($tmpNotifs as $user_id => $tmpNotif) {
-            // Merge template with data and style
-            $logger->write('Merging template #' . $notification->template_id 
-                . ' ('.count($tmpNotif['events']).' events) for user ' . $user_id, 'INFO');
-            
-            $params = array(
-                'recipient' => $tmpNotif['recipient'],
-                'events' => $tmpNotif['events'],
-                'notification' => $notification,
-                'maarchUrl' => $maarchUrl,
-                'maarchApps' => $maarchApps,
-                'coll_id' => $coll_id,
-                'res_table' => $coll_table,
-                'res_view' => $coll_view
-            );
-            $html = $templates_controler->merge($notification->template_id, $params, 'content');
-            if(strlen($html) === 0) {
-                foreach($tmpNotif['events'] as $event) {
-                    $events_controler->commitEvent($event->event_stack_sid, "FAILED: Error when merging template");
+
+        /**********************************************************************/
+        /*                      FILL_EMAIL_STACK                              */
+        /* Merge template and fill notif_email_stack                          */
+        /**********************************************************************/
+        case 'FILL_EMAIL_STACK':
+            foreach ($tmpNotifs as $user_id => $tmpNotif) {
+                // Merge template with data and style
+                $logger->write('Merging template #'.$notification->template_id
+                    .' ('.count($tmpNotif['events']).' events) for user '.$user_id, 'INFO');
+
+                $params = array(
+                    'recipient' => $tmpNotif['recipient'],
+                    'events' => $tmpNotif['events'],
+                    'notification' => $notification,
+                    'maarchUrl' => $maarchUrl,
+                    'maarchApps' => $maarchApps,
+                    'coll_id' => $coll_id,
+                    'res_table' => $coll_table,
+                    'res_view' => $coll_view,
+                );
+                $html = $templates_controler->merge($notification->template_id, $params, 'content');
+                if (strlen($html) === 0) {
+                    foreach ($tmpNotif['events'] as $event) {
+                        $events_controler->commitEvent($event->event_stack_sid, 'FAILED: Error when merging template');
+                    }
+                    Bt_exitBatch(8, 'Could not merge template with the data');
                 }
-                Bt_exitBatch(8, "Could not merge template with the data");
-            }
-            
-            // Prepare e-mail for stack
-            $sender = (string)$mailerParams->mailfrom;
-            $recipient_mail = $tmpNotif['recipient']->mail;
-            $subject = $notification->description;
-            $html = $func->protect_string_db($html, '', 'no');
-            $html = str_replace('&amp;', '&', $html);
-            $html = str_replace('&', '#and#', $html);
-            
-            // Attachments
-            $attachments = array();
-            if($tmpNotif['attach']) {   
-                $logger->write('Adding attachments', 'INFO');
-                foreach($tmpNotif['events'] as $event) {
-                    // Check if event is related to document in collection
-                    if($event->res_id != '') {
-                        $query = "SELECT "
-                            . "ds.path_template ,"
-                            . "mlb.path, "
-                            . "mlb.filename " 
-                            . "FROM ".$coll_view." mlb LEFT JOIN docservers ds ON mlb.docserver_id = ds.docserver_id "
-                            . "WHERE mlb.res_id = ?";
-                        $stmt = Bt_doQuery($db, $query, array($event->res_id));
-                        $path_parts = $stmt->fetchObject();
-                        $path = $path_parts->path_template . str_replace('#', '/', $path_parts->path) . $path_parts->filename;
-                        $path = str_replace('//', '/', $path);
-                        $path = str_replace('\\', '/', $path);
-                        $attachments[] = $path;
+
+                // Prepare e-mail for stack
+                $sender = (string) $mailerParams->mailfrom;
+                $recipient_mail = $tmpNotif['recipient']->mail;
+                $subject = $notification->description;
+                $html = $func->protect_string_db($html, '', 'no');
+                $html = str_replace('&amp;', '&', $html);
+                $html = str_replace('&', '#and#', $html);
+
+                // Attachments
+                $attachments = array();
+                if ($attachMode) {
+                    $logger->write('Adding attachments', 'INFO');
+                    foreach ($tmpNotif['events'] as $event) {
+                        // Check if event is related to document in collection
+                        if ($event->res_id != '') {
+                            $query = 'SELECT '
+                                .'ds.path_template ,'
+                                .'mlb.path, '
+                                .'mlb.filename '
+                                .'FROM '.$coll_view.' mlb LEFT JOIN docservers ds ON mlb.docserver_id = ds.docserver_id '
+                                .'WHERE mlb.res_id = ?';
+                            $stmt = Bt_doQuery($db, $query, array($event->res_id));
+                            $path_parts = $stmt->fetchObject();
+                            $path = $path_parts->path_template.str_replace('#', '/', $path_parts->path).$path_parts->filename;
+                            $path = str_replace('//', '/', $path);
+                            $path = str_replace('\\', '/', $path);
+                            $attachments[] = $path;
+                        }
                     }
+                    $logger->write(count($attachments).' attachment(s) added', 'INFO');
                 }
-                $logger->write(count($attachments) . ' attachment(s) added', 'INFO');
-            }
-            
-            $logger->write('Adding e-mail to email stack', 'INFO');
-            if ($_SESSION['config']['databasetype'] == 'ORACLE') {
-                $query = "DECLARE
-                              vString notif_email_stack.html_body%type;
-                            BEGIN
-                              vString := '" . $html ."';
-                              INSERT INTO " . _NOTIF_EMAIL_STACK_TABLE_NAME . "
-                              (sender, recipient, subject, html_body, charset, attachments, module) 
-                              VALUES (?, ?, ?, vString, ?, '".implode(',', $attachments)."', 'notifications');
-                            END;";
-                $arrayPDO = array($sender, $recipient_mail, $subject, $mailerParams->charset);
-            } else {
 
-                if(count($attachments) > 0) {
-                    $query = "INSERT INTO " . _NOTIF_EMAIL_STACK_TABLE_NAME 
-                        . " (sender, recipient, subject, html_body, charset, attachments, module) "
-                        . "VALUES (?, ?, ?, ?, ?, '".implode(',', $attachments)."', 'notifications')";
+                $logger->write('Adding e-mail to email stack', 'INFO');
+                if ($_SESSION['config']['databasetype'] == 'ORACLE') {
+                    $query = "DECLARE
+                                vString notif_email_stack.html_body%type;
+                                BEGIN
+                                vString := '".$html."';
+                                INSERT INTO "._NOTIF_EMAIL_STACK_TABLE_NAME."
+                                (sender, recipient, subject, html_body, charset, attachments, module) 
+                                VALUES (?, ?, ?, vString, ?, '".implode(',', $attachments)."', 'notifications');
+                                END;";
+                    $arrayPDO = array($sender, $recipient_mail, $subject, $mailerParams->charset);
                 } else {
-                    $query = "INSERT INTO " . _NOTIF_EMAIL_STACK_TABLE_NAME 
-                        . " (sender, recipient, subject, html_body, charset, module) "
-                        . "VALUES (?, ?, ?, ?, ?, 'notifications')";  
+                    if (count($attachments) > 0) {
+                        $query = 'INSERT INTO '._NOTIF_EMAIL_STACK_TABLE_NAME
+                            .' (sender, recipient, subject, html_body, charset, attachments, module) '
+                            ."VALUES (?, ?, ?, ?, ?, '".implode(',', $attachments)."', 'notifications')";
+                    } else {
+                        $query = 'INSERT INTO '._NOTIF_EMAIL_STACK_TABLE_NAME
+                            .' (sender, recipient, subject, html_body, charset, module) '
+                            ."VALUES (?, ?, ?, ?, ?, 'notifications')";
+                    }
+                    $arrayPDO = array($sender, $recipient_mail, $subject, $html, $mailerParams->charset);
                 }
-                $arrayPDO = array($sender, $recipient_mail, $subject, $html, $mailerParams->charset);
-                
-            }
-            //$logger->write('SQL query:' . $query, 'DEBUG');
-            $db2 = new Database();
-            $db2->query($query, $arrayPDO);
-            
-            foreach($tmpNotif['events'] as $event) {
-                $events_controler->commitEvent($event->event_stack_sid, "SUCCESS");
-            }
-        } 
-        $state = 'END';
-        break;
-    
-    /**********************************************************************/
-    /*                      FILL_EMAIL_STACK                              */
-    /* Merge template and fill notif_email_stack                          */
-    /**********************************************************************/
-    case 'FILL_RSS_STACK' :
-        foreach($tmpNotifs as $user_id => $tmpNotif) {
-            // Merge template with data and style
-            $logger->write('Adding RSS item ('.count($tmpNotif['events']).' events) for user ' . $user_id, 'INFO');
-            
-            foreach($tmpNotif['events'] as $event) {
-                // Get dynamic url
-                $url = str_replace('$id', $event->record_id, $notification->rss_url_template);
-
-                // Inser into stack
-                $query = "INSERT INTO " . _NOTIF_RSS_STACK_TABLE_NAME 
-                    . " (rss_user_id, rss_event_stack_sid, rss_event_url) "
-                    . "VALUES (?, ?, ?)";
                 //$logger->write('SQL query:' . $query, 'DEBUG');
                 $db2 = new Database();
-                $db2->query($query, array($user_id, $event->event_stack_sid, $url));
-                $events_controler->commitEvent($event->event_stack_sid, "SUCCESS");
+                $db2->query($query, $arrayPDO);
+
+                foreach ($tmpNotif['events'] as $event) {
+                    $events_controler->commitEvent($event->event_stack_sid, 'SUCCESS');
+                }
             }
-            
-            
-        } 
-        $state = 'END';
-        break;
+            $state = 'END';
+            break;
     }
-
 }
 
 $logger->write('End of process', 'INFO');
 Bt_logInDataBase(
     $totalEventsToProcess, 0, 'process without error'
-);  
+);
 //unlink($GLOBALS['lckFile']);
 exit($GLOBALS['exitCode']);
diff --git a/modules/notifications/diffusion_types/contact.php b/modules/notifications/diffusion_types/contact.php
index 1beb1f12bf69be1298ce86ed51d815d09aa3c8a6..981c7cce19cae787bec005c91a3218a3122fdb56 100755
--- a/modules/notifications/diffusion_types/contact.php
+++ b/modules/notifications/diffusion_types/contact.php
@@ -1,51 +1,37 @@
 <?php
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
 
-/*
-*    Copyright 2008-2015 Maarch
 *
-*  This file is part of Maarch Framework.
+* @brief   contact
 *
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
+* @author  dev <dev@maarch.org>
+* @ingroup notifications
 */
-
 switch ($request) {
-case 'form_content':
-    $form_content .= '<p class="sstit">' . _NOTIFICATIONS_CONTACT_DIFF_TYPE . '</p>';
-    $form_content .= '<input type="hidden" name="'.$formId.'" id="'.$formId.'" value="contact">';
-    break;
-
-case 'recipients':
-    $query = "SELECT contact_id as user_id, contact_email as mail"
-        . " FROM res_view_letterbox " 
-        . " WHERE (contact_email is not null or contact_email <> '') and res_id = ?";
-    $dbRecipients = new Database();
-    $stmt = $dbRecipients->query($query, array($event->record_id));
-    $recipients = array();
-    while($recipient = $stmt->fetchObject()) {
-        $recipients[] = $recipient;
-    }
-    break;
+    case 'recipients':
+        $query = 'SELECT contact_id as user_id, contact_email as mail'
+            .' FROM res_view_letterbox '
+            ." WHERE (contact_email is not null or contact_email <> '') and res_id = ?";
+        $dbRecipients = new Database();
+        $stmt = $dbRecipients->query($query, array($event->record_id));
+        $recipients = array();
+        while ($recipient = $stmt->fetchObject()) {
+            $recipients[] = $recipient;
+        }
+        break;
 
-case 'attach':
-	$query = "SELECT contact_id as user_id, contact_email as mail"
-        . " FROM res_view_letterbox " 
-        . " WHERE (contact_email is not null or contact_email <> '') and res_id = ?";
-	$attach = false;
-	$dbAttach = new Database();
-	$stmt = $dbAttach->query($query, array($event->record_id));
-	if($stmt->rowCount() > 0) {
-		$attach = true;
-	}
-	break;
+    case 'attach':
+        $query = 'SELECT contact_id as user_id, contact_email as mail'
+            .' FROM res_view_letterbox '
+            ." WHERE (contact_email is not null or contact_email <> '') and res_id = ?";
+        $attach = false;
+        $dbAttach = new Database();
+        $stmt = $dbAttach->query($query, array($event->record_id));
+        if ($stmt->rowCount() > 0) {
+            $attach = true;
+        }
+        break;
 }
diff --git a/modules/notifications/diffusion_types/copy_list.php b/modules/notifications/diffusion_types/copy_list.php
index 5676e44671fe870e9a9fcb0cd523a5b9846d8477..10af5934d9e5544ce541a6945ae098c65b1a1c6c 100755
--- a/modules/notifications/diffusion_types/copy_list.php
+++ b/modules/notifications/diffusion_types/copy_list.php
@@ -1,161 +1,145 @@
 <?php
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
 
-/*
-*    Copyright 2008-2015 Maarch
 *
-*  This file is part of Maarch Framework.
+* @brief   copy_list
 *
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
+* @author  dev <dev@maarch.org>
+* @ingroup notification
 */
-
 switch ($request) {
-case 'form_content':
-//Affichage du formulaire/interface dans l'administration des notification => Envoi Ajax
-    $form_content .= '<p class="sstit">' . _NOTIFICATIONS_COPY_LIST_DIFF_TYPE . '</p>';
-    break;
-
-case 'recipients':
-    $recipients = array();
-    $dbRecipients = new Database();
-    
-    // Copy to users
-    $select = "SELECT distinct us.*";
-    $from = " FROM listinstance li "
-        . " JOIN users us ON li.item_id = us.user_id";
-    $where = " WHERE li.coll_id = 'letterbox_coll'   AND li.item_mode = 'cc'"
-        . " AND item_type='user_id'";
-    
-    $arrayPDO = array(":recordid" => $event->record_id);
-
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-        $where .= " AND notes.id = :recordid AND li.item_id != notes.user_id"
-            . " AND ("
-                . " notes.id not in (SELECT DISTINCT note_id FROM note_entities) "
-                . " OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)"
-            . ")"
-        ;
-        break;
-    
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid";
-        break;
-    
-    case 'listinstance':
-    default:
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND listinstance_id = :recordid AND lb.status not in ('INIT', 'AVAL') AND li.item_id <> :userid";
-        $arrayPDO = array_merge($arrayPDO, array(":userid" => $event->user_id));
-    }
-    
-    $query = $select . $from . $where;
-        
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-    
-    $stmt = $dbRecipients->query($query, $arrayPDO);
-    
-    while($recipient = $stmt->fetchObject()) {
-        $recipients[] = $recipient;
-    }
-    
-    $arrayPDO = array(":recordid" => $event->record_id);
-    // Copy to entities
-    $select = "SELECT distinct us.*";
-    $from = " FROM listinstance li "
-        . " LEFT JOIN users_entities ue ON li.item_id = ue.entity_id "
-        . " JOIN users us ON ue.user_id = us.user_id";
-    $where = " WHERE li.coll_id = 'letterbox_coll'   AND li.item_mode = 'cc'"
-        . " AND item_type='entity_id'";
-    
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-        $where .= " AND notes.id = :recordid AND li.item_id != notes.user_id"
-            . " AND ("
-                . " notes.id not in (SELECT DISTINCT note_id FROM note_entities) "
-                . " OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)"
-            . ")"
-        ;
-        break;
-    
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid";
-        break;
-    
-    case 'listinstance':
-    default:
-        $where .= " AND listinstance_id = :recordid";
-    }
-    
-    $query = $select . $from . $where;
-        
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-    
-    $stmt = $dbRecipients->query($query, $arrayPDO);
-    
-    while($recipient = $stmt->fetchObject()) {
-        $recipients[] = $recipient;
-    }
-    break;
-    
-case 'attach':
-    $attach = false;
-    break;
-  
-case 'res_id':
-    $arrayPDO = array(":recordid" => $event->record_id);
-    $select = "SELECT li.res_id";
-    $from = " FROM listinstance li";
-    $where = " WHERE li.coll_id = 'letterbox_coll'   ";
-    
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-        $where .= " AND notes.id = :recordid AND li.item_id != notes.user_id";
+    case 'recipients':
+        $recipients = array();
+        $dbRecipients = new Database();
+
+        // Copy to users
+        $select = 'SELECT distinct us.*';
+        $from = ' FROM listinstance li '
+            .' JOIN users us ON li.item_id = us.user_id';
+        $where = " WHERE li.coll_id = 'letterbox_coll'   AND li.item_mode = 'cc'"
+            ." AND item_type='user_id'";
+
+        $arrayPDO = array(':recordid' => $event->record_id);
+
+        switch ($event->table_name) {
+            case 'notes':
+                $from .= ' JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id';
+                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id'
+                    .' AND ('
+                        .' notes.id not in (SELECT DISTINCT note_id FROM note_entities) '
+                        .' OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)'
+                    .')'
+                ;
+                break;
+
+            case 'res_letterbox':
+            case 'res_view_letterbox':
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND lb.res_id = :recordid';
+                break;
+
+            case 'listinstance':
+            default:
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= " AND listinstance_id = :recordid AND lb.status not in ('INIT', 'AVAL') AND li.item_id <> :userid";
+                $arrayPDO = array_merge($arrayPDO, array(':userid' => $event->user_id));
+        }
+
+        $query = $select.$from.$where;
+
+        if ($GLOBALS['logger']) {
+            $GLOBALS['logger']->write($query, 'DEBUG');
+        }
+
+        $stmt = $dbRecipients->query($query, $arrayPDO);
+
+        while ($recipient = $stmt->fetchObject()) {
+            $recipients[] = $recipient;
+        }
+
+        $arrayPDO = array(':recordid' => $event->record_id);
+        // Copy to entities
+        $select = 'SELECT distinct us.*';
+        $from = ' FROM listinstance li '
+            .' LEFT JOIN users_entities ue ON li.item_id = ue.entity_id '
+            .' JOIN users us ON ue.user_id = us.user_id';
+        $where = " WHERE li.coll_id = 'letterbox_coll'   AND li.item_mode = 'cc'"
+            ." AND item_type='entity_id'";
+
+        switch ($event->table_name) {
+            case 'notes':
+                $from .= ' JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id';
+                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id'
+                    .' AND ('
+                        .' notes.id not in (SELECT DISTINCT note_id FROM note_entities) '
+                        .' OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)'
+                    .')'
+                ;
+                break;
+
+            case 'res_letterbox':
+            case 'res_view_letterbox':
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND lb.res_id = :recordid';
+                break;
+
+            case 'listinstance':
+            default:
+                $where .= ' AND listinstance_id = :recordid';
+        }
+
+        $query = $select.$from.$where;
+
+        if ($GLOBALS['logger']) {
+            $GLOBALS['logger']->write($query, 'DEBUG');
+        }
+
+        $stmt = $dbRecipients->query($query, $arrayPDO);
+
+        while ($recipient = $stmt->fetchObject()) {
+            $recipients[] = $recipient;
+        }
         break;
-        
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid";
+
+    case 'attach':
+        $attach = false;
         break;
-    
-    case 'listinstance':
-    default:
-        $where .= " AND listinstance_id = :recordid";
-    }
-    
-    $query = $query = $select . $from . $where;
-    
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-    
-    $dbResId = new Database();
-    $stmt = $dbResId->query($query, $arrayPDO);
-    $res_id_record = $stmt->fetchObject();
-    $res_id = $res_id_record->res_id;
-    break;
 
+    case 'res_id':
+        $arrayPDO = array(':recordid' => $event->record_id);
+        $select = 'SELECT li.res_id';
+        $from = ' FROM listinstance li';
+        $where = " WHERE li.coll_id = 'letterbox_coll'   ";
+
+        switch ($event->table_name) {
+            case 'notes':
+                $from .= ' JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id';
+                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id';
+                break;
+
+            case 'res_letterbox':
+            case 'res_view_letterbox':
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND lb.res_id = :recordid';
+                break;
+
+            case 'listinstance':
+            default:
+                $where .= ' AND listinstance_id = :recordid';
+        }
+
+        $query = $query = $select.$from.$where;
+
+        if ($GLOBALS['logger']) {
+            $GLOBALS['logger']->write($query, 'DEBUG');
+        }
+
+        $dbResId = new Database();
+        $stmt = $dbResId->query($query, $arrayPDO);
+        $res_id_record = $stmt->fetchObject();
+        $res_id = $res_id_record->res_id;
+        break;
 }
-?>
diff --git a/modules/notifications/diffusion_types/copy_list_sample.php b/modules/notifications/diffusion_types/copy_list_sample.php
deleted file mode 100755
index 84e7d0f47fcb0f14565cf15e0ebeff4b27ff7e32..0000000000000000000000000000000000000000
--- a/modules/notifications/diffusion_types/copy_list_sample.php
+++ /dev/null
@@ -1,165 +0,0 @@
-<?php
-
-/*
-*    Copyright 2008-2015 Maarch
-*
-*  This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-switch ($request) {
-case 'form_content':
-//Affichage du formulaire/interface dans l'administration des notification => Envoi Ajax
-    $form_content .= '<p class="sstit">' . _NOTIFICATIONS_COPY_LIST_DIFF_TYPE . '</p>';
-    break;
-
-case 'recipients':
-    $recipients = array();
-    $dbRecipients = new Database();
-    $arrayPDO = array(":recordid" => $event->record_id);
-    
-    // Copy to users
-    $select = "SELECT distinct us.*";
-    $from = " FROM listinstance li "
-        . " JOIN users us ON li.item_id = us.user_id";
-    $where = " WHERE li.coll_id = 'letterbox_coll'   AND li.item_mode = 'cc'"
-        . " AND item_type='user_id'";
-    
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-		$from .= " JOIN res_letterbox lb ON lb.res_id = notes.identifier";
-        $where .= " AND notes.id = :recordid AND li.item_id != notes.user_id"
-            . " AND ("
-                . " notes.id not in (SELECT DISTINCT note_id FROM note_entities) "
-                . " OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)"
-            . ")";
-		$where .= " AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-        break;
-    
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-        break;
-    
-    case 'listinstance':
-    default:
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND listinstance_id = :recordid AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-    }
-    
-    $query = $select . $from . $where;
-        
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-    
-    $stmt = $dbRecipients->query($query, $arrayPDO);
-    
-    while($recipient = $stmt->fetchObject()) {
-        $recipients[] = $recipient;
-    }
-    
-    $arrayPDO = array(":recordid" => $event->record_id);
-    // Copy to entities
-    $select = "SELECT distinct us.*";
-    $from = " FROM listinstance li "
-        . " LEFT JOIN users_entities ue ON li.item_id = ue.entity_id "
-        . " JOIN users us ON ue.user_id = us.user_id";
-    $where = " WHERE li.coll_id = 'letterbox_coll'   AND li.item_mode = 'cc'"
-        . " AND item_type='entity_id'";
-    
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-		$from .= " JOIN res_letterbox lb ON lb.res_id = notes.identifier";
-        $where .= " AND notes.id = :recordid AND li.item_id != notes.user_id"
-            . " AND ("
-                . " notes.id not in (SELECT DISTINCT note_id FROM note_entities) "
-                . " OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)"
-            . ")";
-		$where .= " AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-        break;
-    
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-        break;
-    
-    case 'listinstance':
-    default:
-		$from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND listinstance_id = :recordid AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-    }
-    
-    $query = $select . $from . $where;
-        
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-    
-    $stmt = $dbRecipients->query($query, $arrayPDO);
-    
-    while($recipient = $stmt->fetchObject()) {
-        $recipients[] = $recipient;
-    }
-    break;
-    
-case 'attach':
-    $attach = false;
-    break;
-  
-case 'res_id':
-    $arrayPDO = array(":recordid" => $event->record_id);
-    $select = "SELECT li.res_id";
-    $from = " FROM listinstance li";
-    $where = " WHERE li.coll_id = 'letterbox_coll'   ";
-    
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-		$from .= " JOIN res_letterbox lb ON lb.res_id = notes.identifier";
-        $where .= " AND notes.id = :recordid AND li.item_id != notes.user_id";
-		$where .= " AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-        break;
-        
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-        break;
-    
-    case 'listinstance':
-    default:
-		$from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND listinstance_id = :recordid AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-    }
-    
-    $query = $query = $select . $from . $where;
-    
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-    
-    $dbResId = new Database();
-    $stmt = $dbResId->query($query, $arrayPDO);
-    $res_id_record = $stmt->fetchObject();
-    $res_id = $res_id_record->res_id;
-    break;
-
-}
-?>
diff --git a/modules/notifications/diffusion_types/dest_entity.php b/modules/notifications/diffusion_types/dest_entity.php
index e100a5e4ca404fb18922b3797e681e26344f85f0..fe470f4501bd24a6867d90b6524034e8e3a29f9f 100755
--- a/modules/notifications/diffusion_types/dest_entity.php
+++ b/modules/notifications/diffusion_types/dest_entity.php
@@ -1,200 +1,134 @@
 <?php
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
 
-/*
-*    Copyright 2008-2015 Maarch
 *
-*  This file is part of Maarch Framework.
+* @brief   dest_entity
 *
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
+* @author  dev <dev@maarch.org>
+* @ingroup notifications
 */
-
 switch ($request) {
-case 'form_content':
-    require_once 'core/class/class_request.php' ;
-
-    if($_SESSION['m_admin']['notification']['diffusion_type']!='dest_entity'){$_SESSION['m_admin']['notification']['diffusion_properties']='';}
-    //Get list of selected status
-    $choosen_status_tab = explode(",",$_SESSION['m_admin']['notification']['diffusion_properties']);
-    $choosen_status_sring = "'" . implode("','", $choosen_status_tab) . "'";
-
-
-    //Get list of aff availables status
-    $select["status"] = array();
-    array_push($select["status"], 'id', 'label_status');
-    $request = new request();
-    $where = 'id NOT IN (?)';
-    $what = '';
-    $tab = $request->PDOselect(
-        $select, $where, array($choosen_status_tab), $orderstr, $_SESSION['config']['databasetype']
-    );
-    var_dump($choosen_status_tab);exit;
-    $status_list = $tab;
-
-	$form_content .= '<p class="sstit">' . _NOTIFICATIONS_DEST_ENTITY_DIFF_TYPE_WITH_STATUS . '</p>';
-    $form_content .= '<table>';
-        $form_content .= '<tr>';
-            $form_content .= '<td>';
-                $form_content .= '<select name="statuseslist[]" id="statuseslist" size="7" ondblclick=\'moveclick(document.frmevent.elements["statuseslist[]"],document.frmevent.elements["diffusion_properties[]"]);\' multiple="multiple" >';
-                foreach ($status_list as $this_status) {
-                    $form_content .=  '<option value="'.$this_status[0]['value'].'" selected="selected" >'.$this_status[0]['value'].'</option>';
-                }
-                
-                $form_content .= '</select><br/>';
-                $form_content .= '<em><a href=\'javascript:selectall(document.forms["frmevent"].elements["statuseslist[]"]);\' >'._SELECT_ALL.'</a></em>';
-            $form_content .= '</td>';
-            $form_content .= '<td>';
-            $form_content .= '<input type="button" class="button" value="'._ADD.'&gt;&gt;" onclick=\'Move(document.frmevent.elements["statuseslist[]"],document.frmevent.elements["diffusion_properties[]"]);\' />';
-                $form_content .= '<br />';
-                $form_content .= '<br />';
-                $form_content .= '<input type="button" class="button" value="&lt;&lt;'._REMOVE.'"  onclick=\'Move(document.frmevent.elements["diffusion_properties[]"],document.frmevent.elements["statuseslist[]"]);selectall(document.forms["frmevent"].elements["diffusion_properties[]"]);\' />';
-            $form_content .= '</td>';
-            $form_content .= '<td>';
-                $form_content .= '<select name="diffusion_properties[]" id="diffusion_properties" size="7" ondblclick=\'moveclick(document.frmevent.elements["diffusion_properties[]"],document.frmevent.elements["statuseslist"]);selectall(document.forms["frmevent"].elements["diffusion_properties[]"]);\' multiple="multiple" >';
-                
-                foreach ($choosen_status_tab as $this_status) {
-                    if($this_status!=''){
-                        $form_content .=  '<option value="'.$this_status.'" selected="selected" >'.$this_status.'</option>';
-                    }
-                }   
-                $form_content .= '</select><br/>';
-                $form_content .= '<em><a href=\'javascript:selectall(document.forms["frmevent"].elements["diffusion_properties[]"]);\' >'._SELECT_ALL.'</a></em>';
-            $form_content .= '</td>';
-        $form_content .= '</tr>';
-    $form_content .= '</table>';
-	break;
-
-case 'recipients':
-    $recipients = array();
-    $dbRecipients = new Database();
-    
-    $select = "SELECT distinct en.entity_id, en.enabled, en.email AS mail";
-	$from = " FROM res_view_letterbox rvl JOIN entities en ON rvl.destination = en.entity_id";
-    $where = " WHERE rvl.res_id = :recordid";
-
-    $arrayPDO = array(":recordid" => $event->record_id);
-    switch($event->table_name) {
-//    case 'notes':
-//        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-//        $from .= " JOIN res_letterbox lb ON lb.res_id = notes.identifier";
-//		$where .= " AND notes.id = :recordid AND li.item_id != notes.user_id"
-//            . " AND ("
-//                . " notes.id not in (SELECT DISTINCT note_id FROM note_entities) "
-//                . " OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)"
-//            . ")";
-//        if($notification->diffusion_properties!=''){
-//            $status_tab=explode(",",$notification->diffusion_properties);
-//            // $status_str=implode("','",$status_tab);
-//            $where .= " AND lb.status in (:statustab)";
-//            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
-//        }
-//
-//        break;
-    
-//    case 'res_letterbox':
-//    case 'res_view_letterbox':
-//        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-//        $where .= " AND lb.res_id = :recordid";
-//        if($notification->diffusion_properties!=''){
-//            $status_tab=explode(",",$notification->diffusion_properties);
-//            // $status_str=implode("','",$status_tab);
-//            $where .= " AND lb.status in (:statustab)";
-//            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
-//        }
-//        break;
-    
-//    case 'listinstance':
-//    default:
-//		$from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-//        $where .= " AND listinstance_id = :recordid";
-//        if($notification->diffusion_properties!=''){
-//            $status_tab=explode(",",$notification->diffusion_properties);
-//            // $status_str=implode("','",$status_tab);
-//            $where .= " AND lb.status in (:statustab)";
-//            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
-//        }
-    }
-
-    $query = $select . $from . $where;
-    
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-	$stmt = $dbRecipients->query($query, $arrayPDO);
-
-	while($recipient = $stmt->fetchObject()) {
-		$recipients[] = $recipient;
-	}
-	break;
-
-case 'attach':
-	$attach = false;
-	break;
-
-case 'res_id':
-
-    $select = "SELECT li.res_id";
-    $from = " FROM listinstance li";
-    $where = " WHERE li.coll_id = 'letterbox_coll'   ";
-    
-    $arrayPDO = array(":recordid" => $event->record_id);
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-		$from .= " JOIN res_letterbox lb ON lb.res_id = notes.identifier";
-		$where .= " AND notes.id = :recordid AND li.item_id != notes.user_id";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+    case 'recipients':
+        $recipients = array();
+        $dbRecipients = new Database();
+
+        $select = 'SELECT distinct en.entity_id, en.enabled, en.email AS mail';
+        $from = ' FROM res_view_letterbox rvl JOIN entities en ON rvl.destination = en.entity_id';
+        $where = ' WHERE rvl.res_id = :recordid';
+
+        $arrayPDO = array(':recordid' => $event->record_id);
+        /*switch($event->table_name) {
+       case 'notes':
+           $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
+           $from .= " JOIN res_letterbox lb ON lb.res_id = notes.identifier";
+    		$where .= " AND notes.id = :recordid AND li.item_id != notes.user_id"
+               . " AND ("
+                   . " notes.id not in (SELECT DISTINCT note_id FROM note_entities) "
+                   . " OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)"
+               . ")";
+           if($notification->diffusion_properties!=''){
+               $status_tab=explode(",",$notification->diffusion_properties);
+               // $status_str=implode("','",$status_tab);
+               $where .= " AND lb.status in (:statustab)";
+               $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+           }
+
+           break;
+
+       case 'res_letterbox':
+       case 'res_view_letterbox':
+           $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
+           $where .= " AND lb.res_id = :recordid";
+           if($notification->diffusion_properties!=''){
+               $status_tab=explode(",",$notification->diffusion_properties);
+               // $status_str=implode("','",$status_tab);
+               $where .= " AND lb.status in (:statustab)";
+               $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+           }
+           break;
+
+       case 'listinstance':
+       default:
+    		$from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
+           $where .= " AND listinstance_id = :recordid";
+           if($notification->diffusion_properties!=''){
+               $status_tab=explode(",",$notification->diffusion_properties);
+               // $status_str=implode("','",$status_tab);
+               $where .= " AND lb.status in (:statustab)";
+               $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+           }
+        }*/
+
+        $query = $select.$from.$where;
+
+        if ($GLOBALS['logger']) {
+            $GLOBALS['logger']->write($query, 'DEBUG');
         }
-        break;
-        
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+        $stmt = $dbRecipients->query($query, $arrayPDO);
+
+        while ($recipient = $stmt->fetchObject()) {
+            $recipients[] = $recipient;
         }
         break;
-    
-    case 'listinstance':
-    default:
-		$from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND listinstance_id = :recordid";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+
+    case 'attach':
+        $attach = false;
+        break;
+
+    case 'res_id':
+        $select = 'SELECT li.res_id';
+        $from = ' FROM listinstance li';
+        $where = " WHERE li.coll_id = 'letterbox_coll'   ";
+
+        $arrayPDO = array(':recordid' => $event->record_id);
+        switch ($event->table_name) {
+            case 'notes':
+                $from .= ' JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id';
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = notes.identifier';
+                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
+                break;
+
+            case 'res_letterbox':
+            case 'res_view_letterbox':
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND lb.res_id = :recordid';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
+                break;
+
+            case 'listinstance':
+            default:
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND listinstance_id = :recordid';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
+        }
+
+        $query = $query = $select.$from.$where;
+
+        if ($GLOBALS['logger']) {
+            $GLOBALS['logger']->write($query, 'DEBUG');
         }
-    }
-    
-    $query = $query = $select . $from . $where;
-    
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-	$dbResId = new Database();
-	$stmt = $dbResId->query($query, $arrayPDO);
-	$res_id_record = $stmt->fetchObject();
-    $res_id = $res_id_record->res_id;
-    break;
-    
+        $dbResId = new Database();
+        $stmt = $dbResId->query($query, $arrayPDO);
+        $res_id_record = $stmt->fetchObject();
+        $res_id = $res_id_record->res_id;
+        break;
 }
-?>
diff --git a/modules/notifications/diffusion_types/dest_user.php b/modules/notifications/diffusion_types/dest_user.php
index f6320486bf7694dd0876f16043af9d6d9004070c..16552725b6f141c5c9a08f64cb176d3429c10251 100755
--- a/modules/notifications/diffusion_types/dest_user.php
+++ b/modules/notifications/diffusion_types/dest_user.php
@@ -1,199 +1,134 @@
 <?php
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
 
-/*
-*    Copyright 2008-2015 Maarch
 *
-*  This file is part of Maarch Framework.
+* @brief   dest_user
 *
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
+* @author  dev <dev@maarch.org>
+* @ingroup notifications
 */
-
 switch ($request) {
-case 'form_content':
-    require_once 'core/class/class_request.php' ;
-
-    if($_SESSION['m_admin']['notification']['diffusion_type']!='dest_user'){$_SESSION['m_admin']['notification']['diffusion_properties']='';}
-    //Get list of selected status
-    $choosen_status_tab = explode(",",$_SESSION['m_admin']['notification']['diffusion_properties']);
-    $choosen_status_sring = "'" . implode("','", $choosen_status_tab) . "'";
-
-
-    //Get list of aff availables status
-    $select["status"] = array();
-    array_push($select["status"], 'id', 'label_status');
-    $request = new request();
-    $where = 'id NOT IN (?)';
-    $what = '';
-    $tab = $request->PDOselect(
-        $select, $where, array($choosen_status_tab), $orderstr, $_SESSION['config']['databasetype']
-    );
-    $status_list = $tab;
-
-	$form_content .= '<p class="sstit">' . _NOTIFICATIONS_DEST_USER_DIFF_TYPE_WITH_STATUS . '</p>';
-    $form_content .= '<table>';
-        $form_content .= '<tr>';
-            $form_content .= '<td>';
-                $form_content .= '<select name="statuseslist[]" id="statuseslist" size="7" ondblclick=\'moveclick(document.frmevent.elements["statuseslist[]"],document.frmevent.elements["diffusion_properties[]"]);\' multiple="multiple" >';
-                foreach ($status_list as $this_status) {
-                    $form_content .=  '<option value="'.$this_status[0]['value'].'" selected="selected" >'.$this_status[0]['value'].'</option>';
+    case 'recipients':
+        $recipients = array();
+        $dbRecipients = new Database();
+
+        $select = 'SELECT distinct us.*';
+        $from = ' FROM listinstance li JOIN users us ON li.item_id = us.user_id';
+        $where = " WHERE li.coll_id = 'letterbox_coll'   AND li.item_mode = 'dest'";
+
+        $arrayPDO = array(':recordid' => $event->record_id);
+        switch ($event->table_name) {
+            case 'notes':
+                $from .= ' JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id';
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = notes.identifier';
+                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id'
+                    .' AND ('
+                        .' notes.id not in (SELECT DISTINCT note_id FROM note_entities) '
+                        .' OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)'
+                    .')';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
                 }
-                
-                $form_content .= '</select><br/>';
-                $form_content .= '<em><a href=\'javascript:selectall(document.forms["frmevent"].elements["statuseslist[]"]);\' >'._SELECT_ALL.'</a></em>';
-            $form_content .= '</td>';
-            $form_content .= '<td>';
-            $form_content .= '<input type="button" class="button" value="'._ADD.'&gt;&gt;" onclick=\'Move(document.frmevent.elements["statuseslist[]"],document.frmevent.elements["diffusion_properties[]"]);\' />';
-                $form_content .= '<br />';
-                $form_content .= '<br />';
-                $form_content .= '<input type="button" class="button" value="&lt;&lt;'._REMOVE.'"  onclick=\'Move(document.frmevent.elements["diffusion_properties[]"],document.frmevent.elements["statuseslist[]"]);selectall(document.forms["frmevent"].elements["diffusion_properties[]"]);\' />';
-            $form_content .= '</td>';
-            $form_content .= '<td>';
-                $form_content .= '<select name="diffusion_properties[]" id="diffusion_properties" size="7" ondblclick=\'moveclick(document.frmevent.elements["diffusion_properties[]"],document.frmevent.elements["statuseslist"]);selectall(document.forms["frmevent"].elements["diffusion_properties[]"]);\' multiple="multiple" >';
-                
-                foreach ($choosen_status_tab as $this_status) {
-                    if($this_status!=''){
-                        $form_content .=  '<option value="'.$this_status.'" selected="selected" >'.$this_status.'</option>';
-                    }
-                }   
-                $form_content .= '</select><br/>';
-                $form_content .= '<em><a href=\'javascript:selectall(document.forms["frmevent"].elements["diffusion_properties[]"]);\' >'._SELECT_ALL.'</a></em>';
-            $form_content .= '</td>';
-        $form_content .= '</tr>';
-    $form_content .= '</table>';
-	break;
-
-case 'recipients':
-    $recipients = array();
-    $dbRecipients = new Database();
-    
-    $select = "SELECT distinct us.*";
-	$from = " FROM listinstance li JOIN users us ON li.item_id = us.user_id";
-    $where = " WHERE li.coll_id = 'letterbox_coll'   AND li.item_mode = 'dest'";
-
-    $arrayPDO = array(":recordid" => $event->record_id);
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-        $from .= " JOIN res_letterbox lb ON lb.res_id = notes.identifier";
-		$where .= " AND notes.id = :recordid AND li.item_id != notes.user_id"
-            . " AND ("
-                . " notes.id not in (SELECT DISTINCT note_id FROM note_entities) "
-                . " OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)"
-            . ")";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
-        }
 
-        break;
-    
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+                break;
+
+            case 'res_letterbox':
+            case 'res_view_letterbox':
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND lb.res_id = :recordid';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
+                break;
+
+            case 'listinstance':
+            default:
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND listinstance_id = :recordid';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
         }
-        break;
-    
-    case 'listinstance':
-    default:
-		$from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND listinstance_id = :recordid";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+
+        $query = $select.$from.$where;
+
+        if ($GLOBALS['logger']) {
+            $GLOBALS['logger']->write($query, 'DEBUG');
         }
-    }
-
-    $query = $select . $from . $where;
-    
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-	$stmt = $dbRecipients->query($query, $arrayPDO);
-	
-	while($recipient = $stmt->fetchObject()) {
-		$recipients[] = $recipient;
-	}
-	break;
-
-case 'attach':
-	$attach = false;
-	break;
-
-case 'res_id':
-
-    $select = "SELECT li.res_id";
-    $from = " FROM listinstance li";
-    $where = " WHERE li.coll_id = 'letterbox_coll'   ";
-    
-    $arrayPDO = array(":recordid" => $event->record_id);
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-		$from .= " JOIN res_letterbox lb ON lb.res_id = notes.identifier";
-		$where .= " AND notes.id = :recordid AND li.item_id != notes.user_id";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+        $stmt = $dbRecipients->query($query, $arrayPDO);
+
+        while ($recipient = $stmt->fetchObject()) {
+            $recipients[] = $recipient;
         }
         break;
-        
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
-        }
+
+    case 'attach':
+        $attach = false;
         break;
-    
-    case 'listinstance':
-    default:
-		$from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND listinstance_id = :recordid";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+
+    case 'res_id':
+        $select = 'SELECT li.res_id';
+        $from = ' FROM listinstance li';
+        $where = " WHERE li.coll_id = 'letterbox_coll'   ";
+
+        $arrayPDO = array(':recordid' => $event->record_id);
+        switch ($event->table_name) {
+            case 'notes':
+                $from .= ' JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id';
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = notes.identifier';
+                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
+                break;
+
+            case 'res_letterbox':
+            case 'res_view_letterbox':
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND lb.res_id = :recordid';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
+                break;
+
+            case 'listinstance':
+            default:
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND listinstance_id = :recordid';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
         }
-    }
-    
-    $query = $query = $select . $from . $where;
-    
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-	$dbResId = new Database();
-	$stmt = $dbResId->query($query, $arrayPDO);
-	$res_id_record = $stmt->fetchObject();
-    $res_id = $res_id_record->res_id;
-    break;
-    
+
+        $query = $query = $select.$from.$where;
+
+        if ($GLOBALS['logger']) {
+            $GLOBALS['logger']->write($query, 'DEBUG');
+        }
+        $dbResId = new Database();
+        $stmt = $dbResId->query($query, $arrayPDO);
+        $res_id_record = $stmt->fetchObject();
+        $res_id = $res_id_record->res_id;
+        break;
 }
-?>
diff --git a/modules/notifications/diffusion_types/dest_user_sample.php b/modules/notifications/diffusion_types/dest_user_sample.php
deleted file mode 100755
index 966dcadb632bc8dc5240e72356be4d5d43e277ea..0000000000000000000000000000000000000000
--- a/modules/notifications/diffusion_types/dest_user_sample.php
+++ /dev/null
@@ -1,115 +0,0 @@
-<?php
-
-/*
-*    Copyright 2008-2015 Maarch
-*
-*  This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-switch ($request) {
-case 'form_content':
-	$form_content .= '<p class="sstit">' . _NOTIFICATIONS_DEST_USER_DIFF_TYPE . '</p>';
-	break;
-
-case 'recipients':
-    $recipients = array();
-    $dbRecipients = new Database();
-    
-    $select = "SELECT distinct us.*";
-	$from = " FROM listinstance li JOIN users us ON li.item_id = us.user_id";
-    $where = " WHERE li.coll_id = 'letterbox_coll'   AND li.item_mode = 'dest'";
-
-    $arrayPDO = array(":recordid" => $event->record_id);
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-        $from .= " JOIN res_letterbox lb ON lb.res_id = notes.identifier";
-		$where .= " AND notes.id = :recordid AND li.item_id != notes.user_id"
-            . " AND ("
-                . " notes.id not in (SELECT DISTINCT note_id FROM note_entities) "
-                . " OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)"
-            . ")";
-		$where .= " AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-        break;
-    
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-        break;
-    
-    case 'listinstance':
-    default:
-        //$where .= " AND listinstance_id = " . $event->record_id;
-		$from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND listinstance_id = :recordid AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-    }
-
-    $query = $select . $from . $where;
-    
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-	$stmt = $dbRecipients->query($query, $arrayPDO);
-	
-	while($recipient = $stmt->fetchObject()) {
-		$recipients[] = $recipient;
-	}
-	break;
-
-case 'attach':
-	$attach = false;
-	break;
-
-case 'res_id':
-    $select = "SELECT li.res_id";
-    $from = " FROM listinstance li";
-    $where = " WHERE li.coll_id = 'letterbox_coll'   ";
-    
-    $arrayPDO = array(":recordid" => $event->record_id);
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-		$from .= " JOIN res_letterbox lb ON lb.res_id = notes.identifier";
-		$where .= " AND notes.id = :recordid AND li.item_id != notes.user_id";
-		$where .= " AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-        break;
-        
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-        break;
-    
-    case 'listinstance':
-    default:
-		$from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND listinstance_id = :recordid AND lb.status not in ('VAL', 'VAL1', 'VAL2', 'QUAL', 'INIT', 'RET', 'DEL', 'END')";
-    }
-    
-    $query = $query = $select . $from . $where;
-    
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-	$dbResId = new Database();
-	$stmt = $dbResId->query($query, $arrayPDO);
-	$res_id_record = $stmt->fetchObject();
-    $res_id = $res_id_record->res_id;
-    break;
-    
-}
-?>
diff --git a/modules/notifications/diffusion_types/dest_user_sign.php b/modules/notifications/diffusion_types/dest_user_sign.php
index b05b7f9074f5fe1e787454edbd120ab81033f40b..c0c03ae20f85645d3d1d01827fafacb458d48585 100755
--- a/modules/notifications/diffusion_types/dest_user_sign.php
+++ b/modules/notifications/diffusion_types/dest_user_sign.php
@@ -1,202 +1,136 @@
 <?php
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
 
-/*
-*   Copyright 2008-2016 Maarch
 *
-*   This file is part of Maarch Framework.
+* @brief   dest_user_sign
 *
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
+* @author  dev <dev@maarch.org>
+* @ingroup notifications
 */
-
 switch ($request) {
-case 'form_content':
-    require_once 'core/class/class_request.php' ;
-
-    if($_SESSION['m_admin']['notification']['diffusion_type'] != 'dest_user_sign') { 
-        $_SESSION['m_admin']['notification']['diffusion_properties'] = '';
-    }
-    //Get list of selected status
-    $choosen_status_tab = explode(",",$_SESSION['m_admin']['notification']['diffusion_properties']);
-    $choosen_status_sring = "'" . implode("','", $choosen_status_tab) . "'";
-
-
-    //Get list of aff availables status
-    $select["status"] = array();
-    array_push($select["status"], 'id', 'label_status');
-    $request = new request();
-    $where = 'id NOT IN (?)';
-    $what = '';
-    $tab = $request->PDOselect(
-        $select, $where, array($choosen_status_tab), $orderstr, $_SESSION['config']['databasetype']
-    );
-    $status_list = $tab;
-
-	$form_content .= '<p class="sstit">' . _NOTIFICATIONS_DEST_USER_SIGN_DIFF_TYPE_WITH_STATUS . '</p>';
-    $form_content .= '<table>';
-        $form_content .= '<tr>';
-            $form_content .= '<td>';
-                $form_content .= '<select name="statuseslist[]" id="statuseslist" size="7" ondblclick=\'moveclick(document.frmevent.elements["statuseslist[]"],document.frmevent.elements["diffusion_properties[]"]);\' multiple="multiple" >';
-                foreach ($status_list as $this_status) {
-                    $form_content .=  '<option value="'.$this_status[0]['value'].'" selected="selected" >'.$this_status[0]['value'].'</option>';
+    case 'recipients':
+        $recipients = array();
+        $dbRecipients = new Database();
+
+        $select = 'SELECT distinct us.*';
+        $from = ' FROM listinstance li JOIN users us ON li.item_id = us.user_id';
+        $where = " WHERE li.coll_id = 'letterbox_coll' AND li.item_mode = 'sign' "
+            .'and process_date IS NULL ';
+
+        $arrayPDO = array(':recordid' => $event->record_id);
+        switch ($event->table_name) {
+            case 'notes':
+                $from .= ' JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id';
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = notes.identifier';
+                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id'
+                    .' AND ('
+                        .' notes.id not in (SELECT DISTINCT note_id FROM note_entities) '
+                        .' OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN '
+                        .' users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)'
+                    .')';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
                 }
-                
-                $form_content .= '</select><br/>';
-                $form_content .= '<em><a href=\'javascript:selectall(document.forms["frmevent"].elements["statuseslist[]"]);\' >'._SELECT_ALL.'</a></em>';
-            $form_content .= '</td>';
-            $form_content .= '<td>';
-            $form_content .= '<input type="button" class="button" value="'._ADD.'&gt;&gt;" onclick=\'Move(document.frmevent.elements["statuseslist[]"],document.frmevent.elements["diffusion_properties[]"]);\' />';
-                $form_content .= '<br />';
-                $form_content .= '<br />';
-                $form_content .= '<input type="button" class="button" value="&lt;&lt;'._REMOVE.'"  onclick=\'Move(document.frmevent.elements["diffusion_properties[]"],document.frmevent.elements["statuseslist[]"]);selectall(document.forms["frmevent"].elements["diffusion_properties[]"]);\' />';
-            $form_content .= '</td>';
-            $form_content .= '<td>';
-                $form_content .= '<select name="diffusion_properties[]" id="diffusion_properties" size="7" ondblclick=\'moveclick(document.frmevent.elements["diffusion_properties[]"],document.frmevent.elements["statuseslist"]);selectall(document.forms["frmevent"].elements["diffusion_properties[]"]);\' multiple="multiple" >';
-                
-                foreach ($choosen_status_tab as $this_status) {
-                    if($this_status!=''){
-                        $form_content .=  '<option value="'.$this_status.'" selected="selected" >'.$this_status.'</option>';
-                    }
-                }   
-                $form_content .= '</select><br/>';
-                $form_content .= '<em><a href=\'javascript:selectall(document.forms["frmevent"].elements["diffusion_properties[]"]);\' >'._SELECT_ALL.'</a></em>';
-            $form_content .= '</td>';
-        $form_content .= '</tr>';
-    $form_content .= '</table>';
-	break;
-
-case 'recipients':
-    $recipients = array();
-    $dbRecipients = new Database();
-    
-    $select = "SELECT distinct us.*";
-	$from = " FROM listinstance li JOIN users us ON li.item_id = us.user_id";
-    $where = " WHERE li.coll_id = 'letterbox_coll' AND li.item_mode = 'sign' "
-        . "and process_date IS NULL ";
-
-    $arrayPDO = array(":recordid" => $event->record_id);
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-        $from .= " JOIN res_letterbox lb ON lb.res_id = notes.identifier";
-		$where .= " AND notes.id = :recordid AND li.item_id != notes.user_id"
-            . " AND ("
-                . " notes.id not in (SELECT DISTINCT note_id FROM note_entities) "
-                . " OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN "
-                . " users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)"
-            . ")";
-        if($notification->diffusion_properties!='') {
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
-        }
 
-        break;
-    
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+                break;
+
+            case 'res_letterbox':
+            case 'res_view_letterbox':
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND lb.res_id = :recordid';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
+                break;
+
+            case 'listinstance':
+            default:
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND listinstance_id = :recordid';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
         }
-        break;
-    
-    case 'listinstance':
-    default:
-		$from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND listinstance_id = :recordid";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+
+        $query = $select.$from.$where;
+
+        if ($GLOBALS['logger']) {
+            $GLOBALS['logger']->write($query, 'DEBUG');
         }
-    }
-
-    $query = $select . $from . $where;
-    
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-	$stmt = $dbRecipients->query($query, $arrayPDO);
-	
-	while($recipient = $stmt->fetchObject()) {
-		$recipients[] = $recipient;
-	}
-	break;
-
-case 'attach':
-	$attach = false;
-	break;
-
-case 'res_id':
-
-    $select = "SELECT li.res_id";
-    $from = " FROM listinstance li";
-    $where = " WHERE li.coll_id = 'letterbox_coll'   ";
-    
-    $arrayPDO = array(":recordid" => $event->record_id);
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-		$from .= " JOIN res_letterbox lb ON lb.res_id = notes.identifier";
-		$where .= " AND notes.id = :recordid AND li.item_id != notes.user_id";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+        $stmt = $dbRecipients->query($query, $arrayPDO);
+
+        while ($recipient = $stmt->fetchObject()) {
+            $recipients[] = $recipient;
         }
         break;
-        
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
-        }
+
+    case 'attach':
+        $attach = false;
         break;
-    
-    case 'listinstance':
-    default:
-		$from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND listinstance_id = :recordid";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+
+    case 'res_id':
+        $select = 'SELECT li.res_id';
+        $from = ' FROM listinstance li';
+        $where = " WHERE li.coll_id = 'letterbox_coll'   ";
+
+        $arrayPDO = array(':recordid' => $event->record_id);
+        switch ($event->table_name) {
+            case 'notes':
+                $from .= ' JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id';
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = notes.identifier';
+                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
+                break;
+
+            case 'res_letterbox':
+            case 'res_view_letterbox':
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND lb.res_id = :recordid';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
+                break;
+
+            case 'listinstance':
+            default:
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND listinstance_id = :recordid';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
         }
-    }
-    
-    $query = $query = $select . $from . $where;
-    
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-	$dbResId = new Database();
-	$stmt = $dbResId->query($query, $arrayPDO);
-	$res_id_record = $stmt->fetchObject();
-    $res_id = $res_id_record->res_id;
-    break;
-    
+
+        $query = $query = $select.$from.$where;
+
+        if ($GLOBALS['logger']) {
+            $GLOBALS['logger']->write($query, 'DEBUG');
+        }
+        $dbResId = new Database();
+        $stmt = $dbResId->query($query, $arrayPDO);
+        $res_id_record = $stmt->fetchObject();
+        $res_id = $res_id_record->res_id;
+        break;
 }
diff --git a/modules/notifications/diffusion_types/dest_user_visa.php b/modules/notifications/diffusion_types/dest_user_visa.php
index 8e88ac12b4fb8aa1a8fb5bf165772ea7b9504497..d0d656b4fc3c3c773c4bc932b7dcb9e3582e9495 100755
--- a/modules/notifications/diffusion_types/dest_user_visa.php
+++ b/modules/notifications/diffusion_types/dest_user_visa.php
@@ -1,202 +1,136 @@
 <?php
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
 
-/*
-*   Copyright 2008-2016 Maarch
 *
-*   This file is part of Maarch Framework.
+* @brief   dest_user_visa
 *
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
+* @author  dev <dev@maarch.org>
+* @ingroup notifications
 */
-
 switch ($request) {
-case 'form_content':
-    require_once 'core/class/class_request.php' ;
-
-    if($_SESSION['m_admin']['notification']['diffusion_type'] != 'dest_user_visa') { 
-        $_SESSION['m_admin']['notification']['diffusion_properties'] = '';
-    }
-    //Get list of selected status
-    $choosen_status_tab = explode(",",$_SESSION['m_admin']['notification']['diffusion_properties']);
-    $choosen_status_sring = "'" . implode("','", $choosen_status_tab) . "'";
-
-
-    //Get list of aff availables status
-    $select["status"] = array();
-    array_push($select["status"], 'id', 'label_status');
-    $request = new request();
-    $where = 'id NOT IN (?)';
-    $what = '';
-    $tab = $request->PDOselect(
-        $select, $where, array($choosen_status_tab), $orderstr, $_SESSION['config']['databasetype']
-    );
-    $status_list = $tab;
-
-	$form_content .= '<p class="sstit">' . _NOTIFICATIONS_DEST_USER_VISA_DIFF_TYPE_WITH_STATUS . '</p>';
-    $form_content .= '<table>';
-        $form_content .= '<tr>';
-            $form_content .= '<td>';
-                $form_content .= '<select name="statuseslist[]" id="statuseslist" size="7" ondblclick=\'moveclick(document.frmevent.elements["statuseslist[]"],document.frmevent.elements["diffusion_properties[]"]);\' multiple="multiple" >';
-                foreach ($status_list as $this_status) {
-                    $form_content .=  '<option value="'.$this_status[0]['value'].'" selected="selected" >'.$this_status[0]['value'].'</option>';
+    case 'recipients':
+        $recipients = array();
+        $dbRecipients = new Database();
+
+        $select = 'SELECT distinct us.*';
+        $from = ' FROM listinstance li JOIN users us ON li.item_id = us.user_id';
+        $where = " WHERE li.coll_id = 'letterbox_coll' AND li.item_mode = 'visa' "
+            .'and process_date IS NULL ';
+
+        $arrayPDO = array(':recordid' => $event->record_id);
+        switch ($event->table_name) {
+            case 'notes':
+                $from .= ' JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id';
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = notes.identifier';
+                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id'
+                    .' AND ('
+                        .' notes.id not in (SELECT DISTINCT note_id FROM note_entities) '
+                        .' OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN '
+                        .' users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)'
+                    .')';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
                 }
-                
-                $form_content .= '</select><br/>';
-                $form_content .= '<em><a href=\'javascript:selectall(document.forms["frmevent"].elements["statuseslist[]"]);\' >'._SELECT_ALL.'</a></em>';
-            $form_content .= '</td>';
-            $form_content .= '<td>';
-            $form_content .= '<input type="button" class="button" value="'._ADD.'&gt;&gt;" onclick=\'Move(document.frmevent.elements["statuseslist[]"],document.frmevent.elements["diffusion_properties[]"]);\' />';
-                $form_content .= '<br />';
-                $form_content .= '<br />';
-                $form_content .= '<input type="button" class="button" value="&lt;&lt;'._REMOVE.'"  onclick=\'Move(document.frmevent.elements["diffusion_properties[]"],document.frmevent.elements["statuseslist[]"]);selectall(document.forms["frmevent"].elements["diffusion_properties[]"]);\' />';
-            $form_content .= '</td>';
-            $form_content .= '<td>';
-                $form_content .= '<select name="diffusion_properties[]" id="diffusion_properties" size="7" ondblclick=\'moveclick(document.frmevent.elements["diffusion_properties[]"],document.frmevent.elements["statuseslist"]);selectall(document.forms["frmevent"].elements["diffusion_properties[]"]);\' multiple="multiple" >';
-                
-                foreach ($choosen_status_tab as $this_status) {
-                    if($this_status!=''){
-                        $form_content .=  '<option value="'.$this_status.'" selected="selected" >'.$this_status.'</option>';
-                    }
-                }   
-                $form_content .= '</select><br/>';
-                $form_content .= '<em><a href=\'javascript:selectall(document.forms["frmevent"].elements["diffusion_properties[]"]);\' >'._SELECT_ALL.'</a></em>';
-            $form_content .= '</td>';
-        $form_content .= '</tr>';
-    $form_content .= '</table>';
-	break;
-
-case 'recipients':
-    $recipients = array();
-    $dbRecipients = new Database();
-    
-    $select = "SELECT distinct us.*";
-	$from = " FROM listinstance li JOIN users us ON li.item_id = us.user_id";
-    $where = " WHERE li.coll_id = 'letterbox_coll' AND li.item_mode = 'visa' "
-        . "and process_date IS NULL ";
-
-    $arrayPDO = array(":recordid" => $event->record_id);
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-        $from .= " JOIN res_letterbox lb ON lb.res_id = notes.identifier";
-		$where .= " AND notes.id = :recordid AND li.item_id != notes.user_id"
-            . " AND ("
-                . " notes.id not in (SELECT DISTINCT note_id FROM note_entities) "
-                . " OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN "
-                . " users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)"
-            . ")";
-        if($notification->diffusion_properties!='') {
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
-        }
 
-        break;
-    
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+                break;
+
+            case 'res_letterbox':
+            case 'res_view_letterbox':
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND lb.res_id = :recordid';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
+                break;
+
+            case 'listinstance':
+            default:
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND listinstance_id = :recordid';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
         }
-        break;
-    
-    case 'listinstance':
-    default:
-		$from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND listinstance_id = :recordid";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+
+        $query = $select.$from.$where;
+
+        if ($GLOBALS['logger']) {
+            $GLOBALS['logger']->write($query, 'DEBUG');
         }
-    }
-
-    $query = $select . $from . $where;
-    
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-	$stmt = $dbRecipients->query($query, $arrayPDO);
-	
-	while($recipient = $stmt->fetchObject()) {
-		$recipients[] = $recipient;
-	}
-	break;
-
-case 'attach':
-	$attach = false;
-	break;
-
-case 'res_id':
-
-    $select = "SELECT li.res_id";
-    $from = " FROM listinstance li";
-    $where = " WHERE li.coll_id = 'letterbox_coll'   ";
-    
-    $arrayPDO = array(":recordid" => $event->record_id);
-    switch($event->table_name) {
-    case 'notes':
-        $from .= " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id";
-		$from .= " JOIN res_letterbox lb ON lb.res_id = notes.identifier";
-		$where .= " AND notes.id = :recordid AND li.item_id != notes.user_id";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+        $stmt = $dbRecipients->query($query, $arrayPDO);
+
+        while ($recipient = $stmt->fetchObject()) {
+            $recipients[] = $recipient;
         }
         break;
-        
-    case 'res_letterbox':
-    case 'res_view_letterbox':
-        $from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND lb.res_id = :recordid";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
-        }
+
+    case 'attach':
+        $attach = false;
         break;
-    
-    case 'listinstance':
-    default:
-		$from .= " JOIN res_letterbox lb ON lb.res_id = li.res_id";
-        $where .= " AND listinstance_id = :recordid";
-        if($notification->diffusion_properties!=''){
-            $status_tab=explode(",",$notification->diffusion_properties);
-            // $status_str=implode("','",$status_tab); 
-            $where .= " AND lb.status in (:statustab)";
-            $arrayPDO = array_merge($arrayPDO, array(":statustab" => $status_tab));
+
+    case 'res_id':
+        $select = 'SELECT li.res_id';
+        $from = ' FROM listinstance li';
+        $where = " WHERE li.coll_id = 'letterbox_coll'   ";
+
+        $arrayPDO = array(':recordid' => $event->record_id);
+        switch ($event->table_name) {
+            case 'notes':
+                $from .= ' JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id';
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = notes.identifier';
+                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
+                break;
+
+            case 'res_letterbox':
+            case 'res_view_letterbox':
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND lb.res_id = :recordid';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
+                break;
+
+            case 'listinstance':
+            default:
+                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
+                $where .= ' AND listinstance_id = :recordid';
+                if ($notification->diffusion_properties != '') {
+                    $status_tab = explode(',', $notification->diffusion_properties);
+                    // $status_str=implode("','",$status_tab);
+                    $where .= ' AND lb.status in (:statustab)';
+                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
+                }
         }
-    }
-    
-    $query = $query = $select . $from . $where;
-    
-    if($GLOBALS['logger']) {
-        $GLOBALS['logger']->write($query , 'DEBUG');
-    }
-	$dbResId = new Database();
-	$stmt = $dbResId->query($query, $arrayPDO);
-	$res_id_record = $stmt->fetchObject();
-    $res_id = $res_id_record->res_id;
-    break;
-    
+
+        $query = $query = $select.$from.$where;
+
+        if ($GLOBALS['logger']) {
+            $GLOBALS['logger']->write($query, 'DEBUG');
+        }
+        $dbResId = new Database();
+        $stmt = $dbResId->query($query, $arrayPDO);
+        $res_id_record = $stmt->fetchObject();
+        $res_id = $res_id_record->res_id;
+        break;
 }
diff --git a/modules/notifications/diffusion_types/entity.php b/modules/notifications/diffusion_types/entity.php
index c5e7b423b4e0de45fb99ad18302cf20be2a9fbf2..cc40a9ae4b9ef5a63ae8727bfe86820cfdfe81f1 100755
--- a/modules/notifications/diffusion_types/entity.php
+++ b/modules/notifications/diffusion_types/entity.php
@@ -1,94 +1,50 @@
 <?php
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
 
-/*
-*    Copyright 2008-2015 Maarch
 *
-*  This file is part of Maarch Framework.
+* @brief   entity
 *
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
+* @author  dev <dev@maarch.org>
+* @ingroup notifications
 */
-
 require_once 'core/core_tables.php';
 require_once 'core/class/class_request.php';
 require_once 'modules/entities/class/EntityControler.php';
 
-switch($request) {
-case 'form_content':
-	$entities = new EntityControler();
-	$entitylist = $entities->getAllEntities();
-		
-	$form_content .= '<input type="hidden" name="'.$formId.'" id="'.$formId.'" value="entity">';
-	$form_content .= '<p class="sstit">' . _NOTIFICATIONS_ENTITY_DIFF_TYPE . '</p>';
-	$form_content .= '<table>';
-		$form_content .= '<tr>';
-			$form_content .= '<td>';
-				$form_content .= '<select name="'.$leftList.'[]" id="'.$leftList.'" size="7" ondblclick=\'moveclick(document.frmevent.elements["'.$leftList.'[]"],document.frmevent.elements["'.$rightList.'[]"]);\' multiple="multiple" >';
-				foreach ($entitylist as $entity){
-					$form_content .=  '<option value="'.$entity->entity_id.'" selected="selected" >'.$entity->entity_label.'</option>';
-				}
-				
-				$form_content .= '</select><br/>';
-				$form_content .= '<em><a href=\'javascript:selectall(document.forms["frmevent"].elements["'.$leftList.'[]"]);\' >'._SELECT_ALL.'</a></em>';
-			$form_content .= '</td>';
-			$form_content .= '<td>';
-			$form_content .= '<input type="button" class="button" value="'._ADD.'&gt;&gt;" onclick=\'Move(document.frmevent.elements["'.$leftList.'[]"],document.frmevent.elements["'.$rightList.'[]"]);\' />';
-                $form_content .= '<br />';
-                $form_content .= '<br />';
-                $form_content .= '<input type="button" class="button" value="&lt;&lt;'._REMOVE.'"  onclick=\'Move(document.frmevent.elements["'.$rightList.'[]"],document.frmevent.elements["'.$leftList.'[]"]);selectall(document.forms["frmevent"].elements["'.$rightList.'[]"]);\' />';
-			$form_content .= '</td>';
-			$form_content .= '<td>';
-				$form_content .= '<select name="'.$rightList.'[]" id="'.$rightList.'" size="7" ondblclick=\'moveclick(document.frmevent.elements["'.$rightList.'[]"],document.frmevent.elements["'.$leftList.'"]);selectall(document.forms["frmevent"].elements["'.$rightList.'[]"]);\' multiple="multiple" >';
-				$form_content .= '</select><br/>';
-				$form_content .= '<em><a href=\'javascript:selectall(document.forms["frmevent"].elements["'.$rightList.'[]"]);\' >'._SELECT_ALL.'</a></em>';
-			$form_content .= '</td>';
-		$form_content .= '</tr>';
-	$form_content .= '</table>';
-	break;
-	
-case 'recipients':
-	$entities = "'". str_replace(",", "','", $notification->diffusion_properties) . "'";
-	$query = "SELECT distinct us.*" 
-		. " FROM users_entities ue "
-		. " LEFT JOIN users us ON us.user_id = ue.user_id "
-		. " WHERE ue.entity_id in (".$entities.")";
-	$dbRecipients = new Database();
-	$stmt = $dbRecipients->query($query);
-	$recipients = array();
-	while($recipient = $stmt->fetchObject()) {
-		$recipients[] = $recipient;
-	}
-	break;
+switch ($request) {
+    case 'recipients':
+        $entities = "'".str_replace(',', "','", $notification->diffusion_properties)."'";
+        $query = 'SELECT distinct us.*'
+            .' FROM users_entities ue '
+            .' LEFT JOIN users us ON us.user_id = ue.user_id '
+            .' WHERE ue.entity_id in ('.$entities.')';
+        $dbRecipients = new Database();
+        $stmt = $dbRecipients->query($query);
+        $recipients = array();
+        while ($recipient = $stmt->fetchObject()) {
+            $recipients[] = $recipient;
+        }
+        break;
 
-case 'attach':
-
-	$attach = false;
-	if ($notification->diffusion_type === 'dest_entity') {
-		$tmp_entities = explode(',', $notification->attachfor_properties);
-		$attach = in_array($user_id, $tmp_entities);
-	} else {
-		$entities = "'". str_replace(",", "','", $notification->attachfor_properties) . "'";
-		$query = "SELECT user_id"
-			. " FROM users_entities"
-			. " WHERE entity_id in (".$entities.")"
-			. " AND user_id = ?";
-		$dbAttach = new Database();
-		$stmt = $dbAttach->query($query, array($user_id));
-		if($stmt->rowCount() > 0) {
-			$attach = true;
-		}
-	}
-	break;
+    case 'attach':
+        $attach = false;
+        if ($notification->diffusion_type === 'dest_entity') {
+            $tmp_entities = explode(',', $notification->attachfor_properties);
+            $attach = in_array($user_id, $tmp_entities);
+        } else {
+            $entities = "'".str_replace(',', "','", $notification->attachfor_properties)."'";
+            $query = 'SELECT user_id'
+                .' FROM users_entities'
+                .' WHERE entity_id in ('.$entities.')'
+                .' AND user_id = ?';
+            $dbAttach = new Database();
+            $stmt = $dbAttach->query($query, array($user_id));
+            if ($stmt->rowCount() > 0) {
+                $attach = true;
+            }
+        }
+        break;
 }
-
-?>
\ No newline at end of file
diff --git a/modules/notifications/diffusion_types/group.php b/modules/notifications/diffusion_types/group.php
index 3b4d4e4472ec527df2c97f249a1cd9393286bdb4..25c96fe78d73a129c8a92a7bbe7193d457786cb6 100755
--- a/modules/notifications/diffusion_types/group.php
+++ b/modules/notifications/diffusion_types/group.php
@@ -23,67 +23,32 @@ require_once 'core/core_tables.php';
 require_once 'core/class/class_request.php';
 require_once 'core/class/usergroups_controler.php';
 
-switch($request) {
-case 'form_content':
-	$UsrGrpCtl = new usergroups_controler();
-	$usergrouplist = $UsrGrpCtl->getAllUsergroups();
-	
-	$form_content .= '<input type="hidden" name="'.$formId.'" id="'.$formId.'" value="group">';
-	$form_content .= '<p class="sstit">' . _NOTIFICATIONS_GROUP_DIFF_TYPE . '</p>';
-	$form_content .= '<table>';
-		$form_content .= '<tr>';
-			$form_content .= '<td>';
-				$form_content .= '<select name="'.$leftList.'[]" id="'.$leftList.'" size="7" ondblclick=\'moveclick(document.frmevent.elements["'.$leftList.'[]"],document.frmevent.elements["'.$rightList.'[]"]);\' multiple="multiple" >';
-				foreach ($usergrouplist as $usergroup) {
-					$form_content .=  '<option value="'.$usergroup->group_id.'" selected="selected" >'.$usergroup->group_desc.'</option>';
-				}
-				
-				$form_content .= '</select><br/>';
-				$form_content .= '<em><a href=\'javascript:selectall(document.forms["frmevent"].elements["'.$leftList.'[]"]);\' >'._SELECT_ALL.'</a></em>';
-			$form_content .= '</td>';
-			$form_content .= '<td>';
-			$form_content .= '<input type="button" class="button" value="'._ADD.'&gt;&gt;" onclick=\'Move(document.frmevent.elements["'.$leftList.'[]"],document.frmevent.elements["'.$rightList.'[]"]);\' />';
-                $form_content .= '<br />';
-                $form_content .= '<br />';
-                $form_content .= '<input type="button" class="button" value="&lt;&lt;'._REMOVE.'"  onclick=\'Move(document.frmevent.elements["'.$rightList.'[]"],document.frmevent.elements["'.$leftList.'[]"]);selectall(document.forms["frmevent"].elements["'.$rightList.'[]"]);\' />';
-			$form_content .= '</td>';
-			$form_content .= '<td>';
-				$form_content .= '<select name="'.$rightList.'[]" id="'.$rightList.'" size="7" ondblclick=\'moveclick(document.frmevent.elements["'.$rightList.'[]"],document.frmevent.elements["'.$leftList.'"]);selectall(document.forms["frmevent"].elements["'.$rightList.'[]"]);\' multiple="multiple" >';
-				$form_content .= '</select><br/>';
-				$form_content .= '<em><a href=\'javascript:selectall(document.forms["frmevent"].elements["'.$rightList.'[]"]);\' >'._SELECT_ALL.'</a></em>';
-			$form_content .= '</td>';
-		$form_content .= '</tr>';
-	$form_content .= '</table>';
-	break;
-	
-case 'recipients':
-	$groups = "'". str_replace(",", "','", $notification->diffusion_properties) . "'";
-	$query = "SELECT distinct us.*" 
-		. " FROM usergroup_content ug "
-		. "	LEFT JOIN users us ON us.user_id = ug.user_id" 
-		. " WHERE ug.group_id in (".$groups.")";
-	$dbRecipients = new Database();
-	$stmt = $dbRecipients->query($query);
-	$recipients = array();
-	while($recipient = $stmt->fetchObject()) {
-		$recipients[] = $recipient;
-	}
-	break;
-
-case 'attach':
-	$groups = "'". str_replace(",", "','", $notification->attachfor_properties) . "'";
-	$query = "SELECT user_id" 
-		. " FROM usergroup_content"
-		. " WHERE group_id in (".$groups.")"
-		. " AND user_id = ?";
-	$attach = false;
-	$dbAttach = new Database();
-	$stmt = $dbAttach->query($query, array($user_id));
-	if($stmt->rowCount() > 0) {
-		$attach = true;
-	}
-	break;
+switch ($request) {
+    case 'recipients':
+        $groups = "'".str_replace(',', "','", $notification->diffusion_properties)."'";
+        $query = 'SELECT distinct us.*'
+            .' FROM usergroup_content ug '
+            .'	LEFT JOIN users us ON us.user_id = ug.user_id'
+            .' WHERE ug.group_id in ('.$groups.')';
+        $dbRecipients = new Database();
+        $stmt = $dbRecipients->query($query);
+        $recipients = array();
+        while ($recipient = $stmt->fetchObject()) {
+            $recipients[] = $recipient;
+        }
+        break;
 
+    case 'attach':
+        $groups = "'".str_replace(',', "','", $notification->attachfor_properties)."'";
+        $query = 'SELECT user_id'
+            .' FROM usergroup_content'
+            .' WHERE group_id in ('.$groups.')'
+            .' AND user_id = ?';
+        $attach = false;
+        $dbAttach = new Database();
+        $stmt = $dbAttach->query($query, array($user_id));
+        if ($stmt->rowCount() > 0) {
+            $attach = true;
+        }
+        break;
 }
-
-
diff --git a/modules/notifications/diffusion_types/note_copy_list.php b/modules/notifications/diffusion_types/note_copy_list.php
deleted file mode 100755
index 4751fb310948192b9fb7446092025432034e7772..0000000000000000000000000000000000000000
--- a/modules/notifications/diffusion_types/note_copy_list.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
-/*
-*    Copyright 2008-2015 Maarch
-*
-*  This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-switch ($request) {
-case 'form_content':
-//Affichage du formulaire/interface dans l'administration des notification => Envoi Ajax
-	$form_content .= '<p class="sstit">' . _NOTIFICATIONS_COPY_LIST_DIFF_TYPE . '</p>';
-	break;
-
-case 'recipients':
-	$query = "SELECT distinct us.* "
-		. " FROM listinstance li JOIN users us ON li.item_id = us.user_id " 
-            . " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id "
-		. " WHERE notes.coll_id = 'letterbox_coll' AND notes.id = ? AND item_type='user_id' AND item_mode = 'cc'"
-        . " AND li.item_id != notes.user_id";
-
-	$dbRecipients = new Database();
-	$stmt = $dbRecipients->query($query, array($event->record_id));
-	$recipients = array();
-	while($recipient = $stmt->fetchObject()) {
-		$recipients[] = $recipient;
-	}
-	break;
-	
-case 'attach':
-	$attach = false;
-	break;
-}
-?>
diff --git a/modules/notifications/diffusion_types/note_dest_user.php b/modules/notifications/diffusion_types/note_dest_user.php
deleted file mode 100755
index d8340f5088d082e2ff661f1c653d2af5b0b02fdd..0000000000000000000000000000000000000000
--- a/modules/notifications/diffusion_types/note_dest_user.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-/*
-*    Copyright 2008-2015 Maarch
-*
-*  This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-switch ($request) {
-case 'form_content':
-	$form_content .= '<p class="sstit">' . _NOTIFICATIONS_DEST_USER_DIFF_TYPE . '</p>';
-	break;
-
-case 'recipients':
-	$query = "SELECT distinct us.* "
-		. " FROM listinstance li JOIN users us ON li.item_id = us.user_id "
-            . " JOIN notes ON notes.coll_id = li.coll_id AND notes.identifier = li.res_id "
-		. " WHERE notes.coll_id = 'letterbox_coll' AND notes.id = ? AND li.item_mode = 'dest'"
-        . " AND li.item_id != notes.user_id";
-	$dbRecipients = new Database();
-	$stmt = $dbRecipients->query($query, array($event->record_id));
-	$recipients = array();
-	while($recipient = $stmt->fetchObject()) {
-		$recipients[] = $recipient;
-	}
-	break;
-
-case 'attach':
-	$attach = false;
-	break;
-
-}
-?>
diff --git a/modules/notifications/diffusion_types/user.php b/modules/notifications/diffusion_types/user.php
index d66e0574a9e0ebc20443df255280be4766e53763..bf2e2369322cc478262a35389044a470922137ec 100755
--- a/modules/notifications/diffusion_types/user.php
+++ b/modules/notifications/diffusion_types/user.php
@@ -1,86 +1,43 @@
 <?php
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
 
-/*
-*    Copyright 2008-2015 Maarch
 *
-*  This file is part of Maarch Framework.
+* @brief   user
 *
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
+* @author  dev <dev@maarch.org>
+* @ingroup notifications
 */
-
 require_once 'core/core_tables.php';
 require_once 'core/class/class_request.php';
 require_once 'core/class/users_controler.php';
 
-switch($request) {
-case 'form_content':
-	//Recuperer l ensemble des utilisateurs valides
-	$usrCtl = new users_controler();
-	$userslist = $usrCtl->getAllUsers('order by lastname');
-	
-	$form_content .= '<input type="hidden" name="'.$formId.'" id="'.$formId.'" value="user">';
-	$form_content .= '<p class="sstit">' . _NOTIFICATIONS_USER_DIFF_TYPE . '</p>';
-	$form_content .= '<table>';
-		$form_content .= '<tr>';
-			$form_content .= '<td>';
-				$form_content .= '<select name="'.$leftList.'[]" id="'.$leftList.'" size="7" 	ondblclick=\'moveclick(document.frmevent.elements["'.$leftList.'[]"],document.frmevent.elements["'.$rightList.'[]"]);\' multiple="multiple" >';
-				foreach ($userslist as $user){
-					$form_content .=  '<option value="'.$user->user_id.'" selected="selected" >'.$user->lastname.' '.$user->firstname.'</option>';
-				}
-				
-				$form_content .= '</select><br/>';
-				$form_content .= '<em><a href=\'javascript:selectall(document.forms["frmevent"].elements["'.$leftList.'[]"]);\' >'._SELECT_ALL.'</a></em>';
-			$form_content .= '</td>';
-			$form_content .= '<td>';
-			$form_content .= '<input type="button" class="button" value="'._ADD.'&gt;&gt;" onclick=\'Move(document.frmevent.elements["'.$leftList.'[]"],document.frmevent.elements["'.$rightList.'[]"]);\' />';
-                $form_content .= '<br />';
-                $form_content .= '<br />';
-                $form_content .= '<input type="button" class="button" value="&lt;&lt;'._REMOVE.'"  onclick=\'Move(document.frmevent.elements["'.$rightList.'[]"],document.frmevent.elements["'.$leftList.'[]"]);selectall(document.forms["frmevent"].elements["'.$rightList.'[]"]);\' />';
-			$form_content .= '</td>';
-			$form_content .= '<td>';
-				$form_content .= '<select name="'.$rightList.'[]" id="'.$rightList.'" size="7" ondblclick=\'moveclick(document.frmevent.elements["'.$rightList.'[]"],document.frmevent.elements["'.$leftList.'"]);selectall(document.forms["frmevent"].elements["'.$rightList.'[]"]);\' multiple="multiple" >';
-				$form_content .= '</select><br/>';
-				$form_content .= '<em><a href=\'javascript:selectall(document.forms["frmevent"].elements["'.$rightList.'[]"]);\' >'._SELECT_ALL.'</a></em>';
-			$form_content .= '</td>';
-		$form_content .= '</tr>';
-	$form_content .= '</table>';
-	
-	break;
-
-case 'recipients':	
-	$users = "'". str_replace(",", "','", $notification->diffusion_properties) . "'";
-	$query = "SELECT us.*" 
-		. " FROM users us"
-		. " WHERE us.user_id in (".$users.")";
-	$dbRecipients = new Database();
-	$stmt = $dbRecipients->query($query);
-	$recipients = array();
-	while($recipient = $stmt->fetchObject()) {
-		$recipients[] = $recipient;
-	}
-	break;
+switch ($request) {
+    case 'recipients':
+        $users = "'".str_replace(',', "','", $notification->diffusion_properties)."'";
+        $query = 'SELECT us.*'
+            .' FROM users us'
+            .' WHERE us.user_id in ('.$users.')';
+        $dbRecipients = new Database();
+        $stmt = $dbRecipients->query($query);
+        $recipients = array();
+        while ($recipient = $stmt->fetchObject()) {
+            $recipients[] = $recipient;
+        }
+        break;
 
-case 'attach':
-	$users = "'". str_replace(",", "','", (string)$notification->attachfor_properties) . "'";
-	$query = "SELECT user_id" 
-		. " FROM users"
-		. " WHERE '".$user_id."' in (".$users.")";
-	$attach = false;
-	$dbAttach = new Database();
-	$stmt = $dbAttach->query($query);
-	if($stmt->rowCount() > 0) {
-		$attach = true;
-	}
-	break;	
+    case 'attach':
+        $users = "'".str_replace(',', "','", (string) $notification->attachfor_properties)."'";
+        $query = 'SELECT user_id'
+            .' FROM users'
+            ." WHERE '".$user_id."' in (".$users.')';
+        $attach = false;
+        $dbAttach = new Database();
+        $stmt = $dbAttach->query($query);
+        if ($stmt->rowCount() > 0) {
+            $attach = true;
+        }
+        break;
 }
diff --git a/modules/notifications/manage_notifications.php b/modules/notifications/manage_notifications.php
index 36f288d35d68fb65ed933229d3c720d92f119782..c38ad01bedf4c0c9c1cd03f64205fb6fca9838c0 100755
--- a/modules/notifications/manage_notifications.php
+++ b/modules/notifications/manage_notifications.php
@@ -8,7 +8,7 @@ if ($mode == 'list') {
         $notifsList['title'],
         'notification_sid',
         'manage_notifications_controler&mode=list',
-        'notifications','notification_sid',
+        'notifications', 'notification_sid',
         true,
         $notifsList['page_name_up'],
         $notifsList['page_name_val'],
@@ -36,175 +36,158 @@ if ($mode == 'list') {
             echo _MODIFY_NOTIF;
         } elseif ($mode == 'add') {
             echo _ADD_NOTIF;
-        }?>
+        } ?>
     </h1>
     <div id="inner_content" class="clearfix" align="center">   
     <?php
     if ($state == false) {
-        echo '<br /><br /><br /><br />' . _NOTIFICATION_ID . ' ' . $_SESSION['m_admin']['notification']['notification_sid'] . ' ' . _UNKNOWN
-        . '<br /><br /><br /><br />';
-    } else {?>
+        echo '<br /><br /><br /><br />'._NOTIFICATION_ID.' '.$_SESSION['m_admin']['notification']['notification_sid'].' '._UNKNOWN
+        .'<br /><br /><br /><br />';
+    } else {
+        ?>
     <div class="block">
     <form name="frmevent" id="frmevent" method="post" action="<?php
-        echo $_SESSION['config']['businessappurl'] . 'index.php?display=true'
-        . '&amp;module=notifications&amp;page=manage_notifications_controler&amp;mode='
-        . $mode;?>" class="forms addforms">
+        echo $_SESSION['config']['businessappurl'].'index.php?display=true'
+        .'&amp;module=notifications&amp;page=manage_notifications_controler&amp;mode='
+        .$mode; ?>" class="forms addforms">
         <input type="hidden" name="display" value="true" />
         <input type="hidden" name="admin" value="notifications" />
         <input type="hidden" name="page" value="manage_notifications_controler" />
-        <input type="hidden" name="mode" value="<?php functions::xecho($mode);?>" />
+        <input type="hidden" name="mode" value="<?php functions::xecho($mode); ?>" />
 
-        <input type="hidden" name="notification_sid" id="notification_sid" value="<?php functions::xecho($_SESSION['m_admin']['notification']['notification_sid']);?>" />
+        <input type="hidden" name="notification_sid" id="notification_sid" value="<?php functions::xecho($_SESSION['m_admin']['notification']['notification_sid']); ?>" />
 
         <input type="hidden" name="order" id="order" value="<?php
-            functions::xecho($_REQUEST['order']);?>" />
+            functions::xecho($_REQUEST['order']); ?>" />
         <input type="hidden" name="order_field" id="order_field" value="<?php
-            functions::xecho($_REQUEST['order_field']);?>" />
+            functions::xecho($_REQUEST['order_field']); ?>" />
         <input type="hidden" name="what" id="what" value="<?php
-            functions::xecho($_REQUEST['what']);?>" />
+            functions::xecho($_REQUEST['what']); ?>" />
         <input type="hidden" name="start" id="start" value="<?php
-            functions::xecho($_REQUEST['start']);?>" />
+            functions::xecho($_REQUEST['start']); ?>" />
 
 
         <p>
-            <label for="label"><?php echo _NOTIFICATION_ID;?> : </label>
+            <label for="label"><?php echo _NOTIFICATION_ID; ?> : </label>
             <input name="notification_id" type="text" id="notification_id" value="<?php
                 echo functions::show_str(
                     $_SESSION['m_admin']['notification']['notification_id']
-                );?>"/>
+                ); ?>"/>
         </p>
         <p>
-            <label for="label"><?php echo _DESC;?> : </label>
+            <label for="label"><?php echo _DESC; ?> : </label>
             <textarea name="description" cols="80" rows="2" id="description"><?php
                 echo functions::show_str(
                     $_SESSION['m_admin']['notification']['description']
-                );?></textarea>
+                ); ?></textarea>
         </p>
          <p>
-            <label><?php echo _ENABLED;?> : </label>
+            <label><?php echo _ENABLED; ?> : </label>
             <input type="radio" class="check" name="is_enabled" value="true" <?php
             if (isset($_SESSION['m_admin']['notification']['is_enabled'])
-                && $_SESSION['m_admin']['notification']['is_enabled'] == "Y"
+                && $_SESSION['m_admin']['notification']['is_enabled'] == 'Y'
             ) {
                 ?> checked="checked"<?php
-            }
-            ?> /><?php echo _YES;?>
+            } ?> /><?php echo _YES; ?>
                 <input type="radio" class="check" name="is_enabled" value="false" <?php
             if (!isset($_SESSION['m_admin']['notification']['is_enabled'])
-                || (!($_SESSION['m_admin']['notification']['is_enabled'] == "Y")
+                || (!($_SESSION['m_admin']['notification']['is_enabled'] == 'Y')
                 || $_SESSION['m_admin']['notification']['is_enabled'] == '')
             ) {
                 ?> checked="checked"<?php
-            }
-            ?> /><?php echo _NO;?>
+            } ?> /><?php echo _NO; ?>
         </p>
         <p>
-            <label for="label"><?php echo _EVENT;?> : </label>
+            <label for="label"><?php echo _EVENT; ?> : </label>
             <select name="event_id" id="event_id">
-				<option value=""><?php echo _SELECT_EVENT_TYPE;?></option>
-                <optgroup label="<?php echo _ACTIONS;?>">
+				<option value=""><?php echo _SELECT_EVENT_TYPE; ?></option>
+                <optgroup label="<?php echo _ACTIONS; ?>">
                 <?php
-                foreach($actions_list as $this_action){
-                    ?><option value="<?php functions::xecho($this_action->id);?>"
+                foreach ($actions_list as $this_action) {
+                    ?><option value="<?php functions::xecho($this_action->id); ?>"
                     <?php
-                    if($_SESSION['m_admin']['notification']['event_id']
+                    if ($_SESSION['m_admin']['notification']['event_id']
                         == $this_action->id) {
                         echo 'selected="selected"';
-                    }?>><?php functions::xecho($this_action->label_action);
-                    ?></option><?php
+                    } ?>><?php functions::xecho($this_action->label_action); ?></option><?php
                 }
 
-                //Récupération des éléments systèmes
-                ?></optgroup><?php
-                $newarray = array_keys($_SESSION['notif_events']);
-                ?><optgroup label="<?php echo _SYSTEM;?>"><?php
-                foreach($_SESSION['notif_events'] as $event_type_id => $event_type_label){
-                    ?><option value="<?php functions::xecho($event_type_id);?>"
+        //Récupération des éléments systèmes ?></optgroup><?php
+                $newarray = array_keys($_SESSION['notif_events']); ?><optgroup label="<?php echo _SYSTEM; ?>"><?php
+                foreach ($_SESSION['notif_events'] as $event_type_id => $event_type_label) {
+                    ?><option value="<?php functions::xecho($event_type_id); ?>"
                     <?php
-                    if($_SESSION['m_admin']['notification']['event_id']
+                    if ($_SESSION['m_admin']['notification']['event_id']
                         == $event_type_id) {
                         echo 'selected="selected"';
-                    }?>><?php functions::xecho($event_type_label);
-                    ?></option><?php
-                }
-                ?>
+                    } ?>><?php functions::xecho($event_type_label); ?></option><?php
+                } ?>
                 </optgroup>
             </select>
         </p>
         <p style="display:none">
-            <label><?php echo _NOTIFICATION_MODE;?> :</label>
+            <label><?php echo _NOTIFICATION_MODE; ?> :</label>
             <input type="radio" name="notification_mode" value="EMAIL"
                 onClick="javascript:window.document.getElementById('template_div').style.display = 'block';
 				window.document.getElementById('rss_url_div').style.display = 'none';" <?php
-                if ($_SESSION['m_admin']['notification']['notification_mode'] == '' 
+                if ($_SESSION['m_admin']['notification']['notification_mode'] == ''
                     || $_SESSION['m_admin']['notification']['notification_mode'] == 'EMAIL'
                 ) {
-                    echo 'checked="checked"'; 
-                }?>/> <?php echo _EMAIL;?>
+                    echo 'checked="checked"';
+                } ?>/> <?php echo _EMAIL; ?>
             <input type="radio" name="notification_mode" value="RSS"
                 onClick="javascript:window.document.getElementById('rss_url_div').style.display = 'block';
 				window.document.getElementById('template_div').style.display = 'none';" <?php
                 if ($_SESSION['m_admin']['notification']['notification_mode'] == 'RSS'
                 ) {
-                    echo 'checked="checked"'; 
-                }?>/> <?php echo _RSS;?>
+                    echo 'checked="checked"';
+                } ?>/> <?php echo _RSS; ?>
         </p>
         <div id="template_div" name="template_div">
         <p>
-            <label for="label"><?php echo _TEMPLATE;?> : </label>
+            <label for="label"><?php echo _TEMPLATE; ?> : </label>
             <select name="template_id" id="template_id">
-                <option value=""><?php echo _SELECT_TEMPLATE;?></option>
+                <option value=""><?php echo _SELECT_TEMPLATE; ?></option>
                 <?php
-                foreach($templates_list as $template){
+                foreach ($templates_list as $template) {
                     if ($template['TYPE'] === 'HTML' && ($template['TARGET'] == 'notifications' || $template['TARGET'] == '')) {
-                        ?><option value="<?php functions::xecho($template['ID']);?>"
+                        ?><option value="<?php functions::xecho($template['ID']); ?>"
                         <?php
-                        if($_SESSION['m_admin']['notification']['template_id']
+                        if ($_SESSION['m_admin']['notification']['template_id']
                             == $template['ID']) {
                             echo 'selected="selected"';
-                        }?>><?php functions::xecho($template['LABEL']);
-                        ?></option><?php
+                        } ?>><?php functions::xecho($template['LABEL']); ?></option><?php
                     }
-                }
-                ?>
+                } ?>
             </select>
         </p>
         </div>
-		<div id="rss_url_div" name="rss_url_div" style="width:600px; align=left; display:none;" >
-			<p>
-            <label for="label"><?php echo _RSS_URL_TEMPLATE;?> : </label>
-            <textarea name="rss_url_template" type="text" id="rss_url_template" style="width:340px; height=60px">
-			<?php
-                echo functions::show_str(
-                    $_SESSION['m_admin']['notification']['rss_url_template']
-                ); 
-			?></textarea>
-			</p>
-		</div>
        
         <p>
-            <label for="status"><?php echo _DIFFUSION_TYPE;?> : </label>
+            <label for="status"><?php echo _DIFFUSION_TYPE; ?> : </label>
             <select name="diffusion_type"
 					id="status" 
 					onchange="change_properties_box(
 						this.options[this.selectedIndex].value,
-						'<?php echo $_SESSION['config']['businessappurl'];?>index.php?display=true&module=notifications&page=load_diffusiontype_formcontent',
+						'<?php echo $_SESSION['config']['businessappurl']; ?>index.php?display=true&module=notifications&page=load_diffusiontype_formcontent',
 						'diff_type_div',
 						'notifications',
 						'');clear_attach_type();set_attach_type(this.options[this.selectedIndex].value)">
 
-                <option value=""><?php echo _SELECT_DIFFUSION_TYPE;?></option>
+                <option value=""><?php echo _SELECT_DIFFUSION_TYPE; ?></option>
                 <?php
-                foreach($diffusion_types as $this_diffusion){ ?>
-                    <option value="<?php functions::xecho($this_diffusion->id);?>"
+                foreach ($diffusion_types as $this_diffusion) {
+                    ?>
+                    <option value="<?php functions::xecho($this_diffusion->id); ?>"
                         <?php
-                        if(trim($_SESSION['m_admin']['notification']['diffusion_type']) == trim($this_diffusion->id)) {
+                        if (trim($_SESSION['m_admin']['notification']['diffusion_type']) == trim($this_diffusion->id)) {
                             echo 'selected="selected"';
-                        }?>
+                        } ?>
                         >
                         <?php functions::xecho($this_diffusion->label); ?>
                     </option>
-                <?php } ?>
+                <?php
+                } ?>
             </select>
         </p>
 
@@ -216,165 +199,153 @@ if ($mode == 'list') {
         </div>
 		<p></p>
 		<p>
-            <label for="attach_for_type"><?php echo _ATTACH_MAIL_FILE;?> : </label>
+            <label for="attach_for_type"><?php echo _ATTACH_MAIL_FILE; ?> : </label>
 
             <select name="attach_for_type"
                     id="status" 
 					onchange="change_properties_box(
 						this.options[this.selectedIndex].value,
-						'<?php echo $_SESSION['config']['businessappurl'];?>index.php?display=true&module=notifications&page=load_attachfortype_formcontent',
+						'<?php echo $_SESSION['config']['businessappurl']; ?>index.php?display=true&module=notifications&page=load_attachfortype_formcontent',
 						'attach_for_div',
 						'notifications',
 						'');">
 
-                <option tag="voidAttach" value=""><?php echo _NEVER;?></option>
+                <option tag="voidAttach" value=""><?php echo _NEVER; ?></option>
                 <?php
-                foreach($diffusion_types as $this_diffusion){
-					if(
-                        $this_diffusion->id != 'dest_user' 
+                foreach ($diffusion_types as $this_diffusion) {
+                    if (
+                        $this_diffusion->id != 'dest_user'
                         && $this_diffusion->id != 'copy_list'
                         && $this_diffusion->id != 'dest_entity'
                         && $this_diffusion->id != 'note_dest_user'
                         && $this_diffusion->id != 'note_copy_list'
                     ) {
-						?><option tag="attach" value="<?php functions::xecho($this_diffusion->id);?>"
+                        ?><option tag="attach" value="<?php functions::xecho($this_diffusion->id); ?>"
 						<?php
-						if(trim($_SESSION['m_admin']['notification']['attachfor_type'])
-							== trim($this_diffusion->id)) {
-							echo 'selected="selected"';
-						}?>><?php functions::xecho($this_diffusion->label);
-						?></option><?php
-					}
-                }
-                ?>
+                        if (trim($_SESSION['m_admin']['notification']['attachfor_type'])
+                            == trim($this_diffusion->id)) {
+                            echo 'selected="selected"';
+                        } ?>><?php functions::xecho($this_diffusion->label); ?></option><?php
+                    }
+                } ?>
             </select>
         </p>
 
         <div id="attach_for_div" class="scroll_div" style="height:200px;width:600px;border:1px solid;">
 			<!-- div for attachment options -->
-			<p class="sstit"> <?php echo _NO_ATTACHMENT_WITH_NOTIFICATION;?></p>
+			<p class="sstit"> <?php echo _NO_ATTACHMENT_WITH_NOTIFICATION; ?></p>
         </div>
         <p class="buttons">
             <?php
-        if ($mode == 'up') {?>
+        if ($mode == 'up') {
+            ?>
             <input type="submit" class="button" name="notif_submit" value=
-            "<?php echo _VALIDATE;?>" />
+            "<?php echo _VALIDATE; ?>" />
             <?php
-        } elseif ($mode == 'add') {?>
+        } elseif ($mode == 'add') {
+            ?>
             <input type="submit" class="button" name="notif_submit" value=
-            "<?php echo _ADD;?>" />
+            "<?php echo _ADD; ?>" />
             <?php
-        }
-        ?>
+        } ?>
         <input type="button" class="button"  name="cancel" value="<?php
-         echo _CANCEL;?>" onclick="javascript:window.location.href='<?php
-         echo $_SESSION['config']['businessappurl'];
-         ?>index.php?page=manage_notifications_controler&amp;mode=list&amp;module=notifications'"/>
+         echo _CANCEL; ?>" onclick="javascript:window.location.href='<?php
+         echo $_SESSION['config']['businessappurl']; ?>index.php?page=manage_notifications_controler&amp;mode=list&amp;module=notifications'"/>
             <?php
 
-        $filename = "notification";
-        if (isset($_SESSION['custom_override_id']) && $_SESSION['custom_override_id']<>"") {
-            $filename.="_".str_replace(" ", "", $_SESSION['custom_override_id']);
+        $filename = 'notification';
+        if (isset($_SESSION['custom_override_id']) && $_SESSION['custom_override_id'] != '') {
+            $filename .= '_'.str_replace(' ', '', $_SESSION['custom_override_id']);
         }
-        $filename.="_".$notification_sid.".sh";
-        
-        if ($_SESSION['custom_override_id'] <> '') {
-            $pathToFolow = $_SESSION['config']['corepath'] . 'custom/'.$_SESSION['custom_override_id'] . '/';
+        $filename .= '_'.$notification_sid.'.sh';
+
+        if ($_SESSION['custom_override_id'] != '') {
+            $pathToFolow = $_SESSION['config']['corepath'].'custom/'.$_SESSION['custom_override_id'].'/';
         } else {
             $pathToFolow = $_SESSION['config']['corepath'];
         }
-        
-        if ($mode == 'up' && PHP_OS == "Linux" && !file_exists($pathToFolow.'modules/notifications/batch/scripts/'.$filename)) {?>
-            <input class="button" type="button" name="create_notif_script" id="create_notif_script" value="<?php echo _CREATE_NOTIF_SCRIPT;?>" 
-            onclick="createNotifScript('<?php echo $_SESSION['config']['businessappurl'];
-         ?>index.php?display=true&amp;page=create_notif_script&amp;module=notifications', '<?php functions::xecho($_SESSION['m_admin']['notification']['notification_sid']);?>', '<?php echo $_SESSION['m_admin']['notification']['notification_id'];?>')"/>
+
+        if ($mode == 'up' && PHP_OS == 'Linux' && !file_exists($pathToFolow.'modules/notifications/batch/scripts/'.$filename)) {
+            ?>
+            <input class="button" type="button" name="create_notif_script" id="create_notif_script" value="<?php echo _CREATE_NOTIF_SCRIPT; ?>" 
+            onclick="createNotifScript('<?php echo $_SESSION['config']['businessappurl']; ?>index.php?display=true&amp;page=create_notif_script&amp;module=notifications', '<?php functions::xecho($_SESSION['m_admin']['notification']['notification_sid']); ?>', '<?php echo $_SESSION['m_admin']['notification']['notification_id']; ?>')"/>
             <?php
-        }
-        ?>
+        } ?>
     </p>
     </form >
     </div>
 <?php
-    }
-   ?></div><?php
-	
-	// Manage notification mode
-	if ($_SESSION['m_admin']['notification']['notification_mode'] == 'EMAIL' 
-		|| $_SESSION['m_admin']['notification']['notification_mode'] == '') {
-		?>
+    } ?></div><?php
+
+    // Manage notification mode
+    if ($_SESSION['m_admin']['notification']['notification_mode'] == 'EMAIL'
+        || $_SESSION['m_admin']['notification']['notification_mode'] == '') {
+        ?>
         <script language="javascript">
 			window.document.getElementById('rss_url_div').style.display = 'none';
 			window.document.getElementById('template_div').style.display = 'block';
         </script>
-        <?php		
-	} elseif ($_SESSION['m_admin']['notification']['notification_mode'] == 'RSS')  {
-		?>
+        <?php
+    } elseif ($_SESSION['m_admin']['notification']['notification_mode'] == 'RSS') {
+        ?>
         <script language="javascript">
 			window.document.getElementById('rss_url_div').style.display = 'block';
 			window.document.getElementById('template_div').style.display = 'none';
         </script>
         <?php
-	}
-	// Manage Diffusion type Div & content
-    if ($_SESSION['m_admin']['notification']['diffusion_type'] <> '')
-    {
-        /*First Launch */
-        ?>
+    }
+    // Manage Diffusion type Div & content
+    if ($_SESSION['m_admin']['notification']['diffusion_type'] != '') {
+        /*First Launch */ ?>
         <script language="javascript">
         change_properties_box(
-            '<?php functions::xecho($_SESSION['m_admin']['notification']['diffusion_type']);?>',
-            '<?php echo $_SESSION['config']['businessappurl'];?>index.php?display=true&module=notifications&page=load_diffusiontype_formcontent',
+            '<?php functions::xecho($_SESSION['m_admin']['notification']['diffusion_type']); ?>',
+            '<?php echo $_SESSION['config']['businessappurl']; ?>index.php?display=true&module=notifications&page=load_diffusiontype_formcontent',
             'diff_type_div',
             'notifications',
             '');
         </script>
         <?php
-        if ($_SESSION['m_admin']['notification']['diffusion_type'] <> '')
-        {
+        if ($_SESSION['m_admin']['notification']['diffusion_type'] != '') {
             //Loading Extra Javascript :
-            require_once 'modules' . DIRECTORY_SEPARATOR . 'notifications' . DIRECTORY_SEPARATOR
-                . 'class' . DIRECTORY_SEPARATOR . 'diffusion_type_controler.php';
+            require_once 'modules'.DIRECTORY_SEPARATOR.'notifications'.DIRECTORY_SEPARATOR
+                .'class'.DIRECTORY_SEPARATOR.'diffusion_type_controler.php';
             $Type = new diffusion_type_controler();
-            $dType = $Type->get($_SESSION['m_admin']['notification']['diffusion_type']);
-            ?>
+            $dType = $Type->get($_SESSION['m_admin']['notification']['diffusion_type']); ?>
             <script language="javascript">
             setTimeout(function(){loadDiffusionProperties(
-                '<?php functions::xecho($_SESSION['m_admin']['notification']['diffusion_type']);?>',
-                '<?php echo $_SESSION['config']['businessappurl'];?>index.php?display=true&module=notifications&page=load_diffusionproperties_formcontent'
+                '<?php functions::xecho($_SESSION['m_admin']['notification']['diffusion_type']); ?>',
+                '<?php echo $_SESSION['config']['businessappurl']; ?>index.php?display=true&module=notifications&page=load_diffusionproperties_formcontent'
                 )},500);
             </script>
             <?php
         }
     }
-	
-	// Manage Attachment Div & content
-	if ($_SESSION['m_admin']['notification']['attachfor_type'] <> '')
-    {
-        /*First Launch */
-        ?>
+
+    // Manage Attachment Div & content
+    if ($_SESSION['m_admin']['notification']['attachfor_type'] != '') {
+        /*First Launch */ ?>
         <script language="javascript">
 		change_properties_box(
-            '<?php functions::xecho($_SESSION['m_admin']['notification']['attachfor_type']);?>',
-            '<?php echo $_SESSION['config']['businessappurl'];?>index.php?display=true&module=notifications&page=load_attachfortype_formcontent',
+            '<?php functions::xecho($_SESSION['m_admin']['notification']['attachfor_type']); ?>',
+            '<?php echo $_SESSION['config']['businessappurl']; ?>index.php?display=true&module=notifications&page=load_attachfortype_formcontent',
             'attach_for_div',
             'notifications',
             '');
         </script>
         <?php
-        if ($_SESSION['m_admin']['notification']['attachfor_type'] <> '')
-        {
+        if ($_SESSION['m_admin']['notification']['attachfor_type'] != '') {
             //Loading Extra Javascript :
-            require_once 'modules' . DIRECTORY_SEPARATOR . 'notifications' . DIRECTORY_SEPARATOR
-                . 'class' . DIRECTORY_SEPARATOR . 'diffusion_type_controler.php';
+            require_once 'modules'.DIRECTORY_SEPARATOR.'notifications'.DIRECTORY_SEPARATOR
+                .'class'.DIRECTORY_SEPARATOR.'diffusion_type_controler.php';
             $Type = new diffusion_type_controler();
 
             $dType = $Type->get($_SESSION['m_admin']['notification']['diffusion_type']);
-            //include_once ($dType->script);
-            ?>
+            //include_once ($dType->script); ?>
             <script language="javascript">
                 setTimeout(function () {loadAttachforProperties(
-                '<?php functions::xecho($_SESSION['m_admin']['notification']['attachfor_type']);?>',
-                '<?php echo $_SESSION['config']['businessappurl'];?>index.php?display=true&module=notifications&page=load_attachforproperties_formcontent',
+                '<?php functions::xecho($_SESSION['m_admin']['notification']['attachfor_type']); ?>',
+                '<?php echo $_SESSION['config']['businessappurl']; ?>index.php?display=true&module=notifications&page=load_attachforproperties_formcontent',
 				'attach_for_div'
                 )},500);
             </script>
diff --git a/modules/notifications/manage_notifications_controler.php b/modules/notifications/manage_notifications_controler.php
index cdddbdc11d2eb35e7e323f8c2ec535b5f7ce7685..c4c36dcd6287fec63b90be35ea67531960641820 100755
--- a/modules/notifications/manage_notifications_controler.php
+++ b/modules/notifications/manage_notifications_controler.php
@@ -9,24 +9,22 @@ if (isset($_REQUEST['mode']) && !empty($_REQUEST['mode'])) {
     $mode = $_REQUEST['mode'];
 }
 
-
-
-try{
+try {
     require_once 'core/class/ActionControler.php';
     require_once 'core/class/ObjectControlerAbstract.php';
     require_once 'core/class/ObjectControlerIF.php';
-    require_once 'modules/templates/class/templates_controler.php' ;
+    require_once 'modules/templates/class/templates_controler.php';
     require_once 'modules/notifications/class/notifications_controler.php';
     require_once 'modules/notifications/class/diffusion_type_controler.php';
     require_once 'modules/notifications/class/class_schedule_notifications.php';
-    
+
     if ($mode == 'list') {
-        require_once 'core/class/class_request.php' ;
-        require_once 'apps' . DIRECTORY_SEPARATOR
-                     . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR
-                     . 'class' . DIRECTORY_SEPARATOR . 'class_list_show.php' ;
-    }else if($mode == 'add' || $mode == 'up' || $mode == 'del'){
-        require_once 'core/class/class_request.php' ;
+        require_once 'core/class/class_request.php';
+        require_once 'apps'.DIRECTORY_SEPARATOR
+                     .$_SESSION['config']['app_id'].DIRECTORY_SEPARATOR
+                     .'class'.DIRECTORY_SEPARATOR.'class_list_show.php';
+    } elseif ($mode == 'add' || $mode == 'up' || $mode == 'del') {
+        require_once 'core/class/class_request.php';
     }
 } catch (Exception $e) {
     functions::xecho($e->getMessage());
@@ -38,7 +36,7 @@ $actions_list = $al->getAllActions();
 
 //Get list of aff availables status
 $select[STATUS_TABLE] = array();
-    array_push($select[STATUS_TABLE], 'id', 'label_status','img_filename');
+    array_push($select[STATUS_TABLE], 'id', 'label_status', 'img_filename');
 $request = new request();
 $where = '';
     $what = '';
@@ -55,21 +53,18 @@ $diffusion_types = $dt->getAllDiffusion();
 $tp = new templates_controler();
 $templates_list = $tp->getAllTemplatesForSelect();
 
-
 if (isset($_REQUEST['id']) && !empty($_REQUEST['id'])) {
     $notification_sid = $_REQUEST['id'];
 }
 
-
 if (isset($_REQUEST['notif_submit'])) {
     // Action to do with db
     validate_notif_submit();
-
 } else {
     // Display to do
     $state = true;
     switch ($mode) {
-        case 'up' :
+        case 'up':
             $state = display_up($notification_sid);
             $_SESSION['service_tag'] = 'notif_init';
             core_tools::execute_modules_services(
@@ -77,7 +72,7 @@ if (isset($_REQUEST['notif_submit'])) {
             );
             location_bar_management($mode);
             break;
-        case 'add' :
+        case 'add':
             display_add();
             $_SESSION['service_tag'] = 'notif_init';
             core_tools::execute_modules_services(
@@ -85,30 +80,30 @@ if (isset($_REQUEST['notif_submit'])) {
             );
             location_bar_management($mode);
             break;
-        case 'del' :
+        case 'del':
             display_del($notification_sid);
             break;
-        case 'list' :
+        case 'list':
             $notifsList = display_list();
             location_bar_management($mode);
            // print_r($statusList); exit();
             break;
     }
-    include('manage_notifications.php');
+    include 'manage_notifications.php';
 }
 
 /**
- * Management of the location bar
+ * Management of the location bar.
  */
 function location_bar_management($mode)
 {
-    $pageLabels = array('add'  => _ADDITION,
-                    'up'   => _MODIFICATION,
-                    'list' => _MANAGE_NOTIFS
+    $pageLabels = array('add' => _ADDITION,
+                    'up' => _MODIFICATION,
+                    'list' => _MANAGE_NOTIFS,
                );
     $pageIds = array('add' => 'notif_add',
                   'up' => 'notif_up',
-                  'list' => 'notif_list'
+                  'list' => 'notif_list',
             );
     $init = false;
     if (isset($_REQUEST['reinit']) && $_REQUEST['reinit'] == 'true') {
@@ -122,8 +117,8 @@ function location_bar_management($mode)
         $level = $_REQUEST['level'];
     }
 
-    $pagePath = $_SESSION['config']['businessappurl'] . 'index.php?page='
-               . 'manage_notifications_controler&module=notifications&mode=' . $mode ;
+    $pagePath = $_SESSION['config']['businessappurl'].'index.php?page='
+               .'manage_notifications_controler&module=notifications&mode='.$mode;
     $pageLabel = $pageLabels[$mode];
     $pageId = $pageIds[$mode];
     $ct = new core_tools();
@@ -131,12 +126,12 @@ function location_bar_management($mode)
 }
 
 /**
- * Initialize session parameters for update display
- * @param String $statusId
+ * Initialize session parameters for update display.
+ *
+ * @param string $statusId
  */
 function display_up($notification_sid)
 {
-	
     $notifCtrl = new notifications_controler();
     $state = true;
     $notif = $notifCtrl->get($notification_sid);
@@ -144,14 +139,15 @@ function display_up($notification_sid)
     if (empty($notif)) {
         $state = false;
     } else {
-		//var_dump($notif);
+        //var_dump($notif);
         put_in_session('notification', $notif->getArray());
     }
+
     return $state;
 }
 
 /**
- * Initialize session parameters for add display
+ * Initialize session parameters for add display.
  */
 function display_add()
 {
@@ -161,18 +157,18 @@ function display_add()
 }
 
 /**
- * Initialize session parameters for list display
+ * Initialize session parameters for list display.
  */
-function display_list() {
-
-    if (PHP_OS == "Linux") {
-	?>
+function display_list()
+{
+    if (PHP_OS == 'Linux') {
+        ?>
         <table>
         </table>
     	<table width="100%">
     	    <tr>
     	        <td align="right">
-    	            <input class="button" type="button" value="<?php echo _SCHEDULE_NOTIFICATIONS;?>" onclick="window.location.href='<?php echo $_SESSION['config']['businessappurl'] . 'index.php?page=schedule_notifications&module=notifications'?>'"/>      
+    	            <input class="button" type="button" value="<?php echo _SCHEDULE_NOTIFICATIONS; ?>" onclick="window.location.href='<?php echo $_SESSION['config']['businessappurl'].'index.php?page=schedule_notifications&module=notifications'; ?>'"/>      
     	        </td>
     	   </tr>
     	</table>
@@ -194,8 +190,8 @@ function display_list() {
     if (isset($_REQUEST['what'])) {
         $what = $_REQUEST['what'];
     }
-    $where .= " (lower(description) like lower(:what) or lower(notification_id) like lower(:what)) ";
-    $arrayPDO = array(":what" => $what."%");
+    $where .= ' (lower(description) like lower(:what) or lower(notification_id) like lower(:what)) ';
+    $arrayPDO = array(':what' => $what.'%');
 
     // Checking order and order_field values
     $order = 'asc';
@@ -213,9 +209,9 @@ function display_list() {
     $tab = $request->PDOselect(
         $select, $where, $arrayPDO, $orderstr, $_SESSION['config']['databasetype']
     );
-	//$request->show();
-	
-    for ($i=0;$i<count($tab);$i++) {
+    //$request->show();
+
+    for ($i = 0; $i < count($tab); ++$i) {
         foreach ($tab[$i] as &$item) {
             switch ($item['column']) {
                 case 'notification_sid':
@@ -238,68 +234,69 @@ function display_list() {
     }
     $_SESSION['m_admin']['init'] = true;
     $result = array(
-        'tab'                 => $tab,
-        'what'                => $what,
-        'page_name'           => 'manage_notifications_controler&mode=list',
-        'page_name_add'       => 'manage_notifications_controler&mode=add',
-        'page_name_up'        => 'manage_notifications_controler&mode=up',
-        'page_name_del'       => 'manage_notifications_controler&mode=del',
-        'page_name_val'       => '',
-        'page_name_ban'       => '',
-        'label_add'           => _ADD_NOTIF,
-        'title'               => _NOTIFS_LIST . ' : ' . $i,
+        'tab' => $tab,
+        'what' => $what,
+        'page_name' => 'manage_notifications_controler&mode=list',
+        'page_name_add' => 'manage_notifications_controler&mode=add',
+        'page_name_up' => 'manage_notifications_controler&mode=up',
+        'page_name_del' => 'manage_notifications_controler&mode=del',
+        'page_name_val' => '',
+        'page_name_ban' => '',
+        'label_add' => _ADD_NOTIF,
+        'title' => _NOTIFS_LIST.' : '.$i,
         'autoCompletionArray' => array(
-                                     'list_script_url'  =>
-                                        $_SESSION['config']['businessappurl']
-                                        . 'index.php?display=true&module=notifications'
-                                        . '&page=manage_notifs_list_by_name',
-                                     'number_to_begin'  => 1
+                                     'list_script_url' => $_SESSION['config']['businessappurl']
+                                        .'index.php?display=true&module=notifications'
+                                        .'&page=manage_notifs_list_by_name',
+                                     'number_to_begin' => 1,
                                  ),
-
     );
+
     return $result;
 }
 
 /**
- * Delete given status if exists and initialize session parameters
+ * Delete given status if exists and initialize session parameters.
+ *
  * @param string $statusId
  */
-function display_del($notification_sid) {
+function display_del($notification_sid)
+{
     $notifCtrl = new notifications_controler();
     $notif = $notifCtrl->get($notification_sid);
     if (isset($notif)) {
         // Deletion
         $control = array();
-        $params  = array( 'log_status_del' => $_SESSION['history']['eventdel'],
-                         'databasetype' => $_SESSION['config']['databasetype']
+        $params = array('log_status_del' => $_SESSION['history']['eventdel'],
+                         'databasetype' => $_SESSION['config']['databasetype'],
                         );
         $control = $notifCtrl->delete($notif, $params);
-        if (!empty($control['error']) && $control['error'] <> 1) {
-            $_SESSION['error'] = str_replace("#", "<br />", $control['error']);
+        if (!empty($control['error']) && $control['error'] != 1) {
+            $_SESSION['error'] = str_replace('#', '<br />', $control['error']);
         } else {
             $_SESSION['info'] = _NOTIF_DELETED.' : '.$notification_sid;
 
-            if (PHP_OS == "Linux") {
+            if (PHP_OS == 'Linux') {
                 // delete scheduled notification
-                $filename = "notification";
-                if (isset($_SESSION['custom_override_id']) && $_SESSION['custom_override_id']<>"") {
-                    $filename.="_".str_replace(" ", "", $_SESSION['custom_override_id']);
+                $filename = 'notification';
+                if (isset($_SESSION['custom_override_id']) && $_SESSION['custom_override_id'] != '') {
+                    $filename .= '_'.str_replace(' ', '', $_SESSION['custom_override_id']);
                 }
-                $filename.="_".$notification_sid.".sh";
+                $filename .= '_'.$notification_sid.'.sh';
 
                 $scheduleNotification = new ScheduleNotifications();
                 $cronTab = $scheduleNotification->getCrontab();
 
                 $flagCron = false;
 
-                if ($_SESSION['custom_override_id'] <> '') {
-                    $pathToFolow = $_SESSION['config']['corepath'] . 'custom/'.$_SESSION['custom_override_id'] . '/';
+                if ($_SESSION['custom_override_id'] != '') {
+                    $pathToFolow = $_SESSION['config']['corepath'].'custom/'.$_SESSION['custom_override_id'].'/';
                 } else {
                     $pathToFolow = $_SESSION['config']['corepath'];
                 }
 
                 foreach ($cronTab as $key => $value) {
-                    if($value['cmd'] == $pathToFolow.'modules/notifications/batch/scripts/'.$filename){
+                    if ($value['cmd'] == $pathToFolow.'modules/notifications/batch/scripts/'.$filename) {
                         $cronTab[$key]['state'] = 'deleted';
                         $flagCron = true;
                         break;
@@ -309,17 +306,15 @@ function display_del($notification_sid) {
                 if ($flagCron) {
                     $scheduleNotification->saveCrontab($cronTab, true);
                 }
-                
-                unlink($pathToFolow . 'modules/notifications/batch/scripts/' . $filename);
+
+                unlink($pathToFolow.'modules/notifications/batch/scripts/'.$filename);
             }
-        }
-        ?><script type="text/javascript">window.top.location='<?php
+        } ?><script type="text/javascript">window.top.location='<?php
             echo $_SESSION['config']['businessappurl']
-                . 'index.php?page=manage_notifications_controler&mode=list&module='
-                . 'notifications&order=' . $_REQUEST['order'] . '&order_field='
-                . $_REQUEST['order_field'] . '&start=' . $_REQUEST['start']
-                . '&what=' . $_REQUEST['what'];
-        ?>';</script>
+                .'index.php?page=manage_notifications_controler&mode=list&module='
+                .'notifications&order='.$_REQUEST['order'].'&order_field='
+                .$_REQUEST['order_field'].'&start='.$_REQUEST['start']
+                .'&what='.$_REQUEST['what']; ?>';</script>
         <?php
         exit();
     } else {
@@ -333,6 +328,7 @@ function display_del($notification_sid) {
  * NOTE: given item needs to be an array with at least 2 keys:
  * 'column' and 'value'.
  * NOTE: given item is modified consequently.
+ *
  * @param $item
  * @param $label
  * @param $size
@@ -362,82 +358,82 @@ function format_item(
 
 /**
  * Validate a submit (add or up),
- * up to saving object
+ * up to saving object.
  */
-function validate_notif_submit() {
-	$dType = new diffusion_type_controler();
-	$diffType = array();
-	$diffType = $dType->getAllDiffusion();
-   
+function validate_notif_submit()
+{
+    $dType = new diffusion_type_controler();
+    $diffType = array();
+    $diffType = $dType->getAllDiffusion();
+
     $notifCtrl = new notifications_controler();
     $pageName = 'manage_notifications_controler';
 
     $mode = $_REQUEST['mode'];
     $notifObj = new notifications();
-    
-    if ($mode <> 'add'){
-		$notifObj->notification_sid = $_REQUEST['notification_sid'];
-	}
+
+    if ($mode != 'add') {
+        $notifObj->notification_sid = $_REQUEST['notification_sid'];
+    }
     $notifObj->notification_id = $_REQUEST['notification_id'];
-	$notifObj->description = $_REQUEST['description'];
+    $notifObj->description = $_REQUEST['description'];
     $notifObj->notification_mode = $_REQUEST['notification_mode'];
     $notifObj->event_id = $_REQUEST['event_id'];
-	$notifObj->rss_url_template = $_REQUEST['rss_url_template'];
     $notifObj->template_id = $_REQUEST['template_id'];
     $notifObj->is_enabled = $_REQUEST['is_enabled'];
     $notifObj->diffusion_type = $_REQUEST['diffusion_type'];
     $notifObj->attachfor_type = $_REQUEST['attachfor_type'];
-    
-	foreach($diffType as $loadedType) 	{
-		if ($loadedType->id == $notifObj->diffusion_type){
-			if ($loadedType -> script <> '' && !empty($_REQUEST['diffusion_properties'])) {
-				$diffusion_properties_string = implode(',', $_REQUEST['diffusion_properties']);
-			} else {
-				$error .= 'System : Unable to load Require Script';
-			}
-		}
-		if ($loadedType->id == $notifObj->attachfor_type){
-			if ($loadedType -> script <> '' && !empty($_REQUEST['attachfor_properties'])) {
-				$attachfor_properties_string = implode(',', $_REQUEST['attachfor_properties']);
-			} else {
-				$error .= 'System : Unable to load Require Script';
-			}
-		}			
-	}		
-			
-	$notifObj->diffusion_properties = (string)$diffusion_properties_string;
-	$notifObj->attachfor_properties = (string)$attachfor_properties_string;
-	
+
+    foreach ($diffType as $loadedType) {
+        if ($loadedType->id == $notifObj->diffusion_type) {
+            if ($loadedType->script != '' && !empty($_REQUEST['diffusion_properties'])) {
+                $diffusion_properties_string = implode(',', $_REQUEST['diffusion_properties']);
+            } else {
+                $error .= 'System : Unable to load Require Script';
+            }
+        }
+        if ($loadedType->id == $notifObj->attachfor_type) {
+            if ($loadedType->script != '' && !empty($_REQUEST['attachfor_properties'])) {
+                $attachfor_properties_string = implode(',', $_REQUEST['attachfor_properties']);
+            } else {
+                $error .= 'System : Unable to load Require Script';
+            }
+        }
+    }
+
+    $notifObj->diffusion_properties = (string) $diffusion_properties_string;
+    $notifObj->attachfor_properties = (string) $attachfor_properties_string;
+
     $control = $notifCtrl->save($notifObj, $mode, $params);
 
-    if (!empty($control['error']) && $control['error'] <> 1) {
+    if (!empty($control['error']) && $control['error'] != 1) {
         // Error management depending of mode
-        $_SESSION['error'] = str_replace("#", "<br />", $control['error']);
+        $_SESSION['error'] = str_replace('#', '<br />', $control['error']);
         //put_in_session('event', $notif);
-		put_in_session('notification', $notifObj->getArray());
+        put_in_session('notification', $notifObj->getArray());
 
         switch ($mode) {
             case 'up':
                 if (!empty($notifObj->notification_sid)) {
                     header(
-                        'location: ' . $_SESSION['config']['businessappurl']
-                        . 'index.php?page=' . $pageName . '&mode=up&id='
-                        . $notifObj->notification_sid . '&module=notifications'
+                        'location: '.$_SESSION['config']['businessappurl']
+                        .'index.php?page='.$pageName.'&mode=up&id='
+                        .$notifObj->notification_sid.'&module=notifications'
                     );
                 } else {
                     header(
-                        'location: ' . $_SESSION['config']['businessappurl']
-                        . 'index.php?page=' . $pageName . '&mode=list&module='
-                        .'notifications&order=' . $status['order'] . '&order_field='
-                        . $status['order_field'] . '&start=' . $status['start']
-                        . '&what=' . $status['what']
+                        'location: '.$_SESSION['config']['businessappurl']
+                        .'index.php?page='.$pageName.'&mode=list&module='
+                        .'notifications&order='.$status['order'].'&order_field='
+                        .$status['order_field'].'&start='.$status['start']
+                        .'&what='.$status['what']
                     );
                 }
                 exit();
             case 'add':
                 header(
-                    'location: ' . $_SESSION['config']['businessappurl']
-                    . 'index.php?page=' . $pageName . '&mode=add&module=notifications'
+                    'location: '.$_SESSION['config']['businessappurl']
+                    .'index.php?page='.$pageName.'&mode=add&module=notifications'
                 );
                 exit();
         }
@@ -447,57 +443,56 @@ function validate_notif_submit() {
         } else {
             $_SESSION['info'] = _NOTIF_MODIFIED;
         }
-        
-        if (PHP_OS == "Linux") {
+
+        if (PHP_OS == 'Linux') {
             $ScheduleNotifications = new ScheduleNotifications();
             $ScheduleNotifications->createScriptNotification($control['value'], $notifObj->notification_id);
         }
 
         unset($_SESSION['m_admin']);
         header(
-            'location: ' . $_SESSION['config']['businessappurl']
-            . 'index.php?page=' . $pageName . '&mode=list&module=notifications&order='
-            . $status['order'] . '&order_field=' . $status['order_field']
-            . '&start=' . $status['start'] . '&what=' . $status['what']
+            'location: '.$_SESSION['config']['businessappurl']
+            .'index.php?page='.$pageName.'&mode=list&module=notifications&order='
+            .$status['order'].'&order_field='.$status['order_field']
+            .'&start='.$status['start'].'&what='.$status['what']
         );
     }
-   
 }
 
 function init_session()
 {
     $_SESSION['m_admin']['notification'] = array(
-        'notification_sid'  	    	=> '',
-		'notification_id'  	 	=> '',
-        'event_id'  			=> '',
-        'description'  			=> '',
-        'notification_mode'		=> '',
-        'rss_url_template' 	 	=> '',
-        'template_id'    	 	=> '',
-        'is_enabled'            => 'Y',
-        'diffusion_type'    	=> '',
-        'diffusion_properties'  => '',
-		//'diffusion_content'   => '',
-        'attachfor_type' 		=> '',
-        'attachfor_properties' 	=> '',
+        'notification_sid' => '',
+        'notification_id' => '',
+        'event_id' => '',
+        'description' => '',
+        'notification_mode' => '',
+        'template_id' => '',
+        'is_enabled' => 'Y',
+        'diffusion_type' => '',
+        'diffusion_properties' => '',
+        //'diffusion_content'   => '',
+        'attachfor_type' => '',
+        'attachfor_properties' => '',
     );
 }
 
 /**
  * Put given object in session, according with given type
- * NOTE: given object needs to be at least hashable
- * @param string $type
+ * NOTE: given object needs to be at least hashable.
+ *
+ * @param string   $type
  * @param hashable $hashable
  */
 function put_in_session($type, $hashable, $showString = true)
 {
     $func = new functions();
-	foreach ($hashable as $key=>$value) {
-		if ($showString) {
-			$_SESSION['m_admin'][$type][$key]=$func->show_string($value);
-		} else {
-			$_SESSION['m_admin'][$type][$key]=$value;
-		}
-	}
+    foreach ($hashable as $key => $value) {
+        if ($showString) {
+            $_SESSION['m_admin'][$type][$key] = $func->show_string($value);
+        } else {
+            $_SESSION['m_admin'][$type][$key] = $value;
+        }
+    }
     //print_r($_SESSION['m_admin']);
 }
diff --git a/modules/notifications/xml/IVS/validation_rules.xml b/modules/notifications/xml/IVS/validation_rules.xml
index 0f6f843e51fc403a8fd494b5fa3fdb2dcb8e8f5b..3f2993a248eede0b23c8f25ead5546a44bc93af7 100755
--- a/modules/notifications/xml/IVS/validation_rules.xml
+++ b/modules/notifications/xml/IVS/validation_rules.xml
@@ -12,7 +12,6 @@
 		<parameter name="description" type="string" />
 		<parameter name="event_id" type="integer" />
 		<parameter name="notification_mode" type="string" />
-		<parameter name="rss_url_template" type="string" />
 		<parameter name="template_id" type="integer" />
 		<parameter name="is_enabled" type="YN" />
 		<parameter name="diffusion_type" type="string" />
diff --git a/modules/notifications/xml/diffusion_type.xml b/modules/notifications/xml/diffusion_type.xml
deleted file mode 100755
index c19c906c301473eea1392450b653949e09c85a2c..0000000000000000000000000000000000000000
--- a/modules/notifications/xml/diffusion_type.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-    <diffusion_type>
-        <id>group</id>
-        <label>_GROUP</label>
-        <script>modules/notifications/diffusion_types/group.php</script>
-        <use_email>true</use_email>
-        <use_rss>true</use_rss>
-        <add_attachment>true</add_attachment>
-        <select>id, group_id, group_desc</select>
-        <from>usergroups</from>
-        <where>enabled = ?</where>
-        <data>Y</data>
-    </diffusion_type>
-    <diffusion_type>
-        <id>entity</id>
-        <label>_ENTITY</label>
-        <script>modules/notifications/diffusion_types/entity.php</script>
-        <use_email>true</use_email>
-        <use_rss>true</use_rss>
-        <add_attachment>true</add_attachment>
-        <select>entity_id, entity_label</select>
-        <from>entities</from>
-        <where></where>
-        <data></data>
-    </diffusion_type>
-    <diffusion_type>
-        <id>dest_entity</id>
-        <label>_DEST_ENTITY</label>
-        <script>modules/notifications/diffusion_types/dest_entity.php</script>
-        <use_email>true</use_email>
-        <use_rss>false</use_rss>
-        <add_attachment>false</add_attachment>
-        <select>id, label_status</select>
-        <from>status</from>
-        <where></where>
-        <data></data>
-    </diffusion_type>
-    <diffusion_type>
-        <id>user</id>
-        <label>_USER</label>
-        <script>modules/notifications/diffusion_types/user.php</script>
-        <use_email>true</use_email>
-        <use_rss>true</use_rss>
-        <add_attachment>true</add_attachment>
-        <select>user_id, firstname, lastname</select>
-        <from>users</from>
-        <where></where>
-        <data></data>
-    </diffusion_type>
-    <diffusion_type>
-        <id>dest_user</id>
-        <label>_DEST_USER</label>
-        <script>modules/notifications/diffusion_types/dest_user.php</script>
-        <use_email>true</use_email>
-        <use_rss>false</use_rss>
-        <add_attachment>false</add_attachment>
-        <select>id, label_status</select>
-        <from>status</from>
-        <where></where>
-        <data></data>
-    </diffusion_type>
-    <diffusion_type>
-        <id>copy_list</id>
-        <label>_COPYLIST</label>
-        <script>modules/notifications/diffusion_types/copy_list.php</script>
-        <use_email>true</use_email>
-        <use_rss>false</use_rss>
-        <add_attachment>false</add_attachment>
-        <select></select>
-        <from></from>
-        <where></where>
-        <data></data>
-    </diffusion_type>
-    <diffusion_type>
-        <id>note_dest_user</id>
-        <label>_NOTE_DEST_USER</label>
-        <script>modules/notifications/diffusion_types/note_dest_user.php</script>
-        <use_email>true</use_email>
-        <use_rss>false</use_rss>
-        <add_attachment>false</add_attachment>
-        <select></select>
-        <from></from>
-        <where></where>
-        <data></data>
-    </diffusion_type>
-    <diffusion_type>
-        <id>note_copy_list</id>
-        <label>_NOTE_COPY_LIST</label>
-        <script>modules/notifications/diffusion_types/note_copy_list.php</script>
-        <use_email>true</use_email>
-        <use_rss>false</use_rss>
-        <add_attachment>false</add_attachment>
-        <select></select>
-        <from></from>
-        <where></where>
-        <data></data>
-    </diffusion_type>
-    <diffusion_type>
-        <id>contact</id>
-        <label>_CONTACT</label>
-        <script>modules/notifications/diffusion_types/contact.php</script>
-        <use_email>true</use_email>
-        <use_rss>false</use_rss>
-        <add_attachment>true</add_attachment>
-        <select></select>
-        <from></from>
-        <where></where>
-        <data></data>
-    </diffusion_type>
-    <diffusion_type>
-        <id>dest_user_visa</id>
-        <label>_DEST_USER_VISA</label>
-        <script>modules/notifications/diffusion_types/dest_user_visa.php</script>
-        <use_email>true</use_email>
-        <use_rss>false</use_rss>
-        <add_attachment>true</add_attachment>
-        <select>id, label_status</select>
-        <from>status</from>
-        <where></where>
-        <data></data>
-    </diffusion_type>
-    <diffusion_type>
-        <id>dest_user_sign</id>
-        <label>_DEST_USER_SIGN</label>
-        <script>modules/notifications/diffusion_types/dest_user_sign.php</script>
-        <use_email>true</use_email>
-        <use_rss>false</use_rss>
-        <add_attachment>true</add_attachment>
-        <select>id, label_status</select>
-        <from>status</from>
-        <where></where>
-        <data></data>
-    </diffusion_type>
-</root>
diff --git a/modules/notifications/xml/event_type.xml b/modules/notifications/xml/event_type.xml
index 68449cc5fff735acdd883cbf7e9f4c210b3e8fe1..73fd81e7c61270a8780d901963833291ac5f8c21 100755
--- a/modules/notifications/xml/event_type.xml
+++ b/modules/notifications/xml/event_type.xml
@@ -1,24 +1,20 @@
 <?xml version="1.0" encoding="utf-8"?>
 <root>
     <event_type>
-        <id>usersup</id>
-        <label>Modification d'un utilisateur</label>
+        <id>baskets</id>
+        <label>Workflow bannettes</label>
     </event_type>
     <event_type>
-        <id>users%</id>
-        <label>Actions sur utilisateur</label>
+        <id>noteadd</id>
+        <label>Ajout de notes</label>
     </event_type>
     <event_type>
         <id>alert1</id>
-        <label>Alerte courrier 1</label>
+        <label>Relance courrier avant échéance</label>
     </event_type>
     <event_type>
         <id>alert2</id>
-        <label>Relance courrier 2 avant échéance</label>
-    </event_type>
-    <event_type>
-        <id>noteadd</id>
-        <label>Ajout de notes</label>
+        <label>Relance courrier après échéance</label>
     </event_type>
     <event_type>
         <id>diffdest%</id>
@@ -29,8 +25,12 @@
         <label>Courrier en copie</label>
     </event_type>
     <event_type>
-        <id>stepWF%</id>
-        <label>Etape Workflow</label>
+        <id>usersup</id>
+        <label>Modification d'un utilisateur</label>
+    </event_type>
+    <event_type>
+        <id>users%</id>
+        <label>Actions sur utilisateur</label>
     </event_type>
     <event_type>
         <id>diffvisauser</id>
diff --git a/modules/sendmail/Controllers/MessageExchangeReviewController.php b/modules/sendmail/Controllers/MessageExchangeReviewController.php
new file mode 100644
index 0000000000000000000000000000000000000000..aabb601391e111d731c31ade68f3b9a33ce18790
--- /dev/null
+++ b/modules/sendmail/Controllers/MessageExchangeReviewController.php
@@ -0,0 +1,143 @@
+<?php
+
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
+*
+*/
+
+/**
+* @brief Message Exchange Review Controller
+* @author dev@maarch.org
+* @ingroup core
+*/
+
+namespace Sendmail\Controllers;
+
+use Slim\Http\Request;
+use Slim\Http\Response;
+use Core\Models\ResModel;
+use Core\Models\ActionsModel;
+
+require_once __DIR__. '/../../export_seda/Controllers/ReceiveMessage.php';
+require_once 'modules/export_seda/RequestSeda.php';
+
+class MessageExchangeReviewController
+{
+    protected static function canSendMessageExchangeReview($aArgs = [])
+    {
+        if (empty($aArgs['res_id']) || !is_numeric($aArgs['res_id'])) {
+            return false;
+        }
+
+        $resLetterboxData = ResModel::getById([
+            'select'  => ['nature_id, reference_number', 'entity_label', 'res_id', 'identifier'],
+            'table'   => 'res_view_letterbox',
+            'resId'   => $aArgs['res_id'],
+            'orderBy' => 'res_id']);
+
+        if ($resLetterboxData[0]['nature_id'] == 'message_exchange' && substr($resLetterboxData[0]['reference_number'], 0, 16) == 'ArchiveTransfer_') {
+            return $resLetterboxData[0];
+        } else {
+            return false;
+        }
+    }
+
+    public static function sendMessageExchangeReview($aArgs = [])
+    {
+        $messageExchangeData = self::canSendMessageExchangeReview(['res_id' => $aArgs['res_id']]);
+        if ($messageExchangeData) {
+            $actionInfo = ActionsModel::getById(['id' => $aArgs['action_id']]);
+            $reviewObject = new \stdClass();
+            $reviewObject->Comment = array();
+            $reviewObject->Comment[0] = new \stdClass();
+            $reviewObject->Comment[0]->value = '[' . date("d/m/Y H:i:s") . '] "' . $actionInfo['label_action'] . '" ' . _M2M_ACTION_DONE . ' ' . $_SESSION['user']['entities'][0]['ENTITY_LABEL'] . '. '. _M2M_ENTITY_DESTINATION.' : ' . $messageExchangeData['entity_label'];
+
+            $date = new \DateTime;
+            $reviewObject->Date = $date->format(\DateTime::ATOM);
+
+            $reviewObject->MessageIdentifier = new \stdClass();
+            $reviewObject->MessageIdentifier->value = $messageExchangeData['reference_number'] . '_NotificationSent';
+
+            $reviewObject->CodeListVersions = new \stdClass();
+            $reviewObject->CodeListVersions->value = '';
+
+            $reviewObject->UnitIdentifier = new \stdClass();
+            $reviewObject->UnitIdentifier->value = $messageExchangeData['reference_number'];
+
+            $RequestSeda = new \RequestSeda();
+            $messageExchangeReply = $RequestSeda->getMessageByReference($messageExchangeData['reference_number'] . '_ReplySent');
+            $dataObject = json_decode($messageExchangeReply->data);
+            $reviewObject->OriginatingAgency = $dataObject->TransferringAgency;
+            $reviewObject->ArchivalAgency = $dataObject->ArchivalAgency;
+
+            if ($reviewObject->ArchivalAgency->OrganizationDescriptiveMetadata->Communication[0]->Channel == 'url') {
+                $tab = explode('saveMessageExchangeReturn', $reviewObject->ArchivalAgency->OrganizationDescriptiveMetadata->Communication[0]->value);
+                $reviewObject->ArchivalAgency->OrganizationDescriptiveMetadata->Communication[0]->value = $tab[0] . 'saveMessageExchangeReview';
+            }
+
+            $sendMessage = new \SendMessage();
+
+            $reviewObject->MessageIdentifier->value = $messageExchangeData['reference_number'] . '_Notification';
+
+            $filePath = $sendMessage->generateMessageFile($reviewObject, "ArchiveModificationNotification", $_SESSION['config']['tmppath']);
+
+            $reviewObject->MessageIdentifier->value = $messageExchangeData['reference_number'] . '_NotificationSent';
+            $reviewObject->TransferringAgency = $reviewObject->OriginatingAgency;
+            $messageId = SendMessageExchangeController::saveMessageExchange(['dataObject' => $reviewObject, 'res_id_master' => $aArgs['res_id_master'], 'type' => 'ArchiveModificationNotification', 'file_path' => $filePath]);
+
+            $reviewObject->MessageIdentifier->value = $messageExchangeData['reference_number'] . '_Notification';
+
+            $reviewObject->DataObjectPackage = new \stdClass();
+            $reviewObject->DataObjectPackage->DescriptiveMetadata = new \stdClass();
+            $reviewObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit = array();
+            $reviewObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0] = new \stdClass();
+            $reviewObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content = new \stdClass();
+            $reviewObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content->OriginatingSystemId = $aArgs['res_id_master'];
+            $reviewObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content->Title[0] = '[CAPTUREM2M_NOTIFICATION]'.date("Ymd_his");
+
+            $reviewObject->TransferringAgency->OrganizationDescriptiveMetadata = new \stdClass();
+            $reviewObject->TransferringAgency->OrganizationDescriptiveMetadata->UserIdentifier = $_SESSION['user']['UserId'];
+            $sendMessage->send($reviewObject, $messageId, 'ArchiveModificationNotification');
+        }
+    }
+
+    public function saveMessageExchangeReview(Request $request, Response $response)
+    {
+        if (empty($_SESSION['user']['UserId'])) {
+            return $response->withStatus(401)->withJson(['errors' => 'User Not Connected']);
+        }
+
+        $data = $request->getParams();
+
+        if (!ReceiveMessageExchangeController::checkNeededParameters(['data' => $data, 'needed' => ['type']])) {
+            return $response->withStatus(400)->withJson(['errors' => 'Bad Request']);
+        }
+
+        $tmpName = ReceiveMessageExchangeController::createFile(['base64' => $data['base64'], 'extension' => $data['extension'], 'size' => $data['size']]);
+        if (!empty($tmpName['errors'])) {
+            return $response->withStatus(400)->withJson($tmpName);
+        }
+
+        $receiveMessage = new \ReceiveMessage();
+        $res = $receiveMessage->receive($_SESSION['config']['tmppath'], $tmpName, $data['type']);
+
+        $sDataObject = $res['content'];
+        $dataObject = json_decode($sDataObject);
+        $RequestSeda = new \RequestSeda();
+
+        $dataObject->TransferringAgency = $dataObject->OriginatingAgency;
+
+        $messageExchange = $RequestSeda->getMessageByReference($dataObject->UnitIdentifier->value);
+
+        if (empty($messageExchange->operation_date)) {
+            $RequestSeda->updateOperationDateMessage(['operation_date' => $dataObject->Date, 'message_id' => $messageExchange->message_id]);
+        }
+
+        $messageId = SendMessageExchangeController::saveMessageExchange(['dataObject' => $dataObject, 'res_id_master' => $messageExchange->res_id_master, 'type' => 'ArchiveModificationNotification']);
+        return $response->withJson([
+            "messageId" => $messageId
+        ]);
+    }
+}
diff --git a/modules/sendmail/Controllers/ReadMessageExchangeController.php b/modules/sendmail/Controllers/ReadMessageExchangeController.php
new file mode 100644
index 0000000000000000000000000000000000000000..f1e635598faa5e548691090c5fd6b796ae3fd12c
--- /dev/null
+++ b/modules/sendmail/Controllers/ReadMessageExchangeController.php
@@ -0,0 +1,111 @@
+<?php
+
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
+*
+*/
+
+/**
+* @brief Read Message Exchange Controller
+* @author dev@maarch.org
+* @ingroup core
+*/
+
+require_once 'modules/export_seda/RequestSeda.php';
+require_once "core/class/class_request.php";
+
+class ReadMessageExchangeController
+{
+    public static function getMessageExchange($aArgs = [])
+    {
+        $errors = self::control($aArgs);
+
+        if (!empty($errors)) {
+            return ['errors' => $errors];
+        }
+
+        $aDataForm = [];
+        $RequestSeda                = new RequestSeda();
+        $messageExchangeData        = $RequestSeda->getMessageByIdentifier($aArgs['id']);
+        $unitIdentifierData         = $RequestSeda->getUnitIdentifierByMessageId($aArgs['id']);
+        $aDataForm['reference']     = $messageExchangeData->reference;
+        $messageReview              = $RequestSeda->getMessagesByReferenceByDate($aDataForm['reference'].'_Notification');
+        if (!empty($messageReview)) {
+            foreach ($messageReview as $value) {
+                $oMessageReview = json_decode($value['data']);
+                $aDataForm['messageReview'][] = $oMessageReview->Comment[0]->value;
+            }
+        }
+        
+        $request                    = new request();
+        $aDataForm['creationDate']  = $request->dateformat($messageExchangeData->date);
+        $aDataForm['receptionDate'] = $request->dateformat($messageExchangeData->reception_date);
+        $aDataForm['operationDate'] = $request->dateformat($messageExchangeData->operation_date);
+        $aDataForm['type']          = $messageExchangeData->type;
+
+        if (!empty($aDataForm['operationDate'])) {
+            $reference = $aDataForm['reference'].'_Reply';
+        } elseif ($aDataForm['type'] == 'ArchiveTransferReplySent') {
+            $reference = $aDataForm['reference'];
+        }
+
+        if (!empty($reference)) {
+            $replyData = $RequestSeda->getMessageByReference($reference);
+            $oReplyData = json_decode($replyData->data);
+            $aDataForm['operationComments'] = $oReplyData->Comment;
+        }
+
+        $messageExchangeData         = json_decode($messageExchangeData->data);
+
+        $TransferringAgencyMetaData = $messageExchangeData->TransferringAgency->OrganizationDescriptiveMetadata;
+        $aDataForm['from']          = $TransferringAgencyMetaData->Contact[0]->PersonName . ' (' . $TransferringAgencyMetaData->Name . ')';
+
+        $ArchivalAgency                 = $messageExchangeData->ArchivalAgency;
+        $ArchivalAgencyMetaData         = $ArchivalAgency->OrganizationDescriptiveMetadata;
+        $aDataForm['communicationType'] = $ArchivalAgencyMetaData->Communication[0]->value;
+        $aDataForm['contactInfo']       = $ArchivalAgencyMetaData->Name . ' - <b>' . $ArchivalAgency->Identifier->value . '</b> - ' . $ArchivalAgencyMetaData->Contact[0]->PersonName;
+
+        $addressInfo = $ArchivalAgencyMetaData->Contact[0]->Address[0]->PostOfficeBox . ' ' . $ArchivalAgencyMetaData->Contact[0]->Address[0]->StreetName . ' ' . $ArchivalAgencyMetaData->Contact[0]->Address[0]->Postcode . ' ' . $ArchivalAgencyMetaData->Contact[0]->Address[0]->CityName . ' ' . $ArchivalAgencyMetaData->Contact[0]->Address[0]->Country;
+
+        $aDataForm['contactInfo'] .= ', ' . $addressInfo;
+        $aDataForm['body']        = $messageExchangeData->Comment[0]->value;
+        $aDataForm['isHtml']      = 'N';
+        $aDataForm['object']      = $messageExchangeData->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content->Title[0];
+
+        $aDataForm['attachments']         = [];
+        $aDataForm['attachments_version'] = [];
+        $aDataForm['notes']               = [];
+        foreach ($unitIdentifierData as $value) {
+            if ($value->tablename == 'notes') {
+                $aDataForm['notes'][] = $value->res_id;
+            }
+            if ($value->tablename == 'res_attachments') {
+                $aDataForm['attachments'][] = $value->res_id;
+            }
+            if ($value->tablename == 'res_version_attachments') {
+                $aDataForm['attachments_version'][] = $value->res_id;
+            }
+            if ($value->tablename == 'res_letterbox') {
+                $aDataForm['resMasterAttached'] = 'Y';
+            }
+            if ($value->disposition == 'body') {
+                $aDataForm['disposition'] = $value;
+            }
+        }
+
+        return $aDataForm;
+    }
+
+    protected function control($aArgs = [])
+    {
+        $errors = [];
+
+        if (empty($aArgs['id'])) {
+            array_push($errors, 'wrong format for id');
+        }
+
+        return $errors;
+    }
+}
diff --git a/modules/sendmail/Controllers/ReceiveMessageExchangeController.php b/modules/sendmail/Controllers/ReceiveMessageExchangeController.php
new file mode 100644
index 0000000000000000000000000000000000000000..2baddb775294501715dc2765bc6cb8c9c9c46816
--- /dev/null
+++ b/modules/sendmail/Controllers/ReceiveMessageExchangeController.php
@@ -0,0 +1,555 @@
+<?php
+
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
+*
+*/
+
+/**
+* @brief Receive Message Exchange Controller
+* @author dev@maarch.org
+* @ingroup core
+*/
+
+namespace Sendmail\Controllers;
+
+use Slim\Http\Request;
+use Slim\Http\Response;
+use SrcCore\controllers\StoreController;
+use User\models\UserModel;
+use SrcCore\models\CoreConfigModel;
+use Group\models\ServiceModel;
+use Entity\models\EntityModel;
+use Basket\models\BasketsModel;
+use Resource\models\ResModel;
+use Note\models\NoteModel;
+use History\controllers\HistoryController;
+use Contact\models\ContactModel;
+
+require_once 'modules/export_seda/Controllers/ReceiveMessage.php';
+require_once 'modules/export_seda/Controllers/SendMessage.php';
+require_once 'modules/export_seda/RequestSeda.php';
+
+class ReceiveMessageExchangeController
+{
+    private static $aComments = [];
+
+    public function saveMessageExchange(Request $request, Response $response)
+    {
+        if (!ServiceModel::hasService(['id' => 'save_numeric_package', 'userId' => $_SESSION['user']['UserId'], 'location' => 'sendmail', 'type' => 'menu'])) {
+            return $response->withStatus(403)->withJson(['errors' => 'Service forbidden']);
+        }
+
+        if (empty($_SESSION['user']['UserId'])) {
+            return $response->withStatus(401)->withJson(['errors' => 'User Not Connected']);
+        }
+
+        $data = $request->getParams();
+
+        self::$aComments[] = '['.date("d/m/Y H:i:s") . '] Réception du pli numérique';
+        $tmpName = self::createFile(['base64' => $data['base64'], 'extension' => $data['extension'], 'size' => $data['size']]);
+        if (!empty($tmpName['errors'])) {
+            return $response->withStatus(400)->withJson($tmpName);
+        }
+        self::$aComments[] = '['.date("d/m/Y H:i:s") . '] Pli numérique déposé sur le serveur';
+        self::$aComments[] = '['.date("d/m/Y H:i:s") . '] Validation du pli numérique';
+        /********** EXTRACTION DU ZIP ET CONTROLE *******/
+        $receiveMessage = new \ReceiveMessage();
+        $res = $receiveMessage->receive($_SESSION['config']['tmppath'], $tmpName, 'ArchiveTransfer');
+
+        if ($res['status'] == 1) {
+            return $response->withStatus(400)->withJson(["errors" => _ERROR_RECEIVE_FAIL. ' ' . $res['content']]);
+        }
+        self::$aComments[] = '['.date("d/m/Y H:i:s") . '] Pli numérique validé';
+
+        $sDataObject = $res['content'];
+        $sDataObject = json_decode($sDataObject);
+        
+        self::sendAcknowledgement(["dataObject" => $sDataObject]);
+
+        $aDefaultConfig = self::readXmlConfig();
+
+        /*************** RES LETTERBOX **************/
+        self::$aComments[] = '['.date("d/m/Y H:i:s") . '] Enregistrement du message';
+        $resLetterboxReturn = self::saveResLetterbox(["dataObject" => $sDataObject, "defaultConfig" => $aDefaultConfig]);
+
+        if (!empty($resLetterboxReturn['errors'])) {
+            return $response->withStatus(400)->withJson(["errors" => $resLetterboxReturn['errors']]);
+        }
+
+        /*************** CONTACT **************/
+        self::$aComments[] = '['.date("d/m/Y H:i:s") . '] Selection ou création du contact';
+        $contactReturn = self::saveContact(["dataObject" => $sDataObject, "defaultConfig" => $aDefaultConfig]);
+
+        if ($contactReturn['returnCode'] <> 0) {
+            return $response->withStatus(400)->withJson(["errors" => $contactReturn['errors']]);
+        }
+        self::$aComments[] = '['.date("d/m/Y H:i:s") . '] Contact sélectionné ou créé';
+
+        /************** MLB COLL EXT **************/
+        $return = self::saveExtensionTable(["contact" => $contactReturn, "resId" => $resLetterboxReturn[0]]);
+
+        if (!empty($return['errors'])) {
+            return $response->withStatus(400)->withJson(["errors" => $return['errors']]);
+        }
+        self::$aComments[] = '['.date("d/m/Y H:i:s") . '] Message enregistré';
+        /************** NOTES *****************/
+        $notesReturn = self::saveNotes(["dataObject" => $sDataObject, "resId" => $resLetterboxReturn[0]]);
+
+        if (!empty($notesReturn['errors'])) {
+            return $response->withStatus(400)->withJson(["errors" => $notesReturn['errors']]);
+        }
+
+        /************** RES ATTACHMENT *****************/
+        $resAttachmentReturn = self::saveResAttachment(["dataObject" => $sDataObject, "resId" => $resLetterboxReturn[0], "defaultConfig" => $aDefaultConfig]);
+
+        if (!empty($resAttachmentReturn['errors'])) {
+            return $response->withStatus(400)->withJson(["errors" => $resAttachmentReturn['errors']]);
+        }
+
+        HistoryController::add([
+            'tableName' => 'res_letterbox',
+            'recordId'  => $resLetterboxReturn[0],
+            'eventType' => 'ADD',
+            'eventId'   => 'resadd',
+            'info'       => _NUMERIC_PACKAGE_IMPORTED
+        ]);
+
+        $basketRedirection = null;
+        $userBaskets = BasketsModel::getBasketsByUserId(['userId' => $_SESSION['user']['UserId']]);
+        if (!empty($userBaskets)) {
+            foreach ($userBaskets as $value) {
+                if ($value['basket_id'] == $aDefaultConfig['basketRedirection_afterUpload'][0]) {
+                    $userGroups = UserModel::getGroupsById(['userId' => $_SESSION['user']['UserId']]);
+                    foreach ($userGroups as $userGroupValue) {
+                        if ($userGroupValue['primary_group'] == 'Y') {
+                            $userPrimaryGroup = $userGroupValue['group_id'];
+                            break;
+                        }
+                    }
+                    $defaultAction = BasketsModel::getDefaultActionIdByBasketId(['basketId' => $value['basket_id'], 'groupId' => $userPrimaryGroup]);
+                    $basketRedirection = 'index.php?page=view_baskets&module=basket&baskets=' . $value['basket_id'] . '&resId=' . $resLetterboxReturn[0] . '&defaultAction=' . $defaultAction;
+                    break;
+                }
+            }
+        }
+
+        if (empty($basketRedirection)) {
+            $basketRedirection = 'index.php';
+        }
+
+        self::sendReply(['dataObject' => $sDataObject, 'Comment' => self::$aComments, 'replyCode' => '000 : OK', 'res_id_master' => $resLetterboxReturn[0]]);
+
+        return $response->withJson([
+            "resId"             => $resLetterboxReturn[0],
+            'basketRedirection' => $basketRedirection
+        ]);
+    }
+
+    public static function checkNeededParameters($aArgs = [])
+    {
+        foreach ($aArgs['needed'] as $value) {
+            if (empty($aArgs['data'][$value])) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    public function createFile($aArgs = [])
+    {
+        if (!self::checkNeededParameters(['data' => $aArgs, 'needed' => ['base64', 'extension', 'size']])) {
+            return ['errors' => 'Bad Request'];
+        }
+
+        $file     = base64_decode($aArgs['base64']);
+
+        $finfo    = new \finfo(FILEINFO_MIME_TYPE);
+        $mimeType = $finfo->buffer($file);
+        $ext      = $aArgs['extension'];
+        $tmpName  = 'tmp_file_' .$_SESSION['user']['UserId']. '_ArchiveTransfer_' .rand(). '.' . $ext;
+
+        if (!in_array(strtolower($ext), ['zip', 'tar'])) {
+            return ["errors" => _WRONG_FILE_TYPE_M2M];
+        }
+
+        if ($mimeType != "application/x-tar" && $mimeType != "application/zip" && $mimeType != "application/tar" && $mimeType != "application/x-gzip") {
+            return ['errors' => _WRONG_FILE_TYPE];
+        }
+
+        file_put_contents($_SESSION['config']['tmppath'] . $tmpName, $file);
+
+        return $tmpName;
+    }
+
+    public static function readXmlConfig()
+    {
+        $customId = CoreConfigModel::getCustomId();
+
+        if (file_exists("custom/{$customId}/apps/maarch_entreprise/xml/m2m_config.xml")) {
+            $path = "custom/{$customId}/apps/maarch_entreprise/xml/m2m_config.xml";
+        } else {
+            $path = 'apps/maarch_entreprise/xml/m2m_config.xml';
+        }
+
+        $aDefaultConfig = [];
+        if (file_exists($path)) {
+            $loadedXml = simplexml_load_file($path);
+            foreach ($loadedXml as $key => $value) {
+                $aDefaultConfig[$key] = (array)$value;
+            }
+        }
+
+        if (filter_var($aDefaultConfig['m2m_communication'][0], FILTER_VALIDATE_EMAIL)) {
+            $aDefaultConfig['m2m_communication_type'][0] = 'email';
+        } elseif (filter_var($aDefaultConfig['m2m_communication'][0], FILTER_VALIDATE_URL)) {
+            $aDefaultConfig['m2m_communication_type'][0] = 'url';
+        }
+
+        return $aDefaultConfig;
+    }
+
+    protected static function saveResLetterbox($aArgs = [])
+    {
+        $dataObject    = $aArgs['dataObject'];
+        $defaultConfig = $aArgs['defaultConfig']['res_letterbox'];
+
+        $DescriptiveMetadata = $dataObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0];
+
+        $mainDocumentMetaData  = $DescriptiveMetadata->Content;
+        $DataObjectReferenceId = $DescriptiveMetadata->ArchiveUnit[0]->DataObjectReference[0]->DataObjectReferenceId;
+
+        $documentMetaData = self::getBinaryDataObjectInfo(['binaryDataObject' => $dataObject->DataObjectPackage->BinaryDataObject, 'binaryDataObjectId' => $DataObjectReferenceId]);
+
+        $filename         = $documentMetaData->Attachment->filename;
+        $fileFormat       = substr($filename, strrpos($filename, '.') + 1);
+
+        $archivalAgency = $dataObject->ArchivalAgency;
+        $destination    = EntityModel::getByBusinessId(['businessId' => $archivalAgency->Identifier->value]);
+        $Communication  = $archivalAgency->OrganizationDescriptiveMetadata->Contact[0]->Communication;
+
+        foreach ($Communication as $value) {
+            if ($value->Channel == 'email') {
+                $email = $value->value;
+                break;
+            }
+        }
+
+        if (!empty($email)) {
+            $destUser = UserModel::getByEmail(['mail' => $email]);
+        }
+
+        $dataValue = [];
+        array_push($dataValue, ['column' => 'typist',           'value' => 'superadmin',                        'type' => 'string']);
+        array_push($dataValue, ['column' => 'type_id',          'value' => $defaultConfig['type_id'],           'type' => 'integer']);
+        array_push($dataValue, ['column' => 'subject',          'value' => str_replace("[CAPTUREM2M]", "", $mainDocumentMetaData->Title[0]),     'type' => 'string']);
+        array_push($dataValue, ['column' => 'doc_date',         'value' => $mainDocumentMetaData->CreatedDate,  'type' => 'date']);
+        array_push($dataValue, ['column' => 'destination',      'value' => $destination[0]['entity_id'],        'type' => 'string']);
+        array_push($dataValue, ['column' => 'initiator',        'value' => $destination[0]['entity_id'],        'type' => 'string']);
+        array_push($dataValue, ['column' => 'dest_user',        'value' => $destUser[0]['user_id'],             'type' => 'string']);
+        array_push($dataValue, ['column' => 'reference_number', 'value' => $dataObject->MessageIdentifier->value, 'type' => 'string']);
+        array_push($dataValue, ['column' => 'priority',         'value' => $defaultConfig['priority'],          'type' => 'integer']);
+        array_push($dataValue, ['column' => 'confidentiality',  'value' => 'N',                                 'type' => 'string']);
+
+        $allDatas = [
+            "encodedFile" => $documentMetaData->Attachment->value,
+            "data"        => $dataValue,
+            "collId"      => "letterbox_coll",
+            "table"       => "res_letterbox",
+            "fileFormat"  => $fileFormat,
+            "status"      => $defaultConfig['status']
+        ];
+
+        $resId         = StoreController::storeResource($allDatas);
+        return $resId;
+    }
+
+    protected static function saveContact($aArgs = [])
+    {
+        $dataObject                 = $aArgs['dataObject'];
+        $defaultConfigContacts      = $aArgs['defaultConfig']['contacts_v2'];
+        $defaultConfigAddress       = $aArgs['defaultConfig']['contact_addresses'];
+        $transferringAgency         = $dataObject->TransferringAgency;
+        $transferringAgencyMetadata = $transferringAgency->OrganizationDescriptiveMetadata;
+
+        $aDataContact = [];
+        array_push($aDataContact, ['column' => 'contact_type',        'value' => $defaultConfigContacts['contact_type'],           'type' => 'integer', 'table' => 'contacts_v2']);
+        array_push($aDataContact, ['column' => 'society',             'value' => $transferringAgencyMetadata->LegalClassification, 'type' => 'string',  'table' => 'contacts_v2']);
+        array_push($aDataContact, ['column' => 'is_corporate_person', 'value' => 'Y', 'type' => 'string',  'table' => 'contacts_v2']);
+        array_push($aDataContact, ['column' => 'is_external_contact', 'value' => 'Y', 'type' => 'string',  'table' => 'contacts_v2']);
+
+        array_push($aDataContact, ['column' => 'contact_purpose_id',  'value' => $defaultConfigAddress['contact_purpose_id'],      'type' => 'integer', 'table' => 'contact_addresses']);
+        array_push($aDataContact, ['column' => 'external_contact_id', 'value' => $transferringAgency->Identifier->value,           'type' => 'string',  'table' => 'contact_addresses']);
+        array_push($aDataContact, ['column' => 'departement',         'value' => $transferringAgencyMetadata->Name,                'type' => 'string',  'table' => 'contact_addresses']);
+
+        $contactAlreadyCreated = ContactModel::getAddressByExternalContactId(['externalContactId' => $transferringAgency->Identifier->value]);
+        if (!empty($contactAlreadyCreated)) {
+            $contact['contactId'] = $contactAlreadyCreated['contact_id'];
+            $contact['addressId'] = $contactAlreadyCreated['ca_id'];
+        } else {
+            $contact = ContactModel::CreateContactM2M($aDataContact, $transferringAgencyMetadata->Communication[0]->value);
+        }
+        $contactCommunicationExisted = ContactModel::getContactCommunication([
+            "contactId" => $contact['contactId']
+        ]);
+
+        $contactCommunication = $transferringAgencyMetadata->Communication;
+        if (empty($contactCommunicationExisted) && !empty($contactCommunication)) {
+            foreach ($contactCommunication as $value) {
+                if (strrpos($value->value, "/rest/") !== false) {
+                    $contactCommunicationValue = substr($value->value, 0, strrpos($value->value, "/rest/")+1);
+                } else {
+                    $contactCommunicationValue = $value->value;
+                }
+                ContactModel::createContactCommunication([
+                    "contactId" => $contact['contactId'],
+                    "type"      => $value->Channel,
+                    "value"     => $contactCommunicationValue
+                ]);
+            }
+        }
+        return $contact;
+    }
+
+    protected static function saveExtensionTable($aArgs = [])
+    {
+        $contact = $aArgs['contact'];
+        
+        $dataValue = [];
+        array_push($dataValue, ['column' => 'nature_id',       'value' => 'message_exchange',    'type' => 'string']);
+        array_push($dataValue, ['column' => 'category_id',     'value' => 'incoming',            'type' => 'string']);
+        array_push($dataValue, ['column' => 'alt_identifier',  'value' => '',                    'type' => 'string']);
+        array_push($dataValue, ['column' => 'exp_contact_id',  'value' => $contact['contactId'], 'type' => 'integer']);
+        array_push($dataValue, ['column' => 'address_id',      'value' => $contact['addressId'], 'type' => 'integer']);
+        array_push($dataValue, ['column' => 'admission_date',  'value' => 'CURRENT_TIMESTAMP',   'type' => 'date']);
+
+        $allDatas = [
+            "resId"    => $aArgs['resId'],
+            "data"     => $dataValue,
+            "table"    => "mlb_coll_ext",
+            "resTable" => "res_letterbox"
+        ];
+
+        $return = ResModel::createExt($allDatas);
+
+        return $return;
+    }
+
+    protected static function saveNotes($aArgs = [])
+    {
+        $countNote = 0;
+        foreach ($aArgs['dataObject']->Comment as $value) {
+            $aDataNote = [
+                "identifier" => $aArgs['resId'],
+                "tablename"  => "res_letterbox",
+                "user_id"    => "superadmin",
+                "note_text"  => $value->value,
+                "coll_id"    => "letterbox_coll",
+            ];
+
+            NoteModel::create($aDataNote);
+
+            HistoryController::add([
+                'tableName' => 'notes',
+                'recordId'  => $aArgs['identifier'],
+                'eventType' => 'ADD',
+                'eventId'   => 'noteadd',
+                'info'       => _NOTES_ADDED
+            ]);
+
+            $countNote++;
+        }
+        self::$aComments[] = '['.date("d/m/Y H:i:s") . '] '.$countNote . ' note(s) enregistrée(s)';
+        return true;
+    }
+
+    protected static function saveResAttachment($aArgs = [])
+    {
+        $dataObject        = $aArgs['dataObject'];
+        $resIdMaster       = $aArgs['resId'];
+        $defaultConfig     = $aArgs['defaultConfig']['res_attachments'];
+        $dataObjectPackage = $dataObject->DataObjectPackage;
+
+        $attachments = $dataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->ArchiveUnit;
+
+        // First one is the main document. Already added
+        unset($attachments[0]);
+        $countAttachment = 0;
+        if (!empty($attachments)) {
+            foreach ($attachments as $value) {
+                $attachmentContent      = $value->Content;
+                $attachmentDataObjectId = $value->DataObjectReference[0]->DataObjectReferenceId;
+
+                $BinaryDataObjectInfo = self::getBinaryDataObjectInfo(["binaryDataObject" => $dataObjectPackage->BinaryDataObject, "binaryDataObjectId" => $attachmentDataObjectId]);
+                $filename             = $BinaryDataObjectInfo->Attachment->filename;
+                $fileFormat           = substr($filename, strrpos($filename, '.') + 1);
+
+                $dataValue = [];
+                array_push($dataValue, ['column' => 'typist',          'value' => 'superadmin',                      'type' => 'string']);
+                array_push($dataValue, ['column' => 'type_id',         'value' => '0',                               'type' => 'integer']);
+                array_push($dataValue, ['column' => 'res_id_master',   'value' => $resIdMaster,                      'type' => 'integer']);
+                array_push($dataValue, ['column' => 'attachment_type', 'value' => $defaultConfig['attachment_type'], 'type' => 'string']);
+                array_push($dataValue, ['column' => 'relation',        'value' => '1',                               'type' => 'integer']);
+                array_push($dataValue, ['column' => 'coll_id',         'value' => 'letterbox_coll',                  'type' => 'string']);
+
+                array_push($dataValue, ['column' => 'doc_date',        'value' => $attachmentContent->CreatedDate,   'type' => 'date']);
+                array_push($dataValue, ['column' => 'title',           'value' => $attachmentContent->Title,         'type' => 'string']);
+
+                $allDatas = [
+                    "encodedFile" => $BinaryDataObjectInfo->Attachment->value,
+                    "data"        => $dataValue,
+                    "collId"      => "letterbox_coll",
+                    "table"       => "res_attachments",
+                    "fileFormat"  => $fileFormat,
+                    "status"      => 'TRA'
+                ];
+                
+                $resId = StoreController::storeResource($allDatas);
+                $countAttachment++;
+            }
+        }
+        self::$aComments[] = '['.date("d/m/Y H:i:s") . '] '.$countAttachment . ' attachement(s) enregistré(s)';
+        return $resId;
+    }
+
+    protected function getBinaryDataObjectInfo($aArgs = [])
+    {
+        $dataObject   = $aArgs['binaryDataObject'];
+        $dataObjectId = $aArgs['binaryDataObjectId'];
+
+        foreach ($dataObject as $value) {
+            if ($value->id == $dataObjectId) {
+                return $value;
+            }
+        }
+        return null;
+    }
+
+    protected function sendAcknowledgement($aArgs = [])
+    {
+        $dataObject = $aArgs['dataObject'];
+        $date       = new \DateTime;
+
+        $acknowledgementObject                                   = new \stdClass();
+        $acknowledgementObject->Date                             = $date->format(\DateTime::ATOM);
+
+        $acknowledgementObject->MessageIdentifier                = new \stdClass();
+        $acknowledgementObject->MessageIdentifier->value         = $dataObject->MessageIdentifier->value . '_AckSent';
+
+        $acknowledgementObject->MessageReceivedIdentifier        = new \stdClass();
+        $acknowledgementObject->MessageReceivedIdentifier->value = $dataObject->MessageIdentifier->value;
+
+        $acknowledgementObject->Sender                           = $dataObject->ArchivalAgency;
+        $acknowledgementObject->Receiver                         = $dataObject->TransferringAgency;
+
+        if ($acknowledgementObject->Receiver->OrganizationDescriptiveMetadata->Communication[0]->Channel == 'url') {
+            $acknowledgementObject->Receiver->OrganizationDescriptiveMetadata->Communication[0]->value .= '/rest/saveMessageExchangeReturn';
+        }
+
+        $sendMessage = new \SendMessage();
+
+        $acknowledgementObject->MessageIdentifier->value          = $dataObject->MessageIdentifier->value . '_Ack';
+        $filePath = $sendMessage->generateMessageFile($acknowledgementObject, 'Acknowledgement', $_SESSION['config']['tmppath']);
+
+        $acknowledgementObject->ArchivalAgency = $acknowledgementObject->Receiver;
+        $acknowledgementObject->TransferringAgency = $acknowledgementObject->Sender;
+
+        $acknowledgementObject->TransferringAgency->OrganizationDescriptiveMetadata->UserIdentifier = $_SESSION['user']['UserId'];
+
+        $acknowledgementObject->MessageIdentifier->value          = $dataObject->MessageIdentifier->value . '_AckSent';
+        $messageId = SendMessageExchangeController::saveMessageExchange(['dataObject' => $acknowledgementObject, 'res_id_master' => 0, 'type' => 'Acknowledgement', 'file_path' => $filePath]);
+
+        $acknowledgementObject->DataObjectPackage = new \stdClass();
+        $acknowledgementObject->DataObjectPackage->DescriptiveMetadata = new \stdClass();
+        $acknowledgementObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit = array();
+        $acknowledgementObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0] = new \stdClass();
+        $acknowledgementObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content = new \stdClass();
+        $acknowledgementObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content->Title[0] = '[CAPTUREM2M_ACK]'.date("Ymd_his");
+
+        $sendMessage->send($acknowledgementObject, $messageId, 'Acknowledgement');
+    }
+
+    protected function sendReply($aArgs = [])
+    {
+        $dataObject = $aArgs['dataObject'];
+        $date       = new \DateTime;
+
+        $replyObject                                    = new \stdClass();
+        $replyObject->Comment                           = $aArgs['Comment'];
+        $replyObject->Date                              = $date->format(\DateTime::ATOM);
+
+        $replyObject->MessageIdentifier                 = new \stdClass();
+        $replyObject->MessageIdentifier->value          = $dataObject->MessageIdentifier->value . '_ReplySent';
+
+        $replyObject->ReplyCode                         = $aArgs['replyCode'];
+
+        $replyObject->MessageRequestIdentifier        = new \stdClass();
+        $replyObject->MessageRequestIdentifier->value = $dataObject->MessageIdentifier->value;
+
+        $replyObject->TransferringAgency                = $dataObject->ArchivalAgency;
+        $replyObject->TransferringAgency->OrganizationDescriptiveMetadata->UserIdentifier = $_SESSION['user']['UserId'];
+        $replyObject->ArchivalAgency                    = $dataObject->TransferringAgency;
+
+        $sendMessage = new \SendMessage();
+
+        $replyObject->MessageIdentifier->value          = $dataObject->MessageIdentifier->value . '_Reply';
+        $filePath = $sendMessage->generateMessageFile($replyObject, "ArchiveTransferReply", $_SESSION['config']['tmppath']);
+
+        $replyObject->MessageIdentifier->value          = $dataObject->MessageIdentifier->value . '_ReplySent';
+        $messageId = SendMessageExchangeController::saveMessageExchange(['dataObject' => $replyObject, 'res_id_master' => $aArgs['res_id_master'], 'type' => 'ArchiveTransferReply', 'file_path' => $filePath]);
+
+        $replyObject->MessageIdentifier->value          = $dataObject->MessageIdentifier->value . '_Reply';
+
+        $replyObject->DataObjectPackage = new \stdClass();
+        $replyObject->DataObjectPackage->DescriptiveMetadata = new \stdClass();
+        $replyObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit = array();
+        $replyObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0] = new \stdClass();
+        $replyObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content = new \stdClass();
+        $replyObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content->OriginatingSystemId = $aArgs['res_id_master'];
+
+        $replyObject->DataObjectPackage->DescriptiveMetadata->ArchiveUnit[0]->Content->Title[0] = '[CAPTUREM2M_REPLY]'.date("Ymd_his");
+
+        $sendMessage->send($replyObject, $messageId, 'ArchiveTransferReply');
+    }
+
+    public function saveMessageExchangeReturn(RequestInterface $request, ResponseInterface $response)
+    {
+        if (empty($_SESSION['user']['UserId'])) {
+            return $response->withStatus(401)->withJson(['errors' => 'User Not Connected']);
+        }
+
+        $data = $request->getParams();
+
+        if (!self::checkNeededParameters(['data' => $data, 'needed' => ['type']])) {
+            return $response->withStatus(400)->withJson(['errors' => 'Bad Request']);
+        }
+
+        $tmpName = self::createFile(['base64' => $data['base64'], 'extension' => $data['extension'], 'size' => $data['size']]);
+
+        $receiveMessage = new \ReceiveMessage();
+        $res = $receiveMessage->receive($_SESSION['config']['tmppath'], $tmpName, $data['type']);
+
+        $sDataObject = $res['content'];
+        $dataObject = json_decode($sDataObject);
+
+        $RequestSeda = new \RequestSeda();
+
+        if ($dataObject->type == 'Acknowledgement') {
+            $messageExchange                = $RequestSeda->getMessageByReference($dataObject->MessageReceivedIdentifier->value);
+            $dataObject->TransferringAgency = $dataObject->Sender;
+            $dataObject->ArchivalAgency     = $dataObject->Receiver;
+            $RequestSeda->updateReceptionDateMessage(['reception_date' => $dataObject->Date, 'message_id' => $messageExchange->message_id]);
+        } elseif ($dataObject->type == 'ArchiveTransferReply') {
+            $messageExchange = $RequestSeda->getMessageByReference($dataObject->MessageRequestIdentifier->value);
+        }
+
+        $messageId = SendMessageExchangeController::saveMessageExchange(['dataObject' => $dataObject, 'res_id_master' => $messageExchange->res_id_master, 'type' => $data['type']]);
+
+        return $response->withJson([
+            "messageId" => $messageId
+        ]);
+    }
+}
diff --git a/modules/sendmail/Controllers/SendMessageExchangeController.php b/modules/sendmail/Controllers/SendMessageExchangeController.php
new file mode 100644
index 0000000000000000000000000000000000000000..f58d286faf5d5b01325b1b1bc6968c8447e4b103
--- /dev/null
+++ b/modules/sendmail/Controllers/SendMessageExchangeController.php
@@ -0,0 +1,563 @@
+<?php
+
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
+*
+*/
+
+/**
+* @brief Send Message Exchange Controller
+* @author dev@maarch.org
+* @ingroup core
+*/
+
+require_once 'modules/sendmail/Controllers/ReceiveMessageExchangeController.php';
+require_once 'modules/export_seda/RequestSeda.php';
+require_once 'modules/export_seda/Controllers/SendMessage.php';
+require_once "core/class/class_request.php";
+
+class SendMessageExchangeController
+{
+    public static function createMessageExchange($aArgs = [])
+    {
+        $errors = self::control($aArgs);
+
+        if (!empty($errors)) {
+            return ['errors' => $errors];
+        }
+        $mlbCollExt = Resource\models\ResModel::getExtById(['resId' => $aArgs['identifier']]);
+        if (empty($mlbCollExt)) {
+            return ['errors' => "wrong identifier"];
+        }
+
+        if (empty($mlbCollExt['exp_contact_id']) && empty($mlbCollExt['dest_contact_id'])) {
+            return ['errors' => "no contact"];
+        }
+
+        if ($mlbCollExt['exp_contact_id'] != null) {
+            $contact_id = $mlbCollExt['exp_contact_id'];
+        } else {
+            $contact_id = $mlbCollExt['dest_contact_id'];
+        }
+
+        /***************** GET MAIL INFOS *****************/
+        $AllUserEntities = \Entity\models\EntityModel::getEntitiesByUserId(['user_id' => $_SESSION['user']['UserId']]);
+        foreach ($AllUserEntities as $value) {
+            if ($value['entity_id'] == $aArgs['sender_email']) {
+                $TransferringAgencyInformations = $value;
+            }
+        }
+
+        if (empty($TransferringAgencyInformations)) {
+            return ['errors' => "no sender"];
+        }
+
+        $AllInfoMainMail = Resource\models\ResModel::getById(['resId' => $aArgs['identifier']]);
+
+        $tmpMainExchangeDoc = explode("__", $aArgs['main_exchange_doc']);
+        $MainExchangeDoc    = ['tablename' => $tmpMainExchangeDoc[0], 'res_id' => $tmpMainExchangeDoc[1]];
+
+        $fileInfo = [];
+        if (!empty($aArgs['join_file']) || $MainExchangeDoc['tablename'] == 'res_letterbox') {
+            $AllInfoMainMail['Title']                                  = $AllInfoMainMail['subject'];
+            $AllInfoMainMail['OriginatingAgencyArchiveUnitIdentifier'] = $AllInfoMainMail['alt_identifier'];
+            $AllInfoMainMail['DocumentType']                           = $AllInfoMainMail['type_label'];
+            $AllInfoMainMail['tablenameExchangeMessage']               = 'res_letterbox';
+            $fileInfo = [$AllInfoMainMail];
+        }
+
+        if ($MainExchangeDoc['tablename'] == 'res_attachments') {
+            $aArgs['join_attachment'][] = $MainExchangeDoc['res_id'];
+        }
+        if ($MainExchangeDoc['tablename'] == 'res_version_attachments') {
+            $aArgs['join_version_attachment'][] = $MainExchangeDoc['res_id'];
+        }
+
+        /**************** GET ATTACHMENTS INFOS ***************/
+        $AttachmentsInfo = [];
+        if (!empty($aArgs['join_attachment'])) {
+            $AttachmentsInfo = \Attachment\models\AttachmentsModel::getOnView(['where' => ['res_id in (?)'], 'data' => [$aArgs['join_attachment']]]);
+            foreach ($AttachmentsInfo as $key => $value) {
+                $AttachmentsInfo[$key]['Title']                                  = $value['title'];
+                $AttachmentsInfo[$key]['OriginatingAgencyArchiveUnitIdentifier'] = $value['identifier'];
+                $AttachmentsInfo[$key]['DocumentType']                           = $_SESSION['attachment_types'][$value['attachment_type']];
+                $AttachmentsInfo[$key]['tablenameExchangeMessage']               = 'res_attachments';
+            }
+        }
+        $AttVersionInfo = [];
+        if (!empty($aArgs['join_version_attachment'])) {
+            $AttVersionInfo = \Attachment\models\AttachmentsModel::getOnView(['where' => ['res_id_version in (?)'], 'data' => [$aArgs['join_version_attachment']]]);
+            foreach ($AttVersionInfo as $key => $value) {
+                $AttVersionInfo[$key]['res_id']                                 = $value['res_id_version'];
+                $AttVersionInfo[$key]['Title']                                  = $value['title'];
+                $AttVersionInfo[$key]['OriginatingAgencyArchiveUnitIdentifier'] = $value['identifier'];
+                $AttVersionInfo[$key]['DocumentType']                           = $_SESSION['attachment_types'][$value['attachment_type']];
+                $AttVersionInfo[$key]['tablenameExchangeMessage']               = 'res_version_attachments';
+            }
+        }
+        $aAllAttachment = array_merge($AttachmentsInfo, $AttVersionInfo);
+
+        /******************* GET NOTE INFOS **********************/
+        $aComments = self::generateComments([
+            'resId' => $aArgs['identifier'],
+            'notes' => $aArgs['notes'],
+            'body'  => $aArgs['body_from_raw'],
+            'TransferringAgencyInformations' => $TransferringAgencyInformations]);
+
+        /*********** ORDER ATTACHMENTS IN MAIL ***************/
+        if ($MainExchangeDoc['tablename'] == 'res_letterbox') {
+            $mainDocument     = $fileInfo;
+            $aMergeAttachment = array_merge($fileInfo, $aAllAttachment);
+        } else {
+            foreach ($aAllAttachment as $key => $value) {
+                if ($value['res_id'] == $MainExchangeDoc['res_id'] && $MainExchangeDoc['tablename'] == $value['tablenameExchangeMessage']) {
+                    if ($AllInfoMainMail['category_id'] == 'outgoing') {
+                        $aOutgoingMailInfo                                           = $AllInfoMainMail;
+                        $aOutgoingMailInfo['Title']                                  = $AllInfoMainMail['subject'];
+                        $aOutgoingMailInfo['OriginatingAgencyArchiveUnitIdentifier'] = $AllInfoMainMail['alt_identifier'];
+                        $aOutgoingMailInfo['DocumentType']                           = $AllInfoMainMail['type_label'];
+                        $aOutgoingMailInfo['tablenameExchangeMessage']               = $AllInfoMainMail['tablenameExchangeMessage'];
+                        $mainDocument = [$aOutgoingMailInfo];
+                    } else {
+                        $mainDocument = [$aAllAttachment[$key]];
+                    }
+                    $firstAttachment = [$aAllAttachment[$key]];
+                    unset($aAllAttachment[$key]);
+                }
+            }
+            $aMergeAttachment = array_merge($firstAttachment, $fileInfo, $aAllAttachment);
+        }
+
+        $mainDocument[0]['Title'] = '[CAPTUREM2M]'.$aArgs['object'];
+
+        $sendMessage = new SendMessage();
+        $request = new request();
+
+        foreach ($_SESSION['adresses']['to'] as $key => $value) {
+            /******** GET ARCHIVAl INFORMATIONs **************/
+            $contactInfo                       = \Contact\models\ContactModel::getFullAddressById(['addressId' => $key]);
+            $ArchivalAgencyCommunicationType   = \Contact\models\ContactModel::getContactCommunication(['contactId' => $contactInfo[0]['contact_id']]);
+            $ArchivalAgencyContactInformations = \Contact\models\ContactModel::getFullAddressById(['addressId' => $key]);
+
+            /******** GENERATE MESSAGE EXCHANGE OBJECT *********/
+            $dataObject = self::generateMessageObject([
+                'Comment' => $aComments,
+                'ArchivalAgency' => [
+                    'CommunicationType'   => $ArchivalAgencyCommunicationType,
+                    'ContactInformations' => $ArchivalAgencyContactInformations[0]
+                ],
+                'TransferringAgency' => [
+                    'EntitiesInformations' => $TransferringAgencyInformations
+                ],
+                'attachment'            => $aMergeAttachment,
+                'res'                   => $mainDocument,
+                'mainExchangeDocument'  => $MainExchangeDoc
+            ]);
+            /******** GENERATION DU BORDEREAU */
+            $filePath = $sendMessage->generateMessageFile($dataObject, "ArchiveTransfer", $_SESSION['config']['tmppath']);
+
+            /******** SAVE MESSAGE *********/
+            $messageId = self::saveMessageExchange(['dataObject' => $dataObject, 'res_id_master' => $aArgs['identifier'], 'file_path' => $filePath, 'type' => 'ArchiveTransfer']);
+            self::saveUnitIdentifier(['attachment' => $aMergeAttachment, 'notes' => $aArgs['notes'], 'messageId' => $messageId]);
+
+            \History\controllers\HistoryController::add([
+                'tableName' => 'res_letterbox',
+                'recordId'  => $aArgs['identifier'],
+                'eventType' => 'UP',
+                'eventId'   => 'resup',
+                'info'       => _NUMERIC_PACKAGE_ADDED . _ON_DOC_NUM
+                . $aArgs['identifier'] . ' ('.$messageId.') : "' . $request->cut_string($mainDocument[0]['Title'], 254) .'"'
+            ]);
+
+            \History\controllers\HistoryController::add([
+                'tableName' => 'message_exchange',
+                'recordId'  => $messageId,
+                'eventType' => 'ADD',
+                'eventId'   => 'messageexchangeadd',
+                'info'       => _NUMERIC_PACKAGE_ADDED . ' (' . $messageId . ')'
+            ]);
+
+            /******** ENVOI *******/
+            $res = $sendMessage->send($dataObject, $messageId, 'ArchiveTransfer');
+
+            if ($res['status'] == 1) {
+                $errors = [];
+                array_push($errors, _SENDS_FAIL);
+                array_push($errors, $res['content']);
+                return ['errors' => $errors];
+            }
+        }
+
+        return true;
+    }
+
+    protected function control($aArgs = [])
+    {
+        $errors = [];
+
+        if (empty($aArgs['identifier']) || !is_numeric($aArgs['identifier'])) {
+            array_push($errors, 'wrong format for identifier');
+        }
+
+        if (empty($aArgs['main_exchange_doc'])) {
+            array_push($errors, 'wrong format for main_exchange_doc');
+        }
+
+        if (empty($aArgs['object'])) {
+            array_push($errors, _EMAIL_OBJECT . ' ' . _IS_EMPTY);
+        }
+
+        if (empty($aArgs['join_file']) && empty($aArgs['join_attachment']) && empty($aArgs['main_exchange_doc'])) {
+            array_push($errors, 'no attachment');
+        }
+
+        if (empty($_SESSION['adresses']['to'])) {
+            array_push($errors, _NO_RECIPIENT);
+        }
+
+        if (empty($aArgs['sender_email'])) {
+            array_push($errors, _NO_SENDER);
+        }
+
+        return $errors;
+    }
+
+    protected function generateComments($aArgs = [])
+    {
+        $aReturn    = [];
+
+        $entityRoot = \Entity\models\EntityModel::getEntityRootById(['entityId' => $aArgs['TransferringAgencyInformations']['entity_id']]);
+        $headerNote = $_SESSION['user']['FirstName'] . ' ' . $_SESSION['user']['LastName'] . ' (' . $entityRoot[0]['entity_label'] . ' - ' . $aArgs['TransferringAgencyInformations']['entity_label'] . ' - ' .$_SESSION['user']['Mail'].') : ';
+        $oBody        = new stdClass();
+        $oBody->value = $headerNote . ' ' . $aArgs['body'];
+        array_push($aReturn, $oBody);
+
+        if (!empty($aArgs['notes'])) {
+            $notes     = \Note\models\NotesModel::getByResId([
+                'select' => ['notes.id', 'notes.user_id', 'notes.date_note', 'notes.note_text', 'users.firstname', 'users.lastname', 'users_entities.entity_id'],
+                'resId' => $aArgs['resId']
+            ]);
+
+            if (!empty($notes)) {
+                foreach ($notes as $value) {
+                    if (!in_array($value['id'], $aArgs['notes'])) {
+                        continue;
+                    }
+
+                    $oComment        = new stdClass();
+                    $date            = new DateTime($value['date_note']);
+                    $entityRoot      = \Entity\models\EntityModel::getEntityRootById(['entityId' => $value['entity_id']]);
+                    $userEntity      = \Entity\models\EntityModel::getById(['entityId' => $value['entity_id']]);
+                    $oComment->value = $value['firstname'].' '.$value['lastname'].' - '.$date->format('d-m-Y H:i:s').' ('.$entityRoot[0]['entity_label'].' - '.$userEntity['entity_label'].') : '.$value['note_text'];
+                    array_push($aReturn, $oComment);
+                }
+            }
+        }
+        return $aReturn;
+    }
+
+    public static function generateMessageObject($aArgs = [])
+    {
+        $date = new DateTime;
+
+        $messageObject          = new stdClass();
+        $messageObject->Comment = $aArgs['Comment'];
+        $messageObject->Date    = $date->format(DateTime::ATOM);
+
+        $messageObject->MessageIdentifier = new stdClass();
+        $messageObject->MessageIdentifier->value = 'ArchiveTransfer_'.date("Ymd_His").'_'.$_SESSION['user']['UserId'];
+
+        /********* BINARY DATA OBJECT PACKAGE *********/
+        $messageObject->DataObjectPackage                   = new stdClass();
+        $messageObject->DataObjectPackage->BinaryDataObject = self::getBinaryDataObject($aArgs['attachment']);
+
+        /********* DESCRIPTIVE META DATA *********/
+        $messageObject->DataObjectPackage->DescriptiveMetadata = self::getDescriptiveMetaDataObject($aArgs);
+
+        /********* ARCHIVAL AGENCY *********/
+        $messageObject->ArchivalAgency = self::getArchivalAgencyObject(['ArchivalAgency' => $aArgs['ArchivalAgency']]);
+
+        /********* TRANSFERRING AGENCY *********/
+        $messageObject->TransferringAgency = self::getTransferringAgencyObject(['TransferringAgency' => $aArgs['TransferringAgency']]);
+
+        return $messageObject;
+    }
+
+    public static function getBinaryDataObject($aArgs = [])
+    {
+        $aReturn     = [];
+        $RequestSeda = new RequestSeda();
+
+        foreach ($aArgs as $key => $value) {
+            if (!empty($value['tablenameExchangeMessage'])) {
+                $binaryDataObjectId = $value['tablenameExchangeMessage'] . "_" . $key . "_" . $value['res_id'];
+            } else {
+                $binaryDataObjectId = $value['res_id'];
+            }
+
+            $binaryDataObject                           = new stdClass();
+            $binaryDataObject->id                       = $binaryDataObjectId;
+
+            $binaryDataObject->MessageDigest            = new stdClass();
+            $binaryDataObject->MessageDigest->value     = $value['fingerprint'];
+            $binaryDataObject->MessageDigest->algorithm = "sha256";
+
+            $binaryDataObject->Size                     = $value['filesize'];
+
+            $uri = str_replace("##", DIRECTORY_SEPARATOR, $value['path']);
+            $uri = str_replace("#", DIRECTORY_SEPARATOR, $uri);
+            
+            $docServers = $RequestSeda->getDocServer($value['docserver_id']);
+            $binaryDataObject->Attachment           = new stdClass();
+            $binaryDataObject->Attachment->uri      = '';
+            $binaryDataObject->Attachment->filename = basename($value['filename']);
+            $binaryDataObject->Attachment->value    = base64_encode(file_get_contents($docServers->path_template . $uri . '/'. $value['filename']));
+
+            $binaryDataObject->FormatIdentification           = new stdClass();
+            $binaryDataObject->FormatIdentification->MimeType = mime_content_type($docServers->path_template . $uri . $value['filename']);
+
+            array_push($aReturn, $binaryDataObject);
+        }
+
+        return $aReturn;
+    }
+
+    public static function getDescriptiveMetaDataObject($aArgs = [])
+    {
+        $DescriptiveMetadataObject              = new stdClass();
+        $DescriptiveMetadataObject->ArchiveUnit = [];
+
+        $documentArchiveUnit                    = new stdClass();
+        $documentArchiveUnit->id                = 'mail_1';
+
+        $documentArchiveUnit->Content = self::getContent([
+            'DescriptionLevel'                       => 'File',
+            'Title'                                  => $aArgs['res'][0]['Title'],
+            'OriginatingSystemId'                    => $aArgs['res'][0]['res_id'],
+            'OriginatingAgencyArchiveUnitIdentifier' => $aArgs['res'][0]['OriginatingAgencyArchiveUnitIdentifier'],
+            'DocumentType'                           => $aArgs['res'][0]['DocumentType'],
+            'Status'                                 => $aArgs['res'][0]['status'],
+            'Writer'                                 => $aArgs['res'][0]['typist'],
+            'CreatedDate'                            => $aArgs['res'][0]['creation_date'],
+        ]);
+
+        $documentArchiveUnit->ArchiveUnit = [];
+        foreach ($aArgs['attachment'] as $key => $value) {
+            $attachmentArchiveUnit     = new stdClass();
+            $attachmentArchiveUnit->id = 'archiveUnit_'.$value['tablenameExchangeMessage'] . "_" . $key . "_" . $value['res_id'];
+            $attachmentArchiveUnit->Content = self::getContent([
+                'DescriptionLevel'                       => 'Item',
+                'Title'                                  => $value['Title'],
+                'OriginatingSystemId'                    => $value['res_id'],
+                'OriginatingAgencyArchiveUnitIdentifier' => $value['OriginatingAgencyArchiveUnitIdentifier'],
+                'DocumentType'                           => $value['DocumentType'],
+                'Status'                                 => $value['status'],
+                'Writer'                                 => $value['typist'],
+                'CreatedDate'                            => $value['creation_date'],
+            ]);
+            $dataObjectReference                        = new stdClass();
+            $dataObjectReference->DataObjectReferenceId = $value['tablenameExchangeMessage'].'_'.$key.'_'.$value['res_id'];
+            $attachmentArchiveUnit->DataObjectReference = [$dataObjectReference];
+
+            array_push($documentArchiveUnit->ArchiveUnit, $attachmentArchiveUnit);
+        }
+        array_push($DescriptiveMetadataObject->ArchiveUnit, $documentArchiveUnit);
+
+        return $DescriptiveMetadataObject;
+    }
+
+    public static function getContent($aArgs = [])
+    {
+        $contentObject                                         = new stdClass();
+        $contentObject->DescriptionLevel                       = $aArgs['DescriptionLevel'];
+        $contentObject->Title                                  = [$aArgs['Title']];
+        $contentObject->OriginatingSystemId                    = $aArgs['OriginatingSystemId'];
+        $contentObject->OriginatingAgencyArchiveUnitIdentifier = $aArgs['OriginatingAgencyArchiveUnitIdentifier'];
+        $contentObject->DocumentType                           = $aArgs['DocumentType'];
+        $contentObject->Status                                 = \Status\models\StatusModel::getById(['id' => $aArgs['Status']])[0]['label_status'];
+
+        $userInfos = \User\models\UserModel::getByUserId(['userId' => $aArgs['Writer']]);
+        $writer                = new stdClass();
+        $writer->FirstName     = $userInfos['firstname'];
+        $writer->BirthName     = $userInfos['lastname'];
+        $contentObject->Writer = [$writer];
+
+        $contentObject->CreatedDate = date("Y-m-d", strtotime($aArgs['CreatedDate']));
+
+        return $contentObject;
+    }
+
+    public static function getArchivalAgencyObject($aArgs = [])
+    {
+        $archivalAgencyObject                    = new stdClass();
+        $archivalAgencyObject->Identifier        = new stdClass();
+        $archivalAgencyObject->Identifier->value = $aArgs['ArchivalAgency']['ContactInformations']['external_contact_id'];
+
+        $archivalAgencyObject->OrganizationDescriptiveMetadata       = new stdClass();
+        $archivalAgencyObject->OrganizationDescriptiveMetadata->Name = trim($aArgs['ArchivalAgency']['ContactInformations']['society'] . ' ' . $aArgs['ArchivalAgency']['ContactInformations']['contact_lastname'] . ' ' . $aArgs['ArchivalAgency']['ContactInformations']['contact_firstname']);
+
+        if (isset($aArgs['ArchivalAgency']['CommunicationType']['type'])) {
+            $arcCommunicationObject          = new stdClass();
+            $arcCommunicationObject->Channel = $aArgs['ArchivalAgency']['CommunicationType']['type'];
+            if ($aArgs['ArchivalAgency']['CommunicationType']['type'] == 'url') {
+                $postUrl = '/rest/saveNumericPackage';
+            }
+            $arcCommunicationObject->value   = $aArgs['ArchivalAgency']['CommunicationType']['value'].$postUrl;
+
+            $archivalAgencyObject->OrganizationDescriptiveMetadata->Communication = [$arcCommunicationObject];
+        }
+
+        $contactObject = new stdClass();
+        $contactObject->DepartmentName = $aArgs['ArchivalAgency']['ContactInformations']['department'];
+        $contactObject->PersonName     = $aArgs['ArchivalAgency']['ContactInformations']['lastname'] . " " . $aArgs['ArchivalAgency']['ContactInformations']['firstname'];
+
+        $addressObject = new stdClass();
+        $addressObject->CityName      = $aArgs['ArchivalAgency']['ContactInformations']['address_town'];
+        $addressObject->Country       = $aArgs['ArchivalAgency']['ContactInformations']['address_country'];
+        $addressObject->Postcode      = $aArgs['ArchivalAgency']['ContactInformations']['address_postal_code'];
+        $addressObject->PostOfficeBox = $aArgs['ArchivalAgency']['ContactInformations']['address_num'];
+        $addressObject->StreetName    = $aArgs['ArchivalAgency']['ContactInformations']['address_street'];
+
+        $contactObject->Address = [$addressObject];
+
+        $communicationContactPhoneObject          = new stdClass();
+        $communicationContactPhoneObject->Channel = 'phone';
+        $communicationContactPhoneObject->value   = $aArgs['ArchivalAgency']['ContactInformations']['phone'];
+
+        $communicationContactEmailObject          = new stdClass();
+        $communicationContactEmailObject->Channel = 'email';
+        $communicationContactEmailObject->value   = $aArgs['ArchivalAgency']['ContactInformations']['email'];
+
+        $contactObject->Communication = [$communicationContactPhoneObject, $communicationContactEmailObject];
+
+        $archivalAgencyObject->OrganizationDescriptiveMetadata->Contact = [$contactObject];
+
+        return $archivalAgencyObject;
+    }
+
+    public static function getTransferringAgencyObject($aArgs = [])
+    {
+        $TransferringAgencyObject                    = new stdClass();
+        $TransferringAgencyObject->Identifier        = new stdClass();
+        $TransferringAgencyObject->Identifier->value = $aArgs['TransferringAgency']['EntitiesInformations']['business_id'];
+
+        $TransferringAgencyObject->OrganizationDescriptiveMetadata                      = new stdClass();
+
+        $entityRoot = \Entity\models\EntityModel::getEntityRootById(['entityId' => $aArgs['TransferringAgency']['EntitiesInformations']['entity_id']]);
+        $TransferringAgencyObject->OrganizationDescriptiveMetadata->LegalClassification = $entityRoot[0]['entity_label'];
+        $TransferringAgencyObject->OrganizationDescriptiveMetadata->Name                = $aArgs['TransferringAgency']['EntitiesInformations']['entity_label'];
+        $TransferringAgencyObject->OrganizationDescriptiveMetadata->UserIdentifier      = $_SESSION['user']['UserId'];
+
+        $traCommunicationObject          = new stdClass();
+
+        $aDefaultConfig = \Sendmail\Controllers\ReceiveMessageExchangeController::readXmlConfig();
+        $traCommunicationObject->Channel = $aDefaultConfig['m2m_communication_type'][0];
+        $traCommunicationObject->value   = $aDefaultConfig['m2m_communication'][0];
+
+        $TransferringAgencyObject->OrganizationDescriptiveMetadata->Communication = [$traCommunicationObject];
+
+        $contactUserObject                 = new stdClass();
+        $contactUserObject->DepartmentName = $aArgs['TransferringAgency']['EntitiesInformations']['entity_label'];
+        $contactUserObject->PersonName     = $_SESSION['user']['FirstName'] . " " . $_SESSION['user']['LastName'];
+
+        $communicationUserPhoneObject          = new stdClass();
+        $communicationUserPhoneObject->Channel = 'phone';
+        $communicationUserPhoneObject->value   = $_SESSION['user']['Phone'];
+
+        $communicationUserEmailObject          = new stdClass();
+        $communicationUserEmailObject->Channel = 'email';
+        $communicationUserEmailObject->value   = $_SESSION['user']['Mail'];
+
+        $contactUserObject->Communication = [$communicationUserPhoneObject, $communicationUserEmailObject];
+
+        $TransferringAgencyObject->OrganizationDescriptiveMetadata->Contact = [$contactUserObject];
+
+        return $TransferringAgencyObject;
+    }
+
+    public static function saveMessageExchange($aArgs = [])
+    {
+        $RequestSeda = new RequestSeda();
+
+        $dataObject = $aArgs['dataObject'];
+        $oData                                        = new stdClass();
+        $oData->messageId                             = $RequestSeda->generateUniqueId();
+        $oData->date                                  = $dataObject->Date;
+
+        $oData->MessageIdentifier                     = new stdClass();
+        $oData->MessageIdentifier->value              = $dataObject->MessageIdentifier->value;
+        
+        $oData->TransferringAgency                    = new stdClass();
+        $oData->TransferringAgency->Identifier        = new stdClass();
+        $oData->TransferringAgency->Identifier->value = $dataObject->TransferringAgency->Identifier->value;
+        
+        $oData->ArchivalAgency                        = new stdClass();
+        $oData->ArchivalAgency->Identifier            = new stdClass();
+        $oData->ArchivalAgency->Identifier->value     = $dataObject->ArchivalAgency->Identifier->value;
+        
+        $oData->archivalAgreement                     = new stdClass();
+        $oData->archivalAgreement->value              = ""; // TODO : ???
+        
+        $replyCode = "";
+        if(!empty($dataObject->ReplyCode)){
+            $replyCode = $dataObject->ReplyCode;
+        }
+
+        $oData->replyCode                             = new stdClass();
+        $oData->replyCode                             = $replyCode;
+
+        $dataObject = self::cleanBase64Value(['dataObject' => $dataObject]);
+
+        $aDataExtension = [
+            'status'            => 'W',
+            'fullMessageObject' => $dataObject,
+            'resIdMaster'       => $aArgs['res_id_master'],
+            'SenderOrgNAme'     => $dataObject->TransferringAgency->OrganizationDescriptiveMetadata->Contact[0]->DepartmentName,
+            'RecipientOrgNAme'  => $dataObject->ArchivalAgency->OrganizationDescriptiveMetadata->Name,
+            'filePath'          => $aArgs['file_path'],
+        ];
+
+        $messageId = $RequestSeda->insertMessage($oData, $aArgs['type'], $aDataExtension);
+
+        return $messageId;
+    }
+
+    public static function saveUnitIdentifier($aArgs = [])
+    {
+        $messageId   = $aArgs['messageId'];
+        $RequestSeda = new RequestSeda();
+
+        foreach ($aArgs['attachment'] as $key => $value) {
+            $disposition = "attachment";
+            if ($key == 0) {
+                $disposition = "body";
+            }
+
+            $RequestSeda->insertUnitIdentifier($messageId, $value['tablenameExchangeMessage'], $value['res_id'], $disposition);
+        }
+
+        if (!empty($aArgs['notes'])) {
+            foreach ($aArgs['notes'] as $value) {
+                $RequestSeda->insertUnitIdentifier($messageId, "notes", $value, "note");
+            }
+        }
+
+        return true;
+    }
+
+    protected static function cleanBase64Value($aArgs = [])
+    {
+        $dataObject = $aArgs['dataObject'];
+        $aCleanDataObject = [];
+        if (!empty($dataObject->DataObjectPackage->BinaryDataObject)) {
+            foreach ($dataObject->DataObjectPackage->BinaryDataObject as $key => $value) {
+                $value->Attachment->value = "";
+                $aCleanDataObject[$key] = $value;
+            }
+            $dataObject->DataObjectPackage->BinaryDataObject = $aCleanDataObject;
+        }
+        return $dataObject;
+    }
+}
diff --git a/modules/sendmail/Models/MailModel.php b/modules/sendmail/Models/MailModel.php
new file mode 100644
index 0000000000000000000000000000000000000000..8db7e5cbbb7d9c214d5d695231ecfd618212de22
--- /dev/null
+++ b/modules/sendmail/Models/MailModel.php
@@ -0,0 +1,22 @@
+<?php
+
+
+/**
+ * Copyright Maarch since 2008 under licence GPLv3.
+ * See LICENCE.txt file at the root folder for more details.
+ * This file is part of Maarch software.
+ *
+ */
+
+/**
+ * @brief mail Model
+ * @author dev@maarch.org
+ * @ingroup sendmail
+ */
+
+require_once __DIR__. DIRECTORY_SEPARATOR .'MailModelAbstract.php';
+
+class MailModel extends MailModelAbstract
+{
+    // Do your stuff in this class
+}
\ No newline at end of file
diff --git a/modules/sendmail/Models/MailModelAbstract.php b/modules/sendmail/Models/MailModelAbstract.php
new file mode 100644
index 0000000000000000000000000000000000000000..f6a2c3c069d927f7de19ea10ff56b6026b94835a
--- /dev/null
+++ b/modules/sendmail/Models/MailModelAbstract.php
@@ -0,0 +1,44 @@
+<?php
+
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
+*
+*/
+
+/**
+* @brief Mail Model
+* @author dev@maarch.org
+* @ingroup sendmail
+*/
+
+
+class MailModelAbstract
+{
+    public static function createMail($data)
+    {
+        try {
+            \SrcCore\models\DatabaseModel::insert([
+                    'table'         => 'sendmail',
+                    'columnsValues' => [
+                        'coll_id' => $data->coll_id,
+                        'res_id' => $data->res_id,
+                        'user_id' => $data->user_id,
+                        'to_list' => $data->to_list,
+                        'cc_list' => $data->cc_list,
+                        'cci_list' => $data->cci_list,
+                        'email_object' => $data->email_object,
+                        'email_body'  => $data->email_body,
+                        'is_res_master_attached' => $data->is_res_master_attached,
+                        'email_status' => $data->email_status,
+                        'creation_date' => $data->creation_date,
+                        'sender_email' => $data->sender_email,
+                        'message_exchange_id' => $data->message_exchange_id,
+                    ]
+                ]);
+        } catch (Exception $e) {
+            return false;
+        }
+    }
+}
diff --git a/modules/sendmail/batch/load_process_emails.php b/modules/sendmail/batch/load_process_emails.php
index c821bea6b1257cf8000a87f824667b1a8ce6b98a..159d4881f39d77291a3ff74370beb03f1b56c13a 100755
--- a/modules/sendmail/batch/load_process_emails.php
+++ b/modules/sendmail/batch/load_process_emails.php
@@ -205,6 +205,15 @@ try {
         $GLOBALS['maarchDirectory'] . "modules" . DIRECTORY_SEPARATOR . "entities" 
         . DIRECTORY_SEPARATOR . "class". DIRECTORY_SEPARATOR . "class_manage_entities.php"
     );
+    Bt_myInclude(
+        $GLOBALS['maarchDirectory'] . "core" . DIRECTORY_SEPARATOR . "Models" . DIRECTORY_SEPARATOR . "DocserverModel.php"
+    );
+    Bt_myInclude(
+        $GLOBALS['maarchDirectory'] . "core" . DIRECTORY_SEPARATOR . "Models" . DIRECTORY_SEPARATOR . "DocserverTypeModel.php"
+    );
+    Bt_myInclude(
+        $GLOBALS['maarchDirectory'] . "core" . DIRECTORY_SEPARATOR . "Controllers" . DIRECTORY_SEPARATOR . "DocserverToolsController.php"
+    );
     Bt_myInclude(
         $GLOBALS['maarchDirectory'] . $path_to_mailer
     );  
diff --git a/modules/sendmail/batch/process_emails.php b/modules/sendmail/batch/process_emails.php
index 77e6ab77d508fe5005abbbd4424baa65c2a80ebd..5c3efa21f8da7bb90e9b28bef457a16795d20b97 100755
--- a/modules/sendmail/batch/process_emails.php
+++ b/modules/sendmail/batch/process_emails.php
@@ -12,254 +12,291 @@ while ($state <> 'END') {
         $GLOBALS['logger']->write('STATE:' . $state, 'INFO');
     }
     switch ($state) {
-		
-	/**********************************************************************/
+        
+    /**********************************************************************/
     /*                          LOAD_EMAILS 							  */
     /* List the records to proceed       								  */
     /**********************************************************************/
-    case 'LOAD_EMAILS' :
-		$query = "SELECT * FROM " . EMAILS_TABLE
-			. " WHERE email_status = 'W' and send_date is NULL";
-		$stmt = Bt_doQuery($GLOBALS['db'], $query);
-		$totalEmailsToProcess = $stmt->rowCount();
-		$currentEmail = 0;
-		if ($totalEmailsToProcess === 0) {
-			Bt_exitBatch(0, 'No e-mails to process');
+    case 'LOAD_EMAILS':
+        $query = "SELECT * FROM " . EMAILS_TABLE
+            . " WHERE email_status = 'W' and send_date is NULL";
+        $stmt = Bt_doQuery($GLOBALS['db'], $query);
+        $totalEmailsToProcess = $stmt->rowCount();
+        $currentEmail = 0;
+        if ($totalEmailsToProcess === 0) {
+            Bt_exitBatch(0, 'No e-mails to process');
+        }
+        $GLOBALS['logger']->write($totalEmailsToProcess . ' e-mails to proceed.', 'INFO');
+        $GLOBALS['emails'] = array();
+        while ($emailRecordset = $stmt->fetchObject()) {
+            $GLOBALS['emails'][] = $emailRecordset;
         }
-		$GLOBALS['logger']->write($totalEmailsToProcess . ' e-mails to proceed.', 'INFO');
-		$GLOBALS['emails'] = array();
-		while ($emailRecordset = $stmt->fetchObject()) {
-			$GLOBALS['emails'][] = $emailRecordset;
-		}
-		$state = 'SEND_AN_EMAIL';
-		$err = 0;
+        $state = 'SEND_AN_EMAIL';
+        $err = 0;
         $errTxt = '';
     break;
-		
-	/**********************************************************************/
+        
+    /**********************************************************************/
     /*                          SEND_AN_EMAIL	 		          	          */
     /* Load parameters and send an e-mail                                    */
     /**********************************************************************/
-    case 'SEND_AN_EMAIL' :
-		if($currentEmail < $totalEmailsToProcess) {
-			$email = $GLOBALS['emails'][$currentEmail];
-			//var_dump($email);exit;
-			$GLOBALS['mailer'] = new htmlMimeMail();
-			$GLOBALS['mailer']->setSMTPParams(
-				$host = (string)$mailerParams->smtp_host, 
-				$port = (string)$mailerParams->smtp_port,
-				$helo = (string)$mailerParams->domains,
-				$auth = filter_var($mailerParams->smtp_auth, FILTER_VALIDATE_BOOLEAN),
-				$user = (string)$mailerParams->smtp_user,
-				$pass = (string)$mailerParams->smtp_password
-				);
-			$mailfrom_generic = (string)$mailerParams->mailfrom;
-			
-			//Composing email	
-			//--> Set from
-			$userInfo = $users->get_user($email->user_id);
-			//var_dump($userInfo);
-			//echo 'userInfo : ' . $userInfo['mail'] . '==' . ' sender_email : ' . $email->sender_email . PHP_EOL;
-			if ($userInfo['mail'] == $email->sender_email) {
-				if (!empty($mailfrom_generic)) {
-
-					$GLOBALS['logger']->write('process e-mail '.($currentEmail+1)."/".$totalEmailsToProcess.' (FROM => '.$userInfo['firstname'].' '.$userInfo['lastname'].' <'.$mailfrom_generic.'>'.', TO => '.$email->to_list.', SUBJECT => '.$email->email_object.', CC =>'.$email->cc_list.', CCI => '.$email->cci_list.') ...', 'INFO');
-
-		            $GLOBALS['mailer']->setFrom($userInfo['firstname'].' '
-						. $userInfo['lastname'].' <'.$mailfrom_generic.'> ');
-		            $emailFrom = $mailfrom_generic;
-		            $email->email_body = 'Courriel envoyé par : ' . $userInfo['firstname'].' '
-						. $userInfo['lastname'] . ' ' . $email->sender_email . ' ' .  '.<br/><br/>' . $email->email_body;
-				} else {
-
-					$GLOBALS['logger']->write('process e-mail '.($currentEmail+1)."/".$totalEmailsToProcess.' (FROM => '.$userInfo['firstname'].' '.$userInfo['lastname'].' <'.$email->sender_email.'>'.', TO => '.$email->to_list.', SUBJECT => '.$email->email_object.', CC =>'.$email->cc_list.', CCI => '.$email->cci_list.') ...', 'INFO');
-
-		            $GLOBALS['mailer']->setFrom($userInfo['firstname'].' '
-						. $userInfo['lastname'].' <'.$email->sender_email.'> ');
-		            $emailFrom = $email->sender_email;
-				}
-				$GLOBALS['mailer']->setReplyTo($email->sender_email);
-				
-			} else {
-				if (!empty($mailfrom_generic)) {
-					$mailsEntities = $sendmail_tools->getAttachedEntitiesMails();
-					$entityShortLabel = substr($mailsEntities[$email->sender_email], 0, strrpos($mailsEntities[$email->sender_email], "("));
-						
-		            $GLOBALS['mailer']->setFrom($entityShortLabel . ' <' . $mailfrom_generic. '> ');
-		            $emailFrom = $mailfrom_generic;
-		            $email->email_body = 'Courriel envoyé par : ' . $entityShortLabel . ' ' . $sendmail_tools->explodeSenderEmail($email->sender_email) . ' ' .  '.<br/><br/>' . $email->email_body;
-				} else {
-					$mailsEntities = $sendmail_tools->getAttachedEntitiesMails();
-					$entityShortLabel = substr($mailsEntities[$email->sender_email], 0, strrpos($mailsEntities[$email->sender_email], "("));
-
-		            $GLOBALS['mailer']->setFrom($entityShortLabel . ' <' . $sendmail_tools->explodeSenderEmail($email->sender_email) . '> ');
-		            $emailFrom = $sendmail_tools->explodeSenderEmail($email->sender_email);
-				}
-				$GLOBALS['mailer']->setReplyTo($sendmail_tools->explodeSenderEmail($email->sender_email));
-			}
-
-			//echo $email->email_body . PHP_EOL;exit;
-
-			if (!empty($email->cc_list))$GLOBALS['logger']->write("Copy e-mail to : " . $email->cc_list, 'INFO');
-			if (!empty($email->cci_list))$GLOBALS['logger']->write("Copy invisible e-mail to : " . $email->cci_list, 'INFO');
-			
-			//--> Set the return path
-			if (!empty($mailfrom_generic)) {
-				$GLOBALS['mailer']->setReturnPath(
-					$userInfo['firstname'] . ' ' .  $userInfo['lastname'] . ' <' . $mailfrom_generic . '> '
-				);
-			} else {
-				$GLOBALS['mailer']->setReturnPath($userInfo['mail']);
-			}
-
-			//--> To
-			$to = array();
-			$to = explode(',', $email->to_list);
-			//--> Cc
-			if (!empty($email->cc_list)) {
-				$GLOBALS['mailer']->setCc($email->cc_list);
-			}
-			//--> Cci
-			if (!empty($email->cci_list)) {
-				$GLOBALS['mailer']->setBcc($email->cci_list);
-			}
-			//--> Set subject
-			$GLOBALS['mailer']->setSubject($email->email_object);
-			//--> Set body: Is Html/raw text ?
-			if ($email->is_html == 'Y') {
-				$body = str_replace('###', ';', $email->email_body);
-				$body = str_replace('___', '--', $body);
-				$body = $sendmail_tools->rawToHtml($body);
-				$GLOBALS['mailer']->setHtml($body);
-			} else {
-				$body = $sendmail_tools->htmlToRaw($email->email_body);
-				$GLOBALS['mailer']->setText($body);
-			}
-			//--> Set charset
-			$GLOBALS['mailer']->setTextCharset($GLOBALS['charset']);
-			$GLOBALS['mailer']->setHtmlCharset($GLOBALS['charset']);
-			$GLOBALS['mailer']->setHeadCharset($GLOBALS['charset']);
-			
-			//--> Set attachments
-				//Res master
-				if ($email->is_res_master_attached == 'Y') {
-					$GLOBALS['logger']->write("set attachment on res master : " . $email->res_id, 'INFO');
-
-					//Get file from docserver
-					$resFile = $sendmail_tools->getResource($GLOBALS['collections'], $email->coll_id, $email->res_id);
-					//Get file content
-					if(is_file($resFile['file_path'])) {
-						//Filename
-						$resFilename = $sendmail_tools->createFilename($resFile['label'], $resFile['ext']);
-						$GLOBALS['logger']->write("set attachment filename : " . $resFilename, 'INFO');
-
-						//File content
-						$file_content = $GLOBALS['mailer']->getFile($resFile['file_path']);
-						//Add file
-						$GLOBALS['mailer']->addAttachment($file_content, $resFilename, $resFile['mime_type']); 
-					}
-				}
-				
-				//Other version of the document
-				if (!empty($email->res_version_id_list)) {
+    case 'SEND_AN_EMAIL':
+        if ($currentEmail < $totalEmailsToProcess) {
+            $email = $GLOBALS['emails'][$currentEmail];
+            //var_dump($email);exit;
+            $GLOBALS['mailer'] = new htmlMimeMail();
+            $GLOBALS['mailer']->setSMTPParams(
+                $host = (string)$mailerParams->smtp_host,
+                $port = (string)$mailerParams->smtp_port,
+                $helo = (string)$mailerParams->domains,
+                $auth = filter_var($mailerParams->smtp_auth, FILTER_VALIDATE_BOOLEAN),
+                $user = (string)$mailerParams->smtp_user,
+                $pass = (string)$mailerParams->smtp_password
+                );
+            $mailfrom_generic = (string)$mailerParams->mailfrom;
+            
+            //Composing email
+            //--> Set from
+            $userInfo = $users->get_user($email->user_id);
+            //var_dump($userInfo);
+            //echo 'userInfo : ' . $userInfo['mail'] . '==' . ' sender_email : ' . $email->sender_email . PHP_EOL;
+            if ($userInfo['mail'] == $email->sender_email) {
+                if (!empty($mailfrom_generic)) {
+                    $GLOBALS['logger']->write('process e-mail '.($currentEmail+1)."/".$totalEmailsToProcess.' (FROM => '.$userInfo['firstname'].' '.$userInfo['lastname'].' <'.$mailfrom_generic.'>'.', TO => '.$email->to_list.', SUBJECT => '.$email->email_object.', CC =>'.$email->cc_list.', CCI => '.$email->cci_list.') ...', 'INFO');
+
+                    $GLOBALS['mailer']->setFrom($userInfo['firstname'].' '
+                        . $userInfo['lastname'].' <'.$mailfrom_generic.'> ');
+                    $emailFrom = $mailfrom_generic;
+                    $email->email_body = 'Courriel envoyé par : ' . $userInfo['firstname'].' '
+                        . $userInfo['lastname'] . ' ' . $email->sender_email . ' ' .  '.<br/><br/>' . $email->email_body;
+                } else {
+                    $GLOBALS['logger']->write('process e-mail '.($currentEmail+1)."/".$totalEmailsToProcess.' (FROM => '.$userInfo['firstname'].' '.$userInfo['lastname'].' <'.$email->sender_email.'>'.', TO => '.$email->to_list.', SUBJECT => '.$email->email_object.', CC =>'.$email->cc_list.', CCI => '.$email->cci_list.') ...', 'INFO');
+
+                    $GLOBALS['mailer']->setFrom($userInfo['firstname'].' '
+                        . $userInfo['lastname'].' <'.$email->sender_email.'> ');
+                    $emailFrom = $email->sender_email;
+                }
+                $GLOBALS['mailer']->setReplyTo($email->sender_email);
+            } else {
+                if (!empty($mailfrom_generic)) {
+                    $mailsEntities = $sendmail_tools->getAttachedEntitiesMails();
+                    $entityShortLabel = substr($mailsEntities[$email->sender_email], 0, strrpos($mailsEntities[$email->sender_email], "("));
+                        
+                    $GLOBALS['mailer']->setFrom($entityShortLabel . ' <' . $mailfrom_generic. '> ');
+                    $emailFrom = $mailfrom_generic;
+                    $email->email_body = 'Courriel envoyé par : ' . $entityShortLabel . ' ' . $sendmail_tools->explodeSenderEmail($email->sender_email) . ' ' .  '.<br/><br/>' . $email->email_body;
+                } else {
+                    $mailsEntities = $sendmail_tools->getAttachedEntitiesMails();
+                    $entityShortLabel = substr($mailsEntities[$email->sender_email], 0, strrpos($mailsEntities[$email->sender_email], "("));
+
+                    $GLOBALS['mailer']->setFrom($entityShortLabel . ' <' . $sendmail_tools->explodeSenderEmail($email->sender_email) . '> ');
+                    $emailFrom = $sendmail_tools->explodeSenderEmail($email->sender_email);
+                }
+                $GLOBALS['mailer']->setReplyTo($sendmail_tools->explodeSenderEmail($email->sender_email));
+            }
+
+            //echo $email->email_body . PHP_EOL;exit;
+
+            if (!empty($email->cc_list)) {
+                $GLOBALS['logger']->write("Copy e-mail to : " . $email->cc_list, 'INFO');
+            }
+            if (!empty($email->cci_list)) {
+                $GLOBALS['logger']->write("Copy invisible e-mail to : " . $email->cci_list, 'INFO');
+            }
+            
+            //--> Set the return path
+            if (!empty($mailfrom_generic)) {
+                $GLOBALS['mailer']->setReturnPath(
+                    $userInfo['firstname'] . ' ' .  $userInfo['lastname'] . ' <' . $mailfrom_generic . '> '
+                );
+            } else {
+                $GLOBALS['mailer']->setReturnPath($userInfo['mail']);
+            }
+
+            //--> To
+            $to = array();
+            $to = explode(',', $email->to_list);
+            //--> Cc
+            if (!empty($email->cc_list)) {
+                $GLOBALS['mailer']->setCc($email->cc_list);
+            }
+            //--> Cci
+            if (!empty($email->cci_list)) {
+                $GLOBALS['mailer']->setBcc($email->cci_list);
+            }
+            //--> Set subject
+            $GLOBALS['mailer']->setSubject($email->email_object);
+            //--> Set body: Is Html/raw text ?
+            if ($email->is_html == 'Y') {
+                $body = str_replace('###', ';', $email->email_body);
+                $body = str_replace('___', '--', $body);
+                $body = $sendmail_tools->rawToHtml($body);
+                $GLOBALS['mailer']->setHtml($body);
+            } else {
+                $body = $sendmail_tools->htmlToRaw($email->email_body);
+                $GLOBALS['mailer']->setText($body);
+            }
+            //--> Set charset
+            $GLOBALS['mailer']->setTextCharset($GLOBALS['charset']);
+            $GLOBALS['mailer']->setHtmlCharset($GLOBALS['charset']);
+            $GLOBALS['mailer']->setHeadCharset($GLOBALS['charset']);
+            
+            //--> Set attachments
+
+            //zip M2M
+            if ($email->message_exchange_id) {
+                $GLOBALS['logger']->write("set zip on message: " . $email->message_exchange_id, 'INFO');
+
+                //Get uri zip
+                $query = "SELECT * FROM message_exchange WHERE message_id = ?";
+                $smtp = $stmt = Bt_doQuery($GLOBALS['db'], $query, array($email->message_exchange_id));
+                $messageExchange = $smtp->fetchObject();
+
+                $docserver     = \Docserver\models\DocserverModel::getById(['id' => $messageExchange->docserver_id]);
+                $docserverType = \Docserver\models\DocserverTypeModel::getById(['id' => $docserver[0]['docserver_type_id']]);
+
+                $pathDirectory = str_replace('#', DIRECTORY_SEPARATOR, $messageExchange->path);
+                $filePath      = $docserver[0]['path_template'] . $pathDirectory . $messageExchange->filename;
+                $fingerprint   = \SrcCore\controllers\StoreController::getFingerPrint([
+                    'filePath' => $filePath,
+                    'mode'     => $docserverType[0]['fingerprint_mode'],
+                ]);
+
+                if ($fingerprint['fingerprint'] != $messageExchange->fingerprint) {
+                    $GLOBALS['logger']->write(_PB_WITH_FINGERPRINT_OF_DOCUMENT.'. ResId master : ' . $email->res_id, 'ERROR');
+                }
+
+                //Get file content
+                if (is_file($filePath)) {
+                    //Filename
+                    $resFilename = $sendmail_tools->createFilename($messageExchange->reference, 'zip');
+                    $GLOBALS['logger']->write("set attachment filename : " . $resFilename, 'INFO');
+
+                    //File content
+                    $file_content = $GLOBALS['mailer']->getFile($filePath);
+                    //Add file
+                    $GLOBALS['mailer']->addAttachment($file_content, $resFilename);
+                }
+            } else {
+                //Res master
+                if ($email->is_res_master_attached == 'Y') {
+                    $GLOBALS['logger']->write("set attachment on res master : " . $email->res_id, 'INFO');
+
+                    //Get file from docserver
+                    $resFile = $sendmail_tools->getResource($GLOBALS['collections'], $email->coll_id, $email->res_id);
+                    //Get file content
+                    if (is_file($resFile['file_path'])) {
+                        //Filename
+                        $resFilename = $sendmail_tools->createFilename($resFile['label'], $resFile['ext']);
+                        $GLOBALS['logger']->write("set attachment filename : " . $resFilename, 'INFO');
+
+                        //File content
+                        $file_content = $GLOBALS['mailer']->getFile($resFile['file_path']);
+                        //Add file
+                        $GLOBALS['mailer']->addAttachment($file_content, $resFilename, $resFile['mime_type']);
+                    }
+                }
+                
+                //Other version of the document
+                if (!empty($email->res_version_id_list)) {
                     $version = explode(',', $email->res_version_id_list);
-					foreach($version as $version_id) {
-						$GLOBALS['logger']->write("set attachment for version : " . $version_id, 'INFO');
-						$versionFile = $sendmail_tools->getVersion(
-								$GLOBALS['collections'],
-								$email->coll_id, 
-								$email->res_id,
-								$version_id
-							);
-						if(is_file($versionFile['file_path'])) {
-							//Filename
-							$versionFilename = $sendmail_tools->createFilename($versionFile['label'], $versionFile['ext']);
-							$GLOBALS['logger']->write("set attachment filename for version : " . $versionFilename, 'INFO');
-
-							//File content
-							$file_content = $GLOBALS['mailer']->getFile($versionFile['file_path']);
-							//Add file
-							$GLOBALS['mailer']->addAttachment($file_content, $versionFilename, $versionFile['mime_type']); 
-						}
-					}
-				}
-				
-				//Res attachment
-				if (!empty($email->res_attachment_id_list)) {
+                    foreach ($version as $version_id) {
+                        $GLOBALS['logger']->write("set attachment for version : " . $version_id, 'INFO');
+                        $versionFile = $sendmail_tools->getVersion(
+                                $GLOBALS['collections'],
+                                $email->coll_id,
+                                $email->res_id,
+                                $version_id
+                            );
+                        if (is_file($versionFile['file_path'])) {
+                            //Filename
+                            $versionFilename = $sendmail_tools->createFilename($versionFile['label'], $versionFile['ext']);
+                            $GLOBALS['logger']->write("set attachment filename for version : " . $versionFilename, 'INFO');
+
+                            //File content
+                            $file_content = $GLOBALS['mailer']->getFile($versionFile['file_path']);
+                            //Add file
+                            $GLOBALS['mailer']->addAttachment($file_content, $versionFilename, $versionFile['mime_type']);
+                        }
+                    }
+                }
+                
+                //Res attachment
+                if (!empty($email->res_attachment_id_list)) {
                     $attachments = explode(',', $email->res_attachment_id_list);
-					foreach($attachments as $attachment_id) {
-						$GLOBALS['logger']->write("set attachment on res attachment : " . $attachment_id, 'INFO');
-						$attachmentFile = $sendmail_tools->getAttachment(
-								$email->coll_id, 
-								$email->res_id,
-								$attachment_id
-							);
-						if(is_file($attachmentFile['file_path'])) {
-							//Filename
-							$attachmentFilename = $sendmail_tools->createFilename($attachmentFile['label'], $attachmentFile['ext']);
-							$GLOBALS['logger']->write("set attachment filename : " . $attachmentFilename, 'INFO');
-
-							//File content
-							$file_content = $GLOBALS['mailer']->getFile($attachmentFile['file_path']);
-							//Add file
-							$GLOBALS['mailer']->addAttachment($file_content, $attachmentFilename, $attachmentFile['mime_type']); 
-						}
-					}
+                    foreach ($attachments as $attachment_id) {
+                        $GLOBALS['logger']->write("set attachment on res attachment : " . $attachment_id, 'INFO');
+                        $attachmentFile = $sendmail_tools->getAttachment(
+                                $email->coll_id,
+                                $email->res_id,
+                                $attachment_id
+                            );
+                        if (is_file($attachmentFile['file_path'])) {
+                            //Filename
+                            $attachmentFilename = $sendmail_tools->createFilename($attachmentFile['label'], $attachmentFile['ext']);
+                            $GLOBALS['logger']->write("set attachment filename : " . $attachmentFilename, 'INFO');
+
+                            //File content
+                            $file_content = $GLOBALS['mailer']->getFile($attachmentFile['file_path']);
+                            //Add file
+                            $GLOBALS['mailer']->addAttachment($file_content, $attachmentFilename, $attachmentFile['mime_type']);
+                        }
+                    }
                 }
 
-				//Res version attachment
-				if (!empty($email->res_version_att_id_list)) {
+                //Res version attachment
+                if (!empty($email->res_version_att_id_list)) {
                     $attachments = explode(',', $email->res_version_att_id_list);
-					foreach($attachments as $attachment_id) {
-						$GLOBALS['logger']->write("set attachment version on res attachment : " . $attachment_id, 'INFO');
-						$attachmentFile = $sendmail_tools->getAttachment(
-								$email->coll_id, 
-								$email->res_id,
-								$attachment_id,
-								true
-							);
-						if(is_file($attachmentFile['file_path'])) {
-							//Filename
-							$attachmentFilename = $sendmail_tools->createFilename($attachmentFile['label'], $attachmentFile['ext']);
-							$GLOBALS['logger']->write("set attachment version filename : " . $attachmentFilename, 'INFO');
-
-							//File content
-							$file_content = $GLOBALS['mailer']->getFile($attachmentFile['file_path']);
-							//Add file
-							$GLOBALS['mailer']->addAttachment($file_content, $attachmentFilename, $attachmentFile['mime_type']); 
-						}
-					}
+                    foreach ($attachments as $attachment_id) {
+                        $GLOBALS['logger']->write("set attachment version on res attachment : " . $attachment_id, 'INFO');
+                        $attachmentFile = $sendmail_tools->getAttachment(
+                                $email->coll_id,
+                                $email->res_id,
+                                $attachment_id,
+                                true
+                            );
+                        if (is_file($attachmentFile['file_path'])) {
+                            //Filename
+                            $attachmentFilename = $sendmail_tools->createFilename($attachmentFile['label'], $attachmentFile['ext']);
+                            $GLOBALS['logger']->write("set attachment version filename : " . $attachmentFilename, 'INFO');
+
+                            //File content
+                            $file_content = $GLOBALS['mailer']->getFile($attachmentFile['file_path']);
+                            //Add file
+                            $GLOBALS['mailer']->addAttachment($file_content, $attachmentFilename, $attachmentFile['mime_type']);
+                        }
+                    }
                 }
-				
-				//Notes
-				if (!empty($email->note_id_list)) {
-					$notes = explode(',', $email->note_id_list);
-					$noteFile = $sendmail_tools->createNotesFile($email->coll_id, $email->res_id, $notes);
-					if(is_file($noteFile['file_path'])) {
-						//File content
-						$file_content = $GLOBALS['mailer']->getFile($noteFile['file_path']);
-						//Add file
-						$GLOBALS['mailer']->addAttachment($file_content, $noteFile['filename'], $noteFile['mime_type']); 
-					}
-				}
-			
-
-			//Now send the mail
-			$GLOBALS['logger']->write("sending e-mail ...", 'INFO');
-			$return = $GLOBALS['mailer']->send($to, (string)$mailerParams->type);
-
-			if( ($return == 1 && ((string)$mailerParams->type == "smtp" || (string)$mailerParams->type == "mail" )) || ($return == 0 && (string)$mailerParams->type == "sendmail")) {
-				$exec_result = 'S';
-				$GLOBALS['logger']->write("e-mail sent.", 'INFO');
-			} else {
-				//$GLOBALS['logger']->write("Errors when sending message through SMTP :" . implode(', ', $GLOBALS['mailer']->errors), 'ERROR');
+                
+                //Notes
+                if (!empty($email->note_id_list)) {
+                    $notes = explode(',', $email->note_id_list);
+                    $noteFile = $sendmail_tools->createNotesFile($email->coll_id, $email->res_id, $notes);
+                    if (is_file($noteFile['file_path'])) {
+                        //File content
+                        $file_content = $GLOBALS['mailer']->getFile($noteFile['file_path']);
+                        //Add file
+                        $GLOBALS['mailer']->addAttachment($file_content, $noteFile['filename'], $noteFile['mime_type']);
+                    }
+                }
+            }
+
+            //Now send the mail
+            $GLOBALS['logger']->write("sending e-mail ...", 'INFO');
+            $return = $GLOBALS['mailer']->send($to, (string)$mailerParams->type);
+
+            if (($return == 1 && ((string)$mailerParams->type == "smtp" || (string)$mailerParams->type == "mail")) || ($return == 0 && (string)$mailerParams->type == "sendmail")) {
+                $exec_result = 'S';
+                $GLOBALS['logger']->write("e-mail sent.", 'INFO');
+            } else {
+                //$GLOBALS['logger']->write("Errors when sending message through SMTP :" . implode(', ', $GLOBALS['mailer']->errors), 'ERROR');
                 $GLOBALS['logger']->write("SENDING EMAIL ERROR ! (" . $return[0].")", 'ERROR');
                 $GLOBALS['logger']->write("e-mail not sent !", 'ERROR');
-				$exec_result = 'E';
-				$err++;
-				$errTxt = ' (Last Error : '.$return[0].')';
+                $exec_result = 'E';
+                $err++;
+                $errTxt = ' (Last Error : '.$return[0].')';
 
-                $query = "INSERT INTO notif_email_stack (sender, recipient, subject, html_body, charset, module) VALUES (?, ?, ?, ?, ?, 'notifications')";  
+                $query = "INSERT INTO notif_email_stack (sender, recipient, subject, html_body, charset, module) VALUES (?, ?, ?, ?, ?, 'notifications')";
 
                 $html = "Message automatique : <br><br>
                 		Le courriel avec l'identifiant ".$email->email_id." dans la table 'sendmail' n'a pas été envoyé. <br>
@@ -267,48 +304,55 @@ while ($state <> 'END') {
                 		Répertoire d'installation de l'application : ".$GLOBALS['maarchDirectory']."<br>
                 		Fichier de configuration de sendmail : " . $GLOBALS['configFile'];
 
-        		$queryMlb = "SELECT alt_identifier FROM mlb_coll_ext WHERE res_id = ? ";
-				$stmt = Bt_doQuery($GLOBALS['db'], $queryMlb, array($email->res_id));
-				$mlbRecordSet = $stmt->fetchObject();
+                $queryMlb = "SELECT alt_identifier FROM mlb_coll_ext WHERE res_id = ? ";
+                $stmt = Bt_doQuery($GLOBALS['db'], $queryMlb, array($email->res_id));
+                $mlbRecordSet = $stmt->fetchObject();
 
-				$html .= '<br><br>Le courriel a été envoyé depuis le courrier dont le numéro chrono est : ' . $mlbRecordSet->alt_identifier;
+                $html .= '<br><br>Le courriel a été envoyé depuis le courrier dont le numéro chrono est : ' . $mlbRecordSet->alt_identifier;
 
                 $adminMails = explode(',', $GLOBALS['adminmail']);
-                if(!empty($adminMails)){
-		            foreach($adminMails as $recipient){
-	                	if(!empty($recipient)){
-		            		Bt_doQuery($GLOBALS['db'], $query, array($emailFrom, $recipient, $GLOBALS['subjectmail'], $html, $GLOBALS['charset']));
-		                }
-	                }                	
+                if (!empty($adminMails)) {
+                    foreach ($adminMails as $recipient) {
+                        if (!empty($recipient)) {
+                            Bt_doQuery($GLOBALS['db'], $query, array($emailFrom, $recipient, $GLOBALS['subjectmail'], $html, $GLOBALS['charset']));
+                        }
+                    }
                 }
 
-            	if(!empty($userInfo['mail'])){
-					if(strlen($email->email_object) >= 100) {
-						$objectToSend = mb_substr($email->email_object, 0, 100);
-						$objectToSend = substr($objectToSend, 0, strrpos($objectToSend, ' ')).'...';
-					} else {
-						$objectToSend = $email->email_object;
-					}					
+                if (!empty($userInfo['mail'])) {
+                    if (strlen($email->email_object) >= 100) {
+                        $objectToSend = mb_substr($email->email_object, 0, 100);
+                        $objectToSend = substr($objectToSend, 0, strrpos($objectToSend, ' ')).'...';
+                    } else {
+                        $objectToSend = $email->email_object;
+                    }
 
-            		$bodyMailError = "Message automatique : <br><br>
+                    $bodyMailError = "Message automatique : <br><br>
             						 Votre envoi de courriel dont l'objet est \"". $objectToSend . "\" avec le numéro chrono \"" . $mlbRecordSet->alt_identifier . "\" n'a pas été envoyé. Veuillez réessayer ou contacter votre administreur.";
-            		Bt_doQuery($GLOBALS['db'], $query, array($emailFrom, $userInfo['mail'], $GLOBALS['subjectmail'], $bodyMailError, $GLOBALS['charset']));
+                    Bt_doQuery($GLOBALS['db'], $query, array($emailFrom, $userInfo['mail'], $GLOBALS['subjectmail'], $bodyMailError, $GLOBALS['charset']));
                 }
-
-			}
-			//Update emails table
-			$query = "UPDATE " . EMAILS_TABLE 
-				. " SET send_date = CURRENT_TIMESTAMP "
-				. ", email_status = ? "
-				. " WHERE email_id = ? ";
-			$stmt = Bt_doQuery($GLOBALS['db'], $query, array($exec_result, $email->email_id));
-			$currentEmail++;
-			$state = 'SEND_AN_EMAIL';
-		} else {
-			$state = 'END';
-		}
+            }
+            //Update emails table
+            $query = "UPDATE " . EMAILS_TABLE
+                . " SET send_date = CURRENT_TIMESTAMP "
+                . ", email_status = ? "
+                . " WHERE email_id = ? ";
+            $stmt = Bt_doQuery($GLOBALS['db'], $query, array($exec_result, $email->email_id));
+
+            if ($email->message_exchange_id) {
+                //Update message table
+                $query = "UPDATE message_exchange"
+                    . " SET status = ? "
+                    . " WHERE message_id = ? ";
+                $stmt = Bt_doQuery($GLOBALS['db'], $query, array($exec_result, $email->message_exchange_id));
+            }
+            $currentEmail++;
+            $state = 'SEND_AN_EMAIL';
+        } else {
+            $state = 'END';
+        }
         break;
-	}
+    }
 }
 
 $emailSent = $totalEmailsToProcess - $err;
@@ -327,4 +371,3 @@ array_map('unlink', glob($_SESSION['config']['tmppath']."/*"));
 
 //unlink($GLOBALS['lckFile']);
 exit($GLOBALS['exitCode']);
-?>
diff --git a/modules/sendmail/class/class_modules_tools_Abstract.php b/modules/sendmail/class/class_modules_tools_Abstract.php
index 803623d8c78d38f18150220ddf8d594ae82cc034..faa8ec229d5de11e07d76a14d52487c21f4bcf8d 100755
--- a/modules/sendmail/class/class_modules_tools_Abstract.php
+++ b/modules/sendmail/class/class_modules_tools_Abstract.php
@@ -391,6 +391,28 @@ abstract class SendmailAbstract extends Database
         return $content;
     }
 
+    public function updateContactInputField($ajaxPath, $adressArray, $inputField, $readOnly=false)
+    {
+        $content = '<div id="loading_'.$inputField.'" style="display:none;"><i class="fa fa-spinner fa-spin" title="loading..."></i></div>';
+        //Get info from session array and display tag
+        if (isset($adressArray[$inputField]) && count($adressArray[$inputField]) > 0) {
+            foreach ($adressArray[$inputField] as $key => $adress) {
+                if (!empty($adress)) {
+                    $content .= '<div class="email_element" id="'.$key.'_'.$adress.'">'.$adress;
+                    if ($readOnly === false) {
+                        $content .= '&nbsp;<div class="email_delete_button" id="'.$key.'"'
+                            . 'onclick="updateDestUser(\''.$ajaxPath
+                            .'&mode=destUser\', \'del\', this.id, \''
+                            .$inputField.'\', this.id);" alt="'._DELETE.'" title="'
+                            ._DELETE.'">x</div>';
+                    }
+                    $content .= '</div>';
+                }
+            }
+        }
+        return $content;
+    }
+
     public function getResource($collectionArray, $coll_id, $res_id)
     {
         $viewResourceArr = array();
diff --git a/modules/sendmail/contact_autocompletion.php b/modules/sendmail/contact_autocompletion.php
new file mode 100644
index 0000000000000000000000000000000000000000..3094d3c4c2aff498e449508ab95c1fab3cd1955c
--- /dev/null
+++ b/modules/sendmail/contact_autocompletion.php
@@ -0,0 +1,99 @@
+<?php
+
+/**
+* Copyright Maarch since 2008 under licence GPLv3.
+* See LICENCE.txt file at the root folder for more details.
+* This file is part of Maarch software.
+*
+*/
+
+/**
+* @brief    List of contact informations for autocompletion
+*
+* @file     contact_autocompletion.php
+* @date     $date$
+* @version  $Revision$
+* @ingroup  sendmail
+*/
+
+$db = new Database();
+
+$args     = explode(' ', $_REQUEST['what']);
+$args[]   = $_REQUEST['what'];
+$num_args = count($args);
+if ($num_args == 0) {
+    return "<ul></ul>";
+}
+   
+$query    = "SELECT result, SUM(confidence) AS score, ca_id FROM (";
+
+$subQuery[1]=
+    "SELECT CASE WHEN is_corporate_person = 'Y' THEN UPPER(society) ELSE COALESCE(contact_firstname, '') || ' ' || UPPER(COALESCE(contact_lastname, '')) END || "
+    . " ' - ' || external_contact_id || ' - ' || COALESCE(contact_purpose_label, '') || ' : ' || "
+    . " COALESCE(firstname, '') || ' ' || UPPER(COALESCE(lastname, ''))|| ' ' || COALESCE(address_num, '') || ' ' || COALESCE(address_street, '') || ' ' || COALESCE(address_postal_code, '')|| ' ' || COALESCE(address_town, '')|| ' ' || UPPER(COALESCE(address_country, ''))"
+    ." || '(Moyen de communication : ' || cc.value || ')' AS result, "
+        . ' %d AS confidence, ca_id'
+    . " FROM view_contacts left join contact_communication cc on view_contacts.contact_id = cc.contact_id"
+    . " WHERE  "
+        . " enabled = 'Y' AND cc.value <> '' AND external_contact_id <> '' AND external_contact_id IS NOT NULL"
+        . " AND ("
+            . " (LOWER(contact_lastname) LIKE LOWER('%s') OR LOWER(lastname) LIKE LOWER('%s'))"
+            . " OR (LOWER(contact_firstname) LIKE LOWER('%s') OR LOWER(firstname) LIKE LOWER('%s'))"
+            . " OR LOWER(society) LIKE LOWER('%s')"
+            . " OR LOWER(society_short) LIKE LOWER('%s')"
+    . " OR LOWER(email) LIKE LOWER('%s')"
+        .")"
+    ."and (is_private = 'N' or ( user_id = '".$_SESSION['user']['UserId']."' and is_private = 'Y'))";
+
+$queryParts = array();
+
+foreach ($args as $arg) {
+    if (strlen($arg) == 0) {
+        continue;
+    }
+    # Full match of one given arg
+    $expr = $arg;
+    $conf = 100;
+    $queryParts[] = sprintf($subQuery[1], $conf, $expr, $expr, $expr, $expr, $expr, $expr, $expr);
+
+    # Partial match (starts with)
+    $expr = $arg . "%";
+    $conf = 34; # If found, partial match contains will also be so score is sum of both confidences, i.e. 67)
+    $queryParts[] = sprintf($subQuery[1], $conf, $expr, $expr, $expr, $expr, $expr, $expr, $expr);
+  
+    # Partial match (contains)
+    $expr = "%" . $arg . "%";
+    $conf = 33;
+    $queryParts[] = sprintf($subQuery[1], $conf, $expr, $expr, $expr, $expr, $expr, $expr, $expr);
+}
+
+$query .= implode(' UNION ALL ', $queryParts);
+$query .= ") matches"
+    . " GROUP BY result, ca_id "
+    . " ORDER BY score DESC, result ASC";
+
+$stmt = $db->query($query);
+$nb   = $stmt->rowCount();
+$m    = 30;
+if ($nb >= $m) {
+    $l = $m;
+} else {
+    $l = $nb;
+}
+
+echo "<ul title='$l contacts found'>";
+for ($i=0; $i<$l; $i++) {
+    $res   = $stmt->fetchObject();
+    $score = round($res->score / $num_args);
+    if ($i%2==1) {
+        $color = 'LightYellow';
+    } else {
+        $color = 'white';
+    }
+    echo "<li style='font-size: 8pt; background-color:$color;' title='confiance:".$score."%' id='".$res->ca_id."'>". $res->result ."</li>";
+}
+if($nb == 0) echo "<li></li>";
+echo "</ul>";
+
+if($nb == 0) echo "<p align='left' style='background-color:LemonChiffon;' title=\"Aucun résultat trouvé, veuillez compléter votre recherche.\" >...</p>"; 
+if($nb > $m) echo "<p align='left' style='background-color:LemonChiffon;' title=\"La liste n'a pas pu être affichée intégralement, veuillez compléter votre recherche.\" >...</p>";
\ No newline at end of file
diff --git a/modules/sendmail/js/functions.js b/modules/sendmail/js/functions.js
index 777c3b0f310ae982a1b416e0ce3c0ef66c84141d..d7adda6ec00761776bb9781174d481b7072c7bb1 100755
--- a/modules/sendmail/js/functions.js
+++ b/modules/sendmail/js/functions.js
@@ -11,6 +11,19 @@ var addEmailAdress = function (idField, idList, theUrlToListScript, paramNameSrv
          });
  };
 
+ var addDestUser = function (idField, idList, theUrlToListScript, paramNameSrv, minCharsSrv) {
+     new Ajax.Autocompleter(
+         idField,
+         idList,
+         theUrlToListScript,
+         {
+             paramName: paramNameSrv,
+             minChars: minCharsSrv,
+             tokens: ',',
+             afterUpdateElement:extractDestUser
+         });
+ };
+
 function addTemplateToEmail(templateMails, path){
 
     new Ajax.Request(path,
@@ -128,11 +141,38 @@ function updateAdress(path, action, adress, target, array_index, email_format_te
     }
 }
 
+function updateDestUser(path, action, adress, target, array_index) {
+     
+    new Ajax.Request(path,
+    {
+        method:'post',
+        parameters: { url : path,
+                      'for': action,
+                      contactAddress: adress,
+                      field: target,
+                      index: array_index
+                    },
+        onLoading: function(answer) {
+            $('loading_' + target).style.display='inline';
+        },
+        onSuccess: function(answer) {
+            eval("response = "+answer.responseText);
+            if(response.status == 0){
+                $(target).innerHTML = response.content;
+                if (action == 'add') {$('user').value = '';}
+            } else {
+                alert(response.error);
+                eval(response.exec_js);
+            }
+        }
+    });
+}
+
 function validEmailForm(path, form_id) {
 
     var attachments = $j("#joined_files input.check");
 
-    if (attachments.length > 0 && path.includes("for=send")) {
+    if (attachments.length > 0 && (path.includes("for=send") || path.includes("formContent=messageExchange"))) {
         var hasOneChecked = false;
         for (var i = 0; i < attachments.length; i++) {
             if (attachments[i].checked == true) {
@@ -142,13 +182,23 @@ function validEmailForm(path, form_id) {
         }
 
         if (!hasOneChecked) {
-            var cfm = confirm('Aucune pièce jointe sélectionnée. Voulez-vous quand même envoyer le mail ?');
-            if (!cfm) {
+            if(path.includes("formContent=messageExchange")){
+                alert('Aucune pièce jointe sélectionnée');
                 return;
+            } else if(path.includes("for=send")){
+                var cfm = confirm('Aucune pièce jointe sélectionnée. Voulez-vous quand même envoyer le mail ?');
+                if (!cfm) {
+                    return;
+                }
             }
         }
     }
 
+    if (typeof($j('input[name=main_exchange_doc]:checked', '#formEmail').val()) === 'undefined' && path.includes("formContent=messageExchange")) {
+        alert('Aucun document principal sélectionné');
+        return;
+    }
+
     tinyMCE.triggerSave();
     new Ajax.Request(path,
     {
@@ -209,6 +259,11 @@ function extractEmailAdress(field, item) {
     field.value = fullAdress.match(/\(([^)]+)\)/)[1];
 }
 
+function extractDestUser(field, item) {
+    $j('#user').val(item.id);
+    $j('#valid').click();
+}
+
 function validateEmail(email) { 
     var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
     return re.test(email);
@@ -263,4 +318,4 @@ function clickAttachmentsInput(id){
 }
 function clickAttachmentsNotes(id){
     $("note_"+id).click();
-}
\ No newline at end of file
+}
diff --git a/modules/sendmail/lang/en.php b/modules/sendmail/lang/en.php
index 8a8d6221ec4ee72e1988ccc33cb3eb4816b4df0d..984523d6298a55352cf69f5ae2ebe3943bc143f7 100755
--- a/modules/sendmail/lang/en.php
+++ b/modules/sendmail/lang/en.php
@@ -81,6 +81,20 @@ if (!defined("_EMAIL_NOT_EXIST"))
 //ADD
 if (!defined("_NEW_EMAIL"))
     define("_NEW_EMAIL","New mail");
+if (!defined("_NEW_NUMERIC_PACKAGE"))
+    define("_NEW_NUMERIC_PACKAGE","New numeric package");
+if (!defined("_NUMERIC_PACKAGE_ADDED"))
+    define("_NUMERIC_PACKAGE_ADDED","Numeric package added");
+if (!defined("_NUMERIC_PACKAGE_IMPORTED"))
+    define("_NUMERIC_PACKAGE_IMPORTED","Numeric package imported");
+if (!defined("_NUMERIC_PACKAGE_SENT"))
+    define("_NUMERIC_PACKAGE_SENT","Numeric package sent");
+if (!defined("_NUMERIC_PACKAGE"))
+    define("_NUMERIC_PACKAGE","Numeric package");
+if (!defined("_NO_COMMUNICATION_MODE"))
+    define("_NO_COMMUNICATION_MODE","No communication mode");
+if (!defined("_NOTHING"))
+    define("_NOTHING","Aucun");
 if (!defined("_CREATE_EMAIL"))
     define("_CREATE_EMAIL", "Create");
 if (!defined("_EMAIL_ADDED"))
@@ -137,3 +151,38 @@ if (!defined("_USE_MAIL_SERVICES_DESC"))
     define("_USE_MAIL_SERVICES_DESC", "Use emails services as sender");
 if (!defined("_INCORRECT_SENDER"))
     define("_INCORRECT_SENDER", "Incorrect sender");
+
+if (!defined("_OPERATION_DATE"))
+    define("_OPERATION_DATE", "Operation date");
+if (!defined("_RECEPTION_DATE"))
+    define("_RECEPTION_DATE", "Reception date");
+
+if (!defined("_SENDS_FAIL"))
+    define("_SENDS_FAIL", "Sends fail");
+if (!defined("_WRONG_FILE_TYPE_M2M"))
+    define("_WRONG_FILE_TYPE_M2M", "Only ZIP file allowed");
+if (!defined("_ERROR_RECEIVE_FAIL"))
+    define("_ERROR_RECEIVE_FAIL", "Error receive zip fail");
+
+if (!defined("_ERROR_CONTACT_UNKNOW"))
+    define("_ERROR_CONTACT_UNKNOW", "Contact unknow.");
+if (!defined("_NO_RECIPIENT"))
+    define("_NO_RECIPIENT", "No recipient");
+if (!defined("_NO_SENDER"))
+    define("_NO_SENDER", "No sender");
+if (!defined("_SIMPLE_DOWNLOAD"))
+    define("_SIMPLE_DOWNLOAD", "Download");
+if (!defined("_MORE_INFORMATIONS"))
+    define("_MORE_INFORMATIONS", "Informations about the transfer");
+if (!defined("_REPLY_RESPONSE_SENT"))
+    define("_REPLY_RESPONSE_SENT", "Reply sent on");
+if (!defined("_M2M_ARCHIVETRANSFER"))
+    define("_M2M_ARCHIVETRANSFER", "Archive transfer");
+if (!defined("_M2M_ARCHIVETRANSFERREPLYSENT"))
+    define("_M2M_ARCHIVETRANSFERREPLYSENT", "Archive transfer reply");
+if (!defined("_M2M_ACTION_DONE"))
+    define("_M2M_ACTION_DONE", "done by");
+if (!defined("_M2M_ENTITY_DESTINATION"))
+    define("_M2M_ENTITY_DESTINATION", "Mail is in the department");
+if (!defined("_M2M_FOLLOWUP_REQUEST"))
+    define("_M2M_FOLLOWUP_REQUEST", "Follow-up of the request");
diff --git a/modules/sendmail/lang/fr.php b/modules/sendmail/lang/fr.php
index 4c817beced25ac1a005371e52ab987c43feffc99..bef1e3b4eddb948a7275c4e14ba7f140380b7faf 100755
--- a/modules/sendmail/lang/fr.php
+++ b/modules/sendmail/lang/fr.php
@@ -28,7 +28,7 @@ if (!defined("_EMAIL_LIST"))
 if (!defined("_EMAIL_LIST_DESC"))
     define("_EMAIL_LIST_DESC", "Liste des courriels");
 if (!defined("_SENDED_EMAILS"))
-    define("_SENDED_EMAILS", "Courriels");
+    define("_SENDED_EMAILS", "Eléments envoyés");
  
 //STATUS
 if (!defined("_EMAIL_DRAFT"))
@@ -82,6 +82,20 @@ if (!defined("_EMAIL_NOT_EXIST"))
 //ADD
 if (!defined("_NEW_EMAIL"))
     define("_NEW_EMAIL","Nouveau message");
+if (!defined("_NEW_NUMERIC_PACKAGE"))
+    define("_NEW_NUMERIC_PACKAGE","Nouveau pli numérique");
+if (!defined("_NUMERIC_PACKAGE_ADDED"))
+    define("_NUMERIC_PACKAGE_ADDED","Pli numérique ajouté");
+if (!defined("_NUMERIC_PACKAGE_IMPORTED"))
+    define("_NUMERIC_PACKAGE_IMPORTED","Pli numérique importé");
+if (!defined("_NUMERIC_PACKAGE_SENT"))
+    define("_NUMERIC_PACKAGE_SENT","Plis numériques envoyés");
+if (!defined("_NUMERIC_PACKAGE"))
+    define("_NUMERIC_PACKAGE","Pli numérique");
+if (!defined("_NO_COMMUNICATION_MODE"))
+    define("_NO_COMMUNICATION_MODE","Aucun moyen de communication");
+if (!defined("_NOTHING"))
+    define("_NOTHING","Aucun");
 if (!defined("_CREATE_EMAIL"))
     define("_CREATE_EMAIL", "Créer");
 if (!defined("_EMAIL_ADDED"))
@@ -127,7 +141,7 @@ if (!defined("_EMAIL_REMOVED"))
 
 
 if (!defined("_Label_ADD_TEMPLATE_MAIL"))
-    define("_Label_ADD_TEMPLATE_MAIL", "Modèle : ");
+    define("_Label_ADD_TEMPLATE_MAIL", "Modèle d'accompagnement : ");
 if (!defined("_ADD_TEMPLATE_MAIL"))
     define("_ADD_TEMPLATE_MAIL", "Sélectionnez le modèle désiré");
 
@@ -139,3 +153,37 @@ if (!defined("_USE_MAIL_SERVICES_DESC"))
     define("_USE_MAIL_SERVICES_DESC", "Utiliser les courriels de ses services en tant qu'expéditeur");
 if (!defined("_INCORRECT_SENDER"))
     define("_INCORRECT_SENDER", "Expéditeur inccorect");
+if (!defined("_OPERATION_DATE"))
+    define("_OPERATION_DATE", "Date de prise en charge");
+if (!defined("_RECEPTION_DATE"))
+    define("_RECEPTION_DATE", "Date de réception");
+
+if (!defined("_SENDS_FAIL"))
+    define("_SENDS_FAIL", "L'envoi a échoué");
+if (!defined("_WRONG_FILE_TYPE_M2M"))
+    define("_WRONG_FILE_TYPE_M2M", "Seuls les fichiers ZIP sont acceptés");
+if (!defined("_ERROR_RECEIVE_FAIL"))
+    define("_ERROR_RECEIVE_FAIL", "Erreur lors de l'envoi du zip.");
+
+if (!defined("_ERROR_CONTACT_UNKNOW"))
+    define("_ERROR_CONTACT_UNKNOW", "Contact inconnu.");
+if (!defined("_NO_RECIPIENT"))
+    define("_NO_RECIPIENT", "Aucun destinataire");
+if (!defined("_NO_SENDER"))
+    define("_NO_SENDER", "Aucun expéditeur");
+if (!defined("_SIMPLE_DOWNLOAD"))
+    define("_SIMPLE_DOWNLOAD", "Télécharger");
+if (!defined("_MORE_INFORMATIONS"))
+    define("_MORE_INFORMATIONS", "Informations sur le transfert");
+if (!defined("_REPLY_RESPONSE_SENT"))
+    define("_REPLY_RESPONSE_SENT", "Accusé de prise en charge envoyé le");
+if (!defined("_M2M_ARCHIVETRANSFER"))
+    define("_M2M_ARCHIVETRANSFER", "Pli numérique");
+if (!defined("_M2M_ARCHIVETRANSFERREPLYSENT"))
+    define("_M2M_ARCHIVETRANSFERREPLYSENT", "Réponse envoyée");
+if (!defined("_M2M_ACTION_DONE"))
+    define("_M2M_ACTION_DONE", "actionné par");
+if (!defined("_M2M_ENTITY_DESTINATION"))
+    define("_M2M_ENTITY_DESTINATION", "Le courrier est dans le service");
+if (!defined("_M2M_FOLLOWUP_REQUEST"))
+    define("_M2M_FOLLOWUP_REQUEST", "Suivi de la demande");
diff --git a/modules/sendmail/mail_form.php b/modules/sendmail/mail_form.php
index de3b58502f6bc4369b7864f32d5ffc4fb2cb12d7..e033f4b877c6c3b2420dac3ec1c8935c7edb9e57 100755
--- a/modules/sendmail/mail_form.php
+++ b/modules/sendmail/mail_form.php
@@ -42,7 +42,8 @@ require_once 'modules/sendmail/sendmail_tables.php';
 require_once "modules" . DIRECTORY_SEPARATOR . "sendmail" . DIRECTORY_SEPARATOR
     . "class" . DIRECTORY_SEPARATOR . "class_modules_tools.php";
 require_once 'modules/sendmail/class/class_email_signatures.php';
-
+require_once 'modules/sendmail/Controllers/ReadMessageExchangeController.php';
+    
 $core_tools     = new core_tools();
 $request        = new request();
 $sec            = new security();
@@ -70,37 +71,52 @@ if (isset($_REQUEST['identifier']) && ! empty($_REQUEST['identifier'])) {
 if (isset($_REQUEST['coll_id']) && ! empty($_REQUEST['coll_id'])) {
     $collId = trim($_REQUEST['coll_id']);
     $parameters .= '&coll_id='.$_REQUEST['coll_id'];
-	$view = $sec->retrieve_view_from_coll_id($collId);
+    $view = $sec->retrieve_view_from_coll_id($collId);
     $table = $sec->retrieve_table_from_coll($collId);
 }
 
 //Keep some origin parameters
-if (isset($_REQUEST['size']) && !empty($_REQUEST['size'])) $parameters .= '&size='.$_REQUEST['size'];
+if (isset($_REQUEST['size']) && !empty($_REQUEST['size'])) {
+    $parameters .= '&size='.$_REQUEST['size'];
+}
 if (isset($_REQUEST['order']) && !empty($_REQUEST['order'])) {
     $parameters .= '&order='.$_REQUEST['order'];
-    if (isset($_REQUEST['order_field']) && !empty($_REQUEST['order_field'])) $parameters .= '&order_field='.$_REQUEST['order_field'];
+    if (isset($_REQUEST['order_field']) && !empty($_REQUEST['order_field'])) {
+        $parameters .= '&order_field='.$_REQUEST['order_field'];
+    }
+}
+if (isset($_REQUEST['what']) && !empty($_REQUEST['what'])) {
+    $parameters .= '&what='.$_REQUEST['what'];
+}
+if (isset($_REQUEST['template']) && !empty($_REQUEST['template'])) {
+    $parameters .= '&template='.$_REQUEST['template'];
+}
+if (isset($_REQUEST['start']) && !empty($_REQUEST['start'])) {
+    $parameters .= '&start='.$_REQUEST['start'];
+}
+
+if (isset($_REQUEST['formContent']) && !empty($_REQUEST['formContent'])) {
+    $formContent = $_GET['formContent'];
+} else {
+    $formContent = 'mail';
 }
-if (isset($_REQUEST['what']) && !empty($_REQUEST['what'])) $parameters .= '&what='.$_REQUEST['what'];
-if (isset($_REQUEST['template']) && !empty($_REQUEST['template'])) $parameters .= '&template='.$_REQUEST['template'];
-if (isset($_REQUEST['start']) && !empty($_REQUEST['start'])) $parameters .= '&start='.$_REQUEST['start'];
 
 //Keep the origin
 $origin = '';
 if (isset($_REQUEST['origin']) && !empty($_REQUEST['origin'])) {
-    //
     $origin = $_REQUEST['origin'];
 }
 
 //Path to actual script
 $path_to_script = $_SESSION['config']['businessappurl']
     ."index.php?display=true&module=sendmail&page=sendmail_ajax_content&identifier="
-    .$identifier."&origin=".$origin.$parameters;
+    .$identifier."&origin=".$origin."&formContent=".$formContent.$parameters;
     
 $core_tools->load_lang();
 $core_tools->load_html();
-$core_tools->load_header('', true, false);           
+$core_tools->load_header('', true, false);
 ?><body><?php
-$core_tools->load_js(); 
+$core_tools->load_js();
 
 $aUserEntities = \User\models\UserModel::getEntitiesById(['userId' => $_SESSION['user']['UserId']]);
 $userEntities = [];
@@ -108,7 +124,7 @@ foreach ($aUserEntities as $value) {
     $userEntities[] = $value['entity_id'];
 }
 
-if(empty($userEntities)){
+if (empty($userEntities)) {
     $userEntities = [''];
 }
 
@@ -121,66 +137,104 @@ $userTemplates = \SrcCore\models\DatabaseModel::select(['select'   => ['t.templa
 
 //ADD
 if ($mode == 'add') {
-    $content .= '<div>';
+    $content .= '<div style="padding: 10px;">';
     $content .= '<form name="formEmail" id="formEmail" method="post" action="#">';
     $content .= '<input type="hidden" value="'.$identifier.'" name="identifier" id="identifier">';
-    $content .= '<input type="hidden" value="Y" name="is_html" id="is_html">';
-    $content .= '<table border="0" align="left" width="100%" cellspacing="5">';
+    if ($formContent == 'messageExchange') {
+        $content .= '<input type="hidden" value="N" name="is_html" id="is_html">';
+    } else {
+        $content .= '<input type="hidden" value="Y" name="is_html" id="is_html">';
+    }
+    $content .= '<input type="hidden" value="'.$_GET['formContent'].'" name="formContent" id="formContent">';
+    $content .= '<table border="0" align="left" width="100%" cellspacing="5" ';
+    if ($formContent == 'messageExchange') {
+        $content .= 'style="margin-left: -30px;" ';
+    }
+    $content .= '>';
     $content .= '<tr>';
     $content .= '<td align="right" nowrap width="10%"><b>'.ucfirst(_FROM_SHORT).' </b></td><td>';
 
+    $content .='<select name="sender_email" id="sender_email">';
     $userEntitiesMails = array();
 
-    if ($core_tools->test_service('use_mail_services', 'sendmail', false)) {
-        $userEntitiesMails = $sendmail_tools->getAttachedEntitiesMails($_SESSION['user']['UserId']);
-    }
+    if ($formContent != 'messageExchange') {
+        if ($core_tools->test_service('use_mail_services', 'sendmail', false)) {
+            $userEntitiesMails = $sendmail_tools->getAttachedEntitiesMails($_SESSION['user']['UserId']);
+        }
 
-    $content .='<select name="sender_email" id="sender_email">
-                    <option value="'.$_SESSION['user']['Mail'].'" ';
-    if(empty($userEntitiesMails)){
-        $content .= 'selected="selected"';
-    }
-    $content .='>'.functions::xssafe($_SESSION['user']['FirstName']) . ' ' . functions::xssafe($_SESSION['user']['LastName']) . ' (' . $_SESSION['user']['Mail'] . ')</option>';
-    foreach ($userEntitiesMails as $key => $value) {
-        $primaryentity = explode(',', $key);
-        if($primaryentity[0] == $_SESSION['user']['primaryentity']['id']){
-            $content .= '<option value="'.$key.'" selected="selected" >' . $value . '</option>';
-        }else{
-            $content .= '<option value="'.$key.'" >' . $value . '</option>';
+        $content .='<option value="'.$_SESSION['user']['Mail'].'" ';
+        if (empty($userEntitiesMails)) {
+            $content .= 'selected="selected"';
+        }
+        $content .='>'.functions::xssafe($_SESSION['user']['FirstName']) . ' ' . functions::xssafe($_SESSION['user']['LastName']) . ' (' . $_SESSION['user']['Mail'] . ')</option>';
+        foreach ($userEntitiesMails as $key => $value) {
+            $primaryentity = explode(',', $key);
+            if ($primaryentity[0] == $_SESSION['user']['primaryentity']['id']) {
+                $content .= '<option value="'.$key.'" selected="selected" >' . $value . '</option>';
+            } else {
+                $content .= '<option value="'.$key.'" >' . $value . '</option>';
+            }
+        }
+    } else {
+        $userEntitiesMails = \Entity\models\EntityModel::getEntitiesByUserId(['user_id' => $_SESSION['user']['UserId']]);
+        if (empty($userEntitiesMails)) {
+            $content .= '<option value="" >'._NO_SENDER.'</option>';
+        } else {
+            foreach ($userEntitiesMails as $value) {
+                if (!empty($value['business_id'])) {
+                    if ($value['entity_id'] == $_SESSION['user']['primaryentity']['id']) {
+                        $content .= '<option value="'.$value['entity_id'].'" selected="selected" >' . $value['entity_label'] . ' ('.$value['business_id'].')</option>';
+                    } else {
+                        $content .= '<option value="'.$value['entity_id'].'" >' . $value['entity_label'] . ' ('.$value['business_id'].')</option>';
+                    }
+                }
+            }
         }
     }
+
     $content .='</select>';
     $content .='</td>';
     $content .= '</tr>';
-    $content .= '<tr>';
-    $content .= '<td align="right" >'._EMAIL.'</label></td>';
-    $content .= '<td colspan="2"><input type="text" name="email" id="email" value="" class="emailSelect" />';
-    $content .= '<div id="adressList" class="autocomplete"></div>';
-    $content .= '<script type="text/javascript">addEmailAdress(\'email\', \'adressList\', \''
-        .$_SESSION['config']['businessappurl']
-        .'index.php?display=true&module=sendmail&page=adresss_autocomletion\', \'what\', \'2\');</script>';
-    $content .= ' <select name="target" id="target">'
-        .'<option id="target_target_to" value="to">'._SEND_TO_SHORT.'</option>'
-        .'<option id="target_cc" value="cc">'._COPY_TO_SHORT.'</option>'
-        .'<option id="target_cci" value="cci">'._COPY_TO_INVISIBLE_SHORT.'</option>'
-        .'</select>';
-    $content .=' <input type="button" name="add" value="&nbsp;'._ADD
-                    .'&nbsp;" id="valid" class="button" onclick="updateAdress(\''.$path_to_script
-                    .'&mode=adress\', \'add\', document.getElementById(\'email\').value, '
-                    .'document.getElementById(\'target\').value, false, \''.(addslashes(_EMAIL_WRONG_FORMAT)).'\');" />&nbsp;';
-    $content .= '</td>';
-    $content .= '</tr>';
+    if ($formContent != 'messageExchange') {
+        $content .= '<tr>';
+        $content .= '<td align="right" >'._EMAIL.'</label></td>';
+        $content .= '<td colspan="2"><input type="text" name="email" id="email" value="" class="emailSelect" />';
+        $content .= '<div id="adressList" class="autocomplete"></div>';
+        $content .= '<script type="text/javascript">addEmailAdress(\'email\', \'adressList\', \''
+            .$_SESSION['config']['businessappurl']
+            .'index.php?display=true&module=sendmail&page=adresss_autocomletion\', \'what\', \'2\');</script>';
+        $content .= ' <select name="target" id="target">'
+            .'<option id="target_target_to" value="to">'._SEND_TO_SHORT.'</option>'
+            .'<option id="target_cc" value="cc">'._COPY_TO_SHORT.'</option>'
+            .'<option id="target_cci" value="cci">'._COPY_TO_INVISIBLE_SHORT.'</option>'
+            .'</select>';
+        $content .=' <input type="button" name="add" value="&nbsp;'._ADD
+                        .'&nbsp;" id="valid" class="button" onclick="updateAdress(\''.$path_to_script
+                        .'&mode=adress\', \'add\', document.getElementById(\'email\').value, '
+                        .'document.getElementById(\'target\').value, false, \''.(addslashes(_EMAIL_WRONG_FORMAT)).'\');" />&nbsp;';
+        $content .= '</td>';
+        $content .= '</tr>';
+    } else {
+        $content .= '<tr>';
+        $content .= '<td align="right" >Contact</label></td>';
+        $content .= '<td colspan="2"><input type="text" name="user" id="user" style="width:96%" />';
+        $content .= '<div id="destUSer" class="autocomplete"></div>';
+        $content .= '<script type="text/javascript">addDestUser(\'user\', \'destUSer\', \'index.php?display=true&module=sendmail&page=contact_autocompletion\', \'what\', \'2\');</script>';
+        $content .=' <input type="hidden" id="valid" onclick="updateDestUser(\''.$path_to_script
+                        .'&mode=destUser\', \'add\', document.getElementById(\'user\').value, \'to\', false);" />&nbsp;';
+        $content .= '</td>';
+        $content .= '</tr>';
+    }
     $content .= '<tr>';
     $content .= '<td align="right" nowrap width="10%"><span class="red_asterisk"><i class="fa fa-star"></i></span> <label>'
         ._SEND_TO_SHORT.'</label></td>';
 
-    $exp_contact_id = null;
+    $exp_user_id     = null;
+    $dest_user_id    = null;
+    $exp_contact_id  = null;
     $dest_contact_id = null;
-    $exp_user_id = null;
-    $dest_user_id = null;
-    $adresse_mail = null;
     $db = new Database();
-    $stmt = $db->query("SELECT res_id, category_id, address_id, exp_user_id, dest_user_id, admission_date
+    $stmt = $db->query("SELECT res_id, category_id, address_id, exp_user_id, dest_user_id, admission_date, exp_contact_id, dest_contact_id
                 FROM mlb_coll_ext 
                 WHERE (( exp_contact_id is not null 
                 or dest_contact_id is not null 
@@ -189,64 +243,99 @@ if ($mode == 'add') {
                 and  res_id = ?)", array($_SESSION['doc_id']));
     $res = $stmt->fetchObject();
     
-    $res_id = $res->res_id;
-    $category_id = $res->category_id;
-    $address_id = $res->address_id;
-    $exp_user_id = $res->exp_user_id;
-    $dest_user_id = $res->dest_user_id;
-    $admission_date = $res->admission_date;
+    $res_id          = $res->res_id;
+    $category_id     = $res->category_id;
+    $address_id      = $res->address_id;
+    $exp_user_id     = $res->exp_user_id;
+    $dest_user_id    = $res->dest_user_id;
+    $admission_date  = $res->admission_date;
+    $exp_contact_id  = $res->exp_contact_id;
+    $dest_contact_id = $res->dest_contact_id;
 
     if ($res_id != null) {
         $stmt = $db->query("SELECT subject FROM res_letterbox WHERE res_id = ?", array($res_id));
         $rawSubject = $stmt->fetchObject();
         $subject = $rawSubject->subject;
     }
-    if($address_id != null){
-        $stmt = $db->query("SELECT email FROM contact_addresses WHERE id = ?", array($address_id));
-        $adr = $stmt->fetchObject();
-        $adress_mail = $adr->email;
-    }elseif($exp_user_id != null){
-        $stmt = $db->query("SELECT mail FROM users WHERE user_id = ?", array($exp_user_id));
-        $adr = $stmt->fetchObject();
-        $adress_mail = $adr->mail;
-    }elseif($dest_user_id != null){
-        $stmt = $db->query("SELECT mail FROM users WHERE user_id = ?", array($dest_user_id));
-        $adr = $stmt->fetchObject();
-        $adress_mail = $adr->mail;
+    if ($formContent != 'messageExchange') {
+        if ($address_id != null) {
+            $adr         = \Contact\models\ContactModel::getFullAddressById(['select' => ['email'], 'addressId' => $address_id]);
+            $adress_mail = $adr[0]['email'];
+        } elseif ($exp_user_id != null) {
+            $stmt        = $db->query("SELECT mail FROM users WHERE user_id = ?", array($exp_user_id));
+            $adr         = $stmt->fetchObject();
+            $adress_mail = $adr->mail;
+        } elseif ($dest_user_id != null) {
+            $stmt        = $db->query("SELECT mail FROM users WHERE user_id = ?", array($dest_user_id));
+            $adr         = $stmt->fetchObject();
+            $adress_mail = $adr->mail;
+        }
+    } elseif ($address_id != null) {
+        if ($exp_contact_id != null) {
+            $contact_id = $exp_contact_id;
+        } else {
+            $contact_id = $dest_contact_id;
+        }
+        if (!empty($contact_id)) {
+            $communicationTypeModel = \Contact\models\ContactModel::getContactCommunication(['contactId' => $contact_id]);
+            $contactInfo            = \Contact\models\ContactModel::getById(['id' => $contact_id, 'table' => ['view_contacts']]);
+            if (!empty($communicationTypeModel) && !empty($contactInfo[0]['external_contact_id'])) {
+                $adress_mail = \Contact\models\ContactModel::getContactFullLabel(['addressId' => $address_id]);
+                $adress_mail .= '. (' . _COMMUNICATION_TYPE . ' : '.$communicationTypeModel['value'] . ')';
+            }
+        }
     }
-    if($adress_mail != null and ($_SESSION['user']['UserId'] != $exp_user_id and $_SESSION['user']['UserId'] != $dest_user_id)){
-    $content .= '<td width="90%" colspan="2"><div name="to" id="to" class="emailInput"><div id="loading_to" style="display:none;"></div><div class="email_element" id="0_'.$adress_mail.'">'.$adress_mail.'&nbsp;<div class="email_delete_button" id="0" onclick="updateAdress(\''.$_SESSION['config']['coreurl'].'apps/maarch_entreprise/index.php?display=true&amp;module=sendmail&amp;page=sendmail_ajax_content&amp;identifier=106&amp;origin=document&amp;coll_id=letterbox_coll&amp;size=full&amp;mode=adress\', \'del\', \''.$adress_mail.'\', \'to\', this.id);"
-         alt=\"Supprimer\" title=\"Supprimer\">x</div></div></div>'
+    if ($adress_mail != null and $_SESSION['user']['UserId'] != $exp_user_id and $_SESSION['user']['UserId'] != $dest_user_id) {
+        if ($formContent == 'messageExchange') {
+            $_SESSION['adresses']['to'][$address_id] = $adress_mail;
+            $onclickfunction = 'updateDestUser';
+            $elementToDel    = $address_id;
+            $modeUrl         = 'destUser';
+            $idToDel         = $address_id;
+        } else {
+            $_SESSION['adresses']['to'][0] = $adress_mail;
+            $onclickfunction = 'updateAdress';
+            $elementToDel    = $adress_mail;
+            $idToDel         = 0;
+        }
+        $content .= '<td width="90%" colspan="2"><div name="to" id="to" class="emailInput"><div id="loading_to" style="display:none;"></div><div class="email_element" id="0_'.$adress_mail.'">'.
+        $adress_mail.'&nbsp;<div class="email_delete_button" id="'.$idToDel.'" onclick="'.$onclickfunction.'(\''.$path_to_script
+                .'&mode='.$modeUrl.'\', \'del\', \''.$elementToDel.'\', \'to\', this.id);"
+             alt=\"Supprimer\" title=\"Supprimer\">x</div></div></div>'
         .'<div id="loading_to" style="display:none;"><i class="fa fa-spinner fa-spin" title="loading..."></div></div></td>';
-    $_SESSION['adresses']['to'][0] = $adress_mail;
-        }else{
-    $content .= '<td width="90%" colspan="2"><div name="to" id="to" class="emailInput">'
+    } else {
+        $content .= '<td width="90%" colspan="2"><div name="to" id="to" class="emailInput">'
         .'<div id="loading_to" style="display:none;"><i class="fa fa-spinner fa-spin" title="loading..."></div></div></td>';
-             }
+    }
 
     $content .= '</tr>';
-    $content .= '<tr><td colspan="3"><a href="javascript://" '
-		.'onclick="new Effect.toggle(\'tr_cc\', \'blind\', {delay:0.2});'
-		.'new Effect.toggle(\'tr_cci\', \'blind\', {delay:0.2});">'
-		._SHOW_OTHER_COPY_FIELDS.'</a></td></tr>';
-    $content .= '<tr id="tr_cc" style="display:none">';
-    $content .= '<td align="right" nowrap><label>'._COPY_TO_SHORT.'</label></td>';
-    $content .= '<td colspan="2"><div name="cc" id="cc" class="emailInput">'
-        .'<div id="loading_cc" style="display:none;"><i class="fa fa-spinner fa-spin" title="loading..."></div></div></td>';
-    $content .= '</tr>';
-    $content .= '<tr id="tr_cci" style="display:none">';
-    $content .= '<td align="right" nowrap><label>'._COPY_TO_INVISIBLE_SHORT.'</label></td>';
-    $content .= '<td colspan="2"><div name="cci" id="cci" class="emailInput">'
-        .'<div id="loading_cci" style="display:none;"><i class="fa fa-spinner fa-spin" title="loading..."></div></div></td>';
-    $content .= '</tr>';
-    $content .= '<tr>';
+
+    if ($formContent != 'messageExchange') {
+        $content .= '<tr><td colspan="3"><a href="javascript://" '
+            .'onclick="new Effect.toggle(\'tr_cc\', \'blind\', {delay:0.2});'
+            .'new Effect.toggle(\'tr_cci\', \'blind\', {delay:0.2});">'
+            ._SHOW_OTHER_COPY_FIELDS.'</a></td></tr>';
+        $content .= '<tr id="tr_cc" style="display:none">';
+        $content .= '<td align="right" nowrap><label>'._COPY_TO_SHORT.'</label></td>';
+        $content .= '<td colspan="2"><div name="cc" id="cc" class="emailInput">'
+            .'<div id="loading_cc" style="display:none;"><i class="fa fa-spinner fa-spin" title="loading..."></div></div></td>';
+        $content .= '</tr>';
+        $content .= '<tr id="tr_cci" style="display:none">';
+        $content .= '<td align="right" nowrap><label>'._COPY_TO_INVISIBLE_SHORT.'</label></td>';
+        $content .= '<td colspan="2"><div name="cci" id="cci" class="emailInput">'
+            .'<div id="loading_cci" style="display:none;"><i class="fa fa-spinner fa-spin" title="loading..."></div></div></td>';
+        $content .= '</tr>';
+        $content .= '<tr>';
+    }
     $content .= '<td align="right" nowrap><span class="red_asterisk"><i class="fa fa-star"></i></span><label> '._EMAIL_OBJECT.' </label></td>';
 
     $content .= '<td colspan="2">';
-    if ($category_id === 'outgoing')
-        $content .= '<input name="object" id="object" class="emailInput" type="text" value="' . $subject . '" />';
-    else
-        $content .= '<input name="object" id="object" class="emailInput" type="text" value="' . _EMAIL_OBJECT_ANSWER . ' ' . functions::format_date_db($admission_date).'" />';
+
+    if ($category_id == 'outgoing') {
+        $content .= '<input name="object" id="object" class="emailInput" type="text" value="' . $subject . '" '.$readOnlyObject.'/>';
+    } else {
+        $content .= '<input name="object" id="object" class="emailInput" type="text" value="' . _EMAIL_OBJECT_ANSWER . ' ' . functions::format_date_db($admission_date).'" '.$readOnlyObject.'/>';
+    }
 
     $content .= '</td></tr>';
     $content .= '</table><br />';
@@ -254,7 +343,7 @@ if ($mode == 'add') {
     $content .= '<h4 onclick="new Effect.toggle(\'joined_files\', \'blind\', {delay:0.2});'
         . 'whatIsTheDivStatus(\'joined_files\', \'divStatus_joined_files\');" '
         . 'class="categorie" style="width:90%;" onmouseover="this.style.cursor=\'pointer\';">';
-    $content .= ' <span id="divStatus_joined_files" style="color:#1C99C5;"><i class="fa fa-plus-square-o"></i></span>&nbsp;' 
+    $content .= ' <span id="divStatus_joined_files" style="color:#1C99C5;"><i class="fa fa-plus-square-o"></i></span>&nbsp;'
         . _JOINED_FILES;
     $content .= '</h4>';
     
@@ -264,65 +353,72 @@ if ($mode == 'add') {
     $joined_files = $sendmail_tools->getJoinedFiles($collId, $table, $identifier);
     if (count($joined_files) >0) {
         $content .='<br/>';
-        $content .='<div style="color:rgb(22, 173, 235);font-weight:bold;">'._DOC.'</div>';
-        for($i=0; $i < count($joined_files); $i++) {
+        $content .='<div><span style="color:rgb(22, 173, 235);font-weight:bold;">'._DOC.'</span>';
+        if ($formContent == 'messageExchange') {
+            $content .='<span style="float: right;font-weight:bold">Principal</span>';
+        }
+        $content .='</div>';
+        for ($i=0; $i < count($joined_files); $i++) {
             //Get data
-            $id          = $joined_files[$i]['id']; 
+            $id          = $joined_files[$i]['id'];
             $description = $joined_files[$i]['label'];
             $format      = $joined_files[$i]['format'];
             $format      = $joined_files[$i]['format'];
             $mime_type   = $is->get_mime_type($joined_files[$i]['format']);
             $att_type    = $joined_files[$i]['format'];
             $filesize    = $joined_files[$i]['filesize']/1024;
-            ($filesize > 1)? $filesize = ceil($filesize).' Ko' :  $filesize = round($filesize,2).' Octets';
-			//Show data
-			$version = '';
+            ($filesize > 1)? $filesize = ceil($filesize).' Ko' :  $filesize = round($filesize, 2).' Octets';
+            //Show data
+            $version = '';
             $content .= "<table cellspacing=\"3\" id=\"main_document\" style=\"border-collapse:collapse;width:100%;\"><tr>";
-            if($joined_files[$i]['is_version'] === true){
-				//Version
-				$version = ' - '._VERSION.' '.$joined_files[$i]['version'] ;
-				//Contents
-				$content .= "<th style=\"width:25px;border: dashed 1px grey;border-right:none;vertical-align:middle;\" alt=\"".$description
-					. "\" title=\"".$description
-					. "\"><input type=\"checkbox\" id=\"join_file_".$id
-					. "_V".$joined_files[$i]['version']."\" name=\"join_version[]\""
-					. " class=\"check\" value=\""
-					. $id."\" ></th>"
-					. "<td style=\"cursor:pointer;border: dashed 1px grey;border-left:none;padding:5px;text-align:left;\"";
+            if ($joined_files[$i]['is_version'] === true) {
+                //Version
+                $version = ' - '._VERSION.' '.$joined_files[$i]['version'] ;
+                //Contents
+                $content .= "<th style=\"width:25px;border: dashed 1px grey;border-right:none;vertical-align:middle;\" alt=\"".$description
+                    . "\" title=\"".$description
+                    . "\"><input type=\"checkbox\" id=\"join_file_".$id
+                    . "_V".$joined_files[$i]['version']."\" name=\"join_version[]\""
+                    . " class=\"check\" value=\""
+                    . $id."\" ></th>"
+                    . "<td style=\"cursor:pointer;border: dashed 1px grey;border-left:none;padding:5px;text-align:left;\"";
                 $content .= ' onclick="clickAttachments('.$id.')" ';
                 $content .= "><strong>" . $description . "</strong> <span style=\"font-size: 10px;color: grey;\">(" . $att_type . " - " . $filesize .")</span></</td>";
-			} else {
-				$content .= "<th style=\"width:25px;border: dashed 1px grey;border-right:none;vertical-align:middle;\" alt=\"".$description
-					. "\" title=\"".$description
-					. "\"><input type=\"checkbox\" id=\"join_file_".$id."\" name=\"join_file[]\""
-					. " class=\"check\" value=\""
-					. $id."\" ></th>"
-					. "<td style=\"cursor:pointer;border: dashed 1px grey;border-left:none;padding:5px;text-align:left;\"";
+            } else {
+                $content .= "<th style=\"width:25px;border: dashed 1px grey;border-right:none;vertical-align:middle;\" alt=\"".$description
+                    . "\" title=\"".$description
+                    . "\"><input type=\"checkbox\" id=\"join_file_".$id."\" name=\"join_file[]\""
+                    . " class=\"check\" value=\""
+                    . $id."\" ></th>"
+                    . "<td style=\"cursor:pointer;border: dashed 1px grey;border-left:none;padding:5px;text-align:left;\"";
                 $content .= ' onclick="clickAttachments('.$id.')" ';
                 $content .= "><strong>" . $description . "</strong> <span style=\"font-size: 10px;color: grey;\">(" . $att_type . " - " . $filesize .")</span></td>";
             }
+            if ($formContent == 'messageExchange') {
+                $content .= "<td style=\"width:1%;text-align:center;width: 8%;margin-right: 2px;vertical-align: middle\"><input type=radio name=\"main_exchange_doc\" value=\"res_letterbox__".$id."\">";
+                $content .= "</td>";
+            }
             $content .= "</tr></table>";
-			$filename = $sendmail_tools->createFilename($description.$version, $format);
+            $filename = $sendmail_tools->createFilename($description.$version, $format);
             $all_joined_files .= $description.': '.$filename.PHP_EOL;
         }
     }
     
     //Attachments
-    if ($core_tools->is_module_loaded('attachments')) { 
+    if ($core_tools->is_module_loaded('attachments')) {
         $attachment_files = $sendmail_tools->getJoinedFiles($collId, $table, $identifier, true);
         if (count($attachment_files) >0) {
             $content .='<br/>';
             $content .='<div style="color:rgb(22, 173, 235);font-weight:bold;">'._ATTACHMENTS.'</div>';
             $content .= "<table cellspacing=\"3\" id=\"show_pj_mail\" style=\"border-collapse:collapse;width:100%;\">";
 
-            for($i=0; $i < count($attachment_files); $i++) {
-                $it = $i+1;
+            for ($i=0; $i < count($attachment_files); $i++) {
                 $content .= "<tr style=\"vertical-align:top;\">";
 
                 //Get data
-                $id           = $attachment_files[$i]['id']; 
-                $isVersion    = $attachment_files[$i]['is_version']; 
-                $id_converted = $attachment_files[$i]['converted_pdf']; 
+                $id           = $attachment_files[$i]['id'];
+                $isVersion    = $attachment_files[$i]['is_version'];
+                $id_converted = $attachment_files[$i]['converted_pdf'];
                 $description  = $attachment_files[$i]['label'];
                 if (strlen($description) > 73) {
                     $description = substr($description, 0, 70);
@@ -339,10 +435,12 @@ if ($mode == 'add') {
                 $dest_lastname   = $attachment_files[$i]['lastname'];
                 ($filesize > 1)? $filesize = ceil($filesize).' Ko' :  $filesize = $filesize.' Octets';
                 
-                if($isVersion){
+                if ($isVersion) {
                     $inputName = "join_version_attachment[]";
+                    $mainExchangeDocValue = "res_version_attachments";
                 } else {
                     $inputName = "join_attachment[]";
+                    $mainExchangeDocValue = "res_attachments";
                 }
 
                 $content .= "<th style=\"width:25px;border: dashed 1px grey;border-right:none;vertical-align:middle;\" alt=\"".$description
@@ -357,34 +455,38 @@ if ($mode == 'add') {
                     }
                 $content .= "/></th>";
 
-                if(!$id_converted){
+                if (!$id_converted) {
                     $content .= "<td style=\"cursor:pointer;border: dashed 1px grey;border-left:none;padding:5px;\"";
                     $content .= ' onclick="clickAttachmentsInput('.$i.')" ';
-                }else{
+                } else {
                     $content .= "<td style=\"border: dashed 1px grey;border-left:none;padding:5px;\"";
                 }
 
                 $content .= "><span style=\"font-size: 10px;color: rgb(22, 173, 235);\">" . $attachment_type . "</span> <span style=\"font-size: 10px;color: grey;\">(" . $att_type . " - " . $filesize .")</span><br/><strong>" . $description . "</strong>";
-                if($id_converted){
+                if ($id_converted) {
                     $content .= " (<input style=\"margin: 0px\" title=\"envoyer la version PDF\" type=\"checkbox\" id=\"join_attachment_".$id_converted."\" name=\"join_attachment[]\""
                     . " class=\"check\" value=\""
                     . $id_converted."\" />version pdf)";
                 }
                 $content .= "<br/>";
-                if ($chrono != "")
+                if ($chrono != "") {
                     $content .= "<span style='font-size: 10px;color: rgb(22, 173, 235);font-style:italic;'>" . $chrono . "</span> - ";
+                }
                 $content .= "<span style='font-size: 10px;color: grey;font-style:italic;'>" . $dest_firstname . " " . $dest_lastname. " " . $dest_society . "</span>";
-                $content .= "</td>";   
+                $content .= "</td>";
+                if ($formContent == 'messageExchange') {
+                    $content .= "<td style=\"width:1%;text-align:center;width: 8%;margin-right: 2px;vertical-align: middle\"><input type=radio name=\"main_exchange_doc\" value=\"".$mainExchangeDocValue."__".$id."\">";
+                    $content .= "</td>";
+                }
 
                 $content .= "</tr>";
 
-				$filename = $sendmail_tools->createFilename($description, $format);
-
+                $filename = $sendmail_tools->createFilename($description, $format);
             }
             $content .= "</table>";
         }
     }
-    //Notes            
+    //Notes
     if ($core_tools->is_module_loaded('notes')) {
         require_once "modules" . DIRECTORY_SEPARATOR . "notes" . DIRECTORY_SEPARATOR
             . "class" . DIRECTORY_SEPARATOR
@@ -395,12 +497,11 @@ if ($mode == 'add') {
             $content .='<br/>';
             $content .='<div style="color:rgb(22, 173, 235);font-weight:bold;">'._NOTES.'</div>';
             $content .= "<table cellspacing=\"3\" style=\"border-collapse:collapse;width:100%;\">";
-            for($i=0; $i < count($user_notes); $i++) {
-                $it = $i+1;
+            for ($i=0; $i < count($user_notes); $i++) {
                 $content .= "<tr style=\"vertical-align:top;\">";
 
                 //Get data
-                $id = $user_notes[$i]['id']; 
+                $id = $user_notes[$i]['id'];
                 $noteShort = functions::xssafe($request->cut_string($user_notes[$i]['label'], 50));
                 $note = functions::xssafe($user_notes[$i]['label']);
                 $userArray = $users_tools->get_user($user_notes[$i]['author']);
@@ -413,7 +514,7 @@ if ($mode == 'add') {
                     . $id."\"></th><td style=\"cursor:pointer;border: dashed 1px grey;border-left:none;padding:5px;\"";
                 $content .= ' onclick="clickAttachmentsNotes('.$id.')" ';
                 $content .= "title=\"".$note."\"><span style=\"font-size: 10px;color: rgb(22, 173, 235);\">".$userArray['firstname']." ".$userArray['lastname']." </span><span style=\"font-size: 10px;color: grey;\">".$date."</span><br/>"
-                    ."<strong>". $noteShort."</strong></td>"; 
+                    ."<strong>". $noteShort."</strong></td>";
 
                 $content .= "</tr>";
             }
@@ -424,6 +525,7 @@ if ($mode == 'add') {
     
     $content .= '</div>';
     $content .='<hr />';
+
     $content .= '<tr>';
     $content .= '<td><label style="padding-right:10px">' . _Label_ADD_TEMPLATE_MAIL . '</label></td>';
     $content .= '<select name="templateMail" id="templateMail" style="width:200px" '
@@ -433,7 +535,7 @@ if ($mode == 'add') {
 
     $content .= '<option value="">' . _ADD_TEMPLATE_MAIL . '</option>';
 
-    foreach ( $userTemplates as $result) {
+    foreach ($userTemplates as $result) {
         $content .= "<option value='" . $result['template_id'] ."'>" . $result['template_label'] . "</option>";
     }
     $content .= '</select>';
@@ -451,11 +553,23 @@ if ($mode == 'add') {
     $content .= '</tr></br></br>';
 
     //Body
-    $displayHtml = 'block';
-    $displayRaw = 'none';
-    $content .='<script type="text/javascript">var mode="html";</script>';
+
+    if ($formContent != 'messageExchange') {
+        $displayHtml  = 'block';
+        $displayRaw   = 'none';
+        $textAreaMode = 'html';
+    } else {
+        $displayHtml  = 'none';
+        $displayRaw   = 'block';
+        $textAreaMode = 'raw';
+    }
+
+    $content .='<script type="text/javascript">var mode="'.$textAreaMode.'";</script>';
+
      //Show/hide html VS raw mode
-    $content .= '<a href="javascript://" onclick="switchMode(\'show\');"><em>'._HTML_OR_RAW.'</em></a>';
+    if ($formContent != 'messageExchange') {
+        $content .= '<a href="javascript://" onclick="switchMode(\'show\');"><em>'._HTML_OR_RAW.'</em></a>';
+    }
     
     //load tinyMCE editor
     ob_start();
@@ -480,10 +594,12 @@ if ($mode == 'add') {
     $content .=' <input type="button" name="valid" value="&nbsp;'._SEND_EMAIL
                 .'&nbsp;" id="valid" class="button" onclick="validEmailForm(\''
                 .$path_to_script.'&mode=added&for=send\', \'formEmail\');" />&nbsp;';
-    //Save
-    $content .=' <input type="button" name="valid" value="&nbsp;'._SAVE_EMAIL
-                .'&nbsp;" id="valid" class="button" onclick="validEmailForm(\''
-                .$path_to_script.'&mode=added&for=save\', \'formEmail\');" />&nbsp;';
+    if ($formContent != 'messageExchange') {
+        //Save
+        $content .=' <input type="button" name="valid" value="&nbsp;'._SAVE_EMAIL
+                    .'&nbsp;" id="valid" class="button" onclick="validEmailForm(\''
+                    .$path_to_script.'&mode=added&for=save\', \'formEmail\');" />&nbsp;';
+    }
     //Cancel
     $content .='<input type="button" name="cancel" id="cancel" class="button" value="'
                 ._CANCEL.'" onclick="window.parent.destroyModal(\'form_email\');"/>';
@@ -492,15 +608,13 @@ if ($mode == 'add') {
     $content .= '</div>';
 
 //UPDATE OR TRANSFER
-} else if ($mode == 'up' || $mode == 'transfer') {
- 
+} elseif ($mode == 'up' || $mode == 'transfer') {
     if (isset($_REQUEST['id']) && !empty($_REQUEST['id'])) {
-        
         $id = $_REQUEST['id'];
         $emailArray = $sendmail_tools->getEmail($id);
 
         //Check if mail exists
-        if (count($emailArray) > 0 ) {
+        if (count($emailArray) > 0) {
             $content .= '<div>';
             $content .= '<form name="formEmail" id="formEmail" method="post" action="#">';
             $content .= '<input type="hidden" value="'.$identifier.'" name="identifier" id="identifier">';
@@ -508,7 +622,7 @@ if ($mode == 'add') {
             $content .= '<input type="hidden" value="'.$emailArray['isHtml'].'" name="is_html" id="is_html">';
             $content .= '<table border="0" align="left" width="100%" cellspacing="5">';
             $content .= '<tr>';
-			$content .= '<td align="right" nowrap width="10%"><b>'.ucfirst(_FROM_SHORT).' </b></td><td>';
+            $content .= '<td align="right" nowrap width="10%"><b>'.ucfirst(_FROM_SHORT).' </b></td><td>';
 
             $userEntitiesMails = array();
 
@@ -571,11 +685,11 @@ if ($mode == 'add') {
                 $_SESSION['adresses']['cc'] = array();
                 $_SESSION['adresses']['cc'] = $emailArray['cc'];
             }
-			$content .= '<tr><td colspan="3"><a href="javascript://" '
-				.'onclick="new Effect.toggle(\'tr_cc\', \'blind\', {delay:0.2});'
-				.'new Effect.toggle(\'tr_cci\', \'blind\', {delay:0.2});">'
-				._SHOW_OTHER_COPY_FIELDS.'</a></td></tr>';
-			$content .= '<tr id="tr_cc" style="display:none">';
+            $content .= '<tr><td colspan="3"><a href="javascript://" '
+                .'onclick="new Effect.toggle(\'tr_cc\', \'blind\', {delay:0.2});'
+                .'new Effect.toggle(\'tr_cci\', \'blind\', {delay:0.2});">'
+                ._SHOW_OTHER_COPY_FIELDS.'</a></td></tr>';
+            $content .= '<tr id="tr_cc" style="display:none">';
             $content .= '<td align="right" nowrap><label>'._COPY_TO_SHORT.'</label></td>';
             $content .= '<td colspan="2"><div name="cc" id="cc" class="emailInput">';
             $content .= $sendmail_tools->updateAdressInputField($path_to_script, $_SESSION['adresses'], 'cc');
@@ -604,7 +718,7 @@ if ($mode == 'add') {
             $content .= '<h4 onclick="new Effect.toggle(\'joined_files\', \'blind\', {delay:0.2});'
                 . 'whatIsTheDivStatus(\'joined_files\', \'divStatus_joined_files\');" '
                 . 'class="categorie" style="width:90%;" onmouseover="this.style.cursor=\'pointer\';">';
-            $content .= ' <span id="divStatus_joined_files" style="color:#1C99C5;"><i class="fa fa-plus-square-o"></i></span>&nbsp;' 
+            $content .= ' <span id="divStatus_joined_files" style="color:#1C99C5;"><i class="fa fa-plus-square-o"></i></span>&nbsp;'
                 . _JOINED_FILES;
             $content .= '</h4>';
             //
@@ -614,21 +728,21 @@ if ($mode == 'add') {
             if (count($joined_files) >0) {
                 $content .='<br/>';
                 $content .='<div style="color:rgb(22, 173, 235);font-weight:bold;">'._DOC.'</div>';
-                for($i=0; $i < count($joined_files); $i++) {
+                for ($i=0; $i < count($joined_files); $i++) {
                     //Get data
-                    $id          = $joined_files[$i]['id']; 
+                    $id          = $joined_files[$i]['id'];
                     $description = $joined_files[$i]['label'];
                     $format      = $joined_files[$i]['format'];
                     $format      = $joined_files[$i]['format'];
                     $mime_type   = $is->get_mime_type($joined_files[$i]['format']);
                     $att_type    = $joined_files[$i]['format'];
                     $filesize    = $joined_files[$i]['filesize']/1024;
-					($filesize > 1)? $filesize = ceil($filesize).' Ko' :  $filesize = round($filesize,2).' Octets';
+                    ($filesize > 1)? $filesize = ceil($filesize).' Ko' :  $filesize = round($filesize, 2).' Octets';
 
                     //Show data
-					$version = '';
-					$content .= "<table cellspacing=\"3\" id=\"main_document\" style=\"border-collapse:collapse;width:100%;\"><tr>";
-                    if($joined_files[$i]['is_version'] === true){
+                    $version = '';
+                    $content .= "<table cellspacing=\"3\" id=\"main_document\" style=\"border-collapse:collapse;width:100%;\"><tr>";
+                    if ($joined_files[$i]['is_version'] === true) {
                         //Version
                         $version = ' - '._VERSION.' '.$joined_files[$i]['version'] ;
                         //Contents
@@ -648,7 +762,7 @@ if ($mode == 'add') {
                         $content .= "<th style=\"width:25px;border: dashed 1px grey;border-right:none;vertical-align:middle;\" alt=\"".$description
                             . "\" title=\"".$description
                             . "\"><input type=\"checkbox\" id=\"join_file_".$id."\" name=\"join_file[]\"";
-                            ($emailArray['resMasterAttached'] == 'Y')? $checked = ' checked="checked"' : $checked = '';
+                        ($emailArray['resMasterAttached'] == 'Y')? $checked = ' checked="checked"' : $checked = '';
                         $content .= " ".$checked
                             . " class=\"check\" value=\""
                             . $id."\" ></th>"
@@ -658,7 +772,7 @@ if ($mode == 'add') {
                     }
                     $content .= "</tr></table>";
                     //Filename
-					$filename = $sendmail_tools->createFilename($description.$version, $format);
+                    $filename = $sendmail_tools->createFilename($description.$version, $format);
                     $all_joined_files .= $description.': '.$filename.PHP_EOL;
                 }
             }
@@ -670,14 +784,13 @@ if ($mode == 'add') {
                     $content .='<br/>';
                     $content .='<div style="color:rgb(22, 173, 235);font-weight:bold;">'._ATTACHMENTS.'</div>';
                     $content .= "<table cellspacing=\"3\" id=\"show_pj_mail\" style=\"border-collapse:collapse;width:100%;\">";
-                    for($i=0; $i < count($attachment_files); $i++) {
-                        $it = $i+1;
+                    for ($i=0; $i < count($attachment_files); $i++) {
                         $content .= "<tr style=\"vertical-align:top;\">";
 
                         //Get data
-                        $id           = $attachment_files[$i]['id']; 
-                        $isVersion    = $attachment_files[$i]['is_version']; 
-                        $id_converted = $attachment_files[$i]['converted_pdf']; 
+                        $id           = $attachment_files[$i]['id'];
+                        $isVersion    = $attachment_files[$i]['is_version'];
+                        $id_converted = $attachment_files[$i]['converted_pdf'];
                         $description  = $attachment_files[$i]['label'];
                         if (strlen($description) > 73) {
                             $description = substr($description, 0, 70);
@@ -694,7 +807,7 @@ if ($mode == 'add') {
                         $dest_lastname   = $attachment_files[$i]['lastname'];
                         ($filesize > 1)? $filesize = ceil($filesize).' Ko' :  $filesize = $filesize.' Octets';
 
-                        if($isVersion){
+                        if ($isVersion) {
                             $inputName = "join_version_attachment[]";
                         } else {
                             $inputName = "join_attachment[]";
@@ -704,11 +817,11 @@ if ($mode == 'add') {
                             . "\" title=\"".$description
                             . "\"><input style=\"margin-left: 3px\" type=\"checkbox\" id=\"join_attachment_".$id."\" name=\"".$inputName."\"";
 
-                        if(($isVersion && in_array($id, $emailArray['attachments_version'])) || (!$isVersion && in_array($id, $emailArray['attachments']))){
+                        if (($isVersion && in_array($id, $emailArray['attachments_version'])) || (!$isVersion && in_array($id, $emailArray['attachments']))) {
                             $checked = ' checked="checked"';
                         }
 
-                        $content .= " ".$checked    
+                        $content .= " ".$checked
                             . " class=\"check\" value=\""
                             . $id."\"";
                         
@@ -718,40 +831,41 @@ if ($mode == 'add') {
                             }
                         $content .= "/></th>";
 
-                        if(!$id_converted){
+                        if (!$id_converted) {
                             $content .= "<td style=\"cursor:pointer;border: dashed 1px grey;border-left:none;padding:5px;\"";
                             $content .= ' onclick="clickAttachmentsInput('.$id.')" ';
-                        }else{
+                        } else {
                             $content .= "<td style=\"border: dashed 1px grey;border-left:none;padding:5px;\"";
                         }
 
                         $content .= "><span style=\"font-size: 10px;color: rgb(22, 173, 235);\">" . $attachment_type . "</span> <span style=\"font-size: 10px;color: grey;\">(" . $att_type . " - " . $filesize .")</span><br/><strong>" . $description . "</strong>";
-                        if($id_converted){
+                        if ($id_converted) {
                             $content .= " (<input style=\"margin: 0px\" title=\"envoyer la version PDF\" type=\"checkbox\" id=\"join_attachment_".$id_converted."\" name=\"join_attachment[]\""
                             . " class=\"check\"";
 
                             (in_array($id_converted, $emailArray['attachments']))? $checked = ' checked="checked"' : $checked = '';
-                            $content .= " ".$checked   
+                            $content .= " ".$checked
                             . " value=\""
                             . $id_converted."\" />version pdf)";
                         }
                         $content .= "<br/><span style='font-size: 10px;color: rgb(22, 173, 235);font-style:italic;'>";
-                        if ($chrono != "")
+                        if ($chrono != "") {
                             $content .= "<span style='font-size: 10px;color: rgb(22, 173, 235);font-style:italic;'>" . $chrono . "</span> - ";
+                        }
                         $content .= "<span style='font-size: 10px;color: grey;font-style:italic;'>" . $dest_firstname . " " . $dest_lastname. " " . $dest_society . "</span>";
-                        $content .= "</td>";   
+                        $content .= "</td>";
 
                         $content .= "</tr>";
 
                         //Filename
-						$filename = $sendmail_tools->createFilename($description, $format);
+                        $filename = $sendmail_tools->createFilename($description, $format);
                         $all_joined_files .= $description.': '.$filename.PHP_EOL;
                     }
                     $content .= "</table>";
                 }
             }
             
-            //Notes            
+            //Notes
             if ($core_tools->is_module_loaded('notes')) {
                 require_once "modules" . DIRECTORY_SEPARATOR . "notes" . DIRECTORY_SEPARATOR
                     . "class" . DIRECTORY_SEPARATOR
@@ -762,12 +876,11 @@ if ($mode == 'add') {
                     $content .='<br/>';
                     $content .='<div style="color:rgb(22, 173, 235);font-weight:bold;">'._NOTES.'</div>';
                     $content .= "<table cellspacing=\"3\" style=\"border-collapse:collapse;width:100%;\">";
-                    for($i=0; $i < count($user_notes); $i++) {
-                        $it = $i+1;
+                    for ($i=0; $i < count($user_notes); $i++) {
                         $content .= "<tr style=\"vertical-align:top;\">";
 
                         //Get data
-                        $id = $user_notes[$i]['id']; 
+                        $id = $user_notes[$i]['id'];
                         $noteShort = functions::xssafe($request->cut_string($user_notes[$i]['label'], 50));
                         $note = functions::xssafe($user_notes[$i]['label']);
                         $userArray = $users_tools->get_user($user_notes[$i]['author']);
@@ -784,7 +897,7 @@ if ($mode == 'add') {
                             . $id."\"></th><td style=\"cursor:pointer;border: dashed 1px grey;border-left:none;padding:5px;\"";
                         $content .= ' onclick="clickAttachmentsNotes('.$id.')" ';
                         $content .= "title=\"".$note."\"><span style=\"font-size: 10px;color: rgb(22, 173, 235);\">".$userArray['firstname']." ".$userArray['lastname']." </span><span style=\"font-size: 10px;color: grey;\">".$date."</span><br/>"
-                            ."<strong>". $noteShort."</strong></td>"; 
+                            ."<strong>". $noteShort."</strong></td>";
 
                         $content .= "</tr>";
                     }
@@ -807,11 +920,11 @@ if ($mode == 'add') {
 
             $content .= '<option value="">' . _ADD_TEMPLATE_MAIL . '</option>';
 
-            foreach ( $userTemplates as $result) {
+            foreach ($userTemplates as $result) {
                 $content .= "<option value='" . $result['template_id'] ."'>" . $result['template_label'] . "</option>";
             }
             $content .='</select>';
-            $content .= '<label style="margin-left: 15%;padding-right:10px">' . 'Signature : ' . '</label>';
+            $content .= '<label style="margin-left: 15%;padding-right:10px">' . 'Signature de mail' . '</label>';
             $emailSignaturesClass = new EmailSignatures();
 
             $mailSignatures = $emailSignaturesClass->getForCurrentUser();
@@ -824,15 +937,14 @@ if ($mode == 'add') {
             $content .= '</select>';
             $content .= '</tr></br></br>';
 
-
             //Body
             if ($emailArray['isHtml'] == 'Y') {
-                $displayRaw = 'none';
-                $displayHtml = 'block';
+                $displayRaw   = 'none';
+                $displayHtml  = 'block';
                 $textAreaMode = 'html';
             } else {
-                $displayRaw = 'block';
-                $displayHtml = 'none';
+                $displayRaw   = 'block';
+                $displayHtml  = 'none';
                 $textAreaMode = 'raw';
             }
             $content .='<script type="text/javascript">var mode="'.$textAreaMode.'";</script>';
@@ -864,11 +976,11 @@ if ($mode == 'add') {
                 $content .=' <input type="button" name="valid" value="&nbsp;'._SEND_EMAIL
                     .'&nbsp;" id="valid" class="button" onclick="validEmailForm(\''
                     .$path_to_script.'&mode=updated&for=send\', \'formEmail\');" />&nbsp;';
-                //Save button    
+                //Save button
                 $content .=' <input type="button" name="valid" value="&nbsp;'._SAVE_EMAIL
                     .'&nbsp;" id="valid" class="button" onclick="validEmailForm(\''
-                    .$path_to_script.'&mode=updated&for=save\', \'formEmail\');" />&nbsp;';                     
-                //Delete button    
+                    .$path_to_script.'&mode=updated&for=save\', \'formEmail\');" />&nbsp;';
+                //Delete button
                 $content .=' <input type="button" name="valid" value="&nbsp;'._REMOVE_EMAIL
                     .'&nbsp;" id="valid" class="button" onclick="if(confirm(\''
                     ._REALLY_DELETE.': '.$request->cut_string($emailArray['object'], 50)
@@ -882,7 +994,7 @@ if ($mode == 'add') {
                 //Save copy button
                 $content .=' <input type="button" name="valid" value="&nbsp;'._SAVE_COPY_EMAIL
                     .'&nbsp;" id="valid" class="button" onclick="validEmailForm(\''
-                    .$path_to_script.'&mode=added&for=save\', \'formEmail\');" />&nbsp;';    
+                    .$path_to_script.'&mode=added&for=save\', \'formEmail\');" />&nbsp;';
             }
             
             //Cancel button
@@ -892,35 +1004,41 @@ if ($mode == 'add') {
             $content .= '</form>';
             $content .= '</div>';
         } else {
-            $content = $request->wash_html($id.': '._EMAIL_DONT_EXIST.'!','NONE');
+            $content = $request->wash_html($id.': '._EMAIL_DONT_EXIST.'!', 'NONE');
         }
     } else {
-        $content = $request->wash_html(_ID.' '._IS_EMPTY.'!','NONE');
+        $content = $request->wash_html(_ID.' '._IS_EMPTY.'!', 'NONE');
     }
-} else if ($mode == 'read') {
+} elseif ($mode == 'read') {
     if (isset($_REQUEST['id']) && !empty($_REQUEST['id'])) {
-        
         $id = $_REQUEST['id'];
-        $emailArray = $sendmail_tools->getEmail($id, false);
+        if ($formContent == 'messageExchange') {
+            $emailArray = ReadMessageExchangeController::getMessageExchange(['id' => $id]);
+        } else {
+            $emailArray = $sendmail_tools->getEmail($id, false);
+        }
 
         //Check if mail exists
-        if (count($emailArray) > 0 ) {
-			$usermailArray = $users_tools->get_user($emailArray['userId']);
-		
+        if (count($emailArray) > 0 && $emailArray['type'] != 'ArchiveTransferReplySent') {
             $content .= '<div>';
             $content .= '<table border="0" align="left" width="100%" cellspacing="5">';
             $content .= '<tr>';
 
-			$content .= '<td width="10%" align="right" nowrap><b>'.ucfirst(_FROM_SHORT).' </b></td><td width="90%" colspan="2">';
-
-            $mailEntities = $sendmail_tools->getAttachedEntitiesMails();
+            $content .= '<td width="10%" align="right" nowrap><b>'.ucfirst(_FROM_SHORT).' </b></td><td width="90%" colspan="2">';
 
-            if (in_array($emailArray['sender_email'], array_keys($mailEntities))) {
-                $content .= $mailEntities[$emailArray['sender_email']];
-            } else if ($emailArray['sender_email'] == $usermailArray['mail']) {
-                 $content .= $usermailArray['firstname'] . " " . $usermailArray['lastname'] . " (".$emailArray['sender_email'].")";
+            if ($formContent == 'messageExchange') {
+                $content .= $emailArray['from'];
             } else {
-                $content .= $sendmail_tools->explodeSenderEmail($emailArray['sender_email']);
+                $usermailArray = $users_tools->get_user($emailArray['userId']);
+                $mailEntities  = $sendmail_tools->getAttachedEntitiesMails();
+
+                if (in_array($emailArray['sender_email'], array_keys($mailEntities))) {
+                    $content .= $mailEntities[$emailArray['sender_email']];
+                } elseif ($emailArray['sender_email'] == $usermailArray['mail']) {
+                    $content .= $usermailArray['firstname'] . " " . $usermailArray['lastname'] . " (".$emailArray['sender_email'].")";
+                } else {
+                    $content .= $sendmail_tools->explodeSenderEmail($emailArray['sender_email']);
+                }
             }
 
             $content .= '<br/></td>';
@@ -934,37 +1052,48 @@ if ($mode == 'add') {
             $content .= '<td align="right" nowrap width="10%"><span class="red_asterisk"><i class="fa fa-star"></i></span> <label>'
                 ._SEND_TO_SHORT.'</label></td>';
             $content .= '<td width="90%" colspan="2"><div name="to" id="to" class="emailInput">';
-            $content .= $sendmail_tools->updateAdressInputField($path_to_script, $_SESSION['adresses'], 'to', true);
-            $content .= '</div></td>';
-            $content .= '</tr>';
-            //CC
-            if (count($emailArray['cc']) > 0) {
-                $_SESSION['adresses']['cc'] = array();
-                $_SESSION['adresses']['cc'] = $emailArray['cc'];
+            if ($formContent == 'messageExchange') {
+                $content .= $emailArray['contactInfo'];
+            } else {
+                $content .= $sendmail_tools->updateAdressInputField($path_to_script, $_SESSION['adresses'], 'to', true);
             }
-            $content .= '<tr>';
-            $content .= '<td align="right" nowrap><label>'._COPY_TO_SHORT.'</label></td>';
-            $content .= '<td colspan="2"><div name="cc" id="cc" class="emailInput">';
-            $content .= $sendmail_tools->updateAdressInputField($path_to_script, $_SESSION['adresses'], 'cc', true);
             $content .= '</div></td>';
             $content .= '</tr>';
-            //CCI
-            if (count($emailArray['cci']) > 0) {
-                $_SESSION['adresses']['cci'] = array();
-                $_SESSION['adresses']['cci'] = $emailArray['cci'];
+            if ($formContent == 'messageExchange') {
+                $content .= '<tr><td align="right" nowrap width="10%"></td><td width="90%">' . _COMMUNICATION_TYPE . ' : '.$emailArray['communicationType'].'</td></tr>';
+            } else {
+                //CC
+                if (count($emailArray['cc']) > 0) {
+                    $_SESSION['adresses']['cc'] = array();
+                    $_SESSION['adresses']['cc'] = $emailArray['cc'];
+                }
+                $content .= '<tr>';
+                $content .= '<td align="right" nowrap><label>'._COPY_TO_SHORT.'</label></td>';
+                $content .= '<td colspan="2"><div name="cc" id="cc" class="emailInput">';
+                $content .= $sendmail_tools->updateAdressInputField($path_to_script, $_SESSION['adresses'], 'cc', true);
+                $content .= '</div></td>';
+                $content .= '</tr>';
+                //CCI
+                if (count($emailArray['cci']) > 0) {
+                    $_SESSION['adresses']['cci'] = array();
+                    $_SESSION['adresses']['cci'] = $emailArray['cci'];
+                }
+                $content .= '<tr>';
+                $content .= '<td align="right" nowrap><label>'._COPY_TO_INVISIBLE_SHORT.'</label></td>';
+                $content .= '<td colspan="2"><div name="cci" id="cci" class="emailInput">';
+                $content .= $sendmail_tools->updateAdressInputField($path_to_script, $_SESSION['adresses'], 'cci', true);
+                $content .= '</div></td>';
+                $content .= '</tr>';
             }
-            $content .= '<tr>';
-            $content .= '<td align="right" nowrap><label>'._COPY_TO_INVISIBLE_SHORT.'</label></td>';
-            $content .= '<td colspan="2"><div name="cci" id="cci" class="emailInput">';
-            $content .= $sendmail_tools->updateAdressInputField($path_to_script, $_SESSION['adresses'], 'cci', true);
-            $content .= '</div></td>';
-            $content .= '</tr>';   
             //Object
             $content .= '<tr>';
             $content .= '<td align="right" nowrap><span class="red_asterisk"><i class="fa fa-star"></i></span> <label>'._EMAIL_OBJECT.' </label></td>';
             $content .= '<td colspan="2"><div name="object" id="object" class="emailInput">'
                 .$emailArray['object'].'</div></td>';
             $content .= '</tr>';
+            if ($formContent == 'messageExchange') {
+                $content .= '<tr><td width="10%" align="right" nowrap>'._IDENTIFIER.'</td><td><div class="emailInput">'.$emailArray['reference'].'</div></td></tr>';
+            }
             $content .= '</table><br />';
 
             $content .='<hr />';
@@ -972,7 +1101,7 @@ if ($mode == 'add') {
             $content .= '<h4 onclick="new Effect.toggle(\'joined_files\', \'blind\', {delay:0.2});'
                 . 'whatIsTheDivStatus(\'joined_files\', \'divStatus_joined_files\');" '
                 . 'class="categorie" style="width:90%;" onmouseover="this.style.cursor=\'pointer\';">';
-            $content .= ' <span id="divStatus_joined_files" style="color:#1C99C5;"><i class="fa fa-plus-square-o"></i></span>&nbsp;' 
+            $content .= ' <span id="divStatus_joined_files" style="color:#1C99C5;"><i class="fa fa-plus-square-o"></i></span>&nbsp;'
                 . _JOINED_FILES;
             $content .= '</h4>';
             //
@@ -981,22 +1110,26 @@ if ($mode == 'add') {
             $joined_files = $sendmail_tools->getJoinedFiles($collId, $table, $identifier);
             if (count($joined_files) >0) {
                 $content .='<br/>';
-                $content .='<div style="color:rgb(22, 173, 235);font-weight:bold;">'._DOC.'</div>';
-                for($i=0; $i < count($joined_files); $i++) {
+                $content .='<div><span style="color:rgb(22, 173, 235);font-weight:bold;">'._DOC.'</span>';
+                if ($formContent == 'messageExchange') {
+                    $content .='<span style="float: right;font-weight:bold">Principal</span>';
+                }
+                $content .='</div>';
+                for ($i=0; $i < count($joined_files); $i++) {
                     //Get data
-                    $id          = $joined_files[$i]['id']; 
+                    $id          = $joined_files[$i]['id'];
                     $description = $joined_files[$i]['label'];
                     $format      = $joined_files[$i]['format'];
                     $format      = $joined_files[$i]['format'];
                     $mime_type   = $is->get_mime_type($joined_files[$i]['format']);
                     $att_type    = $joined_files[$i]['format'];
                     $filesize    = $joined_files[$i]['filesize']/1024;
-                    ($filesize > 1)? $filesize = ceil($filesize).' Ko' :  $filesize = round($filesize,2).' Octets';
+                    ($filesize > 1)? $filesize = ceil($filesize).' Ko' :  $filesize = round($filesize, 2).' Octets';
 
                     //Show data
                     $version = '';
                     $content .= "<table cellspacing=\"3\" id=\"main_document\" style=\"border-collapse:collapse;width:100%;\"><tr>";
-                    if($joined_files[$i]['is_version'] === true){
+                    if ($joined_files[$i]['is_version'] === true) {
                         //Version
                         $version = ' - '._VERSION.' '.$joined_files[$i]['version'] ;
                         //Contents
@@ -1016,7 +1149,7 @@ if ($mode == 'add') {
                         $content .= "<th style=\"width:25px;border: dashed 1px grey;border-right:none;vertical-align:middle;\" alt=\"".$description
                             . "\" title=\"".$description
                             . "\"><input type=\"checkbox\" disabled=\"disabled\" id=\"join_file_".$id."\" name=\"join_file[]\"";
-                            ($emailArray['resMasterAttached'] == 'Y')? $checked = ' checked="checked"' : $checked = '';
+                        ($emailArray['resMasterAttached'] == 'Y')? $checked = ' checked="checked"' : $checked = '';
                         $content .= " ".$checked
                             . " class=\"check\" value=\""
                             . $id."\" ></th>"
@@ -1024,6 +1157,13 @@ if ($mode == 'add') {
                         $content .= ' onclick="clickAttachments('.$id.')" ';
                         $content .= "><strong>" . $description . "</strong> <span style=\"font-size: 10px;color: grey;\">(" . $att_type . " - " . $filesize .")</span></td>";
                     }
+                    if ($formContent == 'messageExchange') {
+                        $content .= "<td style=\"width:1%;text-align:center;width: 8%;margin-right: 2px;vertical-align: middle\"><input type=radio name=\"main_exchange_doc\" disabled ";
+                        if ($emailArray['disposition']->tablename == 'res_letterbox' && $emailArray['disposition']->res_id == $id) {
+                            $content .= " checked ";
+                        }
+                        $content .= "></td>";
+                    }
                     $content .= "</tr></table>";
                     //Filename
                     $filename = $sendmail_tools->createFilename($description.$version, $format);
@@ -1038,14 +1178,13 @@ if ($mode == 'add') {
                     $content .='<br/>';
                     $content .='<div style="color:rgb(22, 173, 235);font-weight:bold;">'._ATTACHMENTS.'</div>';
                     $content .= "<table cellspacing=\"3\" id=\"show_pj_mail\" style=\"border-collapse:collapse;width:100%;\">";
-                    for($i=0; $i < count($attachment_files); $i++) {
-                        $it = $i+1;
+                    for ($i=0; $i < count($attachment_files); $i++) {
                         $content .= "<tr style=\"vertical-align:top;\">";
 
                         //Get data
-                        $id           = $attachment_files[$i]['id']; 
-                        $isVersion    = $attachment_files[$i]['is_version']; 
-                        $id_converted = $attachment_files[$i]['converted_pdf']; 
+                        $id           = $attachment_files[$i]['id'];
+                        $isVersion    = $attachment_files[$i]['is_version'];
+                        $id_converted = $attachment_files[$i]['converted_pdf'];
                         $description  = $attachment_files[$i]['label'];
                         if (strlen($description) > 73) {
                             $description = substr($description, 0, 70);
@@ -1062,7 +1201,7 @@ if ($mode == 'add') {
                         $dest_lastname   = $attachment_files[$i]['lastname'];
                         ($filesize > 1)? $filesize = ceil($filesize).' Ko' :  $filesize = $filesize.' Octets';
 
-                        if($isVersion){
+                        if ($isVersion) {
                             $inputName = "join_version_attachment[]";
                         } else {
                             $inputName = "join_attachment[]";
@@ -1072,40 +1211,50 @@ if ($mode == 'add') {
                             . "\" title=\"".$description
                             . "\"><input style=\"margin-left: 3px\" disabled=\"disabled\" type=\"checkbox\" id=\"join_attachment_".$id."\" name=\"".$inputName."\"";
 
-                        if(($isVersion && in_array($id, $emailArray['attachments_version'])) || (!$isVersion && in_array($id, $emailArray['attachments']))){
+                        $checked = "";
+                        if (($isVersion && in_array($id, $emailArray['attachments_version'])) || (!$isVersion && in_array($id, $emailArray['attachments']))) {
                             $checked = ' checked="checked"';
                         }
 
-                        $content .= " ".$checked    
+                        $content .= " ".$checked
                             . " class=\"check\" value=\""
                             . $id."\"";
                         
                         $content .= "/></th>";
 
-                        if(!$id_converted){
+                        if (!$id_converted) {
                             $content .= "<td style=\"cursor:pointer;border: dashed 1px grey;border-left:none;padding:5px;\"";
                             $content .= ' onclick="clickAttachmentsInput('.$id.')" ';
-                        }else{
+                        } else {
                             $content .= "<td style=\"border: dashed 1px grey;border-left:none;padding:5px;\"";
                         }
 
                         $content .= "><span style=\"font-size: 10px;color: rgb(22, 173, 235);\">" . $attachment_type . "</span> <span style=\"font-size: 10px;color: grey;\">(" . $att_type . " - " . $filesize .")</span><br/><strong>" . $description . "</strong>";
-                        if($id_converted){
+                        if ($id_converted) {
                             $content .= " (<input style=\"margin: 0px\" title=\"envoyer la version PDF\" disabled=\"disabled\" type=\"checkbox\" id=\"join_attachment_".$id_converted."\" name=\"join_attachment[]\""
                             . " class=\"check\"";
 
                             (in_array($id_converted, $emailArray['attachments']))? $checked = ' checked="checked"' : $checked = '';
-                            $content .= " ".$checked   
+                            $content .= " ".$checked
                             . " value=\""
                             . $id_converted."\" />version pdf)";
                         }
                         $content .= "<br/><span style='font-size: 10px;color: rgb(22, 173, 235);font-style:italic;'>";
-                        if ($chrono != "")
+                        if ($chrono != "") {
                             $content .= "<span style='font-size: 10px;color: rgb(22, 173, 235);font-style:italic;'>" . $chrono . "</span> - ";
+                        }
                         $content .= "<span style='font-size: 10px;color: grey;font-style:italic;'>" . $dest_firstname . " " . $dest_lastname. " " . $dest_society . "</span>";
-                        $content .= "</td>";   
-
+                        $content .= "</td>";
+                        if ($formContent == 'messageExchange') {
+                            $content .= "<td style=\"width:1%;text-align:center;width: 8%;margin-right: 2px;vertical-align: middle\"><input type=radio name=\"main_exchange_doc\" disabled ";
+                            if ($emailArray['disposition']->res_id == $id && ($emailArray['disposition']->tablename == 'res_attachments' && !$isVersion)
+                                || ($emailArray['disposition']->tablename == 'res_version_attachments' && $isVersion)) {
+                                $content .= " checked ";
+                            }
+                            $content .= "></td>";
+                        }
                         $content .= "</tr>";
+
                         //Filename
                         $filename = $sendmail_tools->createFilename($description, $format);
                         $all_joined_files .= $description.': '.$filename.PHP_EOL;
@@ -1114,7 +1263,7 @@ if ($mode == 'add') {
                 }
             }
             
-            //Notes            
+            //Notes
             if ($core_tools->is_module_loaded('notes')) {
                 require_once "modules" . DIRECTORY_SEPARATOR . "notes" . DIRECTORY_SEPARATOR
                     . "class" . DIRECTORY_SEPARATOR
@@ -1125,12 +1274,11 @@ if ($mode == 'add') {
                     $content .='<br/>';
                     $content .='<div style="color:rgb(22, 173, 235);font-weight:bold;">'._NOTES.'</div>';
                     $content .= "<table cellspacing=\"3\" style=\"border-collapse:collapse;width:100%;\">";
-                    for($i=0; $i < count($user_notes); $i++) {
-                        $it = $i+1;
+                    for ($i=0; $i < count($user_notes); $i++) {
                         $content .= "<tr style=\"vertical-align:top;\">";
 
                         //Get data
-                        $id = $user_notes[$i]['id']; 
+                        $id = $user_notes[$i]['id'];
                         $noteShort = functions::xssafe($request->cut_string($user_notes[$i]['label'], 50));
                         $note = functions::xssafe($user_notes[$i]['label']);
                         $userArray = $users_tools->get_user($user_notes[$i]['author']);
@@ -1147,7 +1295,7 @@ if ($mode == 'add') {
                             . $id."\"></th><td style=\"cursor:pointer;border: dashed 1px grey;border-left:none;padding:5px;\"";
                         $content .= ' onclick="clickAttachmentsNotes('.$id.')" ';
                         $content .= "title=\"".$note."\"><span style=\"font-size: 10px;color: rgb(22, 173, 235);\">".$userArray['firstname']." ".$userArray['lastname']." </span><span style=\"font-size: 10px;color: grey;\">".$date."</span><br/>"
-                            ."<strong>". $noteShort."</strong></td>"; 
+                            ."<strong>". $noteShort."</strong></td>";
 
                         $content .= "</tr>";
                     }
@@ -1161,7 +1309,7 @@ if ($mode == 'add') {
             $content .= '</div>';
             $content .='<hr />';
             //Body (html or raw mode)
-            if ($emailArray['isHtml'] == 'Y') { 
+            if ($emailArray['isHtml'] == 'Y') {
                 $content .='<script type="text/javascript">var mode="html";</script>';
                 //load tinyMCE editor
                 ob_start();
@@ -1182,20 +1330,57 @@ if ($mode == 'add') {
                     .$sendmail_tools->htmlToRaw($emailArray['body']).'</textarea>';
                 $content .='</div>';
             }
-                        
+
+            if (!empty($emailArray['receptionDate'])) {
+                $content .='<br><hr style="margin-top:2px;" />';
+                $content .= '<b>'._RECEPTION_DATE.' : </b>' . $emailArray['receptionDate'].'<br><br>';
+            }
+            if (!empty($emailArray['operationDate'])) {
+                $content .= '<div onclick="new Effect.toggle(\'operationCommentsDiv\', \'blind\', {delay:0.2});" onmouseover="this.style.cursor=\'pointer\';">
+                                <span id="divStatus_operationComments" style="color:#1C99C5;"><i class="fa fa-plus-square-o"></i></span>&nbsp;'._MORE_INFORMATIONS.'
+                            </div>';
+                $content .= '<div id="operationCommentsDiv" style="display:none">';
+                foreach ($emailArray['operationComments'] as $value) {
+                    $content .= $value->value.'<br>';
+                }
+                $content .= '</div><br>';
+                $content .= '<b>'._OPERATION_DATE.' : </b>' . $emailArray['operationDate'].'<br><br>';
+            }
+            if (!empty($emailArray['messageReview'])) {
+                $content .= '<h4>'._M2M_FOLLOWUP_REQUEST.'</h4>';
+                $content .= '<div>';
+                foreach ($emailArray['messageReview'] as $value) {
+                    $content .= $value.'<br>';
+                }
+                $content .= '</div>';
+            }
+                //Buttons
+                $content .='<br><hr style="margin-top:2px;" />';
+            $content .='<div align="center">';
+                //Close button
+                $content .='<input type="button" name="cancel" id="cancel" class="button" value="'
+                            ._CLOSE.'" onclick="window.parent.destroyModal(\'form_email\');"/>';
+            $content .='</div>';
+            $content .= '</div>';
+        } elseif ($emailArray['type'] == 'ArchiveTransferReplySent') {
+            $content .= '<b>'._REPLY_RESPONSE_SENT.' : </b>' . $emailArray['creationDate'].'<br><br>';
+
+            foreach ($emailArray['operationComments'] as $value) {
+                $content .= $value.'<br>';
+            }
+
             //Buttons
-            $content .='<hr style="margin-top:2px;" />';
+            $content .='<br><hr style="margin-top:2px;" />';
             $content .='<div align="center">';
             //Close button
             $content .='<input type="button" name="cancel" id="cancel" class="button" value="'
                         ._CLOSE.'" onclick="window.parent.destroyModal(\'form_email\');"/>';
             $content .='</div>';
-            $content .= '</div>';
         } else {
-            $content = $request->wash_html($id.': '._EMAIL_DONT_EXIST.'!','NONE');
+            $content = $request->wash_html($id.': '._EMAIL_DONT_EXIST.'!', 'NONE');
         }
     } else {
-        $content = $request->wash_html(_ID.' '._IS_EMPTY.'!','NONE');
+        $content = $request->wash_html(_ID.' '._IS_EMPTY.'!', 'NONE');
     }
 }
 echo $content;
diff --git a/modules/sendmail/messageExchangeList.php b/modules/sendmail/messageExchangeList.php
new file mode 100644
index 0000000000000000000000000000000000000000..b8d27963e8332ab1db07383068dd3cf9069f2028
--- /dev/null
+++ b/modules/sendmail/messageExchangeList.php
@@ -0,0 +1,170 @@
+<?php
+
+//Table or view
+$select = [];
+$select["message_exchange"] = [];
+    
+//Fields
+    array_push($select["message_exchange"], "message_id", "date", "reference", "type", "sender_org_name", "account_id",
+        "recipient_org_identifier", "recipient_org_name", "reception_date", "operation_date", "status", "data", "res_id_master", "filename");
+    
+//Where clause
+    $where_tab = array();
+    //
+    $where_tab[] = " res_id_master = ? ";
+    $where_tab[] = " type in ('ArchiveTransfer', 'ArchiveTransferReplySent') ";
+
+    //Build where
+    $where = implode(' and ', $where_tab);
+
+//Order
+    $orderstr = "order by date desc";
+
+//Request
+    $tab=$request->PDOselect($select, $where, [$identifier], $orderstr, $_SESSION['config']['databasetype']);
+
+if (!empty($tab)) {
+    //Result Array
+    for ($i=0;$i<count($tab);$i++) {
+        for ($j=0;$j<count($tab[$i]);$j++) {
+            foreach (array_keys($tab[$i][$j]) as $value) {
+                if ($tab[$i][$j][$value]=="message_id") {
+                    $tab[$i][$j]["message_id"]  = $tab[$i][$j]['value'];
+                    $tab[$i][$j]["label"]       = 'ID';
+                    $tab[$i][$j]["size"]        = "1";
+                    $tab[$i][$j]["label_align"] = "left";
+                    $tab[$i][$j]["align"]       = "left";
+                    $tab[$i][$j]["valign"]      = "bottom";
+                    $tab[$i][$j]["show"]        = false;
+                    $tab[$i][$j]["order"]       = 'message_id';
+                }
+                if ($tab[$i][$j][$value]=="date") {
+                    $tab[$i][$j]["label"]       = _CREATION_DATE;
+                    $tab[$i][$j]["size"]        = "9";
+                    $tab[$i][$j]["label_align"] = "left";
+                    $tab[$i][$j]["align"]       = "left";
+                    $tab[$i][$j]["valign"]      = "bottom";
+                    $tab[$i][$j]["show"]        = true;
+                    $tab[$i][$j]["order"]       = 'date';
+                }
+                if ($tab[$i][$j][$value]=="reference") {
+                    $tab[$i][$j]["label"]       = _IDENTIFIER;
+                    $tab[$i][$j]["size"]        = "9";
+                    $tab[$i][$j]["label_align"] = "left";
+                    $tab[$i][$j]["align"]       = "left";
+                    $tab[$i][$j]["valign"]      = "bottom";
+                    $tab[$i][$j]["show"]        = false;
+                    $tab[$i][$j]["order"]       = 'reference';
+                }
+                if ($tab[$i][$j][$value]=="type") {
+                    $tab[$i][$j]["value"]       = constant('_M2M_'.strtoupper($tab[$i][$j]["value"]));
+                    $tab[$i][$j]["label"]       = _TYPE;
+                    $tab[$i][$j]["size"]        = "8";
+                    $tab[$i][$j]["label_align"] = "left";
+                    $tab[$i][$j]["align"]       = "left";
+                    $tab[$i][$j]["valign"]      = "bottom";
+                    $tab[$i][$j]["show"]        = true;
+                    $tab[$i][$j]["order"]       = 'type';
+                }
+                if ($tab[$i][$j][$value]=="operation_date") {
+                    $tab[$i][$j]["value"]       = $request->dateformat($tab[$i][$j]["value"]);
+                    $tab[$i][$j]["label"]       = _OPERATION_DATE;
+                    $tab[$i][$j]["size"]        = "9";
+                    $tab[$i][$j]["label_align"] = "left";
+                    $tab[$i][$j]["align"]       = "left";
+                    $tab[$i][$j]["valign"]      = "bottom";
+                    $tab[$i][$j]["show"]        = true;
+                    $tab[$i][$j]["order"]       = 'operation_date';
+                }
+                if ($tab[$i][$j][$value]=="reception_date") {
+                    $tab[$i][$j]["value"]       = $request->dateformat($tab[$i][$j]["value"]);
+                    $tab[$i][$j]["label"]       = _RECEPTION_DATE;
+                    $tab[$i][$j]["size"]        = "9";
+                    $tab[$i][$j]["label_align"] = "left";
+                    $tab[$i][$j]["align"]       = "left";
+                    $tab[$i][$j]["valign"]      = "bottom";
+                    $tab[$i][$j]["show"]        = true;
+                    $tab[$i][$j]["order"]       = 'reception_date';
+                }
+                if ($tab[$i][$j][$value]=="recipient_org_name") {
+                    $tab[$i][$j]["value"]       = $tab[$i][$j]["value"] . " (" . $recipient_org_identifier . ")";
+                    $tab[$i][$j]["label"]       = _RECIPIENT;
+                    $tab[$i][$j]["size"]        = "20";
+                    $tab[$i][$j]["label_align"] = "left";
+                    $tab[$i][$j]["align"]       = "left";
+                    $tab[$i][$j]["valign"]      = "bottom";
+                    $tab[$i][$j]["show"]        = true;
+                    $tab[$i][$j]["order"]       = 'recipient_org_name';
+                }
+                if ($tab[$i][$j][$value]=="sender_org_name") {
+                    $sender_org_name = $tab[$i][$j]["value"];
+                    $tab[$i][$j]["show"]        = false;
+                }
+                if ($tab[$i][$j][$value]=="recipient_org_identifier") {
+                    $recipient_org_identifier = $tab[$i][$j]["value"];
+                    $tab[$i][$j]["show"]      = false;
+                }
+                if ($tab[$i][$j][$value]=="account_id") {
+                    $userInfo = \User\models\UserModel::getById(['id' => $tab[$i][$j]["value"]]);
+                    $tab[$i][$j]["value"]       = $userInfo['firstname'] . " " . $userInfo['lastname'] . " (".$sender_org_name.")";
+                    $tab[$i][$j]["label"]       = _SENDER;
+                    $tab[$i][$j]["size"]        = "20";
+                    $tab[$i][$j]["label_align"] = "left";
+                    $tab[$i][$j]["align"]       = "left";
+                    $tab[$i][$j]["valign"]      = "bottom";
+                    $tab[$i][$j]["show"]        = true;
+                    $tab[$i][$j]["order"]       = 'account_id';
+                }
+                if ($tab[$i][$j][$value]=="status") {
+                    $tab[$i][$j]["value"] = '<img src="'
+                        .$_SESSION['config']['businessappurl'].'static.php?module=sendmail&filename='
+                        .$_SESSION['sendmail']['status'][$tab[$i][$j]["value"]]['img'].'" title="'
+                        .$_SESSION['sendmail']['status'][$tab[$i][$j]["value"]]['label'].'" width="20" height="20" />';
+                    $tab[$i][$j]["label"]       = _STATUS;
+                    $tab[$i][$j]["size"]        = "1";
+                    $tab[$i][$j]["label_align"] = "left";
+                    $tab[$i][$j]["align"]       = "left";
+                    $tab[$i][$j]["valign"]      = "bottom";
+                    $tab[$i][$j]["show"]        = true;
+                    $tab[$i][$j]["order"]       = 'status';
+                }
+            }
+        }
+    }
+    
+    //List
+    $listKey                        = 'message_id';                                       //Cle de la liste
+    $paramsTab                      = array();                                            //Initialiser le tableau de parametres
+    $paramsTab['bool_sortColumn']   = false;                                              //Affichage Tri
+    $paramsTab['pageTitle']         = '<br><br>'._NUMERIC_PACKAGE_SENT;                   //Titre de la page
+    $paramsTab['bool_bigPageTitle'] = false;                                              //Affichage du titre en grand
+    $paramsTab['urlParameters']     = 'identifier='.$identifier."&origin=".$origin.'&display=true'.$parameters;            //Parametres d'url supplementaires
+    $paramsTab['listHeight']        = '100%';                                             //Hauteur de la liste
+    $paramsTab['listCss']           = $css;                                               //CSS
+    
+    //Action icons array
+    $paramsTab['actionIcons'] = array();
+    $read = array(
+        "script"    => "showEmailForm('".$_SESSION['config']['businessappurl']
+                                ."index.php?display=true&module=sendmail&page=sendmail_ajax_content"
+                                ."&mode=read&id=@@message_id@@&identifier=".$identifier."&origin=".$origin.'&formContent=messageExchange'
+                                . $parameters."');",
+        "icon"      =>  'eye',
+        "tooltip"   =>  _READ
+    );
+    array_push($paramsTab['actionIcons'], $read);
+
+    $download = array(
+        "script"    => "window.location = 'index.php?display=true&module=sendmail&page=sendmail_ajax_content"
+                                ."&mode=download&id=@@message_id@@&identifier=".$identifier."&origin=".$origin."&formContent=messageExchange"
+                                . $parameters."';",
+        "icon"      =>  'download',
+        "tooltip"   =>  _SIMPLE_DOWNLOAD,
+        "disabledRules" => "empty(@@filename@@)"
+    );
+    array_push($paramsTab['actionIcons'], $download);
+
+    //Output
+    $status = 0;
+    $contentMessageExchange = $list->showList($tab, $paramsTab, $listKey);
+}
diff --git a/modules/sendmail/sendmail.php b/modules/sendmail/sendmail.php
index 2be852967190a6c2203ea9a7371ff9697964788e..13f2d1f5179c725ff8eaddd53ebf8c68803a4640 100755
--- a/modules/sendmail/sendmail.php
+++ b/modules/sendmail/sendmail.php
@@ -336,16 +336,27 @@ if (isset($_REQUEST['start']) && !empty($_REQUEST['start'])) $parameters .= '&st
         $paramsTab['listCss'] = $css;                                                       //CSS
         $paramsTab['tools'] = array();                                                      //Icones dans la barre d'outils
           
-        $add = array(
+        $addMail = array(
                 "script"        =>  "showEmailForm('".$_SESSION['config']['businessappurl']  
                                         . "index.php?display=true&module=sendmail&page=sendmail_ajax_content"
-                                        . "&mode=add&identifier=".$identifier."&origin=".$origin
+                                        . "&mode=add&identifier=".$identifier."&origin=".$origin."&formContent=email"
                                         . $parameters."')",
                 "icon"          =>  'envelope',
                 "tooltip"       =>  _NEW_EMAIL,
                 "alwaysVisible" =>  true
                 );
-        array_push($paramsTab['tools'],$add);   
+
+        $addExchangeMessage = array(
+                "script"        =>  "showEmailForm('".$_SESSION['config']['businessappurl']  
+                                        . "index.php?display=true&module=sendmail&page=sendmail_ajax_content"
+                                        . "&mode=add&identifier=".$identifier."&origin=".$origin."&formContent=messageExchange"
+                                        . $parameters."')",
+                "icon"          =>  'exchange',
+                "tooltip"       =>  _NEW_NUMERIC_PACKAGE,
+                "alwaysVisible" =>  true
+                );
+
+        array_push($paramsTab['tools'], $addMail, $addExchangeMessage);   
         
         //Action icons array
         $paramsTab['actionIcons'] = array();      
@@ -388,6 +399,9 @@ if (isset($_REQUEST['start']) && !empty($_REQUEST['start'])) $parameters .= '&st
         $content .= '<script>loadToolbarBadge(\'sendmail_tab\',\''.$toolbarBagde_script.'\');</script>';
         // $debug = $list->debug();
 
+    /********* MESSAGE EXCHANGE PART ***************/
+    include_once "modules/sendmail/messageExchangeList.php";
+
         
-    echo "{status : " . $status . ", content : '" . addslashes($debug.$content) . "', error : '" . addslashes($error) . "'}";
+    echo "{status : " . $status . ", content : '" . addslashes($debug.$content.$contentMessageExchange) . "', error : '" . addslashes($error) . "'}";
 }
diff --git a/modules/sendmail/sendmail_ajax_content.php b/modules/sendmail/sendmail_ajax_content.php
index 4716345fccb06c1730d8de8ed13d18fba9ed4cf9..6807144d0d96806aec04b447bda8d1292dc745dd 100755
--- a/modules/sendmail/sendmail_ajax_content.php
+++ b/modules/sendmail/sendmail_ajax_content.php
@@ -42,35 +42,27 @@ require_once 'modules/sendmail/sendmail_tables.php';
 require_once 'modules/notifications/notifications_tables_definition.php';
 require_once "modules" . DIRECTORY_SEPARATOR . "sendmail" . DIRECTORY_SEPARATOR
     . "class" . DIRECTORY_SEPARATOR . "class_modules_tools.php";
-    
-$core_tools     = new core_tools();
-$request        = new request();
-$db        		= new Database();
-$sec            = new security();
-$is             = new indexing_searching_app();
-$users_tools    = new class_users();
-$sendmail_tools = new sendmail();
-
-
-    // require_once('core'.DIRECTORY_SEPARATOR.'class'.DIRECTORY_SEPARATOR.'class_request.php');
-    // $db = new Database();
-    // $stmt = $db->query("SELECT action_page FROM actions WHERE id = ?", array($_SESSION['id_action']));
-    // $action_page = $stmt->fetchObject(); 
-    // $action_page = $action_page->action_page;
-    //var_dump($action_page);
+require_once 'modules/sendmail/Controllers/SendMessageExchangeController.php';
 
+$core_tools                = new core_tools();
+$request                   = new request();
+$db                        = new Database();
+$sec                       = new security();
+$is                        = new indexing_searching_app();
+$users_tools               = new class_users();
+$sendmail_tools            = new sendmail();
 
-if($_SESSION['features']['send_to_contact_with_mandatory_attachment'] == true && !isset($_REQUEST['join_attachment']) && $_REQUEST['action'] == 'send_to_contact_with_mandatory_attachment'){
 
-    $error = $request->wash_html(_PLEASE_CHOOSE_AN_ATTACHMENT,'NONE');
+if ($_SESSION['features']['send_to_contact_with_mandatory_attachment'] == true && !isset($_REQUEST['join_attachment']) && $_REQUEST['action'] == 'send_to_contact_with_mandatory_attachment') {
+    $error = $request->wash_html(_PLEASE_CHOOSE_AN_ATTACHMENT, 'NONE');
     $status = 1;
     echo "{status : " . $status . ", content : '" . addslashes(_parse($content)) . "', error : '" . addslashes(_parse_error($error)) . "', exec_js : '".addslashes($js)."'}";
-    exit ();
-
+    exit();
 }
 
 
-function _parse($text) {
+function _parse($text)
+{
     //...
     $text = str_replace("\r\n", PHP_EOL, $text);
     $text = str_replace("\r", PHP_EOL, $text);
@@ -79,7 +71,8 @@ function _parse($text) {
     $text = str_replace(PHP_EOL, "\\n ", $text);
     return $text;
 }
-function _parse_error($text) {
+function _parse_error($text)
+{
     //...
     $text = str_replace("###", "\\n ", $text);
     return $text;
@@ -105,6 +98,12 @@ if (isset($_REQUEST['identifier']) && ! empty($_REQUEST['identifier'])) {
     $identifier = trim($_REQUEST['identifier']);
 }
 
+//formContent of the element wich is noted
+$formContent = '';
+if (isset($_GET['formContent']) && ! empty($_GET['formContent'])) {
+    $formContent = trim($_GET['formContent']);
+}
+
 //Collection
 if (isset($_REQUEST['coll_id']) && ! empty($_REQUEST['coll_id'])) {
     $collId = trim($_REQUEST['coll_id']);
@@ -114,14 +113,24 @@ if (isset($_REQUEST['coll_id']) && ! empty($_REQUEST['coll_id'])) {
 }
 
 //Keep some origin parameters
-if (isset($_REQUEST['size']) && !empty($_REQUEST['size'])) $parameters .= '&size='.$_REQUEST['size'];
+if (isset($_REQUEST['size']) && !empty($_REQUEST['size'])) {
+    $parameters .= '&size='.$_REQUEST['size'];
+}
 if (isset($_REQUEST['order']) && !empty($_REQUEST['order'])) {
     $parameters .= '&order='.$_REQUEST['order'];
-    if (isset($_REQUEST['order_field']) && !empty($_REQUEST['order_field'])) $parameters .= '&order_field='.$_REQUEST['order_field'];
+    if (isset($_REQUEST['order_field']) && !empty($_REQUEST['order_field'])) {
+        $parameters .= '&order_field='.$_REQUEST['order_field'];
+    }
+}
+if (isset($_REQUEST['what']) && !empty($_REQUEST['what'])) {
+    $parameters .= '&what='.$_REQUEST['what'];
+}
+if (isset($_REQUEST['template']) && !empty($_REQUEST['template'])) {
+    $parameters .= '&template='.$_REQUEST['template'];
+}
+if (isset($_REQUEST['start']) && !empty($_REQUEST['start'])) {
+    $parameters .= '&start='.$_REQUEST['start'];
 }
-if (isset($_REQUEST['what']) && !empty($_REQUEST['what'])) $parameters .= '&what='.$_REQUEST['what'];
-if (isset($_REQUEST['template']) && !empty($_REQUEST['template'])) $parameters .= '&template='.$_REQUEST['template'];
-if (isset($_REQUEST['start']) && !empty($_REQUEST['start'])) $parameters .= '&start='.$_REQUEST['start'];
 
 //Keep the origin to reload the origin list
 $list_origin = $origin = '';
@@ -157,18 +166,18 @@ switch ($mode) {
         if (isset($_REQUEST['id']) && !empty($_REQUEST['id'])) {
             $parameters .= '&id='.$_REQUEST['id'];
         } else {
-            $error = $request->wash_html(_ID.' '._IS_EMPTY.'!','NONE');
+            $error = $request->wash_html(_ID.' '._IS_EMPTY.'!', 'NONE');
             $status = 1;
              //Close the modal
-            $js =  "window.parent.destroyModal('form_email');"; 
+            $js =  "window.parent.destroyModal('form_email');";
             break;
         }
     case 'add':
         if (empty($identifier)) {
-            $error = $request->wash_html(_IDENTIFIER.' '._IS_EMPTY.'!','NONE');
+            $error = $request->wash_html(_IDENTIFIER.' '._IS_EMPTY.'!', 'NONE');
             $status = 1;
              //Close the modal
-            $js =  "window.parent.destroyModal('form_email');"; 
+            $js =  "window.parent.destroyModal('form_email');";
         } else {
             //Reset arry of adresses
             unset($_SESSION['adresses']);
@@ -177,128 +186,137 @@ switch ($mode) {
             $content .='<iframe name="form_mail" id="form_mail" src="'
                 . $_SESSION['config']['businessappurl']
                 . 'index.php?display=true&module=sendmail&page=mail_form&identifier='
-                . $identifier.'&origin=document&coll_id='.$collId.'&mode='.$mode.$parameters.'" '
+                . $identifier.'&origin=document&coll_id='.$collId.'&mode='.$mode.$parameters.'&formContent='.$_GET['formContent'].'" '
                 . 'frameborder="0" width="100%" style="height:540px;padding:0px;overflow-x:hidden;overflow-y: auto;"></iframe>';
         }
     break;
         
     case 'added':
-        $userEntitiesMails = array();
-        if ($core_tools->test_service('use_mail_services', 'sendmail', false)) {
-            $userEntitiesMails = $sendmail_tools->checkAttachedEntitiesMails($_SESSION['user']['UserId']);
-        }
-        if (empty($identifier)) {
-            $error = $request->wash_html(_IDENTIFIER.' '._IS_EMPTY.'!','NONE');
-            $status = 1;
-        } else if (!in_array($_REQUEST['sender_email'], array_keys($userEntitiesMails)) && $core_tools->test_service('use_mail_services', 'sendmail', false)) {
-            $error = $request->wash_html(_INCORRECT_SENDER,'NONE');
-            $status = 1;
+        if ($formContent == 'messageExchange') {
+            $return = SendMessageExchangeController::createMessageExchange($_REQUEST);
+            if (!empty($return['errors'])) {
+                $error = implode(", ", $return['errors']);
+                $status = 1;
+            }
+            //Reload and show message
+            $js =  $list_origin."window.parent.top.$('main_info').innerHTML = '"._EMAIL_ADDED."';";
         } else {
-            if ((isset($_SESSION['adresses']['to']) && count($_SESSION['adresses']['to']) > 0) || $_REQUEST['for'] == 'save') {
-                if (!empty($_REQUEST['object']) || $_REQUEST['for'] == 'save') {
-                    
-                    //Check adress for to
-                    if(!empty($_SESSION['adresses']['to'])){
+            $userEntitiesMails = array();
+            if ($core_tools->test_service('use_mail_services', 'sendmail', false)) {
+                $userEntitiesMails = $sendmail_tools->checkAttachedEntitiesMails($_SESSION['user']['UserId']);
+            }
+            if (empty($identifier)) {
+                $error = $request->wash_html(_IDENTIFIER.' '._IS_EMPTY.'!', 'NONE');
+                $status = 1;
+            } elseif (!in_array($_REQUEST['sender_email'], array_keys($userEntitiesMails)) && $core_tools->test_service('use_mail_services', 'sendmail', false)) {
+                $error = $request->wash_html(_INCORRECT_SENDER, 'NONE');
+                $status = 1;
+            } else {
+                if (isset($_SESSION['adresses']['to']) && count($_SESSION['adresses']['to']) > 0) {
+                    if (!empty($_REQUEST['object'])) {
+                        
+                        //Check adress for to
                         $to =  join(',', $_SESSION['adresses']['to']);
                         $error = $sendmail_tools->CheckEmailAdress($to);
-                    }
-                    
-                    if (empty($error)) {
-                        
-                        //Check adress for cc
-                        (isset($_SESSION['adresses']['cc']) && count($_SESSION['adresses']['cc']) > 0)? 
-                            $cc =  join(',', $_SESSION['adresses']['cc']) : $cc = '';
-                        $error = $sendmail_tools->CheckEmailAdress($cc);
                         
                         if (empty($error)) {
-                        
-                            //Check adress for cci
-                            (isset($_SESSION['adresses']['cci']) && count($_SESSION['adresses']['cci']) > 0)? 
-                                $cci =  join(',', $_SESSION['adresses']['cci']) : $cci = '';
-                            $error = $sendmail_tools->CheckEmailAdress($cci);
+                            
+                            //Check adress for cc
+                            (isset($_SESSION['adresses']['cc']) && count($_SESSION['adresses']['cc']) > 0)?
+                                $cc =  join(',', $_SESSION['adresses']['cc']) : $cc = '';
+                            $error = $sendmail_tools->CheckEmailAdress($cc);
                             
                             if (empty($error)) {
                             
-                                //Data
-                                $collId = $_REQUEST['coll_id'];
-                                $object = $_REQUEST['object'];
-                                $senderEmail = $_REQUEST['sender_email'];
-                                (isset($_REQUEST['join_file']) 
-                                    && count($_REQUEST['join_file']) > 0
-                                )? $res_master_attached = 'Y' : $res_master_attached = 'N';
-								//attachment
-                                if (isset($_REQUEST['join_attachment']) && count($_REQUEST['join_attachment']) > 0) {
-                                    $attachment_list = join(',', $_REQUEST['join_attachment']);
-                                } 
-                                //Version attachment
-                                if (isset($_REQUEST['join_version_attachment']) && count($_REQUEST['join_version_attachment']) > 0) {
-                                    $attachment_version_list = join(',', $_REQUEST['join_version_attachment']);
-                                }   
-								//version document								
-								if (isset($_REQUEST['join_version']) && count($_REQUEST['join_version']) > 0) {
-                                    $version_list = join(',', $_REQUEST['join_version']);
-                                }
-								//Notes
-                                if (isset($_REQUEST['notes']) && count($_REQUEST['notes']) > 0) {
-                                    $note_list = join(',', $_REQUEST['notes']);
-                                }
-
-                                $userId = $_SESSION['user']['UserId'];
-                                (!empty($_REQUEST['is_html']) && $_REQUEST['is_html'] == 'Y')? $isHtml = 'Y' : $isHtml = 'N';
-                                //Body content
-                                if ($isHtml == 'Y') {
-                                    $body = $sendmail_tools->cleanHtml($_REQUEST['body_from_html']);
-                                } else {
-                                     $body = $_REQUEST['body_from_raw'];
-                                }
+                                //Check adress for cci
+                                (isset($_SESSION['adresses']['cci']) && count($_SESSION['adresses']['cci']) > 0)?
+                                    $cci =  join(',', $_SESSION['adresses']['cci']) : $cci = '';
+                                $error = $sendmail_tools->CheckEmailAdress($cci);
                                 
-                                //Status
-                                if ($_REQUEST['for'] == 'save') {
-                                    $email_status = 'D';
-                                } else if ($_REQUEST['for'] == 'send'){
-                                    $email_status = 'W';
-                                }
-                          
-                                //Query                 
-                                $stmt = $db->query(
-                                    "INSERT INTO " . EMAILS_TABLE . "(coll_id, res_id, user_id, to_list, cc_list,
-                                    cci_list, email_object, email_body, is_res_master_attached, res_version_id_list, 
-                                    res_attachment_id_list, res_version_att_id_list,note_id_list, is_html, email_status, creation_date, sender_email) 
-                                    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP, ?)",
-									array($collId, $identifier, $userId, $to, $cc, $cci, $object, $body, $res_master_attached, 
-									$version_list, $attachment_list, $attachment_version_list, $note_list, $isHtml, $email_status, $senderEmail)
-                                );
-                               
+                                if (empty($error)) {
                                 
-                                //Last insert ID from sequence
-                                $id = $request->last_insert_id('sendmail_email_id_seq');
+                                    //Data
+                                    $collId = $_REQUEST['coll_id'];
+                                    $object = $_REQUEST['object'];
+                                    $senderEmail = $_REQUEST['sender_email'];
+                                    (isset($_REQUEST['join_file'])
+                                        && count($_REQUEST['join_file']) > 0
+                                    )? $res_master_attached = 'Y' : $res_master_attached = 'N';
+                                    //attachment
+                                    if (isset($_REQUEST['join_attachment']) && count($_REQUEST['join_attachment']) > 0) {
+                                        $attachment_list = join(',', $_REQUEST['join_attachment']);
+                                    }
+                                    //Version attachment
+                                    if (isset($_REQUEST['join_version_attachment']) && count($_REQUEST['join_version_attachment']) > 0) {
+                                        $attachment_version_list = join(',', $_REQUEST['join_version_attachment']);
+                                    }
+                                    //version document
+                                    if (isset($_REQUEST['join_version']) && count($_REQUEST['join_version']) > 0) {
+                                        $version_list = join(',', $_REQUEST['join_version']);
+                                    }
+                                    //Notes
+                                    if (isset($_REQUEST['notes']) && count($_REQUEST['notes']) > 0) {
+                                        $note_list = join(',', $_REQUEST['notes']);
+                                    }
+
+                                    $userId = $_SESSION['user']['UserId'];
+                                    (!empty($_REQUEST['is_html']) && $_REQUEST['is_html'] == 'Y')? $isHtml = 'Y' : $isHtml = 'N';
+                                    //Body content
+                                    if ($isHtml == 'Y') {
+                                        $body = $sendmail_tools->cleanHtml($_REQUEST['body_from_html']);
+                                    } else {
+                                        $body = $_REQUEST['body_from_raw'];
+                                    }
+                                    
+                                    //Status
+                                    if ($_REQUEST['for'] == 'save') {
+                                        $email_status = 'D';
+                                    } elseif ($_REQUEST['for'] == 'send') {
+                                        $email_status = 'W';
+                                    }
+                              
+                                    //Query
+                                    $stmt = $db->query(
+                                        "INSERT INTO " . EMAILS_TABLE . "(coll_id, res_id, user_id, to_list, cc_list,
+                                        cci_list, email_object, email_body, is_res_master_attached, res_version_id_list, 
+                                        res_attachment_id_list, res_version_att_id_list,note_id_list, is_html, email_status, creation_date, sender_email) 
+                                        VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP, ?)",
+                                        array($collId, $identifier, $userId, $to, $cc, $cci, $object, $body, $res_master_attached,
+                                        $version_list, $attachment_list, $attachment_version_list, $note_list, $isHtml, $email_status, $senderEmail)
+                                    );
+                                   
+                                    
+                                    //Last insert ID from sequence
+                                    $id = $request->last_insert_id('sendmail_email_id_seq');
+
+                                    //History
+                                    if ($_SESSION['history']['mailadd']) {
+                                        $hist = new history();
+                                        if (isset($_REQUEST['origin']) && $_REQUEST['origin'] == "folder") {
+                                            $hist->add(
+                                                $table, $identifier, "UP", 'folderup', _EMAIL_ADDED . _ON_FOLDER_NUM
+                                                . $identifier . ' (' . $id . ') : "' . $request->cut_string($object, 254) .'"',
+                                                $_SESSION['config']['databasetype'], 'sendmail'
+                                            );
+                                        } elseif (isset($_REQUEST['origin']) && $_REQUEST['origin'] == "document") {
+                                            $hist->add(
+                                                $view, $identifier, "UP", 'resup', _EMAIL_ADDED . _ON_DOC_NUM
+                                                . $identifier . ' (' . $id . ') : "' . $request->cut_string($object, 254) .'"',
+                                                $_SESSION['config']['databasetype'], 'sendmail'
+                                            );
+                                        }
 
-                                //History
-                                if ($_SESSION['history']['mailadd']) {
-                                    $hist = new history();
-                                    if (isset($_REQUEST['origin']) && $_REQUEST['origin'] == "folder") {
-                                        $hist->add(
-                                            $table, $identifier, "UP", 'folderup', _EMAIL_ADDED . _ON_FOLDER_NUM
-                                            . $identifier . ' (' . $id . ') : "' . $request->cut_string($object, 254) .'"',
-                                            $_SESSION['config']['databasetype'], 'sendmail'
-                                        );
-                                    } else if (isset($_REQUEST['origin']) && $_REQUEST['origin'] == "document") {
                                         $hist->add(
-                                            $view, $identifier, "UP", 'resup',  _EMAIL_ADDED . _ON_DOC_NUM
-                                            . $identifier . ' (' . $id . ') : "' . $request->cut_string($object, 254) .'"',
+                                            EMAILS_TABLE, $id, "ADD", 'mailadd', _EMAIL_ADDED . ' (' . $id . ')',
                                             $_SESSION['config']['databasetype'], 'sendmail'
                                         );
                                     }
-
-                                    $hist->add(
-                                        EMAILS_TABLE, $id, "ADD", 'mailadd', _EMAIL_ADDED . ' (' . $id . ')',
-                                        $_SESSION['config']['databasetype'], 'sendmail'
-                                    );
+                                    
+                                    //Reload and show message
+                                    $js =  $list_origin."window.parent.top.$('main_info').innerHTML = '"._EMAIL_ADDED."';";
+                                } else {
+                                    $status = 1;
                                 }
-                                
-                                //Reload and show message
-                                $js =  $list_origin."window.parent.top.$('main_info').innerHTML = '"._EMAIL_ADDED."';";
-            
                             } else {
                                 $status = 1;
                             }
@@ -306,15 +324,13 @@ switch ($mode) {
                             $status = 1;
                         }
                     } else {
+                        $error = $request->wash_html(_EMAIL_OBJECT.' '._IS_EMPTY.'!', 'NONE');
                         $status = 1;
                     }
                 } else {
-                    $error = $request->wash_html(_EMAIL_OBJECT.' '._IS_EMPTY.'!','NONE');
+                    $error = $request->wash_html(_SEND_TO.' '._IS_EMPTY.'!', 'NONE');
                     $status = 1;
                 }
-            } else {
-                $error = $request->wash_html(_SEND_TO.' '._IS_EMPTY.'!','NONE');
-                $status = 1;
             }
         }
     break;
@@ -329,17 +345,17 @@ switch ($mode) {
             }
             //Res ID
             if (empty($identifier)) {
-                $error = $request->wash_html(_IDENTIFIER.' '._IS_EMPTY.'!','NONE');
+                $error = $request->wash_html(_IDENTIFIER.' '._IS_EMPTY.'!', 'NONE');
                 $status = 1;
-            } else if (!in_array($_REQUEST['sender_email'], array_keys($userEntitiesMails)) && $core_tools->test_service('use_mail_services', 'sendmail', false)) {
-                $error = $request->wash_html(_INCORRECT_SENDER,'NONE');
+            } elseif (!in_array($_REQUEST['sender_email'], array_keys($userEntitiesMails)) && $core_tools->test_service('use_mail_services', 'sendmail', false)) {
+                $error = $request->wash_html(_INCORRECT_SENDER, 'NONE');
                 $status = 1;
             } else {
                 if ((isset($_SESSION['adresses']['to']) && count($_SESSION['adresses']['to']) > 0) || $_REQUEST['for'] == 'save') {
                     if (!empty($_REQUEST['object']) || $_REQUEST['for'] == 'save') {
                         
                         //Check adress for to
-                        if(!empty($_SESSION['adresses']['to'])){
+                        if (!empty($_SESSION['adresses']['to'])) {
                             $to =  join(',', $_SESSION['adresses']['to']);
                             $error = $sendmail_tools->CheckEmailAdress($to);
                         }
@@ -347,14 +363,14 @@ switch ($mode) {
                         if (empty($error)) {
                             
                             //Check adress for cc
-                            (isset($_SESSION['adresses']['cc']) && count($_SESSION['adresses']['cc']) > 0)? 
+                            (isset($_SESSION['adresses']['cc']) && count($_SESSION['adresses']['cc']) > 0)?
                                 $cc =  join(',', $_SESSION['adresses']['cc']) : $cc = '';
                             $error = $sendmail_tools->CheckEmailAdress($cc);
                             
                             if (empty($error)) {
                             
                                 //Check adress for cci
-                                (isset($_SESSION['adresses']['cci']) && count($_SESSION['adresses']['cci']) > 0)? 
+                                (isset($_SESSION['adresses']['cci']) && count($_SESSION['adresses']['cci']) > 0)?
                                     $cci =  join(',', $_SESSION['adresses']['cci']) : $cci = '';
                                 $error = $sendmail_tools->CheckEmailAdress($cci);
                                 
@@ -364,7 +380,7 @@ switch ($mode) {
                                     $collId = $_REQUEST['coll_id'];
                                     $object = $_REQUEST['object'];
                                     $senderEmail = $_REQUEST['sender_email'];
-                                    (isset($_REQUEST['join_file']) 
+                                    (isset($_REQUEST['join_file'])
                                         && count($_REQUEST['join_file']) > 0
                                     )? $res_master_attached = 'Y' : $res_master_attached = 'N';
                                     if (isset($_REQUEST['join_version']) && count($_REQUEST['join_version']) > 0) {
@@ -386,16 +402,16 @@ switch ($mode) {
                                     if ($isHtml == 'Y') {
                                         $body = $sendmail_tools->cleanHtml($_REQUEST['body_from_html']);
                                     } else {
-                                         $body = $_REQUEST['body_from_raw'];
+                                        $body = $_REQUEST['body_from_raw'];
                                     }
                                     //Status
                                     if ($_REQUEST['for'] == 'save') {
                                         $email_status = 'D';
-                                    } else if ($_REQUEST['for'] == 'send'){
+                                    } elseif ($_REQUEST['for'] == 'send') {
                                         $email_status = 'W';
                                     }
                                     
-                                    //Query                 
+                                    //Query
                                     $db->query(
                                         "UPDATE " . EMAILS_TABLE . " SET to_list = ?, cc_list = ?, cci_list = ?, email_object = ?, 
 												email_body = ?, is_res_master_attached = ?, res_version_id_list = ?, 
@@ -403,7 +419,7 @@ switch ($mode) {
 												is_html = ?, email_status = ?, sender_email = ?, send_date = ? where email_id = ? "
                                             ." and res_id =  ? and user_id = ?",
                                             array($to, $cc, $cci, $object, $body, $res_master_attached, $version_list, $attachment_list, $attachment_version_list, $note_list, $isHtml,
-												$email_status, $senderEmail, NULL, $id, $identifier, $userId )
+                                                $email_status, $senderEmail, null, $id, $identifier, $userId )
                                     );
                                     
                                     //History
@@ -415,9 +431,9 @@ switch ($mode) {
                                                 . $identifier . ' (' . $id . ') : "' . $request->cut_string($object, 254) .'"',
                                                 $_SESSION['config']['databasetype'], 'sendmail'
                                             );
-                                        } else if (isset($_REQUEST['origin']) && $_REQUEST['origin'] == "document") {
+                                        } elseif (isset($_REQUEST['origin']) && $_REQUEST['origin'] == "document") {
                                             $hist->add(
-                                                $view, $identifier, "UP", 'resup',  _EMAIL_UPDATED . _ON_DOC_NUM
+                                                $view, $identifier, "UP", 'resup', _EMAIL_UPDATED . _ON_DOC_NUM
                                                 . $identifier . ' (' . $id . ') : "' . $request->cut_string($object, 254) .'"',
                                                 $_SESSION['config']['databasetype'], 'sendmail'
                                             );
@@ -430,7 +446,7 @@ switch ($mode) {
                                     }
                                     
                                     //Reload and show message
-                                    $js =  $list_origin."window.parent.top.$('main_info').innerHTML = '"._EMAIL_UPDATED."';"; 
+                                    $js =  $list_origin."window.parent.top.$('main_info').innerHTML = '"._EMAIL_UPDATED."';";
                                 } else {
                                     $status = 1;
                                 }
@@ -441,20 +457,19 @@ switch ($mode) {
                             $status = 1;
                         }
                     } else {
-                        $error = $request->wash_html(_EMAIL_OBJECT.' '._IS_EMPTY.'!','NONE');
+                        $error = $request->wash_html(_EMAIL_OBJECT.' '._IS_EMPTY.'!', 'NONE');
                         $status = 1;
                     }
                 } else {
-                    $error = $request->wash_html(_SEND_TO.' '._IS_EMPTY.'!','NONE');
+                    $error = $request->wash_html(_SEND_TO.' '._IS_EMPTY.'!', 'NONE');
                     $status = 1;
                 }
             }
-            
         } else {
-            $error = $request->wash_html(_ID.' '._IS_EMPTY.'!','NONE');
+            $error = $request->wash_html(_ID.' '._IS_EMPTY.'!', 'NONE');
             $status = 1;
              //Close the modal
-            $js =  "window.parent.destroyModal('form_email');"; 
+            $js =  "window.parent.destroyModal('form_email');";
         }
     break;
     
@@ -469,7 +484,7 @@ switch ($mode) {
             $request->query("delete from " . EMAILS_TABLE . " where email_id = " . $id);
             
             //Delete email from stack too ???
-            $request->query("delete from " . _NOTIF_EVENT_STACK_TABLE_NAME 
+            $request->query("delete from " . _NOTIF_EVENT_STACK_TABLE_NAME
                 . " where table_name = '" . EMAILS_TABLE . "' and record_id = '" . $id . "'");
             
             //History
@@ -481,16 +496,16 @@ switch ($mode) {
                         . $identifier . ' (' . $id . ') : "' . $request->cut_string($object, 254) .'"',
                         $_SESSION['config']['databasetype'], 'sendmail'
                     );
-                } else if (isset($_REQUEST['origin']) && $_REQUEST['origin'] == "document") {
+                } elseif (isset($_REQUEST['origin']) && $_REQUEST['origin'] == "document") {
                     $hist->add(
-                        $view, $identifier, "UP", 'resup',  _EMAIL_REMOVED . _ON_DOC_NUM
+                        $view, $identifier, "UP", 'resup', _EMAIL_REMOVED . _ON_DOC_NUM
                         . $identifier . ' (' . $id . ') : "' . $request->cut_string($object, 254) .'"',
                         $_SESSION['config']['databasetype'], 'sendmail'
                     );
                 }
 
                 $hist->add(
-                    EMAILS_TABLE, $id, "DEL", 'maildel', _EMAIL_REMOVED . ' (' . $id . ') : "' 
+                    EMAILS_TABLE, $id, "DEL", 'maildel', _EMAIL_REMOVED . ' (' . $id . ') : "'
                     . $request->cut_string($object, 254) .'"',
                     $_SESSION['config']['databasetype'], 'sendmail'
                 );
@@ -498,50 +513,111 @@ switch ($mode) {
             
             //Reload and show message
             $js =  $list_origin."window.parent.top.$('main_info').innerHTML = '"._EMAIL_REMOVED."';";
-            
-            
-            
-        
-            
-            
         } else {
-            $error = $request->wash_html(_ID.' '._IS_EMPTY.'!','NONE');
+            $error = $request->wash_html(_ID.' '._IS_EMPTY.'!', 'NONE');
             $status = 1;
             //Close the modal
-            $js =  "window.parent.destroyModal('form_email');"; 
+            $js =  "window.parent.destroyModal('form_email');";
         }
     break;
     case 'adress':
         if (isset($_REQUEST['for']) && isset($_REQUEST['field']) && isset($_REQUEST['email'])) {
-            //
             if (isset($_REQUEST['email']) && !empty($_REQUEST['email'])) {
                 //Clean up email
                 $email = trim($_REQUEST['email']);
                 //Reset session adresses if necessary
-                if (!isset($_SESSION['adresses'][$_REQUEST['field']])) $_SESSION['adresses'][$_REQUEST['field']] = array();
+                if (!isset($_SESSION['adresses'][$_REQUEST['field']])) {
+                    $_SESSION['adresses'][$_REQUEST['field']] = array();
+                }
                 //For ADD
                 if ($_REQUEST['for'] == 'add') {
                     array_push($_SESSION['adresses'][$_REQUEST['field']], $email);
                 //For DEL
-                } else  if ($_REQUEST['for'] == 'del') {
+                } elseif ($_REQUEST['for'] == 'del') {
                     //unset adress in array
                     unset($_SESSION['adresses'][$_REQUEST['field']][$_REQUEST['index']]);
                     //If no adresse for field, unset the entire sub-array
-                    if (count($_SESSION['adresses'][$_REQUEST['field']]) == 0) 
+                    if (count($_SESSION['adresses'][$_REQUEST['field']]) == 0) {
                         unset($_SESSION['adresses'][$_REQUEST['field']]);
+                    }
                 }
                 //Get content
                 $content = $sendmail_tools->updateAdressInputField($path_to_script, $_SESSION['adresses'], $_REQUEST['field']);
             } else {
-                $error = $request->wash_html(_EMAIL.' '._IS_EMPTY.'!','NONE');
+                $error = $request->wash_html(_EMAIL.' '._IS_EMPTY.'!', 'NONE');
                 $status = 1;
             }
         } else {
-            $error = $request->wash_html(_UNKNOW_ERROR.'!','NONE');
+            $error = $request->wash_html(_UNKNOW_ERROR.'!', 'NONE');
             $status = 1;
         }
     break;
+    case 'destUser':
+    if (isset($_REQUEST['for']) && isset($_REQUEST['field']) && isset($_REQUEST['contactAddress'])) {
+        if (isset($_REQUEST['contactAddress']) && !empty($_REQUEST['contactAddress'])) {
+            $contactAddress = trim($_REQUEST['contactAddress']);
+            if (!isset($_SESSION['adresses'][$_REQUEST['field']])) {
+                $_SESSION['adresses'][$_REQUEST['field']] = array();
+            }
+
+            if ($_REQUEST['for'] == 'add') {
+                $contactLabel         = \Contact\models\ContactModel::getContactFullLabel(['addressId' => $contactAddress]);
+                $contactInfo          = \Contact\models\ContactModel::getFullAddressById(['addressId' => $contactAddress]);
+                $contactCommunication = \Contact\models\ContactModel::getContactCommunication(['contactId' => $contactInfo[0]['contact_id']]);
+                $_SESSION['adresses'][$_REQUEST['field']][$contactAddress] = $contactLabel.'. ('._COMMUNICATION_TYPE.' : '.$contactCommunication['value'].'))';
+            } elseif ($_REQUEST['for'] == 'del') {
+                unset($_SESSION['adresses'][$_REQUEST['field']][$_REQUEST['index']]);
+                //If no adresse for field, unset the entire sub-array
+                if (count($_SESSION['adresses'][$_REQUEST['field']]) == 0) {
+                    unset($_SESSION['adresses'][$_REQUEST['field']]);
+                }
+            }
+
+            $content = $sendmail_tools->updateContactInputField($path_to_script, $_SESSION['adresses'], $_REQUEST['field']);
+        } else {
+            $error = $request->wash_html(_EMAIL.' '._IS_EMPTY.'!', 'NONE');
+            $status = 1;
+        }
+    } else {
+        $error = $request->wash_html(_UNKNOW_ERROR.'!', 'NONE');
+        $status = 1;
+    }
+    break;
+    case 'download':
+        require_once 'modules/export_seda/RequestSeda.php';
+        $RequestSeda         = new RequestSeda();
+        $messageExchangeData = $RequestSeda->getMessageByIdentifierAndResId(['message_id' => $_GET['id'], 'res_id_master' => $_GET['identifier']]);
+
+        $docserver     = \Docserver\models\DocserverModel::getById(['id' => $messageExchangeData->docserver_id]);
+        $docserverType = \Docserver\models\DocserverTypeModel::getById(['id' => $docserver[0]['docserver_type_id']]);
+
+        $pathDirectory = str_replace('#', DIRECTORY_SEPARATOR, $messageExchangeData->path);
+        $filePath      = $docserver[0]['path_template'] . $pathDirectory . $messageExchangeData->filename;
+        $fingerprint   = \SrcCore\controllers\StoreController::getFingerPrint([
+            'filePath' => $filePath,
+            'mode'     => $docserverType[0]['fingerprint_mode'],
+        ]);
+
+        if ($fingerprint['fingerprint'] != $messageExchangeData->fingerprint) {
+            echo _PB_WITH_FINGERPRINT_OF_DOCUMENT;
+            exit;
+        }
+
+        if (file_exists($filePath)) {
+            header('Pragma: public');
+            header('Expires: 0');
+            header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+            header('Cache-Control: public');
+            header('Content-Description: File Transfer');
+            header('Content-Type: ' . strtolower(mime_content_type($filePath)));
+            header("Content-length: " . filesize($filePath));
+            header('Content-Disposition: attachment; filename=' . basename($messageExchangeData->reference.'.zip') . ';');
+            header("Content-Type: application/force-download");
+            header('Content-Transfer-Encoding: binary');
+            readfile($filePath);
+            exit();
+        }
+        exit();
 }
 echo "{status : " . $status . ", content : '" . addslashes(_parse($content)) . "', error : '" . addslashes(_parse_error($error)) . "', exec_js : '".addslashes($js)."'}";
-exit ();
-?>
+exit();
diff --git a/modules/sendmail/xml/IVS/validation_rules.xml b/modules/sendmail/xml/IVS/validation_rules.xml
index a112fc6ad9c87dd2e19aa698e93f556467c91519..d6d2287480208beeed6ac41f7158f979a0b32f39 100755
--- a/modules/sendmail/xml/IVS/validation_rules.xml
+++ b/modules/sendmail/xml/IVS/validation_rules.xml
@@ -1,7 +1,7 @@
 <validationRules>
 	<validationRule name="sendmail_ajax_content" extends="standardForm" mode="error">
 		<parameter name="module" type="identifier" />
-		<parameter name="id" type="integer" />
+		<parameter name="id" type="base64" />
 		<parameter name="identifier" type="integer" />
 		<parameter name="origin" type="identifier" />
 		<parameter name="coll_id" type="collection_list" />
@@ -27,6 +27,9 @@
 		<parameter name="templateMail" type="integer" />
 		<parameter name="selectSignatures" type="string" />
 		<parameter name="action" type="string" />
+		<parameter name="formContent" type="string" />
+		<parameter name="main_exchange_doc" type="string" />
+		<parameter name="contactAddress" type="integer" />
 	</validationRule>
 
 	<validationRule name="mail_form" extends="standardForm" mode="error">
@@ -34,8 +37,9 @@
 		<parameter name="identifier" type="integer" />
 		<parameter name="origin" type="identifier" />
 		<parameter name="coll_id" type="collection_list" />
-		<parameter name="id" type="integer" />
+		<parameter name="id" type="base64" />
 		<parameter name="size" type="size" />
+		<parameter name="formContent" type="string" />
 	</validationRule>
 
 	<validationRule name="sendmail" extends="standardForm" mode="error">
@@ -52,5 +56,3 @@
 	</validationRule>
 
 </validationRules>
-
-
diff --git a/modules/sendmail/xml/menu.xml b/modules/sendmail/xml/menu.xml
index fa75d84946a407088d26b7c57ce6a08daa12dc00..d32c3afe07811423aabffc2d844ce7933d75e527 100755
--- a/modules/sendmail/xml/menu.xml
+++ b/modules/sendmail/xml/menu.xml
@@ -1,3 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-<root>
-</root>
\ No newline at end of file
+<ROOT>
+    <MENU>
+        <id>save_numeric_package</id>
+        <libconst>_SAVE_NUMERIC_PACKAGE</libconst>
+        <url>/saveNumericPackage</url>
+        <style>fa fa-file-archive-o</style>
+        <angular>true</angular>
+    </MENU>
+</ROOT>
diff --git a/modules/sendmail/xml/services.xml b/modules/sendmail/xml/services.xml
index 3e5e103166c8a7bb17e5f37f39868c5c6399132d..6c4456c5735234d1a0d3445be76515c1103ddc8f 100755
--- a/modules/sendmail/xml/services.xml
+++ b/modules/sendmail/xml/services.xml
@@ -30,4 +30,12 @@
 	        <page>mail_form.php</page>
 	    </WHEREAMIUSED>
 	</SERVICE>
-</root>
\ No newline at end of file
+	<SERVICE>
+	   <id>save_numeric_package</id> <!-- if servicetype = menu, this id must be equal to the id of the menu item -->
+	   <name>_SAVE_NUMERIC_PACKAGE</name>
+	   <comment>_SAVE_NUMERIC_PACKAGE</comment>
+	   <servicetype>menu</servicetype>
+	   <system_service>false</system_service>
+	   <enabled>true</enabled>
+	</SERVICE>
+</root>
diff --git a/modules/templates/xml/services.xml b/modules/templates/xml/services.xml
index f10e3c32044a1e3dde2a776cddc47ff5d3abe8e3..9b4078b1262bd82fea6fcef4e89ea7c8cee4dd4b 100755
--- a/modules/templates/xml/services.xml
+++ b/modules/templates/xml/services.xml
@@ -6,7 +6,7 @@
    <comment>_ADMIN_TEMPLATES_DESC</comment>
    <servicepage>index.php?page=templates_management_controler&amp;module=templates</servicepage>
    <servicetype>admin</servicetype>
-   <category>classement</category>
+   <category>production</category>
    <system_service>false</system_service>
    <style>fa fa-file-text-o</style>
    <enabled>true</enabled>
diff --git a/modules/visa/class/class_modules_tools_Abstract.php b/modules/visa/class/class_modules_tools_Abstract.php
index 768dbb870fbe5be0237d66ef4191897bd9b4eb4f..b656fe21af89c7d403aa32b5d416ae96c54fae04 100755
--- a/modules/visa/class/class_modules_tools_Abstract.php
+++ b/modules/visa/class/class_modules_tools_Abstract.php
@@ -1187,7 +1187,7 @@ abstract class visa_Abstract extends Database
                             //$noteShort = $request->cut_string($user_notes[$i]['label'], 50);
                             $noteShort = $request->cut_string(str_replace(array("'", "\r", "\n","\""),array("'", " ", " ", "&quot;"),
                             $user_notes[$i]['label']), 50);
-
+							$noteShort = functions::xssafe($noteShort);
                             $note = $user_notes[$i]['label'];
                             $userArray = $users_tools->get_user($user_notes[$i]['author']);
                             $date = $request->dateformat($user_notes[$i]['date']);
diff --git a/package-lock.json b/package-lock.json
index 1c9beaa31ef38562eb785453048c48fe4a7ee746..6e8700872388d86b32e711eabf855b6ee22d195a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3,10 +3,58 @@
   "requires": true,
   "lockfileVersion": 1,
   "dependencies": {
+    "@angular-devkit/build-optimizer": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.3.2.tgz",
+      "integrity": "sha512-U0BCZtThq5rUfY08shHXpxe8ZhSsiYB/cJjUvAWRTs/ORrs8pbngS6xwseQws8d/vHoVrtqGD9GU9h8AmFRERQ==",
+      "dev": true,
+      "requires": {
+        "loader-utils": "1.1.0",
+        "source-map": "0.5.7",
+        "typescript": "2.6.2",
+        "webpack-sources": "1.1.0"
+      }
+    },
+    "@angular-devkit/core": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-0.3.2.tgz",
+      "integrity": "sha512-zABk/iP7YX5SVbmK4e+IX7j2d0D37MQJQiKgWdV3JzfvVJhNJzddiirtT980pIafoq+KyvTgVwXtc+vnux0oeQ==",
+      "dev": true,
+      "requires": {
+        "ajv": "5.5.2",
+        "chokidar": "1.7.0",
+        "rxjs": "5.5.7",
+        "source-map": "0.5.7"
+      },
+      "dependencies": {
+        "ajv": {
+          "version": "5.5.2",
+          "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
+          "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
+          "dev": true,
+          "requires": {
+            "co": "4.6.0",
+            "fast-deep-equal": "1.1.0",
+            "fast-json-stable-stringify": "2.0.0",
+            "json-schema-traverse": "0.3.1"
+          }
+        }
+      }
+    },
+    "@angular-devkit/schematics": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-0.3.2.tgz",
+      "integrity": "sha512-B6zZoqvHaTJy+vVdA6EtlxnCdGMa5elCa4j9lQLC3JI8DLvMXUWkCIPVbPzJ/GSRR9nsKWpvYMYaJyfBDUqfhw==",
+      "dev": true,
+      "requires": {
+        "@ngtools/json-schema": "1.2.0",
+        "rxjs": "5.5.7"
+      }
+    },
     "@angular/animations": {
-      "version": "5.2.7",
-      "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-5.2.7.tgz",
-      "integrity": "sha512-t/B0z2OYO+yy8SJKB1/evSNPvnLsl+AclhM1p21/NnETxQUqvct1KXeDM7nYDu5hmnGmuavhua8LDo6rN5zS+Q==",
+      "version": "5.2.9",
+      "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-5.2.9.tgz",
+      "integrity": "sha512-H/3fMs4PhYjKoA81II6D0PHifDrqlKet2u/EXzUBq3ehXby+N/0GBzqsBYwPeU5pTye7WPFfW+5sgoJpN8Ye6Q==",
       "dev": true,
       "requires": {
         "tslib": "1.9.0"
@@ -21,58 +69,133 @@
         "tslib": "1.9.0"
       }
     },
+    "@angular/cli": {
+      "version": "1.7.3",
+      "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-1.7.3.tgz",
+      "integrity": "sha512-19sh0SbjneG7/R/FvZBfHsHqfIqyj4LQuXdddJKMCDM97UoHQTjfgrpRvBf3a3lR79wdLXchWJBD9Yc6ifosEA==",
+      "dev": true,
+      "requires": {
+        "@angular-devkit/build-optimizer": "0.3.2",
+        "@angular-devkit/core": "0.3.2",
+        "@angular-devkit/schematics": "0.3.2",
+        "@ngtools/json-schema": "1.2.0",
+        "@ngtools/webpack": "1.10.2",
+        "@schematics/angular": "0.3.2",
+        "@schematics/package-update": "0.3.2",
+        "ajv": "6.2.1",
+        "autoprefixer": "7.2.6",
+        "cache-loader": "1.2.2",
+        "chalk": "2.2.2",
+        "circular-dependency-plugin": "4.4.0",
+        "clean-css": "4.1.11",
+        "common-tags": "1.7.2",
+        "copy-webpack-plugin": "4.4.3",
+        "core-object": "3.1.5",
+        "denodeify": "1.2.1",
+        "ember-cli-string-utils": "1.1.0",
+        "extract-text-webpack-plugin": "3.0.2",
+        "file-loader": "1.1.11",
+        "fs-extra": "4.0.3",
+        "glob": "7.1.2",
+        "html-webpack-plugin": "2.30.1",
+        "istanbul-instrumenter-loader": "3.0.0",
+        "karma-source-map-support": "1.2.0",
+        "less": "2.7.3",
+        "less-loader": "4.1.0",
+        "license-webpack-plugin": "1.3.0",
+        "loader-utils": "1.1.0",
+        "lodash": "4.17.5",
+        "memory-fs": "0.4.1",
+        "minimatch": "3.0.4",
+        "node-modules-path": "1.0.1",
+        "node-sass": "4.8.2",
+        "nopt": "4.0.1",
+        "opn": "5.1.0",
+        "portfinder": "1.0.13",
+        "postcss": "6.0.19",
+        "postcss-import": "11.1.0",
+        "postcss-loader": "2.1.1",
+        "postcss-url": "7.3.1",
+        "raw-loader": "0.5.1",
+        "resolve": "1.5.0",
+        "rxjs": "5.5.7",
+        "sass-loader": "6.0.7",
+        "semver": "5.5.0",
+        "silent-error": "1.1.0",
+        "source-map-support": "0.4.18",
+        "style-loader": "0.19.1",
+        "stylus": "0.54.5",
+        "stylus-loader": "3.0.2",
+        "uglifyjs-webpack-plugin": "1.2.3",
+        "url-loader": "0.6.2",
+        "webpack": "3.11.0",
+        "webpack-dev-middleware": "1.12.2",
+        "webpack-dev-server": "2.11.2",
+        "webpack-merge": "4.1.2",
+        "webpack-sources": "1.1.0",
+        "webpack-subresource-integrity": "1.0.4"
+      }
+    },
     "@angular/common": {
-      "version": "5.2.7",
-      "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.7.tgz",
-      "integrity": "sha512-TqsDMmPX1JlEH2QIneuAVzEO4ubzxLBAdV4XbKWDQKC/UfbWIIpSrSp2cIi85NV1tKkg0WAaodCIZ02NucHIHg==",
+      "version": "5.2.9",
+      "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.9.tgz",
+      "integrity": "sha512-g2hPcI0fnT4TV+Fd+1IohjuqBxPvxwyH9IzTn8PkU9X2M+F6cHCUvHxL1sWI2sF8pYcaHzVjq9WClym10X36Lg==",
       "dev": true,
       "requires": {
         "tslib": "1.9.0"
       }
     },
     "@angular/compiler": {
-      "version": "5.2.7",
-      "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-5.2.7.tgz",
-      "integrity": "sha512-26RG+Dy+M/95OyNNqM+OAruarIPOmbndiaglz2dMrNYzenfbSgG/AoPlL5uCdSqZDiXgnlKnS2K6/ePWXDSKNw==",
+      "version": "5.2.9",
+      "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-5.2.9.tgz",
+      "integrity": "sha512-mN+ofInk8y/tk2TCJZx8RrGdOKdrfunoCair7tfDy4XoQJE90waGfaYWo07hYU+UYwLhrg19m2Czy6rIDciUJA==",
       "dev": true,
       "requires": {
         "tslib": "1.9.0"
       }
     },
     "@angular/compiler-cli": {
-      "version": "5.2.7",
-      "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-5.2.7.tgz",
-      "integrity": "sha512-91gQolzsKyOlmBNW1J7lyu+dXHe/KHbAXU459hn6rycMHuTt60XvxA5O3xy3Pqt28VgbOOSrQfq5eVjZodKjWg==",
+      "version": "5.2.9",
+      "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-5.2.9.tgz",
+      "integrity": "sha512-LAEpL/6PAev3zwTow/43Atzv9AtKLAiLoS285X3EV1f80yQpYAmFRrPUtDlrIZdhZHBBv7CxnyCVpOLU3T8ohw==",
       "dev": true,
       "requires": {
         "chokidar": "1.7.0",
         "minimist": "1.2.0",
         "reflect-metadata": "0.1.12",
         "tsickle": "0.27.2"
+      },
+      "dependencies": {
+        "minimist": {
+          "version": "1.2.0",
+          "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+          "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+          "dev": true
+        }
       }
     },
     "@angular/core": {
-      "version": "5.2.7",
-      "resolved": "https://registry.npmjs.org/@angular/core/-/core-5.2.7.tgz",
-      "integrity": "sha512-DQuL6n7cjBfZmWX5RCV271g6PW9N8b93g2skWnM/zjm+BL9tfHPgvmsjMNB7QEHSxW8VBaaQ6gjj422O01A87g==",
+      "version": "5.2.9",
+      "resolved": "https://registry.npmjs.org/@angular/core/-/core-5.2.9.tgz",
+      "integrity": "sha512-cvHBJGtasrIoARvbLFyHaOsiWKVwMNrrSTZLwrlyHP8oYzkDrE0qKGer6QCqyKt+51hF53cgWEffGzM/u/0wYg==",
       "dev": true,
       "requires": {
         "tslib": "1.9.0"
       }
     },
     "@angular/forms": {
-      "version": "5.2.7",
-      "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-5.2.7.tgz",
-      "integrity": "sha512-43oLKdzMjMV/hOLpSTg8aOggcx+veTnPp/JN+KzMGo2qtbim5nk3fnuscWDeDOdkh8hPRPGarKxeFNEE9ZZSTg==",
+      "version": "5.2.9",
+      "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-5.2.9.tgz",
+      "integrity": "sha512-zyIOiZV/FAm1iVZWTk3Joz6Jt096hbhfDbBUrssmuiTKi9dU6rWG+Z4b88zStqulKe3HFVZkgdixWlminG8nKA==",
       "dev": true,
       "requires": {
         "tslib": "1.9.0"
       }
     },
     "@angular/http": {
-      "version": "5.2.7",
-      "resolved": "https://registry.npmjs.org/@angular/http/-/http-5.2.7.tgz",
-      "integrity": "sha512-048+tCbsNYc9xVvIn5/sOvO4fXVkbB5b1IRYRGiRYXpTz6+JWIm5AwOqZIOeVDgqgZHFf96QllXDcFbdNVDgSA==",
+      "version": "5.2.9",
+      "resolved": "https://registry.npmjs.org/@angular/http/-/http-5.2.9.tgz",
+      "integrity": "sha512-DKjgIk+Dp0Xv1ieG8LawvUnL4dYZp1KroAq5cfKuO9EojP0zM3tUvBtw2vbPLsHYma7g7ZMjOoAbzVxtmTBZqw==",
       "dev": true,
       "requires": {
         "tslib": "1.9.0"
@@ -88,27 +211,27 @@
       }
     },
     "@angular/platform-browser": {
-      "version": "5.2.7",
-      "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.2.7.tgz",
-      "integrity": "sha512-SdLx4F6tOy4/s3y1KZ/Z3YA6fiIrydaO2bry2FJglDxJh24p6TZIob+zC16N2MTuFW819KY5OlacNhc8aj6Yag==",
+      "version": "5.2.9",
+      "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.2.9.tgz",
+      "integrity": "sha512-P6iviRTuLsLRuqtZNOO0fd4cjTo8DWsDCecwntUlI08R3kH5qeqvqarTzlw/4oD+wBzZY6bfb89JyY+n5XbX3Q==",
       "dev": true,
       "requires": {
         "tslib": "1.9.0"
       }
     },
     "@angular/platform-browser-dynamic": {
-      "version": "5.2.7",
-      "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.2.7.tgz",
-      "integrity": "sha512-95Rwf1JcGF/BI48k+VG2moLTVC863jPSjmHaGkz7cA9bi/QrRFGvFghl1qIm4Ezp3dj8CH8TE3TWB+1AmAg3AQ==",
+      "version": "5.2.9",
+      "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.2.9.tgz",
+      "integrity": "sha512-8C3MtyguJKDTT8FcHIRDlBxswcIdpfugOf4S2t94pVedCr4h9w2da/lcfwJKUISw1aKjfA77Sl8TDUhoS8ymmQ==",
       "dev": true,
       "requires": {
         "tslib": "1.9.0"
       }
     },
     "@angular/platform-server": {
-      "version": "5.2.7",
-      "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-5.2.7.tgz",
-      "integrity": "sha512-5+pj+YYfJ7ZGVEtP2oTVqWErObWRVeY32AxVIs3pE3WuqKPjwnKzd+HY+YeD8D+LDJZ5DdphtYBp26NFrnw0xA==",
+      "version": "5.2.9",
+      "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-5.2.9.tgz",
+      "integrity": "sha512-BXal5+cltR0Qo8xuum5SHkDYaChBrf1ygJUU58nGVn7SptweI9z3B6woRAJxfij8aobf5uDEL9jaAygxUfQECg==",
       "dev": true,
       "requires": {
         "domino": "1.0.30",
@@ -117,29 +240,54 @@
       }
     },
     "@angular/router": {
-      "version": "5.2.7",
-      "resolved": "https://registry.npmjs.org/@angular/router/-/router-5.2.7.tgz",
-      "integrity": "sha512-ppl0X7EfEgKYXIEPtdy8cOKj5KXuwCQ5Ila+IuGnSjKIRXt/olhBLJMprVl1VJgoxXj7z2i14U7kKaqSvGtpXw==",
+      "version": "5.2.9",
+      "resolved": "https://registry.npmjs.org/@angular/router/-/router-5.2.9.tgz",
+      "integrity": "sha512-NtDbFK0EA1rfFc+5Dqd5mIv8E1Wcc5rDUnSty4cX2V+HxTEZvQ9DRdpO2Q0abWU5siXyqponuPHJzF08OVGyNA==",
       "dev": true,
       "requires": {
         "tslib": "1.9.0"
       }
     },
-    "@browserify/acorn5-object-spread": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmjs.org/@browserify/acorn5-object-spread/-/acorn5-object-spread-5.0.1.tgz",
-      "integrity": "sha512-sFCUPzgeEjdq3rinwy4TFXtak2YZdhqpj6MdNusxkdTFr9TXAUEYK4YQSamR8Joqt/yii1drgl5hk8q/AtJDKA==",
+    "@ngtools/json-schema": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/@ngtools/json-schema/-/json-schema-1.2.0.tgz",
+      "integrity": "sha512-pMh+HDc6mOjUO3agRfB1tInimo7hf67u+0Cska2bfXFe6oU7rSMnr5PLVtiZVgwMoBHpx/6XjBymvcnWPo2Uzg==",
+      "dev": true
+    },
+    "@ngtools/webpack": {
+      "version": "1.10.2",
+      "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-1.10.2.tgz",
+      "integrity": "sha512-3u2zg2rarG3qNLSukBClGADWuq/iNn5SQtlSeAbfKzwBeyLGbF0gN1z1tVx1Bcr8YwFzR6NdRePQmJGcoqq1fg==",
       "dev": true,
       "requires": {
-        "acorn": "5.3.0"
-      },
-      "dependencies": {
-        "acorn": {
-          "version": "5.3.0",
-          "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.3.0.tgz",
-          "integrity": "sha512-Yej+zOJ1Dm/IMZzzj78OntP/r3zHEaKcyNoU2lAaxPtrseM6rF0xwqoz5Q5ysAiED9hTjI2hgtvLXitlCN1/Ug==",
-          "dev": true
-        }
+        "chalk": "2.2.2",
+        "enhanced-resolve": "3.4.1",
+        "loader-utils": "1.1.0",
+        "magic-string": "0.22.4",
+        "semver": "5.5.0",
+        "source-map": "0.5.7",
+        "tree-kill": "1.2.0",
+        "webpack-sources": "1.1.0"
+      }
+    },
+    "@schematics/angular": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-0.3.2.tgz",
+      "integrity": "sha512-Elrk0BA951s0ScFZU0AWrpUeJBYVR52DZ1QTIO5R0AhwEd1PW4olI8szPLGQlVW5Sd6H0FA/fyFLIvn2r9v6Rw==",
+      "dev": true,
+      "requires": {
+        "typescript": "2.6.2"
+      }
+    },
+    "@schematics/package-update": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/@schematics/package-update/-/package-update-0.3.2.tgz",
+      "integrity": "sha512-7aVP4994Hu8vRdTTohXkfGWEwLhrdNP3EZnWyBootm5zshWqlQojUGweZe5zwewsKcixeVOiy2YtW+aI4aGSLA==",
+      "dev": true,
+      "requires": {
+        "rxjs": "5.5.7",
+        "semver": "5.5.0",
+        "semver-intersect": "1.3.1"
       }
     },
     "@types/datatables.net": {
@@ -158,33 +306,78 @@
       "dev": true
     },
     "@types/node": {
-      "version": "7.0.55",
-      "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.55.tgz",
-      "integrity": "sha512-diCxfWNT4g2UM9Y+BPgy4s3egcZ2qOXc0mXLauvbsBUq9SBKQfh0SmuEUEhJVFZt/p6UDsjg1s2EgfM6OSlp4g==",
+      "version": "7.0.56",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.56.tgz",
+      "integrity": "sha512-NgjN3xPyqbAXSIpznNAR5Cisx5uKqJWxcS9kefzSFEX/9J7O01/FHyfnvPI7SztBf9p6c8mqOn3olZWJx3ja6g==",
       "dev": true
     },
-    "JSONStream": {
-      "version": "1.3.2",
-      "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz",
-      "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=",
-      "dev": true,
-      "requires": {
-        "jsonparse": "1.3.1",
-        "through": "2.3.8"
-      }
-    },
     "abbrev": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
       "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
       "dev": true
     },
+    "accepts": {
+      "version": "1.3.5",
+      "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
+      "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
+      "dev": true,
+      "requires": {
+        "mime-types": "2.1.18",
+        "negotiator": "0.6.1"
+      }
+    },
     "acorn": {
-      "version": "4.0.13",
-      "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
-      "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=",
+      "version": "5.5.3",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz",
+      "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==",
+      "dev": true
+    },
+    "acorn-dynamic-import": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz",
+      "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=",
+      "dev": true,
+      "requires": {
+        "acorn": "4.0.13"
+      },
+      "dependencies": {
+        "acorn": {
+          "version": "4.0.13",
+          "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
+          "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=",
+          "dev": true
+        }
+      }
+    },
+    "ajv": {
+      "version": "6.2.1",
+      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.1.tgz",
+      "integrity": "sha1-KKarxJOiq+D7TIUHrK7bQ/pVBnE=",
+      "dev": true,
+      "requires": {
+        "fast-deep-equal": "1.1.0",
+        "fast-json-stable-stringify": "2.0.0",
+        "json-schema-traverse": "0.3.1"
+      }
+    },
+    "ajv-keywords": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.1.0.tgz",
+      "integrity": "sha1-rCsnk5xUPpXSwG5/f1wnvkqlQ74=",
       "dev": true
     },
+    "align-text": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
+      "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
+      "dev": true,
+      "requires": {
+        "kind-of": "3.2.2",
+        "longest": "1.0.1",
+        "repeat-string": "1.6.1"
+      }
+    },
     "amdefine": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
@@ -233,6 +426,12 @@
         }
       }
     },
+    "ansi-html": {
+      "version": "0.0.7",
+      "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz",
+      "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=",
+      "dev": true
+    },
     "ansi-regex": {
       "version": "2.1.1",
       "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
@@ -240,10 +439,13 @@
       "dev": true
     },
     "ansi-styles": {
-      "version": "2.2.1",
-      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
-      "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
-      "dev": true
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+      "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+      "dev": true,
+      "requires": {
+        "color-convert": "1.9.1"
+      }
     },
     "anymatch": {
       "version": "1.3.2",
@@ -268,7 +470,16 @@
       "dev": true,
       "requires": {
         "delegates": "1.0.0",
-        "readable-stream": "2.3.3"
+        "readable-stream": "2.3.5"
+      }
+    },
+    "argparse": {
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+      "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+      "dev": true,
+      "requires": {
+        "sprintf-js": "1.0.3"
       }
     },
     "arr-diff": {
@@ -292,28 +503,41 @@
       "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
       "dev": true
     },
-    "array-filter": {
-      "version": "0.0.1",
-      "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz",
-      "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=",
-      "dev": true
-    },
     "array-find-index": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
       "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
       "dev": true
     },
-    "array-map": {
-      "version": "0.0.0",
-      "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz",
-      "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=",
+    "array-flatten": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz",
+      "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=",
       "dev": true
     },
-    "array-reduce": {
-      "version": "0.0.0",
-      "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz",
-      "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=",
+    "array-includes": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz",
+      "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=",
+      "dev": true,
+      "requires": {
+        "define-properties": "1.1.2",
+        "es-abstract": "1.10.0"
+      }
+    },
+    "array-union": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
+      "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
+      "dev": true,
+      "requires": {
+        "array-uniq": "1.0.3"
+      }
+    },
+    "array-uniq": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
+      "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
       "dev": true
     },
     "array-unique": {
@@ -322,6 +546,19 @@
       "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
       "dev": true
     },
+    "arrify": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
+      "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
+      "dev": true
+    },
+    "asap": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
+      "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=",
+      "dev": true,
+      "optional": true
+    },
     "asn1": {
       "version": "0.2.3",
       "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
@@ -329,9 +566,9 @@
       "dev": true
     },
     "asn1.js": {
-      "version": "4.9.2",
-      "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.2.tgz",
-      "integrity": "sha512-b/OsSjvWEo8Pi8H0zsDd2P6Uqo2TK2pH8gNLSJtNLM2Db0v2QaAZ0pBQJXVjAn4gBuugeVDr7s63ZogpUIwWDg==",
+      "version": "4.10.1",
+      "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz",
+      "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==",
       "dev": true,
       "requires": {
         "bn.js": "4.11.8",
@@ -360,13 +597,13 @@
       "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
       "dev": true
     },
-    "astw": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz",
-      "integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=",
+    "async": {
+      "version": "2.6.0",
+      "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz",
+      "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==",
       "dev": true,
       "requires": {
-        "acorn": "4.0.13"
+        "lodash": "4.17.5"
       }
     },
     "async-each": {
@@ -393,6 +630,20 @@
       "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=",
       "dev": true
     },
+    "autoprefixer": {
+      "version": "7.2.6",
+      "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-7.2.6.tgz",
+      "integrity": "sha512-Iq8TRIB+/9eQ8rbGhcP7ct5cYb/3qjNYAR2SnzLCEcwF6rvVOax8+9+fccgXk4bEhQGjOZd5TLhsksmAdsbGqQ==",
+      "dev": true,
+      "requires": {
+        "browserslist": "2.11.3",
+        "caniuse-lite": "1.0.30000813",
+        "normalize-range": "0.1.2",
+        "num2fraction": "1.2.2",
+        "postcss": "6.0.19",
+        "postcss-value-parser": "3.3.0"
+      }
+    },
     "aws-sign2": {
       "version": "0.6.0",
       "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
@@ -405,6 +656,127 @@
       "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=",
       "dev": true
     },
+    "babel-code-frame": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
+      "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
+      "dev": true,
+      "requires": {
+        "chalk": "1.1.3",
+        "esutils": "2.0.2",
+        "js-tokens": "3.0.2"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "2.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+          "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+          "dev": true
+        },
+        "chalk": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+          "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "2.2.1",
+            "escape-string-regexp": "1.0.5",
+            "has-ansi": "2.0.0",
+            "strip-ansi": "3.0.1",
+            "supports-color": "2.0.0"
+          }
+        },
+        "supports-color": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+          "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+          "dev": true
+        }
+      }
+    },
+    "babel-generator": {
+      "version": "6.26.1",
+      "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz",
+      "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==",
+      "dev": true,
+      "requires": {
+        "babel-messages": "6.23.0",
+        "babel-runtime": "6.26.0",
+        "babel-types": "6.26.0",
+        "detect-indent": "4.0.0",
+        "jsesc": "1.3.0",
+        "lodash": "4.17.5",
+        "source-map": "0.5.7",
+        "trim-right": "1.0.1"
+      }
+    },
+    "babel-messages": {
+      "version": "6.23.0",
+      "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
+      "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
+      "dev": true,
+      "requires": {
+        "babel-runtime": "6.26.0"
+      }
+    },
+    "babel-runtime": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
+      "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
+      "dev": true,
+      "requires": {
+        "core-js": "2.5.3",
+        "regenerator-runtime": "0.11.1"
+      }
+    },
+    "babel-template": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
+      "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
+      "dev": true,
+      "requires": {
+        "babel-runtime": "6.26.0",
+        "babel-traverse": "6.26.0",
+        "babel-types": "6.26.0",
+        "babylon": "6.18.0",
+        "lodash": "4.17.5"
+      }
+    },
+    "babel-traverse": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
+      "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
+      "dev": true,
+      "requires": {
+        "babel-code-frame": "6.26.0",
+        "babel-messages": "6.23.0",
+        "babel-runtime": "6.26.0",
+        "babel-types": "6.26.0",
+        "babylon": "6.18.0",
+        "debug": "2.6.9",
+        "globals": "9.18.0",
+        "invariant": "2.2.3",
+        "lodash": "4.17.5"
+      }
+    },
+    "babel-types": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
+      "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
+      "dev": true,
+      "requires": {
+        "babel-runtime": "6.26.0",
+        "esutils": "2.0.2",
+        "lodash": "4.17.5",
+        "to-fast-properties": "1.0.3"
+      }
+    },
+    "babylon": {
+      "version": "6.18.0",
+      "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
+      "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
+      "dev": true
+    },
     "balanced-match": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
@@ -444,9 +816,15 @@
       }
     },
     "base64-js": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz",
-      "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==",
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.3.tgz",
+      "integrity": "sha512-MsAhsUW1GxCdgYSO6tAfZrNapmUKk7mWx/k5mFY/A1gBtkaCaNapTg+FExCw1r9yeaZhqx/xPg43xgTFH6KL5w==",
+      "dev": true
+    },
+    "batch": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz",
+      "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=",
       "dev": true
     },
     "bcrypt-pbkdf": {
@@ -459,6 +837,12 @@
         "tweetnacl": "0.14.5"
       }
     },
+    "big.js": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz",
+      "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==",
+      "dev": true
+    },
     "binary-extensions": {
       "version": "1.11.0",
       "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz",
@@ -474,12 +858,64 @@
         "inherits": "2.0.3"
       }
     },
+    "bluebird": {
+      "version": "3.5.1",
+      "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
+      "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==",
+      "dev": true
+    },
     "bn.js": {
       "version": "4.11.8",
       "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
       "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==",
       "dev": true
     },
+    "body-parser": {
+      "version": "1.18.2",
+      "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz",
+      "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=",
+      "dev": true,
+      "requires": {
+        "bytes": "3.0.0",
+        "content-type": "1.0.4",
+        "debug": "2.6.9",
+        "depd": "1.1.2",
+        "http-errors": "1.6.2",
+        "iconv-lite": "0.4.19",
+        "on-finished": "2.3.0",
+        "qs": "6.5.1",
+        "raw-body": "2.3.2",
+        "type-is": "1.6.16"
+      },
+      "dependencies": {
+        "qs": {
+          "version": "6.5.1",
+          "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
+          "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==",
+          "dev": true
+        }
+      }
+    },
+    "bonjour": {
+      "version": "3.5.0",
+      "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz",
+      "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=",
+      "dev": true,
+      "requires": {
+        "array-flatten": "2.1.1",
+        "deep-equal": "1.0.1",
+        "dns-equal": "1.0.0",
+        "dns-txt": "2.0.2",
+        "multicast-dns": "6.2.3",
+        "multicast-dns-service-types": "1.1.0"
+      }
+    },
+    "boolbase": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
+      "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
+      "dev": true
+    },
     "boom": {
       "version": "2.10.1",
       "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
@@ -502,7 +938,7 @@
       "requires": {
         "ansi-align": "2.0.0",
         "camelcase": "4.1.0",
-        "chalk": "2.3.1",
+        "chalk": "2.2.2",
         "cli-boxes": "1.0.0",
         "string-width": "2.1.1",
         "term-size": "1.2.0",
@@ -515,32 +951,12 @@
           "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
           "dev": true
         },
-        "ansi-styles": {
-          "version": "3.2.0",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz",
-          "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==",
-          "dev": true,
-          "requires": {
-            "color-convert": "1.9.1"
-          }
-        },
         "camelcase": {
           "version": "4.1.0",
           "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
           "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
           "dev": true
         },
-        "chalk": {
-          "version": "2.3.1",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz",
-          "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "3.2.0",
-            "escape-string-regexp": "1.0.5",
-            "supports-color": "5.2.0"
-          }
-        },
         "is-fullwidth-code-point": {
           "version": "2.0.0",
           "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
@@ -565,22 +981,13 @@
           "requires": {
             "ansi-regex": "3.0.0"
           }
-        },
-        "supports-color": {
-          "version": "5.2.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz",
-          "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==",
-          "dev": true,
-          "requires": {
-            "has-flag": "3.0.0"
-          }
         }
       }
     },
     "brace-expansion": {
-      "version": "1.1.8",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
-      "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
       "dev": true,
       "requires": {
         "balanced-match": "1.0.0",
@@ -604,111 +1011,24 @@
       "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
       "dev": true
     },
-    "browser-pack": {
-      "version": "6.0.3",
-      "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.3.tgz",
-      "integrity": "sha512-Jo+RYsn8X8OhyP9tMXXg0ueR2fW696HUu1Hf3/DeiwNean1oGiPtdgGRNuUHBpPHzBH3x4n1kzAlgOgHSIq88g==",
+    "browserify-aes": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz",
+      "integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==",
       "dev": true,
       "requires": {
-        "JSONStream": "1.3.2",
-        "combine-source-map": "0.8.0",
-        "defined": "1.0.0",
-        "safe-buffer": "5.1.1",
-        "through2": "2.0.3",
-        "umd": "3.0.1"
+        "buffer-xor": "1.0.3",
+        "cipher-base": "1.0.4",
+        "create-hash": "1.1.3",
+        "evp_bytestokey": "1.0.3",
+        "inherits": "2.0.3",
+        "safe-buffer": "5.1.1"
       }
     },
-    "browser-resolve": {
-      "version": "1.11.2",
-      "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz",
-      "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=",
-      "dev": true,
-      "requires": {
-        "resolve": "1.1.7"
-      },
-      "dependencies": {
-        "resolve": {
-          "version": "1.1.7",
-          "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
-          "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
-          "dev": true
-        }
-      }
-    },
-    "browserify": {
-      "version": "15.2.0",
-      "resolved": "https://registry.npmjs.org/browserify/-/browserify-15.2.0.tgz",
-      "integrity": "sha512-IHYyFPm2XjJCL+VV0ZtFv8wn/sAHVOm83q3yfSn8YWbZ9jcybgPKxSDdiuMU+35jUL1914l74RnXXPD9Iyo9yg==",
-      "dev": true,
-      "requires": {
-        "JSONStream": "1.3.2",
-        "assert": "1.4.1",
-        "browser-pack": "6.0.3",
-        "browser-resolve": "1.11.2",
-        "browserify-zlib": "0.2.0",
-        "buffer": "5.0.8",
-        "cached-path-relative": "1.0.1",
-        "concat-stream": "1.5.2",
-        "console-browserify": "1.1.0",
-        "constants-browserify": "1.0.0",
-        "crypto-browserify": "3.12.0",
-        "defined": "1.0.0",
-        "deps-sort": "2.0.0",
-        "domain-browser": "1.1.7",
-        "duplexer2": "0.1.4",
-        "events": "1.1.1",
-        "glob": "7.1.2",
-        "has": "1.0.1",
-        "htmlescape": "1.1.1",
-        "https-browserify": "1.0.0",
-        "inherits": "2.0.3",
-        "insert-module-globals": "7.0.1",
-        "labeled-stream-splicer": "2.0.0",
-        "mkdirp": "0.5.1",
-        "module-deps": "5.0.1",
-        "os-browserify": "0.3.0",
-        "parents": "1.0.1",
-        "path-browserify": "0.0.0",
-        "process": "0.11.10",
-        "punycode": "1.4.1",
-        "querystring-es3": "0.2.1",
-        "read-only-stream": "2.0.0",
-        "readable-stream": "2.3.3",
-        "resolve": "1.5.0",
-        "shasum": "1.0.2",
-        "shell-quote": "1.6.1",
-        "stream-browserify": "2.0.1",
-        "stream-http": "2.8.0",
-        "string_decoder": "1.0.3",
-        "subarg": "1.0.0",
-        "syntax-error": "1.3.0",
-        "through2": "2.0.3",
-        "timers-browserify": "1.4.2",
-        "tty-browserify": "0.0.0",
-        "url": "0.11.0",
-        "util": "0.10.3",
-        "vm-browserify": "0.0.4",
-        "xtend": "4.0.1"
-      }
-    },
-    "browserify-aes": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz",
-      "integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==",
-      "dev": true,
-      "requires": {
-        "buffer-xor": "1.0.3",
-        "cipher-base": "1.0.4",
-        "create-hash": "1.1.3",
-        "evp_bytestokey": "1.0.3",
-        "inherits": "2.0.3",
-        "safe-buffer": "5.1.1"
-      }
-    },
-    "browserify-cipher": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz",
-      "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=",
+    "browserify-cipher": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz",
+      "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=",
       "dev": true,
       "requires": {
         "browserify-aes": "1.1.1",
@@ -761,16 +1081,33 @@
         "pako": "1.0.6"
       }
     },
+    "browserslist": {
+      "version": "2.11.3",
+      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz",
+      "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==",
+      "dev": true,
+      "requires": {
+        "caniuse-lite": "1.0.30000813",
+        "electron-to-chromium": "1.3.37"
+      }
+    },
     "buffer": {
-      "version": "5.0.8",
-      "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.0.8.tgz",
-      "integrity": "sha512-xXvjQhVNz50v2nPeoOsNqWCLGfiv4ji/gXZM28jnVwdLJxH4mFyqgqCKfaK9zf1KUbG6zTkjLOy7ou+jSMarGA==",
+      "version": "4.9.1",
+      "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
+      "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=",
       "dev": true,
       "requires": {
-        "base64-js": "1.2.1",
-        "ieee754": "1.1.8"
+        "base64-js": "1.2.3",
+        "ieee754": "1.1.8",
+        "isarray": "1.0.0"
       }
     },
+    "buffer-indexof": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz",
+      "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==",
+      "dev": true
+    },
     "buffer-xor": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
@@ -789,6 +1126,33 @@
       "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=",
       "dev": true
     },
+    "bytes": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+      "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=",
+      "dev": true
+    },
+    "cacache": {
+      "version": "10.0.4",
+      "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz",
+      "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==",
+      "dev": true,
+      "requires": {
+        "bluebird": "3.5.1",
+        "chownr": "1.0.1",
+        "glob": "7.1.2",
+        "graceful-fs": "4.1.11",
+        "lru-cache": "4.1.2",
+        "mississippi": "2.0.0",
+        "mkdirp": "0.5.1",
+        "move-concurrently": "1.0.1",
+        "promise-inflight": "1.0.1",
+        "rimraf": "2.6.2",
+        "ssri": "5.2.4",
+        "unique-filename": "1.1.0",
+        "y18n": "4.0.0"
+      }
+    },
     "cache-base": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
@@ -814,11 +1178,27 @@
         }
       }
     },
-    "cached-path-relative": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz",
-      "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=",
-      "dev": true
+    "cache-loader": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-1.2.2.tgz",
+      "integrity": "sha512-rsGh4SIYyB9glU+d0OcHwiXHXBoUgDhHZaQ1KAbiXqfz1CDPxtTboh1gPbJ0q2qdO8a9lfcjgC5CJ2Ms32y5bw==",
+      "dev": true,
+      "requires": {
+        "loader-utils": "1.1.0",
+        "mkdirp": "0.5.1",
+        "neo-async": "2.5.0",
+        "schema-utils": "0.4.5"
+      }
+    },
+    "camel-case": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz",
+      "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=",
+      "dev": true,
+      "requires": {
+        "no-case": "2.3.2",
+        "upper-case": "1.1.3"
+      }
     },
     "camelcase": {
       "version": "2.1.1",
@@ -836,6 +1216,12 @@
         "map-obj": "1.0.1"
       }
     },
+    "caniuse-lite": {
+      "version": "1.0.30000813",
+      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000813.tgz",
+      "integrity": "sha512-A8ITSmH5SFdMFdC704ggjg+x2z5PzQmVlG8tavwnfvbC33Q1UYrj0+G+Xm0SNAnd4He36fwUE/KEWytOEchw+A==",
+      "dev": true
+    },
     "capture-stack-trace": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz",
@@ -843,22 +1229,30 @@
       "dev": true
     },
     "caseless": {
-      "version": "0.11.0",
-      "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz",
-      "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=",
+      "version": "0.12.0",
+      "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
+      "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
       "dev": true
     },
+    "center-align": {
+      "version": "0.1.3",
+      "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
+      "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
+      "dev": true,
+      "requires": {
+        "align-text": "0.1.4",
+        "lazy-cache": "1.0.4"
+      }
+    },
     "chalk": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
-      "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+      "version": "2.2.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.2.tgz",
+      "integrity": "sha512-LvixLAQ4MYhbf7hgL4o5PeK32gJKvVzDRiSNIApDofQvyhl8adgG2lJVXn4+ekQoK7HL9RF8lqxwerpe0x2pCw==",
       "dev": true,
       "requires": {
-        "ansi-styles": "2.2.1",
+        "ansi-styles": "3.2.1",
         "escape-string-regexp": "1.0.5",
-        "has-ansi": "2.0.0",
-        "strip-ansi": "3.0.1",
-        "supports-color": "2.0.0"
+        "supports-color": "4.5.0"
       }
     },
     "chart.js": {
@@ -883,6 +1277,12 @@
         "readdirp": "2.1.0"
       }
     },
+    "chownr": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz",
+      "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=",
+      "dev": true
+    },
     "cipher-base": {
       "version": "1.0.4",
       "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
@@ -893,6 +1293,12 @@
         "safe-buffer": "5.1.1"
       }
     },
+    "circular-dependency-plugin": {
+      "version": "4.4.0",
+      "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-4.4.0.tgz",
+      "integrity": "sha512-yEFtUNUYT4jBykEX5ZOHw+5goA3glGZr9wAXIQqoyakjz5H5TeUmScnWRc52douAhb9eYzK3s7V6bXfNnjFdzg==",
+      "dev": true
+    },
     "class-utils": {
       "version": "0.3.6",
       "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
@@ -929,7 +1335,7 @@
               "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
               "dev": true,
               "requires": {
-                "is-buffer": "1.1.5"
+                "is-buffer": "1.1.6"
               }
             }
           }
@@ -949,7 +1355,7 @@
               "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
               "dev": true,
               "requires": {
-                "is-buffer": "1.1.5"
+                "is-buffer": "1.1.6"
               }
             }
           }
@@ -979,6 +1385,15 @@
         }
       }
     },
+    "clean-css": {
+      "version": "4.1.11",
+      "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz",
+      "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=",
+      "dev": true,
+      "requires": {
+        "source-map": "0.5.7"
+      }
+    },
     "cli-boxes": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz",
@@ -996,6 +1411,47 @@
         "wrap-ansi": "2.1.0"
       }
     },
+    "clone": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz",
+      "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=",
+      "dev": true
+    },
+    "clone-deep": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz",
+      "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==",
+      "dev": true,
+      "requires": {
+        "for-own": "1.0.0",
+        "is-plain-object": "2.0.4",
+        "kind-of": "6.0.2",
+        "shallow-clone": "1.0.0"
+      },
+      "dependencies": {
+        "for-own": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
+          "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
+          "dev": true,
+          "requires": {
+            "for-in": "1.0.2"
+          }
+        },
+        "kind-of": {
+          "version": "6.0.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+          "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+          "dev": true
+        }
+      }
+    },
+    "co": {
+      "version": "4.6.0",
+      "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
+      "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
+      "dev": true
+    },
     "code-point-at": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
@@ -1027,18 +1483,6 @@
       "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
       "dev": true
     },
-    "combine-source-map": {
-      "version": "0.8.0",
-      "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz",
-      "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=",
-      "dev": true,
-      "requires": {
-        "convert-source-map": "1.1.3",
-        "inline-source-map": "0.6.2",
-        "lodash.memoize": "3.0.4",
-        "source-map": "0.5.7"
-      }
-    },
     "combined-stream": {
       "version": "1.0.6",
       "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
@@ -1054,12 +1498,51 @@
       "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==",
       "dev": true
     },
+    "common-tags": {
+      "version": "1.7.2",
+      "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.7.2.tgz",
+      "integrity": "sha512-joj9ZlUOjCrwdbmiLqafeUSgkUM74NqhLsZtSqDmhKudaIY197zTrb8JMl31fMnCUuxwFT23eC/oWvrZzDLRJQ==",
+      "dev": true,
+      "requires": {
+        "babel-runtime": "6.26.0"
+      }
+    },
+    "commondir": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+      "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
+      "dev": true
+    },
     "component-emitter": {
       "version": "1.2.1",
       "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
       "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=",
       "dev": true
     },
+    "compressible": {
+      "version": "2.0.13",
+      "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.13.tgz",
+      "integrity": "sha1-DRAgq5JLL9tNYnmHXH1tq6a6p6k=",
+      "dev": true,
+      "requires": {
+        "mime-db": "1.33.0"
+      }
+    },
+    "compression": {
+      "version": "1.7.2",
+      "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.2.tgz",
+      "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=",
+      "dev": true,
+      "requires": {
+        "accepts": "1.3.5",
+        "bytes": "3.0.0",
+        "compressible": "2.0.13",
+        "debug": "2.6.9",
+        "on-headers": "1.0.1",
+        "safe-buffer": "5.1.1",
+        "vary": "1.1.2"
+      }
+    },
     "concat-map": {
       "version": "0.0.1",
       "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@@ -1067,36 +1550,14 @@
       "dev": true
     },
     "concat-stream": {
-      "version": "1.5.2",
-      "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz",
-      "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=",
+      "version": "1.6.1",
+      "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz",
+      "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==",
       "dev": true,
       "requires": {
         "inherits": "2.0.3",
-        "readable-stream": "2.0.6",
+        "readable-stream": "2.3.5",
         "typedarray": "0.0.6"
-      },
-      "dependencies": {
-        "readable-stream": {
-          "version": "2.0.6",
-          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
-          "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",
-          "dev": true,
-          "requires": {
-            "core-util-is": "1.0.2",
-            "inherits": "2.0.3",
-            "isarray": "1.0.0",
-            "process-nextick-args": "1.0.7",
-            "string_decoder": "0.10.31",
-            "util-deprecate": "1.0.2"
-          }
-        },
-        "string_decoder": {
-          "version": "0.10.31",
-          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
-          "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
-          "dev": true
-        }
       }
     },
     "configstore": {
@@ -1113,6 +1574,12 @@
         "xdg-basedir": "3.0.0"
       }
     },
+    "connect-history-api-fallback": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz",
+      "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=",
+      "dev": true
+    },
     "console-browserify": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
@@ -1134,29 +1601,132 @@
       "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
       "dev": true
     },
+    "content-disposition": {
+      "version": "0.5.2",
+      "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
+      "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=",
+      "dev": true
+    },
+    "content-type": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
+      "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
+      "dev": true
+    },
     "convert-source-map": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz",
-      "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=",
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz",
+      "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=",
+      "dev": true
+    },
+    "cookie": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
+      "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=",
+      "dev": true
+    },
+    "cookie-signature": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+      "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=",
       "dev": true
     },
+    "copy-concurrently": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz",
+      "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==",
+      "dev": true,
+      "requires": {
+        "aproba": "1.2.0",
+        "fs-write-stream-atomic": "1.0.10",
+        "iferr": "0.1.5",
+        "mkdirp": "0.5.1",
+        "rimraf": "2.6.2",
+        "run-queue": "1.0.3"
+      }
+    },
     "copy-descriptor": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
       "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
       "dev": true
     },
+    "copy-webpack-plugin": {
+      "version": "4.4.3",
+      "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.4.3.tgz",
+      "integrity": "sha512-v4THQ24Tks2NkyOvZuFDgZVfDD9YaA9rwYLZTrWg2GHIA8lrH5DboEyeoorh5Skki+PUbgSmnsCwhMWqYrQZrA==",
+      "dev": true,
+      "requires": {
+        "cacache": "10.0.4",
+        "find-cache-dir": "1.0.0",
+        "globby": "7.1.1",
+        "is-glob": "4.0.0",
+        "loader-utils": "1.1.0",
+        "minimatch": "3.0.4",
+        "p-limit": "1.2.0",
+        "serialize-javascript": "1.4.0"
+      },
+      "dependencies": {
+        "is-extglob": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+          "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+          "dev": true
+        },
+        "is-glob": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
+          "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
+          "dev": true,
+          "requires": {
+            "is-extglob": "2.1.1"
+          }
+        }
+      }
+    },
     "core-js": {
       "version": "2.5.3",
       "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz",
       "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4="
     },
+    "core-object": {
+      "version": "3.1.5",
+      "resolved": "https://registry.npmjs.org/core-object/-/core-object-3.1.5.tgz",
+      "integrity": "sha512-sA2/4+/PZ/KV6CKgjrVrrUVBKCkdDO02CUlQ0YKTQoYUwPYNOtOAcWlbYhd5v/1JqYaA6oZ4sDlOU4ppVw6Wbg==",
+      "dev": true,
+      "requires": {
+        "chalk": "2.2.2"
+      }
+    },
     "core-util-is": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
       "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
       "dev": true
     },
+    "cosmiconfig": {
+      "version": "2.2.2",
+      "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz",
+      "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==",
+      "dev": true,
+      "requires": {
+        "is-directory": "0.3.1",
+        "js-yaml": "3.11.0",
+        "minimist": "1.2.0",
+        "object-assign": "4.1.1",
+        "os-homedir": "1.0.2",
+        "parse-json": "2.2.0",
+        "require-from-string": "1.2.1"
+      },
+      "dependencies": {
+        "minimist": {
+          "version": "1.2.0",
+          "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+          "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+          "dev": true
+        }
+      }
+    },
     "create-ecdh": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz",
@@ -1185,7 +1755,7 @@
         "cipher-base": "1.0.4",
         "inherits": "2.0.3",
         "ripemd160": "2.0.1",
-        "sha.js": "2.4.9"
+        "sha.js": "2.4.10"
       }
     },
     "create-hmac": {
@@ -1199,7 +1769,7 @@
         "inherits": "2.0.3",
         "ripemd160": "2.0.1",
         "safe-buffer": "5.1.1",
-        "sha.js": "2.4.9"
+        "sha.js": "2.4.10"
       }
     },
     "cross-spawn": {
@@ -1208,7 +1778,7 @@
       "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=",
       "dev": true,
       "requires": {
-        "lru-cache": "4.1.1",
+        "lru-cache": "4.1.2",
         "which": "1.3.0"
       }
     },
@@ -1237,7 +1807,7 @@
         "pbkdf2": "3.0.14",
         "public-encrypt": "4.0.0",
         "randombytes": "2.0.6",
-        "randomfill": "1.0.3"
+        "randomfill": "1.0.4"
       }
     },
     "crypto-random-string": {
@@ -1246,6 +1816,36 @@
       "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=",
       "dev": true
     },
+    "css-parse": {
+      "version": "1.7.0",
+      "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz",
+      "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=",
+      "dev": true
+    },
+    "css-select": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
+      "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=",
+      "dev": true,
+      "requires": {
+        "boolbase": "1.0.0",
+        "css-what": "2.1.0",
+        "domutils": "1.5.1",
+        "nth-check": "1.0.1"
+      }
+    },
+    "css-what": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz",
+      "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=",
+      "dev": true
+    },
+    "cuint": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz",
+      "integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=",
+      "dev": true
+    },
     "currently-unhandled": {
       "version": "0.4.1",
       "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
@@ -1255,6 +1855,21 @@
         "array-find-index": "1.0.2"
       }
     },
+    "cyclist": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz",
+      "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=",
+      "dev": true
+    },
+    "d": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
+      "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
+      "dev": true,
+      "requires": {
+        "es5-ext": "0.10.40"
+      }
+    },
     "dashdash": {
       "version": "1.14.1",
       "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
@@ -1287,9 +1902,9 @@
       "dev": true
     },
     "debug": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
-      "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+      "version": "2.6.9",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+      "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
       "dev": true,
       "requires": {
         "ms": "2.0.0"
@@ -1307,12 +1922,28 @@
       "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
       "dev": true
     },
-    "deep-extend": {
-      "version": "0.4.2",
+    "deep-equal": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
+      "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=",
+      "dev": true
+    },
+    "deep-extend": {
+      "version": "0.4.2",
       "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz",
       "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=",
       "dev": true
     },
+    "define-properties": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz",
+      "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=",
+      "dev": true,
+      "requires": {
+        "foreach": "2.0.5",
+        "object-keys": "1.0.11"
+      }
+    },
     "define-property": {
       "version": "2.0.2",
       "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
@@ -1331,11 +1962,42 @@
         }
       }
     },
-    "defined": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
-      "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=",
-      "dev": true
+    "del": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz",
+      "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=",
+      "dev": true,
+      "requires": {
+        "globby": "6.1.0",
+        "is-path-cwd": "1.0.0",
+        "is-path-in-cwd": "1.0.0",
+        "p-map": "1.2.0",
+        "pify": "3.0.0",
+        "rimraf": "2.6.2"
+      },
+      "dependencies": {
+        "globby": {
+          "version": "6.1.0",
+          "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
+          "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=",
+          "dev": true,
+          "requires": {
+            "array-union": "1.0.2",
+            "glob": "7.1.2",
+            "object-assign": "4.1.1",
+            "pify": "2.3.0",
+            "pinkie-promise": "2.0.1"
+          },
+          "dependencies": {
+            "pify": {
+              "version": "2.3.0",
+              "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+              "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+              "dev": true
+            }
+          }
+        }
+      }
     },
     "delayed-stream": {
       "version": "1.0.0",
@@ -1349,17 +2011,17 @@
       "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
       "dev": true
     },
-    "deps-sort": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz",
-      "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=",
-      "dev": true,
-      "requires": {
-        "JSONStream": "1.3.2",
-        "shasum": "1.0.2",
-        "subarg": "1.0.0",
-        "through2": "2.0.3"
-      }
+    "denodeify": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz",
+      "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=",
+      "dev": true
+    },
+    "depd": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+      "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
+      "dev": true
     },
     "des.js": {
       "version": "1.0.0",
@@ -1371,25 +2033,27 @@
         "minimalistic-assert": "1.0.0"
       }
     },
-    "detective": {
-      "version": "5.0.2",
-      "resolved": "https://registry.npmjs.org/detective/-/detective-5.0.2.tgz",
-      "integrity": "sha512-NUsLoezj4wb9o7vpxS9F3L5vcO87ceyRBcl48op06YFNwkyIEY997JpSCA5lDlDuDc6JxOtaL5qfK3muoWxpMA==",
+    "destroy": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
+      "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=",
+      "dev": true
+    },
+    "detect-indent": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
+      "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
       "dev": true,
       "requires": {
-        "@browserify/acorn5-object-spread": "5.0.1",
-        "acorn": "5.3.0",
-        "defined": "1.0.0"
-      },
-      "dependencies": {
-        "acorn": {
-          "version": "5.3.0",
-          "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.3.0.tgz",
-          "integrity": "sha512-Yej+zOJ1Dm/IMZzzj78OntP/r3zHEaKcyNoU2lAaxPtrseM6rF0xwqoz5Q5ysAiED9hTjI2hgtvLXitlCN1/Ug==",
-          "dev": true
-        }
+        "repeating": "2.0.1"
       }
     },
+    "detect-node": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz",
+      "integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=",
+      "dev": true
+    },
     "diffie-hellman": {
       "version": "5.0.2",
       "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz",
@@ -1401,18 +2065,113 @@
         "randombytes": "2.0.6"
       }
     },
+    "dir-glob": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz",
+      "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==",
+      "dev": true,
+      "requires": {
+        "arrify": "1.0.1",
+        "path-type": "3.0.0"
+      }
+    },
+    "dns-equal": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz",
+      "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=",
+      "dev": true
+    },
+    "dns-packet": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz",
+      "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==",
+      "dev": true,
+      "requires": {
+        "ip": "1.1.5",
+        "safe-buffer": "5.1.1"
+      }
+    },
+    "dns-txt": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz",
+      "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=",
+      "dev": true,
+      "requires": {
+        "buffer-indexof": "1.1.1"
+      }
+    },
+    "dom-converter": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz",
+      "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=",
+      "dev": true,
+      "requires": {
+        "utila": "0.3.3"
+      },
+      "dependencies": {
+        "utila": {
+          "version": "0.3.3",
+          "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz",
+          "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=",
+          "dev": true
+        }
+      }
+    },
+    "dom-serializer": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz",
+      "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=",
+      "dev": true,
+      "requires": {
+        "domelementtype": "1.1.3",
+        "entities": "1.1.1"
+      },
+      "dependencies": {
+        "domelementtype": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
+          "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=",
+          "dev": true
+        }
+      }
+    },
     "domain-browser": {
-      "version": "1.1.7",
-      "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz",
-      "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=",
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
+      "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==",
       "dev": true
     },
+    "domelementtype": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz",
+      "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=",
+      "dev": true
+    },
+    "domhandler": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz",
+      "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=",
+      "dev": true,
+      "requires": {
+        "domelementtype": "1.3.0"
+      }
+    },
     "domino": {
       "version": "1.0.30",
       "resolved": "https://registry.npmjs.org/domino/-/domino-1.0.30.tgz",
       "integrity": "sha512-ikq8WiDSkICdkElud317F2Sigc6A3EDpWsxWBwIZqOl95km4p/Vc9Rj98id7qKgsjDmExj0AVM7JOd4bb647Xg==",
       "dev": true
     },
+    "domutils": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
+      "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
+      "dev": true,
+      "requires": {
+        "dom-serializer": "0.1.0",
+        "domelementtype": "1.3.0"
+      }
+    },
     "dot-prop": {
       "version": "4.2.0",
       "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
@@ -1428,21 +2187,24 @@
       "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
       "dev": true
     },
-    "duplexer2": {
-      "version": "0.1.4",
-      "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
-      "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=",
-      "dev": true,
-      "requires": {
-        "readable-stream": "2.3.3"
-      }
-    },
     "duplexer3": {
       "version": "0.1.4",
       "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
       "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=",
       "dev": true
     },
+    "duplexify": {
+      "version": "3.5.4",
+      "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz",
+      "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==",
+      "dev": true,
+      "requires": {
+        "end-of-stream": "1.4.1",
+        "inherits": "2.0.3",
+        "readable-stream": "2.3.5",
+        "stream-shift": "1.0.0"
+      }
+    },
     "ecc-jsbn": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
@@ -1453,6 +2215,24 @@
         "jsbn": "0.1.1"
       }
     },
+    "ee-first": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+      "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=",
+      "dev": true
+    },
+    "ejs": {
+      "version": "2.5.7",
+      "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.7.tgz",
+      "integrity": "sha1-zIcsFoiArjxxiXYv1f/ACJbJUYo=",
+      "dev": true
+    },
+    "electron-to-chromium": {
+      "version": "1.3.37",
+      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.37.tgz",
+      "integrity": "sha1-SpJzTgBEyM8LFVO+V+riGkxuX6s=",
+      "dev": true
+    },
     "elliptic": {
       "version": "6.4.0",
       "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",
@@ -1468,6 +2248,60 @@
         "minimalistic-crypto-utils": "1.0.1"
       }
     },
+    "ember-cli-string-utils": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/ember-cli-string-utils/-/ember-cli-string-utils-1.1.0.tgz",
+      "integrity": "sha1-ObZ3/CgF9VFzc1N2/O8njqpEUqE=",
+      "dev": true
+    },
+    "emojis-list": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
+      "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=",
+      "dev": true
+    },
+    "encodeurl": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+      "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
+      "dev": true
+    },
+    "end-of-stream": {
+      "version": "1.4.1",
+      "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
+      "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
+      "dev": true,
+      "requires": {
+        "once": "1.4.0"
+      }
+    },
+    "enhanced-resolve": {
+      "version": "3.4.1",
+      "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz",
+      "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "4.1.11",
+        "memory-fs": "0.4.1",
+        "object-assign": "4.1.1",
+        "tapable": "0.2.8"
+      }
+    },
+    "entities": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
+      "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=",
+      "dev": true
+    },
+    "errno": {
+      "version": "0.1.7",
+      "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
+      "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
+      "dev": true,
+      "requires": {
+        "prr": "1.0.1"
+      }
+    },
     "error-ex": {
       "version": "1.3.1",
       "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
@@ -1477,12 +2311,167 @@
         "is-arrayish": "0.2.1"
       }
     },
+    "es-abstract": {
+      "version": "1.10.0",
+      "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.10.0.tgz",
+      "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==",
+      "dev": true,
+      "requires": {
+        "es-to-primitive": "1.1.1",
+        "function-bind": "1.1.1",
+        "has": "1.0.1",
+        "is-callable": "1.1.3",
+        "is-regex": "1.0.4"
+      }
+    },
+    "es-to-primitive": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz",
+      "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=",
+      "dev": true,
+      "requires": {
+        "is-callable": "1.1.3",
+        "is-date-object": "1.0.1",
+        "is-symbol": "1.0.1"
+      }
+    },
+    "es5-ext": {
+      "version": "0.10.40",
+      "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.40.tgz",
+      "integrity": "sha512-S9Fh3oya5OOvYSNGvPZJ+vyrs6VYpe1IXPowVe3N1OhaiwVaGlwfn3Zf5P5klYcWOA0toIwYQW8XEv/QqhdHvQ==",
+      "dev": true,
+      "requires": {
+        "es6-iterator": "2.0.3",
+        "es6-symbol": "3.1.1"
+      }
+    },
+    "es6-iterator": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
+      "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
+      "dev": true,
+      "requires": {
+        "d": "1.0.0",
+        "es5-ext": "0.10.40",
+        "es6-symbol": "3.1.1"
+      }
+    },
+    "es6-map": {
+      "version": "0.1.5",
+      "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz",
+      "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=",
+      "dev": true,
+      "requires": {
+        "d": "1.0.0",
+        "es5-ext": "0.10.40",
+        "es6-iterator": "2.0.3",
+        "es6-set": "0.1.5",
+        "es6-symbol": "3.1.1",
+        "event-emitter": "0.3.5"
+      }
+    },
+    "es6-set": {
+      "version": "0.1.5",
+      "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",
+      "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=",
+      "dev": true,
+      "requires": {
+        "d": "1.0.0",
+        "es5-ext": "0.10.40",
+        "es6-iterator": "2.0.3",
+        "es6-symbol": "3.1.1",
+        "event-emitter": "0.3.5"
+      }
+    },
+    "es6-symbol": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
+      "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
+      "dev": true,
+      "requires": {
+        "d": "1.0.0",
+        "es5-ext": "0.10.40"
+      }
+    },
+    "es6-weak-map": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
+      "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
+      "dev": true,
+      "requires": {
+        "d": "1.0.0",
+        "es5-ext": "0.10.40",
+        "es6-iterator": "2.0.3",
+        "es6-symbol": "3.1.1"
+      }
+    },
+    "escape-html": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+      "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=",
+      "dev": true
+    },
     "escape-string-regexp": {
       "version": "1.0.5",
       "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
       "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
       "dev": true
     },
+    "escope": {
+      "version": "3.6.0",
+      "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz",
+      "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=",
+      "dev": true,
+      "requires": {
+        "es6-map": "0.1.5",
+        "es6-weak-map": "2.0.2",
+        "esrecurse": "4.2.1",
+        "estraverse": "4.2.0"
+      }
+    },
+    "esprima": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz",
+      "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==",
+      "dev": true
+    },
+    "esrecurse": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
+      "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==",
+      "dev": true,
+      "requires": {
+        "estraverse": "4.2.0"
+      }
+    },
+    "estraverse": {
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
+      "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
+      "dev": true
+    },
+    "esutils": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
+      "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
+      "dev": true
+    },
+    "etag": {
+      "version": "1.8.1",
+      "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+      "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
+      "dev": true
+    },
+    "event-emitter": {
+      "version": "0.3.5",
+      "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
+      "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=",
+      "dev": true,
+      "requires": {
+        "d": "1.0.0",
+        "es5-ext": "0.10.40"
+      }
+    },
     "event-stream": {
       "version": "3.3.4",
       "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",
@@ -1498,12 +2487,27 @@
         "through": "2.3.8"
       }
     },
+    "eventemitter3": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz",
+      "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=",
+      "dev": true
+    },
     "events": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
       "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=",
       "dev": true
     },
+    "eventsource": {
+      "version": "0.1.6",
+      "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz",
+      "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=",
+      "dev": true,
+      "requires": {
+        "original": "1.0.0"
+      }
+    },
     "evp_bytestokey": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
@@ -1535,7 +2539,7 @@
           "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
           "dev": true,
           "requires": {
-            "lru-cache": "4.1.1",
+            "lru-cache": "4.1.2",
             "shebang-command": "1.2.0",
             "which": "1.3.0"
           }
@@ -1560,6 +2564,58 @@
         "fill-range": "2.2.3"
       }
     },
+    "express": {
+      "version": "4.16.2",
+      "resolved": "https://registry.npmjs.org/express/-/express-4.16.2.tgz",
+      "integrity": "sha1-41xt/i1kt9ygpc1PIXgb4ymeB2w=",
+      "dev": true,
+      "requires": {
+        "accepts": "1.3.5",
+        "array-flatten": "1.1.1",
+        "body-parser": "1.18.2",
+        "content-disposition": "0.5.2",
+        "content-type": "1.0.4",
+        "cookie": "0.3.1",
+        "cookie-signature": "1.0.6",
+        "debug": "2.6.9",
+        "depd": "1.1.2",
+        "encodeurl": "1.0.2",
+        "escape-html": "1.0.3",
+        "etag": "1.8.1",
+        "finalhandler": "1.1.0",
+        "fresh": "0.5.2",
+        "merge-descriptors": "1.0.1",
+        "methods": "1.1.2",
+        "on-finished": "2.3.0",
+        "parseurl": "1.3.2",
+        "path-to-regexp": "0.1.7",
+        "proxy-addr": "2.0.3",
+        "qs": "6.5.1",
+        "range-parser": "1.2.0",
+        "safe-buffer": "5.1.1",
+        "send": "0.16.1",
+        "serve-static": "1.13.1",
+        "setprototypeof": "1.1.0",
+        "statuses": "1.3.1",
+        "type-is": "1.6.16",
+        "utils-merge": "1.0.1",
+        "vary": "1.1.2"
+      },
+      "dependencies": {
+        "array-flatten": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+          "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=",
+          "dev": true
+        },
+        "qs": {
+          "version": "6.5.1",
+          "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
+          "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==",
+          "dev": true
+        }
+      }
+    },
     "extend": {
       "version": "3.0.1",
       "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
@@ -1596,15 +2652,81 @@
         "is-extglob": "1.0.0"
       }
     },
+    "extract-text-webpack-plugin": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz",
+      "integrity": "sha512-bt/LZ4m5Rqt/Crl2HiKuAl/oqg0psx1tsTLkvWbJen1CtD+fftkZhMaQ9HOtY2gWsl2Wq+sABmMVi9z3DhKWQQ==",
+      "dev": true,
+      "requires": {
+        "async": "2.6.0",
+        "loader-utils": "1.1.0",
+        "schema-utils": "0.3.0",
+        "webpack-sources": "1.1.0"
+      },
+      "dependencies": {
+        "ajv": {
+          "version": "5.5.2",
+          "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
+          "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
+          "dev": true,
+          "requires": {
+            "co": "4.6.0",
+            "fast-deep-equal": "1.1.0",
+            "fast-json-stable-stringify": "2.0.0",
+            "json-schema-traverse": "0.3.1"
+          }
+        },
+        "schema-utils": {
+          "version": "0.3.0",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz",
+          "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=",
+          "dev": true,
+          "requires": {
+            "ajv": "5.5.2"
+          }
+        }
+      }
+    },
     "extsprintf": {
       "version": "1.3.0",
       "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
       "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
       "dev": true
     },
-    "filename-regex": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
+    "fast-deep-equal": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
+      "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
+      "dev": true
+    },
+    "fast-json-stable-stringify": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
+      "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
+      "dev": true
+    },
+    "faye-websocket": {
+      "version": "0.10.0",
+      "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz",
+      "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=",
+      "dev": true,
+      "requires": {
+        "websocket-driver": "0.7.0"
+      }
+    },
+    "file-loader": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz",
+      "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==",
+      "dev": true,
+      "requires": {
+        "loader-utils": "1.1.0",
+        "schema-utils": "0.4.5"
+      }
+    },
+    "filename-regex": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
       "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=",
       "dev": true
     },
@@ -1621,14 +2743,49 @@
         "repeat-string": "1.6.1"
       }
     },
+    "finalhandler": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz",
+      "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=",
+      "dev": true,
+      "requires": {
+        "debug": "2.6.9",
+        "encodeurl": "1.0.2",
+        "escape-html": "1.0.3",
+        "on-finished": "2.3.0",
+        "parseurl": "1.3.2",
+        "statuses": "1.3.1",
+        "unpipe": "1.0.0"
+      }
+    },
+    "find-cache-dir": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz",
+      "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=",
+      "dev": true,
+      "requires": {
+        "commondir": "1.0.1",
+        "make-dir": "1.2.0",
+        "pkg-dir": "2.0.0"
+      }
+    },
     "find-up": {
-      "version": "1.1.2",
-      "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
-      "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+      "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+      "dev": true,
+      "requires": {
+        "locate-path": "2.0.0"
+      }
+    },
+    "flush-write-stream": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz",
+      "integrity": "sha1-yBuQ2HRnZvGmCaRoCZRsRd2K5Bc=",
       "dev": true,
       "requires": {
-        "path-exists": "2.1.0",
-        "pinkie-promise": "2.0.1"
+        "inherits": "2.0.3",
+        "readable-stream": "2.3.5"
       }
     },
     "for-in": {
@@ -1646,6 +2803,12 @@
         "for-in": "1.0.2"
       }
     },
+    "foreach": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
+      "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=",
+      "dev": true
+    },
     "forever-agent": {
       "version": "0.6.1",
       "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
@@ -1663,6 +2826,12 @@
         "mime-types": "2.1.18"
       }
     },
+    "forwarded": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
+      "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=",
+      "dev": true
+    },
     "fragment-cache": {
       "version": "0.2.1",
       "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
@@ -1672,12 +2841,51 @@
         "map-cache": "0.2.2"
       }
     },
+    "fresh": {
+      "version": "0.5.2",
+      "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+      "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
+      "dev": true
+    },
     "from": {
       "version": "0.1.7",
       "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz",
       "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=",
       "dev": true
     },
+    "from2": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz",
+      "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=",
+      "dev": true,
+      "requires": {
+        "inherits": "2.0.3",
+        "readable-stream": "2.3.5"
+      }
+    },
+    "fs-extra": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",
+      "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "4.1.11",
+        "jsonfile": "4.0.0",
+        "universalify": "0.1.1"
+      }
+    },
+    "fs-write-stream-atomic": {
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz",
+      "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "4.1.11",
+        "iferr": "0.1.5",
+        "imurmurhash": "0.1.4",
+        "readable-stream": "2.3.5"
+      }
+    },
     "fs.realpath": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -1691,7 +2899,7 @@
       "dev": true,
       "optional": true,
       "requires": {
-        "nan": "2.8.0",
+        "nan": "2.9.2",
         "node-pre-gyp": "0.6.39"
       },
       "dependencies": {
@@ -2729,6 +3937,26 @@
         "ini": "1.3.5"
       }
     },
+    "globals": {
+      "version": "9.18.0",
+      "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
+      "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
+      "dev": true
+    },
+    "globby": {
+      "version": "7.1.1",
+      "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz",
+      "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=",
+      "dev": true,
+      "requires": {
+        "array-union": "1.0.2",
+        "dir-glob": "2.0.0",
+        "glob": "7.1.2",
+        "ignore": "3.3.7",
+        "pify": "3.0.0",
+        "slash": "1.0.0"
+      }
+    },
     "globule": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz",
@@ -2771,16 +3999,38 @@
       "integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE=",
       "dev": true
     },
+    "handle-thing": {
+      "version": "1.2.5",
+      "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz",
+      "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=",
+      "dev": true
+    },
+    "har-schema": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz",
+      "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=",
+      "dev": true
+    },
     "har-validator": {
-      "version": "2.0.6",
-      "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
-      "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=",
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz",
+      "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=",
       "dev": true,
       "requires": {
-        "chalk": "1.1.3",
-        "commander": "2.14.1",
-        "is-my-json-valid": "2.17.2",
-        "pinkie-promise": "2.0.1"
+        "ajv": "4.11.8",
+        "har-schema": "1.0.5"
+      },
+      "dependencies": {
+        "ajv": {
+          "version": "4.11.8",
+          "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
+          "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
+          "dev": true,
+          "requires": {
+            "co": "4.6.0",
+            "json-stable-stringify": "1.0.1"
+          }
+        }
       }
     },
     "has": {
@@ -2802,9 +4052,9 @@
       }
     },
     "has-flag": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
-      "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
+      "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
       "dev": true
     },
     "has-unicode": {
@@ -2857,7 +4107,7 @@
               "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
               "dev": true,
               "requires": {
-                "is-buffer": "1.1.5"
+                "is-buffer": "1.1.6"
               }
             }
           }
@@ -2868,7 +4118,7 @@
           "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
           "dev": true,
           "requires": {
-            "is-buffer": "1.1.5"
+            "is-buffer": "1.1.6"
           }
         }
       }
@@ -2904,6 +4154,12 @@
         "sntp": "1.0.9"
       }
     },
+    "he": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
+      "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
+      "dev": true
+    },
     "hmac-drbg": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
@@ -2922,17 +4178,197 @@
       "dev": true
     },
     "hosted-git-info": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz",
-      "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==",
+      "version": "2.6.0",
+      "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz",
+      "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==",
       "dev": true
     },
-    "htmlescape": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz",
-      "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=",
+    "hpack.js": {
+      "version": "2.1.6",
+      "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz",
+      "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=",
+      "dev": true,
+      "requires": {
+        "inherits": "2.0.3",
+        "obuf": "1.1.2",
+        "readable-stream": "2.3.5",
+        "wbuf": "1.7.3"
+      }
+    },
+    "html-entities": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz",
+      "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=",
+      "dev": true
+    },
+    "html-minifier": {
+      "version": "3.5.10",
+      "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.10.tgz",
+      "integrity": "sha512-5c8iAyeIGAiuFhVjJ0qy1lgvyQxxuZgjeOuMnoK/wjEyy8DF3xKUnE9pO+6H7VMir976K6SGlZV8ZEmIOea/Zg==",
+      "dev": true,
+      "requires": {
+        "camel-case": "3.0.0",
+        "clean-css": "4.1.11",
+        "commander": "2.14.1",
+        "he": "1.1.1",
+        "ncname": "1.0.0",
+        "param-case": "2.1.1",
+        "relateurl": "0.2.7",
+        "uglify-js": "3.3.14"
+      }
+    },
+    "html-webpack-plugin": {
+      "version": "2.30.1",
+      "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-2.30.1.tgz",
+      "integrity": "sha1-f5xCG36pHsRg9WUn1430hO51N9U=",
+      "dev": true,
+      "requires": {
+        "bluebird": "3.5.1",
+        "html-minifier": "3.5.10",
+        "loader-utils": "0.2.17",
+        "lodash": "4.17.5",
+        "pretty-error": "2.1.1",
+        "toposort": "1.0.6"
+      },
+      "dependencies": {
+        "loader-utils": {
+          "version": "0.2.17",
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz",
+          "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=",
+          "dev": true,
+          "requires": {
+            "big.js": "3.2.0",
+            "emojis-list": "2.1.0",
+            "json5": "0.5.1",
+            "object-assign": "4.1.1"
+          }
+        }
+      }
+    },
+    "htmlparser2": {
+      "version": "3.3.0",
+      "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz",
+      "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=",
+      "dev": true,
+      "requires": {
+        "domelementtype": "1.3.0",
+        "domhandler": "2.1.0",
+        "domutils": "1.1.6",
+        "readable-stream": "1.0.34"
+      },
+      "dependencies": {
+        "domutils": {
+          "version": "1.1.6",
+          "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz",
+          "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=",
+          "dev": true,
+          "requires": {
+            "domelementtype": "1.3.0"
+          }
+        },
+        "isarray": {
+          "version": "0.0.1",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+          "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "1.0.34",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+          "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
+          "dev": true,
+          "requires": {
+            "core-util-is": "1.0.2",
+            "inherits": "2.0.3",
+            "isarray": "0.0.1",
+            "string_decoder": "0.10.31"
+          }
+        },
+        "string_decoder": {
+          "version": "0.10.31",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+          "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
+          "dev": true
+        }
+      }
+    },
+    "http-deceiver": {
+      "version": "1.2.7",
+      "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz",
+      "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=",
+      "dev": true
+    },
+    "http-errors": {
+      "version": "1.6.2",
+      "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz",
+      "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=",
+      "dev": true,
+      "requires": {
+        "depd": "1.1.1",
+        "inherits": "2.0.3",
+        "setprototypeof": "1.0.3",
+        "statuses": "1.3.1"
+      },
+      "dependencies": {
+        "depd": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz",
+          "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=",
+          "dev": true
+        },
+        "setprototypeof": {
+          "version": "1.0.3",
+          "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz",
+          "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=",
+          "dev": true
+        }
+      }
+    },
+    "http-parser-js": {
+      "version": "0.4.11",
+      "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.11.tgz",
+      "integrity": "sha512-QCR5O2AjjMW8Mo4HyI1ctFcv+O99j/0g367V3YoVnrNw5hkDvAWZD0lWGcc+F4yN3V55USPCVix4efb75HxFfA==",
       "dev": true
     },
+    "http-proxy": {
+      "version": "1.16.2",
+      "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.16.2.tgz",
+      "integrity": "sha1-Bt/ykpUr9k2+hHH6nfcwZtTzd0I=",
+      "dev": true,
+      "requires": {
+        "eventemitter3": "1.2.0",
+        "requires-port": "1.0.0"
+      }
+    },
+    "http-proxy-middleware": {
+      "version": "0.17.4",
+      "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz",
+      "integrity": "sha1-ZC6ISIUdZvCdTxJJEoRtuutBuDM=",
+      "dev": true,
+      "requires": {
+        "http-proxy": "1.16.2",
+        "is-glob": "3.1.0",
+        "lodash": "4.17.5",
+        "micromatch": "2.3.11"
+      },
+      "dependencies": {
+        "is-extglob": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+          "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+          "dev": true
+        },
+        "is-glob": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+          "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+          "dev": true,
+          "requires": {
+            "is-extglob": "2.1.1"
+          }
+        }
+      }
+    },
     "http-signature": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
@@ -2950,24 +4386,59 @@
       "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
       "dev": true
     },
+    "iconv-lite": {
+      "version": "0.4.19",
+      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
+      "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==",
+      "dev": true
+    },
     "ieee754": {
       "version": "1.1.8",
       "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz",
       "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=",
       "dev": true
     },
+    "iferr": {
+      "version": "0.1.5",
+      "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz",
+      "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=",
+      "dev": true
+    },
+    "ignore": {
+      "version": "3.3.7",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz",
+      "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==",
+      "dev": true
+    },
     "ignore-by-default": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
       "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=",
       "dev": true
     },
+    "image-size": {
+      "version": "0.5.5",
+      "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
+      "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
+      "dev": true,
+      "optional": true
+    },
     "import-lazy": {
       "version": "2.1.0",
       "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz",
       "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=",
       "dev": true
     },
+    "import-local": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz",
+      "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==",
+      "dev": true,
+      "requires": {
+        "pkg-dir": "2.0.0",
+        "resolve-cwd": "2.0.0"
+      }
+    },
     "imurmurhash": {
       "version": "0.1.4",
       "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
@@ -3017,43 +4488,28 @@
       "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
       "dev": true
     },
-    "inline-source-map": {
-      "version": "0.6.2",
-      "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz",
-      "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=",
+    "internal-ip": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz",
+      "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=",
       "dev": true,
       "requires": {
-        "source-map": "0.5.7"
+        "meow": "3.7.0"
       }
     },
-    "insert-module-globals": {
-      "version": "7.0.1",
-      "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz",
-      "integrity": "sha1-wDv04BywhtW15azorQr+eInWOMM=",
+    "interpret": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz",
+      "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=",
+      "dev": true
+    },
+    "invariant": {
+      "version": "2.2.3",
+      "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.3.tgz",
+      "integrity": "sha512-7Z5PPegwDTyjbaeCnV0efcyS6vdKAU51kpEmS7QFib3P4822l8ICYyMn7qvJnc+WzLoDsuI9gPMKbJ8pCu8XtA==",
       "dev": true,
       "requires": {
-        "JSONStream": "1.3.2",
-        "combine-source-map": "0.7.2",
-        "concat-stream": "1.5.2",
-        "is-buffer": "1.1.5",
-        "lexical-scope": "1.2.0",
-        "process": "0.11.10",
-        "through2": "2.0.3",
-        "xtend": "4.0.1"
-      },
-      "dependencies": {
-        "combine-source-map": {
-          "version": "0.7.2",
-          "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz",
-          "integrity": "sha1-CHAxKFazB6h8xKxIbzqaYq7MwJ4=",
-          "dev": true,
-          "requires": {
-            "convert-source-map": "1.1.3",
-            "inline-source-map": "0.6.2",
-            "lodash.memoize": "3.0.4",
-            "source-map": "0.5.7"
-          }
-        }
+        "loose-envify": "1.3.1"
       }
     },
     "invert-kv": {
@@ -3062,6 +4518,18 @@
       "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
       "dev": true
     },
+    "ip": {
+      "version": "1.1.5",
+      "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
+      "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=",
+      "dev": true
+    },
+    "ipaddr.js": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz",
+      "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=",
+      "dev": true
+    },
     "is-accessor-descriptor": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
@@ -3095,9 +4563,9 @@
       }
     },
     "is-buffer": {
-      "version": "1.1.5",
-      "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz",
-      "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=",
+      "version": "1.1.6",
+      "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+      "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
       "dev": true
     },
     "is-builtin-module": {
@@ -3109,6 +4577,12 @@
         "builtin-modules": "1.1.1"
       }
     },
+    "is-callable": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz",
+      "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=",
+      "dev": true
+    },
     "is-data-descriptor": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
@@ -3126,6 +4600,12 @@
         }
       }
     },
+    "is-date-object": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
+      "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
+      "dev": true
+    },
     "is-descriptor": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
@@ -3145,6 +4625,12 @@
         }
       }
     },
+    "is-directory": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
+      "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=",
+      "dev": true
+    },
     "is-dotfile": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
@@ -3266,6 +4752,21 @@
         }
       }
     },
+    "is-path-cwd": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz",
+      "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=",
+      "dev": true
+    },
+    "is-path-in-cwd": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz",
+      "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=",
+      "dev": true,
+      "requires": {
+        "is-path-inside": "1.0.1"
+      }
+    },
     "is-path-inside": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz",
@@ -3316,6 +4817,15 @@
       "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=",
       "dev": true
     },
+    "is-regex": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
+      "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
+      "dev": true,
+      "requires": {
+        "has": "1.0.1"
+      }
+    },
     "is-retry-allowed": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz",
@@ -3328,6 +4838,12 @@
       "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
       "dev": true
     },
+    "is-symbol": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz",
+      "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=",
+      "dev": true
+    },
     "is-typedarray": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
@@ -3346,6 +4862,12 @@
       "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
       "dev": true
     },
+    "is-wsl": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
+      "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=",
+      "dev": true
+    },
     "isarray": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
@@ -3373,8 +4895,64 @@
       "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
       "dev": true
     },
-    "jquery": {
-      "version": "3.3.1",
+    "istanbul-instrumenter-loader": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.0.tgz",
+      "integrity": "sha512-alLSEFX06ApU75sm5oWcaVNaiss/bgMRiWTct3g0P0ZZTKjR+6QiCcuVOKDI1kWJgwHEnIXsv/dWm783kPpmtw==",
+      "dev": true,
+      "requires": {
+        "convert-source-map": "1.5.1",
+        "istanbul-lib-instrument": "1.10.1",
+        "loader-utils": "1.1.0",
+        "schema-utils": "0.3.0"
+      },
+      "dependencies": {
+        "ajv": {
+          "version": "5.5.2",
+          "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
+          "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
+          "dev": true,
+          "requires": {
+            "co": "4.6.0",
+            "fast-deep-equal": "1.1.0",
+            "fast-json-stable-stringify": "2.0.0",
+            "json-schema-traverse": "0.3.1"
+          }
+        },
+        "schema-utils": {
+          "version": "0.3.0",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz",
+          "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=",
+          "dev": true,
+          "requires": {
+            "ajv": "5.5.2"
+          }
+        }
+      }
+    },
+    "istanbul-lib-coverage": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz",
+      "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==",
+      "dev": true
+    },
+    "istanbul-lib-instrument": {
+      "version": "1.10.1",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz",
+      "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==",
+      "dev": true,
+      "requires": {
+        "babel-generator": "6.26.1",
+        "babel-template": "6.26.0",
+        "babel-traverse": "6.26.0",
+        "babel-types": "6.26.0",
+        "babylon": "6.18.0",
+        "istanbul-lib-coverage": "1.2.0",
+        "semver": "5.5.0"
+      }
+    },
+    "jquery": {
+      "version": "3.3.1",
       "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz",
       "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg=="
     },
@@ -3401,6 +4979,22 @@
       "integrity": "sha512-H7ErYLM34CvDMto3GbD6xD0JLUGYXR3QTcH6B/tr4Hi/QpSThnCsIp+Sy5FRTw3B0d6py4HcNkW7nO/wdtGWEw==",
       "dev": true
     },
+    "js-tokens": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
+      "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
+      "dev": true
+    },
+    "js-yaml": {
+      "version": "3.11.0",
+      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz",
+      "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==",
+      "dev": true,
+      "requires": {
+        "argparse": "1.0.10",
+        "esprima": "4.0.0"
+      }
+    },
     "jsbn": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
@@ -3408,16 +5002,34 @@
       "dev": true,
       "optional": true
     },
+    "jsesc": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
+      "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
+      "dev": true
+    },
+    "json-loader": {
+      "version": "0.5.7",
+      "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz",
+      "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==",
+      "dev": true
+    },
     "json-schema": {
       "version": "0.2.3",
       "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
       "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
       "dev": true
     },
+    "json-schema-traverse": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
+      "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
+      "dev": true
+    },
     "json-stable-stringify": {
-      "version": "0.0.1",
-      "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz",
-      "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=",
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
+      "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
       "dev": true,
       "requires": {
         "jsonify": "0.0.0"
@@ -3429,18 +5041,33 @@
       "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
       "dev": true
     },
+    "json3": {
+      "version": "3.3.2",
+      "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz",
+      "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=",
+      "dev": true
+    },
+    "json5": {
+      "version": "0.5.1",
+      "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
+      "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
+      "dev": true
+    },
+    "jsonfile": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+      "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "4.1.11"
+      }
+    },
     "jsonify": {
       "version": "0.0.0",
       "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
       "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
       "dev": true
     },
-    "jsonparse": {
-      "version": "1.3.1",
-      "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
-      "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=",
-      "dev": true
-    },
     "jsonpointer": {
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
@@ -3475,32 +5102,28 @@
         "jquery": "3.3.1"
       }
     },
-    "kind-of": {
-      "version": "3.2.2",
-      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
-      "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+    "karma-source-map-support": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.2.0.tgz",
+      "integrity": "sha1-G/gee7SwiWJ6s1LsQXnhF8QGpUA=",
       "dev": true,
       "requires": {
-        "is-buffer": "1.1.5"
+        "source-map-support": "0.4.18"
       }
     },
-    "labeled-stream-splicer": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz",
-      "integrity": "sha1-pS4dE4AkwAuGscDJH2d5GLiuClk=",
+    "killable": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.0.tgz",
+      "integrity": "sha1-2ouEvUfeU5WHj5XWTQLyRJ/gXms=",
+      "dev": true
+    },
+    "kind-of": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+      "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
       "dev": true,
       "requires": {
-        "inherits": "2.0.3",
-        "isarray": "0.0.1",
-        "stream-splicer": "2.0.0"
-      },
-      "dependencies": {
-        "isarray": {
-          "version": "0.0.1",
-          "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
-          "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
-          "dev": true
-        }
+        "is-buffer": "1.1.6"
       }
     },
     "latest-version": {
@@ -3513,13 +5136,10 @@
       }
     },
     "lazy-cache": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz",
-      "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=",
-      "dev": true,
-      "requires": {
-        "set-getter": "0.1.0"
-      }
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
+      "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
+      "dev": true
     },
     "lcid": {
       "version": "1.0.0",
@@ -3530,13 +5150,40 @@
         "invert-kv": "1.0.0"
       }
     },
-    "lexical-scope": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz",
-      "integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=",
+    "less": {
+      "version": "2.7.3",
+      "resolved": "https://registry.npmjs.org/less/-/less-2.7.3.tgz",
+      "integrity": "sha512-KPdIJKWcEAb02TuJtaLrhue0krtRLoRoo7x6BNJIBelO00t/CCdJQUnHW5V34OnHMWzIktSalJxRO+FvytQlCQ==",
+      "dev": true,
+      "requires": {
+        "errno": "0.1.7",
+        "graceful-fs": "4.1.11",
+        "image-size": "0.5.5",
+        "mime": "1.6.0",
+        "mkdirp": "0.5.1",
+        "promise": "7.3.1",
+        "request": "2.81.0",
+        "source-map": "0.5.7"
+      }
+    },
+    "less-loader": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz",
+      "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==",
+      "dev": true,
+      "requires": {
+        "clone": "2.1.1",
+        "loader-utils": "1.1.0",
+        "pify": "3.0.0"
+      }
+    },
+    "license-webpack-plugin": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.3.0.tgz",
+      "integrity": "sha512-12Spl8M5Ty7aRszGQUEfNK1W0gwcWNfAj0sMyJv7E7BglAb4YaZ6FciGncmwzxEcuzJ45RjA/Fql3Gw13la6aA==",
       "dev": true,
       "requires": {
-        "astw": "2.2.0"
+        "ejs": "2.5.7"
       }
     },
     "load-json-file": {
@@ -3550,6 +5197,41 @@
         "pify": "2.3.0",
         "pinkie-promise": "2.0.1",
         "strip-bom": "2.0.0"
+      },
+      "dependencies": {
+        "pify": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+          "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+          "dev": true
+        }
+      }
+    },
+    "loader-runner": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz",
+      "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=",
+      "dev": true
+    },
+    "loader-utils": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz",
+      "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=",
+      "dev": true,
+      "requires": {
+        "big.js": "3.2.0",
+        "emojis-list": "2.1.0",
+        "json5": "0.5.1"
+      }
+    },
+    "locate-path": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
+      "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
+      "dev": true,
+      "requires": {
+        "p-locate": "2.0.0",
+        "path-exists": "3.0.0"
       }
     },
     "lodash": {
@@ -3570,18 +5252,39 @@
       "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
       "dev": true
     },
-    "lodash.memoize": {
-      "version": "3.0.4",
-      "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz",
-      "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=",
-      "dev": true
-    },
     "lodash.mergewith": {
       "version": "4.6.1",
       "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz",
       "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==",
       "dev": true
     },
+    "lodash.tail": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz",
+      "integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=",
+      "dev": true
+    },
+    "loglevel": {
+      "version": "1.6.1",
+      "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz",
+      "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=",
+      "dev": true
+    },
+    "longest": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
+      "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
+      "dev": true
+    },
+    "loose-envify": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
+      "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=",
+      "dev": true,
+      "requires": {
+        "js-tokens": "3.0.2"
+      }
+    },
     "loud-rejection": {
       "version": "1.6.0",
       "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
@@ -3592,6 +5295,12 @@
         "signal-exit": "3.0.2"
       }
     },
+    "lower-case": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz",
+      "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=",
+      "dev": true
+    },
     "lowercase-keys": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz",
@@ -3599,9 +5308,9 @@
       "dev": true
     },
     "lru-cache": {
-      "version": "4.1.1",
-      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz",
-      "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==",
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz",
+      "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==",
       "dev": true,
       "requires": {
         "pseudomap": "1.0.2",
@@ -3613,6 +5322,15 @@
       "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz",
       "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY="
     },
+    "magic-string": {
+      "version": "0.22.4",
+      "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.4.tgz",
+      "integrity": "sha512-kxBL06p6iO2qPBHsqGK2b3cRwiRGpnmSuVWNhwHcMX7qJOUr1HvricYP1LZOCdkQBUp0jiWg2d6WJwR3vYgByw==",
+      "dev": true,
+      "requires": {
+        "vlq": "0.2.3"
+      }
+    },
     "make-dir": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz",
@@ -3620,14 +5338,6 @@
       "dev": true,
       "requires": {
         "pify": "3.0.0"
-      },
-      "dependencies": {
-        "pify": {
-          "version": "3.0.0",
-          "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
-          "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
-          "dev": true
-        }
       }
     },
     "map-cache": {
@@ -3679,6 +5389,31 @@
         }
       }
     },
+    "media-typer": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+      "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
+      "dev": true
+    },
+    "mem": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz",
+      "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=",
+      "dev": true,
+      "requires": {
+        "mimic-fn": "1.2.0"
+      }
+    },
+    "memory-fs": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
+      "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=",
+      "dev": true,
+      "requires": {
+        "errno": "0.1.7",
+        "readable-stream": "2.3.5"
+      }
+    },
     "meow": {
       "version": "3.7.0",
       "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
@@ -3695,8 +5430,28 @@
         "read-pkg-up": "1.0.1",
         "redent": "1.0.0",
         "trim-newlines": "1.0.0"
+      },
+      "dependencies": {
+        "minimist": {
+          "version": "1.2.0",
+          "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+          "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+          "dev": true
+        }
       }
     },
+    "merge-descriptors": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
+      "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=",
+      "dev": true
+    },
+    "methods": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+      "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=",
+      "dev": true
+    },
     "micromatch": {
       "version": "2.3.11",
       "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
@@ -3728,6 +5483,12 @@
         "brorand": "1.1.0"
       }
     },
+    "mime": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+      "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+      "dev": true
+    },
     "mime-db": {
       "version": "1.33.0",
       "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz",
@@ -3743,6 +5504,12 @@
         "mime-db": "1.33.0"
       }
     },
+    "mimic-fn": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
+      "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
+      "dev": true
+    },
     "minimalistic-assert": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz",
@@ -3761,15 +5528,33 @@
       "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
       "dev": true,
       "requires": {
-        "brace-expansion": "1.1.8"
+        "brace-expansion": "1.1.11"
       }
     },
     "minimist": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
-      "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+      "version": "0.0.8",
+      "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+      "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
       "dev": true
     },
+    "mississippi": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz",
+      "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==",
+      "dev": true,
+      "requires": {
+        "concat-stream": "1.6.1",
+        "duplexify": "3.5.4",
+        "end-of-stream": "1.4.1",
+        "flush-write-stream": "1.0.2",
+        "from2": "2.3.0",
+        "parallel-transform": "1.1.0",
+        "pump": "2.0.1",
+        "pumpify": "1.4.0",
+        "stream-each": "1.2.2",
+        "through2": "2.0.3"
+      }
+    },
     "mixin-deep": {
       "version": "1.3.1",
       "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz",
@@ -3791,6 +5576,24 @@
         }
       }
     },
+    "mixin-object": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz",
+      "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=",
+      "dev": true,
+      "requires": {
+        "for-in": "0.1.8",
+        "is-extendable": "0.1.1"
+      },
+      "dependencies": {
+        "for-in": {
+          "version": "0.1.8",
+          "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz",
+          "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=",
+          "dev": true
+        }
+      }
+    },
     "mkdirp": {
       "version": "0.5.1",
       "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
@@ -3798,50 +5601,20 @@
       "dev": true,
       "requires": {
         "minimist": "0.0.8"
-      },
-      "dependencies": {
-        "minimist": {
-          "version": "0.0.8",
-          "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
-          "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
-          "dev": true
-        }
       }
     },
-    "module-deps": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-5.0.1.tgz",
-      "integrity": "sha512-sigq/hm/L+Z5IGi1DDl0x2ptkw7S86aFh213QhPLD8v9Opv90IHzKIuWJrRa5bJ77DVKHco2CfIEuThcT/vDJA==",
+    "move-concurrently": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
+      "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=",
       "dev": true,
       "requires": {
-        "JSONStream": "1.3.2",
-        "browser-resolve": "1.11.2",
-        "cached-path-relative": "1.0.1",
-        "concat-stream": "1.6.0",
-        "defined": "1.0.0",
-        "detective": "5.0.2",
-        "duplexer2": "0.1.4",
-        "inherits": "2.0.3",
-        "parents": "1.0.1",
-        "readable-stream": "2.3.3",
-        "resolve": "1.5.0",
-        "stream-combiner2": "1.1.1",
-        "subarg": "1.0.0",
-        "through2": "2.0.3",
-        "xtend": "4.0.1"
-      },
-      "dependencies": {
-        "concat-stream": {
-          "version": "1.6.0",
-          "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz",
-          "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=",
-          "dev": true,
-          "requires": {
-            "inherits": "2.0.3",
-            "readable-stream": "2.3.3",
-            "typedarray": "0.0.6"
-          }
-        }
+        "aproba": "1.2.0",
+        "copy-concurrently": "1.0.5",
+        "fs-write-stream-atomic": "1.0.10",
+        "mkdirp": "0.5.1",
+        "rimraf": "2.6.2",
+        "run-queue": "1.0.3"
       }
     },
     "ms": {
@@ -3850,10 +5623,26 @@
       "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
       "dev": true
     },
+    "multicast-dns": {
+      "version": "6.2.3",
+      "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz",
+      "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==",
+      "dev": true,
+      "requires": {
+        "dns-packet": "1.3.1",
+        "thunky": "1.0.2"
+      }
+    },
+    "multicast-dns-service-types": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz",
+      "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=",
+      "dev": true
+    },
     "nan": {
-      "version": "2.8.0",
-      "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz",
-      "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=",
+      "version": "2.9.2",
+      "resolved": "https://registry.npmjs.org/nan/-/nan-2.9.2.tgz",
+      "integrity": "sha512-ltW65co7f3PQWBDbqVvaU1WtFJUsNW7sWWm4HINhbMQIyVyzIeyZ8toX5TC5eeooE6piZoaEh4cZkueSKG3KYw==",
       "dev": true
     },
     "nanomatch": {
@@ -3872,7 +5661,7 @@
         "kind-of": "6.0.2",
         "object.pick": "1.3.0",
         "regex-not": "1.0.2",
-        "snapdragon": "0.8.1",
+        "snapdragon": "0.8.2",
         "to-regex": "3.0.2"
       },
       "dependencies": {
@@ -3896,11 +5685,47 @@
         }
       }
     },
+    "ncname": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/ncname/-/ncname-1.0.0.tgz",
+      "integrity": "sha1-W1etGLHKCShk72Kwse2BlPODtxw=",
+      "dev": true,
+      "requires": {
+        "xml-char-classes": "1.0.0"
+      }
+    },
+    "negotiator": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
+      "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=",
+      "dev": true
+    },
+    "neo-async": {
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.0.tgz",
+      "integrity": "sha512-nJmSswG4As/MkRq7QZFuH/sf/yuv8ODdMZrY4Bedjp77a5MK4A6s7YbBB64c9u79EBUOfXUXBvArmvzTD0X+6g==",
+      "dev": true
+    },
     "ng2-dnd": {
       "version": "5.0.2",
       "resolved": "https://registry.npmjs.org/ng2-dnd/-/ng2-dnd-5.0.2.tgz",
       "integrity": "sha512-5mWWBePwvEPsNd/HkdbD543Q9mPyJofL6zkNydl8/Ah3qrrvZT2DaEPbknY08OgkXpI2qUGksc01OzzVlRQ9dQ=="
     },
+    "no-case": {
+      "version": "2.3.2",
+      "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz",
+      "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==",
+      "dev": true,
+      "requires": {
+        "lower-case": "1.1.4"
+      }
+    },
+    "node-forge": {
+      "version": "0.7.1",
+      "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.1.tgz",
+      "integrity": "sha1-naYR6giYL0uUIGs760zJZl8gwwA=",
+      "dev": true
+    },
     "node-gyp": {
       "version": "3.6.2",
       "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz",
@@ -3915,13 +5740,22 @@
         "nopt": "3.0.6",
         "npmlog": "4.1.2",
         "osenv": "0.1.5",
-        "request": "2.79.0",
+        "request": "2.81.0",
         "rimraf": "2.6.2",
         "semver": "5.3.0",
         "tar": "2.2.1",
         "which": "1.3.0"
       },
       "dependencies": {
+        "nopt": {
+          "version": "3.0.6",
+          "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
+          "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
+          "dev": true,
+          "requires": {
+            "abbrev": "1.1.1"
+          }
+        },
         "semver": {
           "version": "5.3.0",
           "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
@@ -3930,17 +5764,54 @@
         }
       }
     },
-    "node-sass": {
-      "version": "4.7.2",
-      "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.7.2.tgz",
-      "integrity": "sha512-CaV+wLqZ7//Jdom5aUFCpGNoECd7BbNhjuwdsX/LkXBrHl8eb1Wjw4HvWqcFvhr5KuNgAk8i/myf/MQ1YYeroA==",
+    "node-libs-browser": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz",
+      "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==",
       "dev": true,
       "requires": {
-        "async-foreach": "0.1.3",
-        "chalk": "1.1.3",
-        "cross-spawn": "3.0.1",
-        "gaze": "1.1.2",
-        "get-stdin": "4.0.1",
+        "assert": "1.4.1",
+        "browserify-zlib": "0.2.0",
+        "buffer": "4.9.1",
+        "console-browserify": "1.1.0",
+        "constants-browserify": "1.0.0",
+        "crypto-browserify": "3.12.0",
+        "domain-browser": "1.2.0",
+        "events": "1.1.1",
+        "https-browserify": "1.0.0",
+        "os-browserify": "0.3.0",
+        "path-browserify": "0.0.0",
+        "process": "0.11.10",
+        "punycode": "1.4.1",
+        "querystring-es3": "0.2.1",
+        "readable-stream": "2.3.5",
+        "stream-browserify": "2.0.1",
+        "stream-http": "2.8.0",
+        "string_decoder": "1.0.3",
+        "timers-browserify": "2.0.6",
+        "tty-browserify": "0.0.0",
+        "url": "0.11.0",
+        "util": "0.10.3",
+        "vm-browserify": "0.0.4"
+      }
+    },
+    "node-modules-path": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/node-modules-path/-/node-modules-path-1.0.1.tgz",
+      "integrity": "sha1-QAlrCM560OoUaAhjr0ScfHWl0cg=",
+      "dev": true
+    },
+    "node-sass": {
+      "version": "4.8.2",
+      "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.8.2.tgz",
+      "integrity": "sha512-YQ9eAgtcSIqMGZO5BCIJRd/XCIz6cQuc8pChE3ZW0ANn2Yz0f2G0M6yqVg/1hXopScbJsmcyVt4ar7fJCmeldw==",
+      "dev": true,
+      "requires": {
+        "async-foreach": "0.1.3",
+        "chalk": "1.1.3",
+        "cross-spawn": "3.0.1",
+        "gaze": "1.1.2",
+        "get-stdin": "4.0.1",
         "glob": "7.1.2",
         "in-publish": "2.0.0",
         "lodash.assign": "4.2.0",
@@ -3948,19 +5819,104 @@
         "lodash.mergewith": "4.6.1",
         "meow": "3.7.0",
         "mkdirp": "0.5.1",
-        "nan": "2.8.0",
+        "nan": "2.9.2",
         "node-gyp": "3.6.2",
         "npmlog": "4.1.2",
         "request": "2.79.0",
         "sass-graph": "2.2.4",
         "stdout-stream": "1.4.0",
         "true-case-path": "1.0.2"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "2.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+          "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+          "dev": true
+        },
+        "caseless": {
+          "version": "0.11.0",
+          "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz",
+          "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=",
+          "dev": true
+        },
+        "chalk": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+          "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "2.2.1",
+            "escape-string-regexp": "1.0.5",
+            "has-ansi": "2.0.0",
+            "strip-ansi": "3.0.1",
+            "supports-color": "2.0.0"
+          }
+        },
+        "har-validator": {
+          "version": "2.0.6",
+          "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
+          "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=",
+          "dev": true,
+          "requires": {
+            "chalk": "1.1.3",
+            "commander": "2.14.1",
+            "is-my-json-valid": "2.17.2",
+            "pinkie-promise": "2.0.1"
+          }
+        },
+        "qs": {
+          "version": "6.3.2",
+          "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz",
+          "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=",
+          "dev": true
+        },
+        "request": {
+          "version": "2.79.0",
+          "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz",
+          "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=",
+          "dev": true,
+          "requires": {
+            "aws-sign2": "0.6.0",
+            "aws4": "1.6.0",
+            "caseless": "0.11.0",
+            "combined-stream": "1.0.6",
+            "extend": "3.0.1",
+            "forever-agent": "0.6.1",
+            "form-data": "2.1.4",
+            "har-validator": "2.0.6",
+            "hawk": "3.1.3",
+            "http-signature": "1.1.1",
+            "is-typedarray": "1.0.0",
+            "isstream": "0.1.2",
+            "json-stringify-safe": "5.0.1",
+            "mime-types": "2.1.18",
+            "oauth-sign": "0.8.2",
+            "qs": "6.3.2",
+            "stringstream": "0.0.5",
+            "tough-cookie": "2.3.4",
+            "tunnel-agent": "0.4.3",
+            "uuid": "3.2.1"
+          }
+        },
+        "supports-color": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+          "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+          "dev": true
+        },
+        "tunnel-agent": {
+          "version": "0.4.3",
+          "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
+          "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=",
+          "dev": true
+        }
       }
     },
     "nodemon": {
-      "version": "1.17.1",
-      "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.17.1.tgz",
-      "integrity": "sha512-p6+IG/eJyprjRd95na0efIWl3ONITHydCdl7btEIZttvnmXX4aqxIE45Aj+zeT0llJIUfJnZNyAX14XIdjJtmw==",
+      "version": "1.17.2",
+      "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.17.2.tgz",
+      "integrity": "sha512-v1fVfgaZanBHP/ZOc9V72uKKIF4dcRfZV7GISNVi/w/g5pwB7nIvOK+RGULjrzhs97cwUX41cM4+dlw+bg2igw==",
       "dev": true,
       "requires": {
         "chokidar": "2.0.2",
@@ -3969,7 +5925,7 @@
         "minimatch": "3.0.4",
         "pstree.remy": "1.1.0",
         "semver": "5.5.0",
-        "supports-color": "5.2.0",
+        "supports-color": "5.3.0",
         "touch": "3.1.0",
         "undefsafe": "2.0.2",
         "update-notifier": "2.3.0"
@@ -4011,7 +5967,7 @@
             "isobject": "3.0.1",
             "kind-of": "6.0.2",
             "repeat-element": "1.1.2",
-            "snapdragon": "0.8.1",
+            "snapdragon": "0.8.2",
             "snapdragon-node": "2.1.1",
             "split-string": "3.1.0",
             "to-regex": "3.0.2"
@@ -4057,6 +6013,15 @@
             "upath": "1.0.4"
           }
         },
+        "debug": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+          "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
         "expand-brackets": {
           "version": "2.1.4",
           "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
@@ -4068,7 +6033,7 @@
             "extend-shallow": "2.0.1",
             "posix-character-classes": "0.1.1",
             "regex-not": "1.0.2",
-            "snapdragon": "0.8.1",
+            "snapdragon": "0.8.2",
             "to-regex": "3.0.2"
           },
           "dependencies": {
@@ -4130,7 +6095,7 @@
             "extend-shallow": "2.0.1",
             "fragment-cache": "0.2.1",
             "regex-not": "1.0.2",
-            "snapdragon": "0.8.1",
+            "snapdragon": "0.8.2",
             "to-regex": "3.0.2"
           },
           "dependencies": {
@@ -4198,6 +6163,12 @@
             }
           }
         },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
         "is-accessor-descriptor": {
           "version": "0.1.6",
           "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
@@ -4213,7 +6184,7 @@
               "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
               "dev": true,
               "requires": {
-                "is-buffer": "1.1.5"
+                "is-buffer": "1.1.6"
               }
             }
           }
@@ -4233,7 +6204,7 @@
               "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
               "dev": true,
               "requires": {
-                "is-buffer": "1.1.5"
+                "is-buffer": "1.1.6"
               }
             }
           }
@@ -4268,7 +6239,7 @@
               "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
               "dev": true,
               "requires": {
-                "is-buffer": "1.1.5"
+                "is-buffer": "1.1.6"
               }
             }
           }
@@ -4302,14 +6273,14 @@
             "nanomatch": "1.2.9",
             "object.pick": "1.3.0",
             "regex-not": "1.0.2",
-            "snapdragon": "0.8.1",
+            "snapdragon": "0.8.2",
             "to-regex": "3.0.2"
           }
         },
         "supports-color": {
-          "version": "5.2.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz",
-          "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==",
+          "version": "5.3.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz",
+          "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==",
           "dev": true,
           "requires": {
             "has-flag": "3.0.0"
@@ -4318,12 +6289,13 @@
       }
     },
     "nopt": {
-      "version": "3.0.6",
-      "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
-      "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
+      "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
       "dev": true,
       "requires": {
-        "abbrev": "1.1.1"
+        "abbrev": "1.1.1",
+        "osenv": "0.1.5"
       }
     },
     "normalize-package-data": {
@@ -4332,10 +6304,10 @@
       "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
       "dev": true,
       "requires": {
-        "hosted-git-info": "2.5.0",
+        "hosted-git-info": "2.6.0",
         "is-builtin-module": "1.0.0",
         "semver": "5.5.0",
-        "validate-npm-package-license": "3.0.1"
+        "validate-npm-package-license": "3.0.3"
       }
     },
     "normalize-path": {
@@ -4347,6 +6319,12 @@
         "remove-trailing-separator": "1.1.0"
       }
     },
+    "normalize-range": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
+      "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=",
+      "dev": true
+    },
     "npm-run-path": {
       "version": "2.0.2",
       "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
@@ -4368,6 +6346,21 @@
         "set-blocking": "2.0.0"
       }
     },
+    "nth-check": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz",
+      "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=",
+      "dev": true,
+      "requires": {
+        "boolbase": "1.0.0"
+      }
+    },
+    "num2fraction": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz",
+      "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=",
+      "dev": true
+    },
     "number-is-nan": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
@@ -4445,6 +6438,12 @@
         }
       }
     },
+    "object-keys": {
+      "version": "1.0.11",
+      "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz",
+      "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=",
+      "dev": true
+    },
     "object-visit": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
@@ -4489,6 +6488,27 @@
         }
       }
     },
+    "obuf": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz",
+      "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==",
+      "dev": true
+    },
+    "on-finished": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+      "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
+      "dev": true,
+      "requires": {
+        "ee-first": "1.1.1"
+      }
+    },
+    "on-headers": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz",
+      "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=",
+      "dev": true
+    },
     "once": {
       "version": "1.4.0",
       "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -4498,6 +6518,36 @@
         "wrappy": "1.0.2"
       }
     },
+    "opn": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/opn/-/opn-5.1.0.tgz",
+      "integrity": "sha512-iPNl7SyM8L30Rm1sjGdLLheyHVw5YXVfi3SKWJzBI7efxRwHojfRFjwE/OLM6qp9xJYMgab8WicTU1cPoY+Hpg==",
+      "dev": true,
+      "requires": {
+        "is-wsl": "1.1.0"
+      }
+    },
+    "original": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/original/-/original-1.0.0.tgz",
+      "integrity": "sha1-kUf5P6FpbQS+YeAb1QuurKZWvTs=",
+      "dev": true,
+      "requires": {
+        "url-parse": "1.0.5"
+      },
+      "dependencies": {
+        "url-parse": {
+          "version": "1.0.5",
+          "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.0.5.tgz",
+          "integrity": "sha1-CFSGBCKv3P7+tsllxmLUgAFpkns=",
+          "dev": true,
+          "requires": {
+            "querystringify": "0.0.4",
+            "requires-port": "1.0.0"
+          }
+        }
+      }
+    },
     "os-browserify": {
       "version": "0.3.0",
       "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
@@ -4541,6 +6591,36 @@
       "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
       "dev": true
     },
+    "p-limit": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz",
+      "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==",
+      "dev": true,
+      "requires": {
+        "p-try": "1.0.0"
+      }
+    },
+    "p-locate": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
+      "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
+      "dev": true,
+      "requires": {
+        "p-limit": "1.2.0"
+      }
+    },
+    "p-map": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz",
+      "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==",
+      "dev": true
+    },
+    "p-try": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
+      "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
+      "dev": true
+    },
     "package-json": {
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz",
@@ -4559,13 +6639,24 @@
       "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==",
       "dev": true
     },
-    "parents": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz",
-      "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=",
+    "parallel-transform": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz",
+      "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=",
+      "dev": true,
+      "requires": {
+        "cyclist": "0.2.2",
+        "inherits": "2.0.3",
+        "readable-stream": "2.3.5"
+      }
+    },
+    "param-case": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz",
+      "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=",
       "dev": true,
       "requires": {
-        "path-platform": "0.11.15"
+        "no-case": "2.3.2"
       }
     },
     "parse-asn1": {
@@ -4574,7 +6665,7 @@
       "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=",
       "dev": true,
       "requires": {
-        "asn1.js": "4.9.2",
+        "asn1.js": "4.10.1",
         "browserify-aes": "1.1.1",
         "create-hash": "1.1.3",
         "evp_bytestokey": "1.0.3",
@@ -4602,6 +6693,12 @@
         "error-ex": "1.3.1"
       }
     },
+    "parseurl": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
+      "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=",
+      "dev": true
+    },
     "pascalcase": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
@@ -4621,13 +6718,10 @@
       "dev": true
     },
     "path-exists": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
-      "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
-      "dev": true,
-      "requires": {
-        "pinkie-promise": "2.0.1"
-      }
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+      "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+      "dev": true
     },
     "path-is-absolute": {
       "version": "1.0.1",
@@ -4653,21 +6747,19 @@
       "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
       "dev": true
     },
-    "path-platform": {
-      "version": "0.11.15",
-      "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz",
-      "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=",
+    "path-to-regexp": {
+      "version": "0.1.7",
+      "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
+      "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=",
       "dev": true
     },
     "path-type": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
-      "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
+      "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
       "dev": true,
       "requires": {
-        "graceful-fs": "4.1.11",
-        "pify": "2.3.0",
-        "pinkie-promise": "2.0.1"
+        "pify": "3.0.0"
       }
     },
     "pause-stream": {
@@ -4689,18 +6781,24 @@
         "create-hmac": "1.1.6",
         "ripemd160": "2.0.1",
         "safe-buffer": "5.1.1",
-        "sha.js": "2.4.9"
+        "sha.js": "2.4.10"
       }
     },
+    "performance-now": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz",
+      "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=",
+      "dev": true
+    },
     "photoswipe": {
       "version": "4.1.2",
       "resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-4.1.2.tgz",
       "integrity": "sha1-lcIKdc6iO3DWKZZBytguA8rn95c="
     },
     "pify": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
-      "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+      "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
       "dev": true
     },
     "pinkie": {
@@ -4718,12 +6816,160 @@
         "pinkie": "2.0.4"
       }
     },
+    "pkg-dir": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
+      "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=",
+      "dev": true,
+      "requires": {
+        "find-up": "2.1.0"
+      }
+    },
+    "portfinder": {
+      "version": "1.0.13",
+      "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz",
+      "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=",
+      "dev": true,
+      "requires": {
+        "async": "1.5.2",
+        "debug": "2.6.9",
+        "mkdirp": "0.5.1"
+      },
+      "dependencies": {
+        "async": {
+          "version": "1.5.2",
+          "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
+          "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
+          "dev": true
+        }
+      }
+    },
     "posix-character-classes": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
       "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
       "dev": true
     },
+    "postcss": {
+      "version": "6.0.19",
+      "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.19.tgz",
+      "integrity": "sha512-f13HRz0HtVwVaEuW6J6cOUCBLFtymhgyLPV7t4QEk2UD3twRI9IluDcQNdzQdBpiixkXj2OmzejhhTbSbDxNTg==",
+      "dev": true,
+      "requires": {
+        "chalk": "2.3.2",
+        "source-map": "0.6.1",
+        "supports-color": "5.3.0"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "2.3.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz",
+          "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "3.2.1",
+            "escape-string-regexp": "1.0.5",
+            "supports-color": "5.3.0"
+          }
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "5.3.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz",
+          "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==",
+          "dev": true,
+          "requires": {
+            "has-flag": "3.0.0"
+          }
+        }
+      }
+    },
+    "postcss-import": {
+      "version": "11.1.0",
+      "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz",
+      "integrity": "sha512-5l327iI75POonjxkXgdRCUS+AlzAdBx4pOvMEhTKTCjb1p8IEeVR9yx3cPbmN7LIWJLbfnIXxAhoB4jpD0c/Cw==",
+      "dev": true,
+      "requires": {
+        "postcss": "6.0.19",
+        "postcss-value-parser": "3.3.0",
+        "read-cache": "1.0.0",
+        "resolve": "1.5.0"
+      }
+    },
+    "postcss-load-config": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz",
+      "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=",
+      "dev": true,
+      "requires": {
+        "cosmiconfig": "2.2.2",
+        "object-assign": "4.1.1",
+        "postcss-load-options": "1.2.0",
+        "postcss-load-plugins": "2.3.0"
+      }
+    },
+    "postcss-load-options": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz",
+      "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=",
+      "dev": true,
+      "requires": {
+        "cosmiconfig": "2.2.2",
+        "object-assign": "4.1.1"
+      }
+    },
+    "postcss-load-plugins": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz",
+      "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=",
+      "dev": true,
+      "requires": {
+        "cosmiconfig": "2.2.2",
+        "object-assign": "4.1.1"
+      }
+    },
+    "postcss-loader": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.1.tgz",
+      "integrity": "sha512-f0J/DWE/hyO9/LH0WHpXkny/ZZ238sSaG3p1SRBtVZnFWUtD7GXIEgHoBg8cnAeRbmEvUxHQptY46zWfwNYj/w==",
+      "dev": true,
+      "requires": {
+        "loader-utils": "1.1.0",
+        "postcss": "6.0.19",
+        "postcss-load-config": "1.2.0",
+        "schema-utils": "0.4.5"
+      }
+    },
+    "postcss-url": {
+      "version": "7.3.1",
+      "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.1.tgz",
+      "integrity": "sha512-Ya5KIjGptgz0OtrVYfi2UbLxVAZ6Emc4Of+Grx4Sf1deWlRpFwLr8FrtkUxfqh+XiZIVkXbjQrddE10ESpNmdA==",
+      "dev": true,
+      "requires": {
+        "mime": "1.6.0",
+        "minimatch": "3.0.4",
+        "mkdirp": "0.5.1",
+        "postcss": "6.0.19",
+        "xxhashjs": "0.2.2"
+      }
+    },
+    "postcss-value-parser": {
+      "version": "3.3.0",
+      "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz",
+      "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=",
+      "dev": true
+    },
     "prepend-http": {
       "version": "1.0.4",
       "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
@@ -4736,6 +6982,16 @@
       "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=",
       "dev": true
     },
+    "pretty-error": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz",
+      "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=",
+      "dev": true,
+      "requires": {
+        "renderkid": "2.0.1",
+        "utila": "0.4.0"
+      }
+    },
     "process": {
       "version": "0.11.10",
       "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
@@ -4743,9 +6999,41 @@
       "dev": true
     },
     "process-nextick-args": {
-      "version": "1.0.7",
-      "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
-      "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
+      "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
+      "dev": true
+    },
+    "promise": {
+      "version": "7.3.1",
+      "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
+      "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "asap": "2.0.6"
+      }
+    },
+    "promise-inflight": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",
+      "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=",
+      "dev": true
+    },
+    "proxy-addr": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz",
+      "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==",
+      "dev": true,
+      "requires": {
+        "forwarded": "0.1.2",
+        "ipaddr.js": "1.6.0"
+      }
+    },
+    "prr": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
+      "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
       "dev": true
     },
     "ps-tree": {
@@ -4785,6 +7073,27 @@
         "randombytes": "2.0.6"
       }
     },
+    "pump": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
+      "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
+      "dev": true,
+      "requires": {
+        "end-of-stream": "1.4.1",
+        "once": "1.4.0"
+      }
+    },
+    "pumpify": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz",
+      "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==",
+      "dev": true,
+      "requires": {
+        "duplexify": "3.5.4",
+        "inherits": "2.0.3",
+        "pump": "2.0.1"
+      }
+    },
     "punycode": {
       "version": "1.4.1",
       "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
@@ -4792,9 +7101,9 @@
       "dev": true
     },
     "qs": {
-      "version": "6.3.2",
-      "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz",
-      "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=",
+      "version": "6.4.0",
+      "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz",
+      "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=",
       "dev": true
     },
     "querystring": {
@@ -4809,6 +7118,12 @@
       "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
       "dev": true
     },
+    "querystringify": {
+      "version": "0.0.4",
+      "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-0.0.4.tgz",
+      "integrity": "sha1-DPf4T5Rj/wrlHExLFC2VvjdyTZw=",
+      "dev": true
+    },
     "randomatic": {
       "version": "1.1.7",
       "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz",
@@ -4834,7 +7149,7 @@
               "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
               "dev": true,
               "requires": {
-                "is-buffer": "1.1.5"
+                "is-buffer": "1.1.6"
               }
             }
           }
@@ -4845,7 +7160,7 @@
           "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
           "dev": true,
           "requires": {
-            "is-buffer": "1.1.5"
+            "is-buffer": "1.1.6"
           }
         }
       }
@@ -4860,34 +7175,74 @@
       }
     },
     "randomfill": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.3.tgz",
-      "integrity": "sha512-YL6GrhrWoic0Eq8rXVbMptH7dAxCs0J+mh5Y0euNekPPYaxEmdVGim6GdoxoRzKW2yJoU8tueifS7mYxvcFDEQ==",
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
+      "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
       "dev": true,
       "requires": {
         "randombytes": "2.0.6",
         "safe-buffer": "5.1.1"
       }
     },
+    "range-parser": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
+      "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=",
+      "dev": true
+    },
+    "raw-body": {
+      "version": "2.3.2",
+      "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz",
+      "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=",
+      "dev": true,
+      "requires": {
+        "bytes": "3.0.0",
+        "http-errors": "1.6.2",
+        "iconv-lite": "0.4.19",
+        "unpipe": "1.0.0"
+      }
+    },
+    "raw-loader": {
+      "version": "0.5.1",
+      "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz",
+      "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=",
+      "dev": true
+    },
     "rc": {
-      "version": "1.2.5",
-      "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.5.tgz",
-      "integrity": "sha1-J1zWh/bjs2zHVrqibf7oCnkDAf0=",
+      "version": "1.2.6",
+      "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.6.tgz",
+      "integrity": "sha1-6xiYnG1PTxYsOZ953dKfODVWgJI=",
       "dev": true,
       "requires": {
         "deep-extend": "0.4.2",
         "ini": "1.3.5",
         "minimist": "1.2.0",
         "strip-json-comments": "2.0.1"
+      },
+      "dependencies": {
+        "minimist": {
+          "version": "1.2.0",
+          "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+          "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+          "dev": true
+        }
       }
     },
-    "read-only-stream": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz",
-      "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=",
+    "read-cache": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
+      "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=",
       "dev": true,
       "requires": {
-        "readable-stream": "2.3.3"
+        "pify": "2.3.0"
+      },
+      "dependencies": {
+        "pify": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+          "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+          "dev": true
+        }
       }
     },
     "read-pkg": {
@@ -4899,6 +7254,25 @@
         "load-json-file": "1.1.0",
         "normalize-package-data": "2.4.0",
         "path-type": "1.1.0"
+      },
+      "dependencies": {
+        "path-type": {
+          "version": "1.1.0",
+          "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
+          "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
+          "dev": true,
+          "requires": {
+            "graceful-fs": "4.1.11",
+            "pify": "2.3.0",
+            "pinkie-promise": "2.0.1"
+          }
+        },
+        "pify": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+          "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+          "dev": true
+        }
       }
     },
     "read-pkg-up": {
@@ -4909,32 +7283,42 @@
       "requires": {
         "find-up": "1.1.2",
         "read-pkg": "1.1.0"
+      },
+      "dependencies": {
+        "find-up": {
+          "version": "1.1.2",
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
+          "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
+          "dev": true,
+          "requires": {
+            "path-exists": "2.1.0",
+            "pinkie-promise": "2.0.1"
+          }
+        },
+        "path-exists": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
+          "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
+          "dev": true,
+          "requires": {
+            "pinkie-promise": "2.0.1"
+          }
+        }
       }
     },
     "readable-stream": {
-      "version": "2.3.3",
-      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
-      "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
+      "version": "2.3.5",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz",
+      "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==",
       "dev": true,
       "requires": {
         "core-util-is": "1.0.2",
         "inherits": "2.0.3",
         "isarray": "1.0.0",
-        "process-nextick-args": "1.0.7",
+        "process-nextick-args": "2.0.0",
         "safe-buffer": "5.1.1",
         "string_decoder": "1.0.3",
         "util-deprecate": "1.0.2"
-      },
-      "dependencies": {
-        "string_decoder": {
-          "version": "1.0.3",
-          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
-          "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
-          "dev": true,
-          "requires": {
-            "safe-buffer": "5.1.1"
-          }
-        }
       }
     },
     "readdirp": {
@@ -4945,7 +7329,7 @@
       "requires": {
         "graceful-fs": "4.1.11",
         "minimatch": "3.0.4",
-        "readable-stream": "2.3.3",
+        "readable-stream": "2.3.5",
         "set-immediate-shim": "1.0.1"
       }
     },
@@ -4965,6 +7349,12 @@
       "integrity": "sha512-n+IyV+nGz3+0q3/Yf1ra12KpCyi001bi4XFxSjbiWWjfqb52iTTtpGXmCCAOWWIAn9KEuFZKGqBERHmrtScZ3A==",
       "dev": true
     },
+    "regenerator-runtime": {
+      "version": "0.11.1",
+      "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
+      "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
+      "dev": true
+    },
     "regex-cache": {
       "version": "0.4.4",
       "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz",
@@ -4990,7 +7380,7 @@
       "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==",
       "dev": true,
       "requires": {
-        "rc": "1.2.5",
+        "rc": "1.2.6",
         "safe-buffer": "5.1.1"
       }
     },
@@ -5000,15 +7390,42 @@
       "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=",
       "dev": true,
       "requires": {
-        "rc": "1.2.5"
+        "rc": "1.2.6"
       }
     },
+    "relateurl": {
+      "version": "0.2.7",
+      "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
+      "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=",
+      "dev": true
+    },
     "remove-trailing-separator": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
       "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
       "dev": true
     },
+    "renderkid": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz",
+      "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=",
+      "dev": true,
+      "requires": {
+        "css-select": "1.2.0",
+        "dom-converter": "0.1.4",
+        "htmlparser2": "3.3.0",
+        "strip-ansi": "3.0.1",
+        "utila": "0.3.3"
+      },
+      "dependencies": {
+        "utila": {
+          "version": "0.3.3",
+          "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz",
+          "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=",
+          "dev": true
+        }
+      }
+    },
     "repeat-element": {
       "version": "1.1.2",
       "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",
@@ -5031,19 +7448,19 @@
       }
     },
     "request": {
-      "version": "2.79.0",
-      "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz",
-      "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=",
+      "version": "2.81.0",
+      "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz",
+      "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=",
       "dev": true,
       "requires": {
         "aws-sign2": "0.6.0",
         "aws4": "1.6.0",
-        "caseless": "0.11.0",
+        "caseless": "0.12.0",
         "combined-stream": "1.0.6",
         "extend": "3.0.1",
         "forever-agent": "0.6.1",
         "form-data": "2.1.4",
-        "har-validator": "2.0.6",
+        "har-validator": "4.2.1",
         "hawk": "3.1.3",
         "http-signature": "1.1.1",
         "is-typedarray": "1.0.0",
@@ -5051,10 +7468,12 @@
         "json-stringify-safe": "5.0.1",
         "mime-types": "2.1.18",
         "oauth-sign": "0.8.2",
-        "qs": "6.3.2",
+        "performance-now": "0.2.0",
+        "qs": "6.4.0",
+        "safe-buffer": "5.1.1",
         "stringstream": "0.0.5",
-        "tough-cookie": "2.3.3",
-        "tunnel-agent": "0.4.3",
+        "tough-cookie": "2.3.4",
+        "tunnel-agent": "0.6.0",
         "uuid": "3.2.1"
       }
     },
@@ -5064,12 +7483,24 @@
       "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
       "dev": true
     },
+    "require-from-string": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz",
+      "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=",
+      "dev": true
+    },
     "require-main-filename": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
       "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
       "dev": true
     },
+    "requires-port": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
+      "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
+      "dev": true
+    },
     "resolve": {
       "version": "1.5.0",
       "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz",
@@ -5079,6 +7510,21 @@
         "path-parse": "1.0.5"
       }
     },
+    "resolve-cwd": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz",
+      "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=",
+      "dev": true,
+      "requires": {
+        "resolve-from": "3.0.0"
+      }
+    },
+    "resolve-from": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
+      "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=",
+      "dev": true
+    },
     "resolve-url": {
       "version": "0.2.1",
       "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
@@ -5091,6 +7537,15 @@
       "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
       "dev": true
     },
+    "right-align": {
+      "version": "0.1.3",
+      "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
+      "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
+      "dev": true,
+      "requires": {
+        "align-text": "0.1.4"
+      }
+    },
     "rimraf": {
       "version": "2.6.2",
       "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
@@ -5110,21 +7565,22 @@
         "inherits": "2.0.3"
       }
     },
+    "run-queue": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz",
+      "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=",
+      "dev": true,
+      "requires": {
+        "aproba": "1.2.0"
+      }
+    },
     "rxjs": {
-      "version": "5.5.6",
-      "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.6.tgz",
-      "integrity": "sha512-v4Q5HDC0FHAQ7zcBX7T2IL6O5ltl1a2GX4ENjPXg6SjDY69Cmx9v4113C99a4wGF16ClPv5Z8mghuYorVkg/kg==",
+      "version": "5.5.7",
+      "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.7.tgz",
+      "integrity": "sha512-Hxo2ac8gRQjwjtKgukMIwBRbq5+KAeEV5hXM4obYBOAghev41bDQWgFH4svYiU9UnQ5kNww2LgfyBdevCd2HXA==",
       "dev": true,
       "requires": {
         "symbol-observable": "1.0.1"
-      },
-      "dependencies": {
-        "symbol-observable": {
-          "version": "1.0.1",
-          "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz",
-          "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=",
-          "dev": true
-        }
       }
     },
     "safe-buffer": {
@@ -5154,6 +7610,35 @@
         "yargs": "7.1.0"
       }
     },
+    "sass-loader": {
+      "version": "6.0.7",
+      "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-6.0.7.tgz",
+      "integrity": "sha512-JoiyD00Yo1o61OJsoP2s2kb19L1/Y2p3QFcCdWdF6oomBGKVYuZyqHWemRBfQ2uGYsk+CH3eCguXNfpjzlcpaA==",
+      "dev": true,
+      "requires": {
+        "clone-deep": "2.0.2",
+        "loader-utils": "1.1.0",
+        "lodash.tail": "4.1.1",
+        "neo-async": "2.5.0",
+        "pify": "3.0.0"
+      }
+    },
+    "sax": {
+      "version": "0.5.8",
+      "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz",
+      "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=",
+      "dev": true
+    },
+    "schema-utils": {
+      "version": "0.4.5",
+      "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz",
+      "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==",
+      "dev": true,
+      "requires": {
+        "ajv": "6.2.1",
+        "ajv-keywords": "3.1.0"
+      }
+    },
     "scss-tokenizer": {
       "version": "0.2.3",
       "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz",
@@ -5175,6 +7660,21 @@
         }
       }
     },
+    "select-hose": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
+      "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=",
+      "dev": true
+    },
+    "selfsigned": {
+      "version": "1.10.2",
+      "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.2.tgz",
+      "integrity": "sha1-tESVgNmZKbZbEKSDiTAaZZIIh1g=",
+      "dev": true,
+      "requires": {
+        "node-forge": "0.7.1"
+      }
+    },
     "semver": {
       "version": "5.5.0",
       "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
@@ -5190,21 +7690,83 @@
         "semver": "5.5.0"
       }
     },
-    "set-blocking": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
-      "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
+    "semver-intersect": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.3.1.tgz",
+      "integrity": "sha1-j6hKnhAovSOeRTDRo+GB5pjYhLo=",
+      "dev": true,
+      "requires": {
+        "semver": "5.5.0"
+      }
+    },
+    "send": {
+      "version": "0.16.1",
+      "resolved": "https://registry.npmjs.org/send/-/send-0.16.1.tgz",
+      "integrity": "sha512-ElCLJdJIKPk6ux/Hocwhk7NFHpI3pVm/IZOYWqUmoxcgeyM+MpxHHKhb8QmlJDX1pU6WrgaHBkVNm73Sv7uc2A==",
+      "dev": true,
+      "requires": {
+        "debug": "2.6.9",
+        "depd": "1.1.2",
+        "destroy": "1.0.4",
+        "encodeurl": "1.0.2",
+        "escape-html": "1.0.3",
+        "etag": "1.8.1",
+        "fresh": "0.5.2",
+        "http-errors": "1.6.2",
+        "mime": "1.4.1",
+        "ms": "2.0.0",
+        "on-finished": "2.3.0",
+        "range-parser": "1.2.0",
+        "statuses": "1.3.1"
+      },
+      "dependencies": {
+        "mime": {
+          "version": "1.4.1",
+          "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
+          "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==",
+          "dev": true
+        }
+      }
+    },
+    "serialize-javascript": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.4.0.tgz",
+      "integrity": "sha1-fJWFFNtqwkQ6irwGLcn3iGp/YAU=",
       "dev": true
     },
-    "set-getter": {
-      "version": "0.1.0",
-      "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz",
-      "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=",
+    "serve-index": {
+      "version": "1.9.1",
+      "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz",
+      "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=",
+      "dev": true,
+      "requires": {
+        "accepts": "1.3.5",
+        "batch": "0.6.1",
+        "debug": "2.6.9",
+        "escape-html": "1.0.3",
+        "http-errors": "1.6.2",
+        "mime-types": "2.1.18",
+        "parseurl": "1.3.2"
+      }
+    },
+    "serve-static": {
+      "version": "1.13.1",
+      "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.1.tgz",
+      "integrity": "sha512-hSMUZrsPa/I09VYFJwa627JJkNs0NrfL1Uzuup+GqHfToR2KcsXFymXSV90hoyw3M+msjFuQly+YzIH/q0MGlQ==",
       "dev": true,
       "requires": {
-        "to-object-path": "0.3.0"
+        "encodeurl": "1.0.2",
+        "escape-html": "1.0.3",
+        "parseurl": "1.3.2",
+        "send": "0.16.1"
       }
     },
+    "set-blocking": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+      "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
+      "dev": true
+    },
     "set-immediate-shim": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
@@ -5234,24 +7796,45 @@
         }
       }
     },
+    "setimmediate": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
+      "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=",
+      "dev": true
+    },
+    "setprototypeof": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
+      "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==",
+      "dev": true
+    },
     "sha.js": {
-      "version": "2.4.9",
-      "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz",
-      "integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==",
+      "version": "2.4.10",
+      "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.10.tgz",
+      "integrity": "sha512-vnwmrFDlOExK4Nm16J2KMWHLrp14lBrjxMxBJpu++EnsuBmpiYaM/MEs46Vxxm/4FvdP5yTwuCTO9it5FSjrqA==",
       "dev": true,
       "requires": {
         "inherits": "2.0.3",
         "safe-buffer": "5.1.1"
       }
     },
-    "shasum": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz",
-      "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=",
+    "shallow-clone": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz",
+      "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==",
       "dev": true,
       "requires": {
-        "json-stable-stringify": "0.0.1",
-        "sha.js": "2.4.9"
+        "is-extendable": "0.1.1",
+        "kind-of": "5.1.0",
+        "mixin-object": "2.0.1"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+          "dev": true
+        }
       }
     },
     "shebang-command": {
@@ -5269,28 +7852,31 @@
       "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
       "dev": true
     },
-    "shell-quote": {
-      "version": "1.6.1",
-      "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz",
-      "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=",
-      "dev": true,
-      "requires": {
-        "array-filter": "0.0.1",
-        "array-map": "0.0.0",
-        "array-reduce": "0.0.0",
-        "jsonify": "0.0.0"
-      }
-    },
     "signal-exit": {
       "version": "3.0.2",
       "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
       "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
       "dev": true
     },
+    "silent-error": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/silent-error/-/silent-error-1.1.0.tgz",
+      "integrity": "sha1-IglwbxyFCp8dENDYQJGLRvJuG8k=",
+      "dev": true,
+      "requires": {
+        "debug": "2.6.9"
+      }
+    },
+    "slash": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
+      "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
+      "dev": true
+    },
     "snapdragon": {
-      "version": "0.8.1",
-      "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.1.tgz",
-      "integrity": "sha1-4StUh/re0+PeoKyR6UAL91tAE3A=",
+      "version": "0.8.2",
+      "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
+      "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
       "dev": true,
       "requires": {
         "base": "0.11.2",
@@ -5300,18 +7886,9 @@
         "map-cache": "0.2.2",
         "source-map": "0.5.7",
         "source-map-resolve": "0.5.1",
-        "use": "2.0.2"
+        "use": "3.1.0"
       },
       "dependencies": {
-        "debug": {
-          "version": "2.6.9",
-          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
-          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
-          "dev": true,
-          "requires": {
-            "ms": "2.0.0"
-          }
-        },
         "define-property": {
           "version": "0.2.5",
           "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
@@ -5345,7 +7922,7 @@
               "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
               "dev": true,
               "requires": {
-                "is-buffer": "1.1.5"
+                "is-buffer": "1.1.6"
               }
             }
           }
@@ -5365,7 +7942,7 @@
               "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
               "dev": true,
               "requires": {
-                "is-buffer": "1.1.5"
+                "is-buffer": "1.1.6"
               }
             }
           }
@@ -5435,6 +8012,47 @@
         "hoek": "2.16.3"
       }
     },
+    "sockjs": {
+      "version": "0.3.19",
+      "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz",
+      "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==",
+      "dev": true,
+      "requires": {
+        "faye-websocket": "0.10.0",
+        "uuid": "3.2.1"
+      }
+    },
+    "sockjs-client": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.4.tgz",
+      "integrity": "sha1-W6vjhrd15M8U51IJEUUmVAFsixI=",
+      "dev": true,
+      "requires": {
+        "debug": "2.6.9",
+        "eventsource": "0.1.6",
+        "faye-websocket": "0.11.1",
+        "inherits": "2.0.3",
+        "json3": "3.3.2",
+        "url-parse": "1.2.0"
+      },
+      "dependencies": {
+        "faye-websocket": {
+          "version": "0.11.1",
+          "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz",
+          "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=",
+          "dev": true,
+          "requires": {
+            "websocket-driver": "0.7.0"
+          }
+        }
+      }
+    },
+    "source-list-map": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz",
+      "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==",
+      "dev": true
+    },
     "source-map": {
       "version": "0.5.7",
       "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
@@ -5455,20 +8073,12 @@
       }
     },
     "source-map-support": {
-      "version": "0.5.3",
-      "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.3.tgz",
-      "integrity": "sha512-eKkTgWYeBOQqFGXRfKabMFdnWepo51vWqEdoeikaEPFiJC7MCU5j2h4+6Q8npkZTeLGbSyecZvRxiSoWl3rh+w==",
+      "version": "0.4.18",
+      "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
+      "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
       "dev": true,
       "requires": {
-        "source-map": "0.6.1"
-      },
-      "dependencies": {
-        "source-map": {
-          "version": "0.6.1",
-          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
-          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
-          "dev": true
-        }
+        "source-map": "0.5.7"
       }
     },
     "source-map-url": {
@@ -5478,26 +8088,66 @@
       "dev": true
     },
     "spdx-correct": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz",
-      "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz",
+      "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==",
       "dev": true,
       "requires": {
-        "spdx-license-ids": "1.2.2"
+        "spdx-expression-parse": "3.0.0",
+        "spdx-license-ids": "3.0.0"
       }
     },
-    "spdx-expression-parse": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz",
-      "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=",
+    "spdx-exceptions": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz",
+      "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==",
       "dev": true
     },
+    "spdx-expression-parse": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
+      "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
+      "dev": true,
+      "requires": {
+        "spdx-exceptions": "2.1.0",
+        "spdx-license-ids": "3.0.0"
+      }
+    },
     "spdx-license-ids": {
-      "version": "1.2.2",
-      "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz",
-      "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz",
+      "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==",
       "dev": true
     },
+    "spdy": {
+      "version": "3.4.7",
+      "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz",
+      "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=",
+      "dev": true,
+      "requires": {
+        "debug": "2.6.9",
+        "handle-thing": "1.2.5",
+        "http-deceiver": "1.2.7",
+        "safe-buffer": "5.1.1",
+        "select-hose": "2.0.0",
+        "spdy-transport": "2.0.20"
+      }
+    },
+    "spdy-transport": {
+      "version": "2.0.20",
+      "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.0.20.tgz",
+      "integrity": "sha1-c15yBUxIayNU/onnAiVgBKOazk0=",
+      "dev": true,
+      "requires": {
+        "debug": "2.6.9",
+        "detect-node": "2.0.3",
+        "hpack.js": "2.1.6",
+        "obuf": "1.1.2",
+        "readable-stream": "2.3.5",
+        "safe-buffer": "5.1.1",
+        "wbuf": "1.7.3"
+      }
+    },
     "split": {
       "version": "0.3.3",
       "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz",
@@ -5516,6 +8166,12 @@
         "extend-shallow": "3.0.2"
       }
     },
+    "sprintf-js": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+      "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
+      "dev": true
+    },
     "sshpk": {
       "version": "1.13.1",
       "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz",
@@ -5540,6 +8196,15 @@
         }
       }
     },
+    "ssri": {
+      "version": "5.2.4",
+      "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.2.4.tgz",
+      "integrity": "sha512-UnEAgMZa15973iH7cUi0AHjJn1ACDIkaMyZILoqwN6yzt+4P81I8tBc5Hl+qwi5auMplZtPQsHrPBR5vJLcQtQ==",
+      "dev": true,
+      "requires": {
+        "safe-buffer": "5.1.1"
+      }
+    },
     "static-extend": {
       "version": "0.1.2",
       "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
@@ -5574,7 +8239,7 @@
               "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
               "dev": true,
               "requires": {
-                "is-buffer": "1.1.5"
+                "is-buffer": "1.1.6"
               }
             }
           }
@@ -5594,7 +8259,7 @@
               "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
               "dev": true,
               "requires": {
-                "is-buffer": "1.1.5"
+                "is-buffer": "1.1.6"
               }
             }
           }
@@ -5618,13 +8283,19 @@
         }
       }
     },
+    "statuses": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
+      "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=",
+      "dev": true
+    },
     "stdout-stream": {
       "version": "1.4.0",
       "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz",
       "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=",
       "dev": true,
       "requires": {
-        "readable-stream": "2.3.3"
+        "readable-stream": "2.3.5"
       }
     },
     "stream-browserify": {
@@ -5634,7 +8305,7 @@
       "dev": true,
       "requires": {
         "inherits": "2.0.3",
-        "readable-stream": "2.3.3"
+        "readable-stream": "2.3.5"
       }
     },
     "stream-combiner": {
@@ -5646,14 +8317,14 @@
         "duplexer": "0.1.1"
       }
     },
-    "stream-combiner2": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz",
-      "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=",
+    "stream-each": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz",
+      "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==",
       "dev": true,
       "requires": {
-        "duplexer2": "0.1.4",
-        "readable-stream": "2.3.3"
+        "end-of-stream": "1.4.1",
+        "stream-shift": "1.0.0"
       }
     },
     "stream-http": {
@@ -5664,20 +8335,16 @@
       "requires": {
         "builtin-status-codes": "3.0.0",
         "inherits": "2.0.3",
-        "readable-stream": "2.3.3",
+        "readable-stream": "2.3.5",
         "to-arraybuffer": "1.0.1",
         "xtend": "4.0.1"
       }
     },
-    "stream-splicer": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz",
-      "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=",
-      "dev": true,
-      "requires": {
-        "inherits": "2.0.3",
-        "readable-stream": "2.3.3"
-      }
+    "stream-shift": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
+      "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=",
+      "dev": true
     },
     "string-width": {
       "version": "1.0.2",
@@ -5744,34 +8411,108 @@
       "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
       "dev": true
     },
-    "subarg": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",
-      "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=",
+    "style-loader": {
+      "version": "0.19.1",
+      "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.19.1.tgz",
+      "integrity": "sha512-IRE+ijgojrygQi3rsqT0U4dd+UcPCqcVvauZpCnQrGAlEe+FUIyrK93bUDScamesjP08JlQNsFJU+KmPedP5Og==",
+      "dev": true,
+      "requires": {
+        "loader-utils": "1.1.0",
+        "schema-utils": "0.3.0"
+      },
+      "dependencies": {
+        "ajv": {
+          "version": "5.5.2",
+          "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
+          "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
+          "dev": true,
+          "requires": {
+            "co": "4.6.0",
+            "fast-deep-equal": "1.1.0",
+            "fast-json-stable-stringify": "2.0.0",
+            "json-schema-traverse": "0.3.1"
+          }
+        },
+        "schema-utils": {
+          "version": "0.3.0",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz",
+          "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=",
+          "dev": true,
+          "requires": {
+            "ajv": "5.5.2"
+          }
+        }
+      }
+    },
+    "stylus": {
+      "version": "0.54.5",
+      "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz",
+      "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=",
       "dev": true,
       "requires": {
-        "minimist": "1.2.0"
+        "css-parse": "1.7.0",
+        "debug": "2.6.9",
+        "glob": "7.0.6",
+        "mkdirp": "0.5.1",
+        "sax": "0.5.8",
+        "source-map": "0.1.43"
+      },
+      "dependencies": {
+        "glob": {
+          "version": "7.0.6",
+          "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz",
+          "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=",
+          "dev": true,
+          "requires": {
+            "fs.realpath": "1.0.0",
+            "inflight": "1.0.6",
+            "inherits": "2.0.3",
+            "minimatch": "3.0.4",
+            "once": "1.4.0",
+            "path-is-absolute": "1.0.1"
+          }
+        },
+        "source-map": {
+          "version": "0.1.43",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz",
+          "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=",
+          "dev": true,
+          "requires": {
+            "amdefine": "1.0.1"
+          }
+        }
       }
     },
-    "supports-color": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
-      "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
-      "dev": true
+    "stylus-loader": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz",
+      "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==",
+      "dev": true,
+      "requires": {
+        "loader-utils": "1.1.0",
+        "lodash.clonedeep": "4.5.0",
+        "when": "3.6.4"
+      }
     },
-    "syntax-error": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz",
-      "integrity": "sha1-HtkmbE1AvnXcVb+bsct3Biu5bKE=",
+    "supports-color": {
+      "version": "4.5.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
+      "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
       "dev": true,
       "requires": {
-        "acorn": "4.0.13"
+        "has-flag": "2.0.0"
       }
     },
-    "systemjs": {
-      "version": "0.20.19",
-      "resolved": "https://registry.npmjs.org/systemjs/-/systemjs-0.20.19.tgz",
-      "integrity": "sha512-H/rKwNEEyej/+IhkmFNmKFyJul8tbH/muiPq5TyNoVTwsGhUjRsN3NlFnFQUvFXA3+GQmsXkCNXU6QKPl779aw==",
+    "symbol-observable": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz",
+      "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=",
+      "dev": true
+    },
+    "tapable": {
+      "version": "0.2.8",
+      "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz",
+      "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=",
       "dev": true
     },
     "tar": {
@@ -5806,10 +8547,22 @@
       "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
       "dev": true,
       "requires": {
-        "readable-stream": "2.3.3",
+        "readable-stream": "2.3.5",
         "xtend": "4.0.1"
       }
     },
+    "thunky": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz",
+      "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=",
+      "dev": true
+    },
+    "time-stamp": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-2.0.0.tgz",
+      "integrity": "sha1-lcakRTDhW6jW9KPsuMOj+sRto1c=",
+      "dev": true
+    },
     "timed-out": {
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz",
@@ -5817,12 +8570,12 @@
       "dev": true
     },
     "timers-browserify": {
-      "version": "1.4.2",
-      "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz",
-      "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=",
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.6.tgz",
+      "integrity": "sha512-HQ3nbYRAowdVd0ckGFvmJPPCOH/CHleFN/Y0YQCX1DVaB7t+KFvisuyN09fuP8Jtp1CpfSh8O8bMkHbdbPe6Pw==",
       "dev": true,
       "requires": {
-        "process": "0.11.10"
+        "setimmediate": "1.0.5"
       }
     },
     "tinymce": {
@@ -5836,6 +8589,12 @@
       "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
       "dev": true
     },
+    "to-fast-properties": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
+      "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
+      "dev": true
+    },
     "to-object-path": {
       "version": "0.3.0",
       "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
@@ -5883,6 +8642,12 @@
       "resolved": "https://registry.npmjs.org/tooltipster/-/tooltipster-4.2.6.tgz",
       "integrity": "sha1-+/ej9bQL2D6BV04o2WZ8+CZnvHk="
     },
+    "toposort": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.6.tgz",
+      "integrity": "sha1-wxdI5V0hDv/AD9zcfW5o19e7nOw=",
+      "dev": true
+    },
     "touch": {
       "version": "3.1.0",
       "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
@@ -5904,20 +8669,32 @@
       }
     },
     "tough-cookie": {
-      "version": "2.3.3",
-      "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz",
-      "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=",
+      "version": "2.3.4",
+      "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
+      "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==",
       "dev": true,
       "requires": {
         "punycode": "1.4.1"
       }
     },
+    "tree-kill": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz",
+      "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==",
+      "dev": true
+    },
     "trim-newlines": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
       "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
       "dev": true
     },
+    "trim-right": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
+      "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=",
+      "dev": true
+    },
     "true-case-path": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz",
@@ -5954,11 +8731,26 @@
         "source-map-support": "0.5.3"
       },
       "dependencies": {
+        "minimist": {
+          "version": "1.2.0",
+          "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+          "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+          "dev": true
+        },
         "source-map": {
           "version": "0.6.1",
           "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
           "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
           "dev": true
+        },
+        "source-map-support": {
+          "version": "0.5.3",
+          "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.3.tgz",
+          "integrity": "sha512-eKkTgWYeBOQqFGXRfKabMFdnWepo51vWqEdoeikaEPFiJC7MCU5j2h4+6Q8npkZTeLGbSyecZvRxiSoWl3rh+w==",
+          "dev": true,
+          "requires": {
+            "source-map": "0.6.1"
+          }
         }
       }
     },
@@ -5975,10 +8767,13 @@
       "dev": true
     },
     "tunnel-agent": {
-      "version": "0.4.3",
-      "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
-      "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=",
-      "dev": true
+      "version": "0.6.0",
+      "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+      "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
+      "dev": true,
+      "requires": {
+        "safe-buffer": "5.1.1"
+      }
     },
     "tweetnacl": {
       "version": "0.14.5",
@@ -5987,6 +8782,16 @@
       "dev": true,
       "optional": true
     },
+    "type-is": {
+      "version": "1.6.16",
+      "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz",
+      "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==",
+      "dev": true,
+      "requires": {
+        "media-typer": "0.3.0",
+        "mime-types": "2.1.18"
+      }
+    },
     "typedarray": {
       "version": "0.0.6",
       "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
@@ -6000,9 +8805,9 @@
       "dev": true
     },
     "uglify-js": {
-      "version": "3.3.13",
-      "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.13.tgz",
-      "integrity": "sha512-7rdn/bDOG1ElSTPdh7AI5TCjLv63ZD4k8BBadN3ssIkhlaQL2c0yRxmXCyOYhZK0wZTgGgUSnYQ4CGu+Jos5cA==",
+      "version": "3.3.14",
+      "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.14.tgz",
+      "integrity": "sha512-OY8VPQU25q09gQRbC+Ekk3xgEVBmYFEfVcgS47ksjTiNht2LmLlUkWutyi38ZsDSToJHwbe76kDGwmD226Z2Fg==",
       "dev": true,
       "requires": {
         "commander": "2.14.1",
@@ -6017,32 +8822,62 @@
         }
       }
     },
-    "umd": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz",
-      "integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=",
-      "dev": true
+    "uglify-to-browserify": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
+      "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
+      "dev": true,
+      "optional": true
     },
-    "undefsafe": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.2.tgz",
-      "integrity": "sha1-Il9rngM3Zj4Njnz9aG/Cg2zKznY=",
+    "uglifyjs-webpack-plugin": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.3.tgz",
+      "integrity": "sha512-as/50351uuJGiQbhVvE510SCqM/YOWghCzIFJeEOu5oVE0QOZ3/vu2QcnVvu0Lz+vNd0rKsiCFAlbcw0i/YH2w==",
       "dev": true,
       "requires": {
-        "debug": "2.6.9"
+        "cacache": "10.0.4",
+        "find-cache-dir": "1.0.0",
+        "schema-utils": "0.4.5",
+        "serialize-javascript": "1.4.0",
+        "source-map": "0.6.1",
+        "uglify-es": "3.3.9",
+        "webpack-sources": "1.1.0",
+        "worker-farm": "1.6.0"
       },
       "dependencies": {
-        "debug": {
-          "version": "2.6.9",
-          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
-          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+        "commander": {
+          "version": "2.13.0",
+          "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz",
+          "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==",
+          "dev": true
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        },
+        "uglify-es": {
+          "version": "3.3.9",
+          "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz",
+          "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==",
           "dev": true,
           "requires": {
-            "ms": "2.0.0"
+            "commander": "2.13.0",
+            "source-map": "0.6.1"
           }
         }
       }
     },
+    "undefsafe": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.2.tgz",
+      "integrity": "sha1-Il9rngM3Zj4Njnz9aG/Cg2zKznY=",
+      "dev": true,
+      "requires": {
+        "debug": "2.6.9"
+      }
+    },
     "union-value": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
@@ -6078,6 +8913,24 @@
         }
       }
     },
+    "unique-filename": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz",
+      "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=",
+      "dev": true,
+      "requires": {
+        "unique-slug": "2.0.0"
+      }
+    },
+    "unique-slug": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz",
+      "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=",
+      "dev": true,
+      "requires": {
+        "imurmurhash": "0.1.4"
+      }
+    },
     "unique-string": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz",
@@ -6087,6 +8940,18 @@
         "crypto-random-string": "1.0.0"
       }
     },
+    "universalify": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz",
+      "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=",
+      "dev": true
+    },
+    "unpipe": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+      "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
+      "dev": true
+    },
     "unset-value": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
@@ -6152,7 +9017,7 @@
       "dev": true,
       "requires": {
         "boxen": "1.3.0",
-        "chalk": "2.3.1",
+        "chalk": "2.2.2",
         "configstore": "3.1.1",
         "import-lazy": "2.1.0",
         "is-installed-globally": "0.1.0",
@@ -6160,39 +9025,14 @@
         "latest-version": "3.1.0",
         "semver-diff": "2.1.0",
         "xdg-basedir": "3.0.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "3.2.0",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz",
-          "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==",
-          "dev": true,
-          "requires": {
-            "color-convert": "1.9.1"
-          }
-        },
-        "chalk": {
-          "version": "2.3.1",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz",
-          "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "3.2.0",
-            "escape-string-regexp": "1.0.5",
-            "supports-color": "5.2.0"
-          }
-        },
-        "supports-color": {
-          "version": "5.2.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz",
-          "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==",
-          "dev": true,
-          "requires": {
-            "has-flag": "3.0.0"
-          }
-        }
       }
     },
+    "upper-case": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz",
+      "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=",
+      "dev": true
+    },
     "urix": {
       "version": "0.1.0",
       "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
@@ -6217,6 +9057,58 @@
         }
       }
     },
+    "url-loader": {
+      "version": "0.6.2",
+      "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-0.6.2.tgz",
+      "integrity": "sha512-h3qf9TNn53BpuXTTcpC+UehiRrl0Cv45Yr/xWayApjw6G8Bg2dGke7rIwDQ39piciWCWrC+WiqLjOh3SUp9n0Q==",
+      "dev": true,
+      "requires": {
+        "loader-utils": "1.1.0",
+        "mime": "1.6.0",
+        "schema-utils": "0.3.0"
+      },
+      "dependencies": {
+        "ajv": {
+          "version": "5.5.2",
+          "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
+          "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
+          "dev": true,
+          "requires": {
+            "co": "4.6.0",
+            "fast-deep-equal": "1.1.0",
+            "fast-json-stable-stringify": "2.0.0",
+            "json-schema-traverse": "0.3.1"
+          }
+        },
+        "schema-utils": {
+          "version": "0.3.0",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz",
+          "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=",
+          "dev": true,
+          "requires": {
+            "ajv": "5.5.2"
+          }
+        }
+      }
+    },
+    "url-parse": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.2.0.tgz",
+      "integrity": "sha512-DT1XbYAfmQP65M/mE6OALxmXzZ/z1+e5zk2TcSKe/KiYbNGZxgtttzC0mR/sjopbpOXcbniq7eIKmocJnUWlEw==",
+      "dev": true,
+      "requires": {
+        "querystringify": "1.0.0",
+        "requires-port": "1.0.0"
+      },
+      "dependencies": {
+        "querystringify": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-1.0.0.tgz",
+          "integrity": "sha1-YoYkIRLFtxL6ZU5SZlK/ahP/Bcs=",
+          "dev": true
+        }
+      }
+    },
     "url-parse-lax": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz",
@@ -6227,30 +9119,1046 @@
       }
     },
     "use": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/use/-/use-2.0.2.tgz",
-      "integrity": "sha1-riig1y+TvyJCKhii43mZMRLeyOg=",
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz",
+      "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==",
       "dev": true,
       "requires": {
-        "define-property": "0.2.5",
-        "isobject": "3.0.1",
-        "lazy-cache": "2.0.2"
+        "kind-of": "6.0.2"
       },
       "dependencies": {
-        "define-property": {
-          "version": "0.2.5",
-          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
-          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
-          "dev": true,
-          "requires": {
-            "is-descriptor": "0.1.6"
-          }
-        },
-        "is-accessor-descriptor": {
-          "version": "0.1.6",
-          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
-          "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
-          "dev": true,
+        "kind-of": {
+          "version": "6.0.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+          "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+          "dev": true
+        }
+      }
+    },
+    "util": {
+      "version": "0.10.3",
+      "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
+      "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
+      "dev": true,
+      "requires": {
+        "inherits": "2.0.1"
+      },
+      "dependencies": {
+        "inherits": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
+          "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
+          "dev": true
+        }
+      }
+    },
+    "util-deprecate": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
+      "dev": true
+    },
+    "utila": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz",
+      "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=",
+      "dev": true
+    },
+    "utils-merge": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+      "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
+      "dev": true
+    },
+    "uuid": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz",
+      "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==",
+      "dev": true
+    },
+    "validate-npm-package-license": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz",
+      "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==",
+      "dev": true,
+      "requires": {
+        "spdx-correct": "3.0.0",
+        "spdx-expression-parse": "3.0.0"
+      }
+    },
+    "vary": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+      "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
+      "dev": true
+    },
+    "verror": {
+      "version": "1.10.0",
+      "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
+      "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+      "dev": true,
+      "requires": {
+        "assert-plus": "1.0.0",
+        "core-util-is": "1.0.2",
+        "extsprintf": "1.3.0"
+      },
+      "dependencies": {
+        "assert-plus": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+          "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+          "dev": true
+        }
+      }
+    },
+    "vlq": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz",
+      "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==",
+      "dev": true
+    },
+    "vm-browserify": {
+      "version": "0.0.4",
+      "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
+      "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=",
+      "dev": true,
+      "requires": {
+        "indexof": "0.0.1"
+      }
+    },
+    "watchpack": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.5.0.tgz",
+      "integrity": "sha512-RSlipNQB1u48cq0wH/BNfCu1tD/cJ8ydFIkNYhp9o+3d+8unClkIovpW5qpFPgmL9OE48wfAnlZydXByWP82AA==",
+      "dev": true,
+      "requires": {
+        "chokidar": "2.0.2",
+        "graceful-fs": "4.1.11",
+        "neo-async": "2.5.0"
+      },
+      "dependencies": {
+        "anymatch": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+          "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
+          "dev": true,
+          "requires": {
+            "micromatch": "3.1.9",
+            "normalize-path": "2.1.1"
+          }
+        },
+        "arr-diff": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+          "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
+          "dev": true
+        },
+        "array-unique": {
+          "version": "0.3.2",
+          "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+          "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
+          "dev": true
+        },
+        "braces": {
+          "version": "2.3.1",
+          "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz",
+          "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==",
+          "dev": true,
+          "requires": {
+            "arr-flatten": "1.1.0",
+            "array-unique": "0.3.2",
+            "define-property": "1.0.0",
+            "extend-shallow": "2.0.1",
+            "fill-range": "4.0.0",
+            "isobject": "3.0.1",
+            "kind-of": "6.0.2",
+            "repeat-element": "1.1.2",
+            "snapdragon": "0.8.2",
+            "snapdragon-node": "2.1.1",
+            "split-string": "3.1.0",
+            "to-regex": "3.0.2"
+          },
+          "dependencies": {
+            "define-property": {
+              "version": "1.0.0",
+              "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+              "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+              "dev": true,
+              "requires": {
+                "is-descriptor": "1.0.2"
+              }
+            },
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "0.1.1"
+              }
+            }
+          }
+        },
+        "chokidar": {
+          "version": "2.0.2",
+          "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.2.tgz",
+          "integrity": "sha512-l32Hw3wqB0L2kGVmSbK/a+xXLDrUEsc84pSgMkmwygHvD7ubRsP/vxxHa5BtB6oix1XLLVCHyYMsckRXxThmZw==",
+          "dev": true,
+          "requires": {
+            "anymatch": "2.0.0",
+            "async-each": "1.0.1",
+            "braces": "2.3.1",
+            "fsevents": "1.1.3",
+            "glob-parent": "3.1.0",
+            "inherits": "2.0.3",
+            "is-binary-path": "1.0.1",
+            "is-glob": "4.0.0",
+            "normalize-path": "2.1.1",
+            "path-is-absolute": "1.0.1",
+            "readdirp": "2.1.0",
+            "upath": "1.0.4"
+          }
+        },
+        "expand-brackets": {
+          "version": "2.1.4",
+          "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+          "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
+          "dev": true,
+          "requires": {
+            "debug": "2.6.9",
+            "define-property": "0.2.5",
+            "extend-shallow": "2.0.1",
+            "posix-character-classes": "0.1.1",
+            "regex-not": "1.0.2",
+            "snapdragon": "0.8.2",
+            "to-regex": "3.0.2"
+          },
+          "dependencies": {
+            "define-property": {
+              "version": "0.2.5",
+              "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+              "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+              "dev": true,
+              "requires": {
+                "is-descriptor": "0.1.6"
+              }
+            },
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "0.1.1"
+              }
+            },
+            "is-descriptor": {
+              "version": "0.1.6",
+              "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+              "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+              "dev": true,
+              "requires": {
+                "is-accessor-descriptor": "0.1.6",
+                "is-data-descriptor": "0.1.4",
+                "kind-of": "5.1.0"
+              }
+            },
+            "kind-of": {
+              "version": "5.1.0",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+              "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+              "dev": true
+            }
+          }
+        },
+        "extglob": {
+          "version": "2.0.4",
+          "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+          "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
+          "dev": true,
+          "requires": {
+            "array-unique": "0.3.2",
+            "define-property": "1.0.0",
+            "expand-brackets": "2.1.4",
+            "extend-shallow": "2.0.1",
+            "fragment-cache": "0.2.1",
+            "regex-not": "1.0.2",
+            "snapdragon": "0.8.2",
+            "to-regex": "3.0.2"
+          },
+          "dependencies": {
+            "define-property": {
+              "version": "1.0.0",
+              "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+              "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+              "dev": true,
+              "requires": {
+                "is-descriptor": "1.0.2"
+              }
+            },
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "0.1.1"
+              }
+            }
+          }
+        },
+        "fill-range": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+          "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+          "dev": true,
+          "requires": {
+            "extend-shallow": "2.0.1",
+            "is-number": "3.0.0",
+            "repeat-string": "1.6.1",
+            "to-regex-range": "2.1.1"
+          },
+          "dependencies": {
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "0.1.1"
+              }
+            }
+          }
+        },
+        "glob-parent": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+          "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
+          "dev": true,
+          "requires": {
+            "is-glob": "3.1.0",
+            "path-dirname": "1.0.2"
+          },
+          "dependencies": {
+            "is-glob": {
+              "version": "3.1.0",
+              "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+              "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+              "dev": true,
+              "requires": {
+                "is-extglob": "2.1.1"
+              }
+            }
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "0.1.6",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+          "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+          "dev": true,
+          "requires": {
+            "kind-of": "3.2.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "1.1.6"
+              }
+            }
+          }
+        },
+        "is-data-descriptor": {
+          "version": "0.1.4",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+          "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+          "dev": true,
+          "requires": {
+            "kind-of": "3.2.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "1.1.6"
+              }
+            }
+          }
+        },
+        "is-extglob": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+          "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+          "dev": true
+        },
+        "is-glob": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
+          "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
+          "dev": true,
+          "requires": {
+            "is-extglob": "2.1.1"
+          }
+        },
+        "is-number": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+          "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+          "dev": true,
+          "requires": {
+            "kind-of": "3.2.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "1.1.6"
+              }
+            }
+          }
+        },
+        "isobject": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+          "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+          "dev": true
+        },
+        "kind-of": {
+          "version": "6.0.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+          "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+          "dev": true
+        },
+        "micromatch": {
+          "version": "3.1.9",
+          "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz",
+          "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==",
+          "dev": true,
+          "requires": {
+            "arr-diff": "4.0.0",
+            "array-unique": "0.3.2",
+            "braces": "2.3.1",
+            "define-property": "2.0.2",
+            "extend-shallow": "3.0.2",
+            "extglob": "2.0.4",
+            "fragment-cache": "0.2.1",
+            "kind-of": "6.0.2",
+            "nanomatch": "1.2.9",
+            "object.pick": "1.3.0",
+            "regex-not": "1.0.2",
+            "snapdragon": "0.8.2",
+            "to-regex": "3.0.2"
+          }
+        }
+      }
+    },
+    "wbuf": {
+      "version": "1.7.3",
+      "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz",
+      "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==",
+      "dev": true,
+      "requires": {
+        "minimalistic-assert": "1.0.0"
+      }
+    },
+    "webpack": {
+      "version": "3.11.0",
+      "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.11.0.tgz",
+      "integrity": "sha512-3kOFejWqj5ISpJk4Qj/V7w98h9Vl52wak3CLiw/cDOfbVTq7FeoZ0SdoHHY9PYlHr50ZS42OfvzE2vB4nncKQg==",
+      "dev": true,
+      "requires": {
+        "acorn": "5.5.3",
+        "acorn-dynamic-import": "2.0.2",
+        "ajv": "6.2.1",
+        "ajv-keywords": "3.1.0",
+        "async": "2.6.0",
+        "enhanced-resolve": "3.4.1",
+        "escope": "3.6.0",
+        "interpret": "1.1.0",
+        "json-loader": "0.5.7",
+        "json5": "0.5.1",
+        "loader-runner": "2.3.0",
+        "loader-utils": "1.1.0",
+        "memory-fs": "0.4.1",
+        "mkdirp": "0.5.1",
+        "node-libs-browser": "2.1.0",
+        "source-map": "0.5.7",
+        "supports-color": "4.5.0",
+        "tapable": "0.2.8",
+        "uglifyjs-webpack-plugin": "0.4.6",
+        "watchpack": "1.5.0",
+        "webpack-sources": "1.1.0",
+        "yargs": "8.0.2"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+          "dev": true
+        },
+        "camelcase": {
+          "version": "1.2.1",
+          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
+          "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
+          "dev": true
+        },
+        "cliui": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
+          "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
+          "dev": true,
+          "requires": {
+            "center-align": "0.1.3",
+            "right-align": "0.1.3",
+            "wordwrap": "0.0.2"
+          }
+        },
+        "load-json-file": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
+          "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
+          "dev": true,
+          "requires": {
+            "graceful-fs": "4.1.11",
+            "parse-json": "2.2.0",
+            "pify": "2.3.0",
+            "strip-bom": "3.0.0"
+          }
+        },
+        "os-locale": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
+          "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==",
+          "dev": true,
+          "requires": {
+            "execa": "0.7.0",
+            "lcid": "1.0.0",
+            "mem": "1.1.0"
+          }
+        },
+        "path-type": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
+          "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
+          "dev": true,
+          "requires": {
+            "pify": "2.3.0"
+          }
+        },
+        "pify": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+          "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+          "dev": true
+        },
+        "read-pkg": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
+          "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
+          "dev": true,
+          "requires": {
+            "load-json-file": "2.0.0",
+            "normalize-package-data": "2.4.0",
+            "path-type": "2.0.0"
+          }
+        },
+        "read-pkg-up": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
+          "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
+          "dev": true,
+          "requires": {
+            "find-up": "2.1.0",
+            "read-pkg": "2.0.0"
+          }
+        },
+        "string-width": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+          "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+          "dev": true,
+          "requires": {
+            "is-fullwidth-code-point": "2.0.0",
+            "strip-ansi": "4.0.0"
+          },
+          "dependencies": {
+            "is-fullwidth-code-point": {
+              "version": "2.0.0",
+              "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+              "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+              "dev": true
+            },
+            "strip-ansi": {
+              "version": "4.0.0",
+              "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+              "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+              "dev": true,
+              "requires": {
+                "ansi-regex": "3.0.0"
+              }
+            }
+          }
+        },
+        "strip-bom": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+          "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+          "dev": true
+        },
+        "uglify-js": {
+          "version": "2.8.29",
+          "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
+          "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
+          "dev": true,
+          "requires": {
+            "source-map": "0.5.7",
+            "uglify-to-browserify": "1.0.2",
+            "yargs": "3.10.0"
+          },
+          "dependencies": {
+            "yargs": {
+              "version": "3.10.0",
+              "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
+              "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
+              "dev": true,
+              "requires": {
+                "camelcase": "1.2.1",
+                "cliui": "2.1.0",
+                "decamelize": "1.2.0",
+                "window-size": "0.1.0"
+              }
+            }
+          }
+        },
+        "uglifyjs-webpack-plugin": {
+          "version": "0.4.6",
+          "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz",
+          "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=",
+          "dev": true,
+          "requires": {
+            "source-map": "0.5.7",
+            "uglify-js": "2.8.29",
+            "webpack-sources": "1.1.0"
+          }
+        },
+        "which-module": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
+          "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
+          "dev": true
+        },
+        "y18n": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
+          "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
+          "dev": true
+        },
+        "yargs": {
+          "version": "8.0.2",
+          "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz",
+          "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=",
+          "dev": true,
+          "requires": {
+            "camelcase": "4.1.0",
+            "cliui": "3.2.0",
+            "decamelize": "1.2.0",
+            "get-caller-file": "1.0.2",
+            "os-locale": "2.1.0",
+            "read-pkg-up": "2.0.0",
+            "require-directory": "2.1.1",
+            "require-main-filename": "1.0.1",
+            "set-blocking": "2.0.0",
+            "string-width": "2.1.1",
+            "which-module": "2.0.0",
+            "y18n": "3.2.1",
+            "yargs-parser": "7.0.0"
+          },
+          "dependencies": {
+            "camelcase": {
+              "version": "4.1.0",
+              "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+              "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
+              "dev": true
+            },
+            "cliui": {
+              "version": "3.2.0",
+              "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
+              "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
+              "dev": true,
+              "requires": {
+                "string-width": "1.0.2",
+                "strip-ansi": "3.0.1",
+                "wrap-ansi": "2.1.0"
+              },
+              "dependencies": {
+                "string-width": {
+                  "version": "1.0.2",
+                  "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+                  "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+                  "dev": true,
+                  "requires": {
+                    "code-point-at": "1.1.0",
+                    "is-fullwidth-code-point": "1.0.0",
+                    "strip-ansi": "3.0.1"
+                  }
+                }
+              }
+            }
+          }
+        },
+        "yargs-parser": {
+          "version": "7.0.0",
+          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz",
+          "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=",
+          "dev": true,
+          "requires": {
+            "camelcase": "4.1.0"
+          },
+          "dependencies": {
+            "camelcase": {
+              "version": "4.1.0",
+              "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+              "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
+              "dev": true
+            }
+          }
+        }
+      }
+    },
+    "webpack-core": {
+      "version": "0.6.9",
+      "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz",
+      "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=",
+      "dev": true,
+      "requires": {
+        "source-list-map": "0.1.8",
+        "source-map": "0.4.4"
+      },
+      "dependencies": {
+        "source-list-map": {
+          "version": "0.1.8",
+          "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz",
+          "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=",
+          "dev": true
+        },
+        "source-map": {
+          "version": "0.4.4",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
+          "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
+          "dev": true,
+          "requires": {
+            "amdefine": "1.0.1"
+          }
+        }
+      }
+    },
+    "webpack-dev-middleware": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz",
+      "integrity": "sha512-FCrqPy1yy/sN6U/SaEZcHKRXGlqU0DUaEBL45jkUYoB8foVb6wCnbIJ1HKIx+qUFTW+3JpVcCJCxZ8VATL4e+A==",
+      "dev": true,
+      "requires": {
+        "memory-fs": "0.4.1",
+        "mime": "1.6.0",
+        "path-is-absolute": "1.0.1",
+        "range-parser": "1.2.0",
+        "time-stamp": "2.0.0"
+      }
+    },
+    "webpack-dev-server": {
+      "version": "2.11.2",
+      "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.11.2.tgz",
+      "integrity": "sha512-zrPoX97bx47vZiAXfDrkw8pe9QjJ+lunQl3dypojyWwWr1M5I2h0VSrMPfTjopHQPRNn+NqfjcMmhoLcUJe2gA==",
+      "dev": true,
+      "requires": {
+        "ansi-html": "0.0.7",
+        "array-includes": "3.0.3",
+        "bonjour": "3.5.0",
+        "chokidar": "2.0.2",
+        "compression": "1.7.2",
+        "connect-history-api-fallback": "1.5.0",
+        "debug": "3.1.0",
+        "del": "3.0.0",
+        "express": "4.16.2",
+        "html-entities": "1.2.1",
+        "http-proxy-middleware": "0.17.4",
+        "import-local": "1.0.0",
+        "internal-ip": "1.2.0",
+        "ip": "1.1.5",
+        "killable": "1.0.0",
+        "loglevel": "1.6.1",
+        "opn": "5.1.0",
+        "portfinder": "1.0.13",
+        "selfsigned": "1.10.2",
+        "serve-index": "1.9.1",
+        "sockjs": "0.3.19",
+        "sockjs-client": "1.1.4",
+        "spdy": "3.4.7",
+        "strip-ansi": "3.0.1",
+        "supports-color": "5.3.0",
+        "webpack-dev-middleware": "1.12.2",
+        "yargs": "6.6.0"
+      },
+      "dependencies": {
+        "anymatch": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+          "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
+          "dev": true,
+          "requires": {
+            "micromatch": "3.1.9",
+            "normalize-path": "2.1.1"
+          }
+        },
+        "arr-diff": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+          "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
+          "dev": true
+        },
+        "array-unique": {
+          "version": "0.3.2",
+          "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+          "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
+          "dev": true
+        },
+        "braces": {
+          "version": "2.3.1",
+          "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz",
+          "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==",
+          "dev": true,
+          "requires": {
+            "arr-flatten": "1.1.0",
+            "array-unique": "0.3.2",
+            "define-property": "1.0.0",
+            "extend-shallow": "2.0.1",
+            "fill-range": "4.0.0",
+            "isobject": "3.0.1",
+            "kind-of": "6.0.2",
+            "repeat-element": "1.1.2",
+            "snapdragon": "0.8.2",
+            "snapdragon-node": "2.1.1",
+            "split-string": "3.1.0",
+            "to-regex": "3.0.2"
+          },
+          "dependencies": {
+            "define-property": {
+              "version": "1.0.0",
+              "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+              "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+              "dev": true,
+              "requires": {
+                "is-descriptor": "1.0.2"
+              }
+            },
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "0.1.1"
+              }
+            }
+          }
+        },
+        "camelcase": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
+          "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
+          "dev": true
+        },
+        "chokidar": {
+          "version": "2.0.2",
+          "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.2.tgz",
+          "integrity": "sha512-l32Hw3wqB0L2kGVmSbK/a+xXLDrUEsc84pSgMkmwygHvD7ubRsP/vxxHa5BtB6oix1XLLVCHyYMsckRXxThmZw==",
+          "dev": true,
+          "requires": {
+            "anymatch": "2.0.0",
+            "async-each": "1.0.1",
+            "braces": "2.3.1",
+            "fsevents": "1.1.3",
+            "glob-parent": "3.1.0",
+            "inherits": "2.0.3",
+            "is-binary-path": "1.0.1",
+            "is-glob": "4.0.0",
+            "normalize-path": "2.1.1",
+            "path-is-absolute": "1.0.1",
+            "readdirp": "2.1.0",
+            "upath": "1.0.4"
+          }
+        },
+        "debug": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+          "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
+        "expand-brackets": {
+          "version": "2.1.4",
+          "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+          "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
+          "dev": true,
+          "requires": {
+            "debug": "2.6.9",
+            "define-property": "0.2.5",
+            "extend-shallow": "2.0.1",
+            "posix-character-classes": "0.1.1",
+            "regex-not": "1.0.2",
+            "snapdragon": "0.8.2",
+            "to-regex": "3.0.2"
+          },
+          "dependencies": {
+            "debug": {
+              "version": "2.6.9",
+              "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+              "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+              "dev": true,
+              "requires": {
+                "ms": "2.0.0"
+              }
+            },
+            "define-property": {
+              "version": "0.2.5",
+              "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+              "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+              "dev": true,
+              "requires": {
+                "is-descriptor": "0.1.6"
+              }
+            },
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "0.1.1"
+              }
+            },
+            "is-descriptor": {
+              "version": "0.1.6",
+              "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+              "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+              "dev": true,
+              "requires": {
+                "is-accessor-descriptor": "0.1.6",
+                "is-data-descriptor": "0.1.4",
+                "kind-of": "5.1.0"
+              }
+            },
+            "kind-of": {
+              "version": "5.1.0",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+              "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+              "dev": true
+            }
+          }
+        },
+        "extglob": {
+          "version": "2.0.4",
+          "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+          "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
+          "dev": true,
+          "requires": {
+            "array-unique": "0.3.2",
+            "define-property": "1.0.0",
+            "expand-brackets": "2.1.4",
+            "extend-shallow": "2.0.1",
+            "fragment-cache": "0.2.1",
+            "regex-not": "1.0.2",
+            "snapdragon": "0.8.2",
+            "to-regex": "3.0.2"
+          },
+          "dependencies": {
+            "define-property": {
+              "version": "1.0.0",
+              "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+              "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+              "dev": true,
+              "requires": {
+                "is-descriptor": "1.0.2"
+              }
+            },
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "0.1.1"
+              }
+            }
+          }
+        },
+        "fill-range": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+          "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+          "dev": true,
+          "requires": {
+            "extend-shallow": "2.0.1",
+            "is-number": "3.0.0",
+            "repeat-string": "1.6.1",
+            "to-regex-range": "2.1.1"
+          },
+          "dependencies": {
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "0.1.1"
+              }
+            }
+          }
+        },
+        "glob-parent": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+          "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
+          "dev": true,
+          "requires": {
+            "is-glob": "3.1.0",
+            "path-dirname": "1.0.2"
+          },
+          "dependencies": {
+            "is-glob": {
+              "version": "3.1.0",
+              "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+              "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+              "dev": true,
+              "requires": {
+                "is-extglob": "2.1.1"
+              }
+            }
+          }
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "is-accessor-descriptor": {
+          "version": "0.1.6",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+          "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+          "dev": true,
           "requires": {
             "kind-of": "3.2.2"
           },
@@ -6261,7 +10169,7 @@
               "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
               "dev": true,
               "requires": {
-                "is-buffer": "1.1.5"
+                "is-buffer": "1.1.6"
               }
             }
           }
@@ -6281,20 +10189,44 @@
               "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
               "dev": true,
               "requires": {
-                "is-buffer": "1.1.5"
+                "is-buffer": "1.1.6"
               }
             }
           }
         },
-        "is-descriptor": {
-          "version": "0.1.6",
-          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
-          "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+        "is-extglob": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+          "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+          "dev": true
+        },
+        "is-glob": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
+          "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
           "dev": true,
           "requires": {
-            "is-accessor-descriptor": "0.1.6",
-            "is-data-descriptor": "0.1.4",
-            "kind-of": "5.1.0"
+            "is-extglob": "2.1.1"
+          }
+        },
+        "is-number": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+          "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+          "dev": true,
+          "requires": {
+            "kind-of": "3.2.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "1.1.6"
+              }
+            }
           }
         },
         "isobject": {
@@ -6304,80 +10236,137 @@
           "dev": true
         },
         "kind-of": {
-          "version": "5.1.0",
-          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
-          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+          "version": "6.0.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+          "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
           "dev": true
-        }
-      }
-    },
-    "util": {
-      "version": "0.10.3",
-      "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
-      "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
-      "dev": true,
-      "requires": {
-        "inherits": "2.0.1"
-      },
-      "dependencies": {
-        "inherits": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
-          "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
+        },
+        "micromatch": {
+          "version": "3.1.9",
+          "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz",
+          "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==",
+          "dev": true,
+          "requires": {
+            "arr-diff": "4.0.0",
+            "array-unique": "0.3.2",
+            "braces": "2.3.1",
+            "define-property": "2.0.2",
+            "extend-shallow": "3.0.2",
+            "extglob": "2.0.4",
+            "fragment-cache": "0.2.1",
+            "kind-of": "6.0.2",
+            "nanomatch": "1.2.9",
+            "object.pick": "1.3.0",
+            "regex-not": "1.0.2",
+            "snapdragon": "0.8.2",
+            "to-regex": "3.0.2"
+          }
+        },
+        "supports-color": {
+          "version": "5.3.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz",
+          "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==",
+          "dev": true,
+          "requires": {
+            "has-flag": "3.0.0"
+          }
+        },
+        "y18n": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
+          "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
           "dev": true
+        },
+        "yargs": {
+          "version": "6.6.0",
+          "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz",
+          "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=",
+          "dev": true,
+          "requires": {
+            "camelcase": "3.0.0",
+            "cliui": "3.2.0",
+            "decamelize": "1.2.0",
+            "get-caller-file": "1.0.2",
+            "os-locale": "1.4.0",
+            "read-pkg-up": "1.0.1",
+            "require-directory": "2.1.1",
+            "require-main-filename": "1.0.1",
+            "set-blocking": "2.0.0",
+            "string-width": "1.0.2",
+            "which-module": "1.0.0",
+            "y18n": "3.2.1",
+            "yargs-parser": "4.2.1"
+          }
+        },
+        "yargs-parser": {
+          "version": "4.2.1",
+          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz",
+          "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=",
+          "dev": true,
+          "requires": {
+            "camelcase": "3.0.0"
+          }
         }
       }
     },
-    "util-deprecate": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
-      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
-      "dev": true
-    },
-    "uuid": {
-      "version": "3.2.1",
-      "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz",
-      "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==",
-      "dev": true
-    },
-    "validate-npm-package-license": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz",
-      "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=",
+    "webpack-merge": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.2.tgz",
+      "integrity": "sha512-/0QYwW/H1N/CdXYA2PNPVbsxO3u2Fpz34vs72xm03SRfg6bMNGfMJIQEpQjKRvkG2JvT6oRJFpDtSrwbX8Jzvw==",
       "dev": true,
       "requires": {
-        "spdx-correct": "1.0.2",
-        "spdx-expression-parse": "1.0.4"
+        "lodash": "4.17.5"
       }
     },
-    "verror": {
-      "version": "1.10.0",
-      "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
-      "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+    "webpack-sources": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz",
+      "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==",
       "dev": true,
       "requires": {
-        "assert-plus": "1.0.0",
-        "core-util-is": "1.0.2",
-        "extsprintf": "1.3.0"
+        "source-list-map": "2.0.0",
+        "source-map": "0.6.1"
       },
       "dependencies": {
-        "assert-plus": {
-          "version": "1.0.0",
-          "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
-          "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
           "dev": true
         }
       }
     },
-    "vm-browserify": {
-      "version": "0.0.4",
-      "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
-      "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=",
+    "webpack-subresource-integrity": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.0.4.tgz",
+      "integrity": "sha1-j6yKfo61n8ahZ2ioXJ2U7n+dDts=",
       "dev": true,
       "requires": {
-        "indexof": "0.0.1"
+        "webpack-core": "0.6.9"
       }
     },
+    "websocket-driver": {
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz",
+      "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=",
+      "dev": true,
+      "requires": {
+        "http-parser-js": "0.4.11",
+        "websocket-extensions": "0.1.3"
+      }
+    },
+    "websocket-extensions": {
+      "version": "0.1.3",
+      "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz",
+      "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==",
+      "dev": true
+    },
+    "when": {
+      "version": "3.6.4",
+      "resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz",
+      "integrity": "sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=",
+      "dev": true
+    },
     "which": {
       "version": "1.3.0",
       "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz",
@@ -6444,6 +10433,27 @@
         }
       }
     },
+    "window-size": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
+      "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
+      "dev": true
+    },
+    "wordwrap": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
+      "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
+      "dev": true
+    },
+    "worker-farm": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz",
+      "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==",
+      "dev": true,
+      "requires": {
+        "errno": "0.1.7"
+      }
+    },
     "wrap-ansi": {
       "version": "2.1.0",
       "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
@@ -6483,16 +10493,31 @@
       "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=",
       "dev": true
     },
+    "xml-char-classes": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz",
+      "integrity": "sha1-ZGV4SKIP/F31g6Qq2KJ3tFErvE0=",
+      "dev": true
+    },
     "xtend": {
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
       "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
       "dev": true
     },
+    "xxhashjs": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.2.tgz",
+      "integrity": "sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==",
+      "dev": true,
+      "requires": {
+        "cuint": "0.2.2"
+      }
+    },
     "y18n": {
-      "version": "3.2.1",
-      "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
-      "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
+      "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
       "dev": true
     },
     "yallist": {
@@ -6527,6 +10552,12 @@
           "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
           "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
           "dev": true
+        },
+        "y18n": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
+          "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
+          "dev": true
         }
       }
     },
diff --git a/package.json b/package.json
index 3d67179124d81749adfaa2bfe0911569fb341f45..7b8c8f39fbc90678c766f00f815195ed350bc3a9 100755
--- a/package.json
+++ b/package.json
@@ -2,10 +2,9 @@
   "name": "MaarchCourrier",
   "description": "MaarchCourrier",
   "scripts": {
-    "build": "tsc -p apps/maarch_entreprise/js/angular/",
-    "build:watch": "tsc -p apps/maarch_entreprise/js/angular/ -w",
-    "build-prod": "npm run build && browserify -s main apps/maarch_entreprise/js/angular/main.js > apps/maarch_entreprise/js/angular/main.bundle.js && npm run minify && node-sass --include-path scss apps/maarch_entreprise/css/maarch-material.scss apps/maarch_entreprise/css/maarch-material.css --output-style compressed",
-    "minify": "uglifyjs apps/maarch_entreprise/js/angular/main.bundle.js --compress --mangle --output apps/maarch_entreprise/js/angular/main.bundle.min.js",
+    "build": "ng build",
+    "build-watch": "ng build --watch",
+    "build-prod": "ng build --prod && npm run build-css",
     "build-css": "node-sass --include-path scss apps/maarch_entreprise/css/maarch-material.scss   apps/maarch_entreprise/css/maarch-material.css --output-style compressed"
   },
   "keywords": [],
@@ -27,31 +26,29 @@
     "zone.js": "^0.8.20"
   },
   "devDependencies": {
-    "@angular/animations": "^5.2.7",
+    "@angular/animations": "^5.2.9",
     "@angular/cdk": "^5.2.4",
-    "@angular/common": "^5.2.7",
-    "@angular/compiler": "^5.2.7",
-    "@angular/compiler-cli": "^5.2.7",
-    "@angular/core": "^5.2.7",
-    "@angular/forms": "^5.2.7",
-    "@angular/http": "^5.2.7",
+    "@angular/cli": "~1.7.3",
+    "@angular/common": "^5.2.9",
+    "@angular/compiler": "^5.2.9",
+    "@angular/compiler-cli": "^5.2.9",
+    "@angular/core": "^5.2.9",
+    "@angular/forms": "^5.2.9",
+    "@angular/http": "^5.2.9",
     "@angular/material": "^5.2.4",
-    "@angular/platform-browser": "^5.2.7",
-    "@angular/platform-browser-dynamic": "^5.2.7",
-    "@angular/platform-server": "^5.2.7",
-    "@angular/router": "^5.2.7",
+    "@angular/platform-browser": "^5.2.9",
+    "@angular/platform-browser-dynamic": "^5.2.9",
+    "@angular/platform-server": "^5.2.9",
+    "@angular/router": "^5.2.9",
     "@types/datatables.net": "^1.10.8",
     "@types/jquery": "^2.0.49",
-    "@types/node": "^7.0.55",
-    "browserify": "^15.2.0",
+    "@types/node": "^7.0.56",
     "hammerjs": "^2.0.8",
-    "node-sass": "^4.7.2",
-    "nodemon": "^1.17.1",
-    "rxjs": "^5.5.6",
-    "systemjs": "0.20.19",
+    "node-sass": "^4.8.2",
+    "nodemon": "^1.17.2",
+    "rxjs": "^5.5.7",
     "tslib": "^1.9.0",
-    "typescript": "2.6.2",
-    "uglify-js": "^3.3.13"
+    "typescript": "2.6.2"
   },
   "repository": {}
 }
diff --git a/phpunit.xml b/phpunit.xml
index c008de4e66c1813d24b45002ac148351fac02f26..281e809637d11d65b3a08fbb1b42bafa9a373f37 100755
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -17,6 +17,7 @@
             <file>core/Test/ResControllerTest.php</file>
             <file>core/Test/StatusControllerTest.php</file>
             <file>core/Test/UserControllerTest.php</file>
+            <!-- <file>core/Test/GroupControllerTest.php</file> -->
             <file>modules/convert/Test/ProcessConvertTest.php</file>
             <file>modules/convert/Test/ProcessFulltextTest.php</file>
             <file>modules/convert/Test/ProcessManageConvertTest.php</file>
diff --git a/rest/index.php b/rest/index.php
index e7f928870f978144d509290cffa3dc9cb0bd59ee..198d8970d83763f9902568c715cefe8289741ff5 100755
--- a/rest/index.php
+++ b/rest/index.php
@@ -108,7 +108,15 @@ $app = new \Slim\App(['settings' => ['displayErrorDetails' => true]]);
 
 
 //Initialize
-$app->post('/initialize', \SrcCore\controllers\CoreController::class . ':initialize');
+$app->get('/initialize', \SrcCore\controllers\CoreController::class . ':initialize');
+
+//Actions
+$app->get('/actions', \Action\controllers\ActionController::class . ':get');
+$app->get('/initAction', \Action\controllers\ActionController::class . ':initAction');
+$app->get('/actions/{id}', \Action\controllers\ActionController::class . ':getById');
+$app->post('/actions', \Action\controllers\ActionController::class . ':create');
+$app->put('/actions/{id}', \Action\controllers\ActionController::class . ':update');
+$app->delete('/actions/{id}', \Action\controllers\ActionController::class . ':delete');
 
 //Administration
 $app->get('/administration', \SrcCore\controllers\CoreController::class . ':getAdministration');
@@ -227,6 +235,7 @@ $app->put('/listTemplates/{id}', \Entity\controllers\ListTemplateController::cla
 $app->delete('/listTemplates/{id}', \Entity\controllers\ListTemplateController::class . ':delete');
 $app->get('/listTemplates/entityDest/itemId/{itemId}', \Entity\controllers\ListTemplateController::class . ':getByUserWithEntityDest');
 $app->put('/listTemplates/entityDest/itemId/{itemId}', \Entity\controllers\ListTemplateController::class . ':updateByUserWithEntityDest');
+$app->put('/listTemplates/types/roles', \Entity\controllers\ListTemplateController::class . ':updateTypes');
 
 //Parameters
 $app->get('/parameters', \Parameter\controllers\ParameterController::class . ':get');
@@ -249,14 +258,6 @@ $app->get('/histories/users/{userSerialId}', \History\controllers\HistoryControl
 //HistoryBatch
 $app->get('/administration/historyBatch/eventDate/{date}', \History\controllers\HistoryBatchController::class . ':get');//TODO No date
 
-//actions
-$app->get('/actions', \Action\controllers\ActionController::class . ':get');
-$app->get('/initAction', \Action\controllers\ActionController::class . ':initAction');
-$app->get('/actions/{id}', \Action\controllers\ActionController::class . ':getById');
-$app->post('/actions', \Action\controllers\ActionController::class . ':create');
-$app->put('/actions/{id}', \Action\controllers\ActionController::class . ':update');
-$app->delete('/actions/{id}', \Action\controllers\ActionController::class . ':delete');
-
 //Notifications
 $app->get('/notifications', \Notification\controllers\NotificationController::class . ':get');
 $app->post('/notifications', \Notification\controllers\NotificationController::class . ':create');
@@ -298,6 +299,7 @@ $app->get('/listinstance/{id}', \Entity\controllers\ListInstanceController::clas
 
 //Contacts
 $app->post('/contacts', \Contact\controllers\ContactController::class . ':create');
+$app->get('/contact/checkCommunication/{contactId}', \Contact\controllers\ContactController::class . ':getCheckCommunication');
 
 //Templates
 $app->post('/templates/{id}/duplicate', \Template\controllers\TemplateController::class . ':duplicate');
diff --git a/sql/data_fr.sql b/sql/data_fr.sql
index 6f6e2891e33aa11519053144a1fc85ef6bc695af..2043dae9389cc72d9925c87e031b60a92b16f1de 100755
--- a/sql/data_fr.sql
+++ b/sql/data_fr.sql
@@ -80,6 +80,7 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'file
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'notes_restriction');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'delete_document_in_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'edit_document_in_detail');
+INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'save_numeric_package');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'adv_search_mlb');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'index_mlb');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'search_contacts');
@@ -341,230 +342,230 @@ TRUNCATE TABLE DOCTYPES_INDEXES;
 TRUNCATE TABLE TEMPLATES_DOCTYPE_EXT;
 TRUNCATE TABLE FOLDERTYPES_DOCTYPES_LEVEL1;
 
-INSERT INTO doctypes_first_level (doctypes_first_level_id, doctypes_first_level_label, css_style, enabled) VALUES (1, 'COURRIERS', 'black_style_big', 'Y');
+INSERT INTO doctypes_first_level (doctypes_first_level_id, doctypes_first_level_label, css_style, enabled) VALUES (1, 'COURRIERS', '#000000', 'Y');
 INSERT INTO foldertypes_doctypes_level1 (foldertype_id, doctypes_first_level_id) VALUES (1, 1);
-INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (1, '01. Correspondances', 1, 'black_style_big', 'Y');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',101, 'Abonnements – documentation – archives', 'Y', 1, 1, NULL, NULL);
+INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (1, '01. Correspondances', 1, '#000000', 'Y');
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',101, 'Abonnements – documentation – archives', 'Y', 1, 1);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (101, 30, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',102, 'Convocation', 'Y', 1, 1, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',102, 'Convocation', 'Y', 1, 1);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (102, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',103, 'Demande de documents', 'Y', 1, 1, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',103, 'Demande de documents', 'Y', 1, 1);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (103, 30, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',104, 'Demande de fournitures et matériels', 'Y', 1, 1, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',104, 'Demande de fournitures et matériels', 'Y', 1, 1);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (104, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',105, 'Demande de RDV', 'Y', 1, 1, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',105, 'Demande de RDV', 'Y', 1, 1);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (105, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',106, 'Demande de renseignements', 'Y', 1, 1, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',106, 'Demande de renseignements', 'Y', 1, 1);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (106, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',107, 'Demande mise à jour de fichiers', 'Y', 1, 1, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',107, 'Demande mise à jour de fichiers', 'Y', 1, 1);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (107, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',108, 'Demande Multi-Objet', 'Y', 1, 1, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',108, 'Demande Multi-Objet', 'Y', 1, 1);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (108, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',109, 'Installation provisoire dans un équipement ville', 'Y', 1, 1, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',109, 'Installation provisoire dans un équipement ville', 'Y', 1, 1);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (109, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',110, 'Invitation', 'Y', 1, 1, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',110, 'Invitation', 'Y', 1, 1);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (110, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',111, 'Rapport – Compte-rendu – Bilan', 'Y', 1, 1, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',111, 'Rapport – Compte-rendu – Bilan', 'Y', 1, 1);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (111, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',112, 'Réservation d''un local communal et scolaire', 'Y', 1, 1, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',112, 'Réservation d''un local communal et scolaire', 'Y', 1, 1);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (112, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (2, '02. Cabinet', 1, 'black_style_big', 'Y');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',201, 'Pétition', 'Y', 1, 2, NULL, NULL);
+INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (2, '02. Cabinet', 1, '#000000', 'Y');
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',201, 'Pétition', 'Y', 1, 2);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (201, 15, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',202, 'Communication', 'Y', 1, 2, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',202, 'Communication', 'Y', 1, 2);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (202, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',203, 'Politique', 'Y', 1, 2, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',203, 'Politique', 'Y', 1, 2);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (203, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',204, 'Relations et solidarité internationales ', 'Y', 1, 2, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',204, 'Relations et solidarité internationales ', 'Y', 1, 2);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (204, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',205, 'Remerciements et félicitations', 'Y', 1, 2, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',205, 'Remerciements et félicitations', 'Y', 1, 2);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (205, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',206, 'Sécurité', 'Y', 1, 2, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',206, 'Sécurité', 'Y', 1, 2);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (206, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',207, 'Suggestion', 'Y', 1, 2, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',207, 'Suggestion', 'Y', 1, 2);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (207, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (3, '03. Éducation', 1, 'black_style_big', 'Y');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',301, 'Culture', 'Y', 1, 3, NULL, NULL);
+INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (3, '03. Éducation', 1, '#000000', 'Y');
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',301, 'Culture', 'Y', 1, 3);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (301, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',302, 'Demande scolaire hors inscription et dérogation', 'Y', 1, 3, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',302, 'Demande scolaire hors inscription et dérogation', 'Y', 1, 3);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (302, 60, 14, 1, 'SVR');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',303, 'Éducation nationale', 'Y', 1, 3, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',303, 'Éducation nationale', 'Y', 1, 3);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (303, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',304, 'Jeunesse', 'Y', 1, 3, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',304, 'Jeunesse', 'Y', 1, 3);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (304, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',305, 'Lycées et collèges', 'Y', 1, 3, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',305, 'Lycées et collèges', 'Y', 1, 3);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (305, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',306, 'Parentalité', 'Y', 1, 3, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',306, 'Parentalité', 'Y', 1, 3);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (306, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',307, 'Petite Enfance', 'Y', 1, 3, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',307, 'Petite Enfance', 'Y', 1, 3);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (307, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',308, 'Sport', 'Y', 1, 3, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',308, 'Sport', 'Y', 1, 3);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (308, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (4, '04. Finances', 1, 'black_style_big', 'Y');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',401, 'Contestation financière', 'Y', 1, 4, NULL, NULL);
+INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (4, '04. Finances', 1, '#000000', 'Y');
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',401, 'Contestation financière', 'Y', 1, 4);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (401, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',402, 'Contrat de prêt', 'Y', 1, 4, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',402, 'Contrat de prêt', 'Y', 1, 4);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (402, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',403, 'Garantie d''emprunt', 'Y', 1, 4, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',403, 'Garantie d''emprunt', 'Y', 1, 4);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (403, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',404, 'Paiement', 'Y', 1, 4, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',404, 'Paiement', 'Y', 1, 4);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (404, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',405, 'Quotient familial', 'Y', 1, 4, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',405, 'Quotient familial', 'Y', 1, 4);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (405, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',406, 'Subvention', 'Y', 1, 4, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',406, 'Subvention', 'Y', 1, 4);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (406, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',407, 'Facture ou avoir', 'Y', 1, 4, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',407, 'Facture ou avoir', 'Y', 1, 4);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (407, 60, 14, 1, 'NORMAL');
 INSERT INTO doctypes_indexes (type_id, coll_id, field_name, mandatory) VALUES (407, 'letterbox_coll', 'custom_t1', 'Y');
 INSERT INTO doctypes_indexes (type_id, coll_id, field_name, mandatory) VALUES (407, 'letterbox_coll', 'custom_t2', 'N');
 INSERT INTO doctypes_indexes (type_id, coll_id, field_name, mandatory) VALUES (407, 'letterbox_coll', 'custom_f1', 'N');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',408, 'Proposition financière', 'Y', 1, 4, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',408, 'Proposition financière', 'Y', 1, 4);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (408, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (5, '05. Juridique', 1, 'black_style_big', 'Y');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',501, 'Hospitalisation d''office', 'Y', 1, 5, NULL, NULL);
+INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (5, '05. Juridique', 1, '#000000', 'Y');
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',501, 'Hospitalisation d''office', 'Y', 1, 5);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (501, 2, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',502, 'Mise en demeure', 'Y', 1, 5, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',502, 'Mise en demeure', 'Y', 1, 5);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (502, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',503, 'Plainte', 'Y', 1, 5, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',503, 'Plainte', 'Y', 1, 5);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (503, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',504, 'Recours contentieux', 'Y', 1, 5, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',504, 'Recours contentieux', 'Y', 1, 5);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (504, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',505, 'Recours gracieux et réclamations', 'Y', 1, 5, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',505, 'Recours gracieux et réclamations', 'Y', 1, 5);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (505, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (6, '06. Population ', 1, 'black_style_big', 'Y');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',601, 'Débits de boisson', 'Y', 1, 6, NULL, NULL);
+INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (6, '06. Population ', 1, '#000000', 'Y');
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',601, 'Débits de boisson', 'Y', 1, 6);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (601, 60, 14, 1, 'SVR');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',602, 'Demande d’État Civil', 'Y', 1, 6, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',602, 'Demande d’État Civil', 'Y', 1, 6);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (602, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',603, 'Élections', 'Y', 1, 6, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',603, 'Élections', 'Y', 1, 6);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (603, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',604, 'Étrangers', 'Y', 1, 6, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',604, 'Étrangers', 'Y', 1, 6);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (604, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',605, 'Marché', 'Y', 1, 6, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',605, 'Marché', 'Y', 1, 6);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (605, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',606, 'Médaille du travail', 'Y', 1, 6, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',606, 'Médaille du travail', 'Y', 1, 6);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (606, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',607, 'Stationnement taxi', 'Y', 1, 6, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',607, 'Stationnement taxi', 'Y', 1, 6);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (607, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',608, 'Vente au déballage', 'Y', 1, 6, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',608, 'Vente au déballage', 'Y', 1, 6);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (608, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (7, '07. Ressources Humaines', 1, 'black_style_big', 'Y');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',701, 'Arrêts de travail et maladie', 'Y', 1, 7, NULL, NULL);
+INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (7, '07. Ressources Humaines', 1, '#000000', 'Y');
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',701, 'Arrêts de travail et maladie', 'Y', 1, 7);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (701, 60, 14, 1, 'NORMAL');
 INSERT INTO doctypes_indexes (type_id, coll_id, field_name, mandatory) VALUES (701, 'letterbox_coll', 'custom_t3', 'N');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',702, 'Assurance du personnel', 'Y', 1, 7, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',702, 'Assurance du personnel', 'Y', 1, 7);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (702, 60, 14, 1, 'NORMAL');
 INSERT INTO doctypes_indexes (type_id, coll_id, field_name, mandatory) VALUES (702, 'letterbox_coll', 'custom_t3', 'N');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',703, 'Candidature', 'Y', 1, 7, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',703, 'Candidature', 'Y', 1, 7);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (703, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',704, 'Carrière', 'Y', 1, 7, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',704, 'Carrière', 'Y', 1, 7);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (704, 60, 14, 1, 'NORMAL');
 INSERT INTO doctypes_indexes (type_id, coll_id, field_name, mandatory) VALUES (704, 'letterbox_coll', 'custom_t3', 'N');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',705, 'Conditions de travail santé', 'Y', 1, 7, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',705, 'Conditions de travail santé', 'Y', 1, 7);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (705, 60, 14, 1, 'NORMAL');
 INSERT INTO doctypes_indexes (type_id, coll_id, field_name, mandatory) VALUES (705, 'letterbox_coll', 'custom_t3', 'N');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',706, 'Congés exceptionnels et concours', 'Y', 1, 7, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',706, 'Congés exceptionnels et concours', 'Y', 1, 7);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (706, 60, 14, 1, 'NORMAL');
 INSERT INTO doctypes_indexes (type_id, coll_id, field_name, mandatory) VALUES (706, 'letterbox_coll', 'custom_t3', 'N');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',707, 'Formation', 'Y', 1, 7, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',707, 'Formation', 'Y', 1, 7);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (707, 60, 14, 1, 'NORMAL');
 INSERT INTO doctypes_indexes (type_id, coll_id, field_name, mandatory) VALUES (707, 'letterbox_coll', 'custom_t3', 'N');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',708, 'Instances RH', 'Y', 1, 7, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',708, 'Instances RH', 'Y', 1, 7);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (708, 60, 14, 1, 'NORMAL');
 INSERT INTO doctypes_indexes (type_id, coll_id, field_name, mandatory) VALUES (708, 'letterbox_coll', 'custom_t3', 'N');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',709, 'Retraite', 'Y', 1, 7, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',709, 'Retraite', 'Y', 1, 7);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (709, 60, 14, 1, 'NORMAL');
 INSERT INTO doctypes_indexes (type_id, coll_id, field_name, mandatory) VALUES (709, 'letterbox_coll', 'custom_t3', 'N');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',710, 'Stage', 'Y', 1, 7, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',710, 'Stage', 'Y', 1, 7);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (710, 60, 14, 1, 'NORMAL');
 INSERT INTO doctypes_indexes (type_id, coll_id, field_name, mandatory) VALUES (710, 'letterbox_coll', 'custom_t3', 'N');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',711, 'Syndicats', 'Y', 1, 7, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',711, 'Syndicats', 'Y', 1, 7);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (711, 60, 14, 1, 'NORMAL');
 INSERT INTO doctypes_indexes (type_id, coll_id, field_name, mandatory) VALUES (711, 'letterbox_coll', 'custom_t3', 'N');
-INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (8, '08. Social', 1, 'black_style_big', 'Y');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',801, 'Aide à domicile', 'Y', 1, 8, NULL, NULL);
+INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (8, '08. Social', 1, '#000000', 'Y');
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',801, 'Aide à domicile', 'Y', 1, 8);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (801, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',802, 'Aide Financière', 'Y', 1, 8, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',802, 'Aide Financière', 'Y', 1, 8);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (802, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',803, 'Animations retraités', 'Y', 1, 8, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',803, 'Animations retraités', 'Y', 1, 8);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (803, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',804, 'Domiciliation', 'Y', 1, 8, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',804, 'Domiciliation', 'Y', 1, 8);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (804, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',805, 'Dossier de logement', 'Y', 1, 8, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',805, 'Dossier de logement', 'Y', 1, 8);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (805, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',806, 'Expulsion', 'Y', 1, 8, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',806, 'Expulsion', 'Y', 1, 8);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (806, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',807, 'Foyer', 'Y', 1, 8, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',807, 'Foyer', 'Y', 1, 8);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (807, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',808, 'Obligation alimentaire', 'Y', 1, 8, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',808, 'Obligation alimentaire', 'Y', 1, 8);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (808, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',809, 'RSA', 'Y', 1, 8, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',809, 'RSA', 'Y', 1, 8);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (809, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',810, 'Scolarisation à domicile', 'Y', 1, 8, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',810, 'Scolarisation à domicile', 'Y', 1, 8);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (810, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (9, '09. Technique', 1, 'black_style_big', 'Y');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',901, 'Aire d''accueil des gens du voyage', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (9, '09. Technique', 1, '#000000', 'Y');
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',901, 'Aire d''accueil des gens du voyage', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (901, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',902, 'Assainissement', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',902, 'Assainissement', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (902, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',903, 'Assurance et sinistre', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',903, 'Assurance et sinistre', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (903, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',904, 'Autorisation d''occupation du domaine public', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',904, 'Autorisation d''occupation du domaine public', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (904, 60, 14, 1, 'SVR');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',905, 'Contrat et convention hors marchés publics', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',905, 'Contrat et convention hors marchés publics', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (905, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',906, 'Détention de chiens dangereux', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',906, 'Détention de chiens dangereux', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (906, 60, 14, 1, 'SVR');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',907, 'Espaces verts – Environnement – Développement durable', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',907, 'Espaces verts – Environnement – Développement durable', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (907, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',908, 'Hygiène et Salubrité', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',908, 'Hygiène et Salubrité', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (908, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',909, 'Marchés Publics', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',909, 'Marchés Publics', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (909, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',910, 'Mobiliers urbains', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',910, 'Mobiliers urbains', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (910, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',911, 'NTIC', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',911, 'NTIC', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (911, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',912, 'Opération d''aménagement', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',912, 'Opération d''aménagement', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (912, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',913, 'Patrimoine', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',913, 'Patrimoine', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (913, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',914, 'Problème de voisinage', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',914, 'Problème de voisinage', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (914, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',915, 'Propreté', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',915, 'Propreté', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (915, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',916, 'Stationnement et circulation', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',916, 'Stationnement et circulation', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (916, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',917, 'Transports', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',917, 'Transports', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (917, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',918, 'Travaux', 'Y', 1, 9, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',918, 'Travaux', 'Y', 1, 9);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (918, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (10, '10. Urbanisme', 1, 'black_style_big', 'Y');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',1001, 'Alignement', 'Y', 1, 10, NULL, NULL);
+INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (10, '10. Urbanisme', 1, '#000000', 'Y');
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',1001, 'Alignement', 'Y', 1, 10);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (1001, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',1002, 'Avis d''urbanisme', 'Y', 1, 10, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',1002, 'Avis d''urbanisme', 'Y', 1, 10);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (1002, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',1003, 'Commerces', 'Y', 1, 10, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',1003, 'Commerces', 'Y', 1, 10);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (1003, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',1004, 'Numérotation', 'Y', 1, 10, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',1004, 'Numérotation', 'Y', 1, 10);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (1004, 60, 14, 1, 'NORMAL');
-INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (11, '11. Silence vaut acceptation', 1, 'orange_style_big', 'Y');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',1101, 'Autorisation de buvette', 'Y', 1, 11, NULL, NULL);
+INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (11, '11. Silence vaut acceptation', 1, '#FF4500', 'Y');
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',1101, 'Autorisation de buvette', 'Y', 1, 11);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (1101, 60, 14, 1, 'SVA');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',1102, 'Cimetière', 'Y', 1, 11, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',1102, 'Cimetière', 'Y', 1, 11);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (1102, 60, 14, 1, 'SVA');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',1103, 'Demande de dérogation scolaire', 'Y', 1, 11, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',1103, 'Demande de dérogation scolaire', 'Y', 1, 11);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (1103, 60, 14, 1, 'SVA');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',1104, 'Inscription à la cantine et activités périscolaires ', 'Y', 1, 11, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',1104, 'Inscription à la cantine et activités périscolaires ', 'Y', 1, 11);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (1104, 60, 14, 1, 'SVA');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',1105, 'Inscription toutes petites sections', 'Y', 1, 11, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',1105, 'Inscription toutes petites sections', 'Y', 1, 11);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (1105, 90, 14, 1, 'SVA');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',1106, 'Travaux ERP', 'Y', 1, 11, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',1106, 'Travaux ERP', 'Y', 1, 11);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (1106, 60, 14, 1, 'SVA');
-INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (12, '12. Formulaires', 1, 'blue_style_big', 'Y');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',1201, 'Appel téléphonique', 'Y', 1, 12, NULL, NULL);
+INSERT INTO doctypes_second_level (doctypes_second_level_id, doctypes_second_level_label, doctypes_first_level_id, css_style, enabled) VALUES (12, '12. Formulaires', 1, '#0000FF', 'Y');
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',1201, 'Appel téléphonique', 'Y', 1, 12);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (1201, 21, 14, 1, 'NORMAL');
-INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id, primary_retention, secondary_retention) VALUES ('letterbox_coll',1202, 'Demande intervention voirie', 'Y', 1, 12, NULL, NULL);
+INSERT INTO doctypes (coll_id, type_id, description, enabled, doctypes_first_level_id, doctypes_second_level_id) VALUES ('letterbox_coll',1202, 'Demande intervention voirie', 'Y', 1, 12);
 INSERT INTO mlb_doctype_ext(type_id, process_delay, delay1, delay2, process_mode) VALUES (1202, 21, 14, 1, 'NORMAL');
 select setval('doctypes_first_level_id_seq', (select max(doctypes_first_level_id)+1 from doctypes_first_level), false);
 select setval('doctypes_second_level_id_seq', (select max(doctypes_second_level_id)+1 from doctypes_second_level), false);
@@ -1003,6 +1004,8 @@ INSERT INTO docserver_types (docserver_type_id, docserver_type_label, enabled, i
 VALUES ('TNL', 'Thumbnails', 'Y', 'N', 0, 'N', 'NONE', 'N', 'NONE', 'N', 'NONE', 'Y', 'NONE');
 INSERT INTO docserver_types (docserver_type_id, docserver_type_label, enabled, is_container, container_max_number, is_compressed, compression_mode, is_meta, meta_template, is_logged, log_template, is_signed, fingerprint_mode) 
 VALUES ('TEMPLATES', 'TEMPLATES', 'Y', 'N', 0, 'N', 'NONE', 'N', 'NONE', 'N', 'NONE', 'N', 'NONE');
+INSERT INTO docserver_types (docserver_type_id, docserver_type_label, enabled, is_container, container_max_number, is_compressed, compression_mode, is_meta, meta_template, is_logged, log_template, is_signed, fingerprint_mode) 
+VALUES ('ARCHIVETRANSFER', 'Archive Transfer', 'Y', 'N', 0, 'N', 'NONE', 'N', 'NONE', 'N', 'NONE', 'Y', 'SHA256');
 
 TRUNCATE TABLE docservers;
 INSERT INTO docservers (docserver_id, docserver_type_id, device_label, is_readonly, enabled, size_limit_number, actual_size_number, path_template, ext_docserver_info, chain_before, chain_after, creation_date, closing_date, coll_id, priority_number, docserver_location_id, adr_priority_number) 
@@ -1033,7 +1036,8 @@ INSERT INTO docservers (docserver_id, docserver_type_id, device_label, is_readon
 VALUES ('FULLTEXT_ATTACH_VERSION', 'FULLTEXT', 'Server for attachments version documents fulltext', 'N', 'Y', 50000000000, 0, '/opt/maarch/docservers/fulltext_attachments_version/', NULL, NULL, NULL, '2015-03-16 14:47:49.197164', NULL, 'attachments_version_coll', 103, 'NANTERRE', 103);
 INSERT INTO docservers (docserver_id, docserver_type_id, device_label, is_readonly, enabled, size_limit_number, actual_size_number, path_template, ext_docserver_info, chain_before, chain_after, creation_date, closing_date, coll_id, priority_number, docserver_location_id, adr_priority_number) 
 VALUES ('TEMPLATES', 'TEMPLATES', '[system] Templates', 'N', 'Y', 50000000000, 71511, '/opt/maarch/docservers/templates/', NULL, NULL, NULL, '2012-04-01 14:49:05.095119', NULL, 'templates', 1, 'NANTERRE', 1);
-
+INSERT INTO docservers (docserver_id, docserver_type_id, device_label, is_readonly, enabled, size_limit_number, actual_size_number, path_template, ext_docserver_info, chain_before, chain_after, creation_date, closing_date, coll_id, priority_number, docserver_location_id, adr_priority_number) 
+VALUES ('ARCHIVETRANSFER', 'ARCHIVETRANSFER', 'Fast internal disc bay for archive transfer', 'N', 'Y', 50000000000, 1, '/opt/maarch/docservers/archive_transfer/', NULL, NULL, NULL, '2017-01-13 14:47:49.197164', NULL, 'archive_transfer_coll', 10, 'NANTERRE', 2);
 ------------
 --SUPERADMIN USER
 ------------
@@ -1094,6 +1098,9 @@ INSERT INTO status (id, label_status, is_system, is_folder_status, img_filename,
 INSERT INTO status (id, label_status, is_system, is_folder_status, img_filename, maarch_module, can_be_searched, can_be_modified) VALUES ('SEND_SEDA ', 'Courrier envoyé au système d''archivage', 'Y', 'N', 'fm-letter-status-inprogress', 'apps', 'Y', 'Y');
 INSERT INTO status (id, label_status, is_system, is_folder_status, img_filename, maarch_module, can_be_searched, can_be_modified) VALUES ('ACK_SEDA ', 'Accusé de reception reçu', 'Y', 'N', 'fm-letter-status-acla', 'apps', 'Y', 'Y');
 INSERT INTO status (id, label_status, is_system, is_folder_status, img_filename, maarch_module, can_be_searched, can_be_modified) VALUES ('REPLY_SEDA', 'Courrier archivé', 'Y', 'N', 'fm-letter-status-acla', 'apps', 'Y', 'Y');
+INSERT INTO status (id, label_status, is_system, is_folder_status, img_filename, maarch_module, can_be_searched, can_be_modified) VALUES ('RETRN', 'Retrouné', 'Y', 'N', '', 'apps', 'N', 'N');
+INSERT INTO status (id, label_status, is_system, is_folder_status, img_filename, maarch_module, can_be_searched, can_be_modified) VALUES ('NO_RETRN', 'Pas de retour', 'Y', 'N', '', 'apps', 'N', 'N');
+
 ------------
 --STATUS IMAGES-
 ------------
@@ -1178,7 +1185,9 @@ INSERT INTO actions (id, keyword, label_action, id_status, is_system, is_folder_
 INSERT INTO actions (id, keyword, label_action, id_status, is_system, is_folder_action, enabled, action_page, history, origin, create_id, category_id) VALUES (500, '', 'Transférer au système d''archivage', 'SEND_SEDA', 'N', 'N', 'Y', 'export_seda', 'Y', 'export_seda', 'N', NULL);
 INSERT INTO actions (id, keyword, label_action, id_status, is_system, is_folder_action, enabled, action_page, history, origin, create_id, category_id) VALUES (501, '', 'Valider la réception du courrier par le système d''archivage', 'ACK_SEDA', 'N', 'N', 'Y', 'ack_seda', 'Y', 'apps', 'N', NULL);
 INSERT INTO actions (id, keyword, label_action, id_status, is_system, is_folder_action, enabled, action_page, history, origin, create_id, category_id) VALUES (502, '', 'Valider l''archivage du courrier', 'REPLY_SEDA', 'N', 'N', 'Y', 'reply_seda', 'Y', 'apps', 'N', NULL);
-INSERT INTO actions (id, keyword, label_action, id_status, is_system, is_folder_action, enabled, action_page, history, origin, create_id, category_id) VALUES (503, '', 'Supprimer courrier', 'DEL', 'N', 'N', 'Y', 'del_seda', 'Y', 'apps', 'N', NULL);
+INSERT INTO actions (id, keyword, label_action, id_status, is_system, is_folder_action, enabled, action_page, history, origin, create_id, category_id) VALUES (503, '', 'Supprimer courrier', 'DEL', 'N', 'N', 'Y', 'purge_letter', 'Y', 'apps', 'N', NULL);
+INSERT INTO actions (id, keyword, label_action, id_status, is_system, is_folder_action, enabled, action_page, history, origin, create_id, category_id) VALUES (504, '', 'Remise à zero du courrier', 'END', 'N', 'N', 'Y', 'reset_letter', 'Y', 'apps', 'N', NULL);
+
 Select setval('actions_id_seq', (select max(id)+1 from actions), false);
 ------------
 --ACTIONS_GROUPBASKETS
@@ -1275,8 +1284,10 @@ INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id,
 INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (4, '', 'ELU', 'DdeAvisBasket', 'N', 'N', 'Y');
 
 INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (500, '', 'ARCHIVISTE', 'ToArcBasket', 'Y', 'N', 'N');
-INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (501, '', 'ARCHIVISTE', 'SentArcBasket', 'Y', 'N', 'N');
-INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (502, '', 'ARCHIVISTE', 'AckArcBasket', 'Y', 'N', 'N');
+INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (501, '', 'ARCHIVISTE', 'ToArcBasket', 'Y', 'N', 'N');
+INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (502, '', 'ARCHIVISTE', 'SentArcBasket', 'Y', 'N', 'N');
+INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (503, '', 'ARCHIVISTE', 'AckArcBasket', 'Y', 'N', 'N');
+INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (504, '', 'ARCHIVISTE', 'AckArcBasket', 'Y', 'N', 'N');
 ------------
 --GROUPBASKET_REDIRECT
 ------------
@@ -1480,67 +1491,63 @@ VALUES (6, '[notification courrier] Alerte 1', '[notification] Alerte 1', '<p><f
 </tbody>
 </table>', 'HTML', NULL, NULL, 'ODP: open_office_presentation', 'letterbox_events', 'notifications');
 INSERT INTO templates (template_id, template_label, template_comment, template_content, template_type, template_path, template_file_name, template_style, template_datasource, template_target)
-VALUES (7, '[notification courrier] Diffusion de courrier', 'Alerte de courriers présents dans les bannettes', '<p><font face="arial,helvetica,sans-serif" size="2">Bonjour [recipient.firstname] [recipient.lastname],</font></p>
-<p> </p>
-<p><font face="arial,helvetica,sans-serif" size="2"> </font></p>
-<p> </p>
-<p><font face="arial,helvetica,sans-serif" size="2">Voici la liste des nouveaux courriers présents dans cette bannette :</font></p>
-<p> </p>
-<table style="border: 1pt solid #000000### width: 1582px### height: 77px###" border="1" cellspacing="1" cellpadding="5" frame="box">
+VALUES (7, '[notification courrier] Diffusion de courrier', 'Alerte de courriers présents dans les bannettes', '<p style="font-family: Trebuchet MS, Arial, Helvetica, sans-serif###">Bonjour <strong>[recipient.firstname] [recipient.lastname]</strong>,</p>
+<p>&nbsp###</p>
+<p style="font-family: Trebuchet MS, Arial, Helvetica, sans-serif###">Voici la liste des nouveaux courriers pr&eacute###sents dans cette bannette :</p>
+<table style="font-family: Trebuchet MS, Arial, Helvetica, sans-serif### border-collapse: collapse### width: 100%###">
 <tbody>
 <tr>
-<td><font face="arial,helvetica,sans-serif"><strong><font size="2">Référence</font></strong></font></td>
-<td><font face="arial,helvetica,sans-serif"><strong><font size="2">Origine</font></strong></font></td>
-<td><font face="arial,helvetica,sans-serif"><strong><font size="2">Emetteur</font></strong></font></td>
-<td><font face="arial,helvetica,sans-serif" size="2" color="#000000"><strong>Date</strong></font></td>
-<td><font face="arial,helvetica,sans-serif" size="2" color="#000000"><strong>Objet</strong></font></td>
-<td><font face="arial,helvetica,sans-serif" size="2" color="#000000"><strong>Type</strong></font></td>
-<td><font face="arial,helvetica,sans-serif" size="2" color="#FFFFFF"><strong>Liens</strong></font></td>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">R&eacute###f&eacute###rence</th>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">Origine</th>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">Emetteur</th>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">Date</th>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">Objet</th>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">Type</th>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">&nbsp###</th>
 </tr>
 <tr>
-<td><font face="arial,helvetica,sans-serif" size="2">[res_letterbox.res_id]</font></td>
-<td><font face="arial,helvetica,sans-serif" size="2">[res_letterbox.typist]</font></td>
-<td>
-<p><font face="arial,helvetica,sans-serif" size="2">[res_letterbox.contact_society] [res_letterbox.contact_firstname] [res_letterbox.contact_lastname][res_letterbox.function][res_letterbox.address_num][res_letterbox.address_street][res_letterbox.address_postal_code][res_letterbox.address_town]</font></p>
-</td>
-<td><font face="arial,helvetica,sans-serif" size="2">[res_letterbox.doc_date###block=tr###frm=dd/mm/yyyy]</font></td>
-<td><font face="arial,helvetica,sans-serif" color="#FF0000"><strong><font size="2">[res_letterbox.subject]</font></strong></font></td>
-<td><font face="arial,helvetica,sans-serif" size="2">[res_letterbox.type_label]</font></td>
-<td><font face="arial,helvetica,sans-serif"><a href="[res_letterbox.linktodetail]" name="detail">detail</a> <a href="[res_letterbox.linktodoc]" name="doc">Afficher</a></font></td>
+<td style="border: 1px solid #ddd### padding: 8px###">[res_letterbox.res_id]</td>
+<td style="border: 1px solid #ddd### padding: 8px###">[res_letterbox.typist]</td>
+<td style="border: 1px solid #ddd### padding: 8px###">[res_letterbox.contact_society] [res_letterbox.contact_firstname] [res_letterbox.contact_lastname][res_letterbox.function][res_letterbox.address_num][res_letterbox.address_street][res_letterbox.address_postal_code][res_letterbox.address_town]</td>
+<td style="border: 1px solid #ddd### padding: 8px###">[res_letterbox.doc_date###block=tr###frm=dd/mm/yyyy]</td>
+<td style="border: 1px solid #ddd### padding: 8px###">[res_letterbox.subject]</td>
+<td style="border: 1px solid #ddd### padding: 8px###">[res_letterbox.type_label]</td>
+<td style="border: 1px solid #ddd### padding: 8px### text-align: right###"><a style="text-decoration: none### background: #135f7f### padding: 5px### color: white### -webkit-box-shadow: 6px 4px 5px 0px rgba(0,0,0,0.75)### -moz-box-shadow: 6px 4px 5px 0px rgba(0,0,0,0.75)### box-shadow: 6px 4px 5px 0px rgba(0,0,0,0.75)###" href="[res_letterbox.linktodetail]" name="detail">D&eacute###tail</a> <a style="text-decoration: none### background: #135f7f### padding: 5px### color: white### -webkit-box-shadow: 6px 4px 5px 0px rgba(0,0,0,0.75)### -moz-box-shadow: 6px 4px 5px 0px rgba(0,0,0,0.75)### box-shadow: 6px 4px 5px 0px rgba(0,0,0,0.75)###" href="[res_letterbox.linktodoc]" name="doc">Afficher</a></td>
 </tr>
 </tbody>
-</table>', 'HTML', NULL, NULL, 'ODP: open_office_presentation', 'letterbox_events', 'notifications');
-INSERT INTO templates (template_id, template_label, template_comment, template_content, template_type, template_path, template_file_name, template_style, template_datasource, template_target)
-VALUES (8, '[notification courrier] Nouvelle annotation', '[notification] Nouvelle annotation', '<p><font face="verdana,geneva" size="2">Bonjour [recipient.firstname] [recipient.lastname], [recipient.text]</font></p>
-<p>&nbsp###</p>
-<p><font face="verdana,geneva" size="2"> </font></p>
+</table>
 <p>&nbsp###</p>
-<p><font face="verdana,geneva" size="2">Voici la liste des notes pour les courriers suivants :</font></p>
+<p style="font-family: Trebuchet MS, Arial, Helvetica, sans-serif### width: 100%### text-align: center### font-size: 9px### font-style: italic### opacity: 0.5###">Message g&eacute###n&eacute###r&eacute### via l''application MaarchCourrier</p>', 'HTML', NULL, NULL, 'ODP: open_office_presentation', 'letterbox_events', 'notifications');
+INSERT INTO templates (template_id, template_label, template_comment, template_content, template_type, template_path, template_file_name, template_style, template_datasource, template_target)
+VALUES (8, '[notification courrier] Nouvelle annotation', '[notification] Nouvelle annotation', '<p style="font-family: Trebuchet MS, Arial, Helvetica, sans-serif###">Bonjour <strong>[recipient.firstname] [recipient.lastname]</strong>,</p>
 <p>&nbsp###</p>
-<table style="width: 982px### height: 77px###" border="1" cellspacing="3" cellpadding="3" frame="box">
+<p style="font-family: Trebuchet MS, Arial, Helvetica, sans-serif###">Voici les nouvelles annotations sur les courriers suivants :</p>
+<table style="font-family: Trebuchet MS, Arial, Helvetica, sans-serif### border-collapse: collapse### width: 100%###">
 <tbody>
 <tr>
-<td><strong>Reference</strong></td>
-<td><strong>Num</strong></td>
-<td><strong>Date</strong></td>
-<td><strong>Objet</strong></td>
-<td><strong>Note</strong></td>
-<td><strong>Ajout&eacute### par</strong></td>
-<td><strong>Contact</strong></td>
-<td><strong>Liens</strong></td>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">R&eacute###f&eacute###rence</th>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">Num</th>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">Date</th>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">Objet</th>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">Note</th>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">Ajout&eacute### par</th>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">Contact</th>
+<th style="border: 1px solid #ddd### padding: 8px### padding-top: 12px### padding-bottom: 12px### text-align: left### background-color: #135f7f### color: white###">&nbsp###</th>
 </tr>
 <tr>
-<td>[notes.identifier]</td>
-<td>[notes.# ###frm=0000]</td>
-<td>[notes.doc_date###block=tr###frm=dd/mm/yyyy]</td>
-<td>[notes.subject]</td>
-<td>[notes.note_text]</td>
-<td>[notes.user_id]</td>
-<td>[notes.contact_society] [notes.contact_firstname] [notes.contact_lastname]</td>
-<td><a href="[notes.linktodetail]" name="detail">d&eacute###tail</a> <a href="[notes.linktodoc]" name="doc">doc</a></td>
+<td style="border: 1px solid #ddd### padding: 8px###">[notes.identifier]</td>
+<td style="border: 1px solid #ddd### padding: 8px###">[notes.# ###frm=0000]</td>
+<td style="border: 1px solid #ddd### padding: 8px###">[notes.doc_date###block=tr###frm=dd/mm/yyyy]</td>
+<td style="border: 1px solid #ddd### padding: 8px###">[notes.subject]</td>
+<td style="border: 1px solid #ddd### padding: 8px###">[notes.note_text]</td>
+<td style="border: 1px solid #ddd### padding: 8px###">[notes.user_id]</td>
+<td style="border: 1px solid #ddd### padding: 8px###">[notes.contact_society] [notes.contact_firstname] [notes.contact_lastname]</td>
+<td style="border: 1px solid #ddd### padding: 8px### text-align: right###"><a style="text-decoration: none### background: #135f7f### padding: 5px### color: white### -webkit-box-shadow: 6px 4px 5px 0px rgba(0,0,0,0.75)### -moz-box-shadow: 6px 4px 5px 0px rgba(0,0,0,0.75)### box-shadow: 6px 4px 5px 0px rgba(0,0,0,0.75)###" href="[res_letterbox.linktodetail]" name="detail">D&eacute###tail</a> <a style="text-decoration: none### background: #135f7f### padding: 5px### color: white### -webkit-box-shadow: 6px 4px 5px 0px rgba(0,0,0,0.75)### -moz-box-shadow: 6px 4px 5px 0px rgba(0,0,0,0.75)### box-shadow: 6px 4px 5px 0px rgba(0,0,0,0.75)###" href="[res_letterbox.linktodoc]" name="doc">Afficher</a></td>
 </tr>
 </tbody>
-</table>', 'HTML', NULL, NULL, 'ODP: open_office_presentation', 'notes', 'notifications');
+</table>
+<p>&nbsp###</p>
+<p style="font-family: Trebuchet MS, Arial, Helvetica, sans-serif### width: 100%### text-align: center### font-size: 9px### font-style: italic### opacity: 0.5###">Message g&eacute###n&eacute###r&eacute### via l''application MaarchCourrier</p>', 'HTML', NULL, NULL, 'ODP: open_office_presentation', 'notes', 'notifications');
 INSERT INTO templates (template_id, template_label, template_comment, template_content, template_type, template_path, template_file_name, template_style, template_datasource, template_target, template_attachment_type) VALUES (9, 'Demande - Voirie', 'Demande - Voirie', '<h2>Demande Intervention VOIRIE</h2>
 <hr />
 <table style="border: 1pt solid #000000### width: 597px### background-color: #f0f0f0### height: 172px###" border="1" cellspacing="1" cellpadding="5"><caption>&nbsp###</caption>
@@ -1691,21 +1698,23 @@ Select setval('templates_seq', (select max(template_id)+1 from templates), false
 --NOTIFICATIONS
 ------------
 TRUNCATE TABLE notifications;
-INSERT INTO notifications (notification_sid, notification_id, description, event_id, notification_mode, template_id, diffusion_type, diffusion_properties, attachfor_type, attachfor_properties, rss_url_template)
-VALUES (1, 'USERS', '[administration] Actions sur les utilisateurs de l''application', 'users%', 'EMAIL', 2, 'user', 'superadmin', '', '', 'http://localhost/maarch_entreprise');
-INSERT INTO notifications (notification_sid, notification_id, description, event_id, notification_mode, template_id, rss_url_template, diffusion_type, diffusion_properties, attachfor_type, attachfor_properties, is_enabled)
-VALUES (2, 'RET2', '2ie alerte sur courriers en retard', 'alert2', 'EMAIL', 5, '', 'dest_user', '', '', '', 'Y');
-INSERT INTO notifications (notification_sid, notification_id, description, event_id, notification_mode, template_id, rss_url_template, diffusion_type, diffusion_properties, attachfor_type, attachfor_properties, is_enabled)
-VALUES (3, 'RET1', '1ère alerte sur courriers en retard', 'alert1', 'EMAIL', 6, '', 'dest_user', '', '', '', 'Y');
-INSERT INTO notifications (notification_sid, notification_id, description, event_id, notification_mode, template_id, rss_url_template, diffusion_type, diffusion_properties, attachfor_type, attachfor_properties, is_enabled)
-VALUES (4, 'BASKETS', 'Notification de bannettes', '', 'EMAIL', 7, '', 'dest_user', '', '', '', 'Y');
-INSERT INTO notifications (notification_sid, notification_id, description, event_id, notification_mode, template_id, rss_url_template, diffusion_type, diffusion_properties, attachfor_type, attachfor_properties, is_enabled)
-VALUES (5, 'ANC', 'Nouvelle annotation sur courrier en copie', 'noteadd', 'EMAIL', 8, '', 'copy_list', '', '', '', 'Y');
-INSERT INTO notifications (notification_sid, notification_id, description, event_id, notification_mode, template_id, rss_url_template, diffusion_type, diffusion_properties, attachfor_type, attachfor_properties, is_enabled)
-VALUES (6, 'AND', 'Nouvelle annotation sur courrier destinataire', 'noteadd', 'EMAIL', 8, '', 'dest_user', '', '', '', 'Y');
-INSERT INTO notifications (notification_sid, notification_id, description, event_id, notification_mode, template_id, rss_url_template, diffusion_type, diffusion_properties, attachfor_type, attachfor_properties, is_enabled)
-VALUES (7, 'RED', 'Redirection de courrier', '1', 'EMAIL', 7, '', 'dest_user', '', '', '', 'Y');
+
+INSERT INTO notifications (notification_sid, notification_id, description, event_id, notification_mode, template_id, diffusion_type, diffusion_properties, attachfor_type, attachfor_properties)
+VALUES (1, 'USERS', '[administration] Actions sur les utilisateurs de l''application', 'users%', 'EMAIL', 2, 'user', 'superadmin', '', '');
+INSERT INTO notifications (notification_sid, notification_id, description, event_id, notification_mode, template_id, diffusion_type, diffusion_properties, attachfor_type, attachfor_properties, is_enabled)
+VALUES (2, 'RET2', 'Courriers en retard de traitement', 'alert2', 'EMAIL', 5, 'dest_user', '', '', '', 'Y');
+INSERT INTO notifications (notification_sid, notification_id, description, event_id, notification_mode, template_id, diffusion_type, diffusion_properties, attachfor_type, attachfor_properties, is_enabled)
+VALUES (3, 'RET1', 'Courriers arrivant à échéance', 'alert1', 'EMAIL', 6, 'dest_user', '', '', '', 'Y');
+INSERT INTO notifications (notification_sid, notification_id, description, event_id, notification_mode, template_id, diffusion_type, diffusion_properties, attachfor_type, attachfor_properties, is_enabled)
+VALUES (4, 'BASKETS', 'Notification de bannettes', 'baskets', 'EMAIL', 7, 'dest_user', '', '', '', 'Y');
+INSERT INTO notifications (notification_sid, notification_id, description, event_id, notification_mode, template_id, diffusion_type, diffusion_properties, attachfor_type, attachfor_properties, is_enabled)
+VALUES (5, 'ANC', 'Nouvelle annotation sur courrier en copie', 'noteadd', 'EMAIL', 8, 'copy_list', '', '', '', 'Y');
+INSERT INTO notifications (notification_sid, notification_id, description, event_id, notification_mode, template_id, diffusion_type, diffusion_properties, attachfor_type, attachfor_properties, is_enabled)
+VALUES (6, 'AND', 'Nouvelle annotation sur courrier destinataire', 'noteadd', 'EMAIL', 8, 'dest_user', '', '', '', 'Y');
+INSERT INTO notifications (notification_sid, notification_id, description, event_id, notification_mode, template_id, diffusion_type, diffusion_properties, attachfor_type, attachfor_properties, is_enabled)
+VALUES (7, 'RED', 'Redirection de courrier', '1', 'EMAIL', 7, 'dest_user', '', '', '', 'Y');
 INSERT INTO notifications (template_id, notification_id, description, is_enabled, event_id, notification_mode, diffusion_type, diffusion_properties) SELECT template_id, 'QUOTA', 'Alerte lorsque le quota est dépassé', 'Y', 'user_quota', 'EMAIL', 'user', 'superadmin' FROM templates WHERE template_label = 'Quota d''utilisateur';
+
 Select setval('notifications_seq', (select max(notification_sid)+1 from notifications), false);
 
 ------------
diff --git a/sql/develop.sql b/sql/develop.sql
index a8c1a71ca0b940ab06c78f84fdfdeeaceea92d9a..6214b6327ff21f30df2d9640ecf464bc2b1f70e4 100755
--- a/sql/develop.sql
+++ b/sql/develop.sql
@@ -638,3 +638,87 @@ DO $$ BEGIN
     DROP TABLE IF EXISTS user_baskets_secondary;
   END IF;
 END$$;
+
+
+
+/****** M2M *******/
+ALTER TABLE unit_identifier DROP COLUMN IF EXISTS disposition;
+ALTER TABLE unit_identifier ADD disposition text default NULL;
+
+ALTER TABLE sendmail DROP COLUMN IF EXISTS message_exchange_id;
+ALTER TABLE sendmail ADD message_exchange_id text default NULL;
+
+ALTER TABLE IF EXISTS seda RENAME TO message_exchange;
+
+ALTER TABLE message_exchange DROP COLUMN IF EXISTS file_path;
+ALTER TABLE message_exchange ADD file_path text default NULL;
+
+ALTER TABLE message_exchange DROP COLUMN IF EXISTS res_id_master;
+ALTER TABLE message_exchange ADD res_id_master numeric default NULL;
+
+/** ADD NEW COLUMN IS TRANSFERABLE **/
+ALTER TABLE contact_addresses DROP COLUMN  IF EXISTS  external_contact_id;
+ALTER TABLE contact_addresses ADD COLUMN external_contact_id character varying(128);
+
+DROP SEQUENCE IF EXISTS contact_communication_id_seq CASCADE;
+CREATE SEQUENCE contact_communication_id_seq
+INCREMENT 1
+MINVALUE 1
+MAXVALUE 9223372036854775807
+START 1
+CACHE 1;
+
+DROP TABLE IF EXISTS contact_communication;
+CREATE TABLE contact_communication
+(
+  id bigint NOT NULL DEFAULT nextval('contact_communication_id_seq'::regclass),
+  contact_id bigint NOT NULL,
+  type character varying(255) NOT NULL,
+  value character varying(255) NOT NULL,
+  CONSTRAINT contact_communication_pkey PRIMARY KEY (id)
+) WITH (OIDS=FALSE);
+
+DROP VIEW IF EXISTS view_contacts;
+CREATE OR REPLACE VIEW view_contacts AS 
+ SELECT c.contact_id, c.contact_type, c.is_corporate_person, c.society, c.society_short, c.firstname AS contact_firstname
+, c.lastname AS contact_lastname, c.title AS contact_title, c.function AS contact_function, c.other_data AS contact_other_data
+, c.user_id AS contact_user_id, c.entity_id AS contact_entity_id, c.creation_date, c.update_date, c.enabled AS contact_enabled, ca.id AS ca_id
+, ca.contact_purpose_id, ca.departement, ca.firstname, ca.lastname, ca.title, ca.function, ca.occupancy
+, ca.address_num, ca.address_street, ca.address_complement, ca.address_town, ca.address_postal_code, ca.address_country
+, ca.phone, ca.email, ca.website, ca.salutation_header, ca.salutation_footer, ca.other_data, ca.user_id, ca.entity_id, ca.is_private, ca.enabled, ca.external_contact_id
+, cp.label as contact_purpose_label, ct.label as contact_type_label
+   FROM contacts_v2 c
+   RIGHT JOIN contact_addresses ca ON c.contact_id = ca.contact_id
+   LEFT JOIN contact_purposes cp ON ca.contact_purpose_id = cp.id
+   LEFT JOIN contact_types ct ON c.contact_type = ct.id;
+ 
+ALTER TABLE sendmail DROP COLUMN IF EXISTS res_version_att_id_list; 
+ALTER TABLE sendmail ADD COLUMN res_version_att_id_list character varying(255); 
+
+ALTER TABLE message_exchange DROP COLUMN IF EXISTS docserver_id;
+ALTER TABLE message_exchange ADD docserver_id character varying(32) DEFAULT NULL;
+
+ALTER TABLE message_exchange DROP COLUMN IF EXISTS path;
+ALTER TABLE message_exchange ADD path character varying(255) DEFAULT NULL;
+
+ALTER TABLE message_exchange DROP COLUMN IF EXISTS filename;
+ALTER TABLE message_exchange ADD filename character varying(255) DEFAULT NULL;
+
+ALTER TABLE message_exchange DROP COLUMN IF EXISTS fingerprint;
+ALTER TABLE message_exchange ADD fingerprint character varying(255) DEFAULT NULL;
+
+ALTER TABLE message_exchange DROP COLUMN IF EXISTS filesize;
+ALTER TABLE message_exchange ADD filesize bigint;
+
+DELETE FROM docservers WHERE docserver_id = 'ARCHIVETRANSFER';
+INSERT INTO docservers (docserver_id, docserver_type_id, device_label, is_readonly, enabled, size_limit_number, actual_size_number, path_template, ext_docserver_info, chain_before, chain_after, creation_date, closing_date, coll_id, priority_number, docserver_location_id, adr_priority_number) 
+VALUES ('ARCHIVETRANSFER', 'ARCHIVETRANSFER', 'Fast internal disc bay for archive transfer', 'N', 'Y', 50000000000, 1, '/opt/maarch/docservers/archive_transfer/', NULL, NULL, NULL, '2017-01-13 14:47:49.197164', NULL, 'archive_transfer_coll', 10, 'NANTERRE', 2);
+
+DELETE FROM docserver_types WHERE docserver_type_id = 'ARCHIVETRANSFER';
+INSERT INTO docserver_types (docserver_type_id, docserver_type_label, enabled, is_container, container_max_number, is_compressed, compression_mode, is_meta, meta_template, is_logged, log_template, is_signed, fingerprint_mode) 
+VALUES ('ARCHIVETRANSFER', 'Archive Transfer', 'Y', 'N', 0, 'N', 'NONE', 'N', 'NONE', 'N', 'NONE', 'Y', 'SHA256');
+
+ALTER TABLE sendmail ALTER COLUMN res_id DROP NOT NULL;
+
+ALTER TABLE notifications DROP COLUMN IF EXISTS rss_url_template;
+UPDATE notifications SET event_id = 'baskets' WHERE notification_id = 'BASKETS';
\ No newline at end of file
diff --git a/sql/structure.sql b/sql/structure.sql
index 65bbe4f157e26c5341c3fc48c58390783752ad63..aedf33edf6712c02a84c31e35f73ef9d91a065fb 100755
--- a/sql/structure.sql
+++ b/sql/structure.sql
@@ -948,7 +948,6 @@ CREATE TABLE notifications
   event_id character varying(255) NOT NULL,
   notification_mode character varying(30) NOT NULL,
   template_id bigint,
-  rss_url_template text,
   diffusion_type character varying(50) NOT NULL,
   diffusion_properties text,
   attachfor_type character varying(50),
@@ -1253,6 +1252,7 @@ CREATE TABLE contact_addresses
   entity_id character varying(32) NOT NULL,
   is_private character(1) NOT NULL DEFAULT 'N'::bpchar,
   enabled character varying(1) NOT NULL DEFAULT 'Y'::bpchar,
+  external_contact_id character varying(128),
   CONSTRAINT contact_addresses_pkey PRIMARY KEY  (id)
 ) WITH (OIDS=FALSE);
 
@@ -1268,6 +1268,25 @@ CREATE TABLE saved_queries (
   CONSTRAINT saved_queries_pkey PRIMARY KEY  (query_id)
 ) WITH (OIDS=FALSE);
 
+DROP SEQUENCE IF EXISTS contact_communication_id_seq CASCADE;
+CREATE SEQUENCE contact_communication_id_seq
+INCREMENT 1
+MINVALUE 1
+MAXVALUE 9223372036854775807
+START 1
+CACHE 1;
+
+DROP TABLE IF EXISTS contact_communication;
+CREATE TABLE contact_communication
+(
+  id bigint NOT NULL DEFAULT nextval('contact_communication_id_seq'::regclass),
+  contact_id bigint NOT NULL,
+  type character varying(255) NOT NULL,
+  value character varying(255) NOT NULL,
+  CONSTRAINT contact_communication_pkey PRIMARY KEY (id)
+) WITH (OIDS=FALSE);
+
+
 CREATE SEQUENCE doctypes_first_level_id_seq
   INCREMENT 1
   MINVALUE 1
@@ -1969,7 +1988,7 @@ CREATE TABLE sendmail
 (
   email_id serial NOT NULL,
   coll_id character varying(32) NOT NULL,
-  res_id bigint NOT NULL,
+  res_id bigint,
   user_id character varying(128) NOT NULL,
   to_list text DEFAULT NULL,
   cc_list text DEFAULT NULL,
@@ -1986,6 +2005,7 @@ CREATE TABLE sendmail
   creation_date timestamp without time zone NOT NULL,
   send_date timestamp without time zone DEFAULT NULL,
   sender_email character varying(255) DEFAULT NULL,
+  message_exchange_id text DEFAULT NULL,
   CONSTRAINT sendmail_pkey PRIMARY KEY (email_id )
  );
 
@@ -2379,7 +2399,7 @@ CREATE OR REPLACE VIEW view_contacts AS
 , c.user_id AS contact_user_id, c.entity_id AS contact_entity_id, c.creation_date, c.update_date, c.enabled AS contact_enabled, ca.id AS ca_id
 , ca.contact_purpose_id, ca.departement, ca.firstname, ca.lastname, ca.title, ca.function, ca.occupancy
 , ca.address_num, ca.address_street, ca.address_complement, ca.address_town, ca.address_postal_code, ca.address_country
-, ca.phone, ca.email, ca.website, ca.salutation_header, ca.salutation_footer, ca.other_data, ca.user_id, ca.entity_id, ca.is_private, ca.enabled
+, ca.phone, ca.email, ca.website, ca.salutation_header, ca.salutation_footer, ca.other_data, ca.user_id, ca.entity_id, ca.is_private, ca.enabled, ca.external_contact_id
 , cp.label as contact_purpose_label, ct.label as contact_type_label
    FROM contacts_v2 c
    RIGHT JOIN contact_addresses ca ON c.contact_id = ca.contact_id
@@ -2593,39 +2613,48 @@ CREATE FUNCTION order_alphanum(text) RETURNS text AS $$
 $$ LANGUAGE SQL;
 
 
-CREATE TABLE seda
+CREATE TABLE message_exchange
 (
-  "message_id" character varying(255) NOT NULL,
-  "schema" character varying(16),
-  "type" character varying(128) NOT NULL,
-  "status" character varying(128) NOT NULL,
+  message_id text NOT NULL,
+  schema text,
+  type text NOT NULL,
+  status text NOT NULL,
   
-  "date" timestamp NOT NULL,
-  "reference" character varying(255) NOT NULL,
+  date timestamp NOT NULL,
+  reference text NOT NULL,
   
-  "account_id" character varying(128),
-  "sender_org_identifier" character varying(255) NOT NULL,
-  "sender_org_name" character varying(255),
-  "recipient_org_identifier" character varying(255) NOT NULL,
-  "recipient_org_name" character varying(255),
-
-  "archival_agreement_reference" character varying(255),
-  "reply_code" character varying(255),
-  "operation_date" timestamp,
-  "reception_date" timestamp,
+  account_id text,
+  sender_org_identifier text NOT NULL,
+  sender_org_name text,
+  recipient_org_identifier text NOT NULL,
+  recipient_org_name text,
+
+  archival_agreement_reference text,
+  reply_code text,
+  operation_date timestamp,
+  reception_date timestamp,
   
-  "related_reference" character varying(255),
-  "request_reference" character varying(255),
-  "reply_reference" character varying(255),
-  "derogation" character(1),
+  related_reference text,
+  request_reference text,
+  reply_reference text,
+  derogation boolean,
   
-  "data_object_count" integer,
-  "size" numeric,
+  data_object_count integer,
+  size numeric,
   
-  "data" text,
+  data text,
   
-  "active" character(1),
-  "archived" character(1),
+  active boolean,
+  archived boolean,
+  
+  res_id_master numeric default NULL,
+
+  docserver_id character varying(32) NOT NULL,
+  path character varying(255) DEFAULT NULL,
+  filename character varying(255) DEFAULT NULL,
+  fingerprint character varying(255) DEFAULT NULL,
+  filesize bigint,
+  file_path text default NULL,
 
   PRIMARY KEY ("message_id")
 )
@@ -2635,9 +2664,10 @@ WITH (
 
 CREATE TABLE unit_identifier
 (
-  "message_id" character varying(255) NOT NULL,
-  "tablename" character varying(255) NOT NULL,
-  "res_id" character varying(255) NOT NULL
+  message_id text NOT NULL,
+  tablename text NOT NULL,
+  res_id text NOT NULL,
+  disposition text default NULL
 );
 
 DROP TABLE IF EXISTS users_baskets;
diff --git a/src/app/action/controllers/ActionController.php b/src/app/action/controllers/ActionController.php
index 5f2785a6e435f7adee154b6ef4457cea80e10437..8fcab4b520a91a52938529559496c633e46686f7 100644
--- a/src/app/action/controllers/ActionController.php
+++ b/src/app/action/controllers/ActionController.php
@@ -34,59 +34,37 @@ class ActionController
     public function getById(Request $request, Response $response, $aArgs)
     {
         if (!Validator::intVal()->validate($aArgs['id'])) {
-            return $response
-                ->withStatus(500)
-                ->withJson(['errors' => 'Id is not a numeric']);
+            return $response->withStatus(500)->withJson(['errors' => 'Id is not a numeric']);
         }
-        $obj['action'] = ActionModel::getById(['id' => $aArgs['id']]);
-
-        if(!empty($obj['action'])){
-            if ($obj['action']['is_folder_action'] == 'Y') {
-                $obj['action']['is_folder_action'] = true;
-            } else {
-                $obj['action']['is_folder_action'] = false;
-            }
-
-            if ($obj['action']['history'] == 'Y') {
-                $obj['action']['history'] = true;
-            } else {
-                $obj['action']['history'] = false;
-            }
 
-            if ($obj['action']['is_system'] == 'Y') {
-                $obj['action']['is_system'] = true;
-            } else {
-                $obj['action']['is_system'] = false;
-            }
+        $obj['action'] = ActionModel::getById(['id' => $aArgs['id']]);
 
-            if ($obj['action']['create_id'] == 'Y') {
-                $obj['action']['create_id'] = true;
-            } else {
-                $obj['action']['create_id'] = false;
-            }
+        if (!empty($obj['action'])) {
+            $obj['action']['is_folder_action'] = ($obj['action']['is_folder_action'] == 'Y');
+            $obj['action']['history'] = ($obj['action']['history'] == 'Y');
+            $obj['action']['is_system'] = ($obj['action']['is_system'] == 'Y');
+            $obj['action']['create_id'] = ($obj['action']['create_id'] == 'Y');
 
-            //array of id categoriesList
+            $actionCategories = [];
             foreach ($obj['action']['actionCategories'] as $key => $category) {
-                $arrActionCategories[] = $category['category_id'];
+                $actionCategories[] = $category['category_id'];
             }
-            $obj['action']['actionCategories'] = $arrActionCategories;
+            $obj['action']['actionCategories'] = $actionCategories;
 
             $obj['categoriesList'] = CoreConfigModel::getLettersBoxCategories();
-
-            //array of id categoriesList
-            foreach ($obj['categoriesList'] as $key => $category) {
-                $arrCategoriesList[] = $category['id'];
-            }
-
-            //array of id actionCategories
             if (empty($obj['action']['actionCategories'])) {
-                $obj['action']['actionCategories'] = $arrCategoriesList;
+                $categoriesList = [];
+                foreach ($obj['categoriesList'] as $key => $category) {
+                    $categoriesList[] = $category['id'];
+                }
+                $obj['action']['actionCategories'] = $categoriesList;
             }
-        
+
+
             $obj['statuses'] = StatusModel::get();
-            array_unshift($obj['statuses'], ['id'=>'_NOSTATUS_','label_status'=> _UNCHANGED]);
+            array_unshift($obj['statuses'], ['id'=>'_NOSTATUS_', 'label_status'=> _UNCHANGED]);
             $obj['action_pagesList'] = ActionModel::getAction_pages();
-            array_unshift($obj['action_pagesList']['actionsPageList'], ['id'=>'','label'=> _NO_PAGE, 'name'=>'', 'origin'=>'']);
+            array_unshift($obj['action_pagesList']['actionsPageList'], ['id' => '', 'label' => _NO_PAGE, 'name' => '', 'origin' => '']);
             $obj['keywordsList'] = ActionModel::getKeywords();
         }
   
@@ -100,86 +78,63 @@ class ActionController
         }
 
         $data = $request->getParams();
-        $data  = $this->manageValue($data);
+        $data = $this->manageValue($data);
         
         $errors = $this->control($data, 'create');
         if (!empty($errors)) {
             return $response->withStatus(500)->withJson(['errors' => $errors]);
         }
     
-        ActionModel::create($data);
-
-        $obj = max(ActionModel::get());
+        $id = ActionModel::create($data);
 
         HistoryController::add([
             'tableName' => 'actions',
-            'recordId'  => $obj['id'],
+            'recordId'  => $id,
             'eventType' => 'ADD',
             'eventId'   => 'actionadd',
-            'info'      => _ACTION_ADDED . ' : ' . $obj['label_action']
+            'info'      => _ACTION_ADDED . ' : ' . $data['label_action']
         ]);
 
-        return $response->withJson(
-            [
-            'action'  => $obj
-            ]
-        );
+        return $response->withJson(['actionId' => $id]);
     }
 
-    public function update(Request $request, Response $response, $aArgs)
+    public function update(Request $request, Response $response, array $aArgs)
     {
         if (!ServiceModel::hasService(['id' => 'admin_actions', 'userId' => $GLOBALS['userId'], 'location' => 'apps', 'type' => 'admin'])) {
             return $response->withStatus(403)->withJson(['errors' => 'Service forbidden']);
         }
 
-        $obj       = $request->getParams();
-        $obj['id'] = $aArgs['id'];
+        $data = $request->getParams();
+        $data['id'] = $aArgs['id'];
 
-        $obj    = $this->manageValue($obj);
-        $errors = $this->control($obj, 'update');
+        $data    = $this->manageValue($data);
+        $errors = $this->control($data, 'update');
       
         if (!empty($errors)) {
-            return $response
-                ->withStatus(500)
-                ->withJson(['errors' => $errors]);
+            return $response->withStatus(500)->withJson(['errors' => $errors]);
         }
 
-        $return = ActionModel::update($obj);
-
-        if ($return) {
-            $id  = $aArgs['id'];
-            $obj = ActionModel::getById(['id' => $id]);
-        } else {
-            return $response
-                ->withStatus(500)
-                ->withJson(['errors' => 'Problem during action update']);
-        }
+        ActionModel::update($data);
 
         HistoryController::add([
             'tableName' => 'actions',
-            'recordId'  => $obj['id'],
+            'recordId'  => $aArgs['id'],
             'eventType' => 'UP',
             'eventId'   => 'actionup',
-            'info'      => _ACTION_UPDATED. ' : ' . $obj['label_action']
+            'info'      => _ACTION_UPDATED. ' : ' . $data['label_action']
         ]);
 
-        return $response->withJson(
-            [
-            'action'  => $obj
-            ]
-        );
+        return $response->withJson(['success' => 'success']);
     }
 
-    public function delete(Request $request, Response $response, $aArgs)
+    public function delete(Request $request, Response $response, array $aArgs)
     {
         if (!ServiceModel::hasService(['id' => 'admin_actions', 'userId' => $GLOBALS['userId'], 'location' => 'apps', 'type' => 'admin'])) {
             return $response->withStatus(403)->withJson(['errors' => 'Service forbidden']);
         }
 
         if (!Validator::intVal()->validate($aArgs['id'])) {
-            return $response
-                ->withStatus(500)
-                ->withJson(['errors' => 'Id is not a numeric']);
+            return $response->withStatus(500)->withJson(['errors' => 'Id is not a numeric']);
         }
 
         $action = ActionModel::getById(['id' => $aArgs['id']]);
@@ -193,7 +148,7 @@ class ActionController
             'info'      => _ACTION_DELETED. ' : ' . $action['label_action']
         ]);
 
-        return $response->withJson(['action' => ActionModel::get()]);
+        return $response->withJson(['actions' => ActionModel::get()]);
     }
 
     protected function control($aArgs, $mode)
diff --git a/src/app/action/models/ActionModelAbstract.php b/src/app/action/models/ActionModelAbstract.php
index 179f22f4162d493e0576a5c52b35eb160f3e9d47..78c849eaba916d84476bad93eb7a4f5ae04ce79a 100644
--- a/src/app/action/models/ActionModelAbstract.php
+++ b/src/app/action/models/ActionModelAbstract.php
@@ -62,26 +62,28 @@ class ActionModelAbstract
 
     public static function create(array $aArgs)
     {
-        $actioncategories = $aArgs['actionCategories'];
+        $actionCategories = empty($aArgs['actionCategories']) ? [] : $aArgs['actionCategories'];
         unset($aArgs['actionCategories']);
+
+        $nextSequenceId = DatabaseModel::getNextSequenceValue(['sequenceId' => 'actions_id_seq']);
+        $aArgs['id'] = $nextSequenceId;
+
         DatabaseModel::insert([
             'table'         => 'actions',
             'columnsValues' => $aArgs
         ]);
 
-        $tab['action_id'] = max(ActionModel::get())['id'];
-
-        for ($i=0;$i<count($actioncategories);$i++) {
-            $tab['category_id'] = $actioncategories[$i];
-            DatabaseModel::insert(
-                [
+        $data = [];
+        $data['action_id'] = $nextSequenceId;
+        foreach ($actionCategories as $actionCategory) {
+            $data['category_id'] = $actionCategory;
+            DatabaseModel::insert([
                 'table'         => 'actions_categories',
-                'columnsValues' => $tab
-                ]
-            );
+                'columnsValues' => $data
+            ]);
         }
 
-        return true;
+        return $nextSequenceId;
     }
 
     public static function update(array $aArgs)
diff --git a/src/app/basket/controllers/BasketController.php b/src/app/basket/controllers/BasketController.php
index 35538d0ec84f4e8202cea6830e7fece578e8bf35..c4e9b2ab6ef887cd93e7b2eac9a0680ce7572413 100644
--- a/src/app/basket/controllers/BasketController.php
+++ b/src/app/basket/controllers/BasketController.php
@@ -316,7 +316,7 @@ class BasketController
         if (!$check) {
             return $response->withStatus(400)->withJson(['errors' => 'Bad Request']);
         }
-        $data['groupActions'] = BasketController::checkGroupActions(['groupActions' => $data['groupActions']]);
+        $data['groupActions'] = BasketController::checkGroupActions(['groupActions' => $data['groupActions'], 'userId' => $GLOBALS['userId']]);
         if (!empty($data['groupActions']['errors'])) {
             return $response->withStatus(400)->withJson(['errors' => $data['groupActions']['errors']]);
         }
@@ -392,7 +392,7 @@ class BasketController
         if (!$check) {
             return $response->withStatus(400)->withJson(['errors' => 'Bad Request']);
         }
-        $data['groupActions'] = BasketController::checkGroupActions(['groupActions' => $data['groupActions']]);
+        $data['groupActions'] = BasketController::checkGroupActions(['groupActions' => $data['groupActions'], 'userId' => $GLOBALS['userId']]);
         if (!empty($data['groupActions']['errors'])) {
             return $response->withStatus(400)->withJson(['errors' => $data['groupActions']['errors']]);
         }
@@ -478,8 +478,9 @@ class BasketController
 
     private static function checkGroupActions(array $aArgs)
     {
-        ValidatorModel::notEmpty($aArgs, ['groupActions']);
+        ValidatorModel::notEmpty($aArgs, ['groupActions', 'userId']);
         ValidatorModel::arrayType($aArgs, ['groupActions']);
+        ValidatorModel::stringType($aArgs, ['userId']);
 
         $defaultAction = false;
         $actions = ActionModel::get(['select' => ['id']]);
@@ -498,10 +499,17 @@ class BasketController
                 if ($groupAction['default_action_list'] === true) {
                     $defaultAction = true;
                 }
+
                 $aArgs['groupActions'][$key]['where_clause'] = empty($groupAction['where_clause']) ? '' : $groupAction['where_clause'];
                 $aArgs['groupActions'][$key]['used_in_basketlist'] = empty($groupAction['used_in_basketlist']) ? 'N' : 'Y';
                 $aArgs['groupActions'][$key]['used_in_action_page'] = empty($groupAction['used_in_action_page']) ? 'N' : 'Y';
                 $aArgs['groupActions'][$key]['default_action_list'] = empty($groupAction['default_action_list']) ? 'N' : 'Y';
+                
+                if (!empty($aArgs['groupActions'][$key]['where_clause'])) {
+                    if (!PreparedClauseController::isRequestValid(['clause' => $aArgs['groupActions'][$key]['where_clause'], 'userId' => $aArgs['userId']])) {
+                        return ['errors' => _INVALID_CLAUSE];
+                    }
+                }
             }
         }
         if (!$defaultAction) {
diff --git a/src/app/basket/models/BasketModelAbstract.php b/src/app/basket/models/BasketModelAbstract.php
index 496f9127de00a65197b0142c47218dee6867a93b..4007841ef4ad6eec052c7b9b9cc00bc3a896e9ce 100644
--- a/src/app/basket/models/BasketModelAbstract.php
+++ b/src/app/basket/models/BasketModelAbstract.php
@@ -556,4 +556,26 @@ class BasketModelAbstract
 
         return $basketPages;
     }
+
+    public static function getDefaultActionIdByBasketId(array $aArgs = [])
+    {
+        ValidatorModel::notEmpty($aArgs, ['basketId', 'groupId']);
+        ValidatorModel::stringType($aArgs, ['basketId', 'groupId']);
+
+        $aAction = DatabaseModel::select(
+            [
+            'select'    => ['id_action'],
+            'table'     => ['actions_groupbaskets'],
+            'where'     => ['basket_id = ?', 'group_id = ?', 'default_action_list = \'Y\''],
+            'data'      => [$aArgs['basketId'], $aArgs['groupId']]
+            ]
+        );
+
+        if (empty($aAction[0])) {
+            return '';
+        }
+
+        return $aAction[0]['id_action'];
+    }
+
 }
\ No newline at end of file
diff --git a/src/app/contact/controllers/ContactController.php b/src/app/contact/controllers/ContactController.php
index e3efedee7e373e411c49b63d398072920e1dc1c0..fe5ac8d8f8fb346ee5b108413dfc80374c39752d 100644
--- a/src/app/contact/controllers/ContactController.php
+++ b/src/app/contact/controllers/ContactController.php
@@ -71,4 +71,19 @@ class ContactController
 
         return $response->withJson(['contactId' => $contactId, 'addressId' => $addressId]);
     }
+
+    public function getCheckCommunication(Request $request, Response $response, $aArgs)
+    {
+        if (!empty($aArgs['contactId'])) {
+            $obj = ContactModel::getCommunicationByContactId([
+                'contactId' => $aArgs['contactId']
+            ]);
+        } else {
+            return $response
+                ->withStatus(500)
+                ->withJson(['errors' => _ID . ' ' . _IS_EMPTY]);
+        }
+
+        return $response->withJson([$obj]);
+    }
 }
diff --git a/src/app/contact/models/ContactModelAbstract.php b/src/app/contact/models/ContactModelAbstract.php
index 5b4c42f2d018d94bc02eda3cc9e0d1e15b3b1c46..9a784131bb9b090de9336725d5d62fd992b55585 100644
--- a/src/app/contact/models/ContactModelAbstract.php
+++ b/src/app/contact/models/ContactModelAbstract.php
@@ -28,7 +28,7 @@ class ContactModelAbstract
 
         $aContact = DatabaseModel::select([
             'select'    => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
-            'table'     => ['contacts_v2'],
+            'table'     => empty($aArgs['table']) ? ['contacts_v2'] : $aArgs['table'],
             'where'     => ['contact_id = ?'],
             'data'      => [$aArgs['id']],
         ]);
@@ -40,6 +40,196 @@ class ContactModelAbstract
         return $aContact[0];
     }
 
+    public static function getFullAddressById(array $aArgs = [])
+    {
+        ValidatorModel::notEmpty($aArgs, ['addressId']);
+        ValidatorModel::intVal($aArgs, ['addressId']);
+
+        $aReturn = DatabaseModel::select([
+            'select'    => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
+            'table'     => ['view_contacts'],
+            'where'     => ['ca_id = ?'],
+            'data'      => [$aArgs['addressId']],
+        ]);
+
+        return $aReturn;
+    }
+
+    public static function getContactFullLabel(array $aArgs = []){
+        ValidatorModel::notEmpty($aArgs, ['addressId']);
+        ValidatorModel::intVal($aArgs, ['addressId']);
+
+        $fullAddress = self::getFullAddressById($aArgs);
+        $fullAddress = $fullAddress[0];
+
+        if ($fullAddress['is_corporate_person'] == 'Y') {
+            $contactName = strtoupper($fullAddress['society']) . ' ' ;
+            if (!empty($fullAddress['society_short'])) {
+                $contactName .= '('.$fullAddress['society_short'].') ';
+            }
+        } else {
+            $contactName = strtoupper($fullAddress['contact_lastname']) . ' ' . $fullAddress['contact_firstname'] . ' ';
+            if (!empty($fullAddress['society'])) {
+                $contactName .= '(' . $fullAddress['society'] . ') ';
+            }                        
+        }
+        if (!empty($fullAddress['external_contact_id'])) {
+            $contactName .= ' - <b>' . $fullAddress['external_contact_id'] . '</b> ';
+        }
+        if ($fullAddress['is_private'] == 'Y') {
+            $contactName .= '('._CONFIDENTIAL_ADDRESS.')';
+        } else {
+            $contactName .= '- ' . $fullAddress['contact_purpose_label'] . ' : ';
+            if (!empty($fullAddress['lastname']) || !empty($fullAddress['firstname'])) {
+                $contactName .= $fullAddress['lastname'] . ' ' . $fullAddress['firstname'] . ' ';
+            }
+            if (!empty($fullAddress['address_num']) || !empty($fullAddress['address_street']) || !empty($fullAddress['address_postal_code']) || !empty($fullAddress['address_town'])) {
+                $contactName .= ', '.$fullAddress['address_num'] .' ' . $fullAddress['address_street'] .' ' . $fullAddress['address_postal_code'] .' ' . strtoupper($fullAddress['address_town']);
+            }
+        }
+
+        return $contactName;
+    }
+
+    public static function getContactCommunication(array $aArgs = []){
+        ValidatorModel::notEmpty($aArgs, ['contactId']);
+        ValidatorModel::intVal($aArgs, ['contactId']);
+
+        $aReturn = DatabaseModel::select([
+            'select'    => ['*'],
+            'table'     => ['contact_communication'],
+            'where'     => ['contact_id = ?'],
+            'data'      => [$aArgs['contactId']],
+        ]);
+
+        if(empty($aReturn)){
+            return "";
+        } else {
+            return $aReturn[0];
+        }
+        
+    }
+
+    public static function getContactIdByCommunicationValue(array $aArgs = []){
+        ValidatorModel::notEmpty($aArgs, ['communicationValue']);
+
+        $aReturn = DatabaseModel::select([
+            'select'    => ['*'],
+            'table'     => ['contact_communication'],
+            'where'     => ['value = ?'],
+            'data'      => [$aArgs['communicationValue']],
+        ]);
+
+        if(empty($aReturn)){
+            return "";
+        } else {
+            return $aReturn[0];
+        }
+        
+    }
+
+    public static function getAddressByExternalContactId(array $aArgs = []){
+        ValidatorModel::notEmpty($aArgs, ['externalContactId']);
+        $aReturn = DatabaseModel::select([
+            'select'    => ['*'],
+            'table'     => ['view_contacts'],
+            'where'     => ['external_contact_id = ?'],
+            'data'      => [$aArgs['externalContactId']],
+        ]);
+
+        if(empty($aReturn)){
+            return "";
+        } else {
+            return $aReturn[0];
+        }
+        
+    }
+
+    public static function createContactCommunication(array $aArgs = []){
+        ValidatorModel::notEmpty($aArgs, ['contactId', 'type', 'value']);
+        ValidatorModel::intVal($aArgs, ['contactId']);
+
+        $aReturn = DatabaseModel::insert([
+            'table' => 'contact_communication',
+            'columnsValues' => [
+                'contact_id' => $aArgs['contactId'],
+                'type'       => $aArgs['type'],
+                'value'      => $aArgs['value']
+            ]
+        ]);
+
+        return $aReturn;
+        
+    }
+
+    public static function getLabelledContactWithAddress(array $aArgs)
+    {
+        ValidatorModel::notEmpty($aArgs, ['contactId', 'addressId']);
+        ValidatorModel::intVal($aArgs, ['contactId', 'addressId']);
+
+        $rawContact = ContactModel::getByAddressId(['addressId' => $aArgs['addressId'], 'select' => ['firstname', 'lastname']]);
+
+        $labelledContact = '';
+        if (!empty($rawContact)) {
+            if (empty($rawContact['firstname']) && empty($rawContact['lastname'])) {
+                $rawContact = ContactModel::getById(['id' => $aArgs['contactId'], 'select' => ['firstname', 'lastname']]);
+            }
+            $labelledContact = $rawContact['firstname']. ' ' .$rawContact['lastname'];
+        }
+
+        return $labelledContact;
+    }
+
+    public static function getByEmail(array $aArgs)
+    {
+        ValidatorModel::notEmpty($aArgs, ['email']);
+        ValidatorModel::stringType($aArgs, ['email']);
+        ValidatorModel::arrayType($aArgs, ['select']);
+
+        $aContacts = DatabaseModel::select([
+            'select'    => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
+            'table'     => ['contact_addresses, contacts_v2'],
+            'where'     => ['email = ?', 'contact_addresses.enabled = ?', 'contact_addresses.contact_id = contacts_v2.contact_id'],
+            'data'      => [$aArgs['email'], 'Y'],
+            'order_by'  => ['creation_date'],
+        ]);
+
+        return $aContacts;
+    }
+
+    public static function purgeContact($aArgs)
+    {
+        ValidatorModel::notEmpty($aArgs, ['id']);
+        ValidatorModel::intVal($aArgs, ['id']);
+
+        $firstCount = ResModel::getOnView([
+            'select'    => ['count(*) as count'],
+            'where'     => ['contact_id = ?'],
+            'data'      => [$aArgs['id']],
+        ]);
+
+        $secondCount = DatabaseModel::select([
+            'select'    => ['count(*) as count'],
+            'table'     => ['contacts_res'],
+            'where'     => ['contact_id = ?'],
+            'data'      => [$aArgs['id']],
+        ]);
+
+        if ($firstCount[0]['count'] < 1 && $secondCount[0]['count'] < 1) {
+            DatabaseModel::delete([
+                'table' => 'contact_addresses',
+                'where' => ['contact_id = ?'],
+                'data'  => [$aArgs['id']]
+            ]);
+            DatabaseModel::delete([
+                'table' => 'contacts_v2',
+                'where' => ['contact_id = ?'],
+                'data'  => [$aArgs['id']]
+            ]);
+        }
+    }
+
+
     public static function create(array $aArgs)
     {
         ValidatorModel::notEmpty($aArgs, ['firstname', 'lastname', 'contactType', 'isCorporatePerson', 'userId', 'entityId']);
@@ -141,70 +331,156 @@ class ContactModelAbstract
         return $aContact[0];
     }
 
-    public static function getLabelledContactWithAddress(array $aArgs)
+    public static function getCommunicationByContactId(array $aArgs = [])
     {
-        ValidatorModel::notEmpty($aArgs, ['contactId', 'addressId']);
-        ValidatorModel::intVal($aArgs, ['contactId', 'addressId']);
-
-        $rawContact = ContactModel::getByAddressId(['addressId' => $aArgs['addressId'], 'select' => ['firstname', 'lastname']]);
-
-        $labelledContact = '';
-        if (!empty($rawContact)) {
-            if (empty($rawContact['firstname']) && empty($rawContact['lastname'])) {
-                $rawContact = ContactModel::getById(['id' => $aArgs['contactId'], 'select' => ['firstname', 'lastname']]);
-            }
-            $labelledContact = $rawContact['firstname']. ' ' .$rawContact['lastname'];
-        }
+        ValidatorModel::notEmpty($aArgs, ['contactId']);
+        ValidatorModel::stringType($aArgs, ['contactId']);
 
-        return $labelledContact;
-    }
-
-    public static function getByEmail(array $aArgs)
-    {
-        ValidatorModel::notEmpty($aArgs, ['email']);
-        ValidatorModel::stringType($aArgs, ['email']);
-        ValidatorModel::arrayType($aArgs, ['select']);
-
-        $aContacts = DatabaseModel::select([
+        $aReturn = DatabaseModel::select([
             'select'    => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
-            'table'     => ['contact_addresses, contacts_v2'],
-            'where'     => ['email = ?', 'contact_addresses.enabled = ?', 'contact_addresses.contact_id = contacts_v2.contact_id'],
-            'data'      => [$aArgs['email'], 'Y'],
-            'order_by'  => ['creation_date'],
+            'table'     => ['contact_communication'],
+            'where'     => ['contact_id = ?'],
+            'data'      => [$aArgs['contactId']],
         ]);
 
-        return $aContacts;
+        return $aReturn[0];
     }
 
-    public static function purgeContact($aArgs)
-    {
-        ValidatorModel::notEmpty($aArgs, ['id']);
-        ValidatorModel::intVal($aArgs, ['id']);
-
-        $firstCount = ResModel::getOnView([
-            'select'    => ['count(*) as count'],
-            'where'     => ['contact_id = ?'],
-            'data'      => [$aArgs['id']],
-        ]);
+    public static function CreateContactM2M($data, $contactCommunication){
+        $func               = new functions();
+        $data               = $func->object2array($data);
+        $db                 = new Database();
+        $queryContactFields = '(';
+        $queryContactValues = '(';
+        $queryAddressFields = '(';
+        $queryAddressValues = '(';
+        $currentContactId   = "0";
+        $currentAddressId   = "0";
+
+        $countData = count($data);
+
+        for ($i=0;$i<$countData;$i++) {
+
+            // On regarde si le contact existe déjà
+            if (strtoupper($data[$i]['column']) == strtoupper('external_contact_id') && ($data[$i]['value'] <> "" || $data[$i]['value'] <> null)) {
+                try {
+
+                    $stmt = $db->query("SELECT contact_id, ca_id FROM view_contacts WHERE external_contact_id = '" . $data[$i]['value'] . "' and enabled = 'Y'");
+                    $res = $stmt->fetchObject();
+
+                    if ($res->ca_id <> "") {
+                        $contact_exists = true;
+                        $currentContactId = $res->contact_id;
+                        $currentAddressId = $res->ca_id;
+                    } else {
+                        $contact_exists = false;
+                    }
+
+                } catch (Exception $e) {
+                    $returnResArray = array(
+                        'returnCode'  => (int) -1,
+                        'contactId'   => '',
+                        'addressId'   => '',
+                        'contactInfo' => '',
+                        'error'       => 'unknown error: ' . $e->getMessage(),
+                    );  
+                    return $returnResArray;
+                }
+            }
 
-        $secondCount = DatabaseModel::select([
-            'select'    => ['count(*) as count'],
-            'table'     => ['contacts_res'],
-            'where'     => ['contact_id = ?'],
-            'data'      => [$aArgs['id']],
-        ]);
+            $data[$i]['column'] = strtolower($data[$i]['column']);
+
+            if ($data[$i]['table'] == "contacts_v2") {
+                //COLUMN
+                $queryContactFields .= $data[$i]['column'] . ',';
+                //VALUE
+                if ($data[$i]['type'] == 'string' || $data[$i]['type'] == 'date') {
+                    $queryContactValues .= "'" . $data[$i]['value'] . "',";
+                } else {
+                    $queryContactValues .= $data[$i]['value'] . ",";
+                }
+            } else if ($data[$i]['table'] == "contact_addresses") {
+                //COLUMN
+                $queryAddressFields .= $data[$i]['column'] . ',';
+                //VALUE
+                if ($data[$i]['type'] == 'string' || $data[$i]['type'] == 'date') {
+                    $queryAddressValues .= "'" . $data[$i]['value'] . "',";
+                } else {
+                    $queryAddressValues .= $data[$i]['value'] . ",";
+                }
+            }
+        }
 
-        if ($firstCount[0]['count'] < 1 && $secondCount[0]['count'] < 1) {
-            DatabaseModel::delete([
-                'table' => 'contact_addresses',
-                'where' => ['contact_id = ?'],
-                'data'  => [$aArgs['id']]
-            ]);
-            DatabaseModel::delete([
-                'table' => 'contacts_v2',
-                'where' => ['contact_id = ?'],
-                'data'  => [$aArgs['id']]
-            ]);
+        $queryContactFields .= "user_id, entity_id, creation_date)";
+        $queryContactValues .= "'superadmin', 'SUPERADMIN', current_timestamp)";
+
+        // Si le contact existe pas, on le créé
+        if (!$contact_exists) {
+
+            $contactInfo = self::getContactIdByCommunicationValue(['communicationValue' => $contactCommunication]);
+            if(!empty($contactInfo)){
+                $currentContactId = $contactInfo['contact_id'];
+            } else {
+                try {
+                    $queryContact = " INSERT INTO contacts_v2 " . $queryContactFields
+                       . ' values ' . $queryContactValues ;
+
+                    $db->query($queryContact);
+
+                    $currentContactId = $db->lastInsertId('contact_v2_id_seq');
+                } catch (Exception $e) {
+                    $returnResArray = array(
+                        'returnCode'  => (int) -1,
+                        'contactId'   => 'ERROR',
+                        'addressId'   => 'ERROR',
+                        'contactInfo' => '',
+                        'error'       => 'contact creation error : '. $e->getMessage(),
+                    );
+                    
+                    return $returnResArray;
+                }
+            }
+            try {
+                $queryAddressFields .= "contact_id, user_id, entity_id)";
+                $queryAddressValues .=  $currentContactId . ", 'superadmin', 'SUPERADMIN')";
+
+                $queryAddress = " INSERT INTO contact_addresses " . $queryAddressFields
+                       . ' values ' . $queryAddressValues ;
+
+                $db->query($queryAddress);
+                $currentAddressId = $db->lastInsertId('contact_addresses_id_seq');
+            } catch (Exception $e) {
+                $returnResArray = array(
+                    'returnCode'  => (int) -1,
+                    'contactId'   => $currentContactId,
+                    'addressId'   => 'ERROR',
+                    'contactInfo' => '',
+                    'error'       => 'address creation error : '. $e->getMessage(),
+                );
+                
+                return $returnResArray;
+            }
+            $returnResArray = array(
+                'returnCode'  => (int) 0,
+                'contactId'   => $currentContactId,
+                'addressId'   => $currentAddressId,
+                'contactInfo' => 'contact created and attached to doc ... '.$queryContactValues,
+                'error'       => '',
+            );
+            
+            return $returnResArray;
+
+        }else{
+            $returnResArray = array(
+                'returnCode'  => (int) 0,
+                'contactId'   => $currentContactId,
+                'addressId'   => $currentAddressId,
+                'contactInfo' => 'contact already exist, attached to doc ... '.$queryContactValues,
+                'error'       => '',
+            );
+            
+            return $returnResArray;
         }
     }
+
 }
diff --git a/src/app/entity/controllers/EntityController.php b/src/app/entity/controllers/EntityController.php
index 3244c43c335ccad91b221759eee36615858c0244..795173bb6448b1a9547e7345865f68601fe9b436 100644
--- a/src/app/entity/controllers/EntityController.php
+++ b/src/app/entity/controllers/EntityController.php
@@ -152,7 +152,7 @@ class EntityController
 
         $data = $request->getParams();
 
-        $check = Validator::stringType()->notEmpty()->validate($data['entity_id']) && preg_match("/^[\w-]*$/", $data['entity_id']) && (strlen($data['entity_id']) < 32);
+        $check = Validator::stringType()->notEmpty()->validate($data['entity_id']) && preg_match("/^[\w-]*$/", $data['entity_id']) && (strlen($data['entity_id']) < 33);
         $check = $check && Validator::stringType()->notEmpty()->validate($data['entity_label']);
         $check = $check && Validator::stringType()->notEmpty()->validate($data['short_label']);
         $check = $check && Validator::stringType()->notEmpty()->validate($data['entity_type']);
diff --git a/src/app/entity/controllers/ListTemplateController.php b/src/app/entity/controllers/ListTemplateController.php
index 5cb9eeaec1bfd817aa9940200b76010606b821eb..0915f74d04ff4bd69845599e35ca5aeb476a9382 100644
--- a/src/app/entity/controllers/ListTemplateController.php
+++ b/src/app/entity/controllers/ListTemplateController.php
@@ -277,6 +277,40 @@ class ListTemplateController
         return $response->withJson(['success' => 'success']);
     }
 
+    public function updateTypes(Request $request, Response $response)
+    {
+        if (!ServiceModel::hasService(['id' => 'manage_entities', 'userId' => $GLOBALS['userId'], 'location' => 'entities', 'type' => 'admin'])) {
+            return $response->withStatus(403)->withJson(['errors' => 'Service forbidden']);
+        }
+
+        $data = $request->getParams();
+
+        $check = Validator::stringType()->notEmpty()->validate($data['typeId']);
+        $check = $check && Validator::arrayType()->notEmpty()->validate($data['roles']);
+        if (!$check) {
+            return $response->withStatus(400)->withJson(['errors' => 'Bad Request']);
+        }
+
+
+        $roles = '';
+        foreach ($data['roles'] as $role) {
+            if ($role['available'] === true) {
+                if (!empty($roles)) {
+                    $roles .= ' ';
+                }
+                $roles .= $role['id'];
+            }
+        }
+
+        ListTemplateModel::updateTypes([
+            'set'   => ['difflist_type_roles' => $roles],
+            'where' => ['difflist_type_id = ?'],
+            'data'  => [$data['typeId']]
+        ]);
+
+        return $response->withJson(['success' => 'success']);
+    }
+
     private static function checkItems(array $aArgs)
     {
         ValidatorModel::notEmpty($aArgs, ['items']);
diff --git a/src/app/entity/models/EntityModelAbstract.php b/src/app/entity/models/EntityModelAbstract.php
index 0fe293c4ed4960a17d24eac4d66c69ae6aca11c7..2dfd8dd00d75ab0a22d34e2d2b40b0111d133655 100644
--- a/src/app/entity/models/EntityModelAbstract.php
+++ b/src/app/entity/models/EntityModelAbstract.php
@@ -137,6 +137,22 @@ class EntityModelAbstract
         return $aReturn;
     }
 
+    public static function getByBusinessId(array $aArgs = [])
+    {
+        ValidatorModel::notEmpty($aArgs, ['businessId']);
+        ValidatorModel::stringType($aArgs, ['businessId']);
+
+        $aReturn = DatabaseModel::select([
+            'select'    => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
+            'table'     => ['entities'],
+            'where'     => ['business_id = ? and enabled = ?'],
+            'data'      => [$aArgs['businessId'], 'Y'],
+            'limit'     => 1,
+        ]);
+
+        return $aReturn;
+    }
+
     public static function getByUserId(array $aArgs)
     {
         ValidatorModel::notEmpty($aArgs, ['userId']);
@@ -153,6 +169,39 @@ class EntityModelAbstract
         return $aEntities;
     }
 
+    public static function getEntitiesByUserId(array $aArgs = [])
+    {
+        ValidatorModel::notEmpty($aArgs, ['user_id']);
+        ValidatorModel::stringType($aArgs, ['user_id']);
+
+        $aReturn = DatabaseModel::select([
+            'select'    => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
+            'table'     => ['users_entities', 'entities'],
+            'left_join' => ['users_entities.entity_id = entities.entity_id'],
+            'where'     => ['user_id = ?', 'business_id <> \'\''],
+            'data'      => [$aArgs['user_id']]
+        ]);
+
+        return $aReturn;
+    }
+
+    public static function getEntityRootById(array $aArgs = [])
+    {
+        ValidatorModel::notEmpty($aArgs, ['entityId']);
+        ValidatorModel::stringType($aArgs, ['entityId']);
+
+        $aReturn = self::getById([
+            'select'   => ['entity_id', 'entity_label', 'parent_entity_id'],
+            'entityId' => $aArgs['entityId']
+        ]);
+
+        if (!empty($aReturn[0]['parent_entity_id'])) {
+            $aReturn = self::getEntityRootById(['entityId' => $aReturn[0]['parent_entity_id']]);
+        }
+
+        return $aReturn;
+    }
+
     public static function getEntityChildren(array $aArgs)
     {
         ValidatorModel::notEmpty($aArgs, ['entityId']);
diff --git a/src/app/entity/models/ListTemplateModelAbstract.php b/src/app/entity/models/ListTemplateModelAbstract.php
index 1f199dcdaa470e147f4a2e54cad53615ef20ec10..8595af155a70a97e2a7e856c24e4d79dae3856a2 100644
--- a/src/app/entity/models/ListTemplateModelAbstract.php
+++ b/src/app/entity/models/ListTemplateModelAbstract.php
@@ -128,4 +128,19 @@ class ListTemplateModelAbstract
 
         return $aListTemplatesTypes;
     }
+
+    public static function updateTypes(array $aArgs)
+    {
+        ValidatorModel::notEmpty($aArgs, ['set', 'where', 'data']);
+        ValidatorModel::arrayType($aArgs, ['set', 'where', 'data']);
+
+        DatabaseModel::update([
+            'table' => 'difflist_types',
+            'set'   => $aArgs['set'],
+            'where' => $aArgs['where'],
+            'data'  => $aArgs['data']
+        ]);
+
+        return true;
+    }
 }
diff --git a/src/app/group/controllers/GroupController.php b/src/app/group/controllers/GroupController.php
index f025113e904c8d0a361dc7832672e97e60a11440..0b8d9574f491244876c74a7dbeb5c623fa178ea8 100644
--- a/src/app/group/controllers/GroupController.php
+++ b/src/app/group/controllers/GroupController.php
@@ -49,7 +49,7 @@ class GroupController
 
         $data = $request->getParams();
 
-        $check = Validator::stringType()->notEmpty()->validate($data['group_id']) && preg_match("/^[\w-]*$/", $data['group_id']) && (strlen($data['group_id']) < 32);
+        $check = Validator::stringType()->notEmpty()->validate($data['group_id']) && preg_match("/^[\w-]*$/", $data['group_id']) && (strlen($data['group_id']) < 33);
         $check = $check && Validator::stringType()->notEmpty()->validate($data['group_desc']);
         $check = $check && Validator::stringType()->notEmpty()->validate($data['security']['where_clause']);
         if (!$check) {
diff --git a/src/app/note/models/NoteModelAbstract.php b/src/app/note/models/NoteModelAbstract.php
index c05dc6d6d80342a4df00c47b0cfa9dc2a55b9572..90b854f09647347a3160e4e9a4271ebca61b3aa0 100644
--- a/src/app/note/models/NoteModelAbstract.php
+++ b/src/app/note/models/NoteModelAbstract.php
@@ -65,4 +65,69 @@ class NoteModelAbstract
 
         return $nb;
     }
+
+    public static function create(array $aArgs = [])
+    {
+        ValidatorModel::notEmpty($aArgs, ['identifier', 'tablename', 'user_id', 'coll_id', 'note_text']);
+        ValidatorModel::intVal($aArgs, ['identifier']);
+
+        DatabaseModel::insert([
+            'table' => 'notes',
+            'columnsValues' => [
+                'identifier' => $aArgs['identifier'],
+                'tablename'  => $aArgs['tablename'],
+                'user_id'    => $aArgs['user_id'],
+                'date_note'  => 'CURRENT_TIMESTAMP',
+                'note_text'  => $aArgs['note_text'],
+                'coll_id'    => $aArgs['coll_id'],
+            ]
+        ]);
+
+        return true;
+    }
+
+    public static function getByResId(array $aArgs = [])
+    {
+        ValidatorModel::notEmpty($aArgs, ['resId']);
+        ValidatorModel::intVal($aArgs, ['resId']);
+
+        //get notes
+        $aReturn = DatabaseModel::select([
+            'select'    => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
+            'table'     => ['notes', 'users', 'users_entities'],
+            'left_join' => ['notes.user_id = users.user_id', 'users.user_id = users_entities.user_id'],
+            'where'     => ['notes.identifier = ?', 'users_entities.primary_entity=\'Y\''],
+            'data'      => [$aArgs['resId']],
+            'order_by'  => empty($aArgs['orderBy']) ? ['date_note'] : $aArgs['orderBy']
+        ]);
+
+        $tmpNoteId = [];
+        foreach ($aReturn as $value) {
+            $tmpNoteId[] = $value['id'];
+        }
+        //get entities
+
+        if (!empty($tmpNoteId)) {
+            $tmpEntitiesRestriction = [];
+            $entities = DatabaseModel::select([
+                'select'   => ['note_id', 'item_id'],
+                'table'    => ['note_entities'],
+                'where'    => ['note_id in (?)'],
+                'data'     => [$tmpNoteId],
+                'order_by' => ['item_id']
+            ]);
+
+            foreach ($entities as $key => $value) {
+                $tmpEntitiesRestriction[$value['note_id']][] = $value['item_id'];
+            }
+        }
+
+        foreach ($aReturn as $key => $value) {
+            if (!empty($tmpEntitiesRestriction[$value['id']])) {
+                $aReturn[$key]['entities_restriction'] = implode(", ", $tmpEntitiesRestriction[$value['id']]);
+            }
+        }
+
+        return $aReturn;
+    }
 }
diff --git a/src/app/notification/controllers/NotificationController.php b/src/app/notification/controllers/NotificationController.php
index 3c45e59ed6a235a584636d32023de5a335f8ec60..758a17fcb6b1e52fd3021b5fe6ca39f9a8b17b2c 100644
--- a/src/app/notification/controllers/NotificationController.php
+++ b/src/app/notification/controllers/NotificationController.php
@@ -1,17 +1,17 @@
 <?php
 
 /**
-* Copyright Maarch since 2008 under licence GPLv3.
-* See LICENCE.txt file at the root folder for more details.
-* This file is part of Maarch software.
-*
-*/
+ * Copyright Maarch since 2008 under licence GPLv3.
+ * See LICENCE.txt file at the root folder for more details.
+ * This file is part of Maarch software.
+ */
 
 /**
-* @brief Notifications Controller
-* @author dev@maarch.org
-* @ingroup notifications
-*/
+ * @brief Notifications Controller
+ *
+ * @author dev@maarch.org
+ * @ingroup notifications
+ */
 
 namespace Notification\controllers;
 
@@ -52,51 +52,46 @@ class NotificationController
             return $response->withStatus(400)->withJson(['errors' => 'Notification not found']);
         }
 
-        $notification['diffusion_properties'] = explode(",", $notification['diffusion_properties']);
-        
-        foreach ($notification['diffusion_properties'] as $key => $value) {
-            $notification['diffusion_properties'][$value] = $value;
-            unset($notification['diffusion_properties'][$key]);
-        }
+        $notification['diffusion_properties'] = explode(',', $notification['diffusion_properties']);
+
+        $notification['attachfor_properties'] = explode(',', $notification['attachfor_properties']);
 
-        $notification['attachfor_properties'] = explode(",", $notification['attachfor_properties']);
-        
         foreach ($notification['attachfor_properties'] as $key => $value) {
             $notification['attachfor_properties'][$value] = $value;
             unset($notification['attachfor_properties'][$key]);
         }
-        
+
         $data = [];
 
-        $data['event']         = NotificationModel::getEvent();
-        $data['template']      = NotificationModel::getTemplate();
+        $data['event'] = NotificationModel::getEvent();
+        $data['template'] = NotificationModel::getTemplate();
         $data['diffusionType'] = NotificationModel::getDiffusionType();
-        $data['groups']        = NotificationModel::getDiffusionTypeGroups();
-        $data['users']         = NotificationModel::getDiffusionTypesUsers();
-        $data['entities']      = NotificationModel::getDiffusionTypeEntities();
-        $data['status']        = NotificationModel::getDiffusionTypeStatus();
+        $data['groups'] = NotificationModel::getDiffusionTypeGroups();
+        $data['users'] = NotificationModel::getDiffusionTypesUsers();
+        $data['entities'] = NotificationModel::getDiffusionTypeEntities();
+        $data['status'] = NotificationModel::getDiffusionTypeStatus();
 
         $notification['data'] = $data;
 
-        $filename = "notification";
+        $filename = 'notification';
         $customId = CoreConfigModel::getCustomId();
-        if ($customId <> "") {
-            $filename.="_".str_replace(" ", "", $customId);
+        if ($customId != '') {
+            $filename .= '_'.str_replace(' ', '', $customId);
         }
-        $filename .= "_".$notification['notification_sid'].".sh";
+        $filename .= '_'.$notification['notification_id'].'.sh';
 
-        $corePath = str_replace("custom/".$customId."/src/app/notification/controllers", "", __DIR__);
-        $corePath = str_replace("src/app/notification/controllers", "", $corePath);
-        if ($customId <> '') {
-            $pathToFolow = $corePath . 'custom/'.$customId. '/';
+        $corePath = str_replace('custom/'.$customId.'/src/app/notification/controllers', '', __DIR__);
+        $corePath = str_replace('src/app/notification/controllers', '', $corePath);
+        if ($customId != '') {
+            $pathToFolow = $corePath.'custom/'.$customId.'/';
         } else {
             $pathToFolow = $corePath;
         }
 
-        $notification["scriptcreated"] = false;
+        $notification['scriptcreated'] = false;
 
         if (file_exists($pathToFolow.'modules/notifications/batch/scripts/'.$filename)) {
-            $notification["scriptcreated"] = true;
+            $notification['scriptcreated'] = true;
         }
 
         return $response->withJson(['notification' => $notification]);
@@ -116,42 +111,39 @@ class NotificationController
         }
 
         $notificationInDb = NotificationModel::getByNotificationId(['notificationId' => $data['notification_id'], 'select' => ['notification_sid']]);
-        
+
         if (Validator::notEmpty()->validate($notificationInDb)) {
             return $response->withStatus(400)->withJson(['errors' => _NOTIF_ALREADY_EXIST]);
         }
 
-        if ($data['is_enabled'] == true) {
-            $data['is_enabled'] = 'Y';
-        } else {
-            $data['is_enabled'] = 'N';
-        }
-
         $data['notification_mode'] = 'EMAIL';
-        
+
         if ($data['diffusion_properties']) {
-            $data['diffusion_properties'] = implode(",", $data['diffusion_properties']);
+            $data['diffusion_properties'] = implode(',', $data['diffusion_properties']);
+        } else {
+            $data['diffusion_properties'] = '';
         }
-        
+
         if ($data['attachfor_properties']) {
-            $data['attachfor_properties'] = implode(",", $data['attachfor_properties']);
+            $data['attachfor_properties'] = implode(',', $data['attachfor_properties']);
         } else {
             $data['attachfor_properties'] = '';
         }
 
         if (NotificationModel::create($data)) {
-            if (PHP_OS == "Linux") {
+            if (PHP_OS == 'Linux') {
                 $notificationAdded = NotificationModel::getByNotificationId(['notificationId' => $data['notification_id'], 'select' => ['notification_sid']]);
                 NotificationScheduleModel::createScriptNotification(['notification_sid' => $notificationAdded['notification_sid'], 'notification_id' => $data['notification_id']]);
             }
 
             HistoryController::add([
                 'tableName' => 'notifications',
-                'recordId'  => $data['notification_id'],
+                'recordId' => $data['notification_id'],
                 'eventType' => 'ADD',
-                'eventId'   => 'notificationsadd',
-                'info'      => _ADD_NOTIFICATIONS . ' : ' . $data['notification_id']
+                'eventId' => 'notificationsadd',
+                'info' => _ADD_NOTIFICATIONS.' : '.$data['notification_id'],
             ]);
+
             return $response->withJson(NotificationModel::getByNotificationId(['notificationId' => $data['notification_id']]));
         } else {
             return $response->withStatus(400)->withJson(['errors' => 'Notification Create Error']);
@@ -164,37 +156,37 @@ class NotificationController
             return $response->withStatus(403)->withJson(['errors' => 'Service forbidden']);
         }
 
-        $data                     = $request->getParams();
+        $data = $request->getParams();
         $data['notification_sid'] = $aArgs['id'];
         unset($data['scriptcreated']);
 
         $errors = $this->control($data, 'update');
-      
+
         if (!empty($errors)) {
             return $response
                 ->withStatus(500)->withJson(['errors' => $errors]);
         }
 
-        $data['diffusion_properties'] = implode(",", $data['diffusion_properties']);
-        $data['attachfor_properties'] = implode(",", $data['attachfor_properties']);
+        $data['diffusion_properties'] = implode(',', $data['diffusion_properties']);
+        $data['attachfor_properties'] = implode(',', $data['attachfor_properties']);
 
         NotificationModel::update($data);
 
         $notification = NotificationModel::getById(['notification_sid' => $data['notification_sid']]);
 
-        if (PHP_OS == "Linux") {
+        if (PHP_OS == 'Linux') {
             NotificationScheduleModel::createScriptNotification(['notification_sid' => $data['notification_sid'], 'notification_id' => $notification['notification_id']]);
         }
 
         HistoryController::add([
             'tableName' => 'notifications',
-            'recordId'  => $data['notification_sid'],
+            'recordId' => $data['notification_sid'],
             'eventType' => 'UP',
-            'eventId'   => 'notificationsup',
-            'info'      => _MODIFY_NOTIFICATIONS . ' : ' . $data['notification_sid']
+            'eventId' => 'notificationsup',
+            'info' => _MODIFY_NOTIFICATIONS.' : '.$data['notification_sid'],
         ]);
 
-        return $response->withJson(['notification'=> $notification]);
+        return $response->withJson(['notification' => $notification]);
     }
 
     public function delete(Request $request, Response $response, $aArgs)
@@ -209,34 +201,36 @@ class NotificationController
                 ->withJson(['errors' => 'Id is not a numeric']);
         }
 
+        $notification = NotificationModel::getById(['notification_sid' => $aArgs['id']]);
+
         NotificationModel::delete(['notification_sid' => $aArgs['id']]);
 
         HistoryController::add([
                 'tableName' => 'notifications',
-                'recordId'  => $aArgs['id'],
+                'recordId' => $aArgs['id'],
                 'eventType' => 'DEL',
-                'eventId'   => 'notificationsdel',
-                'info'      => _DELETE_NOTIFICATIONS . ' : ' . $aArgs['id']
+                'eventId' => 'notificationsdel',
+                'info' => _DELETE_NOTIFICATIONS.' : '.$aArgs['id'],
             ]);
 
-        if (PHP_OS == "Linux") {
+        if (PHP_OS == 'Linux') {
             // delete scheduled notification
-            $filename = "notification";
+            $filename = 'notification';
 
             $customId = CoreConfigModel::getCustomId();
-            if ($customId<>"") {
-                $filename.="_".str_replace(" ", "", $customId);
+            if ($customId != '') {
+                $filename .= '_'.str_replace(' ', '', $customId);
             }
-            $filename.="_".$aArgs['id'].".sh";
+            $filename .= '_'.$notification['notification_id'].'.sh';
 
             $cronTab = NotificationScheduleModel::getCrontab();
 
             $flagCron = false;
 
-            $corePath = str_replace("custom/".$customId."/src/app/notification/controllers", "", __DIR__);
-            $corePath = str_replace("src/app/notification/controllers", "", $corePath);
-            if ($customId <> '') {
-                $pathToFolow = $corePath . 'custom/'.$customId. '/';
+            $corePath = str_replace('custom/'.$customId.'/src/app/notification/controllers', '', __DIR__);
+            $corePath = str_replace('src/app/notification/controllers', '', $corePath);
+            if ($customId != '') {
+                $pathToFolow = $corePath.'custom/'.$customId.'/';
             } else {
                 $pathToFolow = $corePath;
             }
@@ -252,12 +246,12 @@ class NotificationController
             if ($flagCron) {
                 NotificationScheduleModel::saveCrontab($cronTab);
             }
-            
-            unlink($pathToFolow . 'modules/notifications/batch/scripts/' . $filename);
+
+            unlink($pathToFolow.'modules/notifications/batch/scripts/'.$filename);
         }
 
         return $response->withJson([
-            'notifications' => NotificationModel::get()
+            'notifications' => NotificationModel::get(),
         ]);
     }
 
@@ -271,29 +265,29 @@ class NotificationController
             } else {
                 $obj = NotificationModel::getById(['notification_sid' => $aArgs['notification_sid']]);
             }
-           
+
             if (empty($obj)) {
                 $errors[] = 'notification does not exists';
             }
         }
 
         if (!Validator::notEmpty()->validate($aArgs['notification_id'])) {
-            $errors[]= 'notification_id is empty';
+            $errors[] = 'notification_id is empty';
         }
         if (!Validator::length(1, 254)->notEmpty()->validate($aArgs['description'])) {
-            $errors[]= 'wrong format for description';
+            $errors[] = 'wrong format for description';
         }
         if (!Validator::length(0, 254)->validate($dataArgsa['event_id'])) {
-            $errors[]= 'event_id is too long';
+            $errors[] = 'event_id is too long';
         }
         if (!Validator::length(0, 30)->validate($aArgs['notification_mode'])) {
-            $errors[]= 'notification_mode is too long';
+            $errors[] = 'notification_mode is too long';
         }
         if (!Validator::intType()->notEmpty()->validate($aArgs['template_id'])) {
-            $errors[]= 'wrong format for template_id';
+            $errors[] = 'wrong format for template_id';
         }
         if (!Validator::notEmpty()->validate($aArgs['is_enabled']) || ($aArgs['is_enabled'] != 'Y' && $aArgs['is_enabled'] != 'N')) {
-            $errors[]= 'Invalid is_enabled value';
+            $errors[] = 'Invalid is_enabled value';
         }
 
         return $errors;
@@ -310,16 +304,16 @@ class NotificationController
         $notification['attachfor_properties'] = [];
         $data = [];
 
-        $data['event']         = NotificationModel::getEvent();
-        $data['template']      = NotificationModel::getTemplate();
+        $data['event'] = NotificationModel::getEvent();
+        $data['template'] = NotificationModel::getTemplate();
         $data['diffusionType'] = NotificationModel::getDiffusionType();
-        $data['groups']        = NotificationModel::getDiffusionTypeGroups();
-        $data['users']         = NotificationModel::getDiffusionTypesUsers();
-        $data['entities']      = NotificationModel::getDiffusionTypeEntities();
-        $data['status']        = NotificationModel::getDiffusionTypeStatus();
+        $data['groups'] = NotificationModel::getDiffusionTypeGroups();
+        $data['users'] = NotificationModel::getDiffusionTypesUsers();
+        $data['entities'] = NotificationModel::getDiffusionTypeEntities();
+        $data['status'] = NotificationModel::getDiffusionTypeStatus();
 
         $notification['data'] = $data;
 
-        return $response->withJson(['notification'=>$notification]);
+        return $response->withJson(['notification' => $notification]);
     }
 }
diff --git a/src/app/notification/controllers/NotificationScheduleController.php b/src/app/notification/controllers/NotificationScheduleController.php
index ef0da3f79e72411eb617833cb787a38bfa514ff1..0b94394f989d4b5b31e4b94afae931d7eab3669d 100644
--- a/src/app/notification/controllers/NotificationScheduleController.php
+++ b/src/app/notification/controllers/NotificationScheduleController.php
@@ -1,17 +1,17 @@
 <?php
 
 /**
-* Copyright Maarch since 2008 under licence GPLv3.
-* See LICENCE.txt file at the root folder for more details.
-* This file is part of Maarch software.
-*
-*/
+ * Copyright Maarch since 2008 under licence GPLv3.
+ * See LICENCE.txt file at the root folder for more details.
+ * This file is part of Maarch software.
+ */
 
 /**
-* @brief Notifications Schedule Controller
-* @author dev@maarch.org
-* @ingroup notifications
-*/
+ * @brief Notifications Schedule Controller
+ *
+ * @author dev@maarch.org
+ * @ingroup notifications
+ */
 
 namespace Notification\controllers;
 
@@ -32,11 +32,11 @@ class NotificationScheduleController
         }
 
         return $response->withJson([
-            'crontab'                => NotificationScheduleModel::getCrontab(),
-            'authorizedNotification' => NotificationScheduleController::getAuthorizedNotifications(),
+            'crontab' => NotificationScheduleModel::getCrontab(),
+            'authorizedNotification' => self::getAuthorizedNotifications(),
         ]);
     }
-    
+
     // Save Crontab
     public function create(Request $request, Response $response)
     {
@@ -45,17 +45,17 @@ class NotificationScheduleController
         }
 
         $data = $request->getParams();
-        if (!NotificationScheduleController::checkCrontab($data)) {
+        if (!self::checkCrontab($data)) {
             return $response->withStatus(500)->withJson(['errors' => 'Problem with crontab']);
         }
 
         foreach ($data as $id => $cronValue) {
             foreach ($cronValue as $key => $value) {
-                if (!Validator::notEmpty()->validate($value)) {
-                    $errors[] = $key." is empty";
+                if (($key == 'cmd' || $key == 'state') && !Validator::notEmpty()->validate($value)) {
+                    $errors[] = $key.' is empty';
                 }
-                if ($key != "cmd" && $key != "state" && !Validator::intVal()->validate($value) && $value != "*") {
-                    $errors[] = "wrong format for ".$key;
+                if ($key != 'cmd' && $key != 'state' && $key != 'description' && !Validator::intVal()->validate($value) && $value != '*') {
+                    $errors[] = 'wrong format for '.$key;
                 }
             }
         }
@@ -63,28 +63,28 @@ class NotificationScheduleController
             return $response->withStatus(500)->withJson(['errors' => $errors]);
         }
 
-        NotificationScheduleModel::saveCrontab(["crontab" => $data]);
+        NotificationScheduleModel::saveCrontab(['crontab' => $data]);
 
         return $response->withJson(true);
     }
 
     protected static function getAuthorizedNotifications()
     {
-        $aNotification      = NotificationModel::getEnableNotifications(['select' => ['notification_sid', 'description']]);
+        $aNotification = NotificationModel::getEnableNotifications(['select' => ['notification_id', 'notification_sid', 'description']]);
         $notificationsArray = array();
-        $customId           = CoreConfigModel::getCustomId();
-        $corePath = str_replace("custom/".$customId."/src/app/notification/controllers", "", __DIR__);
-        $corePath = str_replace("src/app/notification/controllers", "", $corePath);
+        $customId = CoreConfigModel::getCustomId();
+        $corePath = str_replace('custom/'.$customId.'/src/app/notification/controllers', '', __DIR__);
+        $corePath = str_replace('src/app/notification/controllers', '', $corePath);
 
         foreach ($aNotification as $result) {
-            $filename = "notification";
-            if (isset($customId) && $customId<>"") {
-                $filename.="_".str_replace(" ", "", $customId);
+            $filename = 'notification';
+            if (isset($customId) && $customId != '') {
+                $filename .= '_'.str_replace(' ', '', $customId);
             }
-            $filename.="_".$result['notification_sid'].".sh";
+            $filename .= '_'.$result['notification_id'].'.sh';
 
-            if ($customId <> '') {
-                $pathToFolow = $corePath . 'custom/'.$customId . '/';
+            if ($customId != '') {
+                $pathToFolow = $corePath.'custom/'.$customId.'/';
             } else {
                 $pathToFolow = $corePath;
             }
@@ -92,29 +92,29 @@ class NotificationScheduleController
             $path = $pathToFolow.'modules/notifications/batch/scripts/'.$filename;
 
             if (file_exists($path)) {
-                $notificationsArray[$path] = $result['description'];
+                $notificationsArray[] = array('description' => $result['description'], 'path' => $path);
             }
         }
-        
+
         return $notificationsArray;
     }
 
     protected static function checkCrontab($crontabToSave)
     {
-        $customId          = CoreConfigModel::getCustomId();
+        $customId = CoreConfigModel::getCustomId();
         $crontabBeforeSave = NotificationScheduleModel::getCrontab();
-        $corePath = str_replace("custom/".$customId."/src/app/notification/controllers", "", __DIR__);
-        $corePath = str_replace("src/app/notification/controllers", "", $corePath);
+        $corePath = str_replace('custom/'.$customId.'/src/app/notification/controllers', '', __DIR__);
+        $corePath = str_replace('src/app/notification/controllers', '', $corePath);
         foreach ($crontabToSave as $id => $cronValue) {
-            if ($cronValue['state'] != "hidden" && $crontabBeforeSave[$id]['state'] == "hidden") {
+            if ($cronValue['state'] != 'hidden' && $crontabBeforeSave[$id]['state'] == 'hidden') {
                 $returnValue = false;
                 break;
-            } elseif ($cronValue['state'] == "hidden" && $crontabBeforeSave[$id]['state'] != "hidden") {
+            } elseif ($cronValue['state'] == 'hidden' && $crontabBeforeSave[$id]['state'] != 'hidden') {
                 $returnValue = false;
                 break;
-            } elseif ($cronValue['state'] == "new" || $cronValue['state'] == "normal") {
-                if ($customId <> '') {
-                    $pathToFolow = $corePath . 'custom/'.$customId . '/';
+            } elseif ($cronValue['state'] == 'new' || $cronValue['state'] == 'normal') {
+                if ($customId != '') {
+                    $pathToFolow = $corePath.'custom/'.$customId.'/';
                 } else {
                     $pathToFolow = $corePath;
                 }
@@ -154,7 +154,7 @@ class NotificationScheduleController
         }
 
         $notification_sid = $data['notification_sid'];
-        $notification_id  = $data['notification_id'];
+        $notification_id = $data['notification_id'];
 
         NotificationScheduleModel::createScriptNotification(['notification_sid' => $notification_sid, 'notification_id' => $notification_id]);
 
diff --git a/src/app/notification/models/NotificationModelAbstract.php b/src/app/notification/models/NotificationModelAbstract.php
index cdf2e7f3079301856c774139aa94a771090ec8a2..28b650c84ae60c1c428ea1ec3ac814b8b96aa62e 100644
--- a/src/app/notification/models/NotificationModelAbstract.php
+++ b/src/app/notification/models/NotificationModelAbstract.php
@@ -1,17 +1,17 @@
 <?php
 
 /**
-* Copyright Maarch since 2008 under licence GPLv3.
-* See LICENCE.txt file at the root folder for more details.
-* This file is part of Maarch software.
-*
-*/
+ * Copyright Maarch since 2008 under licence GPLv3.
+ * See LICENCE.txt file at the root folder for more details.
+ * This file is part of Maarch software.
+ */
 
 /**
-* @brief Notifications Model
-* @author dev@maarch.org
-* @ingroup Module
-*/
+ * @brief Notifications Model
+ *
+ * @author dev@maarch.org
+ * @ingroup Module
+ */
 
 namespace Notification\models;
 
@@ -22,15 +22,15 @@ use SrcCore\models\DatabaseModel;
 use Status\models\StatusModel;
 use SrcCore\models\CoreConfigModel;
 
-class NotificationModelAbstract 
+class NotificationModelAbstract
 {
     public static function get(array $aArgs = [])
     {
         ValidatorModel::arrayType($aArgs, ['select']);
 
         $aNotifications = DatabaseModel::select([
-            'select'    => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
-            'table'     => ['notifications']
+            'select' => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
+            'table' => ['notifications'],
         ]);
 
         return $aNotifications;
@@ -41,10 +41,10 @@ class NotificationModelAbstract
         ValidatorModel::notEmpty($aArgs, ['notification_sid']);
 
         $aNotification = DatabaseModel::select([
-            'select'    => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
-            'table'     => ['notifications'],
-            'where'     => ['notification_sid = ?'],
-            'data'      => [$aArgs['notification_sid']]
+            'select' => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
+            'table' => ['notifications'],
+            'where' => ['notification_sid = ?'],
+            'data' => [$aArgs['notification_sid']],
         ]);
 
         if (empty($aNotification[0])) {
@@ -59,10 +59,10 @@ class NotificationModelAbstract
         ValidatorModel::notEmpty($aArgs, ['notificationId']);
 
         $aNotification = DatabaseModel::select([
-            'select'    => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
-            'table'     => ['notifications'],
-            'where'     => ['notification_id = ?'],
-            'data'      => [$aArgs['notificationId']]
+            'select' => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
+            'table' => ['notifications'],
+            'where' => ['notification_id = ?'],
+            'data' => [$aArgs['notificationId']],
         ]);
 
         if (empty($aNotification[0])) {
@@ -78,9 +78,9 @@ class NotificationModelAbstract
         ValidatorModel::intVal($aArgs, ['notification_sid']);
 
         DatabaseModel::delete([
-            'table'     => 'notifications',
-            'where'     => ['notification_sid = ?'],
-            'data'      => [$aArgs['notification_sid']],
+            'table' => 'notifications',
+            'where' => ['notification_sid = ?'],
+            'data' => [$aArgs['notification_sid']],
         ]);
 
         return true;
@@ -88,25 +88,24 @@ class NotificationModelAbstract
 
     public static function create(array $aArgs = [])
     {
-        ValidatorModel::notEmpty($aArgs, ['notification_id', 'description', 'is_enabled', 'event_id', 'notification_mode', 'template_id', 'diffusion_type', 'diffusion_properties']);
+        ValidatorModel::notEmpty($aArgs, ['notification_id', 'description', 'is_enabled', 'event_id', 'notification_mode', 'template_id', 'diffusion_type']);
         ValidatorModel::intVal($aArgs, ['template_id']);
-        ValidatorModel::stringType($aArgs, ['notification_id','description','is_enabled','event_id','notification_mode',]);
+        ValidatorModel::stringType($aArgs, ['notification_id', 'description', 'is_enabled', 'event_id', 'notification_mode']);
 
         DatabaseModel::insert([
-            'table'         => 'notifications',
+            'table' => 'notifications',
             'columnsValues' => [
-                'notification_id'       => $aArgs['notification_id'],
-                'description'           => $aArgs['description'],
-                'is_enabled'            => $aArgs['is_enabled'],
-                'event_id'              => $aArgs['event_id'],
-                'notification_mode'     => $aArgs['notification_mode'],
-                'template_id'           => $aArgs['template_id'],
-                'rss_url_template'      => $aArgs['rss_url_template'],
-                'diffusion_type'        => $aArgs['diffusion_type'],
-                'diffusion_properties'  => $aArgs['diffusion_properties'],
-                'attachfor_type'        => $aArgs['attachfor_type'],
-                'attachfor_properties'  => $aArgs['attachfor_properties']
-            ]
+                'notification_id' => $aArgs['notification_id'],
+                'description' => $aArgs['description'],
+                'is_enabled' => $aArgs['is_enabled'],
+                'event_id' => $aArgs['event_id'],
+                'notification_mode' => $aArgs['notification_mode'],
+                'template_id' => $aArgs['template_id'],
+                'diffusion_type' => $aArgs['diffusion_type'],
+                'diffusion_properties' => $aArgs['diffusion_properties'],
+                'attachfor_type' => $aArgs['attachfor_type'],
+                'attachfor_properties' => $aArgs['attachfor_properties'],
+            ],
         ]);
 
         return true;
@@ -123,9 +122,9 @@ class NotificationModelAbstract
 
         $aReturn = DatabaseModel::update([
             'table' => 'notifications',
-            'set'   => $aArgs,
+            'set' => $aArgs,
             'where' => ['notification_sid = ?'],
-            'data'  => [$notification_sid]
+            'data' => [$notification_sid],
         ]);
 
         return $aReturn;
@@ -134,25 +133,24 @@ class NotificationModelAbstract
     public static function getEvent()
     {
         $tabEvent_Type = DatabaseModel::select([
-            'select'    => ['id, label_action'],
-            'table'     => ['actions']
+            'select' => ['id, label_action'],
+            'table' => ['actions'],
         ]);
 
         //get event system
         $customId = CoreConfigModel::getCustomId();
 
-        if (file_exists('custom/' .$customId. 'modules/notifications/xml/event_type.xml')) {
-            $path = 'custom/' .$customId. 'modules/notifications/xml/event_type.xml';
+        if (file_exists('custom/'.$customId.'modules/notifications/xml/event_type.xml')) {
+            $path = 'custom/'.$customId.'modules/notifications/xml/event_type.xml';
         } else {
             $path = 'modules/notifications/xml/event_type.xml';
         }
         $xmlfile = simplexml_load_file($path);
         if ($xmlfile) {
             foreach ($xmlfile->event_type as $eventType) {
-
                 $tabEvent_Type[] = array(
-                    'id'          => (string) $eventType->id,
-                    'label_action'       => (string) $eventType->label,
+                    'id' => (string) $eventType->id,
+                    'label_action' => (string) $eventType->label,
                 );
             }
         }
@@ -163,12 +161,12 @@ class NotificationModelAbstract
     public static function getTemplate()
     {
         $tabTemplate = DatabaseModel::select([
-            'select'    => ['template_id, template_label'],
-            'table'     => ['templates'],
-            'where'     => ['template_target = ?'],
-            'data'      => ['notifications']
+            'select' => ['template_id, template_label'],
+            'table' => ['templates'],
+            'where' => ['template_target = ?'],
+            'data' => ['notifications'],
         ]);
-        
+
         return $tabTemplate;
     }
 
@@ -192,7 +190,7 @@ class NotificationModelAbstract
         //                 'table'     => [(string)$diffusionType->from],
         //                 'where'     => [(string)$diffusionType->where],
         //                 'data'      => [(string)$diffusionType->data]
-        //                 ]);  
+        //                 ]);
         //             }else{
         //                 $result = DatabaseModel::select([
         //                 'select'    => [(string)$diffusionType->select],
@@ -209,9 +207,6 @@ class NotificationModelAbstract
         //             'request'        => $result,
         //         );
 
-                
-
-
         //     }
         // }
         // $result = DatabaseModel::select([
@@ -221,8 +216,8 @@ class NotificationModelAbstract
         //     'data'  => ['Y']
         // ]);
         $tabDiffusion_Type[] = array(
-            'id'          => 'group',
-            'label'          => constant((string)'_GROUP'),
+            'id' => 'group',
+            'label' => 'Groupe',
             'add_attachment' => 'true',
             //'request'       => $result,
         );
@@ -233,8 +228,8 @@ class NotificationModelAbstract
         //     'data'  => ['Y']
         // ]);
         $tabDiffusion_Type[] = array(
-            'id'          => 'entity',
-            'label'          => constant((string)'_ENTITY'),
+            'id' => 'entity',
+            'label' => 'Entité',
             'add_attachment' => 'true',
             //'request'       => $result
         );
@@ -243,26 +238,26 @@ class NotificationModelAbstract
         //     'table'     => ['status']
         // ]);
         $tabDiffusion_Type[] = array(
-            'id'          => 'dest_entity',
-            'label'          => constant((string)'_DEST_ENTITY'),
+            'id' => 'dest_entity',
+            'label' => 'Service de l\'utilisateur destinataire',
             'add_attachment' => 'false',
             //'request'       => $result
         );
         $tabDiffusion_Type[] = array(
-            'id'          => 'dest_user',
-            'label'          => constant((string)'_DEST_USER'),
+            'id' => 'dest_user',
+            'label' => 'Liste de diffusion du document',
             'add_attachment' => 'false',
             //'request'       => $result
         );
         $tabDiffusion_Type[] = array(
-            'id'          => 'dest_user_visa',
-            'label'          => constant((string)'_DEST_USER_VISA'),
+            'id' => 'dest_user_visa',
+            'label' => 'Viseur actuel du document',
             'add_attachment' => 'true',
             //'request'       => $result
         );
         $tabDiffusion_Type[] = array(
-            'id'          => 'dest_user_sign',
-            'label'          => constant((string)'_DEST_USER_SIGN'),
+            'id' => 'dest_user_sign',
+            'label' => 'Signataire actuel du document',
             'add_attachment' => 'true',
             //'request'       => $result
         );
@@ -271,73 +266,71 @@ class NotificationModelAbstract
         //     'table'     => ['users']
         // ]);
         $tabDiffusion_Type[] = array(
-            'id'          => 'user',
-            'label'          => constant((string)'_USER'),
+            'id' => 'user',
+            'label' => 'Utilisateur désigné',
             'add_attachment' => 'true',
             //'request'       => $result
         );
-        $result = [];
-        $tabDiffusion_Type[] = array(
-            'id'          => 'note_dest_user',
-            'label'          => constant((string)'_NOTE_DEST_USER'),
-            'add_attachment' => 'false',
-            //'request'       => $result
-        );
+
         $tabDiffusion_Type[] = array(
-            'id'          => 'note_copy_list',
-            'label'          => constant((string)'_NOTE_COPY_LIST'),
+            'id' => 'copy_list',
+            'label' => 'Liste de diffusion du document',
             'add_attachment' => 'false',
             //'request'       => $result
         );
+
+        $result = [];
+
         $tabDiffusion_Type[] = array(
-            'id'          => 'contact',
-            'label'          => constant((string)'_CONTACT'),
+            'id' => 'contact',
+            'label' => 'Contact du document',
             'add_attachment' => 'true',
             //'request'       => $result
         );
 
-
         return $tabDiffusion_Type;
-
     }
 
     public static function getDiffusionTypeGroups()
     {
         $groups = GroupModel::get();
+
         return $groups;
     }
 
     public static function getDiffusionTypesUsers()
     {
         $users = DatabaseModel::select([
-            'select'    => ["user_id as id, concat(firstname,' ',lastname) as label"],
-            'table'     => ['users']
+            'select' => ["user_id as id, concat(firstname,' ',lastname) as label"],
+            'table' => ['users'],
         ]);
+
         return $users;
     }
 
     public static function getDiffusionTypeEntities()
     {
         $entities = EntityModel::get();
+
         return $entities;
     }
 
     public static function getDiffusionTypeStatus()
     {
         $status = StatusModel::get();
+
         return $status;
     }
 
     public static function getEnableNotifications(array $aArgs = [])
     {
         $aReturn = DatabaseModel::select([
-            'select'    => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
-            'table'     => ['notifications'],
-            'where'     => ['is_enabled = ?'],
-            'data'      => ['Y']
+            'select' => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
+            'table' => ['notifications'],
+            'where' => ['is_enabled = ?'],
+            'data' => ['Y'],
         ]);
 
         return $aReturn;
     }
-
 }
diff --git a/src/app/notification/models/NotificationScheduleModelAbstract.php b/src/app/notification/models/NotificationScheduleModelAbstract.php
index 3c53ce9dd0ab59667bc77ad4a6a3443e621a91e1..f875e730a08bab19c120aac0603cba9d0668df43 100644
--- a/src/app/notification/models/NotificationScheduleModelAbstract.php
+++ b/src/app/notification/models/NotificationScheduleModelAbstract.php
@@ -1,17 +1,17 @@
 <?php
 
 /**
-* Copyright Maarch since 2008 under licence GPLv3.
-* See LICENCE.txt file at the root folder for more details.
-* This file is part of Maarch software.
-*
-*/
+ * Copyright Maarch since 2008 under licence GPLv3.
+ * See LICENCE.txt file at the root folder for more details.
+ * This file is part of Maarch software.
+ */
 
 /**
-* @brief Notifications Model
-* @author dev@maarch.org
-* @ingroup Module
-*/
+ * @brief Notifications Model
+ *
+ * @author dev@maarch.org
+ * @ingroup Module
+ */
 
 namespace Notification\models;
 
@@ -50,10 +50,10 @@ class NotificationScheduleModelAbstract
 
         HistoryController::add([
             'tableName' => 'notifications',
-            'recordId'  => $GLOBALS['userId'],
+            'recordId' => $GLOBALS['userId'],
             'eventType' => 'UP',
-            'eventId'   => 'notificationadd',
-            'info'      => _NOTIFICATION_SCHEDULE_UPDATED
+            'eventId' => 'notificationadd',
+            'info' => _NOTIFICATION_SCHEDULE_UPDATED,
         ]);
 
         return true;
@@ -61,17 +61,17 @@ class NotificationScheduleModelAbstract
 
     public static function getCrontab(array $aArgs = [])
     {
-        if (!isset($aArgs["setHiddenValue"])) {
-            $aArgs["setHiddenValue"] = true;
+        if (!isset($aArgs['setHiddenValue'])) {
+            $aArgs['setHiddenValue'] = true;
         }
 
-        $crontab  = shell_exec('crontab -l');
+        $crontab = shell_exec('crontab -l');
         // TODO check crontab is installed
-        $lines    = explode("\n", $crontab);
-        $data     = array();
+        $lines = explode("\n", $crontab);
+        $data = array();
         $customId = CoreConfigModel::getCustomId();
-        $corePath = str_replace("custom/".$customId."/src/app/notification/models", "", __DIR__);
-        $corePath = str_replace("src/app/notification/models", "", $corePath);
+        $corePath = str_replace('custom/'.$customId.'/src/app/notification/models', '', __DIR__);
+        $corePath = str_replace('src/app/notification/models', '', $corePath);
 
         foreach ($lines as $cronLine) {
             $cronLine = trim($cronLine);
@@ -89,28 +89,32 @@ class NotificationScheduleModelAbstract
                 list($m, $h, $dom, $mon, $dow, $cmd) = explode(' ', $cronLine, 6);
             }
 
-            if ($customId <> '') {
-                $pathToFolow = $corePath . 'custom/'.$customId . '/';
+            if ($customId != '') {
+                $pathToFolow = $corePath.'custom/'.$customId.'/';
             } else {
                 $pathToFolow = $corePath;
             }
 
-            $state = "normal";
-            if (strpos($cmd, $pathToFolow.'modules/notifications/batch/scripts/') !== 0 && $aArgs["setHiddenValue"]) {
-                $cmd   = "hidden";
+            $state = 'normal';
+            if (strpos($cmd, $pathToFolow.'modules/notifications/batch/scripts/') !== 0 && $aArgs['setHiddenValue']) {
+                $cmd = 'hidden';
                 $state = 'hidden';
             }
 
+            $filename = explode('/', $cmd);
+
             $data[] = array(
-                'm'     => $m,
-                'h'     => $h,
-                'dom'   => $dom,
-                'mon'   => $mon,
-                'dow'   => $dow,
-                'cmd'   => $cmd,
-                'state' => $state
+                'm' => $m,
+                'h' => $h,
+                'dom' => $dom,
+                'mon' => $mon,
+                'dow' => $dow,
+                'cmd' => $cmd,
+                'description' => end($filename),
+                'state' => $state,
             );
         }
+
         return $data;
     }
 
@@ -120,31 +124,31 @@ class NotificationScheduleModelAbstract
         ValidatorModel::intVal($aArgs, ['notification_sid']);
 
         $notification_sid = $aArgs['notification_sid'];
-        $notification_id  = $aArgs['notification_id'];
+        $notification_id = $aArgs['notification_id'];
 
         //Creer le script sh pour les notifications
-        $filename = "notification";
+        $filename = 'notification';
         $customId = CoreConfigModel::getCustomId();
-        if (isset($customId) && $customId<>"") {
-            $filename.="_".str_replace(" ", "", $customId);
+        if (isset($customId) && $customId != '') {
+            $filename .= '_'.str_replace(' ', '', $customId);
         }
-        $filename.="_".$notification_sid.".sh";
+        $filename .= '_'.$notification_id.'.sh';
 
-        $corePath = str_replace("custom/".$customId."/src/app/notification/models", "", __DIR__);
-        $corePath = str_replace("src/app/notification/models", "", $corePath);
+        $corePath = str_replace('custom/'.$customId.'/src/app/notification/models', '', __DIR__);
+        $corePath = str_replace('src/app/notification/models', '', $corePath);
 
-        if (file_exists($corePath. 'custom/'.$customId .'/modules/notifications/batch/config/config.xml')) {
-            $ConfigNotif = $corePath. 'custom/'. $customId .'/modules/notifications/batch/config/config.xml';
-        } elseif (file_exists($corePath. 'custom/'. $customId .'/modules/notifications/batch/config/config_'.$customId.'.xml')) {
-            $ConfigNotif = $corePath. 'custom/'. $customId .'/modules/notifications/batch/config/config_'.$customId.'.xml';
-        } elseif (file_exists($corePath. 'modules/notifications/batch/config/config_'.$customId.'.xml')) {
-            $ConfigNotif = $corePath. 'modules/notifications/batch/config/config_'.$customId.'.xml';
+        if (file_exists($corePath.'custom/'.$customId.'/modules/notifications/batch/config/config.xml')) {
+            $ConfigNotif = $corePath.'custom/'.$customId.'/modules/notifications/batch/config/config.xml';
+        } elseif (file_exists($corePath.'custom/'.$customId.'/modules/notifications/batch/config/config_'.$customId.'.xml')) {
+            $ConfigNotif = $corePath.'custom/'.$customId.'/modules/notifications/batch/config/config_'.$customId.'.xml';
+        } elseif (file_exists($corePath.'modules/notifications/batch/config/config_'.$customId.'.xml')) {
+            $ConfigNotif = $corePath.'modules/notifications/batch/config/config_'.$customId.'.xml';
         } else {
-            $ConfigNotif = $corePath. 'modules/notifications/batch/config/config.xml';
+            $ConfigNotif = $corePath.'modules/notifications/batch/config/config.xml';
         }
-        
-        if ($customId <> '') {
-            $pathToFolow = $corePath . 'custom/'.$customId . '/';
+
+        if ($customId != '') {
+            $pathToFolow = $corePath.'custom/'.$customId.'/';
             if (!file_exists($pathToFolow.'modules/notifications/batch/scripts/')) {
                 mkdir($pathToFolow.'modules/notifications/batch/scripts/', 0777, true);
             }
@@ -175,14 +179,14 @@ class NotificationScheduleModelAbstract
         fwrite($file_open, 'php \'process_email_stack.php\' -c '.$ConfigNotif);
         fwrite($file_open, "\n");
         fclose($file_open);
-        shell_exec("chmod +x " . escapeshellarg($pathToFolow . "modules/notifications/batch/scripts/" . $filename));
+        shell_exec('chmod +x '.escapeshellarg($pathToFolow.'modules/notifications/batch/scripts/'.$filename));
 
         HistoryController::add([
             'tableName' => 'notifications',
-            'recordId'  => $notification_id,
+            'recordId' => $notification_id,
             'eventType' => 'ADD',
-            'eventId'   => 'notificationadd',
-            'info'      => _NOTIFICATION_SCRIPT_ADDED
+            'eventId' => 'notificationadd',
+            'info' => _NOTIFICATION_SCRIPT_ADDED,
         ]);
 
         return true;
diff --git a/src/app/parameter/controllers/ParameterController.php b/src/app/parameter/controllers/ParameterController.php
index dd5330efe41ec6b8986974fc7fabf0b88ba5ad3c..61c5b1d953619b75084160be24382437d8913efb 100644
--- a/src/app/parameter/controllers/ParameterController.php
+++ b/src/app/parameter/controllers/ParameterController.php
@@ -33,7 +33,7 @@ class ParameterController
         foreach ($parameters as $key => $parameter) {
             if (!empty($parameter['param_value_string'])) {
                 $parameters[$key]['value'] = $parameter['param_value_string'];
-            } elseif (!empty($parameter['param_value_int'])) {
+            } elseif (is_int($parameter['param_value_int'])) {
                 $parameters[$key]['value'] = $parameter['param_value_int'];
             } elseif (!empty($parameter['param_value_date'])) {
                 $parameters[$key]['value'] = $parameter['param_value_date'];
diff --git a/src/app/user/controllers/UserController.php b/src/app/user/controllers/UserController.php
index 06ec69c3c5e3c5008cb5520c5dc278088518bc3a..a435a2c3bae4a277b9af2cd6ac1c1b93c15e943d 100644
--- a/src/app/user/controllers/UserController.php
+++ b/src/app/user/controllers/UserController.php
@@ -53,7 +53,7 @@ class UserController
             ]);
         } else {
             $entities = EntityModel::getAllEntitiesByUserId(['userId' => $GLOBALS['userId']]);
-            $users = UserModel::getByEntities([
+            $users = UserEntityModel::getUsersByEntities([
                 'select'    => ['DISTINCT users.id', 'users.user_id', 'firstname', 'lastname', 'status', 'enabled', 'mail'],
                 'entities'  => $entities
             ]);
@@ -106,7 +106,7 @@ class UserController
         $user['allGroups'] = GroupModel::getAvailableGroupsByUserId(['userId' => $user['user_id']]);
         $user['entities'] = UserModel::getEntitiesById(['userId' => $user['user_id']]);
         $user['allEntities'] = EntityModel::getAvailableEntitiesForAdministratorByUserId(['userId' => $user['user_id'], 'administratorUserId' => $GLOBALS['userId']]);
-        $user['baskets'] = BasketModel::getBasketsByUserId(['userId' => $user['user_id'], 'absenceUneeded' => true]);
+        $user['baskets'] = BasketModel::getBasketsByUserId(['userId' => $user['user_id']]);
         $user['history'] = HistoryModel::getByUserId(['userId' => $user['user_id']]);
 
         return $response->withJson($user);
@@ -323,7 +323,7 @@ class UserController
             }
         }
 
-        return $response->withJson(['redirectedBaskets' => BasketModel::getRedirectedBasketsByUserId(['userId' => $user['user_id']])]);
+        return $response->withJson(['baskets' => BasketModel::getBasketsByUserId(['userId' => $user['user_id']])]);
     }
 
     public function deleteRedirectedBaskets(Request $request, Response $response, array $aArgs)
@@ -337,7 +337,7 @@ class UserController
 
         BasketModel::deleteBasketRedirection(['userId' => $user['user_id'], 'basketId' => $aArgs['basketId']]);
 
-        return $response->withJson(['redirectedBaskets' => BasketModel::getRedirectedBasketsByUserId(['userId' => $user['user_id']])]);
+        return $response->withJson(['baskets' => BasketModel::getBasketsByUserId(['userId' => $user['user_id']])]);
     }
 
     public function updateStatus(Request $request, Response $response, array $aArgs)
@@ -657,7 +657,8 @@ class UserController
 
         return $response->withJson([
             'groups'    => UserModel::getGroupsByUserId(['userId' => $user['user_id']]),
-            'allGroups' => GroupModel::getAvailableGroupsByUserId(['userId' => $user['user_id']])
+            'allGroups' => GroupModel::getAvailableGroupsByUserId(['userId' => $user['user_id']]),
+            'baskets'   => BasketModel::getBasketsByUserId(['userId' => $user['user_id']])
         ]);
     }
 
@@ -881,7 +882,7 @@ class UserController
                 }
                 if ($GLOBALS['userId'] != 'superadmin') {
                     $entities = EntityModel::getAllEntitiesByUserId(['userId' => $GLOBALS['userId']]);
-                    $users = UserModel::getByEntities([
+                    $users = UserEntityModel::getUsersByEntities([
                         'select'    => ['users.id'],
                         'entities'  => $entities
                     ]);
diff --git a/src/app/user/models/UserEntityModelAbstract.php b/src/app/user/models/UserEntityModelAbstract.php
index fd4b055215ea1fb16d61dd83309b9d89794699bd..366a3ef6fbc63b72f12cb3c0cdf2e01062448c6b 100644
--- a/src/app/user/models/UserEntityModelAbstract.php
+++ b/src/app/user/models/UserEntityModelAbstract.php
@@ -29,8 +29,8 @@ class UserEntityModelAbstract
             'select'    => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
             'table'     => ['users', 'users_entities'],
             'left_join' => ['users.user_id = users_entities.user_id'],
-            'where'     => ['users_entities IS NULL', 'users.user_id not in (?)'],
-            'data'      => [$excludedUsers]
+            'where'     => ['users_entities IS NULL', 'users.user_id not in (?)', 'status != ?'],
+            'data'      => [$excludedUsers, 'DEL']
         ]);
 
         return $aUsersEntities;
@@ -143,4 +143,19 @@ class UserEntityModelAbstract
 
         return true;
     }
+
+    public static function getUsersByEntities(array $aArgs)
+    {
+        ValidatorModel::notEmpty($aArgs, ['entities']);
+        ValidatorModel::arrayType($aArgs, ['entities', 'select']);
+
+        $aUsers = DatabaseModel::select([
+            'select'    => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
+            'table'     => ['users, users_entities'],
+            'where'     => ['users.user_id = users_entities.user_id', 'users_entities.entity_id in (?)', 'status != ?'],
+            'data'      => [$aArgs['entities'], 'DEL']
+        ]);
+
+        return $aUsers;
+    }
 }
diff --git a/src/app/user/models/UserModelAbstract.php b/src/app/user/models/UserModelAbstract.php
index 48dc47ab2129304380ed16afbfad29f6f5c81d6e..2d111b14a2893d90a97a6dba88bc65bfb488e595 100644
--- a/src/app/user/models/UserModelAbstract.php
+++ b/src/app/user/models/UserModelAbstract.php
@@ -144,21 +144,6 @@ class UserModelAbstract
         return $aUser[0];
     }
 
-    public static function getByEntities(array $aArgs = [])
-    {
-        ValidatorModel::notEmpty($aArgs, ['entities']);
-        ValidatorModel::arrayType($aArgs, ['entities']);
-
-        $aUsers = DatabaseModel::select([
-            'select'    => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
-            'table'     => ['users, users_entities'],
-            'where'     => ['users.user_id = users_entities.user_id', 'users_entities.entity_id in (?)'],
-            'data'      => [$aArgs['entities']]
-        ]);
-
-        return $aUsers;
-    }
-
     public static function getByEmail(array $aArgs = [])
     {
         ValidatorModel::notEmpty($aArgs, ['mail']);
@@ -175,6 +160,21 @@ class UserModelAbstract
         return $aUser;
     }
 
+    public static function getGroupsById(array $aArgs = [])
+    {
+        ValidatorModel::notEmpty($aArgs, ['userId']);
+        ValidatorModel::stringType($aArgs, ['userId']);
+
+        $aGroups = DatabaseModel::select([
+            'select'    => ['usergroup_content.group_id', 'usergroups.group_desc', 'usergroup_content.primary_group'],
+            'table'     => ['usergroup_content, usergroups'],
+            'where'     => ['usergroup_content.group_id = usergroups.group_id', 'usergroup_content.user_id = ?'],
+            'data'      => [$aArgs['userId']]
+        ]);
+
+        return $aGroups;
+    }
+
     public static function updatePassword(array $aArgs = [])
     {
         ValidatorModel::notEmpty($aArgs, ['id', 'password']);
@@ -193,7 +193,7 @@ class UserModelAbstract
         return true;
     }
 
-    public static function resetPassword(array $aArgs = [])
+    public static function resetPassword(array $aArgs)
     {
         ValidatorModel::notEmpty($aArgs, ['id']);
         ValidatorModel::intVal($aArgs, ['id']);
@@ -201,7 +201,8 @@ class UserModelAbstract
         DatabaseModel::update([
             'table'     => 'users',
             'set'       => [
-                'password'  => SecurityModel::getPasswordHash('maarch')
+                'password'          => SecurityModel::getPasswordHash('maarch'),
+                'change_password'   => 'Y',
             ],
             'where'     => ['id = ?'],
             'data'      => [$aArgs['id']]
diff --git a/src/core/controllers/CoreController.php b/src/core/controllers/CoreController.php
index ed68d240ae15ee2c3709bb08cc7a4c931256a2e9..bfbb5d82edfb1c958c008b1292e9004e8741982e 100644
--- a/src/core/controllers/CoreController.php
+++ b/src/core/controllers/CoreController.php
@@ -24,24 +24,26 @@ class CoreController
 {
     public function initialize(Request $request, Response $response)
     {
-        $customId = CoreConfigModel::getCustomId();
-
-        $data = $request->getParams();
-
         $aInit = [];
         $aInit['coreUrl'] = str_replace('rest/', '', \Url::coreurl());
-        $aInit['applicationName'] = CoreConfigModel::getApplicationName();
         $aInit['lang'] = CoreConfigModel::getLanguage();
+        $aInit['scriptsToinject'] = [];
 
-        if (!empty($data['views'])) {
-            foreach ($data['views'] as $view) {
-                $aInit[$view.'View'] = 'Views/'.$view.'.component.html';
-                if (file_exists("custom/{$customId}/apps/maarch_entreprise/Views/{$view}.component.html")) {
-                    $aInit[$view.'View'] = "../../custom/{$customId}/apps/maarch_entreprise/Views/{$view}.component.html";
+        $scriptsToInject =  scandir('dist');
+        foreach ($scriptsToInject as $key => $value) {
+            if (strstr($value, 'inline.') !== false || strstr($value, 'main.') !== false || strstr($value, 'vendor.') !== false) {
+                if (strstr($value, '.js.map') === false) {
+                    $aInit['scriptsToinject'][] = $value;
                 }
             }
         }
 
+        if (!empty($aInit['scriptsToinject'][2]) && strstr($aInit['scriptsToinject'][2], 'vendor.') !== false) {
+            $tmp = $aInit['scriptsToinject'][1];
+            $aInit['scriptsToinject'][1] = $aInit['scriptsToinject'][2];
+            $aInit['scriptsToinject'][2] = $tmp;
+        }
+
         return $response->withJson($aInit);
     }
 
diff --git a/src/core/controllers/PreparedClauseController.php b/src/core/controllers/PreparedClauseController.php
index 7ab899f1977b505106a968c2d8ad479359180597..691838c9482c7b14ed1374b63a3bf082f3db4990 100644
--- a/src/core/controllers/PreparedClauseController.php
+++ b/src/core/controllers/PreparedClauseController.php
@@ -229,7 +229,7 @@ class PreparedClauseController
         }
 
         try {
-            ResModel::getOnView(['select' => $aArgs['select'], 'where' => [$clause]]);
+            ResModel::getOnView(['select' => $aArgs['select'], 'where' => [$clause, '1=1']]);
         } catch (\Exception $e) {
             return false;
         }
diff --git a/src/core/models/SecurityModel.php b/src/core/models/SecurityModel.php
index aea250839c59768f57f637ce1ac0e1a31ad99d80..0ff07ac5868b357063e0732f593054825d6ab691 100644
--- a/src/core/models/SecurityModel.php
+++ b/src/core/models/SecurityModel.php
@@ -93,12 +93,18 @@ class SecurityModel
             }
         }
 
-        $previousCookie = SecurityModel::getCookieAuth();
-        if (empty($previousCookie)) {
+        $user = DatabaseModel::select([
+            'select'    => ['cookie_key'],
+            'table'     => ['users'],
+            'where'     => ['user_id = ?', 'cookie_date > CURRENT_TIMESTAMP'],
+            'data'      => [$args['userId']]
+        ]);
+        if (empty($user[0]['cookie_key'])) {
             $cookieKey = SecurityModel::getPasswordHash($args['userId']);
         } else {
-            $cookieKey = $previousCookie['cookieKey'];
+            $cookieKey = $user[0]['cookie_key'];
         }
+
         $cookiePath = str_replace(['apps/maarch_entreprise/index.php', 'rest/index.php'], '', $_SERVER['SCRIPT_NAME']);
         $cookieTime = time() + 60 * $cookieTime;
 
@@ -123,16 +129,6 @@ class SecurityModel
         $previousCookie = SecurityModel::getCookieAuth();
 
         if (!empty($previousCookie)) {
-            DatabaseModel::update([
-                'table' => 'users',
-                'set'   => [
-                    'cookie_key'    => '',
-                    'cookie_date'   => date('Y-m-d H:i:s', time() - 1),
-                ],
-                'where' => ['user_id = ?'],
-                'data'  => [$previousCookie['userId']]
-            ]);
-
             $cookiePath = str_replace(['apps/maarch_entreprise/index.php', 'rest/index.php'], '', $_SERVER['SCRIPT_NAME']);
             setcookie('maarchCourrierAuth', '', time() - 1, $cookiePath, '', false, true);
         }