فهرست منبع

merged with vjs

Josh Kamau 5 سال پیش
والد
کامیت
95e1f16071
53فایلهای تغییر یافته به همراه4560 افزوده شده و 776 حذف شده
  1. 2 2
      .idea/dataSources.xml
  2. 74 45
      app/Console/Commands/GenerateTreeCommand.php
  3. 9 2
      app/Http/Controllers/ProController.php
  4. 1 0
      app/Http/Controllers/action_items_Controller.php
  5. 1 0
      app/Http/Controllers/action_items_SINGLE_Controller.php
  6. 1 0
      app/Http/Controllers/ally_updates_Controller.php
  7. 1 0
      app/Http/Controllers/bills_Controller.php
  8. 1 0
      app/Http/Controllers/bills_SINGLE_Controller.php
  9. 1 0
      app/Http/Controllers/care_month_entries_Controller.php
  10. 1 0
      app/Http/Controllers/care_month_entries_SINGLE_Controller.php
  11. 1 0
      app/Http/Controllers/care_months_Controller.php
  12. 1 0
      app/Http/Controllers/care_months_SINGLE_Controller.php
  13. 2 1
      app/Http/Controllers/clients_Controller.php
  14. 8 1
      app/Http/Controllers/clients_SINGLE_Controller.php
  15. 1 0
      app/Http/Controllers/erx_Controller.php
  16. 1 0
      app/Http/Controllers/erx_SINGLE_Controller.php
  17. 1 0
      app/Http/Controllers/facilities_Controller.php
  18. 1 0
      app/Http/Controllers/facilities_SINGLE_Controller.php
  19. 1 0
      app/Http/Controllers/mcp_updates_Controller.php
  20. 1 0
      app/Http/Controllers/measurements_Controller.php
  21. 1 0
      app/Http/Controllers/measurements_SINGLE_Controller.php
  22. 1 0
      app/Http/Controllers/med_profile_line_updates_Controller.php
  23. 1 0
      app/Http/Controllers/med_profile_lines_Controller.php
  24. 1 0
      app/Http/Controllers/med_profile_lines_SINGLE_Controller.php
  25. 1 0
      app/Http/Controllers/my_payment_schedule_Controller.php
  26. 1 0
      app/Http/Controllers/notes_Controller.php
  27. 1 0
      app/Http/Controllers/notes_SINGLE_Controller.php
  28. 1 0
      app/Http/Controllers/pro_access_Controller.php
  29. 1 0
      app/Http/Controllers/pro_access_SINGLE_Controller.php
  30. 1 0
      app/Http/Controllers/pro_rates_Controller.php
  31. 1 0
      app/Http/Controllers/pro_rates_SINGLE_Controller.php
  32. 1 0
      app/Http/Controllers/pros_Controller.php
  33. 1 0
      app/Http/Controllers/pros_SINGLE_Controller.php
  34. 1 0
      app/Http/Controllers/relationships_Controller.php
  35. 1 0
      app/Http/Controllers/relationships_SINGLE_Controller.php
  36. 1 0
      app/Http/Controllers/section_templates_Controller.php
  37. 1 0
      app/Http/Controllers/transactions_Controller.php
  38. 2 1
      composer.json
  39. 16 0
      generatecv/invalid.json
  40. 3 2
      generatecv/tree-templates/controller.template.php
  41. 4 2
      generatecv/tree.txt
  42. 82 4
      public/css/meeting.css
  43. 216 0
      public/noty/noty.css
  44. 3124 0
      public/noty/noty.js
  45. 47 0
      public/noty/themes/mint.css
  46. 24 30
      resources/views/join.blade.php
  47. 4 0
      resources/views/layouts/meeting.blade.php
  48. 284 68
      resources/views/meet.blade.php
  49. 2 2
      resources/views/pro/clients/index.blade.php
  50. 1 0
      resources/views/pro/clients/subs.blade.php
  51. 2 616
      resources/views/pro/clients_SINGLE/SUB_dashboard.blade.php
  52. 621 0
      resources/views/pro/clients_SINGLE/SUB_detail.blade.php
  53. 1 0
      routes/generated.php

+ 2 - 2
.idea/dataSources.xml

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
-    <data-source source="LOCAL" name="stag2@localhost" uuid="d127a3b7-9799-49f9-8d87-747f4dd66e7d">
+    <data-source source="LOCAL" name="stag@localhost" uuid="d127a3b7-9799-49f9-8d87-747f4dd66e7d">
       <driver-ref>postgresql</driver-ref>
       <synchronize>true</synchronize>
       <jdbc-driver>org.postgresql.Driver</jdbc-driver>
-      <jdbc-url>jdbc:postgresql://localhost:5432/stag2</jdbc-url>
+      <jdbc-url>jdbc:postgresql://localhost:5432/stag</jdbc-url>
     </data-source>
   </component>
 </project>

+ 74 - 45
app/Console/Commands/GenerateTreeCommand.php

@@ -207,12 +207,19 @@ class GenerateTreeCommand extends Command
                     case 12: // ACTIONS | SUB
                         // check if this has show conditions
                         $show = false;
