From 66112a637ca6b98c67ad4fab68fad7f54bc85404 Mon Sep 17 00:00:00 2001 From: velz Date: Fri, 8 Mar 2024 14:04:06 +0530 Subject: [PATCH 01/48] FEAT_COND_EMP_PREMIMUM_CALC --- app/Controllers/EmployeeController.php | 13 +- app/Controllers/EmployeeServiceController.php | 66 +++++++++- app/Helpers/excel_util_helper.php | 123 +++++++++++++++++- app/Models/ClientPolicyModel.php | 4 +- app/Models/EmployeeModel.php | 1 + app/Models/PolicesModel.php | 40 ++++++ app/Views/employee_upload.php | 49 ++++++- 7 files changed, 288 insertions(+), 8 deletions(-) diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index 531eeb86..38109249 100644 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -110,12 +110,16 @@ class EmployeeController extends AdminController // print_r($this->request->getPost('upload-action-type')); // die(); // $empServiceController = new EmployeeServiceController(); - // $res = $empServiceController->excelFileFormatValidation(['file_id' => '34']); + // $res = $empServiceController->excelFileFormatValidation(['file_id' => '12']); // dd($res); // $empServiceController = new EmployeeServiceController(); // $res = $empServiceController->excelFileDataValidation(['file_id' => '12']); // dd($res); + + // $empServiceController = new EmployeeServiceController(); + // $res = $empServiceController->employeesOnboard(['file_id' => '34']); + // dd($res); // if(isset($res['error_summary']) && count($res['error_summary'])) // { @@ -158,7 +162,7 @@ class EmployeeController extends AdminController $action = $this->request->getPost('upload-action-type'); $status = 'inprogress'; - $file_id = $this->fileModel->insert(['file_name' => $filename,'client_id' => $client_id,'policy_id' => $policy_id,'created_by' => $loggedInUserID,'status' => $status,'action' => $action]); + $file_id = $this->fileModel->insert(['file_name' => $filename,'client_id' => $client_id,'policy_id' => $policy_id,'created_by' => $loggedInUserID,'status' => $status,'action' => $action]);//here field policy_id have client_policy_id and not policy id from policy master $this->myLogger->logme("error",'{file_id} uploaded success',['file_id' => $file_id]); //start validation process @@ -179,8 +183,9 @@ class EmployeeController extends AdminController $data['fileList'] = $this->fileModel ->select(['files.*','up.emp_code','up.first_name','pm.name as policy_name','c.short_name']) ->join('user_profiles up','files.created_by = up.id') - ->join('policies pm','files.policy_id = pm.id') - ->join('clients c','files.client_id = c.id') + ->join('client_policy cp','files.policy_id = cp.id') + ->join('policies pm','cp.policy_id = pm.id') + ->join('clients c','files.client_id = c.id and files.client_id = cp.client_id') ->where('files.created_by',8)->orderBy('files.created_at','desc')->findAll(); // dd($data['fileList']);die(); if($this->request->getMethod() == "get") diff --git a/app/Controllers/EmployeeServiceController.php b/app/Controllers/EmployeeServiceController.php index 5d97f51b..a64812fa 100644 --- a/app/Controllers/EmployeeServiceController.php +++ b/app/Controllers/EmployeeServiceController.php @@ -12,6 +12,7 @@ use App\Models\EmployeeModel; use App\Models\EmployeePolicyModel; use App\Models\ClientModel; use App\Models\ClientPolicyModel; +use App\Models\PolicesModel; use App\Models\FileModel; use App\Controllers\Jobs ; @@ -27,6 +28,7 @@ class EmployeeServiceController extends AdminController protected $clientModel; protected $fileModel; protected $clientPolicyModel; + protected $policiesModel; protected $general_relationships = ['self' => ['name' => 'Self', 'gender' => 'M','age_min' => 18,'age_max' => null], 'spouse' => ['name' => 'Spouse', 'gender' => 'F','age_min' => 18,'age_max' => null], 'son' => ['name' => 'Son', 'gender' => 'M','age_min' => null,'age_max' => 25], 'daughter' => ['name' => 'Daughter', 'gender' => 'F','age_min' => null,'age_max' => 25], 'father' => ['name' => 'Father', 'gender' => 'M','age_min' => 18,'age_max' => null], 'mother' => ['name' => 'Mother', 'gender' => 'F','age_min' => 18,'age_max' => null], 'father-in-law' => ['name' => 'Father in Law', 'gender' => 'M','age_min' => 18,'age_max' => null], 'mother-in-law' => ['name' => 'Mother in Law', 'gender' => 'F','age_min' => 18,'age_max' => null]]; protected $inception_excel_columns = ['sno' => ['col_idx' => 0,'col_cell_name' => 'A','col_name' => 'S.No','is_mandatory' => true,'data_type' => 'str','format' => null,'allowed_values' => null],'emp_id' => ['col_idx' => 1,'col_cell_name' => 'B','col_name' => 'EMP ID','is_mandatory' => true,'data_type' => 'str','format' => null,'allowed_values' => null],'name_of_emp_dep' => ['col_idx' => 2,'col_cell_name' => 'C','col_name' => 'NAME OF EMP/DEP','is_mandatory' => true,'data_type' => 'str','format' => null,'allowed_values' => null],'dob' => ['col_idx' => 3,'col_cell_name' => 'D','col_name' => 'DOB','is_mandatory' => ['I','A','DA'],'data_type' => 'str','format' => 'd-M-Y','allowed_values' => null,'custom' => 'check_dob_diff','params' => ['row','relationship']],'gender' => ['col_idx' => 4,'col_cell_name' => 'E','col_name' => 'Gender','is_mandatory' => ['I','A','DA'],'data_type' => 'str','format' => null,'allowed_values' => ['M','F']],'relationship' => ['col_idx' => 5,'col_cell_name' => 'F','col_name' => 'RELATIONSHIP','is_mandatory' => ['I','A','DA'],'data_type' => 'str','format' => null,'allowed_values' => null,'custom' => 'check_relationship','params' => ['row','relationship']],'basic_cover_si' => ['col_idx' => 6,'col_cell_name' => 'G','col_name' => 'BASIC COVER SI','is_mandatory' => ['I','A','DA'],'data_type' => 'str','format' => null,'allowed_values' => null],'doj' => ['col_idx' => 7,'col_cell_name' => 'H','col_name' => 'DOJ','is_mandatory' => false,'data_type' => 'str','format' => 'd-M-Y','allowed_values' => null,'custom' => 'check_doj','params' => ['row']],'basic_pay' => ['col_idx' => 8,'col_cell_name' => 'I','col_name' => 'Basic Pay','is_mandatory' => false,'data_type' => 'str','format' => null,'allowed_values' => null,'custom' => 'check_basic_pay','params' => ['row']],'band_grade' => ['col_idx' => 9,'col_cell_name' => 'J','col_name' => 'Band/Grade','is_mandatory' => false,'data_type' => 'str','format' => null,'allowed_values' => null,'custom' => 'check_employee_band','params' => ['row']],'designation' => ['col_idx' => 10,'col_cell_name' => 'K','col_name' => 'Designation','is_mandatory' => false,'data_type' => 'str','format' => null,'allowed_values' => null],'phone' => ['col_idx' => 11,'col_cell_name' => 'L','col_name' => 'Phone','is_mandatory' => false,'data_type' => 'str','format' => null,'allowed_values' => null],'email' => ['col_idx' => 12,'col_cell_name' => 'M','col_name' => 'Email','is_mandatory' => false,'data_type' => 'str','format' => null,'allowed_values' => null],'pre_existing_ailments' => ['col_idx' => 13,'col_cell_name' => 'N','col_name' => 'PRE EXISTING AILMENTS','is_mandatory' => ['I','A','DA'],'data_type' => 'str','format' => null,'allowed_values' => ['0','1']],'change_event' => ['col_idx' => 14,'col_cell_name' => 'O','col_name' => 'Change event','is_mandatory' => ['A','DA','D'],'data_type' => 'str','format' => null,'allowed_values' => null],'date_of_exit' => ['col_idx' => 15,'col_cell_name' => 'P','col_name' => 'Date of exit','is_mandatory' => ['D'],'data_type' => 'str','format' => 'd-M-Y','allowed_values' => null],'reason_for_exit' => ['col_idx' => 16,'col_cell_name' => 'Q','col_name' => 'Reason for exit','is_mandatory' => ['D'],'data_type' => 'str','format' => null,'allowed_values' => null],'action' => ['col_idx' => 17,'col_cell_name' => 'R','col_name' => 'Action','is_mandatory' => true,'data_type' => 'str','format' => null,'allowed_values' => ['I','A','D','DA'] ]]; @@ -40,6 +42,7 @@ class EmployeeServiceController extends AdminController $this->clientModel = new ClientModel(); $this->fileModel = new FileModel(); $this->clientPolicyModel = new ClientPolicyModel(); + $this->policiesModel = new PolicesModel(); } public function excelFileFormatValidation($params) @@ -332,7 +335,7 @@ class EmployeeServiceController extends AdminController { foreach($res['error_data'] as $key => $value) { - array_push($result['error_summary'],$value['code']); //record not avail for deletion + array_push($result['error_summary'],$value['code']); $result['error_data'][$rowid][($value['col_name'])]['error'][] = $value['msg']; } } @@ -379,5 +382,66 @@ class EmployeeServiceController extends AdminController } + + + public function employeesOnboard($params) + { + helper('excel_util_helper'); + //get file name + $file_id = $params['file_id']; + $file = $this->fileModel->find($file_id); + // dd($file); + $return = []; + if(!isset($file)) + { + //file not found in DB + return array('status' => false, 'msg' => 'file not found in DB'); + } + $file_name_with_path = WRITEPATH."/uploads/excel/".$file['file_name']; + + //check physical file + if(!file_exists($file_name_with_path)) + { + //file not found update status and reason + $message = "Physical file not found"; + // echo $message; + $this->myLogger->logme('error',($message . ' for file id ' . $file_id)); + $this->fileModel->where('id', $file_id)->set(['status' => 'failed','reason' => json_encode(['error_summary' => array_count_values([5]),'error_data' => $message])])->update(); + return array('error_summary' => [5], 'error_data' => $message); + } + + $columns_to_check = []; + if($file['action'] == 'inception'){ $columns_to_check = $this->inception_excel_columns; } + + // get policy and rack details + $policy_terms = $this->clientPolicyModel->getPolicyTermsJson($file['client_id'],$file['policy_id']); + // dd($policy_terms); + $policy_terms = json_decode($policy_terms[0]->policy_terms); + $policy_terms = (array) $policy_terms;// convert obj to array + // dd($policy_terms); + //get excel data + $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($file_name_with_path); + $sheet = $spreadsheet->getActiveSheet(); + + $highestRowAndColumn = $sheet->getHighestRowAndColumn(); + $excel_data = $sheet->rangeToArray('A1:' . $highestRowAndColumn['column'] . $highestRowAndColumn['row']); + unset($excel_data[0]); + + + //get policy slab rates + $slab_details = $this->policiesModel->getPolicySlabRatesForEmpOnboard($file['policy_id'],$file['client_id']); + dd($slab_details); + + $employee_data_group_by_family = data_group_by_family($excel_data); + dd($employee_data_group_by_family); + foreach ($employee_data_group_by_family as $emp_id => $family) + { + calculate_premimum($family,$policy_terms,$slab_details,$file); + } + + + } + + } diff --git a/app/Helpers/excel_util_helper.php b/app/Helpers/excel_util_helper.php index 1f1e9b47..ce67373e 100644 --- a/app/Helpers/excel_util_helper.php +++ b/app/Helpers/excel_util_helper.php @@ -225,8 +225,9 @@ if (!function_exists('name_and_empid_check_in_db')) $res = $employeeModel ->join('client_policy cp',"employees.client_id = cp.client_id") ->join('employee_polices ep',"cp.id = ep.client_policy_id AND employees.id = ep.employee_id") - ->where("cp.policy_id",$policy_id) + ->where("cp.client_policy",$policy_id) ->where("employees.client_id",$client_id) + ->where("ep.client_id",$client_id) ->like('name',$row[2],'both')->like('emp_code',$row[1],'both') ->findAll(); @@ -363,5 +364,125 @@ if (!function_exists('check_dependent_conflict')) } } +if (!function_exists('generate_relationship_code')) +{ + function generate_relationship_code($arr) + { + + } +} + +if (!function_exists('calculate_premimum')) +{ + function calculate_premimum($family_data,$policy_terms,$slab_details,$fileArr) + { + // grid type + // 1 = premium => si + $grid_type = $slab_details['grid_master']['ui_type']; + + if($grid_type != 10 && $grid_type != 11) // 10 & 11 for overall + { + foreach($family_data as $fkey => $member) + { + //transform as db row column + $transformed_familiy_member_data = transform_excel_data_to_db($member); + //generate relationship code + $transformed_familiy_member_data = generate_relationship_code($transformed_familiy_member_data); + //calculate primimum based on grid type + $transformed_familiy_member_data = calculation_manager($transformed_familiy_member_data,$policy_terms,$slab_details); + } + } + } +} + + +if (!function_exists('transform_excel_data_to_db')) +{ + function transform_excel_data_to_db($familyArr,$actionArr) + { + if($action == 'inception' || $action == 'addition') + { + + $policy['basic_cover_si'] = $arr[6]; + $policy['pre_existing_alignments'] = $arr[13]; + $policy['date_of_exit'] = isset($arr[15]) ? change_date_format($arr[15],'d-M-Y','Y-m-d') : NULL; + $policy['reason_for_exit'] = $arr[16]; + $policy['client_policy_id'] = $actionArr['policy_id']; + + + $result['emp_code'] = $arr[1]; + $result['name'] = $arr[2]; + $result['dob'] = isset($arr[3]) ? change_date_format($arr[3],'d-M-Y','Y-m-d') : NULL; + $result['gender'] = $arr[4]; + $result['relationship'] = $arr[5]; + $result['doj'] = isset($arr[7]) ? change_date_format($arr[7],'d-M-Y','Y-m-d') : NULL; + $result['basic_pay'] = $arr[8]; + $result['band'] = $arr[9]; + $result['designation'] = $arr[10]; + $result['mobile'] = $arr[11]; + $result['email_corporate'] = $arr[12]; + $result['file_id'] = $actionArr['id']; + $result['client_id'] = $actionArr['client_id']; + $result['change_event'] = $arr[14]; + $result['action'] = $arr[17]; + $result['policy_details'] = $policy; + + return $result; + + } + } +} + + +if (!function_exists('calculation_manager')) +{ + function calculation_manager($emp_data,$policy_terms,$slab_details) + { + // grid type + // 1 = premium => si + $grid_type = $slab_details['grid_master']['ui_type']; + + switch ($grid_type) { + case "1": + //GPA - Sum Insured (SI) * Multiplier + + break; + case "2": + //GPA - Flat Rate for all SI + break; + case "3": + //GMC - SI + break; + case "4": + //GMC - Employees Age band + break; + case "5": + //GMC - Employees Age + SI + break; + case "6": + //GMC - Employees + Dependent Age band + break; + case "7": + //GMC - Employees + Dependent Age + SI + break; + case "8": + //GMC - SI as per Grade or Band + break; + case "9": + //GMC - Flat Rate for all + break; + case "10": + //GMC - Maximum age of Dependents + break; + case "11": + //GMC - Maximum count per Family + break; + + default: + echo "Not a valid day"; +} + + } +} diff --git a/app/Models/ClientPolicyModel.php b/app/Models/ClientPolicyModel.php index e6955601..de91ab5e 100644 --- a/app/Models/ClientPolicyModel.php +++ b/app/Models/ClientPolicyModel.php @@ -35,6 +35,8 @@ class ClientPolicyModel extends Model "created_by", "updated_by", "Is_active", + "date_of_exit", + "reason_for_exit" ]; public function getClientPolicyById($id){ @@ -101,7 +103,7 @@ class ClientPolicyModel extends Model { return $this->select('policy_terms') ->where('client_id',$client_id) - ->where('policy_id',$policy_id) + ->where('id',$policy_id) ->get() ->getResult(); diff --git a/app/Models/EmployeeModel.php b/app/Models/EmployeeModel.php index 78cd79f4..8176101f 100644 --- a/app/Models/EmployeeModel.php +++ b/app/Models/EmployeeModel.php @@ -25,5 +25,6 @@ class EmployeeModel extends Model "created_by", "updated_by", "is_active", + "file_id" ]; } diff --git a/app/Models/PolicesModel.php b/app/Models/PolicesModel.php index c9dc0015..779def89 100644 --- a/app/Models/PolicesModel.php +++ b/app/Models/PolicesModel.php @@ -3,6 +3,9 @@ namespace App\Models; use CodeIgniter\Model; +use App\Models\policyGridModel; +use App\Models\policyPremium1Model; +use App\Models\policyPremium2Model; class PolicesModel extends Model { @@ -27,4 +30,41 @@ class PolicesModel extends Model ->get() ->getResult(); } + + + public function getPolicySlabRatesForEmpOnboard($policy_id,$client_id){ + + + // $data = $this->getPolicyPremium($policy_id); + // $pattern = '/gmc/i'; + // $subject = $data[0]->policy_type; + // if (preg_match($pattern, $subject)) { + // $search_term = 'GMC'; + // } else { + // $search_term = 'GPA'; + // } + + + $premium_slab_data = null; + // echo !isset($premium_slab_data);die(); + // if($search_term === 'GPA'){ + $policyPremium1Model = new policyPremium1Model(); + $premium_slab_data = $policyPremium1Model->where(['client_id' => $client_id, 'client_policy_id' => $policy_id, 'is_active' => 1])->findAll(); + if((isset($premium_slab_data))) + { + echo '2'; + $policyPremium2Model = new policyPremium2Model(); + $premium_slab_data = $policyPremium2Model->where(['client_id' => $client_id, 'client_policy_id' => $policy_id, 'is_active' => 1])->findAll(); + } + // }else{ + ; + // } + // dd($premium_slab_data); + // dd($policyPremium1Model->getLastQuery()); + //get policy id + $grid_id = $premium_slab_data[0]['policy_grid_id']; + $policyGridModel = new policyGridModel(); + $results = $policyGridModel->find($grid_id); + return ['slab_rates' => $premium_slab_data,'grid_master' => $results]; + } } diff --git a/app/Views/employee_upload.php b/app/Views/employee_upload.php index 3fe85db6..8131a280 100644 --- a/app/Views/employee_upload.php +++ b/app/Views/employee_upload.php @@ -281,7 +281,54 @@ // for (var ckey in col) // { - file_error_html += (err_id == 1 ? "Mandatory values missing "+err_count+"" : (err_id == 2 ? "Values not in expected format "+err_count+"" : (err_id == 3 ? "Field contains not allowed values "+err_count+"" : (err_id == 4 ? "Rule Conflict "+err_count+"" : (err_id == 5 ? ""+file_error_data['error_data']+"" : (err_id == 6 ? ""+file_error_data['error_data']+"" : "")))))); + // file_error_html += (err_id == 1 ? "Mandatory values missing "+err_count+"" : (err_id == 2 ? "Values not in expected format "+err_count+"" : (err_id == 3 ? "Field contains not allowed values "+err_count+"" : (err_id == 4 ? "Rule Conflict "+err_count+"" : (err_id == 5 ? ""+file_error_data['error_data']+"" : (err_id == 6 ? ""+file_error_data['error_data']+"" : "")))))); + // var message; + switch (err_id) { + case 1: + file_error_html += "Mandatory values missing " + err_count + ""; + break; + case 2: + file_error_html += "Values not in expected format " + err_count + ""; + break; + case 3: + file_error_html += "Field contains not allowed values " + err_count + ""; + break; + case 4: + file_error_html += "Rule Conflict " + err_count + ""; + break; + case 5: + file_error_html += "" + file_error_data['error_data'] + ""; + break; + case 6: + file_error_html += "" + file_error_data['error_data'] + ""; + break; + case 7: + file_error_html += "Duplicate entry in file " + err_count + ""; + break; + case 8: + file_error_html += "to be config"; + break; + case 9: + file_error_html += "Duplicate entry " + err_count + ""; + break; + case 10: + file_error_html += "Duplicate entry in file " + err_count + ""; + break; + case 11: + file_error_html += "Rule conflict: Dependents not allowed " + err_count + ""; + break; + case 12: + file_error_html += "Rule conflict: Dependent count greater than allowed dependent count " + err_count + ""; + break; + case 13: + file_error_html += "Rule conflict: Twofold relationship found within family " + err_count + ""; + break; + + default: + file_error_html += ""; + break; + } + file_error_html += '
'; // } From 00d4e9fbcc800e9aefbd1dfa92500d4eeb747c82 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Thu, 21 Mar 2024 08:27:52 +0530 Subject: [PATCH 02/48] FEAT_IMOPARTEXPORT_SIE_DEL_COMPLETE : RV --- app/Controllers/EmpDataServiceController.php | 315 +++++++++++++++-- app/Controllers/EmployeeController.php | 344 ++++++++++++++++--- app/Controllers/LoginController.php | 10 +- app/Helpers/excel_import_export_helper.php | 129 ++++++- app/Models/EmployeePolicyModel.php | 341 ++++++++++++++++-- app/Views/employee_upload.php | 1 - app/Views/insurer_or_tpa_data.php | 2 +- app/Views/policy_grid.php | 6 +- 8 files changed, 1018 insertions(+), 130 deletions(-) diff --git a/app/Controllers/EmpDataServiceController.php b/app/Controllers/EmpDataServiceController.php index 28efc8cf..b74999c9 100644 --- a/app/Controllers/EmpDataServiceController.php +++ b/app/Controllers/EmpDataServiceController.php @@ -49,18 +49,19 @@ class EmpDataServiceController extends BaseController } - public function batchFilesAndBatchListEntry($data, $filename, $objects){ + public function batchFilesAndBatchListEntry($data, $objects){ + $random_number_count = 4; $data['batch_code'] = generate_random_string($random_number_count); $data['created_by'] = get_session_userid(); - $data['file_name'] = $filename; + // $data['file_name'] = $filename; $insert = $this->batchFileModel->insert($data); $batch_file_batch_code = $this->batchFileModel->where('id', $insert)->first(); if($insert){ foreach($objects as $value){ $batch_list_data['batch_code'] = $batch_file_batch_code['batch_code']; - $batch_list_data['emp_policy_id'] = $value->employee_policy_id ?? $value->emp_id; + $batch_list_data['emp_policy_id'] = $value->primaryKey ?? $value->employee_policy_id ?? ''; $batch_list_data['created_by'] = get_session_userid(); $this->batchListModel->insert($batch_list_data); } @@ -70,60 +71,108 @@ class EmpDataServiceController extends BaseController } - public function generateExcelForAdditionandInception($batch_files_data, $export_data, $file_name) - { + /** + * Generates an Excel file for Inception_Addititon_DependentAddititon, Correction, SI_Enhancement and Deletion events based on given export data. + * + * @param array $export_data An array containing export data such as + * client_policy_id, + * insurer_or_tpa, + * event_type, + * actions, + * file_name. + * @return bool True if the Excel file is successfully generated and exported, otherwise false. + */ - $data = transform_objects_to_array_for_inception($export_data); + public function generateExcelForAdditionandInception($export_data) + { + // Fetch employee data for export from the database + $objects = $this->employeePolicyModel->getInceptionEmployeeDataForExportExcel($export_data['client_policy_id'], $export_data['insurer_or_tpa'], $export_data['event_type'], $export_data['actions']); + + // Log the count of exported data + $count = count($objects); + $export_data['count'] = $count; + $this->myLogger->logme('error', 'Inception export data count : {data}', ['data'=> $count ]); + + // If no data is found for export, return false + if($count == 0){ + return false; + } + + // Log the export file name + $this->myLogger->logme('error', 'Inception export file name : {data}', ['data'=> $export_data['file_name'] ]); + + // Transform retrieved objects to an array suitable for export + $data = transform_objects_to_array_for_inception($objects); + + // Define headers for the Excel file $headers = [ 'S.No', 'NAME OF EMP/DEP', 'EMP ID', 'EMP/DEP TYPE', 'RELATION', 'DOB', 'GENDER', 'PRE EXISTING AILMENTS', 'BASIC COVER SI', 'DATE OF COVERAGE', 'AGE', 'RELATIONSHIP', 'REMARKS', 'POLICY END DATE', 'NO OF DAYS', 'TPA ID', 'UHID', 'PREMIUM', 'PR0 RATA PREMIUM', 'GST', 'TOTAL' ]; - - // Create a temporary file in memory + + // Generate Excel file $tempFile = tmpfile(); + $success = generate_excel($headers, $data, $tempFile, 1); - // Generate Excel file with the temporary file - $value = generate_excel($headers, $data, $tempFile, 1); + // If Excel generation is successful + if ($success) { + // Batch files and list entry + $return = $this->batchFilesAndBatchListEntry($export_data, $objects); - // Generate a random filename - $randomFilename = $file_name; - - if($value){ - $return = $this->batchFilesAndBatchListEntry($batch_files_data, $randomFilename, $export_data); - if($return){ - - // Set the appropriate headers for Excel file download + // If batch operation is successful + if ($return) { + // Set headers for Excel file download header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); - header('Content-Disposition: attachment;filename="' . $randomFilename . '"'); + header('Content-Disposition: attachment;filename="' . $export_data['file_name'] . '"'); header('Cache-Control: max-age=0'); - // Rewind the temporary file pointer + // Output file contents rewind($tempFile); - - // Output the contents of the temporary file to the browser fpassthru($tempFile); - // Close and remove the temporary file + // Close and remove temporary file fclose($tempFile); - }else{ - return false; - } + return true; // Excel file successfully generated and exported + } else { + return false; // Batch operation failed + } } - - + return false; // Excel generation failed } - - public function generateExcelForCorrection($file_name, $objects, $batch_files_data) + + public function generateExcelForCorrection($export_data) { + $objects = $this->employeePolicyModel->getCorrectionEmployeesDataForExportExcel($export_data['client_id'], $export_data['client_policy_id'], $export_data['insurer_or_tpa']); + // dd($objects); + $count = count($objects); + $export_data['count'] = $count; + $this->myLogger->logme('error','Correction export data count : {data}', ['data'=> $count ]); + + if($count == 0){ + return false; + } + + $this->myLogger->logme('error','Correction export file name : {data}', ['data'=> $export_data['file_name'] ]); + $correction_data = transform_objects_to_array_for_correction($objects); $headers = [ - 'Emp Code', 'RISK ID', 'NAME OF EMP/DEP', 'EMP/DEP TYPE', 'RELATION', 'DOB', 'GENDER', 'Wrong Data', 'Correct Data', 'Remarks', 'Endorsement_Id' + 'Emp Code', + 'RISK ID', + 'NAME OF EMP/DEP', + 'EMP/DEP TYPE', + 'RELATION', + 'DOB', + 'GENDER', + 'Wrong Data', + 'Correct Data', + 'Remarks', + 'Endorsement_Id' ]; @@ -132,17 +181,93 @@ class EmpDataServiceController extends BaseController // Generate Excel file with the temporary file $value = generate_excel($headers, $correction_data, $tempFile); - - // Generate a random filename - $randomFilename = $file_name; - + if($value){ - $return = $this->batchFilesAndBatchListEntry($batch_files_data, $randomFilename, $objects); + $return = $this->batchFilesAndBatchListEntry($export_data, $objects); if($return){ // Set the appropriate headers for Excel file download header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); - header('Content-Disposition: attachment;filename="' . $randomFilename . '"'); + header('Content-Disposition: attachment;filename="' . $export_data['file_name'] . '"'); + header('Cache-Control: max-age=0'); + + // Rewind the temporary file pointer + rewind($tempFile); + + // Output the contents of the temporary file to the browser + fpassthru($tempFile); + + // Close and remove the temporary file + fclose($tempFile); + + return true; + + }else{ + + return false; + } + } + + } + + + public function generateExcelForSIEnhancement($export_data) + { + + $objects = $this->employeePolicyModel->getSIEnhancementEmployeesDataForExportExcel($export_data['client_id'], $export_data['client_policy_id'], $export_data['insurer_or_tpa']); + + // dd($objects); + + $count = count($objects); + $export_data['count'] = $count; + + $this->myLogger->logme('error','SI_Enhancement export data count : {data}', ['data'=> $count ]); + + if($count == 0){ + return false; + } + + $this->myLogger->logme('error','SI_Enhancement export file name : {data}', ['data'=> $export_data['file_name'] ]); + + $si_data = transform_objects_to_array_for_si_enhancement($objects); + + $headers = [ + 'S.No', + 'NAME OF EMP/DEP', + 'EMP ID', + 'EMP/DEP TYPE', + 'RELATION', + 'DOB', + 'GENDER', + 'PRE EXISTING AILMENTS', + 'BASIC COVER SI', + 'Old Sum Insured', + 'Date of Coverage', + 'Policy End Date', + 'No Of Days', + 'Old SI Premium', + 'New SI premium', + 'Difference premium', + 'Pro Rata Premium', + 'GST', + 'Total', + 'ENDORSEMENT_ID' + ]; + + + // Create a temporary file in memory + $tempFile = tmpfile(); + + // Generate Excel file with the temporary file + $value = generate_excel($headers, $si_data, $tempFile); + + if($value){ + $return = $this->batchFilesAndBatchListEntry($export_data, $objects); + if($return){ + + // Set the appropriate headers for Excel file download + header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); + header('Content-Disposition: attachment;filename="' . $export_data['file_name'] . '"'); header('Cache-Control: max-age=0'); // Rewind the temporary file pointer @@ -161,6 +286,120 @@ class EmpDataServiceController extends BaseController } } + } - + + + public function generateExcelForDeletion($export_data) + { + + $objects = $this->employeePolicyModel->getDeletionEmployeeDataForExportExcel($export_data['client_id'], $$export_data['client_policy_id'], $$export_data['insurer_or_tpa']); + $count = count($objects); + $export_data['count'] = $count; + + $this->myLogger->logme('error','Deletion export data count : {data}', ['data'=> $count ]); + + if($count == 0){ + return false; + } + + $this->myLogger->logme('error','Deletion export file name : {data}', ['data'=> $export_data['file_name'] ]); + + $si_data = transform_objects_to_array_for_deletion($objects); + + // dd($si_data); + + $headers = [ + 'S.No', + 'EMP ID', + 'EMP NAME', + 'DOB', + 'GENDER', + 'RELATIONSHIP', + 'SUM INSURED', + 'Date of Leaving', + 'Policy End Date', + 'No Of Days', + 'Premium', + 'Pro Rata Premium', + 'GST', + 'Total', + 'Claim Status', + 'ENDORSEMENT_ID' + ]; + + + // Create a temporary file in memory + $tempFile = tmpfile(); + + // Generate Excel file with the temporary file + $value = generate_excel($headers, $si_data, $tempFile, 2); + + if($value){ + $return = $this->batchFilesAndBatchListEntry($export_data, $objects); + if( $return){ + + // Set the appropriate headers for Excel file download + header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); + header('Content-Disposition: attachment;filename="' . $export_data['file_name'] . '"'); + header('Cache-Control: max-age=0'); + + // Rewind the temporary file pointer + rewind($tempFile); + + // Output the contents of the temporary file to the browser + fpassthru($tempFile); + + // Close and remove the temporary file + fclose($tempFile); + + return true; + + }else{ + return false; + } + } + + + } + + + public function cashDepositCalculationForInception($arrayData = []) + { + $arrayData = array( + array( + 0 => 6, + 1 => 10, + 2 => 17, + 3 => 101, + 4 => 102 + ), + ); + + // Flatten the array to get all IDs in a single array + $idArray = call_user_func_array('array_merge', $arrayData); + + // Select from the employee_policy table where the id is in the $idArray + $results = $this->employeePolicyModel + ->select('employee_polices.pro_rata_premium') + ->whereIn('id', $idArray) + ->get() + ->getResultArray(); + + // Output the results + print_r($results); die; + + } + + public function cashDepositCalculationForSIEnhancement($arrayData) + { + + } + + public function cashDepositCalculationForDeletion($arrayData) + { + + } + + // ----------------------------------------------------------------------------------- } diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index 21448fe0..d04be584 100644 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -259,58 +259,70 @@ class EmployeeController extends AdminController $this->myLogger->logme('error','importExport function called'); $empDataServiceController = new EmpDataServiceController(); + $client_id = $this->request->getPost('client_id'); $client_policy_id = $this->request->getPost('client_policy_id'); $insurer_or_tpa = $this->request->getPost('insurer_or_tpa'); $event_type = $this->request->getPost('event_type'); - $actions = $this->request->getPost('action_type'); + $actions = $this->request->getPost('action_type'); + $client_data = $this->clientModel->where('id', $client_id)->first(); + $policy_name = $this->clientPolicyModel->select('policies.name')->join('policies', 'policies.id = client_policy.policy_id')->where('client_policy.id', $client_policy_id)->first(); + $file_name = generate_filename($client_data['short_name'], $event_type, $actions, $insurer_or_tpa, $policy_name['name']); + $batch_data = [ 'client_id' => $client_id, 'client_policy_id' => $client_policy_id, 'insurer_or_tpa' => $insurer_or_tpa, 'event_type' => $event_type, 'actions' => $actions, + 'file_name' => $file_name, ]; - $client_data = $this->clientModel->where('id', $client_id)->first(); - $policy_name = $this->clientPolicyModel->select('policies.name') - ->join('policies', 'policies.id = client_policy.policy_id') - ->where('client_policy.id', $client_policy_id)->first(); - $file_name = generate_filename($client_data['short_name'], $event_type, $actions, $insurer_or_tpa, $policy_name['name']); - if($actions == 'export'){ if($event_type == 'inception'){ - $objects = $this->employeePolicyModel->getInceptionEmployeeDataForExportExcel($client_policy_id, $insurer_or_tpa, $event_type, $actions); - $count = count($objects); - $this->myLogger->logme('error','Inception export data count : {data}', ['data'=> $count ]); - $batch_data['count'] = $count; - - if($count == 0){ + $return = $empDataServiceController->generateExcelForAdditionandInception($batch_data); + if(!$return){ + session()->setFlashdata('error', 'No data found about this action'); + return redirect()->to(base_url('employee/upload')); + } else{ + $this->myLogger->logme('error','Successfully exported Excel file in Inception/Addition/DependentAddition.'); + } - session()->setFlashdata('error', 'No data found'); - return redirect()->to(base_url('employee/upload')); - } + } else if($event_type == 'correction'){ - $this->myLogger->logme('error','Inception export file name : {data}', ['data'=> $file_name ]); - $empDataServiceController->generateExcelForAdditionandInception($batch_data, $objects, $file_name); + $return = $empDataServiceController->generateExcelForCorrection($batch_data); + if(!$return){ + session()->setFlashdata('error', 'No data found about this action'); + return redirect()->to(base_url('employee/upload')); + } else{ + $this->myLogger->logme('error','Successfully exported Excel file in Correction.'); + } - } else if($event_type == 'correction'){ + } else if($event_type == 'si_enhancement'){ - $objects = $this->employeePolicyModel->getCorrectionEmployeesDataForExportExcel($client_id, $client_policy_id, $insurer_or_tpa); - $count = count($objects); - $this->myLogger->logme('error','Correction export data count : {data}', ['data'=> $count ]); - $batch_data['count'] = $count; - if($count == 0){ - session()->setFlashdata('error', 'No data found'); - return redirect()->to(base_url('employee/upload')); - } - $this->myLogger->logme('error','Correction export file name : {data}', ['data'=> $file_name ]); - $empDataServiceController->generateExcelForCorrection($file_name, $objects, $batch_data); + $return = $empDataServiceController->generateExcelForSIEnhancement($batch_data); + if(!$return){ + session()->setFlashdata('error', 'No data found about this action'); + return redirect()->to(base_url('employee/upload')); + } else{ + $this->myLogger->logme('error','Successfully exported Excel file in SI_Enhancement.'); + } + + }else if($event_type == 'deletion'){ + + $return = $empDataServiceController->generateExcelForDeletion($batch_data); + if(!$return){ + session()->setFlashdata('error', 'No data found about this action'); + return redirect()->to(base_url('employee/upload')); + } else{ + $this->myLogger->logme('error','Successfully exported Excel file in Deletion.'); + } } + }else if($actions == 'import'){ if($event_type == 'inception'){ @@ -328,22 +340,28 @@ class EmployeeController extends AdminController $batch_data['batch_code'] = $batch_code; $batch_data['created_by'] = get_session_userid(); $batch_data['file_name'] = $filename; - $insert = $this->batchFileModel->insert($batch_data); - $batch_file_batch_code = $this->batchFileModel->where('id', $insert)->first(); + // $insert = $this->batchFileModel->insert($batch_data); + $batch_file_batch_code = $this->batchFileModel->where('id', 2)->first(); + $batch_code_for_batch_list['batch_code'] = $batch_file_batch_code['batch_code']; + $batch_code_for_batch_list['created_by'] = get_session_userid(); + $file_name_with_path = WRITEPATH."/uploads/import_excel/".$batch_file_batch_code['file_name']; //check the file exist or not if(!file_exists($file_name_with_path)) { - session()->setFlashdata('error', 'File not found'); - return redirect()->to(base_url('employee/upload')); + // session()->setFlashdata('error', 'File not found'); + // return redirect()->to(base_url('employee/upload')); } $data = read_excel_file_to_array($file_name_with_path); unset($data[0]); array_pop($data); + $count = count($data); + // $this->batchFileModel->where('id', $insert)->set('count', $count)->update(); // dd($data ); + $employeeIds = []; foreach ($data as $key => $value) { // Check if the array is not empty and has the necessary data if (!empty($value) && (isset($value[15]) || isset($value[16]))) { @@ -354,21 +372,43 @@ class EmployeeController extends AdminController $emp_code = $value[2]; $name = $value[1]; - // echo $tpa_id, $uhid, $emp_code, $name; die; + $val = $this->employeePolicyModel + ->select('employee_polices.id') + ->join('employees', 'employees.id = employee_polices.employee_id') + ->where('employee_polices.client_policy_id', $client_policy_id) + ->where('employees.client_id', $client_id) + ->where('employees.name', $name) + ->where('employees.emp_code', $emp_code) + ->where('employee_polices.is_active', 1) + ->first(); + $batch_code_for_batch_list['emp_policy_id'] = $val['id']; + $this->batchListModel->insert($batch_code_for_batch_list); + array_push($employeeIds, $val['id']); + $this->employeePolicyModel->updateTPAIDorUHID( $client_policy_id, $client_id, $name, $emp_code, $uhid, $tpa_id); - $query = $this->employeePolicyModel->getLastQuery(); - echo $query . "
"; + + // $query = $this->employeePolicyModel->getLastQuery(); + // echo $query . "
"; }else{ - session()->setFlashdata('error', 'Something went wrong'); - return redirect()->to(base_url('employee/upload')); + // session()->setFlashdata('error', 'Something went wrong'); + // return redirect()->to(base_url('employee/upload')); } } + $action = ['action' => 'inception']; + + $depositeData = [ + $employeeIds, + $action + ]; + $empDataServiceController->cashDepositCalculationForInception(); + // echo '
';
+                // print_r($depositeData); die;
                 
-                session()->setFlashdata('success', 'Data updated successfully');
-                return redirect()->to(base_url('employee/upload'));
+                // session()->setFlashdata('success', 'Data updated successfully');
+                // return redirect()->to(base_url('employee/upload'));
 
             }else if($event_type == 'correction'){
 
@@ -388,6 +428,9 @@ class EmployeeController extends AdminController
                 $insert = $this->batchFileModel->insert($batch_data);
                 $batch_file_batch_code = $this->batchFileModel->where('id', $insert)->first();
 
+                $batch_code_for_batch_list['batch_code'] = $batch_file_batch_code['batch_code'];
+                $batch_code_for_batch_list['created_by'] = get_session_userid();
+
                 $file_name_with_path = WRITEPATH."/uploads/import_excel/".$batch_file_batch_code['file_name'];
 
                 if(!file_exists($file_name_with_path))
@@ -398,6 +441,8 @@ class EmployeeController extends AdminController
 
                 $data = read_excel_file_to_array($file_name_with_path);
                 unset($data[0]);
+                $count = count($data);
+                $this->batchFileModel->where('id', $insert)->set('count', $count)->update();
                 // dd($data);
                 foreach ($data as $key => $value) {
 
@@ -406,10 +451,23 @@ class EmployeeController extends AdminController
                         $emp_code = $value[0];
                         $uhid = $value[1];
                         $endorsement_id = $value[10] != null ? $value[10] : '';
+
+                        $val = $this->employeePolicyModel
+                        ->select('employees.id')
+                        ->join('employees', 'employees.id = employee_polices.employee_id')
+                        ->where('employee_polices.client_policy_id', $client_policy_id)
+                        ->where('employees.client_id', $client_id)
+                        ->where('employee_polices.uhid', $uhid)
+                        ->where('employees.emp_code', $emp_code)
+                        ->where('employees.is_active', 1)
+                        ->first();
+                        $batch_code_for_batch_list['emp_policy_id'] = $val['id'];
+                        $this->batchListModel->insert($batch_code_for_batch_list);
+
                         // $this->employeePolicyModel->updateCorrectionData($emp_code, $uhid, $endorsement_id);
 
                        $queryData =  $this->empEndorsementModel->select('emp_endorsement.*')
-                                ->join('employees', 'employees.id = emp_endorsement.emp_id')
+                                ->join('employees', 'employees.id = emp_endorsement.pk')
                                 ->join('employee_polices', 'employee_polices.employee_id = employees.id')
                                 ->where('employees.emp_code', $emp_code)
                                 ->where('employees.client_id', $client_id)
@@ -430,8 +488,206 @@ class EmployeeController extends AdminController
                             $this->employeeModel->where('id', $emp_id)->set($field_name, $new_value)->update();
                         }
 
-                        $query = $this->employeePolicyModel->getLastQuery();
-                        echo $query . "
"; + // $query = $this->employeePolicyModel->getLastQuery(); + // echo $query . "
"; + }else{ + session()->setFlashdata('error', 'Something went wrong'); + return redirect()->to(base_url('employee/upload')); + } + + } + + session()->setFlashdata('success', 'Data updated successfully'); + return redirect()->to(base_url('employee/upload')); + + }else if($event_type == 'si_enhancement'){ + + $file = $this->request->getFile('import_file_data'); + $is_moved = $file->move(WRITEPATH . 'uploads/import_excel'); + $filename = $file->getName(); + + $this->myLogger->logme('error','SI_Enhancement Import file name : {data}', ['data'=> $filename ]); + $random_number_count = 4; + $batch_code = generate_random_string($random_number_count); + $this->myLogger->logme('error','SI_Enhancement Import BATCH CODE : {data}', ['data'=> $batch_code ]); + + + $batch_data['batch_code'] = $batch_code; + $batch_data['created_by'] = get_session_userid(); + $batch_data['file_name'] = $filename; + $insert = $this->batchFileModel->insert($batch_data); + $batch_file_batch_code = $this->batchFileModel->where('id', $insert)->first(); + + $batch_code_for_batch_list['batch_code'] = $batch_file_batch_code['batch_code']; + $batch_code_for_batch_list['created_by'] = get_session_userid(); + + $file_name_with_path = WRITEPATH."/uploads/import_excel/".$batch_file_batch_code['file_name']; + + if(!file_exists($file_name_with_path)) + { + session()->setFlashdata('error', 'File not found'); + return redirect()->to(base_url('employee/upload')); + } + + $data = read_excel_file_to_array($file_name_with_path); + unset($data[0]); + $count = count($data); + $this->batchFileModel->where('id', $insert)->set('count', $count)->update(); + // dd($data); + foreach ($data as $key => $value) { + + if (!empty($value) && isset($value[19])) { + + $emp_name = $value[1]; + $emp_code = $value[2]; + // echo $emp_name .'-'. $emp_code; die; + $endorsement_id = $value[19] != null ? $value[19] : ''; + + $val = $this->employeePolicyModel + ->select('employee_polices.id') + ->join('employees', 'employees.id = employee_polices.employee_id') + ->where('employee_polices.client_policy_id', $client_policy_id) + ->where('employees.client_id', $client_id) + ->where('employees.name', $emp_name) + ->where('employees.emp_code', $emp_code) + ->where('employee_polices.is_active', 1) + ->first(); + $batch_code_for_batch_list['emp_policy_id'] = $val['id']; + $this->batchListModel->insert($batch_code_for_batch_list); + + + $this->employeePolicyModel->updateEndoresmentIdForSIEnhancement($emp_code, $client_id, $client_policy_id, $emp_name, $endorsement_id); + + $queryData = $this->employeePolicyModel + ->select('employee_polices.*') + ->join('employees', 'employee_polices.employee_id = employees.id') + ->where('employees.emp_code', $emp_code) + ->where('employees.name', $emp_name) + ->where('employees.client_id', $client_id) + ->where('employee_polices.client_policy_id', $client_policy_id) + ->where('employee_polices.is_active', 1) + ->first(); + + $queryData['is_active'] = 0; + $this->employeePolicyModel->save($queryData); + + unset($queryData['id']); + unset($queryData['created_by']); + unset($queryData['created_at']); + unset($queryData['updated_by']); + unset($queryData['updated_at']); + unset($queryData['is_active']); + + $queryData['basic_cover_si'] = $value[8]; + $queryData['premium'] = $value[14]; + $queryData['si_enhancement_date'] = $value[10]; + $queryData['rata_premimum'] = $value[16]; + $queryData['gst'] = $value[17]; + $queryData['created_by'] = get_session_userid(); + + //new insert + $this->employeePolicyModel->save($queryData); + + + // $query = $this->employeePolicyModel->getLastQuery(); + // echo $query . "
"; + }else{ + session()->setFlashdata('error', 'Something went wrong'); + return redirect()->to(base_url('employee/upload')); + } + + } + + session()->setFlashdata('success', 'Data updated successfully'); + return redirect()->to(base_url('employee/upload')); + + }else if($event_type == 'deletion'){ + + $file = $this->request->getFile('import_file_data'); + $is_moved = $file->move(WRITEPATH . 'uploads/import_excel'); + $filename = $file->getName(); + + $this->myLogger->logme('error','Deletion Import file name : {data}', ['data'=> $filename ]); + $random_number_count = 4; + $batch_code = generate_random_string($random_number_count); + $this->myLogger->logme('error','Deletion Import BATCH CODE : {data}', ['data'=> $batch_code ]); + + + $batch_data['batch_code'] = $batch_code; + $batch_data['created_by'] = get_session_userid(); + $batch_data['file_name'] = $filename; + $insert = $this->batchFileModel->insert($batch_data); + $batch_file_batch_code = $this->batchFileModel->where('id', $insert)->first(); + + $batch_code_for_batch_list['batch_code'] = $batch_file_batch_code['batch_code']; + $batch_code_for_batch_list['created_by'] = get_session_userid(); + + $file_name_with_path = WRITEPATH."/uploads/import_excel/".$batch_file_batch_code['file_name']; + + if(!file_exists($file_name_with_path)) + { + session()->setFlashdata('error', 'File not found'); + return redirect()->to(base_url('employee/upload')); + } + + $data = read_excel_file_to_array($file_name_with_path); + unset($data[0]); + array_pop($data); + + $count = count($data); + $this->batchFileModel->where('id', $insert)->set('count', $count)->update(); + + foreach ($data as $key => $value) { + + if (!empty($value) && isset($value[15])) { + + $emp_name = $value[2]; //employee name + $emp_code = $value[1]; //employee code + $date_of_exit = $value[7]; // date of releving + + // echo $emp_name .'-'. $emp_code .'-'. $date_of_exit; die; + $endorsement_id = $value[15] != null ? $value[15] : ''; //endorsement id + + $val = $this->employeePolicyModel + ->select('employee_polices.id') + ->join('employees', 'employees.id = employee_polices.employee_id') + ->where('employee_polices.client_policy_id', $client_policy_id) + ->where('employees.client_id', $client_id) + ->where('employees.name', $emp_name) + ->where('employees.emp_code', $emp_code) + ->where('employee_polices.is_active', 1) + ->first(); + $batch_code_for_batch_list['emp_policy_id'] = $val['id']; + $this->batchListModel->insert($batch_code_for_batch_list); + + $this->employeePolicyModel->updateEndoresmentIdForDeletion($emp_code, $client_id, $client_policy_id, $emp_name, $endorsement_id); + + $deletionDataForEmployee = $this->empEndorsementModel + ->select('emp_endorsement.new_value, employees.id') + ->join('employees', 'emp_endorsement.emp_code = employees.emp_code') + ->join('employee_polices', 'employee_polices.employee_id = employees.id') + ->where('emp_endorsement.emp_code', $emp_code) + ->where('employees.client_id', $client_id) + ->where('employee_polices.client_policy_id', $client_policy_id) + ->where('emp_endorsement.name', $emp_name) + ->where('emp_endorsement.field_name', 'emp_status') + ->first(); + + $deletionDataForEmployee['updated_by'] = get_session_userid(); + $this->employeeModel->save($deletionDataForEmployee); + + + $deletionDataForEmployeePolicy = $this->employeePolicyModel->fetchEmpEndorsementData($emp_code, $client_policy_id, $emp_name); + $deletionDataForEmployeePolicy['updated_by'] = get_session_userid(); + $this->employeePolicyModel->save($deletionDataForEmployeePolicy); + + // echo '
';
+                        // print_r($deletionDataForEmployeePolicy); die;
+                        
+                        $this->employeePolicyModel->save($deletionDataForEmployeePolicy);
+                        
+                        // $query = $this->employeePolicyModel->getLastQuery();
+                        // echo $query . "
"; }else{ session()->setFlashdata('error', 'Something went wrong'); return redirect()->to(base_url('employee/upload')); @@ -449,5 +705,5 @@ class EmployeeController extends AdminController } - + // ------------------------------------------------------------------------------------------- } \ No newline at end of file diff --git a/app/Controllers/LoginController.php b/app/Controllers/LoginController.php index d18cb98c..c24f4ddc 100644 --- a/app/Controllers/LoginController.php +++ b/app/Controllers/LoginController.php @@ -45,20 +45,20 @@ class LoginController extends BaseController $session_data = ['isLoggedIn' => True ,'userid' => $user->id]; set_session_data($session_data); log_message('error', 'Set The UserId : `'. $user->id .'` in Session'); - log_message('error', 'Is User Login Sucessfully'); + log_message('error', 'User Login Sucessfully'); // $this->getUserDeviceInfo($user->id); $this->getUserDeviceInfo($user->id, 'NhanceUser'); return redirect()->to(base_url('/dashboard/view')); }else{ - log_message('error', 'Is User Not Activate'); - session()->setFlashdata('error', 'Is User Not Activate'); + log_message('error', 'User Not Activate'); + session()->setFlashdata('error', 'User Not Activate'); return redirect()->to(base_url('login')); } }else{ - log_message('error', 'Is User Not Register'); - session()->setFlashdata('error', 'Is User Not Register'); + log_message('error', 'User Not Register'); + session()->setFlashdata('error', 'User Not Register'); return redirect()->to(base_url('login')); } } diff --git a/app/Helpers/excel_import_export_helper.php b/app/Helpers/excel_import_export_helper.php index e594f650..55ed7eda 100644 --- a/app/Helpers/excel_import_export_helper.php +++ b/app/Helpers/excel_import_export_helper.php @@ -48,6 +48,19 @@ if (!function_exists('generate_random_string')) { if (!function_exists('generate_excel')) { + + /* + This function generates an Excel file using the given headers and data and saves it with the specified filename. + It utilizes the PhpSpreadsheet library to create and manipulate Excel files. + + Parameters: + - $headers: An array containing the column headers for the Excel sheet. + - $data: An array containing the data to be inserted into the Excel sheet. + - $filename: The name of the file to be saved. + - $totals (optional): A flag indicating whether to include total calculations in the Excel sheet. + */ + + function generate_excel($headers, $data, $filename, $totals = null) { // Create new Spreadsheet object @@ -62,9 +75,11 @@ if (!function_exists('generate_excel')) { // Set data into the spreadsheet $spreadsheet->getActiveSheet()->fromArray($data, null, 'A2'); - if($totals){ + if($totals == 1){ // Call the helper function for Calculate GST, Pro Rata Premium, and Total sums for inception add_totals_row($spreadsheet, $data); + }else if($totals == 2){ + add_totals_for_deletion($spreadsheet, $data); } // Create Excel writer @@ -162,6 +177,94 @@ if (! function_exists('transform_objects_to_array_for_correction')) { } +if (! function_exists('transform_objects_to_array_for_si_enhancement')) { + function transform_objects_to_array_for_si_enhancement($objects) { + + // Define an array to store the transformed data + $data = []; + $endorsement_id = ""; + + // Initialize serial number + $serialNumber = 1; + + // Iterate through each object + foreach ($objects as $obj) { + // Extract all values for the object + $rowData = [ + $serialNumber++, + $obj->emp_name, + $obj->emp_code, + $obj->emp_type, + $obj->emp_relationship_code, + $obj->emp_dob, + $obj->emp_gender, + $obj->pre_existing_alignments, + $obj->new_basic_cover_si, + $obj->old_basic_cover_si, + $obj->date_of_coverage, + $obj->policy_end_date, + $obj->no_of_days, + $obj->old_si_premium, + $obj->new_si_premium, + $obj->difference_premium, + $obj->pro_rata_premimum, + $obj->gst, + $obj->total , + $endorsement_id, + ]; + + // Append the row data to the main data array + $data[] = $rowData; + } + + return $data; + } +} + + +if (! function_exists('transform_objects_to_array_for_deletion')) { + function transform_objects_to_array_for_deletion($objects) { + + // Define an array to store the transformed data + $data = []; + $claim_status = ""; + $endorsement_id = ""; + + // Initialize serial number + $serialNumber = 1; + + // Iterate through each object + foreach ($objects as $obj) { + // Extract all values for the object + $rowData = [ + $serialNumber++, + $obj->emp_code, + $obj->emp_name, + $obj->emp_dob, + $obj->emp_gender, + $obj->emp_relationship, + $obj->basic_cover_si, + $obj->dateofexit, + $obj->policy_end_date, + $obj->no_of_days, + $obj->premium, + $obj->pro_rata_premium, + $obj->gst, + $obj->total, + $claim_status, + $endorsement_id + + ]; + + // Append the row data to the main data array + $data[] = $rowData; + } + + return $data; + } +} + + if (!function_exists('add_totals_row')) { function add_totals_row(Spreadsheet $spreadsheet, array $data) { @@ -186,6 +289,30 @@ if (!function_exists('add_totals_row')) { } +if (!function_exists('add_totals_for_deletion')) { + function add_totals_for_deletion(Spreadsheet $spreadsheet, array $data) + { + // Calculate GST, Pro Rata Premium, and Total sums + $gstSum = 0; + $proRataPremiumSum = 0; + $totalSum = 0; + + foreach ($data as $row) { + $proRataPremiumSum += $row[11]; + $gstSum += $row[12]; + $totalSum += $row[13]; + } + + // Add a new row with sums + $lastRow = count($data) + 1; // To get the last row number + $spreadsheet->getActiveSheet()->setCellValue('K' . ($lastRow + 1), 'TOTALS'); + $spreadsheet->getActiveSheet()->setCellValue('L' . ($lastRow + 1), $proRataPremiumSum); + $spreadsheet->getActiveSheet()->setCellValue('M' . ($lastRow + 1), $gstSum); + $spreadsheet->getActiveSheet()->setCellValue('N' . ($lastRow + 1), $totalSum); + } +} + + if (!function_exists('read_excel_file_to_array')) { function read_excel_file_to_array($file) { diff --git a/app/Models/EmployeePolicyModel.php b/app/Models/EmployeePolicyModel.php index 6bbaeafb..26d3cd86 100644 --- a/app/Models/EmployeePolicyModel.php +++ b/app/Models/EmployeePolicyModel.php @@ -17,12 +17,15 @@ class EmployeePolicyModel extends Model "batch_id", "status", "pre_existing_alignments", + "date_of_exit", + "reason_for_exit", "basic_cover_si", "date_coverage", "policy_end_date", "days", "premium", "rata_premimum", + "si_enhancement_date", "gst", "created_by", "updated_by", @@ -62,7 +65,7 @@ class EmployeePolicyModel extends Model TIMESTAMPDIFF(YEAR, employees.dob, CURDATE()) AS emp_age, "Has Define" as emp_type, - employee_polices.id as employee_policy_id, + employee_polices.id as primaryKey, employee_polices.pre_existing_alignments, employee_polices.basic_cover_si, employee_polices.date_coverage, @@ -75,7 +78,6 @@ class EmployeePolicyModel extends Model batch_data.emp_policy_id, batch_data.bl AS batch_list_batch_code, batch_data.bf AS batch_files_batch_code') - ->join('employees', 'employees.id = employee_polices.employee_id', 'left') ->join("( SELECT @@ -90,6 +92,7 @@ class EmployeePolicyModel extends Model ->where('batch_data.bf', null) ->where('batch_data.bl', null) ->where('employee_polices.client_policy_id', $client_policy_id) + ->where('employee_polices.is_active', 1) ->get() ->getResult(); } @@ -98,43 +101,247 @@ class EmployeePolicyModel extends Model public function getCorrectionEmployeesDataForExportExcel($client_id, $client_policy_id, $insurer_or_tpa) { - return $this->db->table('emp_endorsement') - ->select('emp_endorsement.id, - emp_endorsement.emp_id, - emp_endorsement.emp_code, - emp_endorsement.endorsement_id, - emp_endorsement.old_value, - emp_endorsement.new_value, - emp_endorsement.field_name, - emp_endorsement.remarks, - employees.name AS emp_name, - employees.dob AS emp_dob, - employees.gender AS emp_gender, - employees.client_id AS emp_client_id, - "Has Define" as emp_type, - employee_polices.uhid, - employees.relationship_code, - batch_data.emp_policy_id, - batch_data.bl AS batch_list_batch_code, - batch_data.bf AS batch_files_batch_code') - ->join('employees', 'employees.id = emp_endorsement.emp_id', 'left') - ->join('employee_polices', 'employees.id = employee_polices.employee_id', 'left') - ->join("(SELECT batch_list.emp_policy_id, - batch_list.batch_code as bl, - batch_files.batch_code as bf - FROM batch_files - LEFT JOIN batch_list ON batch_files.batch_code = batch_list.batch_code + $sql = " + SELECT DISTINCT + emp_endorsement.id, + emp_endorsement.pk, + emp_endorsement.emp_code, + emp_endorsement.endorsement_id, + emp_endorsement.old_value, + emp_endorsement.new_value, + emp_endorsement.field_name, + emp_endorsement.remarks, + emp_endorsement.actions, + employees.id AS primaryKey, + employees.name AS emp_name, + employees.dob AS emp_dob, + employees.gender AS emp_gender, + employees.client_id AS emp_client_id, + 'Has Define' AS emp_type, + employee_polices.uhid, + employees.relationship_code, + batch_data.emp_policy_id, + batch_data.bl AS batch_list_batch_code, + batch_data.bf AS batch_files_batch_code + + FROM + emp_endorsement + LEFT JOIN + employees ON employees.id = emp_endorsement.pk + LEFT JOIN + employee_polices ON employees.id = employee_polices.employee_id + LEFT JOIN ( + SELECT batch_list.emp_policy_id, + batch_list.batch_code AS bl, + batch_files.batch_code AS bf + FROM + batch_files + LEFT JOIN + batch_list ON batch_files.batch_code = batch_list.batch_code WHERE batch_files.event_type = 'correction' AND batch_files.actions = 'export' - AND batch_files.insurer_or_tpa = '{$insurer_or_tpa}') as batch_data", 'emp_endorsement.emp_id = batch_data.emp_policy_id', 'left', false) - ->where('batch_data.bf IS NULL') - ->where('batch_data.bl IS NULL') - ->where('emp_endorsement.endorsement_id', '') - ->where('employees.client_id', $client_id) - ->where('employee_polices.client_policy_id', $client_policy_id) - ->get() - ->getResult(); + AND batch_files.insurer_or_tpa = '{$insurer_or_tpa}' + ) AS batch_data ON emp_endorsement.pk = batch_data.emp_policy_id + WHERE batch_data.bf IS NULL + AND batch_data.bl IS NULL + AND employees.client_id = '{$client_id}' + AND employee_polices.client_policy_id = '{$client_policy_id}' + AND emp_endorsement.actions = 'c' + AND (emp_endorsement.endorsement_id IS NULL OR emp_endorsement.endorsement_id = '')"; + + // Execute the raw query + $query = $this->db->query($sql); + + // Get the result set + $result = $query->getResult(); + + return $result; + + } + + + public function getSIEnhancementEmployeesDataForExportExcel($client_id, $client_policy_id, $insurer_or_tpa){ + + $query = $this->db->query(" + SELECT + employee_polices.id AS primaryKey, + employees.name AS emp_name, + employees.emp_code AS emp_code, + employees.dob AS emp_dob, + employees.gender AS emp_gender, + employees.relationship_code AS emp_relationship_code, + 'Has Define' AS emp_type, + employee_polices.uhid AS risk_id, + employee_polices.pre_existing_alignments, + employee_polices.policy_end_date, + employee_polices.basic_cover_si as old_basic_cover_si, + employee_polices.premium as old_si_premium, + batch_data.emp_policy_id, + batch_data.bl AS batch_list_batch_code, + batch_data.bf AS batch_files_batch_code, + sidata.new_basic_cover_si, + sidata.new_si_premium, + sidata.date_of_coverage, + DATEDIFF(employee_polices.policy_end_date, sidata.date_of_coverage) + 1 AS no_of_days, + sidata.new_si_premium - employee_polices.premium AS difference_premium, + ROUND((sidata.new_si_premium - employee_polices.premium) * (DATEDIFF(employee_polices.policy_end_date, sidata.date_of_coverage) + 1) / 365, 2) AS pro_rata_premimum, + ROUND(((sidata.new_si_premium - employee_polices.premium) * (DATEDIFF(employee_polices.policy_end_date, sidata.date_of_coverage) + 1) / 365) * 0.18, 2) AS gst, + ((sidata.new_si_premium - employee_polices.premium) * (DATEDIFF(employee_polices.policy_end_date, sidata.date_of_coverage) + 1) / 365) + ROUND(((sidata.new_si_premium - employee_polices.premium) * (DATEDIFF(employee_polices.policy_end_date, sidata.date_of_coverage) + 1) / 365) * 0.18, 2) AS total + + FROM + emp_endorsement a + LEFT JOIN + employees ON employees.emp_code = a.emp_code + LEFT JOIN + employee_polices ON employees.id = employee_polices.employee_id + LEFT JOIN ( + SELECT + aa.emp_code, + aa.new_value as 'new_basic_cover_si', + bb.new_value as 'new_si_premium', + cc.new_value as 'date_of_coverage' + FROM ( + SELECT + a1.emp_code, + a1.field_name, + a1.new_value + FROM + emp_endorsement as a1 + WHERE + a1.field_name = 'basic_cover_si' + ) aa + LEFT JOIN ( + SELECT + b1.emp_code, + b1.field_name, + b1.new_value + FROM + emp_endorsement as b1 + WHERE + b1.field_name = 'premium' + ) bb ON aa.emp_code = bb.emp_code + LEFT JOIN ( + SELECT + c1.emp_code, + c1.field_name, + c1.new_value + FROM + emp_endorsement as c1 + WHERE + c1.field_name = 'si_enhancement_date' + ) cc ON aa.emp_code = cc.emp_code + ) as sidata ON a.emp_code = sidata.emp_code + LEFT JOIN ( + SELECT DISTINCT + batch_list.emp_policy_id, + batch_list.batch_code AS bl, + batch_files.batch_code AS bf + FROM + batch_files + LEFT JOIN + batch_list ON batch_files.batch_code = batch_list.batch_code + WHERE + batch_files.event_type = 'si_enhancement' + AND batch_files.actions = 'export' + AND batch_files.insurer_or_tpa = '{$insurer_or_tpa}' + ) AS batch_data ON employee_polices.id = batch_data.emp_policy_id + WHERE + batch_data.bf IS NULL + AND batch_data.bl IS NULL + AND employee_polices.client_policy_id = '{$client_policy_id}' + AND employee_polices.is_active = '1' + AND (a.endorsement_id IS NULL OR a.endorsement_id = '') + AND a.field_name = 'si_enhancement_date' + "); + + // Get the result set + $results = $query->getResult(); + return $results; + + } + + + public function getDeletionEmployeeDataForExportExcel($client_id, $client_policy_id, $insurer_or_tpa){ + + $query = $this->db->query(" + SELECT + employee_polices.id as primaryKey, + employees.name AS emp_name, + employees.emp_code AS emp_code, + employees.dob AS emp_dob, + employees.gender AS emp_gender, + employees.relationship AS emp_relationship, + 'Has Define' as emp_type, + + employee_polices.basic_cover_si, + employee_polices.uhid as risk_id, + employee_polices.policy_end_date, + employee_polices.premium, + + batch_data.emp_policy_id AS emp_policy_id, + batch_data.bl AS batch_list_batch_code, + batch_data.bf AS batch_files_batch_code, + + deletiondata.empstatus, + deletiondata.changeevent, + deletiondata.dateofexit, + deletiondata.reasonforexit, + deletiondata.status, + + DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit) AS no_of_days, + ROUND((employee_polices.premium * DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit)) / 365, 2) AS pro_rata_premium, + ROUND(((employee_polices.premium * DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit)) / 365) * 0.18, 2) AS gst, + ROUND(((employee_polices.premium * DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit)) / 365) + (((employee_polices.premium * DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit)) / 365) * 0.18), 2) AS total + FROM + emp_endorsement a + LEFT JOIN + employees ON a.emp_code = employees.emp_code + LEFT JOIN + employee_polices ON employees.id = employee_polices.employee_id + + LEFT JOIN( + + select aa.emp_code, aa.new_value as 'empstatus', bb.new_value as 'changeevent', cc.new_value as 'dateofexit', dd.new_value as 'reasonforexit', ee.new_value as 'status' from + + ( SELECT a1.emp_code, a1.field_name, a1.new_value from emp_endorsement as a1 where a1.field_name = 'emp_status') aa + left join + ( SELECT b1.emp_code, b1.field_name, b1.new_value from emp_endorsement as b1 where b1.field_name = 'change_event') bb on aa.emp_code = bb.emp_code + left join + ( SELECT c1.emp_code, c1.field_name, c1.new_value from emp_endorsement as c1 where c1.field_name = 'date_of_exit') cc on aa.emp_code = cc.emp_code + left join + ( SELECT d1.emp_code, d1.field_name, d1.new_value from emp_endorsement as d1 where d1.field_name = 'reason_for_exit') dd on aa.emp_code = dd.emp_code + left JOIN + ( SELECT e1.emp_code, e1.field_name, e1.new_value from emp_endorsement as e1 where e1.field_name = 'status') ee on aa.emp_code = ee.emp_code + + ) as deletiondata on a.emp_code = deletiondata.emp_code + + LEFT JOIN + ( + SELECT + batch_list.emp_policy_id, + batch_list.batch_code AS bl, + batch_files.batch_code AS bf + FROM + batch_files + LEFT JOIN + batch_list ON batch_files.batch_code = batch_list.batch_code + WHERE + batch_files.event_type = 'deletion' + AND batch_files.actions = 'export' + AND batch_files.insurer_or_tpa = 'insurer' + ) AS batch_data ON employee_polices.id = batch_data.emp_policy_id + WHERE + batch_data.bf IS NULL + AND batch_data.bl IS NULL + AND employee_polices.client_policy_id = 12 + AND employee_polices.is_active = 1 + AND (a.endorsement_id IS NULL OR a.endorsement_id = '') AND a.field_name = 'status' + "); + + $result = $query->getResult(); + return $result; + } @@ -170,7 +377,7 @@ class EmployeePolicyModel extends Model $sql = " UPDATE emp_endorsement - JOIN employees ON employees.id = emp_endorsement.emp_id + JOIN employees ON employees.id = emp_endorsement.pk JOIN employee_polices ON employees.id = employee_polices.employee_id SET emp_endorsement.endorsement_id = '$endorsement_id' WHERE employees.emp_code = '$emp_code' @@ -179,6 +386,66 @@ class EmployeePolicyModel extends Model $query = $this->query($sql); } + + public function updateEndoresmentIdForSIEnhancement($emp_code, $client_id, $client_policy_id, $emp_name, $endorsement_id){ + + $sql = " + UPDATE emp_endorsement + JOIN employee_polices ON employee_polices.id = emp_endorsement.pk + JOIN employees ON employee_polices.employee_id = employees.id + SET emp_endorsement.endorsement_id = '$endorsement_id' + WHERE employees.emp_code = '$emp_code' + AND employees.client_id = '$client_id' + AND employee_polices.client_policy_id = '$client_policy_id' + AND employees.name = '$emp_name' + "; + $query = $this->query($sql); + } + + + public function updateEndoresmentIdForDeletion($emp_code, $client_id, $client_policy_id, $emp_name, $endorsement_id){ + + $sql = " + UPDATE emp_endorsement + JOIN employee_polices ON employee_polices.id = emp_endorsement.pk + JOIN employees ON employee_polices.employee_id = employees.id + SET emp_endorsement.endorsement_id = '$endorsement_id' + WHERE employees.emp_code = '$emp_code' + AND employees.client_id = '$client_id' + AND employee_polices.client_policy_id = '$client_policy_id' + AND employees.name = '$emp_name' + "; + $query = $this->query($sql); + } + + + public function fetchEmpEndorsementData($emp_code, $client_policy_id, $emp_name) + { + // Your raw SQL query + $sql = " + SELECT + ep.id, + MAX(CASE WHEN ee.field_name = 'date_of_exit' THEN ee.new_value END) AS date_of_exit, + MAX(CASE WHEN ee.field_name = 'reason_for_exit' THEN ee.new_value END) AS reason_for_exit, + MAX(CASE WHEN ee.field_name = 'status' THEN ee.new_value END) AS status + FROM + emp_endorsement AS ee + JOIN + employee_polices AS ep ON ep.id = ee.pk + WHERE + ee.emp_code = '$emp_code' + AND ep.client_policy_id = $client_policy_id + AND ee.name = '$emp_name' + AND ee.field_name IN ('date_of_exit', 'reason_for_exit', 'status') + GROUP BY + ee.emp_code, ee.name, ep.id"; + + // Execute the raw SQL query + $query = $this->db->query($sql); + + // Fetch and return results + return $row = $query->getRowArray(); + } //------------------------------------------------------------------ } diff --git a/app/Views/employee_upload.php b/app/Views/employee_upload.php index 97d9fdbb..0ab75ae1 100644 --- a/app/Views/employee_upload.php +++ b/app/Views/employee_upload.php @@ -110,7 +110,6 @@ $('#file_upload').hide(); - // Declare a global variable to store API response data var clientPolicies = []; diff --git a/app/Views/insurer_or_tpa_data.php b/app/Views/insurer_or_tpa_data.php index 3a2af61c..b3318f13 100644 --- a/app/Views/insurer_or_tpa_data.php +++ b/app/Views/insurer_or_tpa_data.php @@ -1,4 +1,4 @@ -
+
diff --git a/app/Views/policy_grid.php b/app/Views/policy_grid.php index a86cdd40..9034e889 100644 --- a/app/Views/policy_grid.php +++ b/app/Views/policy_grid.php @@ -82,7 +82,7 @@ } grid_html = ` -
+
@@ -773,7 +773,6 @@ Count++; var container = document.getElementById('grid_content_input'); - if(ui_type == '1_1' || ui_type == '1_1_1' || ui_type == '1_1_1_1') { if (ui_type == '1_1_1' || ui_type == '1_1_1_1') { @@ -791,7 +790,8 @@
-
`; +
+
`; // return html; }else{ html =`
From fcdd187fcc8f185b840de84c127ff4b9959c7d7a Mon Sep 17 00:00:00 2001 From: aadhavan valli Date: Thu, 21 Mar 2024 10:01:39 +0530 Subject: [PATCH 03/48] CHANGE_CLIENT_CONTROLLER_TERMS_VALUE_COMMA_REMOVE_ : AADHAVAN --- app/Config/Routes.php | 1 + app/Controllers/ClientController.php | 122 +++++++++++++++++---------- app/Views/policy_grid.php | 4 - 3 files changed, 77 insertions(+), 50 deletions(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 95e4900d..b14c375b 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -214,6 +214,7 @@ $routes->post("/editEmployeeProfile", "EmployeeRestController::editEmployeeProfi +$routes->post("employeeUpload", "EmployeeRestController::employeeUpload"); $routes->group("employeeRest", ["filter" => "authJWT"], function($routes){ $routes->post("employeeUpload", "EmployeeRestController::employeeUpload"); diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index 392f362e..775090ac 100644 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -833,8 +833,10 @@ class ClientController extends AdminController $client_policy_id = $this->request->getGet('client_policy_id'); $record = $this->clientPolicyModel->where('id', $client_policy_id)->first(); - - $family_floater=json_decode($record['policy_terms'])->family_floater; + $family_floater =''; + if (isset(json_decode($record['policy_terms'])->family_floater)) { + $family_floater=json_decode($record['policy_terms'])->family_floater; + } $emp_count = $this->employeeModel ->join('client_policy cp',"employees.client_id = cp.client_id") ->join('employee_polices ep',"cp.id = ep.client_policy_id AND employees.id = ep.employee_id") @@ -865,6 +867,10 @@ class ClientController extends AdminController }else{ $premiumData = $this->policyPremium2Model->where(['client_id' => $record['client_id'], 'client_policy_id' => $client_policy_id, 'is_active' => 1])->findAll(); } + // echo $record['client_id']; + // echo "-----"; + // echo $client_policy_id; + // print_r($premiumData);die; // echo '
';
         // echo $family_floater;
         $resultss = [];
@@ -876,19 +882,43 @@ class ClientController extends AdminController
                     $resultss[$index] = $record; 
                 }
             }
-        }else{
+        }else if($family_floater == 0){
             foreach ($results as $index => $record) {
                 if ($index == '0' || $index == '1' || $index == '2' || $index == '3' || $index == '4' || $index == '5' || $index == '6') {
                     // Clearing the $results array
                    $resultss[$index] = $record; 
                }
             }
+        }else{
+            foreach ($results as $index => $record) {
+                $resultss[$index] = $record; 
+            }
         }
+        $premiumDataa ='';
+        if ($family_floater == 0) {
+            // print_r($premiumData);die;
+            if (count($premiumData) == 0) {
+                $premiumDataa = $premiumData;
+            }else if ($premiumData[0]['policy_grid_id'] == '3' || $premiumData[0]['policy_grid_id'] == '4' || $premiumData[0]['policy_grid_id'] == '5' || $premiumData[0]['policy_grid_id'] == '6' || $premiumData[0]['policy_grid_id'] == '7' || $premiumData[0]['policy_grid_id'] == '8' || $premiumData[0]['policy_grid_id'] == '9' ) {
+                $premiumDataa = $premiumData;
+            }
+        } 
+        else if($family_floater == 1){
+            if(count($premiumData) == 0){
+                $premiumDataa = $premiumData;
+            }else if ($premiumData[0]['policy_grid_id'] == '10' || $premiumData[0]['policy_grid_id'] == '11') {
+                $premiumDataa = $premiumData;
+            }
+        }else{
+            $premiumDataa = $premiumData;
+        }
+        
+        // print_r($premiumData);die;
 
         // print_r($data[0]->policy_type); die;
                     // echo "hello";
             // return json_encode($premiumData);
-        return $this->respond(['status' => true,'code' => 200,'data' => $resultss, 'premiumData' => json_encode($premiumData), 'count' => $emp_count, 'policy_name' => $policy_name,], 200);
+        return $this->respond(['status' => true,'code' => 200,'data' => $resultss, 'premiumData' => json_encode($premiumDataa), 'count' => $emp_count, 'policy_name' => $policy_name,], 200);
 
     }
 