+                        $isDashboard = 'unspecified';
                         if(strpos($line, ":")) {
                             $parts = explode(":", $line);
                             $line = $parts[0];
                             if($parts[1] === 'if') {
                                 $show = $parts[2];
                             }
+                            else if($parts[1] === 'dashboard') {
+                                $isDashboard = true;
+                            }
+                            else if($parts[1] === 'custom') {
+                                $isDashboard = false;
+                            }
                         }
                         if($currentSubType === 'ACTIONS') {
                             $currentMethod = $currentSubController->addMethod(
@@ -231,66 +238,85 @@ class GenerateTreeCommand extends Command
                             $currentMethod->type = 'sub';
                             $currentMethod->show = $show;
                             $currentMethod->data = [];
-                            if($line === 'dashboard') {
+                            if($isDashboard !== 'unspecified') {
+                                $currentMethod->dashboard = $isDashboard;
+                                if($isDashboard) {
+                                    $currentSubController->dashboardName = $line;
+                                    if($currentController && $currentSubController && $currentController->name !== $currentSubController->name) {
+                                        // change the redirect in /view/{uid} method of $currentController
+                                        foreach($currentController->methods as $method) {
+                                            if($method->name === 'view' && $method->redirect) {
+                                                $method->redirect = $method->route . '/SUB_' . $line;
+                                                break;
+                                            }
+                                        }
+                                    }
+                                }
+                                /*dump("/SUB_" . $line . "  ==>  " . ($isDashboard ? "yes" : "no"));
+                                dump($currentMethod);
+                                dump($currentSubController->dashboardName);
+                                if($isDashboard) exit(1);*/
+                            }
+                            else if($line === 'dashboard') {
                                 $currentMethod->dashboard = true;
                             }
                         }
                         break;
 
                     case 16: // data for actions and subs
-                            if(strpos($line, "!inc:") === 0) { // !inc:
-                                if (!empty($currentMethod)) {
-                                    $currentMethod->setIncFields('include', explode(",", substr($line, 5)));
-                                }
+                        if(strpos($line, "!inc:") === 0) { // !inc:
+                            if (!empty($currentMethod)) {
+                                $currentMethod->setIncFields('include', explode(",", substr($line, 5)));
                             }
-                            else if(strpos($line, "!exc:") === 0) { // !exc:
-                                if (!empty($currentMethod)) {
-                                    $currentMethod->setIncFields('exclude', explode(",", substr($line, 5)));
-                                }
+                        }
+                        else if(strpos($line, "!exc:") === 0) { // !exc:
+                            if (!empty($currentMethod)) {
+                                $currentMethod->setIncFields('exclude', explode(",", substr($line, 5)));
                             }
-                            else if(strpos($line, "!lnk:") === 0) { // !lnk:
-                                if (!empty($currentMethod)) {
-                                    $currentMethod->viewLinkField = substr($line, 5);
-                                }
+                        }
+                        else if(strpos($line, "!lnk:") === 0) { // !lnk:
+                            if (!empty($currentMethod)) {
+                                $currentMethod->viewLinkField = substr($line, 5);
                             }
-                            else if(strpos($line, "!col:") === 0) { // !col:
-                                if (!empty($currentMethod)) {
-                                    $currentMethod->setColumnSpec(substr($line, 5), $exitURL,
-                                        $currentMethod->dashboard ? 'record' : 'subRecord'
-                                    );
-                                }
+                        }
+                        else if(strpos($line, "!col:") === 0) { // !col:
+                            if (!empty($currentMethod)) {
+                                $currentMethod->setColumnSpec(substr($line, 5), $exitURL,
+                                    $currentMethod->dashboard ? 'record' : 'subRecord'
+                                );
                             }
-                            else if(strpos($line, "!qry:") === 0) { // !qry:
-                                if (!empty($currentMethod)) {
-                                    $currentMethod->addQuery(substr($line, 5));
-                                }
+                        }
+                        else if(strpos($line, "!qry:") === 0) { // !qry:
+                            if (!empty($currentMethod)) {
+                                $currentMethod->addQuery(substr($line, 5));
                             }
-                            else if(strpos($line, "!grp:") === 0) { // !grp:
-                                if (!empty($currentMethod)) {
-                                    $currentMethod->addGroup(substr($line, 5), $exitURL);
-                                }
+                        }
+                        else if(strpos($line, "!grp:") === 0) { // !grp:
+                            if (!empty($currentMethod)) {
+                                $currentMethod->addGroup(substr($line, 5), $exitURL);
                             }
-                            else if(strpos($line, "!act:") === 0) { // !act:
-                                if (!empty($currentMethod)) {
-                                    $currentMethod->addAction(substr($line, 5), $exitURL);
-                                }
+                        }
+                        else if(strpos($line, "!act:") === 0) { // !act:
+                            if (!empty($currentMethod)) {
+                                $currentMethod->addAction(substr($line, 5), $exitURL);
                             }
-                            else if(strpos($line, "!nal:") === 0) { // !nal:
-                                if (!empty($currentMethod)) {
-                                    $currentMethod->noActionLinks = true;
-                                }
+                        }
+                        else if(strpos($line, "!nal:") === 0) { // !nal:
+                            if (!empty($currentMethod)) {
+                                $currentMethod->noActionLinks = true;
                             }
-                            else if(!empty($currentMethod)) {
-                                $currentMethod->data[] = $line;
-                                if($exitURL) {
-                                    if(strpos("=", $line) !== FALSE) {
-                                        $currentMethod->viewURL = $exitURL;
-                                    }
-                                    else {
-                                        $currentMethod->exitURL = $exitURL;
-                                    }
+                        }
+                        else if(!empty($currentMethod)) {
+                            $currentMethod->data[] = $line;
+                            if($exitURL) {
+                                if(strpos("=", $line) !== FALSE) {
+                                    $currentMethod->viewURL = $exitURL;
+                                }
+                                else {
+                                    $currentMethod->exitURL = $exitURL;
                                 }
                             }
+                        }
                         break;
 
                     case 20: // SUB add_new fields
@@ -467,9 +493,11 @@ class GenController {
     public $hasRemove = false;
     public $sub = false;
     public $parentControllerName = '';
+    public $parentController = false;
     public $subLinksSaved = false;
     public $actionLinksSaved = false;
     public $icon = "user";
+    public $dashboardName = 'dashboard';
     public function __construct($root = null, $name = null, $icon = "user")
     {
         $this->root = $root;
@@ -617,7 +645,8 @@ class GenController {
 
             $code[] = "\t}";
         }
-        $text = str_replace("_NAME_", "{$this->name}_Controller", $text);
+        $text = str_replace("__DASHBOARD_NAME__", $this->dashboardName, $text);
+        $text = str_replace("__NAME__", "{$this->name}_Controller", $text);
         $text = str_replace("// __METHODS__", implode("\n", $code), $text);
         GenerateTreeCommand::save(app_path("Http/Controllers/{$this->name}_Controller.php"), $text);
         echo "Generated " . app_path("Http/Controllers/{$this->name}_Controller.php") . "\n";

+ 9 - 2
app/Http/Controllers/ProController.php

@@ -46,15 +46,22 @@ class ProController extends Controller
     }
 
     public function meet(Request $request) {
+        $session = DB::table('app_session')->where('session_key', $request->cookie('sessionKey'))->first();
+        $pro = false;
+        if($session && $session->pro_id) {
+            $pro = DB::table('pro')->where('id', $session->pro_id)->first();
+        }
         return view('meet', [
-            'guest' => false
+            'guest' => false,
+            'session' => $session,
+            'pro' => $pro
         ]);
     }
 
     public function getOpentokSessionKey(Request $request, $uid) {
         $client = DB::table('client')->where('uid', $uid)->first();
         return json_encode([
-            "data" => $client->video_visit_tokbox_token
+            "data" => $client->opentok_session_id
         ]);
     }
 

+ 1 - 0
app/Http/Controllers/action_items_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class action_items_Controller extends Controller
 {
     public $selfName = 'action_items_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /action_items
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/action_items_SINGLE_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class action_items_SINGLE_Controller extends Controller
 {
     public $selfName = 'action_items_SINGLE_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /action_items/view/{uid}/ACTION_signAsPrescriber
 	public function ACTION_signAsPrescriber(Request $request, $uid) {

+ 1 - 0
app/Http/Controllers/ally_updates_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class ally_updates_Controller extends Controller
 {
     public $selfName = 'ally_updates_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /ally_updates
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/bills_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class bills_Controller extends Controller
 {
     public $selfName = 'bills_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /bills
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/bills_SINGLE_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class bills_SINGLE_Controller extends Controller
 {
     public $selfName = 'bills_SINGLE_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /bills/view/{uid}/ACTION_payHcpAmount
 	public function ACTION_payHcpAmount(Request $request, $uid) {

+ 1 - 0
app/Http/Controllers/care_month_entries_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class care_month_entries_Controller extends Controller
 {
     public $selfName = 'care_month_entries_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /care_month_entries
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/care_month_entries_SINGLE_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class care_month_entries_SINGLE_Controller extends Controller
 {
     public $selfName = 'care_month_entries_SINGLE_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /care_month_entries/view/{uid}/ACTION_updateContent
 	public function ACTION_updateContent(Request $request, $uid) {

+ 1 - 0
app/Http/Controllers/care_months_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class care_months_Controller extends Controller
 {
     public $selfName = 'care_months_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /care_months
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/care_months_SINGLE_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class care_months_SINGLE_Controller extends Controller
 {
     public $selfName = 'care_months_SINGLE_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /care_months/view/{uid}/ACTION_assignMcpPro
 	public function ACTION_assignMcpPro(Request $request, $uid) {

+ 2 - 1
app/Http/Controllers/clients_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class clients_Controller extends Controller
 {
     public $selfName = 'clients_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /clients
 	public function index(Request $request) {
@@ -26,6 +27,6 @@ class clients_Controller extends Controller
 
 	// GET /clients/view/{uid}
 	public function view(Request $request, $uid) {
-		return redirect("/clients/view/$uid/SUB_dashboard");
+		return redirect("/clients/view/$uid/SUB_detail");
 	}
 }

+ 8 - 1
app/Http/Controllers/clients_SINGLE_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class clients_SINGLE_Controller extends Controller
 {
     public $selfName = 'clients_SINGLE_Controller';
+    public $dashboardName = 'detail';
 
 	// GET /clients/view/{uid}/ACTION_sendCellNumberConfirmationMessage
 	public function ACTION_sendCellNumberConfirmationMessage(Request $request, $uid) {
@@ -384,12 +385,18 @@ class clients_SINGLE_Controller extends Controller
 
 	// GET /clients/view/{uid}/SUB_dashboard
 	public function SUB_dashboard(Request $request, $uid) {
+		$record = DB::table('client')->where('uid', $uid)->first();
+		return response()->view('pro/clients_SINGLE/SUB_dashboard', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
+	}
+
+	// GET /clients/view/{uid}/SUB_detail
+	public function SUB_detail(Request $request, $uid) {
 		$record = DB::table('client')->where('uid', $uid)->first();
 		$result_clients = DB::select("select id, concat(name_first, ' ', name_last) as name_display from client");
 		$result_pros = DB::select("select id, name_display from pro");
 		$result_facilities = DB::select("select id, name from facility");
 		$result_relationships = DB::select("select id, concat(name_first, ' - ', relationship_to_client) as name_display from relationship");
-		return response()->view('pro/clients_SINGLE/SUB_dashboard', compact('record', 'result_clients', 'result_pros', 'result_facilities', 'result_relationships'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
+		return response()->view('pro/clients_SINGLE/SUB_detail', compact('record', 'result_clients', 'result_pros', 'result_facilities', 'result_relationships'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
 	}
 
 	// GET /clients/view/{uid}/SUB_measurements

+ 1 - 0
app/Http/Controllers/erx_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class erx_Controller extends Controller
 {
     public $selfName = 'erx_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /erx
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/erx_SINGLE_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class erx_SINGLE_Controller extends Controller
 {
     public $selfName = 'erx_SINGLE_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /erx/view/{uid}/ACTION_signAsPrescriber
 	public function ACTION_signAsPrescriber(Request $request, $uid) {

+ 1 - 0
app/Http/Controllers/facilities_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class facilities_Controller extends Controller
 {
     public $selfName = 'facilities_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /facilities
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/facilities_SINGLE_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class facilities_SINGLE_Controller extends Controller
 {
     public $selfName = 'facilities_SINGLE_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /facilities/view/{uid}/ACTION_updateBasic
 	public function ACTION_updateBasic(Request $request, $uid) {

+ 1 - 0
app/Http/Controllers/mcp_updates_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class mcp_updates_Controller extends Controller
 {
     public $selfName = 'mcp_updates_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /mcp_updates
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/measurements_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class measurements_Controller extends Controller
 {
     public $selfName = 'measurements_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /measurements
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/measurements_SINGLE_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class measurements_SINGLE_Controller extends Controller
 {
     public $selfName = 'measurements_SINGLE_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /measurements/view/{uid}/ACTION_updateBasic
 	public function ACTION_updateBasic(Request $request, $uid) {

+ 1 - 0
app/Http/Controllers/med_profile_line_updates_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class med_profile_line_updates_Controller extends Controller
 {
     public $selfName = 'med_profile_line_updates_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /med_profile_line_updates
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/med_profile_lines_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class med_profile_lines_Controller extends Controller
 {
     public $selfName = 'med_profile_lines_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /med_profile_lines
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/med_profile_lines_SINGLE_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class med_profile_lines_SINGLE_Controller extends Controller
 {
     public $selfName = 'med_profile_lines_SINGLE_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /med_profile_lines/view/{uid}/ACTION_remove
 	public function ACTION_remove(Request $request, $uid) {

+ 1 - 0
app/Http/Controllers/my_payment_schedule_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class my_payment_schedule_Controller extends Controller
 {
     public $selfName = 'my_payment_schedule_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /my_payment_schedule
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/notes_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class notes_Controller extends Controller
 {
     public $selfName = 'notes_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /notes
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/notes_SINGLE_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class notes_SINGLE_Controller extends Controller
 {
     public $selfName = 'notes_SINGLE_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /notes/view/{uid}/ACTION_signAsHcp
 	public function ACTION_signAsHcp(Request $request, $uid) {

+ 1 - 0
app/Http/Controllers/pro_access_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class pro_access_Controller extends Controller
 {
     public $selfName = 'pro_access_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /pro_access
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/pro_access_SINGLE_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class pro_access_SINGLE_Controller extends Controller
 {
     public $selfName = 'pro_access_SINGLE_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /pro_access/view/{uid}/ACTION_updateReason
 	public function ACTION_updateReason(Request $request, $uid) {

+ 1 - 0
app/Http/Controllers/pro_rates_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class pro_rates_Controller extends Controller
 {
     public $selfName = 'pro_rates_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /pro_rates
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/pro_rates_SINGLE_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class pro_rates_SINGLE_Controller extends Controller
 {
     public $selfName = 'pro_rates_SINGLE_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /pro_rates/view/{uid}/ACTION_updateAmount
 	public function ACTION_updateAmount(Request $request, $uid) {

+ 1 - 0
app/Http/Controllers/pros_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class pros_Controller extends Controller
 {
     public $selfName = 'pros_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /pros
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/pros_SINGLE_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class pros_SINGLE_Controller extends Controller
 {
     public $selfName = 'pros_SINGLE_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /pros/view/{uid}/ACTION_sendCellNumberConfirmationMessage
 	public function ACTION_sendCellNumberConfirmationMessage(Request $request, $uid) {

+ 1 - 0
app/Http/Controllers/relationships_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class relationships_Controller extends Controller
 {
     public $selfName = 'relationships_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /relationships
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/relationships_SINGLE_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class relationships_SINGLE_Controller extends Controller
 {
     public $selfName = 'relationships_SINGLE_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /relationships/view/{uid}/ACTION_updateBasic
 	public function ACTION_updateBasic(Request $request, $uid) {

+ 1 - 0
app/Http/Controllers/section_templates_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class section_templates_Controller extends Controller
 {
     public $selfName = 'section_templates_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /section_templates
 	public function index(Request $request) {

+ 1 - 0
app/Http/Controllers/transactions_Controller.php

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
 class transactions_Controller extends Controller
 {
     public $selfName = 'transactions_Controller';
+    public $dashboardName = 'dashboard';
 
 	// GET /transactions
 	public function index(Request $request) {

+ 2 - 1
composer.json

@@ -13,7 +13,8 @@
         "fruitcake/laravel-cors": "^1.0",
         "guzzlehttp/guzzle": "^6.5",
         "laravel/framework": "^7.0",
-        "laravel/tinker": "^2.0"
+        "laravel/tinker": "^2.0",
+        "ext-json": "*"
     },
     "require-dev": {
         "facade/ignition": "^2.0",

+ 16 - 0
generatecv/invalid.json

@@ -0,0 +1,16 @@
+{
+    "created_at": "2020-06-17T02:12:19Z",
+    "eligible_id": "3CZA4VQZK2MX5",
+    "known_issues": [],
+    "error": {
+        "response_code": "Y",
+        "response_description": "Yes",
+        "agency_qualifier_code": null,
+        "agency_qualifier_description": null,
+        "reject_reason_code": "E3",
+        "reject_reason_description": "Requested Record Will Not Be Sent",
+        "follow_up_action_code": "N",
+        "follow_up_action_description": "Resubmission Not Allowed",
+        "details": "This Policy Holder ID is not supported by Eligible's Sandbox. Please resubmit with a supported Policy Holder ID."
+    }
+}

+ 3 - 2
generatecv/tree-templates/controller.template.php

@@ -6,8 +6,9 @@ use Illuminate\Http\Request;
 use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Auth;
 
-class _NAME_ extends Controller
+class __NAME__ extends Controller
 {
-    public $selfName = '_NAME_';
+    public $selfName = '__NAME__';
+    public $dashboardName = '__DASHBOARD_NAME__';
 // __METHODS__
 }

+ 4 - 2
generatecv/tree.txt

@@ -9,6 +9,7 @@ PRO
     clients|client|add|view|icon:user-injured
         !inc:@name_first,gender_identity,mcp_pro_id,cm_pro_id,rme_pro_id,rmm_pro_id,rd_pro_id
         !qry:pros:SELECT id, name_display FROM pro
+        !col:name_first:First Name=>/clients/view/$uid/SUB_dashboard
         !col:mcp_pro_id:MCP:~pros:name_display:id,=,$mcp_pro_id:all
         !col:cm_pro_id:CM Pro:~pros:name_display:id,=,$cm_pro_id:all
         !col:rme_pro_id:RME Pro:~pros:name_display:id,=,$rme_pro_id:all
@@ -272,7 +273,8 @@ PRO
                 isEquipmentServiceNeeded*:select:YES,NO,UNKNOWN=is_equipment_service_needed
                 whatEquipmentServiceIsNeeded:text=what_equipment_service_is_needed
         SUB
-            dashboard
+            dashboard:custom
+            detail:dashboard
                 !grp:Source:source,source_memo,source_at,source_detail,source_client_id,source_pro_id,source_facility_id:Update source:circle=>/clients/view/$uid/ACTION_editSource
                 !grp:Duplicate:is_duplicate,duplicate_of_client_id
                 !grp:Name:name_prefix,name_first,name_middle,name_last,name_suffix,name_credential,name_nickname,name_maiden,name_previous:Edit name:circle=>/clients/view/$uid/ACTION_editName
@@ -743,7 +745,7 @@ PRO
                 !qry:clients:select id, concat(name_first, ' ', name_last) as name_display from client
                 !qry:pros:select id, name_display from pro
                 !grp:Info:cm_or_rm,client_id ,pro_id
-                !grp:Time:effective_date,time_in_seconds ,is_time_specific,starting_time,ending_time:Update timing:circle=>/care_month_entries/view/$uid/ACTION_updateTiming    
+                !grp:Time:effective_date,time_in_seconds ,is_time_specific,starting_time,ending_time:Update timing:circle=>/care_month_entries/view/$uid/ACTION_updateTiming
                 !grp:Achieved time(s):achieved_cm_pro_time_in_seconds,achieved_mcp_time_in_seconds,achieved_rme_pro_time_in_seconds,achieved_rmm_pro_time_in_seconds,achieved_total_time_in_seconds
                 !grp:Content:content_detail,content_text:Update content:circle=>/care_month_entries/view/$uid/ACTION_updateContent
                 !grp:Removed:is_removed,removal_memo,removed_at:Remove:circle=>/care_month_entries/view/$uid/ACTION_remove

+ 82 - 4
public/css/meeting.css

@@ -100,17 +100,66 @@ h1 {
     border-radius: 3px;
     margin: 0 auto;
 }
-.main-view .thumb-view {
+
+.main-view .full-view[data-from]::after {
+    position: absolute;
+    content: attr(data-from);
+    left: 0;
+    width: 100%;
+    top: 0;
+    background: rgba(0, 0, 0, 0.5);
+    color: #fff;
+    font-size: 13px;
+    white-space: nowrap;
+    padding: 0.5rem;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    pointer-events: none;
+}
+
+.main-view .thumbs {
     position: absolute;
     z-index: 2;
-    bottom: 1rem;
+    bottom: 1.5rem;
     right: 1rem;
-    width: 160px;
-    height: 120px;
+    width: 180px;
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    align-items: flex-end;
+    justify-content: flex-end;
+}
+.main-view .thumbs .thumb-view {
+    width: 120px;
+    height: 90px;
     border: 1px solid #0d5875;
     box-shadow: 0 0 3px #888;
     border-radius: 3px;
     background: #444;
+    margin-top: 1rem;
+    position: relative;
+    cursor: pointer;
+}
+.main-view .thumbs .thumb-view>* {
+    pointer-events: none;
+}
+.main-view .thumbs .thumb-view[data-from]::after {
+    position: absolute;
+    content: attr(data-from);
+    left: 0;
+    width: 100%;
+    bottom: 0;
+    background: rgba(0, 0, 0, 0.5);
+    color: #fff;
+    font-size: 11px;
+    white-space: nowrap;
+    padding: 0 5px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+.main-view .thumbs .disconnected-view {
+    opacity: 0;
+    height: 0;
 }
 
 .tp-bar {
@@ -162,4 +211,33 @@ body .OT_fit-mode-cover .OT_video-element {
     left: 1rem;
     width: 50px;
     height: 50px;
+    font-size: 120%;
+}
+.call-mcp {
+    position: absolute;
+    z-index: 2;
+    bottom: 1rem;
+    left: calc(2rem + 50px);
+    width: 50px;
+    height: 50px;
+    font-size: 120%;
+}
+
+.patient-in-q-alert {
+    -webkit-animation: blink 1s linear infinite;
+    -moz-animation: blink 1s linear infinite;
+    animation: blink 1s linear infinite;
+    opacity: 0;
+}
+@-moz-keyframes blink {
+    50% { opacity: 1; }
+    100% { opacity: 0; }
+}
+@-webkit-keyframes blink {
+    50% { opacity: 1; }
+    100% { opacity: 0; }
+}
+@keyframes blink {
+    50% { opacity: 1; }
+    100% { opacity: 0; }
 }

+ 216 - 0
public/noty/noty.css

@@ -0,0 +1,216 @@
+.noty_layout_mixin, #noty_layout__top, #noty_layout__topLeft, #noty_layout__topCenter, #noty_layout__topRight, #noty_layout__bottom, #noty_layout__bottomLeft, #noty_layout__bottomCenter, #noty_layout__bottomRight, #noty_layout__center, #noty_layout__centerLeft, #noty_layout__centerRight {
+  position: fixed;
+  margin: 0;
+  padding: 0;
+  z-index: 9999999;
+  -webkit-transform: translateZ(0) scale(1, 1);
+          transform: translateZ(0) scale(1, 1);
+  -webkit-backface-visibility: hidden;
+          backface-visibility: hidden;
+  -webkit-font-smoothing: subpixel-antialiased;
+  filter: blur(0);
+  -webkit-filter: blur(0);
+  max-width: 90%; }
+
+#noty_layout__top {
+  top: 0;
+  left: 5%;
+  width: 90%; }
+
+#noty_layout__topLeft {
+  top: 20px;
+  left: 20px;
+  width: 325px; }
+
+#noty_layout__topCenter {
+  top: 5%;
+  left: 50%;
+  width: 325px;
+  -webkit-transform: translate(-webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1);
+          transform: translate(calc(-50% - .5px)) translateZ(0) scale(1, 1); }
+
+#noty_layout__topRight {
+  top: 20px;
+  right: 20px;
+  width: 325px; }
+
+#noty_layout__bottom {
+  bottom: 0;
+  left: 5%;
+  width: 90%; }
+
+#noty_layout__bottomLeft {
+  bottom: 20px;
+  left: 20px;
+  width: 325px; }
+
+#noty_layout__bottomCenter {
+  bottom: 5%;
+  left: 50%;
+  width: 325px;
+  -webkit-transform: translate(-webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1);
+          transform: translate(calc(-50% - .5px)) translateZ(0) scale(1, 1); }
+
+#noty_layout__bottomRight {
+  bottom: 20px;
+  right: 20px;
+  width: 325px; }
+
+#noty_layout__center {
+  top: 50%;
+  left: 50%;
+  width: 325px;
+  -webkit-transform: translate(-webkit-calc(-50% - .5px), -webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1);
+          transform: translate(calc(-50% - .5px), calc(-50% - .5px)) translateZ(0) scale(1, 1); }
+
+#noty_layout__centerLeft {
+  top: 50%;
+  left: 20px;
+  width: 325px;
+  -webkit-transform: translate(0, -webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1);
+          transform: translate(0, calc(-50% - .5px)) translateZ(0) scale(1, 1); }
+
+#noty_layout__centerRight {
+  top: 50%;
+  right: 20px;
+  width: 325px;
+  -webkit-transform: translate(0, -webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1);
+          transform: translate(0, calc(-50% - .5px)) translateZ(0) scale(1, 1); }
+
+.noty_progressbar {
+  display: none; }
+
+.noty_has_timeout.noty_has_progressbar .noty_progressbar {
+  display: block;
+  position: absolute;
+  left: 0;
+  bottom: 0;
+  height: 3px;
+  width: 100%;
+  background-color: #646464;
+  opacity: 0.2;
+  filter: alpha(opacity=10); }
+
+.noty_bar {
+  -webkit-backface-visibility: hidden;
+  -webkit-transform: translate(0, 0) translateZ(0) scale(1, 1);
+  -ms-transform: translate(0, 0) scale(1, 1);
+      transform: translate(0, 0) scale(1, 1);
+  -webkit-font-smoothing: subpixel-antialiased;
+  overflow: hidden; }
+
+.noty_effects_open {
+  opacity: 0;
+  -webkit-transform: translate(50%);
+      -ms-transform: translate(50%);
+          transform: translate(50%);
+  -webkit-animation: noty_anim_in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
+          animation: noty_anim_in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
+  -webkit-animation-fill-mode: forwards;
+          animation-fill-mode: forwards; }
+
+.noty_effects_close {
+  -webkit-animation: noty_anim_out 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
+          animation: noty_anim_out 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
+  -webkit-animation-fill-mode: forwards;
+          animation-fill-mode: forwards; }
+
+.noty_fix_effects_height {
+  -webkit-animation: noty_anim_height 75ms ease-out;
+          animation: noty_anim_height 75ms ease-out; }
+
+.noty_close_with_click {
+  cursor: pointer; }
+
+.noty_close_button {
+  position: absolute;
+  top: 2px;
+  right: 2px;
+  font-weight: bold;
+  width: 20px;
+  height: 20px;
+  text-align: center;
+  line-height: 20px;
+  background-color: rgba(0, 0, 0, 0.05);
+  border-radius: 2px;
+  cursor: pointer;
+  -webkit-transition: all .2s ease-out;
+  transition: all .2s ease-out; }
+
+.noty_close_button:hover {
+  background-color: rgba(0, 0, 0, 0.1); }
+
+.noty_modal {
+  position: fixed;
+  width: 100%;
+  height: 100%;
+  background-color: #000;
+  z-index: 10000;
+  opacity: .3;
+  left: 0;
+  top: 0; }
+
+.noty_modal.noty_modal_open {
+  opacity: 0;
+  -webkit-animation: noty_modal_in .3s ease-out;
+          animation: noty_modal_in .3s ease-out; }
+
+.noty_modal.noty_modal_close {
+  -webkit-animation: noty_modal_out .3s ease-out;
+          animation: noty_modal_out .3s ease-out;
+  -webkit-animation-fill-mode: forwards;
+          animation-fill-mode: forwards; }
+
+@-webkit-keyframes noty_modal_in {
+  100% {
+    opacity: .3; } }
+
+@keyframes noty_modal_in {
+  100% {
+    opacity: .3; } }
+
+@-webkit-keyframes noty_modal_out {
+  100% {
+    opacity: 0; } }
+
+@keyframes noty_modal_out {
+  100% {
+    opacity: 0; } }
+
+@keyframes noty_modal_out {
+  100% {
+    opacity: 0; } }
+
+@-webkit-keyframes noty_anim_in {
+  100% {
+    -webkit-transform: translate(0);
+            transform: translate(0);
+    opacity: 1; } }
+
+@keyframes noty_anim_in {
+  100% {
+    -webkit-transform: translate(0);
+            transform: translate(0);
+    opacity: 1; } }
+
+@-webkit-keyframes noty_anim_out {
+  100% {
+    -webkit-transform: translate(50%);
+            transform: translate(50%);
+    opacity: 0; } }
+
+@keyframes noty_anim_out {
+  100% {
+    -webkit-transform: translate(50%);
+            transform: translate(50%);
+    opacity: 0; } }
+
+@-webkit-keyframes noty_anim_height {
+  100% {
+    height: 0; } }
+
+@keyframes noty_anim_height {
+  100% {
+    height: 0; } }
+
+/*# sourceMappingURL=noty.css.map*/

+ 3124 - 0
public/noty/noty.js

@@ -0,0 +1,3124 @@
+/* 
+  @package NOTY - Dependency-free notification library 
+  @version version: 3.2.0-beta 
+  @contributors https://github.com/needim/noty/graphs/contributors 
+  @documentation Examples and Documentation - https://ned.im/noty 
+  @license Licensed under the MIT licenses: http://www.opensource.org/licenses/mit-license.php 
+*/
+
+(function webpackUniversalModuleDefinition(root, factory) {
+	if(typeof exports === 'object' && typeof module === 'object')
+		module.exports = factory();
+	else if(typeof define === 'function' && define.amd)
+		define("Noty", [], factory);
+	else if(typeof exports === 'object')
+		exports["Noty"] = factory();
+	else
+		root["Noty"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ 	// The module cache
+/******/ 	var installedModules = {};
+/******/
+/******/ 	// The require function
+/******/ 	function __webpack_require__(moduleId) {
+/******/
+/******/ 		// Check if module is in cache
+/******/ 		if(installedModules[moduleId]) {
+/******/ 			return installedModules[moduleId].exports;
+/******/ 		}
+/******/ 		// Create a new module (and put it into the cache)
+/******/ 		var module = installedModules[moduleId] = {
+/******/ 			i: moduleId,
+/******/ 			l: false,
+/******/ 			exports: {}
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.l = true;
+/******/
+/******/ 		// Return the exports of the module
+/******/ 		return module.exports;
+/******/ 	}
+/******/
+/******/
+/******/ 	// expose the modules object (__webpack_modules__)
+/******/ 	__webpack_require__.m = modules;
+/******/
+/******/ 	// expose the module cache
+/******/ 	__webpack_require__.c = installedModules;
+/******/
+/******/ 	// identity function for calling harmony imports with the correct context
+/******/ 	__webpack_require__.i = function(value) { return value; };
+/******/
+/******/ 	// define getter function for harmony exports
+/******/ 	__webpack_require__.d = function(exports, name, getter) {
+/******/ 		if(!__webpack_require__.o(exports, name)) {
+/******/ 			Object.defineProperty(exports, name, {
+/******/ 				configurable: false,
+/******/ 				enumerable: true,
+/******/ 				get: getter
+/******/ 			});
+/******/ 		}
+/******/ 	};
+/******/
+/******/ 	// getDefaultExport function for compatibility with non-harmony modules
+/******/ 	__webpack_require__.n = function(module) {
+/******/ 		var getter = module && module.__esModule ?
+/******/ 			function getDefault() { return module['default']; } :
+/******/ 			function getModuleExports() { return module; };
+/******/ 		__webpack_require__.d(getter, 'a', getter);
+/******/ 		return getter;
+/******/ 	};
+/******/
+/******/ 	// Object.prototype.hasOwnProperty.call
+/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(__webpack_require__.s = 6);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.css = exports.deepExtend = exports.animationEndEvents = undefined;
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+exports.inArray = inArray;
+exports.stopPropagation = stopPropagation;
+exports.generateID = generateID;
+exports.outerHeight = outerHeight;
+exports.addListener = addListener;
+exports.hasClass = hasClass;
+exports.addClass = addClass;
+exports.removeClass = removeClass;
+exports.remove = remove;
+exports.classList = classList;
+exports.visibilityChangeFlow = visibilityChangeFlow;
+exports.createAudioElements = createAudioElements;
+
+var _api = __webpack_require__(1);
+
+var API = _interopRequireWildcard(_api);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+var animationEndEvents = exports.animationEndEvents = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
+
+function inArray(needle, haystack, argStrict) {
+  var key = void 0;
+  var strict = !!argStrict;
+
+  if (strict) {
+    for (key in haystack) {
+      if (haystack.hasOwnProperty(key) && haystack[key] === needle) {
+        return true;
+      }
+    }
+  } else {
+    for (key in haystack) {
+      if (haystack.hasOwnProperty(key) && haystack[key] === needle) {
+        return true;
+      }
+    }
+  }
+  return false;
+}
+
+function stopPropagation(evt) {
+  evt = evt || window.event;
+
+  if (typeof evt.stopPropagation !== 'undefined') {
+    evt.stopPropagation();
+  } else {
+    evt.cancelBubble = true;
+  }
+}
+
+var deepExtend = exports.deepExtend = function deepExtend(out) {
+  out = out || {};
+
+  for (var i = 1; i < arguments.length; i++) {
+    var obj = arguments[i];
+
+    if (!obj) continue;
+
+    for (var key in obj) {
+      if (obj.hasOwnProperty(key)) {
+        if (Array.isArray(obj[key])) {
+          out[key] = obj[key];
+        } else if (_typeof(obj[key]) === 'object' && obj[key] !== null) {
+          out[key] = deepExtend(out[key], obj[key]);
+        } else {
+          out[key] = obj[key];
+        }
+      }
+    }
+  }
+
+  return out;
+};
+
+function generateID() {
+  var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
+
+  var id = 'noty_' + prefix + '_';
+
+  id += 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+    var r = Math.random() * 16 | 0;
+    var v = c === 'x' ? r : r & 0x3 | 0x8;
+    return v.toString(16);
+  });
+
+  return id;
+}
+
+function outerHeight(el) {
+  var height = el.offsetHeight;
+  var style = window.getComputedStyle(el);
+
+  height += parseInt(style.marginTop) + parseInt(style.marginBottom);
+  return height;
+}
+
+var css = exports.css = function () {
+  var cssPrefixes = ['Webkit', 'O', 'Moz', 'ms'];
+  var cssProps = {};
+
+  function camelCase(string) {
+    return string.replace(/^-ms-/, 'ms-').replace(/-([\da-z])/gi, function (match, letter) {
+      return letter.toUpperCase();
+    });
+  }
+
+  function getVendorProp(name) {
+    var style = document.body.style;
+    if (name in style) return name;
+
+    var i = cssPrefixes.length;
+    var capName = name.charAt(0).toUpperCase() + name.slice(1);
+    var vendorName = void 0;
+
+    while (i--) {
+      vendorName = cssPrefixes[i] + capName;
+      if (vendorName in style) return vendorName;
+    }
+
+    return name;
+  }
+
+  function getStyleProp(name) {
+    name = camelCase(name);
+    return cssProps[name] || (cssProps[name] = getVendorProp(name));
+  }
+
+  function applyCss(element, prop, value) {
+    prop = getStyleProp(prop);
+    element.style[prop] = value;
+  }
+
+  return function (element, properties) {
+    var args = arguments;
+    var prop = void 0;
+    var value = void 0;
+
+    if (args.length === 2) {
+      for (prop in properties) {
+        if (properties.hasOwnProperty(prop)) {
+          value = properties[prop];
+          if (value !== undefined && properties.hasOwnProperty(prop)) {
+            applyCss(element, prop, value);
+          }
+        }
+      }
+    } else {
+      applyCss(element, args[1], args[2]);
+    }
+  };
+}();
+
+function addListener(el, events, cb) {
+  var useCapture = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
+
+  events = events.split(' ');
+  for (var i = 0; i < events.length; i++) {
+    if (document.addEventListener) {
+      el.addEventListener(events[i], cb, useCapture);
+    } else if (document.attachEvent) {
+      el.attachEvent('on' + events[i], cb);
+    }
+  }
+}
+
+function hasClass(element, name) {
+  var list = typeof element === 'string' ? element : classList(element);
+  return list.indexOf(' ' + name + ' ') >= 0;
+}
+
+function addClass(element, name) {
+  var oldList = classList(element);
+  var newList = oldList + name;
+
+  if (hasClass(oldList, name)) return;
+
+  // Trim the opening space.
+  element.className = newList.substring(1);
+}
+
+function removeClass(element, name) {
+  var oldList = classList(element);
+  var newList = void 0;
+
+  if (!hasClass(element, name)) return;
+
+  // Replace the class name.
+  newList = oldList.replace(' ' + name + ' ', ' ');
+
+  // Trim the opening and closing spaces.
+  element.className = newList.substring(1, newList.length - 1);
+}
+
+function remove(element) {
+  if (element.parentNode) {
+    element.parentNode.removeChild(element);
+  }
+}
+
+function classList(element) {
+  return (' ' + (element && element.className || '') + ' ').replace(/\s+/gi, ' ');
+}
+
+function visibilityChangeFlow() {
+  var hidden = void 0;
+  var visibilityChange = void 0;
+  if (typeof document.hidden !== 'undefined') {
+    // Opera 12.10 and Firefox 18 and later support
+    hidden = 'hidden';
+    visibilityChange = 'visibilitychange';
+  } else if (typeof document.msHidden !== 'undefined') {
+    hidden = 'msHidden';
+    visibilityChange = 'msvisibilitychange';
+  } else if (typeof document.webkitHidden !== 'undefined') {
+    hidden = 'webkitHidden';
+    visibilityChange = 'webkitvisibilitychange';
+  }
+
+  function onVisibilityChange() {
+    API.PageHidden = document[hidden];
+    handleVisibilityChange();
+  }
+
+  function onBlur() {
+    API.PageHidden = true;
+    handleVisibilityChange();
+  }
+
+  function onFocus() {
+    API.PageHidden = false;
+    handleVisibilityChange();
+  }
+
+  function handleVisibilityChange() {
+    if (API.PageHidden) stopAll();else resumeAll();
+  }
+
+  function stopAll() {
+    setTimeout(function () {
+      Object.keys(API.Store).forEach(function (id) {
+        if (API.Store.hasOwnProperty(id)) {
+          if (API.Store[id].options.visibilityControl) {
+            API.Store[id].stop();
+          }
+        }
+      });
+    }, 100);
+  }
+
+  function resumeAll() {
+    setTimeout(function () {
+      Object.keys(API.Store).forEach(function (id) {
+        if (API.Store.hasOwnProperty(id)) {
+          if (API.Store[id].options.visibilityControl) {
+            API.Store[id].resume();
+          }
+        }
+      });
+      API.queueRenderAll();
+    }, 100);
+  }
+
+  if (visibilityChange) {
+    addListener(document, visibilityChange, onVisibilityChange);
+  }
+
+  addListener(window, 'blur', onBlur);
+  addListener(window, 'focus', onFocus);
+}
+
+function createAudioElements(ref) {
+  if (ref.hasSound) {
+    var audioElement = document.createElement('audio');
+
+    ref.options.sounds.sources.forEach(function (s) {
+      var source = document.createElement('source');
+      source.src = s;
+      source.type = 'audio/' + getExtension(s);
+      audioElement.appendChild(source);
+    });
+
+    if (ref.barDom) {
+      ref.barDom.appendChild(audioElement);
+    } else {
+      document.querySelector('body').appendChild(audioElement);
+    }
+
+    audioElement.volume = ref.options.sounds.volume;
+
+    if (!ref.soundPlayed) {
+      audioElement.play();
+      ref.soundPlayed = true;
+    }
+
+    audioElement.onended = function () {
+      remove(audioElement);
+    };
+  }
+}
+
+function getExtension(fileName) {
+  return fileName.match(/\.([^.]+)$/)[1];
+}
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.Defaults = exports.Store = exports.Queues = exports.DefaultMaxVisible = exports.docTitle = exports.DocModalCount = exports.PageHidden = undefined;
+exports.getQueueCounts = getQueueCounts;
+exports.addToQueue = addToQueue;
+exports.removeFromQueue = removeFromQueue;
+exports.queueRender = queueRender;
+exports.queueRenderAll = queueRenderAll;
+exports.ghostFix = ghostFix;
+exports.build = build;
+exports.hasButtons = hasButtons;
+exports.handleModal = handleModal;
+exports.handleModalClose = handleModalClose;
+exports.queueClose = queueClose;
+exports.dequeueClose = dequeueClose;
+exports.fire = fire;
+exports.openFlow = openFlow;
+exports.closeFlow = closeFlow;
+
+var _utils = __webpack_require__(0);
+
+var Utils = _interopRequireWildcard(_utils);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+var PageHidden = exports.PageHidden = false;
+var DocModalCount = exports.DocModalCount = 0;
+
+var DocTitleProps = {
+  originalTitle: null,
+  count: 0,
+  changed: false,
+  timer: -1
+};
+
+var docTitle = exports.docTitle = {
+  increment: function increment() {
+    DocTitleProps.count++;
+
+    docTitle._update();
+  },
+
+  decrement: function decrement() {
+    DocTitleProps.count--;
+
+    if (DocTitleProps.count <= 0) {
+      docTitle._clear();
+      return;
+    }
+
+    docTitle._update();
+  },
+
+  _update: function _update() {
+    var title = document.title;
+
+    if (!DocTitleProps.changed) {
+      DocTitleProps.originalTitle = title;
+      document.title = '(' + DocTitleProps.count + ') ' + title;
+      DocTitleProps.changed = true;
+    } else {
+      document.title = '(' + DocTitleProps.count + ') ' + DocTitleProps.originalTitle;
+    }
+  },
+
+  _clear: function _clear() {
+    if (DocTitleProps.changed) {
+      DocTitleProps.count = 0;
+      document.title = DocTitleProps.originalTitle;
+      DocTitleProps.changed = false;
+    }
+  }
+};
+
+var DefaultMaxVisible = exports.DefaultMaxVisible = 5;
+
+var Queues = exports.Queues = {
+  global: {
+    maxVisible: DefaultMaxVisible,
+    queue: []
+  }
+};
+
+var Store = exports.Store = {};
+
+var Defaults = exports.Defaults = {
+  type: 'alert',
+  layout: 'topRight',
+  theme: 'mint',
+  text: '',
+  timeout: false,
+  progressBar: true,
+  closeWith: ['click'],
+  animation: {
+    open: 'noty_effects_open',
+    close: 'noty_effects_close'
+  },
+  id: false,
+  force: false,
+  killer: false,
+  queue: 'global',
+  container: false,
+  buttons: [],
+  callbacks: {
+    beforeShow: null,
+    onShow: null,
+    afterShow: null,
+    onClose: null,
+    afterClose: null,
+    onClick: null,
+    onHover: null,
+    onTemplate: null
+  },
+  sounds: {
+    sources: [],
+    volume: 1,
+    conditions: []
+  },
+  titleCount: {
+    conditions: []
+  },
+  modal: false,
+  visibilityControl: false
+
+  /**
+   * @param {string} queueName
+   * @return {object}
+   */
+};function getQueueCounts() {
+  var queueName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'global';
+
+  var count = 0;
+  var max = DefaultMaxVisible;
+
+  if (Queues.hasOwnProperty(queueName)) {
+    max = Queues[queueName].maxVisible;
+    Object.keys(Store).forEach(function (i) {
+      if (Store[i].options.queue === queueName && !Store[i].closed) count++;
+    });
+  }
+
+  return {
+    current: count,
+    maxVisible: max
+  };
+}
+
+/**
+ * @param {Noty} ref
+ * @return {void}
+ */
+function addToQueue(ref) {
+  if (!Queues.hasOwnProperty(ref.options.queue)) {
+    Queues[ref.options.queue] = { maxVisible: DefaultMaxVisible, queue: [] };
+  }
+
+  Queues[ref.options.queue].queue.push(ref);
+}
+
+/**
+ * @param {Noty} ref
+ * @return {void}
+ */
+function removeFromQueue(ref) {
+  if (Queues.hasOwnProperty(ref.options.queue)) {
+    var queue = [];
+    Object.keys(Queues[ref.options.queue].queue).forEach(function (i) {
+      if (Queues[ref.options.queue].queue[i].id !== ref.id) {
+        queue.push(Queues[ref.options.queue].queue[i]);
+      }
+    });
+    Queues[ref.options.queue].queue = queue;
+  }
+}
+
+/**
+ * @param {string} queueName
+ * @return {void}
+ */
+function queueRender() {
+  var queueName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'global';
+
+  if (Queues.hasOwnProperty(queueName)) {
+    var noty = Queues[queueName].queue.shift();
+
+    if (noty) noty.show();
+  }
+}
+
+/**
+ * @return {void}
+ */
+function queueRenderAll() {
+  Object.keys(Queues).forEach(function (queueName) {
+    queueRender(queueName);
+  });
+}
+
+/**
+ * @param {Noty} ref
+ * @return {void}
+ */
+function ghostFix(ref) {
+  var ghostID = Utils.generateID('ghost');
+  var ghost = document.createElement('div');
+  ghost.setAttribute('id', ghostID);
+  Utils.css(ghost, {
+    height: Utils.outerHeight(ref.barDom) + 'px'
+  });
+
+  ref.barDom.insertAdjacentHTML('afterend', ghost.outerHTML);
+
+  Utils.remove(ref.barDom);
+  ghost = document.getElementById(ghostID);
+  Utils.addClass(ghost, 'noty_fix_effects_height');
+  Utils.addListener(ghost, Utils.animationEndEvents, function () {
+    Utils.remove(ghost);
+  });
+}
+
+/**
+ * @param {Noty} ref
+ * @return {void}
+ */
+function build(ref) {
+  findOrCreateContainer(ref);
+
+  var markup = '<div class="noty_body">' + ref.options.text + '</div>' + buildButtons(ref) + '<div class="noty_progressbar"></div>';
+
+  ref.barDom = document.createElement('div');
+  ref.barDom.setAttribute('id', ref.id);
+  Utils.addClass(ref.barDom, 'noty_bar noty_type__' + ref.options.type + ' noty_theme__' + ref.options.theme);
+
+  ref.barDom.innerHTML = markup;
+
+  fire(ref, 'onTemplate');
+}
+
+/**
+ * @param {Noty} ref
+ * @return {boolean}
+ */
+function hasButtons(ref) {
+  return !!(ref.options.buttons && Object.keys(ref.options.buttons).length);
+}
+
+/**
+ * @param {Noty} ref
+ * @return {string}
+ */
+function buildButtons(ref) {
+  if (hasButtons(ref)) {
+    var buttons = document.createElement('div');
+    Utils.addClass(buttons, 'noty_buttons');
+
+    Object.keys(ref.options.buttons).forEach(function (key) {
+      buttons.appendChild(ref.options.buttons[key].dom);
+    });
+
+    ref.options.buttons.forEach(function (btn) {
+      buttons.appendChild(btn.dom);
+    });
+    return buttons.outerHTML;
+  }
+  return '';
+}
+
+/**
+ * @param {Noty} ref
+ * @return {void}
+ */
+function handleModal(ref) {
+  if (ref.options.modal) {
+    if (DocModalCount === 0) {
+      createModal(ref);
+    }
+
+    exports.DocModalCount = DocModalCount += 1;
+  }
+}
+
+/**
+ * @param {Noty} ref
+ * @return {void}
+ */
+function handleModalClose(ref) {
+  if (ref.options.modal && DocModalCount > 0) {
+    exports.DocModalCount = DocModalCount -= 1;
+
+    if (DocModalCount <= 0) {
+      var modal = document.querySelector('.noty_modal');
+
+      if (modal) {
+        Utils.removeClass(modal, 'noty_modal_open');
+        Utils.addClass(modal, 'noty_modal_close');
+        Utils.addListener(modal, Utils.animationEndEvents, function () {
+          Utils.remove(modal);
+        });
+      }
+    }
+  }
+}
+
+/**
+ * @return {void}
+ */
+function createModal() {
+  var body = document.querySelector('body');
+  var modal = document.createElement('div');
+  Utils.addClass(modal, 'noty_modal');
+  body.insertBefore(modal, body.firstChild);
+  Utils.addClass(modal, 'noty_modal_open');
+
+  Utils.addListener(modal, Utils.animationEndEvents, function () {
+    Utils.removeClass(modal, 'noty_modal_open');
+  });
+}
+
+/**
+ * @param {Noty} ref
+ * @return {void}
+ */
+function findOrCreateContainer(ref) {
+  if (ref.options.container) {
+    ref.layoutDom = document.querySelector(ref.options.container);
+    return;
+  }
+
+  var layoutID = 'noty_layout__' + ref.options.layout;
+  ref.layoutDom = document.querySelector('div#' + layoutID);
+
+  if (!ref.layoutDom) {
+    ref.layoutDom = document.createElement('div');
+    ref.layoutDom.setAttribute('id', layoutID);
+    ref.layoutDom.setAttribute('role', 'alert');
+    ref.layoutDom.setAttribute('aria-live', 'polite');
+    Utils.addClass(ref.layoutDom, 'noty_layout');
+    document.querySelector('body').appendChild(ref.layoutDom);
+  }
+}
+
+/**
+ * @param {Noty} ref
+ * @return {void}
+ */
+function queueClose(ref) {
+  if (ref.options.timeout) {
+    if (ref.options.progressBar && ref.progressDom) {
+      Utils.css(ref.progressDom, {
+        transition: 'width ' + ref.options.timeout + 'ms linear',
+        width: '0%'
+      });
+    }
+
+    clearTimeout(ref.closeTimer);
+
+    ref.closeTimer = setTimeout(function () {
+      ref.close();
+    }, ref.options.timeout);
+  }
+}
+
+/**
+ * @param {Noty} ref
+ * @return {void}
+ */
+function dequeueClose(ref) {
+  if (ref.options.timeout && ref.closeTimer) {
+    clearTimeout(ref.closeTimer);
+    ref.closeTimer = -1;
+
+    if (ref.options.progressBar && ref.progressDom) {
+      Utils.css(ref.progressDom, {
+        transition: 'width 0ms linear',
+        width: '100%'
+      });
+    }
+  }
+}
+
+/**
+ * @param {Noty} ref
+ * @param {string} eventName
+ * @return {void}
+ */
+function fire(ref, eventName) {
+  if (ref.listeners.hasOwnProperty(eventName)) {
+    ref.listeners[eventName].forEach(function (cb) {
+      if (typeof cb === 'function') {
+        cb.apply(ref);
+      }
+    });
+  }
+}
+
+/**
+ * @param {Noty} ref
+ * @return {void}
+ */
+function openFlow(ref) {
+  fire(ref, 'afterShow');
+  queueClose(ref);
+
+  Utils.addListener(ref.barDom, 'mouseenter', function () {
+    dequeueClose(ref);
+  });
+
+  Utils.addListener(ref.barDom, 'mouseleave', function () {
+    queueClose(ref);
+  });
+}
+
+/**
+ * @param {Noty} ref
+ * @return {void}
+ */
+function closeFlow(ref) {
+  delete Store[ref.id];
+  ref.closing = false;
+  fire(ref, 'afterClose');
+
+  Utils.remove(ref.barDom);
+
+  if (ref.layoutDom.querySelectorAll('.noty_bar').length === 0 && !ref.options.container) {
+    Utils.remove(ref.layoutDom);
+  }
+
+  if (Utils.inArray('docVisible', ref.options.titleCount.conditions) || Utils.inArray('docHidden', ref.options.titleCount.conditions)) {
+    docTitle.decrement();
+  }
+
+  queueRender(ref.options.queue);
+}
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.NotyButton = undefined;
+
+var _utils = __webpack_require__(0);
+
+var Utils = _interopRequireWildcard(_utils);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var NotyButton = exports.NotyButton = function NotyButton(html, classes, cb) {
+  var _this = this;
+
+  var attributes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
+
+  _classCallCheck(this, NotyButton);
+
+  this.dom = document.createElement('button');
+  this.dom.innerHTML = html;
+  this.id = attributes.id = attributes.id || Utils.generateID('button');
+  this.cb = cb;
+  Object.keys(attributes).forEach(function (propertyName) {
+    _this.dom.setAttribute(propertyName, attributes[propertyName]);
+  });
+  Utils.addClass(this.dom, classes || 'noty_btn');
+
+  return this;
+};
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Push = exports.Push = function () {
+  function Push() {
+    var workerPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/service-worker.js';
+
+    _classCallCheck(this, Push);
+
+    this.subData = {};
+    this.workerPath = workerPath;
+    this.listeners = {
+      onPermissionGranted: [],
+      onPermissionDenied: [],
+      onSubscriptionSuccess: [],
+      onSubscriptionCancel: [],
+      onWorkerError: [],
+      onWorkerSuccess: [],
+      onWorkerNotSupported: []
+    };
+    return this;
+  }
+
+  /**
+   * @param {string} eventName
+   * @param {function} cb
+   * @return {Push}
+   */
+
+
+  _createClass(Push, [{
+    key: 'on',
+    value: function on(eventName) {
+      var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
+
+      if (typeof cb === 'function' && this.listeners.hasOwnProperty(eventName)) {
+        this.listeners[eventName].push(cb);
+      }
+
+      return this;
+    }
+  }, {
+    key: 'fire',
+    value: function fire(eventName) {
+      var _this = this;
+
+      var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
+
+      if (this.listeners.hasOwnProperty(eventName)) {
+        this.listeners[eventName].forEach(function (cb) {
+          if (typeof cb === 'function') {
+            cb.apply(_this, params);
+          }
+        });
+      }
+    }
+  }, {
+    key: 'create',
+    value: function create() {
+      console.log('NOT IMPLEMENTED YET');
+    }
+
+    /**
+     * @return {boolean}
+     */
+
+  }, {
+    key: 'isSupported',
+    value: function isSupported() {
+      var result = false;
+
+      try {
+        result = window.Notification || window.webkitNotifications || navigator.mozNotification || window.external && window.external.msIsSiteMode() !== undefined;
+      } catch (e) {}
+
+      return result;
+    }
+
+    /**
+     * @return {string}
+     */
+
+  }, {
+    key: 'getPermissionStatus',
+    value: function getPermissionStatus() {
+      var perm = 'default';
+
+      if (window.Notification && window.Notification.permissionLevel) {
+        perm = window.Notification.permissionLevel;
+      } else if (window.webkitNotifications && window.webkitNotifications.checkPermission) {
+        switch (window.webkitNotifications.checkPermission()) {
+          case 1:
+            perm = 'default';
+            break;
+          case 0:
+            perm = 'granted';
+            break;
+          default:
+            perm = 'denied';
+        }
+      } else if (window.Notification && window.Notification.permission) {
+        perm = window.Notification.permission;
+      } else if (navigator.mozNotification) {
+        perm = 'granted';
+      } else if (window.external && window.external.msIsSiteMode() !== undefined) {
+        perm = window.external.msIsSiteMode() ? 'granted' : 'default';
+      }
+
+      return perm.toString().toLowerCase();
+    }
+
+    /**
+     * @return {string}
+     */
+
+  }, {
+    key: 'getEndpoint',
+    value: function getEndpoint(subscription) {
+      var endpoint = subscription.endpoint;
+      var subscriptionId = subscription.subscriptionId;
+
+      // fix for Chrome < 45
+      if (subscriptionId && endpoint.indexOf(subscriptionId) === -1) {
+        endpoint += '/' + subscriptionId;
+      }
+
+      return endpoint;
+    }
+
+    /**
+     * @return {boolean}
+     */
+
+  }, {
+    key: 'isSWRegistered',
+    value: function isSWRegistered() {
+      try {
+        return navigator.serviceWorker.controller.state === 'activated';
+      } catch (e) {
+        return false;
+      }
+    }
+
+    /**
+     * @return {void}
+     */
+
+  }, {
+    key: 'unregisterWorker',
+    value: function unregisterWorker() {
+      var self = this;
+      if ('serviceWorker' in navigator) {
+        navigator.serviceWorker.getRegistrations().then(function (registrations) {
+          var _iteratorNormalCompletion = true;
+          var _didIteratorError = false;
+          var _iteratorError = undefined;
+
+          try {
+            for (var _iterator = registrations[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+              var registration = _step.value;
+
+              registration.unregister();
+              self.fire('onSubscriptionCancel');
+            }
+          } catch (err) {
+            _didIteratorError = true;
+            _iteratorError = err;
+          } finally {
+            try {
+              if (!_iteratorNormalCompletion && _iterator.return) {
+                _iterator.return();
+              }
+            } finally {
+              if (_didIteratorError) {
+                throw _iteratorError;
+              }
+            }
+          }
+        });
+      }
+    }
+
+    /**
+     * @return {void}
+     */
+
+  }, {
+    key: 'requestSubscription',
+    value: function requestSubscription() {
+      var _this2 = this;
+
+      var userVisibleOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
+
+      var self = this;
+      var current = this.getPermissionStatus();
+      var cb = function cb(result) {
+        if (result === 'granted') {
+          _this2.fire('onPermissionGranted');
+
+          if ('serviceWorker' in navigator) {
+            navigator.serviceWorker.register(_this2.workerPath).then(function () {
+              navigator.serviceWorker.ready.then(function (serviceWorkerRegistration) {
+                self.fire('onWorkerSuccess');
+                serviceWorkerRegistration.pushManager.subscribe({
+                  userVisibleOnly: userVisibleOnly
+                }).then(function (subscription) {
+                  var key = subscription.getKey('p256dh');
+                  var token = subscription.getKey('auth');
+
+                  self.subData = {
+                    endpoint: self.getEndpoint(subscription),
+                    p256dh: key ? window.btoa(String.fromCharCode.apply(null, new Uint8Array(key))) : null,
+                    auth: token ? window.btoa(String.fromCharCode.apply(null, new Uint8Array(token))) : null
+                  };
+
+                  self.fire('onSubscriptionSuccess', [self.subData]);
+                }).catch(function (err) {
+                  self.fire('onWorkerError', [err]);
+                });
+              });
+            });
+          } else {
+            self.fire('onWorkerNotSupported');
+          }
+        } else if (result === 'denied') {
+          _this2.fire('onPermissionDenied');
+          _this2.unregisterWorker();
+        }
+      };
+
+      if (current === 'default') {
+        if (window.Notification && window.Notification.requestPermission) {
+          window.Notification.requestPermission(cb);
+        } else if (window.webkitNotifications && window.webkitNotifications.checkPermission) {
+          window.webkitNotifications.requestPermission(cb);
+        }
+      } else {
+        cb(current);
+      }
+    }
+  }]);
+
+  return Push;
+}();
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(process, global) {var require;/*!
+ * @overview es6-promise - a tiny implementation of Promises/A+.
+ * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
+ * @license   Licensed under MIT license
+ *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
+ * @version   4.1.1
+ */
+
+(function (global, factory) {
+	 true ? module.exports = factory() :
+	typeof define === 'function' && define.amd ? define(factory) :
+	(global.ES6Promise = factory());
+}(this, (function () { 'use strict';
+
+function objectOrFunction(x) {
+  var type = typeof x;
+  return x !== null && (type === 'object' || type === 'function');
+}
+
+function isFunction(x) {
+  return typeof x === 'function';
+}
+
+var _isArray = undefined;
+if (Array.isArray) {
+  _isArray = Array.isArray;
+} else {
+  _isArray = function (x) {
+    return Object.prototype.toString.call(x) === '[object Array]';
+  };
+}
+
+var isArray = _isArray;
+
+var len = 0;
+var vertxNext = undefined;
+var customSchedulerFn = undefined;
+
+var asap = function asap(callback, arg) {
+  queue[len] = callback;
+  queue[len + 1] = arg;
+  len += 2;
+  if (len === 2) {
+    // If len is 2, that means that we need to schedule an async flush.
+    // If additional callbacks are queued before the queue is flushed, they
+    // will be processed by this flush that we are scheduling.
+    if (customSchedulerFn) {
+      customSchedulerFn(flush);
+    } else {
+      scheduleFlush();
+    }
+  }
+};
+
+function setScheduler(scheduleFn) {
+  customSchedulerFn = scheduleFn;
+}
+
+function setAsap(asapFn) {
+  asap = asapFn;
+}
+
+var browserWindow = typeof window !== 'undefined' ? window : undefined;
+var browserGlobal = browserWindow || {};
+var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
+
+// test for web worker but not in IE10
+var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+  // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+  // see https://github.com/cujojs/when/issues/410 for details
+  return function () {
+    return process.nextTick(flush);
+  };
+}
+
+// vertx
+function useVertxTimer() {
+  if (typeof vertxNext !== 'undefined') {
+    return function () {
+      vertxNext(flush);
+    };
+  }
+
+  return useSetTimeout();
+}
+
+function useMutationObserver() {
+  var iterations = 0;
+  var observer = new BrowserMutationObserver(flush);
+  var node = document.createTextNode('');
+  observer.observe(node, { characterData: true });
+
+  return function () {
+    node.data = iterations = ++iterations % 2;
+  };
+}
+
+// web worker
+function useMessageChannel() {
+  var channel = new MessageChannel();
+  channel.port1.onmessage = flush;
+  return function () {
+    return channel.port2.postMessage(0);
+  };
+}
+
+function useSetTimeout() {
+  // Store setTimeout reference so es6-promise will be unaffected by
+  // other code modifying setTimeout (like sinon.useFakeTimers())
+  var globalSetTimeout = setTimeout;
+  return function () {
+    return globalSetTimeout(flush, 1);
+  };
+}
+
+var queue = new Array(1000);
+function flush() {
+  for (var i = 0; i < len; i += 2) {
+    var callback = queue[i];
+    var arg = queue[i + 1];
+
+    callback(arg);
+
+    queue[i] = undefined;
+    queue[i + 1] = undefined;
+  }
+
+  len = 0;
+}
+
+function attemptVertx() {
+  try {
+    var r = require;
+    var vertx = __webpack_require__(9);
+    vertxNext = vertx.runOnLoop || vertx.runOnContext;
+    return useVertxTimer();
+  } catch (e) {
+    return useSetTimeout();
+  }
+}
+
+var scheduleFlush = undefined;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+  scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+  scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+  scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && "function" === 'function') {
+  scheduleFlush = attemptVertx();
+} else {
+  scheduleFlush = useSetTimeout();
+}
+
+function then(onFulfillment, onRejection) {
+  var _arguments = arguments;
+
+  var parent = this;
+
+  var child = new this.constructor(noop);
+
+  if (child[PROMISE_ID] === undefined) {
+    makePromise(child);
+  }
+
+  var _state = parent._state;
+
+  if (_state) {
+    (function () {
+      var callback = _arguments[_state - 1];
+      asap(function () {
+        return invokeCallback(_state, child, callback, parent._result);
+      });
+    })();
+  } else {
+    subscribe(parent, child, onFulfillment, onRejection);
+  }
+
+  return child;
+}
+
+/**
+  `Promise.resolve` returns a promise that will become resolved with the
+  passed `value`. It is shorthand for the following:
+
+  ```javascript
+  let promise = new Promise(function(resolve, reject){
+    resolve(1);
+  });
+
+  promise.then(function(value){
+    // value === 1
+  });
+  ```
+
+  Instead of writing the above, your code now simply becomes the following:
+
+  ```javascript
+  let promise = Promise.resolve(1);
+
+  promise.then(function(value){
+    // value === 1
+  });
+  ```
+
+  @method resolve
+  @static
+  @param {Any} value value that the returned promise will be resolved with
+  Useful for tooling.
+  @return {Promise} a promise that will become fulfilled with the given
+  `value`
+*/
+function resolve$1(object) {
+  /*jshint validthis:true */
+  var Constructor = this;
+
+  if (object && typeof object === 'object' && object.constructor === Constructor) {
+    return object;
+  }
+
+  var promise = new Constructor(noop);
+  resolve(promise, object);
+  return promise;
+}
+
+var PROMISE_ID = Math.random().toString(36).substring(16);
+
+function noop() {}
+
+var PENDING = void 0;
+var FULFILLED = 1;
+var REJECTED = 2;
+
+var GET_THEN_ERROR = new ErrorObject();
+
+function selfFulfillment() {
+  return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+  return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+  try {
+    return promise.then;
+  } catch (error) {
+    GET_THEN_ERROR.error = error;
+    return GET_THEN_ERROR;
+  }
+}
+
+function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
+  try {
+    then$$1.call(value, fulfillmentHandler, rejectionHandler);
+  } catch (e) {
+    return e;
+  }
+}
+
+function handleForeignThenable(promise, thenable, then$$1) {
+  asap(function (promise) {
+    var sealed = false;
+    var error = tryThen(then$$1, thenable, function (value) {
+      if (sealed) {
+        return;
+      }
+      sealed = true;
+      if (thenable !== value) {
+        resolve(promise, value);
+      } else {
+        fulfill(promise, value);
+      }
+    }, function (reason) {
+      if (sealed) {
+        return;
+      }
+      sealed = true;
+
+      reject(promise, reason);
+    }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+    if (!sealed && error) {
+      sealed = true;
+      reject(promise, error);
+    }
+  }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+  if (thenable._state === FULFILLED) {
+    fulfill(promise, thenable._result);
+  } else if (thenable._state === REJECTED) {
+    reject(promise, thenable._result);
+  } else {
+    subscribe(thenable, undefined, function (value) {
+      return resolve(promise, value);
+    }, function (reason) {
+      return reject(promise, reason);
+    });
+  }
+}
+
+function handleMaybeThenable(promise, maybeThenable, then$$1) {
+  if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
+    handleOwnThenable(promise, maybeThenable);
+  } else {
+    if (then$$1 === GET_THEN_ERROR) {
+      reject(promise, GET_THEN_ERROR.error);
+      GET_THEN_ERROR.error = null;
+    } else if (then$$1 === undefined) {
+      fulfill(promise, maybeThenable);
+    } else if (isFunction(then$$1)) {
+      handleForeignThenable(promise, maybeThenable, then$$1);
+    } else {
+      fulfill(promise, maybeThenable);
+    }
+  }
+}
+
+function resolve(promise, value) {
+  if (promise === value) {
+    reject(promise, selfFulfillment());
+  } else if (objectOrFunction(value)) {
+    handleMaybeThenable(promise, value, getThen(value));
+  } else {
+    fulfill(promise, value);
+  }
+}
+
+function publishRejection(promise) {
+  if (promise._onerror) {
+    promise._onerror(promise._result);
+  }
+
+  publish(promise);
+}
+
+function fulfill(promise, value) {
+  if (promise._state !== PENDING) {
+    return;
+  }
+
+  promise._result = value;
+  promise._state = FULFILLED;
+
+  if (promise._subscribers.length !== 0) {
+    asap(publish, promise);
+  }
+}
+
+function reject(promise, reason) {
+  if (promise._state !== PENDING) {
+    return;
+  }
+  promise._state = REJECTED;
+  promise._result = reason;
+
+  asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+  var _subscribers = parent._subscribers;
+  var length = _subscribers.length;
+
+  parent._onerror = null;
+
+  _subscribers[length] = child;
+  _subscribers[length + FULFILLED] = onFulfillment;
+  _subscribers[length + REJECTED] = onRejection;
+
+  if (length === 0 && parent._state) {
+    asap(publish, parent);
+  }
+}
+
+function publish(promise) {
+  var subscribers = promise._subscribers;
+  var settled = promise._state;
+
+  if (subscribers.length === 0) {
+    return;
+  }
+
+  var child = undefined,
+      callback = undefined,
+      detail = promise._result;
+
+  for (var i = 0; i < subscribers.length; i += 3) {
+    child = subscribers[i];
+    callback = subscribers[i + settled];
+
+    if (child) {
+      invokeCallback(settled, child, callback, detail);
+    } else {
+      callback(detail);
+    }
+  }
+
+  promise._subscribers.length = 0;
+}
+
+function ErrorObject() {
+  this.error = null;
+}
+
+var TRY_CATCH_ERROR = new ErrorObject();
+
+function tryCatch(callback, detail) {
+  try {
+    return callback(detail);
+  } catch (e) {
+    TRY_CATCH_ERROR.error = e;
+    return TRY_CATCH_ERROR;
+  }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+  var hasCallback = isFunction(callback),
+      value = undefined,
+      error = undefined,
+      succeeded = undefined,
+      failed = undefined;
+
+  if (hasCallback) {
+    value = tryCatch(callback, detail);
+
+    if (value === TRY_CATCH_ERROR) {
+      failed = true;
+      error = value.error;
+      value.error = null;
+    } else {
+      succeeded = true;
+    }
+
+    if (promise === value) {
+      reject(promise, cannotReturnOwn());
+      return;
+    }
+  } else {
+    value = detail;
+    succeeded = true;
+  }
+
+  if (promise._state !== PENDING) {
+    // noop
+  } else if (hasCallback && succeeded) {
+      resolve(promise, value);
+    } else if (failed) {
+      reject(promise, error);
+    } else if (settled === FULFILLED) {
+      fulfill(promise, value);
+    } else if (settled === REJECTED) {
+      reject(promise, value);
+    }
+}
+
+function initializePromise(promise, resolver) {
+  try {
+    resolver(function resolvePromise(value) {
+      resolve(promise, value);
+    }, function rejectPromise(reason) {
+      reject(promise, reason);
+    });
+  } catch (e) {
+    reject(promise, e);
+  }
+}
+
+var id = 0;
+function nextId() {
+  return id++;
+}
+
+function makePromise(promise) {
+  promise[PROMISE_ID] = id++;
+  promise._state = undefined;
+  promise._result = undefined;
+  promise._subscribers = [];
+}
+
+function Enumerator$1(Constructor, input) {
+  this._instanceConstructor = Constructor;
+  this.promise = new Constructor(noop);
+
+  if (!this.promise[PROMISE_ID]) {
+    makePromise(this.promise);
+  }
+
+  if (isArray(input)) {
+    this.length = input.length;
+    this._remaining = input.length;
+
+    this._result = new Array(this.length);
+
+    if (this.length === 0) {
+      fulfill(this.promise, this._result);
+    } else {
+      this.length = this.length || 0;
+      this._enumerate(input);
+      if (this._remaining === 0) {
+        fulfill(this.promise, this._result);
+      }
+    }
+  } else {
+    reject(this.promise, validationError());
+  }
+}
+
+function validationError() {
+  return new Error('Array Methods must be provided an Array');
+}
+
+Enumerator$1.prototype._enumerate = function (input) {
+  for (var i = 0; this._state === PENDING && i < input.length; i++) {
+    this._eachEntry(input[i], i);
+  }
+};
+
+Enumerator$1.prototype._eachEntry = function (entry, i) {
+  var c = this._instanceConstructor;
+  var resolve$$1 = c.resolve;
+
+  if (resolve$$1 === resolve$1) {
+    var _then = getThen(entry);
+
+    if (_then === then && entry._state !== PENDING) {
+      this._settledAt(entry._state, i, entry._result);
+    } else if (typeof _then !== 'function') {
+      this._remaining--;
+      this._result[i] = entry;
+    } else if (c === Promise$2) {
+      var promise = new c(noop);
+      handleMaybeThenable(promise, entry, _then);
+      this._willSettleAt(promise, i);
+    } else {
+      this._willSettleAt(new c(function (resolve$$1) {
+        return resolve$$1(entry);
+      }), i);
+    }
+  } else {
+    this._willSettleAt(resolve$$1(entry), i);
+  }
+};
+
+Enumerator$1.prototype._settledAt = function (state, i, value) {
+  var promise = this.promise;
+
+  if (promise._state === PENDING) {
+    this._remaining--;
+
+    if (state === REJECTED) {
+      reject(promise, value);
+    } else {
+      this._result[i] = value;
+    }
+  }
+
+  if (this._remaining === 0) {
+    fulfill(promise, this._result);
+  }
+};
+
+Enumerator$1.prototype._willSettleAt = function (promise, i) {
+  var enumerator = this;
+
+  subscribe(promise, undefined, function (value) {
+    return enumerator._settledAt(FULFILLED, i, value);
+  }, function (reason) {
+    return enumerator._settledAt(REJECTED, i, reason);
+  });
+};
+
+/**
+  `Promise.all` accepts an array of promises, and returns a new promise which
+  is fulfilled with an array of fulfillment values for the passed promises, or
+  rejected with the reason of the first passed promise to be rejected. It casts all
+  elements of the passed iterable to promises as it runs this algorithm.
+
+  Example:
+
+  ```javascript
+  let promise1 = resolve(1);
+  let promise2 = resolve(2);
+  let promise3 = resolve(3);
+  let promises = [ promise1, promise2, promise3 ];
+
+  Promise.all(promises).then(function(array){
+    // The array here would be [ 1, 2, 3 ];
+  });
+  ```
+
+  If any of the `promises` given to `all` are rejected, the first promise
+  that is rejected will be given as an argument to the returned promises's
+  rejection handler. For example:
+
+  Example:
+
+  ```javascript
+  let promise1 = resolve(1);
+  let promise2 = reject(new Error("2"));
+  let promise3 = reject(new Error("3"));
+  let promises = [ promise1, promise2, promise3 ];
+
+  Promise.all(promises).then(function(array){
+    // Code here never runs because there are rejected promises!
+  }, function(error) {
+    // error.message === "2"
+  });
+  ```
+
+  @method all
+  @static
+  @param {Array} entries array of promises
+  @param {String} label optional string for labeling the promise.
+  Useful for tooling.
+  @return {Promise} promise that is fulfilled when all `promises` have been
+  fulfilled, or rejected if any of them become rejected.
+  @static
+*/
+function all$1(entries) {
+  return new Enumerator$1(this, entries).promise;
+}
+
+/**
+  `Promise.race` returns a new promise which is settled in the same way as the
+  first passed promise to settle.
+
+  Example:
+
+  ```javascript
+  let promise1 = new Promise(function(resolve, reject){
+    setTimeout(function(){
+      resolve('promise 1');
+    }, 200);
+  });
+
+  let promise2 = new Promise(function(resolve, reject){
+    setTimeout(function(){
+      resolve('promise 2');
+    }, 100);
+  });
+
+  Promise.race([promise1, promise2]).then(function(result){
+    // result === 'promise 2' because it was resolved before promise1
+    // was resolved.
+  });
+  ```
+
+  `Promise.race` is deterministic in that only the state of the first
+  settled promise matters. For example, even if other promises given to the
+  `promises` array argument are resolved, but the first settled promise has
+  become rejected before the other promises became fulfilled, the returned
+  promise will become rejected:
+
+  ```javascript
+  let promise1 = new Promise(function(resolve, reject){
+    setTimeout(function(){
+      resolve('promise 1');
+    }, 200);
+  });
+
+  let promise2 = new Promise(function(resolve, reject){
+    setTimeout(function(){
+      reject(new Error('promise 2'));
+    }, 100);
+  });
+
+  Promise.race([promise1, promise2]).then(function(result){
+    // Code here never runs
+  }, function(reason){
+    // reason.message === 'promise 2' because promise 2 became rejected before
+    // promise 1 became fulfilled
+  });
+  ```
+
+  An example real-world use case is implementing timeouts:
+
+  ```javascript
+  Promise.race([ajax('foo.json'), timeout(5000)])
+  ```
+
+  @method race
+  @static
+  @param {Array} promises array of promises to observe
+  Useful for tooling.
+  @return {Promise} a promise which settles in the same way as the first passed
+  promise to settle.
+*/
+function race$1(entries) {
+  /*jshint validthis:true */
+  var Constructor = this;
+
+  if (!isArray(entries)) {
+    return new Constructor(function (_, reject) {
+      return reject(new TypeError('You must pass an array to race.'));
+    });
+  } else {
+    return new Constructor(function (resolve, reject) {
+      var length = entries.length;
+      for (var i = 0; i < length; i++) {
+        Constructor.resolve(entries[i]).then(resolve, reject);
+      }
+    });
+  }
+}
+
+/**
+  `Promise.reject` returns a promise rejected with the passed `reason`.
+  It is shorthand for the following:
+
+  ```javascript
+  let promise = new Promise(function(resolve, reject){
+    reject(new Error('WHOOPS'));
+  });
+
+  promise.then(function(value){
+    // Code here doesn't run because the promise is rejected!
+  }, function(reason){
+    // reason.message === 'WHOOPS'
+  });
+  ```
+
+  Instead of writing the above, your code now simply becomes the following:
+
+  ```javascript
+  let promise = Promise.reject(new Error('WHOOPS'));
+
+  promise.then(function(value){
+    // Code here doesn't run because the promise is rejected!
+  }, function(reason){
+    // reason.message === 'WHOOPS'
+  });
+  ```
+
+  @method reject
+  @static
+  @param {Any} reason value that the returned promise will be rejected with.
+  Useful for tooling.
+  @return {Promise} a promise rejected with the given `reason`.
+*/
+function reject$1(reason) {
+  /*jshint validthis:true */
+  var Constructor = this;
+  var promise = new Constructor(noop);
+  reject(promise, reason);
+  return promise;
+}
+
+function needsResolver() {
+  throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+}
+
+function needsNew() {
+  throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+/**
+  Promise objects represent the eventual result of an asynchronous operation. The
+  primary way of interacting with a promise is through its `then` method, which
+  registers callbacks to receive either a promise's eventual value or the reason
+  why the promise cannot be fulfilled.
+
+  Terminology
+  -----------
+
+  - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+  - `thenable` is an object or function that defines a `then` method.
+  - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+  - `exception` is a value that is thrown using the throw statement.
+  - `reason` is a value that indicates why a promise was rejected.
+  - `settled` the final resting state of a promise, fulfilled or rejected.
+
+  A promise can be in one of three states: pending, fulfilled, or rejected.
+
+  Promises that are fulfilled have a fulfillment value and are in the fulfilled
+  state.  Promises that are rejected have a rejection reason and are in the
+  rejected state.  A fulfillment value is never a thenable.
+
+  Promises can also be said to *resolve* a value.  If this value is also a
+  promise, then the original promise's settled state will match the value's
+  settled state.  So a promise that *resolves* a promise that rejects will
+  itself reject, and a promise that *resolves* a promise that fulfills will
+  itself fulfill.
+
+
+  Basic Usage:
+  ------------
+
+  ```js
+  let promise = new Promise(function(resolve, reject) {
+    // on success
+    resolve(value);
+
+    // on failure
+    reject(reason);
+  });
+
+  promise.then(function(value) {
+    // on fulfillment
+  }, function(reason) {
+    // on rejection
+  });
+  ```
+
+  Advanced Usage:
+  ---------------
+
+  Promises shine when abstracting away asynchronous interactions such as
+  `XMLHttpRequest`s.
+
+  ```js
+  function getJSON(url) {
+    return new Promise(function(resolve, reject){
+      let xhr = new XMLHttpRequest();
+
+      xhr.open('GET', url);
+      xhr.onreadystatechange = handler;
+      xhr.responseType = 'json';
+      xhr.setRequestHeader('Accept', 'application/json');
+      xhr.send();
+
+      function handler() {
+        if (this.readyState === this.DONE) {
+          if (this.status === 200) {
+            resolve(this.response);
+          } else {
+            reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+          }
+        }
+      };
+    });
+  }
+
+  getJSON('/posts.json').then(function(json) {
+    // on fulfillment
+  }, function(reason) {
+    // on rejection
+  });
+  ```
+
+  Unlike callbacks, promises are great composable primitives.
+
+  ```js
+  Promise.all([
+    getJSON('/posts'),
+    getJSON('/comments')
+  ]).then(function(values){
+    values[0] // => postsJSON
+    values[1] // => commentsJSON
+
+    return values;
+  });
+  ```
+
+  @class Promise
+  @param {function} resolver
+  Useful for tooling.
+  @constructor
+*/
+function Promise$2(resolver) {
+  this[PROMISE_ID] = nextId();
+  this._result = this._state = undefined;
+  this._subscribers = [];
+
+  if (noop !== resolver) {
+    typeof resolver !== 'function' && needsResolver();
+    this instanceof Promise$2 ? initializePromise(this, resolver) : needsNew();
+  }
+}
+
+Promise$2.all = all$1;
+Promise$2.race = race$1;
+Promise$2.resolve = resolve$1;
+Promise$2.reject = reject$1;
+Promise$2._setScheduler = setScheduler;
+Promise$2._setAsap = setAsap;
+Promise$2._asap = asap;
+
+Promise$2.prototype = {
+  constructor: Promise$2,
+
+  /**
+    The primary way of interacting with a promise is through its `then` method,
+    which registers callbacks to receive either a promise's eventual value or the
+    reason why the promise cannot be fulfilled.
+  
+    ```js
+    findUser().then(function(user){
+      // user is available
+    }, function(reason){
+      // user is unavailable, and you are given the reason why
+    });
+    ```
+  
+    Chaining
+    --------
+  
+    The return value of `then` is itself a promise.  This second, 'downstream'
+    promise is resolved with the return value of the first promise's fulfillment
+    or rejection handler, or rejected if the handler throws an exception.
+  
+    ```js
+    findUser().then(function (user) {
+      return user.name;
+    }, function (reason) {
+      return 'default name';
+    }).then(function (userName) {
+      // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+      // will be `'default name'`
+    });
+  
+    findUser().then(function (user) {
+      throw new Error('Found user, but still unhappy');
+    }, function (reason) {
+      throw new Error('`findUser` rejected and we're unhappy');
+    }).then(function (value) {
+      // never reached
+    }, function (reason) {
+      // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+      // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+    });
+    ```
+    If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+  
+    ```js
+    findUser().then(function (user) {
+      throw new PedagogicalException('Upstream error');
+    }).then(function (value) {
+      // never reached
+    }).then(function (value) {
+      // never reached
+    }, function (reason) {
+      // The `PedgagocialException` is propagated all the way down to here
+    });
+    ```
+  
+    Assimilation
+    ------------
+  
+    Sometimes the value you want to propagate to a downstream promise can only be
+    retrieved asynchronously. This can be achieved by returning a promise in the
+    fulfillment or rejection handler. The downstream promise will then be pending
+    until the returned promise is settled. This is called *assimilation*.
+  
+    ```js
+    findUser().then(function (user) {
+      return findCommentsByAuthor(user);
+    }).then(function (comments) {
+      // The user's comments are now available
+    });
+    ```
+  
+    If the assimliated promise rejects, then the downstream promise will also reject.
+  
+    ```js
+    findUser().then(function (user) {
+      return findCommentsByAuthor(user);
+    }).then(function (comments) {
+      // If `findCommentsByAuthor` fulfills, we'll have the value here
+    }, function (reason) {
+      // If `findCommentsByAuthor` rejects, we'll have the reason here
+    });
+    ```
+  
+    Simple Example
+    --------------
+  
+    Synchronous Example
+  
+    ```javascript
+    let result;
+  
+    try {
+      result = findResult();
+      // success
+    } catch(reason) {
+      // failure
+    }
+    ```
+  
+    Errback Example
+  
+    ```js
+    findResult(function(result, err){
+      if (err) {
+        // failure
+      } else {
+        // success
+      }
+    });
+    ```
+  
+    Promise Example;
+  
+    ```javascript
+    findResult().then(function(result){
+      // success
+    }, function(reason){
+      // failure
+    });
+    ```
+  
+    Advanced Example
+    --------------
+  
+    Synchronous Example
+  
+    ```javascript
+    let author, books;
+  
+    try {
+      author = findAuthor();
+      books  = findBooksByAuthor(author);
+      // success
+    } catch(reason) {
+      // failure
+    }
+    ```
+  
+    Errback Example
+  
+    ```js
+  
+    function foundBooks(books) {
+  
+    }
+  
+    function failure(reason) {
+  
+    }
+  
+    findAuthor(function(author, err){
+      if (err) {
+        failure(err);
+        // failure
+      } else {
+        try {
+          findBoooksByAuthor(author, function(books, err) {
+            if (err) {
+              failure(err);
+            } else {
+              try {
+                foundBooks(books);
+              } catch(reason) {
+                failure(reason);
+              }
+            }
+          });
+        } catch(error) {
+          failure(err);
+        }
+        // success
+      }
+    });
+    ```
+  
+    Promise Example;
+  
+    ```javascript
+    findAuthor().
+      then(findBooksByAuthor).
+      then(function(books){
+        // found books
+    }).catch(function(reason){
+      // something went wrong
+    });
+    ```
+  
+    @method then
+    @param {Function} onFulfilled
+    @param {Function} onRejected
+    Useful for tooling.
+    @return {Promise}
+  */
+  then: then,
+
+  /**
+    `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+    as the catch block of a try/catch statement.
+  
+    ```js
+    function findAuthor(){
+      throw new Error('couldn't find that author');
+    }
+  
+    // synchronous
+    try {
+      findAuthor();
+    } catch(reason) {
+      // something went wrong
+    }
+  
+    // async with promises
+    findAuthor().catch(function(reason){
+      // something went wrong
+    });
+    ```
+  
+    @method catch
+    @param {Function} onRejection
+    Useful for tooling.
+    @return {Promise}
+  */
+  'catch': function _catch(onRejection) {
+    return this.then(null, onRejection);
+  }
+};
+
+/*global self*/
+function polyfill$1() {
+    var local = undefined;
+
+    if (typeof global !== 'undefined') {
+        local = global;
+    } else if (typeof self !== 'undefined') {
+        local = self;
+    } else {
+        try {
+            local = Function('return this')();
+        } catch (e) {
+            throw new Error('polyfill failed because global object is unavailable in this environment');
+        }
+    }
+
+    var P = local.Promise;
+
+    if (P) {
+        var promiseToString = null;
+        try {
+            promiseToString = Object.prototype.toString.call(P.resolve());
+        } catch (e) {
+            // silently ignored
+        }
+
+        if (promiseToString === '[object Promise]' && !P.cast) {
+            return;
+        }
+    }
+
+    local.Promise = Promise$2;
+}
+
+// Strange compat..
+Promise$2.polyfill = polyfill$1;
+Promise$2.Promise = Promise$2;
+
+return Promise$2;
+
+})));
+
+//# sourceMappingURL=es6-promise.map
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7), __webpack_require__(8)))
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports) {
+
+// removed by extract-text-webpack-plugin
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /* global VERSION */
+
+__webpack_require__(5);
+
+var _es6Promise = __webpack_require__(4);
+
+var _es6Promise2 = _interopRequireDefault(_es6Promise);
+
+var _utils = __webpack_require__(0);
+
+var Utils = _interopRequireWildcard(_utils);
+
+var _api = __webpack_require__(1);
+
+var API = _interopRequireWildcard(_api);
+
+var _button = __webpack_require__(2);
+
+var _push = __webpack_require__(3);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Noty = function () {
+  /**
+   * @param {object} options
+   * @return {Noty}
+   */
+  function Noty() {
+    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+    _classCallCheck(this, Noty);
+
+    this.options = Utils.deepExtend({}, API.Defaults, options);
+
+    if (API.Store[this.options.id]) {
+      return API.Store[this.options.id];
+    }
+
+    this.id = this.options.id || Utils.generateID('bar');
+    this.closeTimer = -1;
+    this.barDom = null;
+    this.layoutDom = null;
+    this.progressDom = null;
+    this.showing = false;
+    this.shown = false;
+    this.closed = false;
+    this.closing = false;
+    this.killable = this.options.timeout || this.options.closeWith.length > 0;
+    this.hasSound = this.options.sounds.sources.length > 0;
+    this.soundPlayed = false;
+    this.listeners = {
+      beforeShow: [],
+      onShow: [],
+      afterShow: [],
+      onClose: [],
+      afterClose: [],
+      onClick: [],
+      onHover: [],
+      onTemplate: []
+    };
+    this.promises = {
+      show: null,
+      close: null
+    };
+    this.on('beforeShow', this.options.callbacks.beforeShow);
+    this.on('onShow', this.options.callbacks.onShow);
+    this.on('afterShow', this.options.callbacks.afterShow);
+    this.on('onClose', this.options.callbacks.onClose);
+    this.on('afterClose', this.options.callbacks.afterClose);
+    this.on('onClick', this.options.callbacks.onClick);
+    this.on('onHover', this.options.callbacks.onHover);
+    this.on('onTemplate', this.options.callbacks.onTemplate);
+
+    return this;
+  }
+
+  /**
+   * @param {string} eventName
+   * @param {function} cb
+   * @return {Noty}
+   */
+
+
+  _createClass(Noty, [{
+    key: 'on',
+    value: function on(eventName) {
+      var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
+
+      if (typeof cb === 'function' && this.listeners.hasOwnProperty(eventName)) {
+        this.listeners[eventName].push(cb);
+      }
+
+      return this;
+    }
+
+    /**
+     * @return {Noty}
+     */
+
+  }, {
+    key: 'show',
+    value: function show() {
+      var _this = this;
+
+      if (this.showing || this.shown) {
+        return this; // preventing multiple show
+      }
+
+      if (this.options.killer === true) {
+        Noty.closeAll();
+      } else if (typeof this.options.killer === 'string') {
+        Noty.closeAll(this.options.killer);
+      }
+
+      var queueCounts = API.getQueueCounts(this.options.queue);
+
+      if (queueCounts.current >= queueCounts.maxVisible || API.PageHidden && this.options.visibilityControl) {
+        API.addToQueue(this);
+
+        if (API.PageHidden && this.hasSound && Utils.inArray('docHidden', this.options.sounds.conditions)) {
+          Utils.createAudioElements(this);
+        }
+
+        if (API.PageHidden && Utils.inArray('docHidden', this.options.titleCount.conditions)) {
+          API.docTitle.increment();
+        }
+
+        return this;
+      }
+
+      API.Store[this.id] = this;
+
+      API.fire(this, 'beforeShow');
+
+      this.showing = true;
+
+      if (this.closing) {
+        this.showing = false;
+        return this;
+      }
+
+      API.build(this);
+      API.handleModal(this);
+
+      if (this.options.force) {
+        this.layoutDom.insertBefore(this.barDom, this.layoutDom.firstChild);
+      } else {
+        this.layoutDom.appendChild(this.barDom);
+      }
+
+      if (this.hasSound && !this.soundPlayed && Utils.inArray('docVisible', this.options.sounds.conditions)) {
+        Utils.createAudioElements(this);
+      }
+
+      if (Utils.inArray('docVisible', this.options.titleCount.conditions)) {
+        API.docTitle.increment();
+      }
+
+      this.shown = true;
+      this.closed = false;
+
+      // bind button events if any
+      if (API.hasButtons(this)) {
+        Object.keys(this.options.buttons).forEach(function (key) {
+          var btn = _this.barDom.querySelector('#' + _this.options.buttons[key].id);
+          Utils.addListener(btn, 'click', function (e) {
+            Utils.stopPropagation(e);
+            _this.options.buttons[key].cb(_this);
+          });
+        });
+      }
+
+      this.progressDom = this.barDom.querySelector('.noty_progressbar');
+
+      if (Utils.inArray('click', this.options.closeWith)) {
+        Utils.addClass(this.barDom, 'noty_close_with_click');
+        Utils.addListener(this.barDom, 'click', function (e) {
+          Utils.stopPropagation(e);
+          API.fire(_this, 'onClick');
+          _this.close();
+        }, false);
+      }
+
+      Utils.addListener(this.barDom, 'mouseenter', function () {
+        API.fire(_this, 'onHover');
+      }, false);
+
+      if (this.options.timeout) Utils.addClass(this.barDom, 'noty_has_timeout');
+      if (this.options.progressBar) {
+        Utils.addClass(this.barDom, 'noty_has_progressbar');
+      }
+
+      if (Utils.inArray('button', this.options.closeWith)) {
+        Utils.addClass(this.barDom, 'noty_close_with_button');
+
+        var closeButton = document.createElement('div');
+        Utils.addClass(closeButton, 'noty_close_button');
+        closeButton.innerHTML = '×';
+        this.barDom.appendChild(closeButton);
+
+        Utils.addListener(closeButton, 'click', function (e) {
+          Utils.stopPropagation(e);
+          _this.close();
+        }, false);
+      }
+
+      API.fire(this, 'onShow');
+
+      if (this.options.animation.open === null) {
+        this.promises.show = new _es6Promise2.default(function (resolve) {
+          resolve();
+        });
+      } else if (typeof this.options.animation.open === 'function') {
+        this.promises.show = new _es6Promise2.default(this.options.animation.open.bind(this));
+      } else {
+        Utils.addClass(this.barDom, this.options.animation.open);
+        this.promises.show = new _es6Promise2.default(function (resolve) {
+          Utils.addListener(_this.barDom, Utils.animationEndEvents, function () {
+            Utils.removeClass(_this.barDom, _this.options.animation.open);
+            resolve();
+          });
+        });
+      }
+
+      this.promises.show.then(function () {
+        var _t = _this;
+        setTimeout(function () {
+          API.openFlow(_t);
+        }, 100);
+      });
+
+      return this;
+    }
+
+    /**
+     * @return {Noty}
+     */
+
+  }, {
+    key: 'stop',
+    value: function stop() {
+      API.dequeueClose(this);
+      return this;
+    }
+
+    /**
+     * @return {Noty}
+     */
+
+  }, {
+    key: 'resume',
+    value: function resume() {
+      API.queueClose(this);
+      return this;
+    }
+
+    /**
+     * @param {int|boolean} ms
+     * @return {Noty}
+     */
+
+  }, {
+    key: 'setTimeout',
+    value: function (_setTimeout) {
+      function setTimeout(_x) {
+        return _setTimeout.apply(this, arguments);
+      }
+
+      setTimeout.toString = function () {
+        return _setTimeout.toString();
+      };
+
+      return setTimeout;
+    }(function (ms) {
+      this.stop();
+      this.options.timeout = ms;
+
+      if (this.barDom) {
+        if (this.options.timeout) {
+          Utils.addClass(this.barDom, 'noty_has_timeout');
+        } else {
+          Utils.removeClass(this.barDom, 'noty_has_timeout');
+        }
+
+        var _t = this;
+        setTimeout(function () {
+          // ugly fix for progressbar display bug
+          _t.resume();
+        }, 100);
+      }
+
+      return this;
+    })
+
+    /**
+     * @param {string} html
+     * @param {boolean} optionsOverride
+     * @return {Noty}
+     */
+
+  }, {
+    key: 'setText',
+    value: function setText(html) {
+      var optionsOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+      if (this.barDom) {
+        this.barDom.querySelector('.noty_body').innerHTML = html;
+      }
+
+      if (optionsOverride) this.options.text = html;
+
+      return this;
+    }
+
+    /**
+     * @param {string} type
+     * @param {boolean} optionsOverride
+     * @return {Noty}
+     */
+
+  }, {
+    key: 'setType',
+    value: function setType(type) {
+      var _this2 = this;
+
+      var optionsOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+      if (this.barDom) {
+        var classList = Utils.classList(this.barDom).split(' ');
+
+        classList.forEach(function (c) {
+          if (c.substring(0, 11) === 'noty_type__') {
+            Utils.removeClass(_this2.barDom, c);
+          }
+        });
+
+        Utils.addClass(this.barDom, 'noty_type__' + type);
+      }
+
+      if (optionsOverride) this.options.type = type;
+
+      return this;
+    }
+
+    /**
+     * @param {string} theme
+     * @param {boolean} optionsOverride
+     * @return {Noty}
+     */
+
+  }, {
+    key: 'setTheme',
+    value: function setTheme(theme) {
+      var _this3 = this;
+
+      var optionsOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+      if (this.barDom) {
+        var classList = Utils.classList(this.barDom).split(' ');
+
+        classList.forEach(function (c) {
+          if (c.substring(0, 12) === 'noty_theme__') {
+            Utils.removeClass(_this3.barDom, c);
+          }
+        });
+
+        Utils.addClass(this.barDom, 'noty_theme__' + theme);
+      }
+
+      if (optionsOverride) this.options.theme = theme;
+
+      return this;
+    }
+
+    /**
+     * @return {Noty}
+     */
+
+  }, {
+    key: 'close',
+    value: function close() {
+      var _this4 = this;
+
+      if (this.closed) return this;
+
+      if (!this.shown) {
+        // it's in the queue
+        API.removeFromQueue(this);
+        return this;
+      }
+
+      API.fire(this, 'onClose');
+
+      this.closing = true;
+
+      if (this.options.animation.close === null || this.options.animation.close === false) {
+        this.promises.close = new _es6Promise2.default(function (resolve) {
+          resolve();
+        });
+      } else if (typeof this.options.animation.close === 'function') {
+        this.promises.close = new _es6Promise2.default(this.options.animation.close.bind(this));
+      } else {
+        Utils.addClass(this.barDom, this.options.animation.close);
+        this.promises.close = new _es6Promise2.default(function (resolve) {
+          Utils.addListener(_this4.barDom, Utils.animationEndEvents, function () {
+            if (_this4.options.force) {
+              Utils.remove(_this4.barDom);
+            } else {
+              API.ghostFix(_this4);
+            }
+            resolve();
+          });
+        });
+      }
+
+      this.promises.close.then(function () {
+        API.closeFlow(_this4);
+        API.handleModalClose(_this4);
+      });
+
+      this.closed = true;
+
+      return this;
+    }
+
+    // API functions
+
+    /**
+     * @param {boolean|string} queueName
+     * @return {Noty}
+     */
+
+  }], [{
+    key: 'closeAll',
+    value: function closeAll() {
+      var queueName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+
+      Object.keys(API.Store).forEach(function (id) {
+        if (queueName) {
+          if (API.Store[id].options.queue === queueName && API.Store[id].killable) {
+            API.Store[id].close();
+          }
+        } else if (API.Store[id].killable) {
+          API.Store[id].close();
+        }
+      });
+      return this;
+    }
+
+    /**
+     * @param {string} queueName
+     * @return {Noty}
+     */
+
+  }, {
+    key: 'clearQueue',
+    value: function clearQueue() {
+      var queueName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'global';
+
+      if (API.Queues.hasOwnProperty(queueName)) {
+        API.Queues[queueName].queue = [];
+      }
+      return this;
+    }
+
+    /**
+     * @return {API.Queues}
+     */
+
+  }, {
+    key: 'overrideDefaults',
+
+
+    /**
+     * @param {Object} obj
+     * @return {Noty}
+     */
+    value: function overrideDefaults(obj) {
+      API.Defaults = Utils.deepExtend({}, API.Defaults, obj);
+      return this;
+    }
+
+    /**
+     * @param {int} amount
+     * @param {string} queueName
+     * @return {Noty}
+     */
+
+  }, {
+    key: 'setMaxVisible',
+    value: function setMaxVisible() {
+      var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : API.DefaultMaxVisible;
+      var queueName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'global';
+
+      if (!API.Queues.hasOwnProperty(queueName)) {
+        API.Queues[queueName] = { maxVisible: amount, queue: [] };
+      }
+
+      API.Queues[queueName].maxVisible = amount;
+      return this;
+    }
+
+    /**
+     * @param {string} innerHtml
+     * @param {String} classes
+     * @param {Function} cb
+     * @param {Object} attributes
+     * @return {NotyButton}
+     */
+
+  }, {
+    key: 'button',
+    value: function button(innerHtml) {
+      var classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
+      var cb = arguments[2];
+      var attributes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
+
+      return new _button.NotyButton(innerHtml, classes, cb, attributes);
+    }
+
+    /**
+     * @return {string}
+     */
+
+  }, {
+    key: 'version',
+    value: function version() {
+      return "3.2.0-beta";
+    }
+
+    /**
+     * @param {String} workerPath
+     * @return {Push}
+     */
+
+  }, {
+    key: 'Push',
+    value: function Push(workerPath) {
+      return new _push.Push(workerPath);
+    }
+  }, {
+    key: 'Queues',
+    get: function get() {
+      return API.Queues;
+    }
+
+    /**
+     * @return {API.PageHidden}
+     */
+
+  }, {
+    key: 'PageHidden',
+    get: function get() {
+      return API.PageHidden;
+    }
+  }]);
+
+  return Noty;
+}();
+
+// Document visibility change controller
+
+
+exports.default = Noty;
+if (typeof window !== 'undefined') {
+  Utils.visibilityChangeFlow();
+}
+module.exports = exports['default'];
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports) {
+
+// shim for using process in browser
+var process = module.exports = {};
+
+// cached from whatever global is present so that test runners that stub it
+// don't break things.  But we need to wrap it in a try catch in case it is
+// wrapped in strict mode code which doesn't define any globals.  It's inside a
+// function because try/catches deoptimize in certain engines.
+
+var cachedSetTimeout;
+var cachedClearTimeout;
+
+function defaultSetTimout() {
+    throw new Error('setTimeout has not been defined');
+}
+function defaultClearTimeout () {
+    throw new Error('clearTimeout has not been defined');
+}
+(function () {
+    try {
+        if (typeof setTimeout === 'function') {
+            cachedSetTimeout = setTimeout;
+        } else {
+            cachedSetTimeout = defaultSetTimout;
+        }
+    } catch (e) {
+        cachedSetTimeout = defaultSetTimout;
+    }
+    try {
+        if (typeof clearTimeout === 'function') {
+            cachedClearTimeout = clearTimeout;
+        } else {
+            cachedClearTimeout = defaultClearTimeout;
+        }
+    } catch (e) {
+        cachedClearTimeout = defaultClearTimeout;
+    }
+} ())
+function runTimeout(fun) {
+    if (cachedSetTimeout === setTimeout) {
+        //normal enviroments in sane situations
+        return setTimeout(fun, 0);
+    }
+    // if setTimeout wasn't available but was latter defined
+    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+        cachedSetTimeout = setTimeout;
+        return setTimeout(fun, 0);
+    }
+    try {
+        // when when somebody has screwed with setTimeout but no I.E. maddness
+        return cachedSetTimeout(fun, 0);
+    } catch(e){
+        try {
+            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+            return cachedSetTimeout.call(null, fun, 0);
+        } catch(e){
+            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+            return cachedSetTimeout.call(this, fun, 0);
+        }
+    }
+
+
+}
+function runClearTimeout(marker) {
+    if (cachedClearTimeout === clearTimeout) {
+        //normal enviroments in sane situations
+        return clearTimeout(marker);
+    }
+    // if clearTimeout wasn't available but was latter defined
+    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+        cachedClearTimeout = clearTimeout;
+        return clearTimeout(marker);
+    }
+    try {
+        // when when somebody has screwed with setTimeout but no I.E. maddness
+        return cachedClearTimeout(marker);
+    } catch (e){
+        try {
+            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
+            return cachedClearTimeout.call(null, marker);
+        } catch (e){
+            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+            return cachedClearTimeout.call(this, marker);
+        }
+    }
+
+
+
+}
+var queue = [];
+var draining = false;
+var currentQueue;
+var queueIndex = -1;
+
+function cleanUpNextTick() {
+    if (!draining || !currentQueue) {
+        return;
+    }
+    draining = false;
+    if (currentQueue.length) {
+        queue = currentQueue.concat(queue);
+    } else {
+        queueIndex = -1;
+    }
+    if (queue.length) {
+        drainQueue();
+    }
+}
+
+function drainQueue() {
+    if (draining) {
+        return;
+    }
+    var timeout = runTimeout(cleanUpNextTick);
+    draining = true;
+
+    var len = queue.length;
+    while(len) {
+        currentQueue = queue;
+        queue = [];
+        while (++queueIndex < len) {
+            if (currentQueue) {
+                currentQueue[queueIndex].run();
+            }
+        }
+        queueIndex = -1;
+        len = queue.length;
+    }
+    currentQueue = null;
+    draining = false;
+    runClearTimeout(timeout);
+}
+
+process.nextTick = function (fun) {
+    var args = new Array(arguments.length - 1);
+    if (arguments.length > 1) {
+        for (var i = 1; i < arguments.length; i++) {
+            args[i - 1] = arguments[i];
+        }
+    }
+    queue.push(new Item(fun, args));
+    if (queue.length === 1 && !draining) {
+        runTimeout(drainQueue);
+    }
+};
+
+// v8 likes predictible objects
+function Item(fun, array) {
+    this.fun = fun;
+    this.array = array;
+}
+Item.prototype.run = function () {
+    this.fun.apply(null, this.array);
+};
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+process.version = ''; // empty string to avoid regexp issues
+process.versions = {};
+
+function noop() {}
+
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
+process.prependListener = noop;
+process.prependOnceListener = noop;
+
+process.listeners = function (name) { return [] }
+
+process.binding = function (name) {
+    throw new Error('process.binding is not supported');
+};
+
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+    throw new Error('process.chdir is not supported');
+};
+process.umask = function() { return 0; };
+
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports) {
+
+var g;
+
+// This works in non-strict mode
+g = (function() {
+	return this;
+})();
+
+try {
+	// This works if eval is allowed (see CSP)
+	g = g || Function("return this")() || (1,eval)("this");
+} catch(e) {
+	// This works if the window reference is available
+	if(typeof window === "object")
+		g = window;
+}
+
+// g can still be undefined, but nothing to do about it...
+// We return undefined, instead of nothing here, so it's
+// easier to handle this case. if(!global) { ...}
+
+module.exports = g;
+
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports) {
+
+/* (ignored) */
+
+/***/ })
+/******/ ]);
+});
+//# sourceMappingURL=noty.js.map

+ 47 - 0
public/noty/themes/mint.css

@@ -0,0 +1,47 @@
+.noty_theme__mint.noty_bar {
+    margin: 4px 0;
+    overflow: hidden;
+    border-radius: 2px;
+    position: relative;
+}
+
+.noty_theme__mint.noty_bar .noty_body {
+    padding: 10px;
+    font-size: 14px;
+}
+
+.noty_theme__mint.noty_bar .noty_buttons {
+    padding: 10px;
+}
+
+.noty_theme__mint.noty_type__alert,
+.noty_theme__mint.noty_type__notification {
+    background-color: #fff;
+    border-bottom: 1px solid #D1D1D1;
+    color: #2F2F2F;
+}
+
+.noty_theme__mint.noty_type__warning {
+    background-color: #FFAE42;
+    border-bottom: 1px solid #E89F3C;
+    color: #fff;
+}
+
+.noty_theme__mint.noty_type__error {
+    background-color: #DE636F;
+    border-bottom: 1px solid #CA5A65;
+    color: #fff;
+}
+
+.noty_theme__mint.noty_type__info,
+.noty_theme__mint.noty_type__information {
+    background-color: #7F7EFF;
+    border-bottom: 1px solid #7473E8;
+    color: #fff;
+}
+
+.noty_theme__mint.noty_type__success {
+    background-color: #AFC765;
+    border-bottom: 1px solid #A0B55C;
+    color: #fff;
+}

+ 24 - 30
resources/views/join.blade.php

@@ -1,6 +1,6 @@
 @extends('layouts.join')
 @section('content')
-    <form action="/api/client/createAsGuest"
+    <form action=""
           method="post"
           enctype="multipart/form-data"
           onsubmit="return joinMeeting(this)">
@@ -32,35 +32,29 @@
     </form>
     <script>
         function joinMeeting(_form) {
-            $.post('/api/session/createStrangerSession', {}, function (_data) {
-                var sessionKey = _data.data;
-                localStorage.sessionKey = sessionKey;
-                $.ajax({
-                    type: 'post',
-                    url: '/api/client/createAsGuest',
-                    headers: {
-                        'sessionKey': sessionKey
-                    },
-                    data: $(_form).serialize(),
-                    dataType: 'json'
-                })
-                    .done(function (_data) {
-                        console.log(_data);
-                        if(_data.success) {
-                            localStorage.clientFirstName = $('[name="nameFirst"]').val();
-                            localStorage.clientLastName = $('[name="nameLast"]').val();
-                            localStorage.clientUid = _data.data;
-                            window.location = '/meet';
-                        }
-                        else {
-                            alert(_data.message);
-                        }
-                    })
-                    .fail(function (_data) {
-                        console.log(_data);
-                        alert(_data.message);
-                    });
-            }, 'json');
+            $.ajax({
+                type: 'post',
+                url: '/api/client/createAsGuest',
+                data: $(_form).serialize(),
+                dataType: 'json'
+            })
+            .done(function (_data) {
+                console.log(_data);
+                if(_data.success) {
+                    localStorage.clientFirstName = $('[name="nameFirst"]').val();
+                    localStorage.clientLastName = $('[name="nameLast"]').val();
+                    localStorage.clientUid = _data.data.clientUid;
+                    localStorage.sessionKey = _data.data.sessionKey;
+                    window.location = '/meet';
+                }
+                else {
+                    alert(_data.message);
+                }
+            })
+            .fail(function (_data) {
+                console.log(_data);
+                alert(_data.message);
+            });
             return false;
         }
     </script>

+ 4 - 0
resources/views/layouts/meeting.blade.php

@@ -22,6 +22,10 @@
 
     <script src="https://static.opentok.com/v2/js/opentok.js"></script>
 
+    <link href="/noty/noty.css" rel="stylesheet">
+    <link href="/noty/themes/mint.css" rel="stylesheet">
+    <script src="/noty/noty.js" type="text/javascript"></script>
+
 </head>
 
 <body class="p-0 m-0">

+ 284 - 68
resources/views/meet.blade.php

@@ -15,12 +15,21 @@
         </h5>--}}
 
         @if(!$guest)
-            <div v-if="!started" class="d-flex align-items-center justify-content-center py-2">
+            <div class="d-flex align-items-center justify-content-center py-3 border-bottom">
+                <span class="mr-3">
+                    {{ $pro->name_display }} | {{ $pro->is_video_visit_assistant ? 'ASSISTANT' : 'MCP' }}
+                </span>
                 <button class="btn btn-sm btn-primary px-4 font-weight-bold"
                         v-on:click.prevent="nextPatient()"
-                        :disabled="client || checkingForNextPatient">Next Patient</button>
+                        :disabled="client || checkingForNextPatient || started">Next Patient</button>
+                <span v-if="patientInQueue && !started" class="patient-in-q-alert text-warning text-sm ml-2 small">
+                    <i class="fa fa-circle"></i>
+                </span>
+                <span v-if="!patientInQueue && !started" class="text-success text-sm ml-2 small">
+                    <i class="fa fa-circle"></i>
+                </span>
             </div>
-            <div v-if="!started && noNextPatient" class="bg-light rounded text-center py-1 font-weight-bold text-sm">@{{ noNextPatient }}</div>
+            <div v-if="!started && noNextPatient" class="bg-light rounded text-center py-1 font-weight-bold text-sm my-3 mx-3">@{{ noNextPatient }}</div>
         @endif
 
         <div class="">
@@ -32,14 +41,26 @@
                 <h6 class="text-black font-weight-bold m-0">Please wait. Your doctor will be with you shortly...</h6>
             </div>
             @endif
-            <div class="main-view mx-auto">
-                <div id="self-view" class="<?= $guest ? 'full-view' : 'd-none' ?>"></div>
-                <div <?= !$guest ? 'v-show="!!client"' : '' ?> id="remote-view" class="<?= $guest ? 'thumb-view' : 'full-view' ?>"></div>
+            <div class="main-view mx-auto" <?= !$guest ? 'v-show="!!client"' : '' ?>>
+                <div id="self-view" class="full-view" data-type="{{ $guest ? 'CLIENT' : 'PRO' }}"></div>
+                <div class="thumbs">
+                    <div id="remote-view-1" class="remote-view disconnected-view"
+                         data-stream="" data-from="" data-type=""></div>
+                    <div id="remote-view-2" class="remote-view disconnected-view"
+                         data-stream="" data-from="" data-type=""></div>
+                </div>
                 <button class="btn btn-danger rounded-circle hang-up"
                         v-if="started"
+                        title="Leave Call"
                         v-on:click.prevent="hangUp()">
                     <i class="fa fa-phone"></i>
                 </button>
+                <button class="btn btn-success rounded-circle call-mcp"
+                        v-if="selfUserType === 'ASSISTANT'"
+                        title="Call MCP Pro"
+                        v-on:click.prevent="callMCPPro()">
+                    <i class="fa fa-user-md"></i>
+                </button>
             </div>
         </div>
 
@@ -73,36 +94,51 @@
                 @endif
 
                 otSession: false,
+
+                selfUserType: false,
+                patientInQueue: false,
             },
             methods: {
-                nextPatient: function() {
+                @if(!$guest)
+                pollForNextPatient: function() {
+                    if(!this.started) {
+                        this.nextPatient(true);
+                    }
+                },
+                nextPatient: function(_pollOnly = false) {
                     var self = this;
-                    this.checkingForNextPatient = true;
+                    if(!_pollOnly) this.checkingForNextPatient = true;
                     $.post('/api/client/getNextClientForVideoVisit', {}, function(_data) {
-                        self.checkingForNextPatient = false;
-                        if(!_data.success) {
-                            self.noNextPatient = _data.message;
-                            window.setTimeout(function() {
-                                self.noNextPatient = false;
-                            }, 2000);
+                        if(_pollOnly) {
+                            self.patientInQueue = _data.success;
                         }
                         else {
-                            // get ot session key from client record
-                            self.client = true;
-                            self.clientUid = _data.data;
-                            self.getOpenTokSessionId(function() {
-                                self.selfName = 'Pro'; // TODO: replace with name of authed pro
-                                $.post('/api/openTok/getClientToken', {
-                                    opentokSessionId: self.otSessionId,
-                                    name: self.selfName
-                                }, function (_data) {
-                                    self.selfToken = _data.data;
-                                    self.initOpenTok();
+                            self.checkingForNextPatient = false;
+                            if(!_data.success) {
+                                self.noNextPatient = _data.message;
+                                window.setTimeout(function() {
+                                    self.noNextPatient = false;
+                                }, 2000);
+                            }
+                            else {
+                                // get ot session key from client record
+                                self.client = true;
+                                self.clientUid = _data.data;
+                                self.getOpenTokSessionId(function() {
+                                    self.selfName = '{{ $pro->name_display  }}';
+                                    $.post('/api/openTok/getClientToken', {
+                                        opentokSessionId: self.otSessionId,
+                                        name: self.selfName
+                                    }, function (_data) {
+                                        self.selfToken = _data.data;
+                                        self.initOpenTok();
+                                    });
                                 });
-                            });
+                            }
                         }
                     }, 'json');
                 },
+                @endif
                 getInitials: function(_name) {
                     var parts = _name.split(/\s+/g);
                     parts = parts.map(_part => _part[0]);
@@ -116,7 +152,12 @@
                 },
                 hangUp: function() {
                     if(this.otSession) {
-                        this.otSession.disconnect();
+                        try {
+                            this.otSession.disconnect();
+                        }
+                        catch (e) {
+                            console.log('Was already disconnected.');
+                        }
                         this.otSession = false;
                         this.otSessionId = '';
                         this.started = false;
@@ -128,7 +169,47 @@
                         @endif
                     }
                 },
+                @if(!$guest)
+                callMCPPro: function() {
 
+                    // put client in mcp queue
+                    $.ajax({
+                        type: 'post',
+                        url: '/api/clientVideoVisit/PutVideoVisitInMcpQueue',
+                        headers: {
+                            'sessionKey': localStorage.sessionKey
+                        },
+                        data: {uid: this.clientUid},
+                        dataType: 'json'
+                    })
+                    .done(function (_data) {
+                        console.log(_data);
+                        if(_data.success) {
+                            new Noty({
+                                theme: 'mint',
+                                type: 'success',
+                                text: 'Client added to MCP call queue',
+                                progressBar: false,
+                                timeout: 1500,
+                            }).show();
+                        }
+                        else {
+                            new Noty({
+                                theme: 'mint',
+                                type: 'alert',
+                                text: _data.message,
+                                progressBar: false,
+                                timeout: 3000,
+                            }).show();
+                        }
+                    })
+                    .fail(function (_data) {
+                        console.log(_data);
+                        // alert(_data.message);
+                    });
+
+                },
+                @endif
                 // OT methods
                 initOpenTok: function() {
 
@@ -141,7 +222,6 @@
                     canvas.width = 640;
                     canvas.height = 480;
                     const ctx = canvas.getContext('2d');
-
                     var pos = 100;
                     window.setInterval(function() {
                         ctx.clearRect(0, 0, canvas.width, canvas.height);
@@ -164,20 +244,36 @@
 
                     self.otSession = OT.initSession(apiKey, sessionId);
 
+                    // peer connected
                     self.otSession.on('streamCreated', function streamCreated(event) {
                         var subscriberOptions = {
                             insertMode: 'append',
                             width: '100%',
                             height: '100%'
                         };
-                        self.otSession.subscribe(event.stream, 'remote-view', subscriberOptions, self.handleOpenTokError);
+
+                        var remoteViewElem = 'remote-view-1';
+                        if($('#remote-view-1').attr('data-stream')) {
+                            remoteViewElem = 'remote-view-2';
+                        }
+
+                        self.otSession.subscribe(event.stream, remoteViewElem, subscriberOptions, self.handleOpenTokError);
+
+                        remoteViewElem = $('#' + remoteViewElem);
+                        remoteViewElem.attr('data-stream', event.stream.id);
+                        remoteViewElem.attr('data-from', event.stream.connection.data.split('|')[0]);
+
+                        var userType = event.target.connection.data.split('|')[1];
+                        if(userType === 'CLIENT') {
+                            remoteViewElem.attr('data-type', 'CLIENT');
+                        }
+                        else {
+                            remoteViewElem.attr('data-type', 'PRO');
+                        }
 
                         @if($guest)
-                        $('#self-view').removeClass('full-view').addClass('thumb-view');
-                        $('#remote-view').removeClass('thumb-view').addClass('full-view');
                         self.pro = true;
                         @else
-                        self.joinMeetingAsPro();
                         self.client = true;
                         @endif
 
@@ -188,36 +284,83 @@
                             }, 1000);
                             self.started = true;
                         }
+
+                        self.activateParty(event.stream.id);
                     });
 
+                    // peer disconnected
                     self.otSession.on("streamDestroyed", function(event) {
+                        console.log('streamDestroyed from ' + event.target.connection.data);
+                        onPeerDisconnection(event, event.stream.connection.data);
+                    });
+                    self.otSession.on("connectionDestroyed", function(event) {
+                        console.log('connectionDestroyed from ' + event.connection.data);
+                        onPeerDisconnection(event, event.connection.data);
+                    });
+
+                    function onPeerDisconnection(event, data) {
+                        self.activateParty('self');
+
+                        @if(!$guest)
+                        if(data.split('|')[1] === 'CLIENT') {
+                            self.hangUp();
+                        }
+                        @endif
+
+                        if(event.stream) {
+                            var remoteViewElem = $('[data-stream="' + event.stream.id + '"]');
+                            if(remoteViewElem.length) {
+                                remoteViewElem.attr('data-stream', '');
+                                remoteViewElem.attr('data-from', '');
+                            }
+                        }
+
                         @if($guest)
-                        $('#remote-view').removeClass('full-view').addClass('thumb-view');
-                        $('#self-view').removeClass('thumb-view').addClass('full-view');
-                        self.pro = false;
+                            self.pro = false;
                         @else
-                        self.client = false;
+                            self.client = false;
                         @endif
 
-                        self.started = false;
-                        self.startTime = false;
+                        // if no other parties in call, hang up
+                        if(!$('[data-stream]:not([data-stream=""])').length) {
+                            self.hangUp();
+                        }
+                    }
 
-                        self.hangUp();
+                    // self connected
+                    self.otSession.on("sessionConnected", function(event) {
+                        console.log(event);
+                        self.selfUserType = event.target.connection.data.split('|')[1];
+                        @if(!$guest)
+                        self.joinMeetingAsPro(self.selfUserType);
+                        @endif
                     });
 
+                    // self disconnected
                     self.otSession.on('sessionDisconnected', function sessionDisconnected(event) {
                         console.log('You were disconnected from the session.', event.reason);
                     });
 
                     // initialize the publisher
                     var publisherOptions = {
-                        videoSource: canvas.captureStream(1).getVideoTracks()[0],
+                        videoSource: canvas.captureStream(1).getVideoTracks()[0], // TODO: Comment this line to use webcam
                         insertMode: 'append',
                         width: '100%',
                         height: '100%',
                     };
                     var publisher = OT.initPublisher('self-view', publisherOptions, self.handleOpenTokError);
 
+                    publisher.on('streamCreated', function(event) {
+                        var selfView = $('#self-view');
+                        selfView.attr('data-stream', event.stream.id);
+                        selfView.attr('data-from', event.stream.connection.data.split('|')[0]);
+                        @if($guest)
+                        selfView.attr('data-type', 'CLIENT');
+                        @else
+                        selfView.attr('data-type', 'PRO');
+                        @endif
+                    });
+
                     // Connect to the session
                     self.otSession.connect(token, function callback(error) {
                         if (error) {
@@ -246,27 +389,27 @@
                     @if($guest)
                     $.ajax({
                         type: 'post',
-                        url: '/api/clientVideoVisit/startVideoVisitAsStranger',
+                        url: '/api/clientVideoVisit/startVideoVisitAsClient',
                         headers: {
                             'sessionKey': localStorage.sessionKey
                         },
                         data: {checkInToken: this.checkInToken},
                         dataType: 'json'
                     })
-                        .done(function (_data) {
-                            console.log(_data);
-                            if(_data.success) {
-                                self.otSessionId = _data.data;
-                                _done();
-                            }
-                            else {
-                                alert(_data.message);
-                            }
-                        })
-                        .fail(function (_data) {
-                            console.log(_data);
+                    .done(function (_data) {
+                        console.log(_data);
+                        if(_data.success) {
+                            self.otSessionId = _data.data;
+                            _done();
+                        }
+                        else {
                             alert(_data.message);
-                        });
+                        }
+                    })
+                    .fail(function (_data) {
+                        console.log(_data);
+                        alert(_data.message);
+                    });
                     @else
                     $.get('/pro/get-opentok-session-key/' + self.clientUid, function(_data) {
                         self.otSessionId = _data.data;
@@ -274,25 +417,61 @@
                     }, 'json');
                     @endif
                 },
-                joinMeetingAsPro: function() {
-                    var self = this;
+
+                @if(!$guest)
+                joinMeetingAsPro: function(_type) {
+                    var self = this, endPoint = '';
+                    if(_type === 'ASSISTANT') {
+                        endPoint = 'joinVideoVisitAsAssistantPro';
+                    }
+                    else {
+                        endPoint = 'joinVideoVisitAsMcpPro';
+                    }
                     $.ajax({
                         type: 'post',
-                        url: '/api/clientVideoVisit/joinVideoVisitAsMcpPro',
+                        url: '/api/clientVideoVisit/' + endPoint,
                         headers: {
                             'sessionKey': localStorage.sessionKey
                         },
                         data: {uid: self.clientUid},
                         dataType: 'json'
                     })
-                        .done(function (_data) {
-                            console.log(_data);
-                        })
-                        .fail(function (_data) {
-                            console.warn(_data);
-                            alert(_data.message);
-                        });
+                    .done(function (_data) {
+                        console.log(_data);
+                    })
+                    .fail(function (_data) {
+                        console.warn(_data);
+                        alert(_data.message);
+                    });
+                },
+                @endif
+
+                activateParty: function(_stream = 'self') {
+                    var current = $('.full-view');
+                    if(current.attr('data-stream') === _stream) return;
+                    current.removeClass('full-view').addClass('thumb-view');
+                    if(current.attr('data-type') === 'CLIENT') {
+                        current.prependTo('.thumbs');
+                    }
+                    else {
+                        current.appendTo('.thumbs');
+                    }
+                    if(_stream === 'self') {
+                        $('#self-view')
+                            .removeClass('thumb-view')
+                            .removeClass('disconnected-view')
+                            .addClass('full-view')
+                            .prependTo('.main-view');
+                    }
+                    else {
+                        $('div[data-stream="' + _stream + '"]')
+                            .removeClass('thumb-view')
+                            .removeClass('disconnected-view')
+                            .addClass('full-view')
+                            .prependTo('.main-view');
+                    }
                 }
+
             },
             mounted: function() {
 
@@ -307,17 +486,54 @@
                         if (localStorage.clientFirstName) name.push(localStorage.clientFirstName);
                         if (localStorage.clientLastName) name.push(localStorage.clientLastName);
                         this.selfName = name.join(' ');
-                        $.post('/api/openTok/getClientToken', {
-                            opentokSessionId: self.otSessionId,
-                            name: name.join(' ')
-                        }, function (_data) {
+                        $.ajax({
+                            type: 'post',
+                            url: '/api/openTok/getClientToken',
+                            headers: {
+                                'sessionKey': localStorage.sessionKey
+                            },
+                            data: {
+                                opentokSessionId: self.otSessionId,
+                                name: name.join(' ')
+                            },
+                            dataType: 'json'
+                        })
+                        .done(function (_data) {
+                            console.log(_data);
                             self.selfToken = _data.data;
                             self.initOpenTok();
+                        })
+                        .fail(function (_data) {
+                            console.warn(_data);
+                            alert(_data.message);
                         });
+
                     });
                 });
+                @else
+                    localStorage.sessionKey = '{{ $session->session_key }}';
+                @endif
+
+                $(document).on('click', '.thumbs>div[data-stream]', function() {
+                    self.activateParty($(this).attr('data-stream'));
+                    return false;
+                });
+
+                @if(!$guest)
+
+                // poll for new patients and alert
+                window.setInterval(function() {
+                    self.pollForNextPatient();
+                }, 5000);
+
                 @endif
 
+                window.onbeforeunload = function() {
+                    if(self.started) {
+                        return "A call is in progress";
+                    }
+                };
+
             }
         });
     </script>

+ 2 - 2
resources/views/pro/clients/index.blade.php

@@ -13,7 +13,7 @@
             <thead>
             <tr>
 <th>&nbsp;</th>
-<th>Name First</th>
+<th>First Name</th>
 <th>Gender</th>
 <th>MCP</th>
 <th>CM Pro</th>
@@ -26,7 +26,7 @@
             @foreach($records as $record)
                 <tr>
 <td><a href="/clients/view/<?= $record->uid ?>"><i class="fas fa-share-square"></i></a></td>
-<td><a href="/clients/view/<?= $record->uid ?>"><?= $record->name_first ?></a></td>
+<td><a href="/clients/view/<?= $record->uid ?>/SUB_dashboard"><?= $record->name_first ?></a></td>
 <td><?= $record->gender_identity ?></td>
 <td><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->mcp_pro_id], ], 'all'); ?></td>
 <td><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->cm_pro_id], ], 'all'); ?></td>

+ 1 - 0
resources/views/pro/clients/subs.blade.php

@@ -1,4 +1,5 @@
 <a href='/clients/view/<?= $record->uid ?>/SUB_dashboard' class='d-block px-3 py-2 border-bottom stag-sublink {{ request()->route()->getActionMethod() === 'SUB_dashboard' ? 'bg-secondary text-white font-weight-bold' : '' }}{{ strpos(request()->route()->getActionMethod(), 'ACTION_') === 0 ? 'bg-secondary text-white font-weight-bold' : '' }}'>Dashboard</a>
+<a href='/clients/view/<?= $record->uid ?>/SUB_detail' class='d-block px-3 py-2 border-bottom stag-sublink {{ request()->route()->getActionMethod() === 'SUB_detail' ? 'bg-secondary text-white font-weight-bold' : '' }}'>Detail</a>
 <a href='/clients/view/<?= $record->uid ?>/SUB_measurements' class='d-block px-3 py-2 border-bottom stag-sublink {{ request()->route()->getActionMethod() === 'SUB_measurements' ? 'bg-secondary text-white font-weight-bold' : '' }}'>Measurements</a>
 <a href='/clients/view/<?= $record->uid ?>/SUB_med_profile' class='d-block px-3 py-2 border-bottom stag-sublink {{ request()->route()->getActionMethod() === 'SUB_med_profile' ? 'bg-secondary text-white font-weight-bold' : '' }}'>Med Profile</a>
 <a href='/clients/view/<?= $record->uid ?>/SUB_med_profile_log' class='d-block px-3 py-2 border-bottom stag-sublink {{ request()->route()->getActionMethod() === 'SUB_med_profile_log' ? 'bg-secondary text-white font-weight-bold' : '' }}'>Med Profile Log</a>

+ 2 - 616
resources/views/pro/clients_SINGLE/SUB_dashboard.blade.php

@@ -1,621 +1,7 @@
+<?php /* DO NOT GENERATE */ ?>
 @extends('pro.clients.view')
 @section('content-inner')
 
-    <div class="row mt-3">
-    <div class="col-12">
-
-        <div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Source
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editSource' title='Update source'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Source</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Source</td><td class="w-75 px-2 font-weight-bold"><?= $record->source ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Source Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->source_memo ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Source At</td><td class="w-75 px-2 font-weight-bold"><?= friendly_date_time($record->source_at) ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Source Detail</td><td class="w-75 px-2 font-weight-bold"><?= $record->source_detail ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Source Client</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_clients, 'name_display', [['id', '=', $record->source_client_id], ], 'all'); ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Source Pro</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->source_pro_id], ], 'all'); ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Source Facility</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_facilities, 'name', [['id', '=', $record->source_facility_id], ], 'all'); ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Duplicate
-                <span class="ml-auto"><!-- __GROUP_ACTION__ --></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Is Duplicate</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_duplicate ?>@if(! $record->is_duplicate) <a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsDuplicateToTrue' title='Set as duplicate of' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set As Duplicate Of</span></a> @endif
-@if( $record->is_duplicate) <a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsDuplicateToFalse' title='Set as not duplicate' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set As Not Duplicate</span></a> @endif</td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Duplicate of Client</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_clients, 'name_display', [['id', '=', $record->duplicate_of_client_id], ], 'all'); ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Name
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editName' title='Edit name'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Name</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Name Prefix</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_prefix ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Name First</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_first ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Name Middle</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_middle ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Name Last</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_last ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Name Suffix</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_suffix ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Name Credential</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_credential ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Name Nickname</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_nickname ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Name Maiden</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_maiden ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Name Previous</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_previous ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Demographics
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editDemographics' title='Edit demographics'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Demographics</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Date of Birth</td><td class="w-75 px-2 font-weight-bold"><?= $record->dob ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Age In Years</td><td class="w-75 px-2 font-weight-bold"><?= $record->age_in_years ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Sex</td><td class="w-75 px-2 font-weight-bold"><?= $record->sex ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Gender Identity</td><td class="w-75 px-2 font-weight-bold"><?= $record->gender_identity ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Sexual Orientation</td><td class="w-75 px-2 font-weight-bold"><?= $record->sexual_orientation ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Sexually Active</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_sexually_active ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Sexually Active Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->sexually_active_memo ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Marital Status</td><td class="w-75 px-2 font-weight-bold"><?= $record->marital_status ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Spouse
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editSpouse' title='Edit spouse'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Spouse</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Spouse Relationship</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_relationships, 'name_display', [['id', '=', $record->spouse_relationship_id], ], 'all'); ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Intake
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editIntakeDetails' title='Edit intake details'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Intake Details</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Intake Text</td><td class="w-75 px-2 font-weight-bold"><?= $record->intake_text ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Intake Detail</td><td class="w-75 px-2 font-weight-bold"><?= $record->intake_detail ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Responsible party
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editResponsibleParty' title='Edit responsible party'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Responsible Party</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Is Responsible Party Someone Else</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_responsible_party_someone_else ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Responsible Party Relationship</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_relationships, 'name_display', [['id', '=', $record->responsible_party_relationship_id], ], 'all'); ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Emergency relationship
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editEmergencyRelationship' title='Edit emergency relationship'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Emergency Relationship</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Emergency Relationship</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_relationships, 'name_display', [['id', '=', $record->emergency_relationship_id], ], 'all'); ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Family
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editFamilyInfo' title='Edit family info'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Family Info</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Mother Relationship</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_relationships, 'name_display', [['id', '=', $record->mother_relationship_id], ], 'all'); ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mother Maiden Name</td><td class="w-75 px-2 font-weight-bold"><?= $record->mother_maiden_name ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Father Relationship</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_relationships, 'name_display', [['id', '=', $record->father_relationship_id], ], 'all'); ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Number Of Siblings</td><td class="w-75 px-2 font-weight-bold"><?= $record->number_of_siblings ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Birth Order</td><td class="w-75 px-2 font-weight-bold"><?= $record->birth_order ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Multiple Birth Member</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_multiple_birth_member ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Contact details
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editContactDetails' title='Edit contact details'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Contact Details</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Phone Home</td><td class="w-75 px-2 font-weight-bold"><?= $record->phone_home ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Phone Mobile</td><td class="w-75 px-2 font-weight-bold"><?= $record->phone_mobile ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Phone Work</td><td class="w-75 px-2 font-weight-bold"><?= $record->phone_work ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Phone Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->phone_memo ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Email Personal Primary</td><td class="w-75 px-2 font-weight-bold"><?= $record->email_personal_primary ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Email Personal Secondary</td><td class="w-75 px-2 font-weight-bold"><?= $record->email_personal_secondary ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Email Work Primary</td><td class="w-75 px-2 font-weight-bold"><?= $record->email_work_primary ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Email Work Secondary</td><td class="w-75 px-2 font-weight-bold"><?= $record->email_work_secondary ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Send Reminders By Email</td><td class="w-75 px-2 font-weight-bold"><?= $record->send_reminders_by_email ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Send Reminders By Text</td><td class="w-75 px-2 font-weight-bold"><?= $record->send_reminders_by_text ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Send Reminders By Phone</td><td class="w-75 px-2 font-weight-bold"><?= $record->send_reminders_by_phone ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Cell number
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putNewCellNumber' title='Put new cell number'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put New Cell Number</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Cell Number</td><td class="w-75 px-2 font-weight-bold"><?= $record->cell_number ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_sendCellNumberConfirmationMessage' title='sendCellNumberConfirmationMessage' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Send Cell Number Confirmation Message</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Cell Number Confirmation Pending </td><td class="w-75 px-2 font-weight-bold"><?= $record->is_cell_number_confirmation_pending  ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Cell Number Confirmation Token</td><td class="w-75 px-2 font-weight-bold"><?= $record->cell_number_confirmation_token ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Cell Number Confirmed </td><td class="w-75 px-2 font-weight-bold"><?= $record->is_cell_number_confirmed  ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Cell Number Confirmed At</td><td class="w-75 px-2 font-weight-bold"><?= friendly_date_time($record->cell_number_confirmed_at) ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Email Address
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putNewEmailAddress' title='Put new email address'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put New Email Address</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Email Address</td><td class="w-75 px-2 font-weight-bold"><?= $record->email_address ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_sendEmailAddressConfirmationMessage' title='sendEmailAddressConfirmationMessage' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Send Email Address Confirmation Message</span></a>
-<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_confirmEmailAddressWithConfirmationToken' title='confirmEmailAddressWithConfirmationToken' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Confirm Email Address With Confirmation Token</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Email Address Confirmation Pending</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_email_address_confirmation_pending ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Email Address Confirmation Token</td><td class="w-75 px-2 font-weight-bold"><?= $record->email_address_confirmation_token ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Email Address Confirmed</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_email_address_confirmed ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Email Address Confirmed At</td><td class="w-75 px-2 font-weight-bold"><?= friendly_date_time($record->email_address_confirmed_at) ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Credentials
-                <span class="ml-auto"><!-- __GROUP_ACTION__ --></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Username</td><td class="w-75 px-2 font-weight-bold"><?= $record->username ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Address
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editAddress' title='Edit address'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Address</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Is Same Address For Home And Mailing</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_same_address_for_home_and_mailing ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Home Address Line1</td><td class="w-75 px-2 font-weight-bold"><?= $record->home_address_line1 ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Home Address Line2</td><td class="w-75 px-2 font-weight-bold"><?= $record->home_address_line2 ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Home Address City</td><td class="w-75 px-2 font-weight-bold"><?= $record->home_address_city ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Home Address State</td><td class="w-75 px-2 font-weight-bold"><?= $record->home_address_state ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Home Address Zip</td><td class="w-75 px-2 font-weight-bold"><?= $record->home_address_zip ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Home Address Geo Lat</td><td class="w-75 px-2 font-weight-bold"><?= $record->home_address_geo_lat ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Home Address Geo Long</td><td class="w-75 px-2 font-weight-bold"><?= $record->home_address_geo_long ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mailing Address Line1</td><td class="w-75 px-2 font-weight-bold"><?= $record->mailing_address_line1 ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mailing Address Line2</td><td class="w-75 px-2 font-weight-bold"><?= $record->mailing_address_line2 ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mailing Address City</td><td class="w-75 px-2 font-weight-bold"><?= $record->mailing_address_city ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mailing Address State</td><td class="w-75 px-2 font-weight-bold"><?= $record->mailing_address_state ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mailing Address Zip</td><td class="w-75 px-2 font-weight-bold"><?= $record->mailing_address_zip ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mailing Address Geo Lat</td><td class="w-75 px-2 font-weight-bold"><?= $record->mailing_address_geo_lat ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mailing Address Geo Long</td><td class="w-75 px-2 font-weight-bold"><?= $record->mailing_address_geo_long ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Has Secondary Address</td><td class="w-75 px-2 font-weight-bold"><?= $record->has_secondary_address ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Reason For Secondary Address</td><td class="w-75 px-2 font-weight-bold"><?= $record->reason_for_secondary_address ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">When Is Client At Secondary Address</td><td class="w-75 px-2 font-weight-bold"><?= $record->when_is_client_at_secondary_address ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Same Secondary Address For Home And Mailing</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_same_secondary_address_for_home_and_mailing ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Secondary Home Address Line1</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_home_address_line1 ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Secondary Home Address Line2</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_home_address_line2 ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Secondary Home Address City</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_home_address_city ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Secondary Home Address State</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_home_address_state ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Secondary Home Address Zip</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_home_address_zip ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Secondary Home Address Geo Lat</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_home_address_geo_lat ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Secondary Home Address Geo Long</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_home_address_geo_long ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Secondary Mailing Address Line1</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_mailing_address_line1 ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Secondary Mailing Address Line2</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_mailing_address_line2 ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Secondary Mailing Address City</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_mailing_address_city ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Secondary Mailing Address State</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_mailing_address_state ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Secondary Mailing Address Zip</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_mailing_address_zip ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Secondary Mailing Address Geo Lat</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_mailing_address_geo_lat ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Secondary Mailing Address Geo Long</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_mailing_address_geo_long ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Misc. Demographics
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editMiscDemographics' title='Update misc. demographics'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Misc. Demographics</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Citizenships</td><td class="w-75 px-2 font-weight-bold"><?= $record->citizenships ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Education</td><td class="w-75 px-2 font-weight-bold"><?= $record->education ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Birth Country</td><td class="w-75 px-2 font-weight-bold"><?= $record->birth_country ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Birth State</td><td class="w-75 px-2 font-weight-bold"><?= $record->birth_state ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Birth City</td><td class="w-75 px-2 font-weight-bold"><?= $record->birth_city ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Nationality</td><td class="w-75 px-2 font-weight-bold"><?= $record->nationality ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Religious Affiliation</td><td class="w-75 px-2 font-weight-bold"><?= $record->religious_affiliation ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Religious Facility Id</td><td class="w-75 px-2 font-weight-bold"><?= $record->religious_facility_id ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is On Special Diet</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_on_special_diet ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Special Diet Category</td><td class="w-75 px-2 font-weight-bold"><?= $record->special_diet_category ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Special Diet Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->special_diet_memo ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Preferred Language</td><td class="w-75 px-2 font-weight-bold"><?= $record->preferred_language ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Other Languages</td><td class="w-75 px-2 font-weight-bold"><?= $record->other_languages ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">English Level</td><td class="w-75 px-2 font-weight-bold"><?= $record->english_level ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Driver License State</td><td class="w-75 px-2 font-weight-bold"><?= $record->driver_license_state ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Driver License Number</td><td class="w-75 px-2 font-weight-bold"><?= $record->driver_license_number ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Hispanic</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_hispanic ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Black Oraa</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_black_oraa ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Ethnicities</td><td class="w-75 px-2 font-weight-bold"><?= $record->ethnicities ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Race</td><td class="w-75 px-2 font-weight-bold"><?= $record->race ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Specific Races</td><td class="w-75 px-2 font-weight-bold"><?= $record->specific_races ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Deceased
-                <span class="ml-auto"><!-- __GROUP_ACTION__ --></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Is Deceased</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_deceased ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsDeceasedToTrue' title='setIsDeseasedToTrue' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set Is Deseased To True</span></a>
-<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsDeceasedToFalse' title='setIsDeseasedToFalse' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set Is Deseased To False</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Date And Time Of Death</td><td class="w-75 px-2 font-weight-bold"><?= $record->date_and_time_of_death ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Cause Of Death</td><td class="w-75 px-2 font-weight-bold"><?= $record->cause_of_death ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Pharmacy
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editPharmacy' title='Edit pharmancy'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Pharmancy</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Pharmacy</td><td class="w-75 px-2 font-weight-bold"><?= $record->pharmacy ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Pharmacy Facility</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_facilities, 'name', [['id', '=', $record->pharmacy_facility_id], ], 'all'); ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">SSN
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editSsn' title='Edit SSN'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit SSN</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Ssn</td><td class="w-75 px-2 font-weight-bold"><?= $record->ssn ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">MCN
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putMcn' title='Put MSN'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put MSN</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Mcn</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_removeMcn' title='removeMcn' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove Mcn</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Was Medicare Validation Successful</td><td class="w-75 px-2 font-weight-bold"><?= $record->was_medicare_validation_successful ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Mcn Valid Number</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_mcn_valid_number ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcn Address Street Line1</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_address_street_line1 ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcn Address Street Line2</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_address_street_line2 ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcn Address City</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_address_city ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcn Address State</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_address_state ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcn Address Zip</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_address_zip ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Partbprimary</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_partbprimary ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Hospice</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_hospice ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcn Response Detail</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_response_detail ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Billing Address</td><td class="w-75 px-2 font-weight-bold"><?= $record->billing_address ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Reason Not Partb</td><td class="w-75 px-2 font-weight-bold"><?= $record->reason_not_partb ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Reason Not Partbmemo</td><td class="w-75 px-2 font-weight-bold"><?= $record->reason_not_partbmemo ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Medicare Advantage</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_medicare_advantage ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Medicare Advantage Plan</td><td class="w-75 px-2 font-weight-bold"><?= $record->medicare_advantage_plan ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcn Reject Reason Code</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_reject_reason_code ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcn Reject Reason Description</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_reject_reason_description ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcn Follow Up Action Code</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_follow_up_action_code ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcn Follow Up Action Description</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_follow_up_action_description ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcn Error Details</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_error_details ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Webcam
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateWebcamInfo' title='Update webcam info'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Webcam Info</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Has Webcam Device</td><td class="w-75 px-2 font-weight-bold"><?= $record->has_webcam_device ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Webcam Device</td><td class="w-75 px-2 font-weight-bold"><?= $record->webcam_device ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">MCP
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putMcp' title='Put MCP'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put MCP</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">MCP Pro</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->mcp_pro_id], ], 'all'); ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putMcp' title='putMcp' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put Mcp</span></a>
-<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_removeMcp' title='removeMcp' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove Mcp</span></a></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">MCP Visit
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateMcpOnboardingVisitInfo' title='Update source'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Source</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Has Mcp Done Onboarding Visit</td><td class="w-75 px-2 font-weight-bold"><?= $record->has_mcp_done_onboarding_visit ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcp Onboarding Visit Date</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcp_onboarding_visit_date ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcp Onboarding Visit Note Id</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcp_onboarding_visit_note_id ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Reason Onboarding Visit Note Outside System</td><td class="w-75 px-2 font-weight-bold"><?= $record->reason_onboarding_visit_note_outside_system ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Mcp Onboarding Active</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_mcp_onboarding_active ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateMcpOnboardingActiveInfo' title='updateMcpOnboardingActiveInfo' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Mcp Onboarding Active Info</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Why Is Mcp Onboarding Not Active Category</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_is_mcp_onboarding_not_active_category ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Why Is Mcp Onboarding Not Active Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_is_mcp_onboarding_not_active_memo ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">MCP Onboarding Pro
-                <span class="ml-auto"><!-- __GROUP_ACTION__ --></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">MCP Pro</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->mcp_onboarding_pro_id], ], 'all'); ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putMcpOnboardingPro' title='putMcpOnboardingPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put Mcp Onboarding Pro</span></a>
-<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_removeMcpOnboardingPro' title='removeMcpOnboardingPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove Mcp Onboarding Pro</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Has Mcp Onboarding Pro Accepted Assignment</td><td class="w-75 px-2 font-weight-bold"><?= $record->has_mcp_onboarding_pro_accepted_assignment ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_acceptAssignmentAsMcpOnboardingPro' title='acceptAssignmentAsMcpOnboardingPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Accept Assignment As Mcp Onboarding Pro</span></a>
-<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_rejectAssignmentAsMcpOnboardingPro' title='rejectAssignmentAsMcpOnboardingPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Reject Assignment As Mcp Onboarding Pro</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcp Onboarding Pro Decision To Accept Assignment At</td><td class="w-75 px-2 font-weight-bold"><?= friendly_date_time($record->mcp_onboarding_pro_decision_to_accept_assignment_at) ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Mcp Onboarding Pro Decision Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcp_onboarding_pro_decision_memo ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateMcpOnboardingProDecisionMemo' title='updateMcpOnboardingProDecisionMemo' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Mcp Onboarding Pro Decision Memo</span></a></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Onboarding Strategy
-                <span class="ml-auto"><!-- __GROUP_ACTION__ --></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Mcp Onboarding Strategy</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcp_onboarding_strategy ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Next Mcp Onboarding Attempt Date Est</td><td class="w-75 px-2 font-weight-bold"><?= $record->next_mcp_onboarding_attempt_date_est ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateNextMcpOnboardingAttempt' title='updateNextMcpOnboardingAttempt' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Next Mcp Onboarding Attempt</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Next Mcp Onboarding Attempt Time Est</td><td class="w-75 px-2 font-weight-bold"><?= $record->next_mcp_onboarding_attempt_time_est ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Number Of Mcp Onboarding Phone Calls</td><td class="w-75 px-2 font-weight-bold"><?= $record->number_of_mcp_onboarding_phone_calls ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Number Of Mcp Onboarding In Person Visits</td><td class="w-75 px-2 font-weight-bold"><?= $record->number_of_mcp_onboarding_in_person_visits ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Other Key Pros
-                <span class="ml-auto"><!-- __GROUP_ACTION__ --></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">CM Pro</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->cm_pro_id], ], 'all'); ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putCmPro' title='putCmPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put Cm Pro</span></a>
-<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_removeCmPro' title='removeCmPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove Cm Pro</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">RME Pro</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->rme_pro_id], ], 'all'); ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putRmePro' title='putRmePro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put Rme Pro</span></a>
-<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_removeRmePro' title='removeRmePro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove Rme Pro</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">RMM Pro</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->rmm_pro_id], ], 'all'); ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putRmmPro' title='putRmmPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put Rmm Pro</span></a>
-<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_removeRmmPro' title='removeRmmPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove Rmm Pro</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">RD Pro</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->rd_pro_id], ], 'all'); ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putRdPro' title='putRdPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put Rd Pro</span></a>
-<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_removeRdPro' title='removeRdPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove Rd Pro</span></a></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">MNT Eligibility
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateMntEligibility' title='Update MNT Eligibility'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update MNT Eligibility</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Eligible For Mnt</td><td class="w-75 px-2 font-weight-bold"><?= $record->eligible_for_mnt ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateMntEligibility' title='updateMntEligibility' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Mnt Eligibility</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Number Of Mnt Hours Left This Year</td><td class="w-75 px-2 font-weight-bold"><?= $record->number_of_mnt_hours_left_this_year ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">CM Enrollment
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateCmEligibility' title='Update CM Eligibility'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update CM Eligibility</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Is Eligible For Cm</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_eligible_for_cm ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Why Not Eligible For Cm Category</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_eligible_for_cm_category ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Why Not Eligible For Cm Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_eligible_for_cm_memo ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Enrolled In Cm</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_enrolled_in_cm ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsEnrolledInCmToFalse' title='setIsEnrolledInCmToFalse' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set Is Enrolled In Cm To False</span></a>
-<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsEnrolledInCmToTrue' title='setIsEnrolledInCmToTrue' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set Is Enrolled In Cm To True</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Cm Reason1</td><td class="w-75 px-2 font-weight-bold"><?= $record->cm_reason1 ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateCmReasons' title='updateCmReasons' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Cm Reasons</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Cm Reason2</td><td class="w-75 px-2 font-weight-bold"><?= $record->cm_reason2 ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Cm Enrollment Consent Method</td><td class="w-75 px-2 font-weight-bold"><?= $record->cm_enrollment_consent_method ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateCmEnrollmentConsentInfo' title='updateCmEnrollmentConsentInfo' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Cm Enrollment Consent Info</span></a>
-<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateWhyNotEnrolledInCm' title='updateWhyNotEnrolledInCm' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Why Not Enrolled In Cm</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Cm Enrollment Consent Method Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->cm_enrollment_consent_method_memo ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Why Not Enrolled In Cm Category</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_enrolled_in_cm_category ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Why Not Enrolled In Cm Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_enrolled_in_cm_memo ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">RM Enrollment
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateRmEligibility' title='Update why not enrolled in RM'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Why Not Enrolled In RM</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Is Eligible For Rm</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_eligible_for_rm ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateRmEligibility' title='updateRmEligibility' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Rm Eligibility</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Why Not Eligible For Rm Category</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_eligible_for_rm_category ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Why Not Eligible For Rm Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_eligible_for_rm_memo ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Enrolled In Rm</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_enrolled_in_rm ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsEnrolledInRmToFalse' title='setIsEnrolledInRmToFalse' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set Is Enrolled In Rm To False</span></a>
-<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsEnrolledInRmToTrue' title='setIsEnrolledInRmToTrue' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set Is Enrolled In Rm To True</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Rm Reason1</td><td class="w-75 px-2 font-weight-bold"><?= $record->rm_reason1 ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateRmReasons' title='updateRmReasons' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Rm Reasons</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Rm Reason2</td><td class="w-75 px-2 font-weight-bold"><?= $record->rm_reason2 ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Why Not Enrolled In Rm Category</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_enrolled_in_rm_category ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateWhyNotEnrolledInRm' title='updateWhyNotEnrolledInRm' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Why Not Enrolled In Rm</span></a></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Why Not Enrolled In Rm Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_enrolled_in_rm_memo ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-<div class="table-responsive p-0 bg-white table-sm mb-3">
-    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-        <thead>
-        <tr>
-            <th colspan="2" class="px-2">Equipment
-                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateEquipmentInfo' title='Update equipment info'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Equipment Info</span></a></span>
-            </th>
-        </tr>
-        </thead>
-        <tbody>
-            <tr><td class="w-25 px-2 text-secondary border-right">Is Equipment Awaiting Setup</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_equipment_awaiting_setup ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">What Equipment Is Awaiting Setup</td><td class="w-75 px-2 font-weight-bold"><?= $record->what_equipment_is_awaiting_setup ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Equipment Setup Completed</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_equipment_setup_completed ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">What Equipment Setup Is Completed</td><td class="w-75 px-2 font-weight-bold"><?= $record->what_equipment_setup_is_completed ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">Is Equipment Service Needed</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_equipment_service_needed ?></td></tr>
-<tr><td class="w-25 px-2 text-secondary border-right">What Equipment Service Is Needed</td><td class="w-75 px-2 font-weight-bold"><?= $record->what_equipment_service_is_needed ?></td></tr>
-        </tbody>
-    </table>
-</div>
-
-
-    </div>
-</div>
-
+    <h5 class='py-3 border-bottom'>Dashboard</h5>Controller: <b>clients_SINGLE</b><br>Action: <b>SUB_dashboard()</b><br>View: <b>pro/clients_SINGLE/SUB_dashboard.blade.php</b><br><br>
 
 @endsection

+ 621 - 0
resources/views/pro/clients_SINGLE/SUB_detail.blade.php

@@ -0,0 +1,621 @@
+@extends('pro.clients.view')
+@section('content-inner')
+
+    <div class="row mt-3">
+    <div class="col-12">
+
+        <div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Source
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editSource' title='Update source'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Source</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Source</td><td class="w-75 px-2 font-weight-bold"><?= $record->source ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Source Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->source_memo ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Source At</td><td class="w-75 px-2 font-weight-bold"><?= friendly_date_time($record->source_at) ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Source Detail</td><td class="w-75 px-2 font-weight-bold"><?= $record->source_detail ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Source Client</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_clients, 'name_display', [['id', '=', $record->source_client_id], ], 'all'); ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Source Pro</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->source_pro_id], ], 'all'); ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Source Facility</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_facilities, 'name', [['id', '=', $record->source_facility_id], ], 'all'); ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Duplicate
+                <span class="ml-auto"><!-- __GROUP_ACTION__ --></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Is Duplicate</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_duplicate ?>@if(! $record->is_duplicate) <a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsDuplicateToTrue' title='Set as duplicate of' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set As Duplicate Of</span></a> @endif
+@if( $record->is_duplicate) <a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsDuplicateToFalse' title='Set as not duplicate' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set As Not Duplicate</span></a> @endif</td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Duplicate of Client</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_clients, 'name_display', [['id', '=', $record->duplicate_of_client_id], ], 'all'); ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Name
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editName' title='Edit name'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Name</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Name Prefix</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_prefix ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Name First</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_first ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Name Middle</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_middle ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Name Last</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_last ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Name Suffix</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_suffix ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Name Credential</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_credential ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Name Nickname</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_nickname ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Name Maiden</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_maiden ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Name Previous</td><td class="w-75 px-2 font-weight-bold"><?= $record->name_previous ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Demographics
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editDemographics' title='Edit demographics'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Demographics</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Date of Birth</td><td class="w-75 px-2 font-weight-bold"><?= $record->dob ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Age In Years</td><td class="w-75 px-2 font-weight-bold"><?= $record->age_in_years ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Sex</td><td class="w-75 px-2 font-weight-bold"><?= $record->sex ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Gender Identity</td><td class="w-75 px-2 font-weight-bold"><?= $record->gender_identity ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Sexual Orientation</td><td class="w-75 px-2 font-weight-bold"><?= $record->sexual_orientation ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Sexually Active</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_sexually_active ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Sexually Active Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->sexually_active_memo ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Marital Status</td><td class="w-75 px-2 font-weight-bold"><?= $record->marital_status ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Spouse
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editSpouse' title='Edit spouse'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Spouse</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Spouse Relationship</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_relationships, 'name_display', [['id', '=', $record->spouse_relationship_id], ], 'all'); ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Intake
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editIntakeDetails' title='Edit intake details'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Intake Details</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Intake Text</td><td class="w-75 px-2 font-weight-bold"><?= $record->intake_text ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Intake Detail</td><td class="w-75 px-2 font-weight-bold"><?= $record->intake_detail ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Responsible party
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editResponsibleParty' title='Edit responsible party'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Responsible Party</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Is Responsible Party Someone Else</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_responsible_party_someone_else ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Responsible Party Relationship</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_relationships, 'name_display', [['id', '=', $record->responsible_party_relationship_id], ], 'all'); ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Emergency relationship
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editEmergencyRelationship' title='Edit emergency relationship'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Emergency Relationship</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Emergency Relationship</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_relationships, 'name_display', [['id', '=', $record->emergency_relationship_id], ], 'all'); ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Family
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editFamilyInfo' title='Edit family info'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Family Info</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Mother Relationship</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_relationships, 'name_display', [['id', '=', $record->mother_relationship_id], ], 'all'); ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mother Maiden Name</td><td class="w-75 px-2 font-weight-bold"><?= $record->mother_maiden_name ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Father Relationship</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_relationships, 'name_display', [['id', '=', $record->father_relationship_id], ], 'all'); ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Number Of Siblings</td><td class="w-75 px-2 font-weight-bold"><?= $record->number_of_siblings ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Birth Order</td><td class="w-75 px-2 font-weight-bold"><?= $record->birth_order ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Multiple Birth Member</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_multiple_birth_member ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Contact details
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editContactDetails' title='Edit contact details'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Contact Details</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Phone Home</td><td class="w-75 px-2 font-weight-bold"><?= $record->phone_home ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Phone Mobile</td><td class="w-75 px-2 font-weight-bold"><?= $record->phone_mobile ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Phone Work</td><td class="w-75 px-2 font-weight-bold"><?= $record->phone_work ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Phone Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->phone_memo ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Email Personal Primary</td><td class="w-75 px-2 font-weight-bold"><?= $record->email_personal_primary ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Email Personal Secondary</td><td class="w-75 px-2 font-weight-bold"><?= $record->email_personal_secondary ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Email Work Primary</td><td class="w-75 px-2 font-weight-bold"><?= $record->email_work_primary ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Email Work Secondary</td><td class="w-75 px-2 font-weight-bold"><?= $record->email_work_secondary ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Send Reminders By Email</td><td class="w-75 px-2 font-weight-bold"><?= $record->send_reminders_by_email ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Send Reminders By Text</td><td class="w-75 px-2 font-weight-bold"><?= $record->send_reminders_by_text ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Send Reminders By Phone</td><td class="w-75 px-2 font-weight-bold"><?= $record->send_reminders_by_phone ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Cell number
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putNewCellNumber' title='Put new cell number'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put New Cell Number</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Cell Number</td><td class="w-75 px-2 font-weight-bold"><?= $record->cell_number ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_sendCellNumberConfirmationMessage' title='sendCellNumberConfirmationMessage' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Send Cell Number Confirmation Message</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Cell Number Confirmation Pending </td><td class="w-75 px-2 font-weight-bold"><?= $record->is_cell_number_confirmation_pending  ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Cell Number Confirmation Token</td><td class="w-75 px-2 font-weight-bold"><?= $record->cell_number_confirmation_token ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Cell Number Confirmed </td><td class="w-75 px-2 font-weight-bold"><?= $record->is_cell_number_confirmed  ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Cell Number Confirmed At</td><td class="w-75 px-2 font-weight-bold"><?= friendly_date_time($record->cell_number_confirmed_at) ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Email Address
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putNewEmailAddress' title='Put new email address'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put New Email Address</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Email Address</td><td class="w-75 px-2 font-weight-bold"><?= $record->email_address ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_sendEmailAddressConfirmationMessage' title='sendEmailAddressConfirmationMessage' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Send Email Address Confirmation Message</span></a>
+<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_confirmEmailAddressWithConfirmationToken' title='confirmEmailAddressWithConfirmationToken' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Confirm Email Address With Confirmation Token</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Email Address Confirmation Pending</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_email_address_confirmation_pending ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Email Address Confirmation Token</td><td class="w-75 px-2 font-weight-bold"><?= $record->email_address_confirmation_token ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Email Address Confirmed</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_email_address_confirmed ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Email Address Confirmed At</td><td class="w-75 px-2 font-weight-bold"><?= friendly_date_time($record->email_address_confirmed_at) ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Credentials
+                <span class="ml-auto"><!-- __GROUP_ACTION__ --></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Username</td><td class="w-75 px-2 font-weight-bold"><?= $record->username ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Address
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editAddress' title='Edit address'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Address</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Is Same Address For Home And Mailing</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_same_address_for_home_and_mailing ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Home Address Line1</td><td class="w-75 px-2 font-weight-bold"><?= $record->home_address_line1 ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Home Address Line2</td><td class="w-75 px-2 font-weight-bold"><?= $record->home_address_line2 ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Home Address City</td><td class="w-75 px-2 font-weight-bold"><?= $record->home_address_city ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Home Address State</td><td class="w-75 px-2 font-weight-bold"><?= $record->home_address_state ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Home Address Zip</td><td class="w-75 px-2 font-weight-bold"><?= $record->home_address_zip ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Home Address Geo Lat</td><td class="w-75 px-2 font-weight-bold"><?= $record->home_address_geo_lat ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Home Address Geo Long</td><td class="w-75 px-2 font-weight-bold"><?= $record->home_address_geo_long ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mailing Address Line1</td><td class="w-75 px-2 font-weight-bold"><?= $record->mailing_address_line1 ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mailing Address Line2</td><td class="w-75 px-2 font-weight-bold"><?= $record->mailing_address_line2 ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mailing Address City</td><td class="w-75 px-2 font-weight-bold"><?= $record->mailing_address_city ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mailing Address State</td><td class="w-75 px-2 font-weight-bold"><?= $record->mailing_address_state ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mailing Address Zip</td><td class="w-75 px-2 font-weight-bold"><?= $record->mailing_address_zip ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mailing Address Geo Lat</td><td class="w-75 px-2 font-weight-bold"><?= $record->mailing_address_geo_lat ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mailing Address Geo Long</td><td class="w-75 px-2 font-weight-bold"><?= $record->mailing_address_geo_long ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Has Secondary Address</td><td class="w-75 px-2 font-weight-bold"><?= $record->has_secondary_address ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Reason For Secondary Address</td><td class="w-75 px-2 font-weight-bold"><?= $record->reason_for_secondary_address ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">When Is Client At Secondary Address</td><td class="w-75 px-2 font-weight-bold"><?= $record->when_is_client_at_secondary_address ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Same Secondary Address For Home And Mailing</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_same_secondary_address_for_home_and_mailing ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Secondary Home Address Line1</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_home_address_line1 ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Secondary Home Address Line2</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_home_address_line2 ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Secondary Home Address City</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_home_address_city ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Secondary Home Address State</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_home_address_state ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Secondary Home Address Zip</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_home_address_zip ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Secondary Home Address Geo Lat</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_home_address_geo_lat ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Secondary Home Address Geo Long</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_home_address_geo_long ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Secondary Mailing Address Line1</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_mailing_address_line1 ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Secondary Mailing Address Line2</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_mailing_address_line2 ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Secondary Mailing Address City</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_mailing_address_city ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Secondary Mailing Address State</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_mailing_address_state ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Secondary Mailing Address Zip</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_mailing_address_zip ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Secondary Mailing Address Geo Lat</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_mailing_address_geo_lat ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Secondary Mailing Address Geo Long</td><td class="w-75 px-2 font-weight-bold"><?= $record->secondary_mailing_address_geo_long ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Misc. Demographics
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editMiscDemographics' title='Update misc. demographics'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Misc. Demographics</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Citizenships</td><td class="w-75 px-2 font-weight-bold"><?= $record->citizenships ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Education</td><td class="w-75 px-2 font-weight-bold"><?= $record->education ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Birth Country</td><td class="w-75 px-2 font-weight-bold"><?= $record->birth_country ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Birth State</td><td class="w-75 px-2 font-weight-bold"><?= $record->birth_state ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Birth City</td><td class="w-75 px-2 font-weight-bold"><?= $record->birth_city ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Nationality</td><td class="w-75 px-2 font-weight-bold"><?= $record->nationality ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Religious Affiliation</td><td class="w-75 px-2 font-weight-bold"><?= $record->religious_affiliation ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Religious Facility Id</td><td class="w-75 px-2 font-weight-bold"><?= $record->religious_facility_id ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is On Special Diet</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_on_special_diet ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Special Diet Category</td><td class="w-75 px-2 font-weight-bold"><?= $record->special_diet_category ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Special Diet Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->special_diet_memo ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Preferred Language</td><td class="w-75 px-2 font-weight-bold"><?= $record->preferred_language ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Other Languages</td><td class="w-75 px-2 font-weight-bold"><?= $record->other_languages ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">English Level</td><td class="w-75 px-2 font-weight-bold"><?= $record->english_level ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Driver License State</td><td class="w-75 px-2 font-weight-bold"><?= $record->driver_license_state ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Driver License Number</td><td class="w-75 px-2 font-weight-bold"><?= $record->driver_license_number ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Hispanic</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_hispanic ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Black Oraa</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_black_oraa ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Ethnicities</td><td class="w-75 px-2 font-weight-bold"><?= $record->ethnicities ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Race</td><td class="w-75 px-2 font-weight-bold"><?= $record->race ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Specific Races</td><td class="w-75 px-2 font-weight-bold"><?= $record->specific_races ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Deceased
+                <span class="ml-auto"><!-- __GROUP_ACTION__ --></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Is Deceased</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_deceased ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsDeceasedToTrue' title='setIsDeseasedToTrue' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set Is Deseased To True</span></a>
+<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsDeceasedToFalse' title='setIsDeseasedToFalse' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set Is Deseased To False</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Date And Time Of Death</td><td class="w-75 px-2 font-weight-bold"><?= $record->date_and_time_of_death ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Cause Of Death</td><td class="w-75 px-2 font-weight-bold"><?= $record->cause_of_death ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Pharmacy
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editPharmacy' title='Edit pharmancy'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit Pharmancy</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Pharmacy</td><td class="w-75 px-2 font-weight-bold"><?= $record->pharmacy ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Pharmacy Facility</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_facilities, 'name', [['id', '=', $record->pharmacy_facility_id], ], 'all'); ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">SSN
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_editSsn' title='Edit SSN'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Edit SSN</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Ssn</td><td class="w-75 px-2 font-weight-bold"><?= $record->ssn ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">MCN
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putMcn' title='Put MSN'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put MSN</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Mcn</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_removeMcn' title='removeMcn' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove Mcn</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Was Medicare Validation Successful</td><td class="w-75 px-2 font-weight-bold"><?= $record->was_medicare_validation_successful ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Mcn Valid Number</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_mcn_valid_number ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcn Address Street Line1</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_address_street_line1 ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcn Address Street Line2</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_address_street_line2 ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcn Address City</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_address_city ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcn Address State</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_address_state ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcn Address Zip</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_address_zip ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Partbprimary</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_partbprimary ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Hospice</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_hospice ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcn Response Detail</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_response_detail ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Billing Address</td><td class="w-75 px-2 font-weight-bold"><?= $record->billing_address ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Reason Not Partb</td><td class="w-75 px-2 font-weight-bold"><?= $record->reason_not_partb ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Reason Not Partbmemo</td><td class="w-75 px-2 font-weight-bold"><?= $record->reason_not_partbmemo ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Medicare Advantage</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_medicare_advantage ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Medicare Advantage Plan</td><td class="w-75 px-2 font-weight-bold"><?= $record->medicare_advantage_plan ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcn Reject Reason Code</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_reject_reason_code ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcn Reject Reason Description</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_reject_reason_description ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcn Follow Up Action Code</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_follow_up_action_code ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcn Follow Up Action Description</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_follow_up_action_description ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcn Error Details</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcn_error_details ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Webcam
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateWebcamInfo' title='Update webcam info'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Webcam Info</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Has Webcam Device</td><td class="w-75 px-2 font-weight-bold"><?= $record->has_webcam_device ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Webcam Device</td><td class="w-75 px-2 font-weight-bold"><?= $record->webcam_device ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">MCP
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putMcp' title='Put MCP'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put MCP</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">MCP Pro</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->mcp_pro_id], ], 'all'); ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putMcp' title='putMcp' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put Mcp</span></a>
+<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_removeMcp' title='removeMcp' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove Mcp</span></a></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">MCP Visit
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateMcpOnboardingVisitInfo' title='Update source'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Source</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Has Mcp Done Onboarding Visit</td><td class="w-75 px-2 font-weight-bold"><?= $record->has_mcp_done_onboarding_visit ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcp Onboarding Visit Date</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcp_onboarding_visit_date ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcp Onboarding Visit Note Id</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcp_onboarding_visit_note_id ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Reason Onboarding Visit Note Outside System</td><td class="w-75 px-2 font-weight-bold"><?= $record->reason_onboarding_visit_note_outside_system ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Mcp Onboarding Active</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_mcp_onboarding_active ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateMcpOnboardingActiveInfo' title='updateMcpOnboardingActiveInfo' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Mcp Onboarding Active Info</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Why Is Mcp Onboarding Not Active Category</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_is_mcp_onboarding_not_active_category ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Why Is Mcp Onboarding Not Active Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_is_mcp_onboarding_not_active_memo ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">MCP Onboarding Pro
+                <span class="ml-auto"><!-- __GROUP_ACTION__ --></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">MCP Pro</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->mcp_onboarding_pro_id], ], 'all'); ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putMcpOnboardingPro' title='putMcpOnboardingPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put Mcp Onboarding Pro</span></a>
+<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_removeMcpOnboardingPro' title='removeMcpOnboardingPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove Mcp Onboarding Pro</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Has Mcp Onboarding Pro Accepted Assignment</td><td class="w-75 px-2 font-weight-bold"><?= $record->has_mcp_onboarding_pro_accepted_assignment ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_acceptAssignmentAsMcpOnboardingPro' title='acceptAssignmentAsMcpOnboardingPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Accept Assignment As Mcp Onboarding Pro</span></a>
+<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_rejectAssignmentAsMcpOnboardingPro' title='rejectAssignmentAsMcpOnboardingPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Reject Assignment As Mcp Onboarding Pro</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcp Onboarding Pro Decision To Accept Assignment At</td><td class="w-75 px-2 font-weight-bold"><?= friendly_date_time($record->mcp_onboarding_pro_decision_to_accept_assignment_at) ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Mcp Onboarding Pro Decision Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcp_onboarding_pro_decision_memo ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateMcpOnboardingProDecisionMemo' title='updateMcpOnboardingProDecisionMemo' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Mcp Onboarding Pro Decision Memo</span></a></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Onboarding Strategy
+                <span class="ml-auto"><!-- __GROUP_ACTION__ --></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Mcp Onboarding Strategy</td><td class="w-75 px-2 font-weight-bold"><?= $record->mcp_onboarding_strategy ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Next Mcp Onboarding Attempt Date Est</td><td class="w-75 px-2 font-weight-bold"><?= $record->next_mcp_onboarding_attempt_date_est ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateNextMcpOnboardingAttempt' title='updateNextMcpOnboardingAttempt' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Next Mcp Onboarding Attempt</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Next Mcp Onboarding Attempt Time Est</td><td class="w-75 px-2 font-weight-bold"><?= $record->next_mcp_onboarding_attempt_time_est ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Number Of Mcp Onboarding Phone Calls</td><td class="w-75 px-2 font-weight-bold"><?= $record->number_of_mcp_onboarding_phone_calls ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Number Of Mcp Onboarding In Person Visits</td><td class="w-75 px-2 font-weight-bold"><?= $record->number_of_mcp_onboarding_in_person_visits ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Other Key Pros
+                <span class="ml-auto"><!-- __GROUP_ACTION__ --></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">CM Pro</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->cm_pro_id], ], 'all'); ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putCmPro' title='putCmPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put Cm Pro</span></a>
+<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_removeCmPro' title='removeCmPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove Cm Pro</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">RME Pro</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->rme_pro_id], ], 'all'); ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putRmePro' title='putRmePro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put Rme Pro</span></a>
+<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_removeRmePro' title='removeRmePro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove Rme Pro</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">RMM Pro</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->rmm_pro_id], ], 'all'); ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putRmmPro' title='putRmmPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put Rmm Pro</span></a>
+<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_removeRmmPro' title='removeRmmPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove Rmm Pro</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">RD Pro</td><td class="w-75 px-2 font-weight-bold"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->rd_pro_id], ], 'all'); ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_putRdPro' title='putRdPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Put Rd Pro</span></a>
+<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_removeRdPro' title='removeRdPro' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove Rd Pro</span></a></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">MNT Eligibility
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateMntEligibility' title='Update MNT Eligibility'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update MNT Eligibility</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Eligible For Mnt</td><td class="w-75 px-2 font-weight-bold"><?= $record->eligible_for_mnt ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateMntEligibility' title='updateMntEligibility' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Mnt Eligibility</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Number Of Mnt Hours Left This Year</td><td class="w-75 px-2 font-weight-bold"><?= $record->number_of_mnt_hours_left_this_year ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">CM Enrollment
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateCmEligibility' title='Update CM Eligibility'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update CM Eligibility</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Is Eligible For Cm</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_eligible_for_cm ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Why Not Eligible For Cm Category</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_eligible_for_cm_category ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Why Not Eligible For Cm Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_eligible_for_cm_memo ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Enrolled In Cm</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_enrolled_in_cm ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsEnrolledInCmToFalse' title='setIsEnrolledInCmToFalse' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set Is Enrolled In Cm To False</span></a>
+<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsEnrolledInCmToTrue' title='setIsEnrolledInCmToTrue' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set Is Enrolled In Cm To True</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Cm Reason1</td><td class="w-75 px-2 font-weight-bold"><?= $record->cm_reason1 ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateCmReasons' title='updateCmReasons' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Cm Reasons</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Cm Reason2</td><td class="w-75 px-2 font-weight-bold"><?= $record->cm_reason2 ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Cm Enrollment Consent Method</td><td class="w-75 px-2 font-weight-bold"><?= $record->cm_enrollment_consent_method ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateCmEnrollmentConsentInfo' title='updateCmEnrollmentConsentInfo' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Cm Enrollment Consent Info</span></a>
+<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateWhyNotEnrolledInCm' title='updateWhyNotEnrolledInCm' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Why Not Enrolled In Cm</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Cm Enrollment Consent Method Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->cm_enrollment_consent_method_memo ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Why Not Enrolled In Cm Category</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_enrolled_in_cm_category ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Why Not Enrolled In Cm Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_enrolled_in_cm_memo ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">RM Enrollment
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateRmEligibility' title='Update why not enrolled in RM'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Why Not Enrolled In RM</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Is Eligible For Rm</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_eligible_for_rm ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateRmEligibility' title='updateRmEligibility' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Rm Eligibility</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Why Not Eligible For Rm Category</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_eligible_for_rm_category ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Why Not Eligible For Rm Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_eligible_for_rm_memo ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Enrolled In Rm</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_enrolled_in_rm ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsEnrolledInRmToFalse' title='setIsEnrolledInRmToFalse' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set Is Enrolled In Rm To False</span></a>
+<a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_setIsEnrolledInRmToTrue' title='setIsEnrolledInRmToTrue' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Set Is Enrolled In Rm To True</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Rm Reason1</td><td class="w-75 px-2 font-weight-bold"><?= $record->rm_reason1 ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateRmReasons' title='updateRmReasons' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Rm Reasons</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Rm Reason2</td><td class="w-75 px-2 font-weight-bold"><?= $record->rm_reason2 ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Why Not Enrolled In Rm Category</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_enrolled_in_rm_category ?><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateWhyNotEnrolledInRm' title='updateWhyNotEnrolledInRm' class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Why Not Enrolled In Rm</span></a></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Why Not Enrolled In Rm Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->why_not_enrolled_in_rm_memo ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Equipment
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/clients/view/<?= $record->uid ?>/ACTION_updateEquipmentInfo' title='Update equipment info'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Equipment Info</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Is Equipment Awaiting Setup</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_equipment_awaiting_setup ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">What Equipment Is Awaiting Setup</td><td class="w-75 px-2 font-weight-bold"><?= $record->what_equipment_is_awaiting_setup ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Equipment Setup Completed</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_equipment_setup_completed ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">What Equipment Setup Is Completed</td><td class="w-75 px-2 font-weight-bold"><?= $record->what_equipment_setup_is_completed ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Equipment Service Needed</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_equipment_service_needed ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">What Equipment Service Is Needed</td><td class="w-75 px-2 font-weight-bold"><?= $record->what_equipment_service_is_needed ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+
+    </div>
+</div>
+
+
+@endsection

+ 1 - 0
routes/generated.php

@@ -79,6 +79,7 @@ Route::prefix('/clients/view/{uid}')->group(function () {
 	Route::get('ACTION_updateWhyNotEnrolledInRm', 'clients_SINGLE_Controller@ACTION_updateWhyNotEnrolledInRm')->name('clients_SINGLE-ACTION_updateWhyNotEnrolledInRm');
 	Route::get('ACTION_updateEquipmentInfo', 'clients_SINGLE_Controller@ACTION_updateEquipmentInfo')->name('clients_SINGLE-ACTION_updateEquipmentInfo');
 	Route::get('SUB_dashboard', 'clients_SINGLE_Controller@SUB_dashboard')->name('clients_SINGLE-SUB_dashboard');
+	Route::get('SUB_detail', 'clients_SINGLE_Controller@SUB_detail')->name('clients_SINGLE-SUB_detail');
 	Route::get('SUB_measurements', 'clients_SINGLE_Controller@SUB_measurements')->name('clients_SINGLE-SUB_measurements');
 	Route::get('SUB_med_profile', 'clients_SINGLE_Controller@SUB_med_profile')->name('clients_SINGLE-SUB_med_profile');
 	Route::get('SUB_med_profile_log', 'clients_SINGLE_Controller@SUB_med_profile_log')->name('clients_SINGLE-SUB_med_profile_log');