@@ -903,7 +933,7 @@ class ClientController extends AdminController
             /*** Client Policy Table Primary Key(ID) ***/
             $client_policy_id = $this->request->getPost("client_policy_id");
 
-            $data['sum_insured']   =$this->request->getPost("sum_insured");
+            $data['sum_insured']   =str_replace(',', '',$this->request->getPost("sum_insured"));
             $data['family_floater']   =$this->request->getPost("family_floater");
                 $data['corporatebuffer'] = $this->request->getPost("corporatebuffer");
                 $data['family_floaters'] = $this->request->getPost("family_floaters") ?? [];                
@@ -913,49 +943,49 @@ class ClientController extends AdminController
                 }
             $data['waiverofpreexistingdiseases']   =$this->request->getPost("waiverofpreexistingdiseases");
             if ($data['waiverofpreexistingdiseases'] == 1) {
-                $data['maternitycoverage']   =$this->request->getPost("maternitycoverage");
-                $data['twindelivery']   =$this->request->getPost("twindelivery");
-                $data['preandpostnatal']   =$this->request->getPost("preandpostnatal");
-                $data['babyday1cover']   =$this->request->getPost("babyday1cover");
+                $data['maternitycoverage']   =str_replace(',', '',$this->request->getPost("maternitycoverage"));
+                $data['twindelivery']   =str_replace(',', '',$this->request->getPost("twindelivery"));
+                $data['preandpostnatal']   =str_replace(',', '',$this->request->getPost("preandpostnatal"));
+                $data['babyday1cover']   =str_replace(',', '',$this->request->getPost("babyday1cover"));
             }else{
                 $data['maternitycoverage']   ="";
                 $data['twindelivery']   ="";
                 $data['preandpostnatal']   ="";
                 $data['babyday1cover']   ="";
             }
-            $data['9monthwaitingperiodwaived'] =$this->request->getPost("9monthwaitingperiodwaived");
-            $data['coverfromthedateofjoining'] =$this->request->getPost("coverfromthedateofjoining");
+            $data['9monthwaitingperiodwaived'] =str_replace(',', '',$this->request->getPost("9monthwaitingperiodwaived"));
+            $data['coverfromthedateofjoining'] =str_replace(',', '',$this->request->getPost("coverfromthedateofjoining"));
             $data['waiverof1,2,3&4thyearexclusions'] =$this->request->getPost("waiverof1,2,3&4thyearexclusions");
             $data['waiverof30dayswaitingperiod'] =$this->request->getPost("waiverof30dayswaitingperiod");
-            $data['prehospitalizationcover'] =$this->request->getPost("prehospitalizationcover");
+            $data['prehospitalizationcover'] =str_replace(',', '',$this->request->getPost("prehospitalizationcover"));
             // $data['posthospitalizationcover'] =$this->request->getPost("posthospitalizationcover");
-            $data['congenitaldiseasesinternal'] =$this->request->getPost("congenitaldiseasesinternal");
+            $data['congenitaldiseasesinternal'] =str_replace(',', '',$this->request->getPost("congenitaldiseasesinternal"));
             // $data['congenitaldiseasesexternal'] =$this->request->getPost("congenitaldiseasesexternal");
             $data['copayzonewisecopay'] =$this->request->getPost("copayzonewisecopay");
             $data['bioabsorbablestenttoriclensmultifocallens'] =$this->request->getPost("bioabsorbablestenttoriclensmultifocallens");
-            $data['roomrentlimit'] =$this->request->getPost("roomrentlimit");
-            $data['proportionatedeductionclause'] =$this->request->getPost("proportionatedeductionclause");
-            $data['nursingallowance'] =$this->request->getPost("nursingallowance");
-            $data['ailmentcapping'] =$this->request->getPost("ailmentcapping");
-            $data['ambulancecharges'] =$this->request->getPost("ambulancecharges");
-            $data['airambulance'] =$this->request->getPost("airambulance");
-            $data['familytransportationbenefit'] =$this->request->getPost("familytransportationbenefit");
-            $data['reasonableandcustomarycharges'] =$this->request->getPost("reasonableandcustomarycharges");
-            $data['ayudhtreatmentcover'] =$this->request->getPost("ayudhtreatmentcover");
-            $data['armdcovered'] =$this->request->getPost("armdcovered");
-            $data['suminsuredenhancement'] =$this->request->getPost("suminsuredenhancement");
-            $data['automaticsuminsuredreinstatement'] =$this->request->getPost("automaticsuminsuredreinstatement");
-            $data['additionalsicknessbenefit'] =$this->request->getPost("additionalsicknessbenefit");
-            $data['lasiksurgery'] =$this->request->getPost("lasiksurgery");
-            $data['midterminclusion'] =$this->request->getPost("midterminclusion");
-            $data['capd'] =$this->request->getPost("capd");
-            $data['organdonorexpenses'] =$this->request->getPost("organdonorexpenses");
-            $data['moderntreatmentsasperirdai'] =$this->request->getPost("moderntreatmentsasperirdai");
-            $data['Wellness'] =$this->request->getPost("Wellness");
-            $data['days_of_discharge'] =$this->request->getPost("days_of_discharge");
-            $data['days_from_dod'] =$this->request->getPost("days_from_dod");
-            $data['special_condition_label'] = $this->request->getPost("special_condition_label") ?? [];
-            $data['special_condition_input'] = $this->request->getPost("special_condition_input") ?? [];
+            $data['roomrentlimit'] =str_replace(',', '',$this->request->getPost("roomrentlimit"));
+            $data['proportionatedeductionclause'] =str_replace(',', '',$this->request->getPost("proportionatedeductionclause"));
+            $data['nursingallowance'] =str_replace(',', '',$this->request->getPost("nursingallowance"));
+            $data['ailmentcapping'] =str_replace(',', '',$this->request->getPost("ailmentcapping"));
+            $data['ambulancecharges'] =str_replace(',', '',$this->request->getPost("ambulancecharges"));
+            $data['airambulance'] =str_replace(',', '',$this->request->getPost("airambulance"));
+            $data['familytransportationbenefit'] =str_replace(',', '',$this->request->getPost("familytransportationbenefit"));
+            $data['reasonableandcustomarycharges'] =str_replace(',', '',$this->request->getPost("reasonableandcustomarycharges"));
+            $data['ayudhtreatmentcover'] =str_replace(',', '',$this->request->getPost("ayudhtreatmentcover"));
+            $data['armdcovered'] =str_replace(',', '',$this->request->getPost("armdcovered"));
+            $data['suminsuredenhancement'] =str_replace(',', '',$this->request->getPost("suminsuredenhancement"));
+            $data['automaticsuminsuredreinstatement'] =str_replace(',', '',$this->request->getPost("automaticsuminsuredreinstatement"));
+            $data['additionalsicknessbenefit'] =str_replace(',', '',$this->request->getPost("additionalsicknessbenefit"));
+            $data['lasiksurgery'] =str_replace(',', '',$this->request->getPost("lasiksurgery"));
+            $data['midterminclusion'] =str_replace(',', '',$this->request->getPost("midterminclusion"));
+            $data['capd'] =str_replace(',', '',$this->request->getPost("capd"));
+            $data['organdonorexpenses'] =str_replace(',', '',$this->request->getPost("organdonorexpenses"));
+            $data['moderntreatmentsasperirdai'] =str_replace(',', '',$this->request->getPost("moderntreatmentsasperirdai"));
+            $data['Wellness'] =str_replace(',', '',$this->request->getPost("Wellness"));
+            $data['days_of_discharge'] =str_replace(',', '',$this->request->getPost("days_of_discharge"));
+            $data['days_from_dod'] =str_replace(',', '',$this->request->getPost("days_from_dod"));
+            $data['special_condition_label'] = str_replace(',', '',$this->request->getPost("special_condition_label")) ?? [];
+            $data['special_condition_input'] = str_replace(',', '',$this->request->getPost("special_condition_input")) ?? [];
 
 
                 $jsonData = json_encode($data);
@@ -1023,14 +1053,14 @@ class ClientController extends AdminController
             /*** Client Policy Table Primary Key(ID) ***/
             $client_policy_id = $this->request->getPost("client_policy_id");
 
-            $data['sumInsured2']   =$this->request->getPost("sumInsured2");
-            $data['totalSumInsured'] =$this->request->getPost("totalSumInsured");
-            $data['accidentalDeathBenefit'] =$this->request->getPost("accidentalDeathBenefit");
-            $data['permanentTotalDisablement'] =$this->request->getPost("permanentTotalDisablement");
+            $data['sumInsured2']   =str_replace(',', '', $this->request->getPost("sumInsured2"));
+            $data['totalSumInsured'] =str_replace(',', '',$this->request->getPost("totalSumInsured"));
+            $data['accidentalDeathBenefit'] =str_replace(',', '',$this->request->getPost("accidentalDeathBenefit"));
+            $data['permanentTotalDisablement'] =str_replace(',', '',$this->request->getPost("permanentTotalDisablement"));
             $data['permanentPartialDisablement'] =$this->request->getPost("permanentPartialDisablement");
             $data['temporaryTotalDisablementBenefit'] =$this->request->getPost("temporaryTotalDisablementBenefit");
-            $data['accidentalHospitalizationExpenses'] =$this->request->getPost("accidentalHospitalizationExpenses");
-            $data['childrenEducationWelfareFund'] =$this->request->getPost("childrenEducationWelfareFund");
+            $data['accidentalHospitalizationExpenses'] =str_replace(',', '',$this->request->getPost("accidentalHospitalizationExpenses"));
+            $data['childrenEducationWelfareFund'] =str_replace(',', '',$this->request->getPost("childrenEducationWelfareFund"));
 
             $data['compassionateVisitExpenses']   =$this->request->getPost("compassionateVisitExpenses");
             if ($data['compassionateVisitExpenses'] == 1) {
@@ -1039,16 +1069,16 @@ class ClientController extends AdminController
                 $data['compassionateVisitExpensesData']   ="";
             }
 
-            $data['brokenBoneExpenses']   = $this->request->getPost("brokenBoneExpenses");
+            $data['brokenBoneExpenses']   = str_replace(',', '',$this->request->getPost("brokenBoneExpenses"));
             if ($data['brokenBoneExpenses'] == 1) {
-                $data['brokenBoneExpensesData']   = $this->request->getPost("brokenBoneExpensesData");
+                $data['brokenBoneExpensesData']   = str_replace(',', '',$this->request->getPost("brokenBoneExpensesData"));
             }else{
                 $data['brokenBoneExpensesData']   ="";
             }
 
-            $data['ambulanceCharges']   =$this->request->getPost("ambulanceCharges");
+            $data['ambulanceCharges']   =str_replace(',', '',$this->request->getPost("ambulanceCharges"));
             if ($data['ambulanceCharges'] == 1) {
-                $data['ambulanceChargesData']   =$this->request->getPost("ambulanceChargesData");
+                $data['ambulanceChargesData']   =str_replace(',', '',$this->request->getPost("ambulanceChargesData"));
             }else{
                 $data['ambulanceChargesData']   ="";
             }
diff --git a/app/Views/policy_grid.php b/app/Views/policy_grid.php
index 4d95a66c..64af741e 100644
--- a/app/Views/policy_grid.php
+++ b/app/Views/policy_grid.php
@@ -780,10 +780,6 @@
                                 
                         
`; - } - else if(ui_type == '1_2' ) - { - } else if(ui_type == '3'){ From 16a730b3c553b044e08d8f2ff467f0246985a93a Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Thu, 21 Mar 2024 17:09:28 +0530 Subject: [PATCH 04/48] CHANGE_CLIENT_ONBOARDING_ADD_CLIENT_LOGO_IS_DOWNLOAD_BTN_POLICY_IS_ADDON : RV --- app/Controllers/ClientController.php | 13 ++- app/Controllers/EmpDataServiceController.php | 42 ++++----- app/Controllers/EmployeeController.php | 10 +-- app/Helpers/utility_helper.php | 37 ++++++-- app/Models/ClientModel.php | 2 + app/Models/ClientPolicyModel.php | 1 + app/Views/client_basic_info.php | 89 ++++++++++++++++++++ app/Views/client_policy.php | 21 ++++- 8 files changed, 177 insertions(+), 38 deletions(-) diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index 392f362e..b53251e2 100644 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -230,8 +230,10 @@ class ClientController extends AdminController { $this->myLogger->logme('error','Client general info function called'); + $file_name = file_Upload($this->request->getFile('client_logo')); $data = $this->request->getPost(); $data['created_by'] = get_session_userid(); + $data['client_logo'] = $file_name; $insert = $this->clientModel->insert($data); if($insert){ $client_data = $this->clientModel->where(['id' => $insert, 'is_active' => 1])->first(); @@ -246,9 +248,13 @@ class ClientController extends AdminController public function editClientGeneralInfo() { $this->myLogger->logme('error','edit client general info function called'); + $file_name = file_Upload($this->request->getFile('client_logo')); $id = $this->request->getPost('PrimaryKey'); $data = $this->request->getPost(); $data['updated_by'] = get_session_userid(); + if(!empty($file_name)){ + $data['client_logo'] = $file_name; + } $update = $this->clientModel->update($id,$data); if($update){ return $this->respond(['status' => true,'code' => 200,'data' => $data], 200); @@ -511,6 +517,8 @@ class ClientController extends AdminController $data['claims_experience_for_last_3_years'] = $this->request->getPost('claims_experience_for_last_3_years'); $data['earned_premium_amount'] = $this->request->getPost('earned_premium_amount'); $data['claims_incurred_amount'] = $this->request->getPost('claims_incurred_amount'); + $data['is_addon'] = $this->request->getPost('is_addon'); + @@ -565,6 +573,7 @@ class ClientController extends AdminController $data['claims_experience_for_last_3_years'] = $this->request->getPost('claims_experience_for_last_3_years'); $data['earned_premium_amount'] = $this->request->getPost('earned_premium_amount'); $data['claims_incurred_amount'] = $this->request->getPost('claims_incurred_amount'); + $data['is_addon'] = $this->request->getPost('is_addon'); $data['updated_by'] = get_session_userid(); $insert = $this->clientPolicyModel->update($id,$data); @@ -583,7 +592,7 @@ class ClientController extends AdminController public function createClientPolicyPremium() { - try { + try { $policy_type = $this->request->getPost('policy_type'); $client_id = $this->request->getPost('client_id'); $client_policy_id = $this->request->getPost('client_policy_id'); @@ -767,7 +776,7 @@ class ClientController extends AdminController }else{ return $this->respond(['status' => false,'code' => 404, 'data' => $data,'message' => 'no data found'], 200); } - } catch (Exception $e) { + } catch (\Exception $e) { // Handle exceptions here echo 'Error: ' . $e->getMessage(); } diff --git a/app/Controllers/EmpDataServiceController.php b/app/Controllers/EmpDataServiceController.php index b74999c9..09493bbf 100644 --- a/app/Controllers/EmpDataServiceController.php +++ b/app/Controllers/EmpDataServiceController.php @@ -16,6 +16,7 @@ use App\Models\FileModel; use App\Models\BatchListModel; use App\Models\BatchFileModel; use App\Models\EmpEndorsementModel; +use App\Models\ClientDepositModel; use App\Controllers\Jobs ; use PhpOffice\PhpSpreadsheet\Spreadsheet; @@ -32,6 +33,7 @@ class EmpDataServiceController extends BaseController protected $batchListModel; protected $batchFileModel; protected $empEndorsementModel; + protected $clientDepositModel; public function __construct() { @@ -46,6 +48,7 @@ class EmpDataServiceController extends BaseController $this->batchListModel = new BatchListModel(); $this->batchFileModel = new BatchFileModel(); $this->empEndorsementModel = new EmpEndorsementModel(); + $this->clientDepositModel = new ClientDepositModel(); } @@ -366,32 +369,31 @@ class EmpDataServiceController extends BaseController public function cashDepositCalculationForInception($arrayData = []) { - $arrayData = array( - array( - 0 => 6, - 1 => 10, - 2 => 17, - 3 => 101, - 4 => 102 - ), - ); + if (!empty($arrayData)) { + $query = $this->employeePolicyModel->query(" + SELECT SUM(rata_premimum + gst) AS total_sum + FROM employee_polices + WHERE id IN (" . implode(',', $arrayData) . ") + "); + $row = $query->getRow(); + $ + $insert = $this->clientDepositModel->insert(); + $query = $this->clientDepositModel->orderBy('id', 'DESC')->limit(1)->get(); + $cashDepositLastEntry = $query->getRow(); - // Flatten the array to get all IDs in a single array - $idArray = call_user_func_array('array_merge', $arrayData); + print_r($cashDepositLastEntry); die; - // Select from the employee_policy table where the id is in the $idArray - $results = $this->employeePolicyModel - ->select('employee_polices.pro_rata_premium') - ->whereIn('id', $idArray) - ->get() - ->getResultArray(); + + return $row ? $row->total_sum : 0; + + } else { + return 0; + } - // Output the results - print_r($results); die; } - public function cashDepositCalculationForSIEnhancement($arrayData) + public function cashDepositCalculationForSIEnhancement($arrayData = []) { } diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index d04be584..67e5f6b5 100644 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -399,11 +399,11 @@ class EmployeeController extends AdminController } $action = ['action' => 'inception']; - $depositeData = [ - $employeeIds, - $action - ]; - $empDataServiceController->cashDepositCalculationForInception(); + // $depositeData = [ + // $employeeIds, + // ]; + // print_r($employeeIds); die; + $empDataServiceController->cashDepositCalculationForInception($employeeIds); // echo '
';
                 // print_r($depositeData); die;
                 
diff --git a/app/Helpers/utility_helper.php b/app/Helpers/utility_helper.php
index 34ede33e..ce5de4c4 100644
--- a/app/Helpers/utility_helper.php
+++ b/app/Helpers/utility_helper.php
@@ -44,32 +44,53 @@ if (!function_exists('change_date_format')) {
 }
 
 if (!function_exists('file_Upload')) {
-    
     function file_Upload($fileToUpload, $imageDetails = null)
     {
-        $fileName = $fileToUpload->getClientName();
-        if ($fileToUpload !== NULL && $fileName !== "") {
+        // Retrieve the name of the file
+        $fileName = $fileToUpload->getName();
+
+        // Check if the file is not null and has a name
+        if ($fileToUpload !== null && $fileName !== "") {
+            // Check if the file is valid and has not been moved already
             if ($fileToUpload->isValid() && !$fileToUpload->hasMoved()) {
-                // Check if the image exists in the upload folder
-                $existingImagePath = ROOTPATH . 'public/uploads/' . $imageDetails; // Adjust filename field based on your database structure
+                // Construct the path where the image should exist
+                $existingImagePath = ROOTPATH . 'public/uploads/logo/' . $imageDetails;
                 
+                // Check if imageDetails is not null and if the image exists in the upload folder
                 if ($imageDetails !== null && file_exists($existingImagePath)) {
                     // If the image exists, delete it
                     unlink($existingImagePath);
                 }
-        
+                
                 // Move the new image to the upload folder
-                $fileToUpload->move(ROOTPATH . 'public/uploads', $fileName);
+                $fileToUpload->move(ROOTPATH . 'public/uploads/logo', $fileName);
             }
         } else {
+            // Set fileName to empty string if file is null or doesn't have a name
             $fileName = "";
         }
         
+        // Return the file name
         return $fileName;
-        
     }
 }
 
+if (!function_exists('compressImage')) {
+    function compressImage($file, $destinationPath, $newWidth = 100, $newHeight = 100)
+    {
+        // Load the image manipulation library
+        $image = \Config\Services::image();
+
+        // Resize and compress the image
+        $image->withFile($file)
+              ->fit($newWidth, $newHeight, 'center')
+              ->save($destinationPath);
+
+        return true;
+    }
+}
+
+
 if (!function_exists('fancy_date_time_format')) 
 {
     function fancy_date_time_format($datetime,$return_type = 'fancy') {
diff --git a/app/Models/ClientModel.php b/app/Models/ClientModel.php
index 3ccf26a1..25a5249d 100644
--- a/app/Models/ClientModel.php
+++ b/app/Models/ClientModel.php
@@ -21,6 +21,8 @@ class ClientModel extends Model
         "city",
         "state",
         "pincode",
+        "is_download_btn",
+        "client_logo",
         "created_by",
         "updated_by",
         "is_active",
diff --git a/app/Models/ClientPolicyModel.php b/app/Models/ClientPolicyModel.php
index b8dbc9d9..ff437dc1 100644
--- a/app/Models/ClientPolicyModel.php
+++ b/app/Models/ClientPolicyModel.php
@@ -33,6 +33,7 @@ class ClientPolicyModel extends Model
         "claims_incurred_amount",
         "policy_terms",
         "open_for_enrollment",
+        "is_addon",
         "created_by",
         "updated_by",
         "Is_active",
diff --git a/app/Views/client_basic_info.php b/app/Views/client_basic_info.php
index e743434f..278938f6 100644
--- a/app/Views/client_basic_info.php
+++ b/app/Views/client_basic_info.php
@@ -103,6 +103,21 @@
                             
+
+
+ +
+ Image dimensions 100 x 100 pixels and size of 200KB. +
+
+ " width="100" height="100" id="uploadPreview" class="avatar img-circle img-thumbnail" alt="avatar"/> +
+
+ +
+ > + +
+
+ + +
-
+ -
- +
+ +
@@ -246,6 +251,8 @@ processData: false, contentType: false, success: function(res) { + + console.log(res); if (res.status === false) { toastr.error('Policy Dose Not Create', 'Error'); @@ -365,6 +372,8 @@ type: "GET", dataType: 'json', success: function (res) { + console.log(res) + setTimeout(function() { $('.loader').fadeOut(); $('.loader-mask').delay(350).fadeOut('slow'); @@ -392,6 +401,12 @@ $('#policy_status').val(checkDateStatus(res.data.policy_end_date)); $('#policy_status_field').show(); + if (res.data.is_addon == 1) { + $('#is_addon').prop('checked', true); + } else { + $('#is_addon').prop('checked', false); + } + /** do not delete this comment condition // if(res.data.policy_type_id == 1){ From f315234755460d801a2e0df70d97b7f8f95fe4ef Mon Sep 17 00:00:00 2001 From: aadhavan valli Date: Thu, 21 Mar 2024 17:13:24 +0530 Subject: [PATCH 05/48] CHANGE_EMPLOYEE_REST_CONTROLLER_FILE_UPLOAD_GPA_GMC_CHECK_AND_GRID_CHECK : AADHAVAN --- app/Controllers/EmployeeRestController.php | 71 ++++++++++++++++++---- app/Views/client_policy.php | 4 +- 2 files changed, 62 insertions(+), 13 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 51ab6236..a3a32ea9 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -17,6 +17,7 @@ use App\Models\PolicesModel; use App\Models\RelationshipModel; use App\Models\FileModel; use App\Models\ClientPolicyModel; +use App\Models\PolicyPremium2Model; use App\Controllers\Jobs ; use App\Controllers\JobWorker ; @@ -43,6 +44,7 @@ class EmployeeRestController extends AdminController protected $policesModel; protected $relationshipModel; protected $clientPolicyModel; + protected $policyPremium2Model; public function __construct() { @@ -56,6 +58,7 @@ class EmployeeRestController extends AdminController $this->relationshipModel = new RelationshipModel(); $this->fileModel= new FileModel(); $this->clientPolicyModel = new ClientPolicyModel(); + $this->policyPremium2Model = new PolicyPremium2Model(); } @@ -483,13 +486,18 @@ class EmployeeRestController extends AdminController } } - // Upload the Sheet Data in DB + // Upload the Employee Detail in DB by Sheet Data public function employeeUpload() { $file = $this->request->getFile('file'); $client_id = $this->request->getPost('client_id'); $policy_id = $this->request->getPost('policy_id'); + $client_policy = $this->clientPolicyModel->where('id', $policy_id)->first(); + $policy = $this->policesModel->where('id', $client_policy['policy_id'])->first(); + + $policy_permium = $this->policyPremium2Model->where(['client_id' => $client_id , 'client_policy_id' => $policy_id,'is_active' =>1])-> first(); + $is_moved = $file->move(WRITEPATH . 'uploads/import_excel'); $filename = $file->getName(); $file_name_with_path = WRITEPATH."/uploads/import_excel/".$filename; @@ -567,10 +575,8 @@ class EmployeeRestController extends AdminController } } } - // print_r("Extra", $extra);die; $dataToInsert = []; $basic_cover_si= []; - // print_r($extra);die; foreach ($extra['0'] as $index => $id) { $relation =''; if ($extra['5'][$index] === 'Mother' || $extra['5'][$index] === 'Father') { @@ -624,29 +630,73 @@ class EmployeeRestController extends AdminController 'emp_status'=>'draft' ]; + + $basic_cover_si_value = ''; + + //Grid id is 10 and 11 sum insure value add only for self other grid type self sum insure is for the dependence + + if ($policy['policy_type_id'] != 1) { + if ($policy_permium['policy_grid_id'] == 10 || $policy_permium['policy_grid_id'] == 11) { + if (strtolower($extra['5'][$index]) == 'self') { + $basic_cover_si_value = $extra['9'][$index]; + }else{ + $basic_cover_si_value = null; + } + }else{ + if (strtolower($extra['5'][$index]) == 'self') { + $basic_cover_si_value = $extra['9'][$index]; + }else{ + for ($i=0; $i < count($extra['1']) ; $i++) { + + if ($extra['1'][$i] == $extra['1'][$index]) { + if (strtolower($extra['5'][$i]) == 'self') { + $basic_cover_si_value = $extra['9'][$i]; + } + } + } + } + } + } + $record2 = [ - 'basic_cover_si' => isset($extra['9'][$index]) ? $extra['9'][$index] : 0, + 'basic_cover_si' => $basic_cover_si_value, ]; + // print_r($basic_cover_si);die; $dataToInsert[] = $record; - $basic_cover_si[]= $record2; + $basic_cover_si[]= $basic_cover_si_value; } } for ($a=0; $a employeeModel->checkExistingEmpEntrollment($dataToInsert[$a]); $emp_id =0; + + $data_after_gpa_or_gmc =[]; + if ($policy['policy_type_id'] == 1) { + if (strtolower($dataToInsert[$a]['relationship']) == 'self') { + $data_after_gpa_or_gmc = $dataToInsert[$a]; + } + }else{ + $data_after_gpa_or_gmc = $dataToInsert[$a]; + } + + + if ($employee) { $emp_id =$employee['id']; $id =$emp_id; - $result = $this->employeeModel->update($id, $dataToInsert[$a]); + $result = $this->employeeModel->update($id, $data_after_gpa_or_gmc); if ($result) { $log_message = 'Update Employee - '.$employee['name'].'('.$employee['emp_code'].') with PK '.$employee['id']; $this->myLogger->logme('error',('Update - ' . $employee['id'].' - '. $employee['emp_code'] .' - '.$employee['name'])); } }else{ if ($dataToInsert[$a]['emp_code'] != 0) { - $result = $this->employeeModel->insert($dataToInsert[$a]); + $result =false; + if (count($data_after_gpa_or_gmc) != 0) { + $result = $this->employeeModel->insert($data_after_gpa_or_gmc); + } $emp_id =$result; if ($result) { $emp = $this->employeeModel->where('id', $result)->get()->getResult(); @@ -663,7 +713,7 @@ class EmployeeRestController extends AdminController 'employee_id'=>$emp_id, 'client_policy_id'=>$policy_id, 'status'=> 'draft', - 'basic_cover_si'=> $basic_cover_si[$a] + 'basic_cover_si'=>isset($basic_cover_si[$a]) ? $basic_cover_si[$a] : null ]; $employee_policy = $this->employeePolicyModel->checkExistingEmpPolicy(['employee_id' => $emp_id,'client_policy_id' => $policy_id]); @@ -678,13 +728,12 @@ class EmployeeRestController extends AdminController //trigger // print_r($dataToInsert[$a]['email_personal']);die; - $policy = $this->clientPolicyModel->where('id', $policy_id)->first(); - $policy_name = $this->policesModel->where('id', $policy['policy_id'])->first(); + $mail = $dataToInsert[$a]['email_corporate']; $subject = 'Welcome, Employee Benefit Program Enrolment'; // $message = 'Dear ' . $dataToInsert[$a]['name'] . ",
We are glad to welcome you to the employee benefit program ," .$policy_name['name'] ."offered by your employer,


Click on the link below to review your personal and family details:
Review Details" ; $data['employee_name']=$dataToInsert[$a]['name']; - $data['policy_name']=$policy_name['name']; + $data['policy_name']=$policy['name']; $message = view('mail_welcome', $data); // if ($dataToInsert[$a]['email_corporate'] != null || $dataToInsert[$a]['email_corporate'] != '' && $dataToInsert[$a]['relationship'] == 'Self') { diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 7e7dde33..c689d787 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -282,8 +282,8 @@
From 602cceab7cfacaac3e7d26351e7ad58ef509f473 Mon Sep 17 00:00:00 2001 From: aadhavan valli Date: Fri, 22 Mar 2024 10:22:23 +0530 Subject: [PATCH 06/48] CHANGE_EMPLOYEE_REST_CONTROLLER_UPDATE_KEY_CHANGE_SAVE : AADHAVAN --- app/Controllers/EmployeeRestController.php | 24 ++++++++++++++-------- app/Models/EmployeeModel.php | 10 ++++++--- app/Models/EmployeePolicyModel.php | 1 + app/Views/client_policy.php | 4 ++++ app/Views/policy_grid.php | 3 ++- 5 files changed, 30 insertions(+), 12 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index a3a32ea9..1f26e4b9 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -631,11 +631,10 @@ class EmployeeRestController extends AdminController ]; - $basic_cover_si_value = ''; + $basic_cover_si_value = null; //Grid id is 10 and 11 sum insure value add only for self other grid type self sum insure is for the dependence - - if ($policy['policy_type_id'] != 1) { + // if ($policy['policy_type_id'] != 1) { if ($policy_permium['policy_grid_id'] == 10 || $policy_permium['policy_grid_id'] == 11) { if (strtolower($extra['5'][$index]) == 'self') { $basic_cover_si_value = $extra['9'][$index]; @@ -656,7 +655,7 @@ class EmployeeRestController extends AdminController } } } - } + // } $record2 = [ 'basic_cover_si' => $basic_cover_si_value, @@ -668,10 +667,11 @@ class EmployeeRestController extends AdminController } for ($a=0; $a employeeModel->checkExistingEmpEntrollment($dataToInsert[$a]); + $employee = $this->employeeModel->checkExistingEmployee($dataToInsert[$a]); $emp_id =0; $data_after_gpa_or_gmc =[]; + // print_r($policy);die; if ($policy['policy_type_id'] == 1) { if (strtolower($dataToInsert[$a]['relationship']) == 'self') { $data_after_gpa_or_gmc = $dataToInsert[$a]; @@ -681,12 +681,18 @@ class EmployeeRestController extends AdminController } - + date_default_timezone_set('Asia/Kolkata'); + $current_timestamp = time(); + $formatted_date_time = date('Y-m-d H:i:s', $current_timestamp); if ($employee) { + + $emp_id =$employee['id']; $id =$emp_id; - $result = $this->employeeModel->update($id, $data_after_gpa_or_gmc); + $data_after_gpa_or_gmc['id'] = $id; + $data_after_gpa_or_gmc['updated_at'] = $formatted_date_time; + $result = $this->employeeModel->save($data_after_gpa_or_gmc); if ($result) { $log_message = 'Update Employee - '.$employee['name'].'('.$employee['emp_code'].') with PK '.$employee['id']; $this->myLogger->logme('error',('Update - ' . $employee['id'].' - '. $employee['emp_code'] .' - '.$employee['name'])); @@ -719,7 +725,9 @@ class EmployeeRestController extends AdminController $employee_policy = $this->employeePolicyModel->checkExistingEmpPolicy(['employee_id' => $emp_id,'client_policy_id' => $policy_id]); if ($employee_policy) { foreach ($employee_policy as $existing_policy) { - $this->employeePolicyModel->update($existing_policy['id'], $emp_policy_data); + $emp_policy_data['id']= $existing_policy['id']; + $emp_policy_data['updated_at'] = $formatted_date_time; + $this->employeePolicyModel->save($emp_policy_data); } } else { $emp_policy = $this->employeePolicyModel->insert($emp_policy_data); diff --git a/app/Models/EmployeeModel.php b/app/Models/EmployeeModel.php index 09eeb13d..5a564363 100644 --- a/app/Models/EmployeeModel.php +++ b/app/Models/EmployeeModel.php @@ -29,6 +29,7 @@ class EmployeeModel extends Model "emp_status", "created_by", "updated_by", + "updated_at", "is_active", ]; @@ -51,9 +52,12 @@ class EmployeeModel extends Model // for EMP rest API process do not change - public function checkExistingEmpEntrollment($arr) - { - return $this->where('emp_code',$arr['emp_code'])->where('name',$arr['name'])->first(); + public function checkExistingEmployee($arr) + { + return $this->where('emp_code',$arr['emp_code'])->where('name',$arr['name'])->where('client_id', $arr['client_id'])->first(); } + + + } diff --git a/app/Models/EmployeePolicyModel.php b/app/Models/EmployeePolicyModel.php index 6ac9eeb7..2eadf306 100644 --- a/app/Models/EmployeePolicyModel.php +++ b/app/Models/EmployeePolicyModel.php @@ -29,6 +29,7 @@ class EmployeePolicyModel extends Model "gst", "created_by", "updated_by", + "updated_at", "is_active", ]; diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 496e9347..9c61f294 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -753,6 +753,10 @@ } convertCommaNumberToWords(input); + if (input.id == 'gpa_sum_si') { + gpaSumInsureMultiplier(input); + } + // if(input.id == 'basic_pay'){ // var inputNumber = input.value; // if (inputNumber) { diff --git a/app/Views/policy_grid.php b/app/Views/policy_grid.php index 64af741e..8cc5b360 100644 --- a/app/Views/policy_grid.php +++ b/app/Views/policy_grid.php @@ -1424,7 +1424,8 @@ } } - function gpaSumInsureMultiplier() { + function gpaSumInsureMultiplier(element) { + console.log(element); var element = $('#gpa_sum_multiplier')[0]; var sumInsured = $('input[name="gpa_sum_si[]"]'); From b42704f25d59a4807dad808f7af129a46aeee2c9 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Fri, 22 Mar 2024 10:39:40 +0530 Subject: [PATCH 07/48] FIX_CLIENT_BRANCH_MOBILE_VALIDATAION : RV --- app/Views/client_branch.php | 14 ++++++++++---- app/Views/client_policy.php | 13 +++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/app/Views/client_branch.php b/app/Views/client_branch.php index 69e76287..c050dbc6 100644 --- a/app/Views/client_branch.php +++ b/app/Views/client_branch.php @@ -88,7 +88,7 @@
- +
@@ -97,7 +97,7 @@
- +
@@ -293,7 +293,6 @@ $(document).ready(function () { }); - $('body').on('click', '.btnBranchEdit', function () { console.log(branch_form_action); @@ -352,6 +351,13 @@ $(document).ready(function () { }); + $("#remove_btn").click(function(){ + $("#name").val(''); + $("#email").val(''); + $("#mobile").val(''); + $("#designation").val(''); + }) + // Initialize the contact count function appendContactHtml(contact = false, reset = false) { @@ -379,7 +385,7 @@ $(document).ready(function () {
- +
diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index bdbb763b..310e6bda 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -160,6 +160,12 @@ $('#table_list').hide(); $('.btnBack').show(); $('.btnAdd').hide(); + $('#insurer').val(''); + $('#tpa').val(''); + $('#start_date').val(''); + $('#end_date').val(''); + $('#policy').html(''); + $('#is_addon').prop('checked', false); $('#policy_form_action').val(''); }) @@ -299,6 +305,13 @@ `; }); $('#policy_table').append(policyTable); + + $('#insurer').val(''); + $('#tpa').val(''); + $('#start_date').val(''); + $('#end_date').val(''); + $('#policy').html(''); + $('#is_addon').prop('checked', false); }, error: function(xhr, status, error) { console.error(xhr.responseText); From c51c07ce633e3db2a790f094674e1f2ea08d8f57 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Fri, 22 Mar 2024 13:30:55 +0530 Subject: [PATCH 08/48] FIX_RAC_RATE_CLIENT_ID_SET : RV --- app/Controllers/ClientController.php | 4 ++++ app/Views/client_basic_info.php | 5 ++++- app/Views/client_policy.php | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index d2788578..b83853fc 100644 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -596,6 +596,10 @@ class ClientController extends AdminController $policy_type = $this->request->getPost('policy_type'); $client_id = $this->request->getPost('client_id'); $client_policy_id = $this->request->getPost('client_policy_id'); + if(!empty($client_id) && $client_id != null){ + $client_policy_data = $this->clientPolicyModel->where('id', $client_policy_id)->first(); + $client_id = $client_policy_data['client_id']; + } $policy_grid_id = $this->request->getPost('policy_grid_id'); $si_or_bp = $this->request->getPost('si_or_bp'); $basic_multiplier = str_replace(',', '', $this->request->getPost('basic_multiplier')); diff --git a/app/Views/client_basic_info.php b/app/Views/client_basic_info.php index 278938f6..562b3ae1 100644 --- a/app/Views/client_basic_info.php +++ b/app/Views/client_basic_info.php @@ -203,8 +203,11 @@ $(document).ready(function () { $('#policy_PrimaryKey').val(res.data.id); $('#client_id_kyc').val(res.data.id); $('#kyc_PrimaryKey').val(res.data.id); + $('#Client_id').val(res.data.id); $('#entity_type').val(res.data.entity_type_id); + + var client_id_for_file = res.data.id; console.log() if(PrimaryKey === ''){ @@ -226,7 +229,7 @@ $(document).ready(function () {
- +
diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 0fdda4d3..5f8e1cef 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -294,10 +294,10 @@ From 2e79864c4069d7c0a7122c31a95c5f509f5b3fc4 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Sat, 23 Mar 2024 08:48:43 +0530 Subject: [PATCH 09/48] FIX_SHOW_LOGED_NAME_IN_HEADER : RV --- app/Controllers/LoginController.php | 2 +- app/Helpers/session_helper.php | 9 +++++++++ app/Views/layout/header.php | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/Controllers/LoginController.php b/app/Controllers/LoginController.php index c24f4ddc..cb86e2fd 100644 --- a/app/Controllers/LoginController.php +++ b/app/Controllers/LoginController.php @@ -42,7 +42,7 @@ class LoginController extends BaseController if($user){ if($user->is_active !== '0'){ - $session_data = ['isLoggedIn' => True ,'userid' => $user->id]; + $session_data = ['isLoggedIn' => True ,'userid' => $user->id, 'userData' => $user]; set_session_data($session_data); log_message('error', 'Set The UserId : `'. $user->id .'` in Session'); log_message('error', 'User Login Sucessfully'); diff --git a/app/Helpers/session_helper.php b/app/Helpers/session_helper.php index b42f04e7..29255bcc 100644 --- a/app/Helpers/session_helper.php +++ b/app/Helpers/session_helper.php @@ -19,6 +19,15 @@ if (!function_exists('get_session_userid')) { } } +if (!function_exists('get_session_userdata')) { + function get_session_userdata() + { + // $ci =& get_instance(); + $session = \Config\Services::session(); + return $session->get('userData'); + } +} + if (!function_exists('get_session_user')) { function get_session_user() { diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index f69de0f3..66cfab3d 100644 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -393,8 +393,8 @@
-
-
- Self - Spouse - Child 1 - Child 2 - Child 3 - Child 4 +
+
+ Self: + + Spouse: +
- Parent 1 - Parent 2 - Parent-In-Law 1 - Parent-In-Law 2 + Children: + +
+
+ Select Other Members: +
@@ -683,12 +698,37 @@ var grid_html = ''; if (key.includes("family_floaters")) { let checkboxes = document.querySelectorAll(`input[name="${key}[]"]`); if (jsonObject[key]) { - jsonObject[key].forEach(element => { - let checkbox = $(`#${element}`); - if (checkbox.is(":checkbox")) { - checkbox.prop("checked", true); - } - }); + console.log(jsonObject[key]); + if (jsonObject[key].childrens) { + $('#children').val(jsonObject[key].childrens); + } + + if (jsonObject[key].self == 0) { + $('#self').prop('checked', false); + } + + if (jsonObject[key].spouse == 0) { + $('#spouse').prop('checked', false); + }else{ + $('#spouse').prop('checked', true); + } + + + if(jsonObject[key]['either-parents-pil'] == 1){ + $('#family_floaters').val('EPORPIL'); + }else if(jsonObject[key].parents == 1 && jsonObject[key]['parents-in-law'] == 1){ + $('#family_floaters').val('2EPORPIL'); + }else if(jsonObject[key].parents == 2 && jsonObject[key]['parents-in-law'] == 2){ + $('#family_floaters').val('4EPORPIL'); + }else if(jsonObject[key].parents == 1){ + $('#family_floaters').val('1P'); + }else if(jsonObject[key].parents == 2){ + $('#family_floaters').val('2P'); + }else if(jsonObject[key]['parents-in-law'] == 1){ + $('#family_floaters').val('1PIL'); + }else if(jsonObject[key]['parents-in-law'] == 2){ + $('#family_floaters').val('2PIL'); + } } } diff --git a/app/Views/swagger/index.php b/app/Views/swagger/index.php new file mode 100644 index 00000000..865b2a23 --- /dev/null +++ b/app/Views/swagger/index.php @@ -0,0 +1,60 @@ + + + + + + + Swagger UI + + + + + + + +
+ + + + + + + \ No newline at end of file diff --git a/composer.json b/composer.json index e0f50cfa..77501e0f 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,8 @@ "phpmailer/phpmailer": "^6.9", "phpoffice/phpspreadsheet": "^2.0", "psr/log": "^1.1", - "slim/slim": "^4.13" + "slim/slim": "^4.13", + "zircote/swagger-php": "^4.8" }, "require-dev": { "codeigniter/coding-standard": "^1.7", diff --git a/public/assets/api.yaml b/public/assets/api.yaml new file mode 100644 index 00000000..d8159bab --- /dev/null +++ b/public/assets/api.yaml @@ -0,0 +1,890 @@ +openapi: 3.0.0 +paths: + '/nhance/employeeRest/verifyEmployeeNumber': + post: + tags: + - Login + summary: 'Add a new VerifyEmployeeNumber to the store' + operationId: VerifyEmployeeNumber + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + mobile_number: + type: string + description: mobile_number + multipart/form-data: + schema: + type: object + properties: + mobile_number: + type: string + description: mobile_number + + responses: + '201': + description: 'Upload VerifyEmployeeNumber' + content: + application/json: + schema: + $ref: '#/components/schemas/VerifyEmployeeNumber' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/employeeRest/getVerifiedUserData': + post: + tags: + - Login + summary: ' GetVerifiedUserData' + operationId: GetVerifiedUserData + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + mobile_number: + type: string + description: mobile_number + otp: + type: string + description: otp + multipart/form-data: + schema: + type: object + properties: + mobile_number: + type: string + description: mobile_number + otp: + type: string + description: otp + responses: + '201': + description: 'GetVerifiedUserData' + content: + application/json: + schema: + $ref: '#/components/schemas/GetVerifiedUserData' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/employeeRest/verifyHrWithMobileNumber': + post: + tags: + - Login + summary: 'VerifyHrWithMobileNumber' + operationId: VerifyHrWithMobileNumber + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + mobile_number: + type: string + description: mobile_number + multipart/form-data: + schema: + type: object + properties: + mobile_number: + type: string + description: mobile_number + responses: + '201': + description: 'VerifyHrWithMobileNumber' + content: + application/json: + schema: + $ref: '#/components/schemas/VerifyHrWithMobileNumber' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/employeeRest/getVerifiedHrData': + post: + tags: + - Login + summary: ' GetVerifiedHrData' + operationId: GetVerifiedHrData + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + mobile_number: + type: string + description: mobile_number + otp: + type: string + description: otp + + multipart/form-data: + schema: + type: object + properties: + mobile_number: + type: string + description: mobile_number + otp: + type: string + description: otp + responses: + '201': + description: 'GetVerifiedHrData' + content: + application/json: + schema: + $ref: '#/components/schemas/GetVerifiedHrData' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/employeeRest/employeeUpload': + post: + tags: + # - EmployeeUpload + summary: 'Add a new EmployeeUpload to the store' + operationId: EmployeeUpload + parameters: + - name: auth + in: header + description: an authorization header + required: true + type: string + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + properties: + client_id: + type: integer + description: client_id + policy_id: + type: integer + description: policy_id + file: + type: string + format: binary + description: File to upload + application/json: + schema: + type: object + properties: + client_id: + type: integer + description: client_id + policy_id: + type: integer + description: policy_id + responses: + '201': + description: 'Upload EmployeeUpload' + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeUpload' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/getEmployeeProfile': + get: + tags: + # - EmployeeUpload + summary: 'GetEmployeeProfile' + operationId: GetEmployeeProfile + parameters: + - name: emp_code + in: query + description: an authorization header + required: true + type: string + responses: + '201': + description: 'GetEmployeeProfile' + content: + application/json: + schema: + $ref: '#/components/schemas/GetEmployeeProfile' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/editEmployeeProfile': + post: + tags: + # - EmployeeUpload + summary: 'EditEmployeeProfile' + operationId: EditEmployeeProfile + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + id: + type: string + description: The ID of the employee. + client_id: + type: string + description: The ID of the client. + relationship: + type: string + description: The relationship of the employee. + relationship_code: + type: string + description: The code representing the relationship. + change_event: + type: string + description: The change event associated with the employee. + batch_id: + type: string + description: The ID of the batch. + emp_code: + type: string + description: The code of the employee. + name: + type: string + description: The name of the employee. + email_personal: + type: string + description: The personal email of the employee. + email_corporate: + type: string + description: The corporate email of the employee. + mobile: + type: string + description: The mobile number of the employee. + gender: + type: string + description: The gender of the employee. + dob: + type: string + format: date + description: The date of birth of the employee. + doj: + type: string + format: date + description: The date of joining of the employee. + basic_pay: + type: string + description: The basic pay of the employee. + band: + type: string + description: The band of the employee. + designation: + type: string + description: The designation of the employee. + emp_status: + type: string + description: The status of the employee. + is_active: + type: string + description: Indicates if the employee is active. + file_id: + type: string + description: The ID of the file associated with the employee. + + responses: + '201': + description: 'EditEmployeeProfile' + content: + application/json: + schema: + $ref: '#/components/schemas/EditEmployeeProfile' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/employeeRest/relationshipList': + get: + tags: + # - EmployeeUpload + summary: 'RelationshipList' + operationId: RelationshipList + parameters: + - name: auth + in: header + description: an authorization header + required: true + type: string + responses: + '201': + description: 'RelationshipList' + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipList' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/employeeRest/getEmployeeAndDependence': + get: + tags: + # - EmployeeUpload + summary: 'GetEmployeeAndDependence' + operationId: GetEmployeeAndDependence + parameters: + - name: auth + in: header + description: an authorization header + required: true + type: string + - name: emp_code + in: query + description: an authorization header + required: true + type: string + responses: + '201': + description: 'GetEmployeeAndDependence' + content: + application/json: + schema: + $ref: '#/components/schemas/GetEmployeeAndDependence' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/employeeRest/editEmployeeAndDependence': + post: + tags: + # - EmployeeUpload + summary: 'EditEmployeeAndDependence' + operationId: EditEmployeeAndDependence + parameters: + - name: auth + in: header + description: an authorization header + required: true + type: string + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + id: + type: string + description: The ID of the employee. + client_id: + type: string + description: The ID of the client. + relationship: + type: string + description: The relationship of the employee. + relationship_code: + type: string + description: The code representing the relationship. + change_event: + type: string + description: The change event associated with the employee. + batch_id: + type: string + description: The ID of the batch. + emp_code: + type: string + description: The code of the employee. + name: + type: string + description: The name of the employee. + email_personal: + type: string + description: The personal email of the employee. + email_corporate: + type: string + description: The corporate email of the employee. + mobile: + type: string + description: The mobile number of the employee. + gender: + type: string + description: The gender of the employee. + dob: + type: string + format: date + description: The date of birth of the employee. + doj: + type: string + format: date + description: The date of joining of the employee. + basic_pay: + type: string + description: The basic pay of the employee. + band: + type: string + description: The band of the employee. + designation: + type: string + description: The designation of the employee. + emp_status: + type: string + description: The status of the employee. + is_active: + type: string + description: Indicates if the employee is active. + file_id: + type: string + description: The ID of the file associated with the employee. + + responses: + '201': + description: 'EditEmployeeAndDependence' + content: + application/json: + schema: + $ref: '#/components/schemas/EditEmployeeAndDependence' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/employeeRest/addEmployeeAndDependence': + post: + tags: + # - EmployeeUpload + summary: 'AddEmployeeAndDependence' + operationId: AddEmployeeAndDependence + parameters: + - name: auth + in: header + description: an authorization header + required: true + type: string + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + client_id: + type: string + description: The ID of the client. + relationship: + type: string + description: The relationship of the employee. + relationship_code: + type: string + description: The code representing the relationship. + change_event: + type: string + description: The change event associated with the employee. + batch_id: + type: string + description: The ID of the batch. + emp_code: + type: string + description: The code of the employee. + name: + type: string + description: The name of the employee. + email_personal: + type: string + description: The personal email of the employee. + email_corporate: + type: string + description: The corporate email of the employee. + mobile: + type: string + description: The mobile number of the employee. + gender: + type: string + description: The gender of the employee. + dob: + type: string + format: date + description: The date of birth of the employee. + doj: + type: string + format: date + description: The date of joining of the employee. + basic_pay: + type: string + description: The basic pay of the employee. + band: + type: string + description: The band of the employee. + designation: + type: string + description: The designation of the employee. + emp_status: + type: string + description: The status of the employee. + is_active: + type: string + description: Indicates if the employee is active. + file_id: + type: string + description: The ID of the file associated with the employee. + + responses: + '201': + description: 'EditEmployeeAndDependence' + content: + application/json: + schema: + $ref: '#/components/schemas/AddEmployeeAndDependence' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/employeeRest/getEmployeePolicy': + get: + tags: + # - EmployeeUpload + summary: 'GetEmployeePolicy' + operationId: GetEmployeePolicy + parameters: + - name: auth + in: header + description: an authorization header + required: true + type: string + - name: id + in: query + description: an authorization header + required: true + type: string + - name: emp_code + in: query + description: an authorization header + required: true + type: string + responses: + '201': + description: 'GetEmployeePolicy' + content: + application/json: + schema: + $ref: '#/components/schemas/GetEmployeePolicy' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/employeeRest/createOrUpdateEmployeePolicySiAmount': + post: + tags: + # - EmployeeUpload + summary: 'CreateOrUpdateEmployeePolicySiAmount' + operationId: CreateOrUpdateEmployeePolicySiAmount + parameters: + - name: auth + in: header + description: an authorization header + required: true + type: string + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + employee_id: + type: integer + description: The ID of the employee. + client_policy_id: + type: integer + description: The ID of the client. + basic_cover_si: + type: string + description: The Employee Policy. + premium: + type: string + description: The code representing the Employee Policy. + + responses: + '201': + description: 'CreateOrUpdateEmployeePolicySiAmount' + content: + application/json: + schema: + $ref: '#/components/schemas/CreateOrUpdateEmployeePolicySiAmount' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/employeeRest/deleteDependence': + get: + tags: + # - EmployeeUpload + summary: 'DeleteDependence' + operationId: DeleteDependence + parameters: + - name: auth + in: header + description: an authorization header + required: true + type: string + - name: id + in: query + description: an authorization header + required: true + type: string + responses: + '201': + description: 'DeleteDependence' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteDependence' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/employeeRest/getEmployeeAndDependenceByClientId': + get: + tags: + # - EmployeeUpload + summary: 'GetEmployeeAndDependenceByClientId' + operationId: GetEmployeeAndDependenceByClientId + parameters: + - name: auth + in: header + description: an authorization header + required: true + type: string + - name: client_id + in: query + description: an authorization header + required: true + type: string + - name: client_policy_id + in: query + description: an authorization header + required: true + type: string + responses: + '201': + description: 'GetEmployeeAndDependenceByClientId' + content: + application/json: + schema: + $ref: '#/components/schemas/GetEmployeeAndDependenceByClientId' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + '/nhance/employeeRest/getClientPolicy': + get: + tags: + # - EmployeeUpload + summary: 'GetClientPolicy' + operationId: GetClientPolicy + parameters: + - name: auth + in: header + description: an authorization header + required: true + type: string + responses: + '201': + description: 'GetClientPolicy' + content: + application/json: + schema: + $ref: '#/components/schemas/GetClientPolicy' + '405': + description: 'Invalid input' + security: + - bearer_auth: [] + + + + + +components: + schemas: + EmployeeUpload: + title: EmployeeUpload + description: EmployeeUpload + properties: + client_id: + title: client_id + description: client_id + type: integer + policy_id: + title: policy_id + description: policy_id + type: integer + file: + title: file + description: file + type: string + format: binary + type: object + GetVerifiedUserData: + title: GetVerifiedUserData + description: GetVerifiedUserData + properties: + mobile_number: + title: mobile_number + description: mobile_number + type: string + otp: + title: otp + description: otp + type: string + type: object + VerifyEmployeeNumber: + title: VerifyEmployeeNumber + description: VerifyEmployeeNumber + properties: + mobile_number: + title: mobile_number + description: mobile_number + type: string + type: object + GetVerifiedHrData: + title: GetVerifiedHrData + description: GetVerifiedHrData + properties: + mobile_number: + title: mobile_number + description: mobile_number + type: string + otp: + title: otp + description: otp + type: string + type: object + VerifyHrWithMobileNumber: + title: VerifyHrWithMobileNumber + description: VerifyHrWithMobileNumber + properties: + mobile_number: + title: mobile_number + description: mobile_number + type: string + type: object + GetEmployeeProfile: + title: GetEmployeeProfile + description: GetEmployeeProfile + properties: + emp_code: + title: emp_code + description: emp_code + type: string + type: object + EditEmployeeProfile: + title: EditEmployeeProfile + description: EditEmployeeProfile + properties: + emp_code: + title: emp_code + description: emp_code + type: string + type: object + RelationshipList: + title: RelationshipList + description: RelationshipList + type: object + EditEmployeeAndDependence: + title: EditEmployeeAndDependence + description: EditEmployeeAndDependence + properties: + emp_code: + title: emp_code + description: emp_code + type: string + type: object + GetEmployeeAndDependence: + title: EditEmployeeAndDependence + description: EditEmployeeAndDependence + properties: + emp_code: + title: emp_code + description: emp_code + type: string + type: object + AddEmployeeAndDependence: + title: AddEmployeeAndDependence + description: AddEmployeeAndDependence + properties: + emp_code: + title: emp_code + description: emp_code + type: string + type: object + GetEmployeePolicy: + title: GetEmployeePolicy + description: GetEmployeePolicy + properties: + id: + title: id + description: id + type: integer + emp_code: + title: emp_code + description: emp_code + type: string + type: object + CreateOrUpdateEmployeePolicySiAmount: + title: CreateOrUpdateEmployeePolicySiAmount + description: CreateOrUpdateEmployeePolicySiAmount + properties: + employee_id: + title: employee_id + description: employee_id + type: integer + client_policy_id: + title: client_policy_id + description: client_policy_id + type: integer + basic_cover_si: + title: basic_cover_si + description: basic_cover_si + type: string + premium: + title: premium + description: premium + type: string + type: object + DeleteDependence: + title: DeleteDependence + description: DeleteDependence + properties: + id: + title: id + description: id + type: integer + type: object + GetEmployeeAndDependenceByClientId: + title: GetEmployeeAndDependenceByClientId + description: GetEmployeeAndDependenceByClientId + properties: + client_id: + title: client_id + description: client_id + type: integer + client_policy_id: + title: client_policy_id + description: client_policy_id + type: integer + type: object + GetClientPolicy: + title: GetClientPolicy + description: GetClientPolicy + type: object + + # securitySchemes: + # Authorization: + # type: http + # scheme: bearer + # bearerFormat: JWT \ No newline at end of file diff --git a/public/assets/swagger/favicon-16x16.png b/public/assets/swagger/favicon-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..8b194e617af1c135e6b37939591d24ac3a5efa18 GIT binary patch literal 665 zcmV;K0%rY*P)}JKSduyL>)s!A4EhTMMEM%Q;aL6%l#xiZiF>S;#Y{N2Zz%pvTGHJduXuC6Lx-)0EGfRy*N{Tv4i8@4oJ41gw zKzThrcRe|7J~(YYIBq{SYCkn-KQm=N8$CrEK1CcqMI1dv9z#VRL_{D)L|`QmF8}}l zJ9JV`Q}p!p_4f7m_U`WQ@apR4;o;!mnU<7}iG_qr zF(e)x9~BG-3IzcG2M4an0002kNkl41`ZiN1i62V%{PM@Ry|IS_+Yc7{bb`MM~xm(7p4|kMHP&!VGuDW4kFixat zXw43VmgwEvB$hXt_u=vZ>+v4i7E}n~eG6;n4Z=zF1n?T*yg<;W6kOfxpC6nao>VR% z?fpr=asSJ&`L*wu^rLJ5Peq*PB0;alL#XazZCBxJLd&giTfw@!hW167F^`7kobi;( ze<<>qNlP|xy7S1zl@lZNIBR7#o9ybJsptO#%}P0hz~sBp00000NkvXXu0mjfUsDF? literal 0 HcmV?d00001 diff --git a/public/assets/swagger/favicon-32x32.png b/public/assets/swagger/favicon-32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..249737fe44558e679f0b67134e274461d988fa98 GIT binary patch literal 628 zcmV-)0*n2LP)Ma*GM0}OV<074bNCP7P7GVd{iMr*I6y~TMLss@FjvgL~HxU z%Vvj33AwpD(Z4*$Mfx=HaU16axM zt2xG_rloN<$iy9j9I5 + + + + + Swagger UI + + + + + + + +
+ + + + + + diff --git a/public/assets/swagger/oauth2-redirect.html b/public/assets/swagger/oauth2-redirect.html new file mode 100644 index 00000000..a013fc82 --- /dev/null +++ b/public/assets/swagger/oauth2-redirect.html @@ -0,0 +1,68 @@ + + +Swagger UI: OAuth2 Redirect + + + + diff --git a/public/assets/swagger/swagger-ui-bundle.js b/public/assets/swagger/swagger-ui-bundle.js new file mode 100644 index 00000000..73773b75 --- /dev/null +++ b/public/assets/swagger/swagger-ui-bundle.js @@ -0,0 +1,92 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["esprima"],t):"object"==typeof exports?exports.SwaggerUIBundle=t(function(){try{return require("esprima")}catch(e){}}()):e.SwaggerUIBundle=t(e.esprima)}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=586)}([function(e,t,n){"use strict";e.exports=n(121)},function(e,t,n){e.exports=n(901)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:z(e)}function r(e){return u(e)?e:V(e)}function o(e){return s(e)?e:W(e)}function i(e){return a(e)&&!c(e)?e:H(e)}function a(e){return!(!e||!e[f])}function u(e){return!(!e||!e[p])}function s(e){return!(!e||!e[h])}function c(e){return u(e)||s(e)}function l(e){return!(!e||!e[d])}t(r,n),t(o,n),t(i,n),n.isIterable=a,n.isKeyed=u,n.isIndexed=s,n.isAssociative=c,n.isOrdered=l,n.Keyed=r,n.Indexed=o,n.Set=i;var f="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",v={},m={value:!1},g={value:!1};function y(e){return e.value=!1,e}function b(e){e&&(e.value=!0)}function _(){}function x(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?w(e)+t:t}function S(){return!0}function C(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function A(e,t){return k(e,t,0)}function O(e,t){return k(e,t,t)}function k(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var j,T,P,I="function"==typeof Symbol&&Symbol.iterator,M=I||"@@iterator";function N(e){this.next=e}function D(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function R(){return{value:void 0,done:!0}}function L(e){return!!U(e)}function B(e){return e&&"function"==typeof e.next}function F(e){var t=U(e);return t&&t.call(e)}function U(e){var t=e&&(I&&e[I]||e["@@iterator"]);if("function"==typeof t)return t}function q(e){return e&&"number"==typeof e.length}function z(e){return null==e?Z():a(e)?e.toSeq():function(e){var t=ee(e)||"object"==typeof e&&new K(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function V(e){return null==e?Z().toKeyedSeq():a(e)?u(e)?e.toSeq():e.fromEntrySeq():X(e)}function W(e){return null==e?Z():a(e)?u(e)?e.entrySeq():e.toIndexedSeq():Q(e)}function H(e){return(null==e?Z():a(e)?u(e)?e.entrySeq():e:Q(e)).toSetSeq()}function J(e){this._array=e,this.size=e.length}function K(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function $(e){this._iterable=e,this.size=e.length||e.size}function Y(e){this._iterator=e,this._iteratorCache=[]}function G(e){return!(!e||!e["@@__IMMUTABLE_SEQ__@@"])}function Z(){return j||(j=new J([]))}function X(e){var t=Array.isArray(e)?new J(e).fromEntrySeq():B(e)?new Y(e).fromEntrySeq():L(e)?new $(e).fromEntrySeq():"object"==typeof e?new K(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function Q(e){var t=ee(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ee(e){return q(e)?new J(e):B(e)?new Y(e):L(e)?new $(e):void 0}function te(e,t,n,r){var o=e._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var u=o[n?i-a:a];if(!1===t(u[1],r?u[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function ne(e,t,n,r){var o=e._cache;if(o){var i=o.length-1,a=0;return new N((function(){var e=o[n?i-a:a];return a++>i?{value:void 0,done:!0}:D(t,r?e[0]:a-1,e[1])}))}return e.__iteratorUncached(t,n)}function re(e,t){return t?function e(t,n,r,o){return Array.isArray(n)?t.call(o,r,W(n).map((function(r,o){return e(t,r,o,n)}))):ie(n)?t.call(o,r,V(n).map((function(r,o){return e(t,r,o,n)}))):n}(t,e,"",{"":e}):oe(e)}function oe(e){return Array.isArray(e)?W(e).map(oe).toList():ie(e)?V(e).map(oe).toMap():e}function ie(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ae(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ue(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||u(e)!==u(t)||s(e)!==s(t)||l(e)!==l(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(l(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ae(o[1],e)&&(n||ae(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var i=e;e=t,t=i}var f=!0,p=t.__iterate((function(t,r){if(n?!e.has(t):o?!ae(t,e.get(r,v)):!ae(e.get(r,v),t))return f=!1,!1}));return f&&e.size===p}function se(e,t){if(!(this instanceof se))return new se(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(T)return T;T=this}}function ce(e,t){if(!e)throw new Error(t)}function le(e,t,n){if(!(this instanceof le))return new le(e,t,n);if(ce(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),tr?{value:void 0,done:!0}:D(e,o,n[t?r-o++:o++])}))},t(K,V),K.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},K.prototype.has=function(e){return this._object.hasOwnProperty(e)},K.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[t?o-i:i];if(!1===e(n[a],a,this))return i+1}return i},K.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,i=0;return new N((function(){var a=r[t?o-i:i];return i++>o?{value:void 0,done:!0}:D(e,a,n[a])}))},K.prototype[d]=!0,t($,W),$.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=F(this._iterable),r=0;if(B(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},$.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=F(this._iterable);if(!B(n))return new N(R);var r=0;return new N((function(){var t=n.next();return t.done?t:D(e,r++,t.value)}))},t(Y,W),Y.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return D(e,o,r[o++])}))},t(se,W),se.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},se.prototype.get=function(e,t){return this.has(e)?this._value:t},se.prototype.includes=function(e){return ae(this._value,e)},se.prototype.slice=function(e,t){var n=this.size;return C(e,t,n)?this:new se(this._value,O(t,n)-A(e,n))},se.prototype.reverse=function(){return this},se.prototype.indexOf=function(e){return ae(this._value,e)?0:-1},se.prototype.lastIndexOf=function(e){return ae(this._value,e)?this.size:-1},se.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?{value:void 0,done:!0}:D(e,i++,a)}))},le.prototype.equals=function(e){return e instanceof le?this._start===e._start&&this._end===e._end&&this._step===e._step:ue(this,e)},t(fe,n),t(pe,fe),t(he,fe),t(de,fe),fe.Keyed=pe,fe.Indexed=he,fe.Set=de;var ve="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function me(e){return e>>>1&1073741824|3221225471&e}function ge(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return me(n)}if("string"===t)return e.length>Ce?function(e){var t=ke[e];return void 0===t&&(t=ye(e),Oe===Ae&&(Oe=0,ke={}),Oe++,ke[e]=t),t}(e):ye(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(we&&void 0!==(t=be.get(e)))return t;if(void 0!==(t=e[Se]))return t;if(!xe){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Se]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++Ee,1073741824&Ee&&(Ee=0),we)be.set(e,t);else{if(void 0!==_e&&!1===_e(e))throw new Error("Non-extensible objects are not allowed as keys.");if(xe)Object.defineProperty(e,Se,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Se]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Se]=t}}return t}(e);if("function"==typeof e.toString)return ye(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ye(e){for(var t=0,n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},Te.prototype.toString=function(){return this.__toString("Map {","}")},Te.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Te.prototype.set=function(e,t){return He(this,e,t)},Te.prototype.setIn=function(e,t){return this.updateIn(e,v,(function(){return t}))},Te.prototype.remove=function(e){return He(this,e,v)},Te.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return v}))},Te.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Te.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=function e(t,n,r,o){var i=t===v,a=n.next();if(a.done){var u=i?r:t,s=o(u);return s===u?t:s}ce(i||t&&t.set,"invalid keyPath");var c=a.value,l=i?v:t.get(c,v),f=e(l,n,r,o);return f===l?t:f===v?t.remove(c):(i?We():t).set(c,f)}(this,Yt(e),t,n);return r===v?void 0:r},Te.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):We()},Te.prototype.merge=function(){return Ye(this,void 0,arguments)},Te.prototype.mergeWith=function(t){var n=e.call(arguments,1);return Ye(this,t,n)},Te.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,We(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Te.prototype.mergeDeep=function(){return Ye(this,Ge,arguments)},Te.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Ye(this,Ze(t),n)},Te.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,We(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Te.prototype.sort=function(e){return xt(Bt(this,e))},Te.prototype.sortBy=function(e,t){return xt(Bt(this,t,e))},Te.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Te.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new _)},Te.prototype.asImmutable=function(){return this.__ensureOwner()},Te.prototype.wasAltered=function(){return this.__altered},Te.prototype.__iterator=function(e,t){return new Ue(this,e,t)},Te.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Te.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ve(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Te.isMap=Pe;var Ie,Me="@@__IMMUTABLE_MAP__@@",Ne=Te.prototype;function De(e,t){this.ownerID=e,this.entries=t}function Re(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Le(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Be(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Fe(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function Ue(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&ze(e._root)}function qe(e,t){return D(e,t[0],t[1])}function ze(e,t){return{node:e,index:0,__prev:t}}function Ve(e,t,n,r){var o=Object.create(Ne);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function We(){return Ie||(Ie=Ve(0))}function He(e,t,n){var r,o;if(e._root){var i=y(m),a=y(g);if(r=Je(e._root,e.__ownerID,0,void 0,t,n,i,a),!a.value)return e;o=e.size+(i.value?n===v?-1:1:0)}else{if(n===v)return e;o=1,r=new De(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?Ve(o,r):We()}function Je(e,t,n,r,o,i,a,u){return e?e.update(t,n,r,o,i,a,u):i===v?e:(b(u),b(a),new Fe(t,r,[o,i]))}function Ke(e){return e.constructor===Fe||e.constructor===Be}function $e(e,t,n,r,o){if(e.keyHash===r)return new Be(t,r,[e.entry,o]);var i,a=31&(0===n?e.keyHash:e.keyHash>>>n),u=31&(0===n?r:r>>>n);return new Re(t,1<>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function et(e,t,n,r){var o=r?e:x(e);return o[t]=n,o}Ne[Me]=!0,Ne.delete=Ne.remove,Ne.removeIn=Ne.deleteIn,De.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i=tt)return function(e,t,n,r){e||(e=new _);for(var o=new Fe(e,ge(n),[n,r]),i=0;i>>e)),i=this.bitmap;return 0==(i&o)?r:this.nodes[Qe(i&o-1)].get(e+5,t,n,r)},Re.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=ge(r));var u=31&(0===t?n:n>>>t),s=1<=nt)return function(e,t,n,r,o){for(var i=0,a=new Array(32),u=0;0!==n;u++,n>>>=1)a[u]=1&n?t[i++]:void 0;return a[r]=o,new Le(e,i+1,a)}(e,p,c,u,d);if(l&&!d&&2===p.length&&Ke(p[1^f]))return p[1^f];if(l&&d&&1===p.length&&Ke(d))return d;var m=e&&e===this.ownerID,g=l?d?c:c^s:c|s,y=l?d?et(p,f,d,m):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),i=0,a=0;a>>e),i=this.nodes[o];return i?i.get(e+5,t,n,r):r},Le.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=ge(r));var u=31&(0===t?n:n>>>t),s=o===v,c=this.nodes,l=c[u];if(s&&!l)return this;var f=Je(l,e,t+5,n,r,o,i,a);if(f===l)return this;var p=this.count;if(l){if(!f&&--p0&&r<32?ht(0,r,5,null,new st(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function it(e){return!(!e||!e[at])}t(ot,he),ot.of=function(){return this(arguments)},ot.prototype.toString=function(){return this.__toString("List [","]")},ot.prototype.get=function(e,t){if((e=E(this,e))>=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?yt(e,t).set(0,n):yt(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,i=y(g);return t>=_t(e._capacity)?r=vt(r,e.__ownerID,0,t,n,i):o=vt(o,e.__ownerID,e._level,t,n,i),i.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):ht(e._origin,e._capacity,e._level,o,r):e}(this,e,t)},ot.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},ot.prototype.insert=function(e,t){return this.splice(e,0,t)},ot.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):dt()},ot.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){yt(n,0,t+e.length);for(var r=0;r>>t&31;if(r>=this.array.length)return new st([],e);var o,i=0===r;if(t>0){var a=this.array[r];if((o=a&&a.removeBefore(e,t-5,n))===a&&i)return this}if(i&&!o)return this;var u=mt(this,e);if(!i)for(var s=0;s>>t&31;if(o>=this.array.length)return this;if(t>0){var i=this.array[o];if((r=i&&i.removeAfter(e,t-5,n))===i&&o===this.array.length-1)return this}var a=mt(this,e);return a.array.splice(o+1),r&&(a.array[o]=r),a};var ct,lt,ft={};function pt(e,t){var n=e._origin,r=e._capacity,o=_t(r),i=e._tail;return a(e._root,e._level,0);function a(e,u,s){return 0===u?function(e,a){var u=a===o?i&&i.array:e&&e.array,s=a>n?0:n-a,c=r-a;return c>32&&(c=32),function(){if(s===c)return ft;var e=t?--c:s++;return u&&u[e]}}(e,s):function(e,o,i){var u,s=e&&e.array,c=i>n?0:n-i>>o,l=1+(r-i>>o);return l>32&&(l=32),function(){for(;;){if(u){var e=u();if(e!==ft)return e;u=null}if(c===l)return ft;var n=t?--l:c++;u=a(s&&s[n],o-5,i+(n<>>n&31,s=e&&u0){var c=e&&e.array[u],l=vt(c,t,n-5,r,o,i);return l===c?e:((a=mt(e,t)).array[u]=l,a)}return s&&e.array[u]===o?e:(b(i),a=mt(e,t),void 0===o&&u===a.array.length-1?a.array.pop():a.array[u]=o,a)}function mt(e,t){return t&&e&&t===e.ownerID?e:new st(e?e.array.slice():[],t)}function gt(e,t){if(t>=_t(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&31],r-=5;return n}}function yt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new _,o=e._origin,i=e._capacity,a=o+t,u=void 0===n?i:n<0?i+n:o+n;if(a===o&&u===i)return e;if(a>=u)return e.clear();for(var s=e._level,c=e._root,l=0;a+l<0;)c=new st(c&&c.array.length?[void 0,c]:[],r),l+=1<<(s+=5);l&&(a+=l,o+=l,u+=l,i+=l);for(var f=_t(i),p=_t(u);p>=1<f?new st([],r):h;if(h&&p>f&&a5;m-=5){var g=f>>>m&31;v=v.array[g]=mt(v.array[g],r)}v.array[f>>>5&31]=h}if(u=p)a-=p,u-=p,s=5,c=null,d=d&&d.removeBefore(r,0,a);else if(a>o||p>>s&31;if(y!==p>>>s&31)break;y&&(l+=(1<o&&(c=c.removeBefore(r,s,a-l)),c&&pi&&(i=c.size),a(s)||(c=c.map((function(e){return re(e)}))),r.push(c)}return i>e.size&&(e=e.setSize(i)),Xe(e,t,r)}function _t(e){return e<32?0:e-1>>>5<<5}function xt(e){return null==e?St():wt(e)?e:St().withMutations((function(t){var n=r(e);je(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function wt(e){return Pe(e)&&l(e)}function Et(e,t,n,r){var o=Object.create(xt.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o}function St(){return lt||(lt=Et(We(),dt()))}function Ct(e,t,n){var r,o,i=e._map,a=e._list,u=i.get(t),s=void 0!==u;if(n===v){if(!s)return e;a.size>=32&&a.size>=2*i.size?(r=(o=a.filter((function(e,t){return void 0!==e&&u!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=u===a.size-1?a.pop():a.set(u,void 0))}else if(s){if(n===a.get(u)[1])return e;r=i,o=a.set(u,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):Et(r,o)}function At(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Ot(e){this._iter=e,this.size=e.size}function kt(e){this._iter=e,this.size=e.size}function jt(e){this._iter=e,this.size=e.size}function Tt(e){var t=Jt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Kt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new N((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,n)},t}function Pt(e,t,n){var r=Jt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var i=e.get(r,v);return i===v?o:t.call(n,i,r,e)},r.__iterateUncached=function(r,o){var i=this;return e.__iterate((function(e,o,a){return!1!==r(t.call(n,e,o,a),o,i)}),o)},r.__iteratorUncached=function(r,o){var i=e.__iterator(2,o);return new N((function(){var o=i.next();if(o.done)return o;var a=o.value,u=a[0];return D(r,u,t.call(n,a[1],u,e),o)}))},r}function It(e,t){var n=Jt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Tt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Kt,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function Mt(e,t,n,r){var o=Jt(e);return r&&(o.has=function(r){var o=e.get(r,v);return o!==v&&!!t.call(n,o,r,e)},o.get=function(r,o){var i=e.get(r,v);return i!==v&&t.call(n,i,r,e)?i:o}),o.__iterateUncached=function(o,i){var a=this,u=0;return e.__iterate((function(e,i,s){if(t.call(n,e,i,s))return u++,o(e,r?i:u-1,a)}),i),u},o.__iteratorUncached=function(o,i){var a=e.__iterator(2,i),u=0;return new N((function(){for(;;){var i=a.next();if(i.done)return i;var s=i.value,c=s[0],l=s[1];if(t.call(n,l,c,e))return D(o,r?c:u++,l,i)}}))},o}function Nt(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=o:n|=0),C(t,n,o))return e;var i=A(t,o),a=O(n,o);if(i!=i||a!=a)return Nt(e.toSeq().cacheResult(),t,n,r);var u,s=a-i;s==s&&(u=s<0?0:s);var c=Jt(e);return c.size=0===u?u:e.size&&u||void 0,!r&&G(e)&&u>=0&&(c.get=function(t,n){return(t=E(this,t))>=0&&tu)return{value:void 0,done:!0};var e=o.next();return r||1===t?e:D(t,s-1,0===t?void 0:e.value[1],e)}))},c}function Dt(e,t,n,r){var o=Jt(e);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var u=!0,s=0;return e.__iterate((function(e,i,c){if(!u||!(u=t.call(n,e,i,c)))return s++,o(e,r?i:s-1,a)})),s},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var u=e.__iterator(2,i),s=!0,c=0;return new N((function(){var e,i,l;do{if((e=u.next()).done)return r||1===o?e:D(o,c++,0===o?void 0:e.value[1],e);var f=e.value;i=f[0],l=f[1],s&&(s=t.call(n,l,i,a))}while(s);return 2===o?e:D(o,i,l,e)}))},o}function Rt(e,t){var n=u(e),o=[e].concat(t).map((function(e){return a(e)?n&&(e=r(e)):e=n?X(e):Q(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var i=o[0];if(i===e||n&&u(i)||s(e)&&s(i))return i}var c=new J(o);return n?c=c.toKeyedSeq():s(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function Lt(e,t,n){var r=Jt(e);return r.__iterateUncached=function(r,o){var i=0,u=!1;return function e(s,c){var l=this;s.__iterate((function(o,s){return(!t||c0}function qt(e,t,r){var o=Jt(e);return o.size=new J(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var i=r.map((function(e){return e=n(e),F(o?e.reverse():e)})),a=0,u=!1;return new N((function(){var n;return u||(n=i.map((function(e){return e.next()})),u=n.some((function(e){return e.done}))),u?{value:void 0,done:!0}:D(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function zt(e,t){return G(e)?t:e.constructor(t)}function Vt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Wt(e){return je(e.size),w(e)}function Ht(e){return u(e)?r:s(e)?o:i}function Jt(e){return Object.create((u(e)?V:s(e)?W:H).prototype)}function Kt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):z.prototype.cacheResult.call(this)}function $t(e,t){return e>t?1:e=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):xn(e,t)},mn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;je(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):xn(t,n)},mn.prototype.pop=function(){return this.slice(1)},mn.prototype.unshift=function(){return this.push.apply(this,arguments)},mn.prototype.unshiftAll=function(e){return this.pushAll(e)},mn.prototype.shift=function(){return this.pop.apply(this,arguments)},mn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):wn()},mn.prototype.slice=function(e,t){if(C(e,t,this.size))return this;var n=A(e,this.size);if(O(t,this.size)!==this.size)return he.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):xn(r,o)},mn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?xn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},mn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},mn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new N((function(){if(r){var t=r.value;return r=r.next,D(e,n++,t)}return{value:void 0,done:!0}}))},mn.isStack=gn;var yn,bn="@@__IMMUTABLE_STACK__@@",_n=mn.prototype;function xn(e,t,n,r){var o=Object.create(_n);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function wn(){return yn||(yn=xn(0))}function En(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}_n[bn]=!0,_n.withMutations=Ne.withMutations,_n.asMutable=Ne.asMutable,_n.asImmutable=Ne.asImmutable,_n.wasAltered=Ne.wasAltered,n.Iterator=N,En(n,{toArray:function(){je(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Ot(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new At(this,!0)},toMap:function(){return Te(this.toKeyedSeq())},toObject:function(){je(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return xt(this.toKeyedSeq())},toOrderedSet:function(){return ln(u(this)?this.valueSeq():this)},toSet:function(){return tn(u(this)?this.valueSeq():this)},toSetSeq:function(){return new kt(this)},toSeq:function(){return s(this)?this.toIndexedSeq():u(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return mn(u(this)?this.valueSeq():this)},toList:function(){return ot(u(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return zt(this,Rt(this,t))},includes:function(e){return this.some((function(t){return ae(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){je(this.size);var n=!0;return this.__iterate((function(r,o,i){if(!e.call(t,r,o,i))return n=!1,!1})),n},filter:function(e,t){return zt(this,Mt(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return je(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){je(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return zt(this,Pt(this,e,t))},reduce:function(e,t,n){var r,o;return je(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,i,a){o?(o=!1,r=t):r=e.call(n,r,t,i,a)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return zt(this,It(this,!0))},slice:function(e,t){return zt(this,Nt(this,e,t,!0))},some:function(e,t){return!this.every(kn(e),t)},sort:function(e){return zt(this,Bt(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return w(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Te().asMutable();return e.__iterate((function(o,i){r.update(t.call(n,o,i,e),0,(function(e){return e+1}))})),r.asImmutable()}(this,e,t)},equals:function(e){return ue(this,e)},entrySeq:function(){var e=this;if(e._cache)return new J(e._cache);var t=e.toSeq().map(On).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(kn(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,o,i){if(e.call(t,n,o,i))return r=[o,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(S)},flatMap:function(e,t){return zt(this,function(e,t,n){var r=Ht(e);return e.toSeq().map((function(o,i){return r(t.call(n,o,i,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return zt(this,Lt(this,e,!0))},fromEntrySeq:function(){return new jt(this)},get:function(e,t){return this.find((function(t,n){return ae(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=Yt(e);!(n=o.next()).done;){var i=n.value;if((r=r&&r.get?r.get(i,v):v)===v)return t}return r},groupBy:function(e,t){return function(e,t,n){var r=u(e),o=(l(e)?xt():Te()).asMutable();e.__iterate((function(i,a){o.update(t.call(n,i,a,e),(function(e){return(e=e||[]).push(r?[a,i]:i),e}))}));var i=Ht(e);return o.map((function(t){return zt(e,i(t))}))}(this,e,t)},has:function(e){return this.get(e,v)!==v},hasIn:function(e){return this.getIn(e,v)!==v},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ae(t,e)}))},keySeq:function(){return this.toSeq().map(An).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Ft(this,e)},maxBy:function(e,t){return Ft(this,t,e)},min:function(e){return Ft(this,e?jn(e):In)},minBy:function(e,t){return Ft(this,t?jn(t):In,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return zt(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return zt(this,Dt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(kn(e),t)},sortBy:function(e,t){return zt(this,Bt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return zt(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return zt(this,function(e,t,n){var r=Jt(e);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return e.__iterate((function(e,o,u){return t.call(n,e,o,u)&&++a&&r(e,o,i)})),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=e.__iterator(2,o),u=!0;return new N((function(){if(!u)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var o=e.value,s=o[0],c=o[1];return t.call(n,c,s,i)?2===r?e:D(r,s,c,e):(u=!1,{value:void 0,done:!0})}))},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(kn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=l(e),n=u(e),r=t?1:0;return function(e,t){return t=ve(t,3432918353),t=ve(t<<15|t>>>-15,461845907),t=ve(t<<13|t>>>-13,5),t=ve((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=me((t=ve(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+Mn(ge(e),ge(t))|0}:function(e,t){r=r+Mn(ge(e),ge(t))|0}:t?function(e){r=31*r+ge(e)|0}:function(e){r=r+ge(e)|0}),r)}(this))}});var Sn=n.prototype;Sn[f]=!0,Sn[M]=Sn.values,Sn.__toJS=Sn.toArray,Sn.__toStringMapper=Tn,Sn.inspect=Sn.toSource=function(){return this.toString()},Sn.chain=Sn.flatMap,Sn.contains=Sn.includes,En(r,{flip:function(){return zt(this,Tt(this))},mapEntries:function(e,t){var n=this,r=0;return zt(this,this.toSeq().map((function(o,i){return e.call(t,[i,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return zt(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var Cn=r.prototype;function An(e,t){return t}function On(e,t){return[t,e]}function kn(e){return function(){return!e.apply(this,arguments)}}function jn(e){return function(){return-e.apply(this,arguments)}}function Tn(e){return"string"==typeof e?JSON.stringify(e):String(e)}function Pn(){return x(arguments)}function In(e,t){return et?-1:0}function Mn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Cn[p]=!0,Cn[M]=Sn.entries,Cn.__toJS=Sn.toObject,Cn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Tn(e)},En(o,{toKeyedSeq:function(){return new At(this,!1)},filter:function(e,t){return zt(this,Mt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return zt(this,It(this,!1))},slice:function(e,t){return zt(this,Nt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=A(e,e<0?this.count():this.size);var r=this.slice(0,e);return zt(this,1===n?r:r.concat(x(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return zt(this,Lt(this,e,!1))},get:function(e,t){return(e=E(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=E(this,e))>=0&&(void 0!==this.size?this.size===1/0||e=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,c=!0,f=!1;return{s:function(){n=o()(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){f=!0,u=e},f:function(){try{c||null==n.return||n.return()}finally{if(f)throw u}}}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1)try{return decodeURIComponent(t[1])}catch(e){console.error(e)}return null}function le(e){return t=e.replace(/\.[^./]*$/,""),O()(C()(t));var t}var fe=function(e,t){if(e>t)return"Value must be less than Maximum"},pe=function(e,t){if(et)return"Value must be less than MaxLength"},xe=function(e,t){if(e.length2&&void 0!==arguments[2]?arguments[2]:{},r=n.isOAS3,o=void 0!==r&&r,i=n.bypassRequiredCheck,a=void 0!==i&&i,u=[],s=e.get("required"),c=Object(q.a)(e,{isOAS3:o}),l=c.schema,f=c.parameterContentMediaType;if(!l)return u;var p=l.get("required"),h=l.get("maximum"),d=l.get("minimum"),v=l.get("type"),m=l.get("format"),g=l.get("maxLength"),b=l.get("minLength"),x=l.get("pattern");if(v&&(s||p||t)){var E="string"===v&&t,S="array"===v&&y()(t)&&t.length,C="array"===v&&w.a.List.isList(t)&&t.count(),A="array"===v&&"string"==typeof t&&t,O="file"===v&&t instanceof B.a.File,k="boolean"===v&&(t||!1===t),j="number"===v&&(t||0===t),T="integer"===v&&(t||0===t),P="object"===v&&"object"===_()(t)&&null!==t,I="object"===v&&"string"==typeof t&&t,M=[E,S,C,A,O,k,j,T,P,I],N=M.some((function(e){return!!e}));if((s||p)&&!N&&!a)return u.push("Required field is not provided"),u;if("object"===v&&"string"==typeof t&&(null===f||"application/json"===f))try{JSON.parse(t)}catch(e){return u.push("Parameter string value must be valid JSON"),u}if(x){var D=we(t,x);D&&u.push(D)}if(g||0===g){var R=_e(t,g);R&&u.push(R)}if(b){var L=xe(t,b);L&&u.push(L)}if(h||0===h){var F=fe(t,h);F&&u.push(F)}if(d||0===d){var U=pe(t,d);U&&u.push(U)}if("string"===v){var z;if(!(z="date-time"===m?ye(t):"uuid"===m?be(t):ge(t)))return u;u.push(z)}else if("boolean"===v){var V=me(t);if(!V)return u;u.push(V)}else if("number"===v){var W=he(t);if(!W)return u;u.push(W)}else if("integer"===v){var H=de(t);if(!H)return u;u.push(H)}else if("array"===v){var J;if(!C||!t.count())return u;J=l.getIn(["items","type"]),t.forEach((function(e,t){var n;"number"===J?n=he(e):"integer"===J?n=de(e):"string"===J&&(n=ge(e)),n&&u.push({index:t,error:n})}))}else if("file"===v){var K=ve(t);if(!K)return u;u.push(K)}}return u},Se=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(/xml/.test(t)){if(!e.xml||!e.xml.name){if(e.xml=e.xml||{},!e.$$ref)return e.type||e.items||e.properties||e.additionalProperties?'\n\x3c!-- XML example cannot be generated; root element name is undefined --\x3e':null;var r=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=r[1]}return Object(R.memoizedCreateXMLExample)(e,n)}var o=Object(R.memoizedSampleFromSchema)(e,n);return"object"===_()(o)?p()(o,null,2):o},Ce=function(){var e={},t=B.a.location.search;if(!t)return{};if(""!=t){var n=t.substr(1).split("&");for(var r in n)n.hasOwnProperty(r)&&(r=n[r].split("="),e[decodeURIComponent(r[0])]=r[1]&&decodeURIComponent(r[1])||"")}return e},Ae=function(t){return(t instanceof e?t:new e(t.toString(),"utf-8")).toString("base64")},Oe={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}},tagsSorter:{alpha:function(e,t){return e.localeCompare(t)}}},ke=function(e){var t=[];for(var n in e){var r=e[n];void 0!==r&&""!==r&&t.push([n,"=",encodeURIComponent(r).replace(/%20/g,"+")].join(""))}return t.join("&")},je=function(e,t,n){return!!P()(n,(function(n){return M()(e[n],t[n])}))};function Te(e){return"string"!=typeof e||""===e?"":Object(E.sanitizeUrl)(e)}function Pe(e){return!(!e||e.indexOf("localhost")>=0||e.indexOf("127.0.0.1")>=0||"none"===e)}function Ie(e){if(!w.a.OrderedMap.isOrderedMap(e))return null;if(!e.size)return null;var t=e.find((function(e,t){return t.startsWith("2")&&m()(e.get("content")||{}).length>0})),n=e.get("default")||w.a.OrderedMap(),r=(n.get("content")||w.a.OrderedMap()).keySeq().toJS().length?n:null;return t||r}var Me=function(e){return"string"==typeof e||e instanceof String?e.trim().replace(/\s/g,"%20"):""},Ne=function(e){return U()(Me(e).replace(/%20/g,"_"))},De=function(e){return e.filter((function(e,t){return/^x-/.test(t)}))},Re=function(e){return e.filter((function(e,t){return/^pattern|maxLength|minLength|maximum|minimum/.test(t)}))};function Le(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0};if("object"!==_()(e)||y()(e)||null===e||!t)return e;var r=d()({},e);return m()(r).forEach((function(e){e===t&&n(r[e],e)?delete r[e]:r[e]=Le(r[e],t,n)})),r}function Be(e){if("string"==typeof e)return e;if(e&&e.toJS&&(e=e.toJS()),"object"===_()(e)&&null!==e)try{return p()(e,null,2)}catch(t){return String(e)}return null==e?"":e.toString()}function Fe(e){return"number"==typeof e?e.toString():e}function Ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.returnAll,r=void 0!==n&&n,o=t.allowHashes,i=void 0===o||o;if(!w.a.Map.isMap(e))throw new Error("paramToIdentifier: received a non-Im.Map parameter as input");var a=e.get("name"),u=e.get("in"),s=[];return e&&e.hashCode&&u&&a&&i&&s.push("".concat(u,".").concat(a,".hash-").concat(e.hashCode())),u&&a&&s.push("".concat(u,".").concat(a)),s.push(a),r?s:s[0]||""}function qe(e,t){return Ue(e,{returnAll:!0}).map((function(e){return t[e]})).filter((function(e){return void 0!==e}))[0]}function ze(){return We(V()(32).toString("base64"))}function Ve(e){return We(H()("sha256").update(e).digest("base64"))}function We(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var He=function(e){return!e||!(!$(e)||!e.isEmpty())}}).call(this,n(62).Buffer)},function(e,t,n){var r=n(225),o=n(906);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=r(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){var r=n(17),o=n(9);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){e.exports=n(990)()},function(e,t,n){e.exports=n(651)},function(e,t,n){e.exports=n(667)},function(e,t,n){var r=n(429),o=n(697),i=n(192),a=n(432);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()}},function(e,t,n){var r=n(856),o=n(470),i=n(192),a=n(857);e.exports=function(e){return r(e)||o(e)||i(e)||a()}},function(e,t,n){"use strict";function r(e,t){return e===t}function o(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,o=0;o1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:r,n=null,i=null;return function(){return o(t,n,arguments)||(i=e.apply(null,arguments)),n=arguments,i}}))},function(e,t,n){var r=n(138),o=n(94);function i(t){return e.exports=i="function"==typeof o&&"symbol"==typeof r?function(e){return typeof e}:function(e){return e&&"function"==typeof o&&e.constructor===o&&e!==o.prototype?"symbol":typeof e},i(t)}e.exports=i},function(e,t,n){e.exports=n(671)},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,a,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,u],l=0;(s=new Error(t.replace(/%s/g,(function(){return c[l++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t){e.exports=function(){var e={location:{},history:{},open:function(){},close:function(){},File:function(){}};if("undefined"==typeof window)return e;try{e=window;for(var t=0,n=["File","Blob","FormData"];t5?s-5:0),l=5;l6?u-6:0),c=6;c>",null!=n[r])return e.apply(void 0,[n,r,o,i,a].concat(s));var l=i;return t?new Error("Required "+l+" `"+a+"` was not specified in `"+o+"`."):void 0}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function u(e,t){return a((function(n,r,o,a,u){var s=n[r];if(!t(s)){var c=i(s);return new Error("Invalid "+a+" `"+u+"` of type `"+c+"` supplied to `"+o+"`, expected `"+e+"`.")}return null}))}function s(e,t,n){return a((function(r,o,a,u,s){for(var c=arguments.length,l=Array(c>5?c-5:0),f=5;f5?a-5:0),s=5;s key("+l[f]+")"].concat(u));if(h instanceof Error)return h}}))}function l(e,t,n,r){return a((function(){for(var o=arguments.length,i=Array(o),a=0;a5?c-5:0),f=5;f4)}function s(e){var t=e.get("swagger");return"string"==typeof t&&t.startsWith("2.0")}function c(e){return function(t,n){return function(r){return n&&n.specSelectors&&n.specSelectors.specJson?u(n.specSelectors.specJson())?a.a.createElement(e,o()({},r,n,{Ori:t})):a.a.createElement(t,r):(console.warn("OAS3 wrapper: couldn't get spec"),null)}}}},function(e,t,n){"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,u,s=a(e),c=1;c0){var o=n.map((function(e){return console.error(e),e.line=e.fullPath?g(y,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",k()(e,"message",{enumerable:!0,value:e.message}),e}));i.newThrownErrBatch(o)}return r.updateResolved(t)}))}},be=[],_e=V()(A()(S.a.mark((function e(){var t,n,r,o,i,a,u,s,c,l,f,p,h,d,v,m,g;return S.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=be.system){e.next=4;break}return console.error("debResolveSubtrees: don't have a system to operate on, aborting."),e.abrupt("return");case 4:if(n=t.errActions,r=t.errSelectors,o=t.fn,i=o.resolveSubtree,a=o.AST,u=void 0===a?{}:a,s=t.specSelectors,c=t.specActions,i){e.next=8;break}return console.error("Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing."),e.abrupt("return");case 8:return l=u.getLineNumberForPath?u.getLineNumberForPath:function(){},f=s.specStr(),p=t.getConfigs(),h=p.modelPropertyMacro,d=p.parameterMacro,v=p.requestInterceptor,m=p.responseInterceptor,e.prev=11,e.next=14,be.reduce(function(){var e=A()(S.a.mark((function e(t,o){var a,u,c,p,g,y,b;return S.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return a=e.sent,u=a.resultMap,c=a.specWithCurrentSubtrees,e.next=7,i(c,o,{baseDoc:s.url(),modelPropertyMacro:h,parameterMacro:d,requestInterceptor:v,responseInterceptor:m});case 7:return p=e.sent,g=p.errors,y=p.spec,r.allErrors().size&&n.clearBy((function(e){return"thrown"!==e.get("type")||"resolver"!==e.get("source")||!e.get("fullPath").every((function(e,t){return e===o[t]||void 0===o[t]}))})),T()(g)&&g.length>0&&(b=g.map((function(e){return e.line=e.fullPath?l(f,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",k()(e,"message",{enumerable:!0,value:e.message}),e})),n.newThrownErrBatch(b)),H()(u,o,y),H()(c,o,y),e.abrupt("return",{resultMap:u,specWithCurrentSubtrees:c});case 15:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),w.a.resolve({resultMap:(s.specResolvedSubtree([])||Object(D.Map)()).toJS(),specWithCurrentSubtrees:s.specJson().toJS()}));case 14:g=e.sent,delete be.system,be=[],e.next=22;break;case 19:e.prev=19,e.t0=e.catch(11),console.error(e.t0);case 22:c.updateResolvedSubtree([],g.resultMap);case 23:case"end":return e.stop()}}),e,null,[[11,19]])}))),35),xe=function(e){return function(t){be.map((function(e){return e.join("@@")})).indexOf(e.join("@@"))>-1||(be.push(e),be.system=t,_e())}};function we(e,t,n,r,o){return{type:X,payload:{path:e,value:r,paramName:t,paramIn:n,isXml:o}}}function Ee(e,t,n,r){return{type:X,payload:{path:e,param:t,value:n,isXml:r}}}var Se=function(e,t){return{type:le,payload:{path:e,value:t}}},Ce=function(){return{type:le,payload:{path:[],value:Object(D.Map)()}}},Ae=function(e,t){return{type:ee,payload:{pathMethod:e,isOAS3:t}}},Oe=function(e,t,n,r){return{type:Q,payload:{pathMethod:e,paramName:t,paramIn:n,includeEmptyValue:r}}};function ke(e){return{type:ue,payload:{pathMethod:e}}}function je(e,t){return{type:se,payload:{path:e,value:t,key:"consumes_value"}}}function Te(e,t){return{type:se,payload:{path:e,value:t,key:"produces_value"}}}var Pe=function(e,t,n){return{payload:{path:e,method:t,res:n},type:te}},Ie=function(e,t,n){return{payload:{path:e,method:t,req:n},type:ne}},Me=function(e,t,n){return{payload:{path:e,method:t,req:n},type:re}},Ne=function(e){return{payload:e,type:oe}},De=function(e){return function(t){var n=t.fn,r=t.specActions,o=t.specSelectors,i=t.getConfigs,a=t.oas3Selectors,u=e.pathName,s=e.method,c=e.operation,l=i(),f=l.requestInterceptor,p=l.responseInterceptor,h=c.toJS();if(c&&c.get("parameters")&&c.get("parameters").filter((function(e){return e&&!0===e.get("allowEmptyValue")})).forEach((function(t){if(o.parameterInclusionSettingFor([u,s],t.get("name"),t.get("in"))){e.parameters=e.parameters||{};var n=Object(J.C)(t,e.parameters);(!n||n&&0===n.size)&&(e.parameters[t.get("name")]="")}})),e.contextUrl=L()(o.url()).toString(),h&&h.operationId?e.operationId=h.operationId:h&&u&&s&&(e.operationId=n.opId(h,u,s)),o.isOAS3()){var d="".concat(u,":").concat(s);e.server=a.selectedServer(d)||a.selectedServer();var v=a.serverVariables({server:e.server,namespace:d}).toJS(),g=a.serverVariables({server:e.server}).toJS();e.serverVariables=_()(v).length?v:g,e.requestContentType=a.requestContentType(u,s),e.responseContentType=a.responseContentType(u,s)||"*/*";var b=a.requestBodyValue(u,s),x=a.requestBodyInclusionSetting(u,s);Object(J.t)(b)?e.requestBody=JSON.parse(b):b&&b.toJS?e.requestBody=b.map((function(e){return D.Map.isMap(e)?e.get("value"):e})).filter((function(e,t){return!Object(J.q)(e)||x.get(t)})).toJS():e.requestBody=b}var w=y()({},e);w=n.buildRequest(w),r.setRequest(e.pathName,e.method,w);e.requestInterceptor=function(t){var n=f.apply(this,[t]),o=y()({},n);return r.setMutatedRequest(e.pathName,e.method,o),n},e.responseInterceptor=p;var E=m()();return n.execute(e).then((function(t){t.duration=m()()-E,r.setResponse(e.pathName,e.method,t)})).catch((function(t){console.error(t),r.setResponse(e.pathName,e.method,{error:!0,err:F()(t)})}))}},Re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,n=e.method,r=d()(e,["path","method"]);return function(e){var o=e.fn.fetch,i=e.specSelectors,a=e.specActions,u=i.specJsonWithResolvedSubtrees().toJS(),s=i.operationScheme(t,n),c=i.contentTypeValues([t,n]).toJS(),l=c.requestContentType,f=c.responseContentType,p=/xml/i.test(l),h=i.parameterValues([t,n],p).toJS();return a.executeRequest($($({},r),{},{fetch:o,spec:u,pathName:t,method:n,parameters:h,requestContentType:l,scheme:s,responseContentType:f}))}};function Le(e,t){return{type:ie,payload:{path:e,method:t}}}function Be(e,t){return{type:ae,payload:{path:e,method:t}}}function Fe(e,t,n){return{type:fe,payload:{scheme:e,path:t,method:n}}}},function(e,t,n){e.exports=n(875)},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";var r=n(162),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===o.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){a[String(t)]=e}))})),a),-1===i.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){var r=n(237)("wks"),o=n(239),i=n(44).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(254)("wks"),o=n(187),i=n(34).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(65),o=n(866);e.exports=function(e,t){if(null==e)return{};var n,i,a=o(e,t);if(r){var u=r(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){var r=n(44),o=n(86),i=n(98),a=n(114),u=n(181),s=function(e,t,n){var c,l,f,p,h=e&s.F,d=e&s.G,v=e&s.S,m=e&s.P,g=e&s.B,y=d?r:v?r[t]||(r[t]={}):(r[t]||{}).prototype,b=d?o:o[t]||(o[t]={}),_=b.prototype||(b.prototype={});for(c in d&&(n=t),n)f=((l=!h&&y&&void 0!==y[c])?y:n)[c],p=g&&l?u(f,r):m&&"function"==typeof f?u(Function.call,f):f,y&&a(y,c,f,e&s.U),b[c]!=f&&i(b,c,p),m&&_[c]!=f&&(_[c]=f)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){var r=n(37);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(41),o=n(116),i=n(87),a=/"/g,u=function(e,t,n,r){var o=String(i(e)),u="<"+t;return""!==n&&(u+=" "+n+'="'+String(r).replace(a,""")+'"'),u+">"+o+""};e.exports=function(e,t){var n={};n[e]=t(u),r(r.P+r.F*o((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t,n){e.exports=!n(90)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"e",(function(){return d})),n.d(t,"c",(function(){return m})),n.d(t,"a",(function(){return g})),n.d(t,"d",(function(){return y}));var r=n(73),o=n.n(r),i=n(17),a=n.n(i),u=n(55),s=n.n(u),c=n(392),l=n.n(c),f=function(e){return String.prototype.toLowerCase.call(e)},p=function(e){return e.replace(/[^\w]/gi,"_")};function h(e){var t=e.openapi;return!!t&&l()(t,"3")}function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.v2OperationIdCompatibilityMode;if(!e||"object"!==a()(e))return null;var i=(e.operationId||"").replace(/\s/g,"");return i.length?p(e.operationId):v(t,n,{v2OperationIdCompatibilityMode:o})}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.v2OperationIdCompatibilityMode;if(r){var o="".concat(t.toLowerCase(),"_").concat(e).replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return(o=o||"".concat(e.substring(1),"_").concat(t)).replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return"".concat(f(t)).concat(p(e))}function m(e,t){return"".concat(f(t),"-").concat(e)}function g(e,t){return e&&e.paths?function(e,t){return function(e,t,n){if(!e||"object"!==a()(e)||!e.paths||"object"!==a()(e.paths))return null;var r=e.paths;for(var o in r)for(var i in r[o])if("PARAMETERS"!==i.toUpperCase()){var u=r[o][i];if(u&&"object"===a()(u)){var s={spec:e,pathName:o,method:i.toUpperCase(),operation:u},c=t(s);if(n&&c)return s}}return}(e,t,!0)||null}(e,(function(e){var n=e.pathName,r=e.method,o=e.operation;if(!o||"object"!==a()(o))return!1;var i=o.operationId;return[d(o,n,r),m(n,r),i].some((function(e){return e&&e===t}))})):null}function y(e){var t=e.spec,n=t.paths,r={};if(!n||t.$$normalized)return e;for(var i in n){var a=n[i];if(s()(a)){var u=a.parameters,c=function(e){var n=a[e];if(!s()(n))return"continue";var c=d(n,i,e);if(c){r[c]?r[c].push(n):r[c]=[n];var l=r[c];if(l.length>1)l.forEach((function(e,t){e.__originalOperationId=e.__originalOperationId||e.operationId,e.operationId="".concat(c).concat(t+1)}));else if(void 0!==n.operationId){var f=l[0];f.__originalOperationId=f.__originalOperationId||n.operationId,f.operationId=c}}if("parameters"!==e){var p=[],h={};for(var v in t)"produces"!==v&&"consumes"!==v&&"security"!==v||(h[v]=t[v],p.push(h));if(u&&(h.parameters=u,p.push(h)),p.length){var m,g=o()(p);try{for(g.s();!(m=g.n()).done;){var y=m.value;for(var b in y)if(n[b]){if("parameters"===b){var _,x=o()(y[b]);try{var w=function(){var e=_.value;n[b].some((function(t){return t.name&&t.name===e.name||t.$ref&&t.$ref===e.$ref||t.$$ref&&t.$$ref===e.$$ref||t===e}))||n[b].push(e)};for(x.s();!(_=x.n()).done;)w()}catch(e){x.e(e)}finally{x.f()}}}else n[b]=y[b]}}catch(e){g.e(e)}finally{g.f()}}}};for(var l in a)c(l)}}return t.$$normalized=!0,e}},function(e,t,n){"use strict";n.r(t),n.d(t,"NEW_THROWN_ERR",(function(){return i})),n.d(t,"NEW_THROWN_ERR_BATCH",(function(){return a})),n.d(t,"NEW_SPEC_ERR",(function(){return u})),n.d(t,"NEW_SPEC_ERR_BATCH",(function(){return s})),n.d(t,"NEW_AUTH_ERR",(function(){return c})),n.d(t,"CLEAR",(function(){return l})),n.d(t,"CLEAR_BY",(function(){return f})),n.d(t,"newThrownErr",(function(){return p})),n.d(t,"newThrownErrBatch",(function(){return h})),n.d(t,"newSpecErr",(function(){return d})),n.d(t,"newSpecErrBatch",(function(){return v})),n.d(t,"newAuthErr",(function(){return m})),n.d(t,"clear",(function(){return g})),n.d(t,"clearBy",(function(){return y}));var r=n(140),o=n.n(r),i="err_new_thrown_err",a="err_new_thrown_err_batch",u="err_new_spec_err",s="err_new_spec_err_batch",c="err_new_auth_err",l="err_clear",f="err_clear_by";function p(e){return{type:i,payload:o()(e)}}function h(e){return{type:a,payload:e}}function d(e){return{type:u,payload:e}}function v(e){return{type:s,payload:e}}function m(e){return{type:c,payload:e}}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:l,payload:e}}function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return{type:f,payload:e}}},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_SELECTED_SERVER",(function(){return r})),n.d(t,"UPDATE_REQUEST_BODY_VALUE",(function(){return o})),n.d(t,"UPDATE_REQUEST_BODY_INCLUSION",(function(){return i})),n.d(t,"UPDATE_ACTIVE_EXAMPLES_MEMBER",(function(){return a})),n.d(t,"UPDATE_REQUEST_CONTENT_TYPE",(function(){return u})),n.d(t,"UPDATE_RESPONSE_CONTENT_TYPE",(function(){return s})),n.d(t,"UPDATE_SERVER_VARIABLE_VALUE",(function(){return c})),n.d(t,"SET_REQUEST_BODY_VALIDATE_ERROR",(function(){return l})),n.d(t,"CLEAR_REQUEST_BODY_VALIDATE_ERROR",(function(){return f})),n.d(t,"setSelectedServer",(function(){return p})),n.d(t,"setRequestBodyValue",(function(){return h})),n.d(t,"setRequestBodyInclusion",(function(){return d})),n.d(t,"setActiveExamplesMember",(function(){return v})),n.d(t,"setRequestContentType",(function(){return m})),n.d(t,"setResponseContentType",(function(){return g})),n.d(t,"setServerVariableValue",(function(){return y})),n.d(t,"setRequestBodyValidateError",(function(){return b})),n.d(t,"clearRequestBodyValidateError",(function(){return _})),n.d(t,"initRequestBodyValidateError",(function(){return x}));var r="oas3_set_servers",o="oas3_set_request_body_value",i="oas3_set_request_body_inclusion",a="oas3_set_active_examples_member",u="oas3_set_request_content_type",s="oas3_set_response_content_type",c="oas3_set_server_variable_value",l="oas3_set_request_body_validate_error",f="oas3_clear_request_body_validate_error";function p(e,t){return{type:r,payload:{selectedServerUrl:e,namespace:t}}}function h(e){var t=e.value,n=e.pathMethod;return{type:o,payload:{value:t,pathMethod:n}}}function d(e){var t=e.value,n=e.pathMethod,r=e.name;return{type:i,payload:{value:t,pathMethod:n,name:r}}}function v(e){var t=e.name,n=e.pathMethod,r=e.contextType,o=e.contextName;return{type:a,payload:{name:t,pathMethod:n,contextType:r,contextName:o}}}function m(e){var t=e.value,n=e.pathMethod;return{type:u,payload:{value:t,pathMethod:n}}}function g(e){var t=e.value,n=e.path,r=e.method;return{type:s,payload:{value:t,path:n,method:r}}}function y(e){var t=e.server,n=e.namespace,r=e.key,o=e.val;return{type:c,payload:{server:t,namespace:n,key:r,val:o}}}var b=function(e){var t=e.path,n=e.method,r=e.validationErrors;return{type:l,payload:{path:t,method:n,validationErrors:r}}},_=function(e){var t=e.path,n=e.method;return{type:f,payload:{path:t,method:n}}},x=function(e){var t=e.pathMethod;return{type:f,payload:{path:t[0],method:t[1]}}}},function(e,t,n){var r=n(115);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(62),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r; +/*! + Copyright (c) 2017 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t + * @license MIT + */ +var r=n(665),o=n(666),i=n(415);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var i,a=1,u=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,u/=2,s/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;iu&&(n=u-s),i=n;i>=0;i--){for(var f=!0,p=0;po&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(s=(31&c)<<6|63&i)>127&&(l=s);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(s=(15&c)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:i=e[o+1],a=e[o+2],u=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&u)&&(s=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(l=s)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,r,o){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),u=Math.min(i,a),c=this.slice(r,o),l=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,o,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function D(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return i||D(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,i){return i||D(e,0,n,8),o.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},s.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=0,a=1,u=0;for(this[t]=255&e;++i>0)-u&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=n-1,a=1,u=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/a>>0)-u&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function q(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(39))},function(e,t,n){e.exports=n(669)},function(e,t,n){e.exports=n(863)},function(e,t,n){e.exports=n(865)},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";var r=n(24),o=n(29),i=n(486),a=n(108),u=n(487),s=n(132),c=n(207),l=n(19),f=[],p=0,h=i.getPooled(),d=!1,v=null;function m(){w.ReactReconcileTransaction&&v||r("123")}var g=[{initialize:function(){this.dirtyComponentsLength=f.length},close:function(){this.dirtyComponentsLength!==f.length?(f.splice(0,this.dirtyComponentsLength),x()):f.length=0}},{initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}}];function y(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=i.getPooled(),this.reconcileTransaction=w.ReactReconcileTransaction.getPooled(!0)}function b(e,t){return e._mountOrder-t._mountOrder}function _(e){var t=e.dirtyComponentsLength;t!==f.length&&r("124",t,f.length),f.sort(b),p++;for(var n=0;n + * @license MIT + * + * The MIT License (MIT) + * + * Copyright (c) 2013-2018 Viacheslav Lotsmanov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e){var t=[];return e.forEach((function(e,i){"object"==typeof e&&null!==e?Array.isArray(e)?t[i]=o(e):n(e)?t[i]=r(e):t[i]=a({},e):t[i]=e})),t}function i(e,t){return"__proto__"===t?void 0:e[t]}var a=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,u=arguments[0],s=Array.prototype.slice.call(arguments,1);return s.forEach((function(s){"object"!=typeof s||null===s||Array.isArray(s)||Object.keys(s).forEach((function(c){return t=i(u,c),(e=i(s,c))===u?void 0:"object"!=typeof e||null===e?void(u[c]=e):Array.isArray(e)?void(u[c]=o(e)):n(e)?void(u[c]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(u[c]=a({},e)):void(u[c]=a(t,e))}))})),u}}).call(this,n(62).Buffer)},function(e,t,n){var r=n(139),o=n(13),i=n(138),a=n(94),u=n(192);e.exports=function(e,t){var n;if(void 0===a||null==e[i]){if(o(e)||(n=u(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var s=0,c=function(){};return{s:c,n:function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,f=!0,p=!1;return{s:function(){n=r(e)},n:function(){var e=n.next();return f=e.done,e},e:function(e){p=!0,l=e},f:function(){try{f||null==n.return||n.return()}finally{if(p)throw l}}}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(251),o=n(250);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(100);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";e.exports={current:null}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&h())}function h(){if(!l){var e=u(p);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n0&&"/"!==t[0]}));function oe(e,t,n){return t=t||[],te.apply(void 0,[e].concat(s()(t))).get("parameters",Object(f.List)()).reduce((function(e,t){var r=n&&"body"===t.get("in")?t.get("value_xml"):t.get("value");return e.set(Object(l.B)(t,{allowHashes:!1}),r)}),Object(f.fromJS)({}))}function ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(f.List.isList(e))return e.some((function(e){return f.Map.isMap(e)&&e.get("in")===t}))}function ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(f.List.isList(e))return e.some((function(e){return f.Map.isMap(e)&&e.get("type")===t}))}function ue(e,t){t=t||[];var n=w(e).getIn(["paths"].concat(s()(t)),Object(f.fromJS)({})),r=e.getIn(["meta","paths"].concat(s()(t)),Object(f.fromJS)({})),o=se(e,t),i=n.get("parameters")||new f.List,a=r.get("consumes_value")?r.get("consumes_value"):ae(i,"file")?"multipart/form-data":ae(i,"formData")?"application/x-www-form-urlencoded":void 0;return Object(f.fromJS)({requestContentType:a,responseContentType:o})}function se(e,t){t=t||[];var n=w(e).getIn(["paths"].concat(s()(t)),null);if(null!==n){var r=e.getIn(["meta","paths"].concat(s()(t),["produces_value"]),null),o=n.getIn(["produces",0],null);return r||o||"application/json"}}function ce(e,t){t=t||[];var n=w(e),r=n.getIn(["paths"].concat(s()(t)),null);if(null!==r){var o=t,i=a()(o,1)[0],u=r.get("produces",null),c=n.getIn(["paths",i,"produces"],null),l=n.getIn(["produces"],null);return u||c||l}}function le(e,t){t=t||[];var n=w(e),r=n.getIn(["paths"].concat(s()(t)),null);if(null!==r){var o=t,i=a()(o,1)[0],u=r.get("consumes",null),c=n.getIn(["paths",i,"consumes"],null),l=n.getIn(["consumes"],null);return u||c||l}}var fe=function(e,t,n){var r=e.get("url").match(/^([a-z][a-z0-9+\-.]*):/),i=o()(r)?r[1]:null;return e.getIn(["scheme",t,n])||e.getIn(["scheme","_defaultScheme"])||i||""},pe=function(e,t,n){return["http","https"].indexOf(fe(e,t,n))>-1},he=function(e,t){t=t||[];var n=e.getIn(["meta","paths"].concat(s()(t),["parameters"]),Object(f.fromJS)([])),r=!0;return n.forEach((function(e){var t=e.get("errors");t&&t.count()&&(r=!1)})),r},de=function(e,t){var n={requestBody:!1,requestContentType:{}},r=e.getIn(["resolvedSubtrees","paths"].concat(s()(t),["requestBody"]),Object(f.fromJS)([]));return r.size<1||(r.getIn(["required"])&&(n.requestBody=r.getIn(["required"])),r.getIn(["content"]).entrySeq().forEach((function(e){var t=e[0];if(e[1].getIn(["schema","required"])){var r=e[1].getIn(["schema","required"]).toJS();n.requestContentType[t]=r}}))),n};function ve(e){return f.Map.isMap(e)?e:new f.Map}},function(e,t,n){var r=n(58);function o(e,t,n,o,i,a,u){try{var s=e[a](u),c=s.value}catch(e){return void n(e)}s.done?t(c):r.resolve(c).then(o,i)}e.exports=function(e){return function(){var t=this,n=arguments;return new r((function(r,i){var a=e.apply(t,n);function u(e){o(a,r,i,u,s,"next",e)}function s(e){o(a,r,i,u,s,"throw",e)}u(void 0)}))}}},function(e,t,n){var r=n(134),o=n(55);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(310);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){"use strict";n.r(t),n.d(t,"SHOW_AUTH_POPUP",(function(){return d})),n.d(t,"AUTHORIZE",(function(){return v})),n.d(t,"LOGOUT",(function(){return m})),n.d(t,"PRE_AUTHORIZE_OAUTH2",(function(){return g})),n.d(t,"AUTHORIZE_OAUTH2",(function(){return y})),n.d(t,"VALIDATE",(function(){return b})),n.d(t,"CONFIGURE_AUTH",(function(){return _})),n.d(t,"showDefinitions",(function(){return x})),n.d(t,"authorize",(function(){return w})),n.d(t,"logout",(function(){return E})),n.d(t,"preAuthorizeImplicit",(function(){return S})),n.d(t,"authorizeOauth2",(function(){return C})),n.d(t,"authorizePassword",(function(){return A})),n.d(t,"authorizeApplication",(function(){return O})),n.d(t,"authorizeAccessCodeWithFormParams",(function(){return k})),n.d(t,"authorizeAccessCodeWithBasicAuthentication",(function(){return j})),n.d(t,"authorizeRequest",(function(){return T})),n.d(t,"configureAuth",(function(){return P}));var r=n(17),o=n.n(r),i=n(18),a=n.n(i),u=n(27),s=n.n(u),c=n(112),l=n.n(c),f=n(20),p=n.n(f),h=n(7),d="show_popup",v="authorize",m="logout",g="pre_authorize_oauth2",y="authorize_oauth2",b="validate",_="configure_auth";function x(e){return{type:d,payload:e}}function w(e){return{type:v,payload:e}}function E(e){return{type:m,payload:e}}var S=function(e){return function(t){var n=t.authActions,r=t.errActions,o=e.auth,i=e.token,a=e.isValid,u=o.schema,c=o.name,l=u.get("flow");delete p.a.swaggerUIRedirectOauth2,"accessCode"===l||a||r.newAuthErr({authId:c,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),i.error?r.newAuthErr({authId:c,source:"auth",level:"error",message:s()(i)}):n.authorizeOauth2({auth:o,token:i})}};function C(e){return{type:y,payload:e}}var A=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.name,i=e.username,u=e.password,s=e.passwordType,c=e.clientId,l=e.clientSecret,f={grant_type:"password",scope:e.scopes.join(" "),username:i,password:u},p={};switch(s){case"request-body":!function(e,t,n){t&&a()(e,{client_id:t});n&&a()(e,{client_secret:n})}(f,c,l);break;case"basic":p.Authorization="Basic "+Object(h.a)(c+":"+l);break;default:console.warn("Warning: invalid passwordType ".concat(s," was passed, not including client id and secret"))}return n.authorizeRequest({body:Object(h.b)(f),url:r.get("tokenUrl"),name:o,headers:p,query:{},auth:e})}};var O=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.scopes,i=e.name,a=e.clientId,u=e.clientSecret,s={Authorization:"Basic "+Object(h.a)(a+":"+u)},c={grant_type:"client_credentials",scope:o.join(" ")};return n.authorizeRequest({body:Object(h.b)(c),name:i,url:r.get("tokenUrl"),auth:e,headers:s})}},k=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,u=t.clientSecret,s=t.codeVerifier,c={grant_type:"authorization_code",code:t.code,client_id:a,client_secret:u,redirect_uri:n,code_verifier:s};return r.authorizeRequest({body:Object(h.b)(c),name:i,url:o.get("tokenUrl"),auth:t})}},j=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,u=t.clientSecret,s={Authorization:"Basic "+Object(h.a)(a+":"+u)},c={grant_type:"authorization_code",code:t.code,client_id:a,redirect_uri:n};return r.authorizeRequest({body:Object(h.b)(c),name:i,url:o.get("tokenUrl"),auth:t,headers:s})}},T=function(e){return function(t){var n,r=t.fn,i=t.getConfigs,u=t.authActions,c=t.errActions,f=t.oas3Selectors,p=t.specSelectors,h=t.authSelectors,d=e.body,v=e.query,m=void 0===v?{}:v,g=e.headers,y=void 0===g?{}:g,b=e.name,_=e.url,x=e.auth,w=(h.getConfigs()||{}).additionalQueryStringParams;if(p.isOAS3()){var E=f.selectedServer();n=l()(_,f.serverEffectiveValue({server:E}),!0)}else n=l()(_,p.url(),!0);"object"===o()(w)&&(n.query=a()({},n.query,w));var S=n.toString(),C=a()({Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},y);r.fetch({url:S,method:"post",headers:C,query:m,body:d,requestInterceptor:i().requestInterceptor,responseInterceptor:i().responseInterceptor}).then((function(e){var t=JSON.parse(e.data),n=t&&(t.error||""),r=t&&(t.parseError||"");e.ok?n||r?c.newAuthErr({authId:b,level:"error",source:"auth",message:s()(t)}):u.authorizeOauth2({auth:x,token:t}):c.newAuthErr({authId:b,level:"error",source:"auth",message:e.statusText})})).catch((function(e){var t=new Error(e).message;if(e.response&&e.response.data){var n=e.response.data;try{var r="string"==typeof n?JSON.parse(n):n;r.error&&(t+=", error: ".concat(r.error)),r.error_description&&(t+=", description: ".concat(r.error_description))}catch(e){}}c.newAuthErr({authId:b,level:"error",source:"auth",message:t})}))}};function P(e){return{type:_,payload:e}}},function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(148),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(59),o=n(152);e.exports=n(46)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var r=n(701);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){e.exports=n(660)},function(e,t,n){"use strict";var r=n(876);e.exports=r},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_LAYOUT",(function(){return o})),n.d(t,"UPDATE_FILTER",(function(){return i})),n.d(t,"UPDATE_MODE",(function(){return a})),n.d(t,"SHOW",(function(){return u})),n.d(t,"updateLayout",(function(){return s})),n.d(t,"updateFilter",(function(){return c})),n.d(t,"show",(function(){return l})),n.d(t,"changeMode",(function(){return f}));var r=n(7),o="layout_update_layout",i="layout_update_filter",a="layout_update_mode",u="layout_show";function s(e){return{type:o,payload:e}}function c(e){return{type:i,payload:e}}function l(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=Object(r.w)(e),{type:u,payload:{thing:e,shown:t}}}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=Object(r.w)(e),{type:a,payload:{thing:e,mode:t}}}},function(e,t,n){"use strict";var r=n(1152),o=n(1153);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=b(e));return e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var a=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),p=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(1154);function b(e,t,n){if(e&&o.isObject(e)&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}i.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),u=-1!==i&&i127?M+="x":M+=I[N];if(!M.match(h)){var R=T.slice(0,O),L=T.slice(O+1),B=I.match(d);B&&(R.push(B[1]),L.unshift(B[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=R.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),j||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+F,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!v[w])for(O=0,P=l.length;O0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=E.slice(-1)[0],A=(n.host||e.host||E.length>1)&&("."===C||".."===C)||""===C,O=0,k=E.length;k>=0;k--)"."===(C=E[k])?E.splice(k,1):".."===C?(E.splice(k,1),O++):O&&(E.splice(k,1),O--);if(!x&&!w)for(;O--;O)E.unshift("..");!x||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),A&&"/"!==E.join("/").substr(-1)&&E.push("");var j,T=""===E[0]||E[0]&&"/"===E[0].charAt(0);S&&(n.hostname=n.host=T?"":E.length?E.shift():"",(j=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift()));return(x=x||n.host&&E.length)&&!T&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=u.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){var r=n(179),o=n(397);e.exports=n(147)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(250);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(123),o=n(702),i=n(703),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(720),o=n(723);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";var r=n(201),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var i=n(161);i.inherits=n(52);var a=n(454),u=n(282);i.inherits(f,a);for(var s=o(u.prototype),c=0;c=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t){e.exports={}},function(e,t,n){n(658);for(var r=n(34),o=n(89),i=n(119),a=n(38)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),s=0;s1){for(var d=Array(h),v=0;v1){for(var g=Array(m),y=0;y=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,o=(n-r)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},function(e,t,n){var r=n(76),o=n(425),i=n(426),a=n(42),u=n(186),s=n(266),c={},l={};(t=e.exports=function(e,t,n,f,p){var h,d,v,m,g=p?function(){return e}:s(e),y=r(n,f,t?2:1),b=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(i(g)){for(h=u(e.length);h>b;b++)if((m=t?y(a(d=e[b])[0],d[1]):y(e[b]))===c||m===l)return m}else for(v=g.call(e);!(d=v.next()).done;)if((m=o(v,y,d.value,t))===c||m===l)return m}).BREAK=c,t.RETURN=l},function(e,t,n){"use strict";function r(e){return null==e}e.exports.isNothing=r,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:r(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=Object(i.A)(t),a=r.type,u=r.example,s=r.properties,c=r.additionalProperties,l=r.items,f=n.includeReadOnly,p=n.includeWriteOnly;if(void 0!==u)return Object(i.e)(u,"$$ref",(function(e){return"string"==typeof e&&e.indexOf("#")>-1}));if(!a)if(s)a="object";else{if(!l)return;a="array"}if("object"===a){var d=Object(i.A)(s),v={};for(var m in d)d[m]&&d[m].deprecated||d[m]&&d[m].readOnly&&!f||d[m]&&d[m].writeOnly&&!p||(v[m]=e(d[m],n));if(!0===c)v.additionalProp1={};else if(c)for(var g=Object(i.A)(c),y=e(g,n),b=1;b<4;b++)v["additionalProp"+b]=y;return v}return"array"===a?o()(l.anyOf)?l.anyOf.map((function(t){return e(t,n)})):o()(l.oneOf)?l.oneOf.map((function(t){return e(t,n)})):[e(l,n)]:t.enum?t.default?t.default:Object(i.w)(t.enum)[0]:"file"!==a?h(t):void 0},v=function(e){return e.schema&&(e=e.schema),e.properties&&(e.type="object"),e},m=function e(t){var n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=f()({},Object(i.A)(t)),s=u.type,c=u.properties,l=u.additionalProperties,p=u.items,d=u.example,v=a.includeReadOnly,m=a.includeWriteOnly,g=u.default,y={},b={},_=t.xml,x=_.name,w=_.prefix,E=_.namespace,S=u.enum;if(!s)if(c||l)s="object";else{if(!p)return;s="array"}if(n=(w?w+":":"")+(x=x||"notagname"),E){var C=w?"xmlns:"+w:"xmlns";b[C]=E}if("array"===s&&p){if(p.xml=p.xml||_||{},p.xml.name=p.xml.name||_.name,_.wrapped)return y[n]=[],o()(d)?d.forEach((function(t){p.example=t,y[n].push(e(p,a))})):o()(g)?g.forEach((function(t){p.default=t,y[n].push(e(p,a))})):y[n]=[e(p,a)],b&&y[n].push({_attr:b}),y;var A=[];return o()(d)?(d.forEach((function(t){p.example=t,A.push(e(p,a))})),A):o()(g)?(g.forEach((function(t){p.default=t,A.push(e(p,a))})),A):e(p,a)}if("object"===s){var O=Object(i.A)(c);for(var k in y[n]=[],d=d||{},O)if(O.hasOwnProperty(k)&&(!O[k].readOnly||v)&&(!O[k].writeOnly||m))if(O[k].xml=O[k].xml||{},O[k].xml.attribute){var j=o()(O[k].enum)&&O[k].enum[0],T=O[k].example,P=O[k].default;b[O[k].xml.name||k]=void 0!==T&&T||void 0!==d[k]&&d[k]||void 0!==P&&P||j||h(O[k])}else{O[k].xml.name=O[k].xml.name||k,void 0===O[k].example&&void 0!==d[k]&&(O[k].example=d[k]);var I=e(O[k]);o()(I)?y[n]=y[n].concat(I):y[n].push(I)}return!0===l?y[n].push({additionalProp:"Anything can be here"}):l&&y[n].push({additionalProp:h(l)}),b&&y[n].push({_attr:b}),y}return r=void 0!==d?d:void 0!==g?g:o()(S)?S[0]:h(t),y[n]=b?[{_attr:b},r]:r,y};function g(e,t){var n=m(e,t);if(n)return u()(n,{declaration:!0,indent:"\t"})}var y=c()(g),b=c()(d)},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_CONFIGS",(function(){return i})),n.d(t,"TOGGLE_CONFIGS",(function(){return a})),n.d(t,"update",(function(){return u})),n.d(t,"toggle",(function(){return s})),n.d(t,"loaded",(function(){return c}));var r=n(3),o=n.n(r),i="configs_update",a="configs_toggle";function u(e,t){return{type:i,payload:o()({},e,t)}}function s(e){return{type:a,payload:e}}var c=function(){return function(){}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),o=n.n(r),i=o.a.Set.of("type","format","items","default","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf");function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isOAS3;if(!o.a.Map.isMap(e))return{schema:o.a.Map(),parameterContentMediaType:null};if(!n)return"body"===e.get("in")?{schema:e.get("schema",o.a.Map()),parameterContentMediaType:null}:{schema:e.filter((function(e,t){return i.includes(t)})),parameterContentMediaType:null};if(e.get("content")){var r=e.get("content",o.a.Map({})).keySeq(),a=r.first();return{schema:e.getIn(["content",a,"schema"],o.a.Map()),parameterContentMediaType:a}}return{schema:e.get("schema",o.a.Map()),parameterContentMediaType:null}}},function(e,t,n){"use strict";n.r(t),n.d(t,"createStore",(function(){return C})),n.d(t,"combineReducers",(function(){return O})),n.d(t,"bindActionCreators",(function(){return j})),n.d(t,"applyMiddleware",(function(){return I})),n.d(t,"compose",(function(){return T}));var r=n(543),o="object"==typeof self&&self&&self.Object===Object&&self,i=(r.a||o||Function("return this")()).Symbol,a=Object.prototype,u=a.hasOwnProperty,s=a.toString,c=i?i.toStringTag:void 0;var l=function(e){var t=u.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=s.call(e);return r&&(t?e[c]=n:delete e[c]),o},f=Object.prototype.toString;var p=function(e){return f.call(e)},h=i?i.toStringTag:void 0;var d=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?l(e):p(e)};var v=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object);var m=function(e){return null!=e&&"object"==typeof e},g=Function.prototype,y=Object.prototype,b=g.toString,_=y.hasOwnProperty,x=b.call(Object);var w=function(e){if(!m(e)||"[object Object]"!=d(e))return!1;var t=v(e);if(null===t)return!0;var n=_.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&b.call(n)==x},E=n(385),S="@@redux/INIT";function C(e,t,n){var r;if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(C)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var o=e,i=t,a=[],u=a,s=!1;function c(){u===a&&(u=a.slice())}function l(){return i}function f(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return c(),u.push(e),function(){if(t){t=!1,c();var n=u.indexOf(e);u.splice(n,1)}}}function p(e){if(!w(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(s)throw new Error("Reducers may not dispatch actions.");try{s=!0,i=o(i,e)}finally{s=!1}for(var t=a=u,n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(a)throw a;for(var r=!1,o={},u=0;u0&&(e.patches=[],e.callback&&e.callback(r)),r}function d(e,t,n,r,i){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var a=o._objectKeys(t),u=o._objectKeys(e),s=!1,c=u.length-1;c>=0;c--){var l=e[p=u[c]];if(!o.hasOwnProperty(t,p)||void 0===t[p]&&void 0!==l&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+o.escapePathComponent(p),value:o._deepClone(l)}),n.push({op:"remove",path:r+"/"+o.escapePathComponent(p)}),s=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}),!0);else{var f=t[p];"object"==typeof l&&null!=l&&"object"==typeof f&&null!=f?d(l,f,n,r+"/"+o.escapePathComponent(p),i):l!==f&&(!0,i&&n.push({op:"test",path:r+"/"+o.escapePathComponent(p),value:o._deepClone(l)}),n.push({op:"replace",path:r+"/"+o.escapePathComponent(p),value:o._deepClone(f)}))}}if(s||a.length!=u.length)for(c=0;c0?r:n)(e)}},function(e,t){e.exports={}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=!0},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(42),o=n(411),i=n(255),a=n(253)("IE_PROTO"),u=function(){},s=function(){var e,t=n(257)("iframe"),r=i.length;for(t.style.display="none",n(412).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(" \ No newline at end of file diff --git a/app/Views/insurer_basic_info.php b/app/Views/insurer_basic_info.php index 8abe76d4..3a48d493 100644 --- a/app/Views/insurer_basic_info.php +++ b/app/Views/insurer_basic_info.php @@ -22,7 +22,7 @@
-
diff --git a/app/Views/insurer_branch.php b/app/Views/insurer_branch.php index 638abe01..ab4c23e4 100644 --- a/app/Views/insurer_branch.php +++ b/app/Views/insurer_branch.php @@ -67,7 +67,8 @@ placeholder="Enter District" name="district" required>
- +
@@ -123,99 +124,101 @@ \ No newline at end of file diff --git a/app/Views/insurer_or_tpa_data.php b/app/Views/insurer_or_tpa_data.php index b3318f13..91c63f58 100644 --- a/app/Views/insurer_or_tpa_data.php +++ b/app/Views/insurer_or_tpa_data.php @@ -1,111 +1,135 @@
-
-
-
- -
- -
-
-
-
- -
+
+
+
+
+ + + +
+
+
+ + + +
+
+
+
+ +
-
-
- -
+
+
+ +
-
-
- + + $action) + { + echo ""; + } + } + ?> + +
+
+ +
+ +
+
+ +
+ +
+
+ -
-
+ +
-
+
-
-
- -
+
-
-
- -
+
+
+ + +
+
+
+ +
+
+
-
- -
- -
-
- - -
-
-
- +
+
+
+ +
+
-
- -
-
-
- -
-
-
+
- +
+
+ + +
+ +
+
@@ -116,11 +140,11 @@ var clientPolicies = []; $(document).ready(function() { has('error')): ?> - toastr.error('getFlashdata('error') ?>', 'Failed'); + toastr.error('getFlashdata('error') ?>', 'Failed'); has('success')): ?> - toastr.success('getFlashdata('success') ?>', 'success'); + toastr.success('getFlashdata('success') ?>', 'success'); $('#import_excel_btn').hide(); @@ -165,7 +189,7 @@ $(document).ready(function() { $('.loader-mask').delay(350).fadeOut('slow'); $$("#import_export_excel_form")[0].reset() toastr.success('File Download successs', 'success'); - + } else if (response.code === 404 && response.status === false) { console.error('no data found', response); @@ -330,5 +354,12 @@ $('#action_type').change(function() { } }); + +document.getElementById('toggleIcon').addEventListener('click', function() { + var icon = document.getElementById('icon'); + icon.classList.toggle('mdi-chevron-down'); + icon.classList.toggle('mdi-chevron-up'); +}); + //-------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/app/Views/policies.php b/app/Views/policies.php index 02944b17..f9fea440 100644 --- a/app/Views/policies.php +++ b/app/Views/policies.php @@ -37,7 +37,7 @@
+ placeholder="Enter Policy Type Name" value="" name="policy_type" required>
+ placeholder="Enter Allocg" value="" name="allocg" required>