diff --git a/.python-version b/.python-version deleted file mode 100644 index 269aa9c86de7dc77e2318c699297b92342c63779..0000000000000000000000000000000000000000 --- a/.python-version +++ /dev/null @@ -1 +0,0 @@ -3.8.3 diff --git a/app/Custom/GitRepoInterface.php b/app/Custom/GitRepoInterface.php index a1071f7c898e40dd671c5c76013392e9b11f399f..082af0539c9f3d1506313b769f4fa71d4cb7ce03 100644 --- a/app/Custom/GitRepoInterface.php +++ b/app/Custom/GitRepoInterface.php @@ -48,5 +48,4 @@ interface GitRepoInterface { public function normalizeString ($str = ''); public function normalizeTitle ($str = ''); public function getCommitData($path); - public function truncateString($str, $count); } \ No newline at end of file diff --git a/app/Custom/LDAPInterface.php b/app/Custom/LDAPInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..7a5a1b4e538af821a7e25f02eaa352ed68ab562b --- /dev/null +++ b/app/Custom/LDAPInterface.php @@ -0,0 +1,15 @@ +middleware(['auth', 'isSuperUser'])->except('index');//isAdmin middleware lets only users with a //specific permission permission to access these resources } - /** - * Admin Index - * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\View\View - */ public function index() { $isLoggedIn = \Auth::check(); diff --git a/app/Http/Controllers/AnnotationController.php b/app/Http/Controllers/AnnotationController.php index 07d8832a41e24f364c4120ad40a116370170c0ff..26511ccb152c8bb1dd29e6d22a05da48518426b8 100644 --- a/app/Http/Controllers/AnnotationController.php +++ b/app/Http/Controllers/AnnotationController.php @@ -45,6 +45,70 @@ class AnnotationController extends Controller $this->annotationIndexName = config("laudatio.elasticsearch_annotation_index","annotations"); } + /** + * Display a listing of the resource. + * + * @return \Illuminate\Http\Response + */ + public function index() + { + // + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + // + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + // + } + + /** + * Display the specified resource. + * + * @param \App\Annotation $annotation + * @return \Illuminate\Http\Response + */ + public function show(Annotation $annotation) + { + // + } + + /** + * Show the form for editing the specified resource. + * + * @param \App\Annotation $annotation + * @return \Illuminate\Http\Response + */ + public function edit(Annotation $annotation) + { + // + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param \App\Annotation $annotation + * @return \Illuminate\Http\Response + */ + public function update(Request $request, Annotation $annotation) + { + // + } /** * Remove the specified resource from storage. @@ -92,7 +156,7 @@ class AnnotationController extends Controller $result = array(); $status = "success"; $loggedInUser = \Auth::user(); - + Log::info("destroyAnnotationContent: ".print_r($request->all(),1)); try{ $corpusid = $request->input('corpusid'); $corpus = Corpus::findOrFail($corpusid); diff --git a/app/Http/Controllers/ApiController.php b/app/Http/Controllers/ApiController.php index de73c72a55f462e0d9e8792076c8cd97c565565e..43514009a484250c97a044eb15d888f6b2522a95 100644 --- a/app/Http/Controllers/ApiController.php +++ b/app/Http/Controllers/ApiController.php @@ -65,21 +65,11 @@ class ApiController extends Controller /** ELOQUENT MODEL REST API **/ - /** - * checkElasticSearchIds - * @param $corpusId - * @return mixed - */ public function checkElasticSearchIds($corpusId) { $data = $this->LaudatioUtilService->checkForElasticsearchIds($corpusId); return $this->RestService->sendResponse($data, 'Data retrieved successfully.'); } - /** - * fixElasticSearchIds - * @param $corpusId - * @return mixed - */ public function fixElasticSearchIds($corpusId) { $data = $this->Elasticservice->fixElasticsearchIds($corpusId,$this->current_corpus_index,$this->current_document_index,$this->current_annotation_index); return $this->RestService->sendResponse($data, 'Data fixed successfully.'); @@ -361,6 +351,20 @@ class ApiController extends Controller } } + /* + public function getFormats(){ + $formats = array(); + if (Cache::store('redis')->has('formats')) { + $formats = Cache::store('redis')->get('formats'); + } + else{ + $formats = Format::all(); + Cache::store('redis')->forever('formats', $formats); + } + + return $this->RestService->sendResponse($formats->toArray(), count($formats->toArray()).' Formats retrieved successfully.'); + } +*/ /** END ELOQUENT MODEL REST API **/ @@ -616,7 +620,12 @@ class ApiController extends Controller $mergedLanguages = $doc['_source']['corpus_merged_languages']; $corpora['hits']['hits'][$i]['_source']['corpus_merged_languages'] = $this->LaudatioUtilService->removeMergedDuplicates($this->LaudatioUtilService->removeMergedNA($mergedLanguages)); } - + /* + if(isset($doc['_source']['corpus_merged_formats'])) { + $mergedFormats = $doc['_source']['corpus_merged_formats']; + $corpora['hits']['hits'][$i]['_source']['corpus_merged_formats'] = $this->LaudatioUtilService->removeMergedDuplicates($this->LaudatioUtilService->removeMergedNA($mergedFormats)); + } + */ $corpora['hits']['hits'][$i]['_source']['visibility'] = 1; }//end if _index @@ -967,13 +976,20 @@ class ApiController extends Controller $annotations['hits']['hits'][$i]['_source']['corpus_elasticsearch_id'] = $corpusElasticSearchId; $annotations['hits']['hits'][$i]['_source']['corpus_elasticsearch_index'] = $this->current_corpus_index; } + + /* + if(isset($doc['_source']['annotation_merged_formats'])) { + $mergedFormats = $doc['_source']['annotation_merged_formats']; + $annotations['hits']['hits'][$i]['_source']['annotation_merged_formats'] = $this->LaudatioUtilService->removeMergedDuplicates($this->LaudatioUtilService->removeMergedNA($mergedFormats)); + } + */ } $annotations['hits']['hits'][$i]['_source']['visibility'] = 1; }//end if _index } - + //Log::info("ANNOS? ".print_r($data,1)); $resultData = $annotations['hits']['hits']; Cache::store('redis')->forever('latest_published_annotations_'.$from.'_'.$size, $resultData); return $this->RestService->sendResponse($resultData, count($resultData).' Latest version of published Annotations retrieved successfully.'); @@ -1037,6 +1053,7 @@ class ApiController extends Controller "corpus_merged_languages", "corpus_languages_iso_identifier", "corpus_publication_publication_date.string", + //"corpus_size_value", "corpus_size_type", "corpus_document_genre" ]; @@ -1145,13 +1162,20 @@ class ApiController extends Controller $mergedLanguages = $doc['_source']['corpus_merged_languages']; $result['hits']['hits'][$i]['_source']['corpus_merged_languages'] = $this->LaudatioUtilService->removeMergedDuplicates($this->LaudatioUtilService->removeMergedNA($mergedLanguages)); } + /* + if(isset($doc['_source']['corpus_merged_formats'])) { + $mergedFormats = $doc['_source']['corpus_merged_formats']; + $result['hits']['hits'][$i]['_source']['corpus_merged_formats'] = $this->LaudatioUtilService->removeMergedDuplicates($this->LaudatioUtilService->removeMergedNA($mergedFormats)); + } + */ + $result['hits']['hits'][$i]['_source']['visibility'] = 1; }//end if _index } - + //Log::info("searchMain result ? ".print_r($result['hits']['hits'],1)); return $this->RestService->sendResponse($result['hits']['hits'], count($result['hits']['hits']).' corpus results retrieved successfully.'); } catch (LaudatioElasticsearchException $laudatioElasticsearchException) { return $this->RestService->sendError('REST API Error.', $laudatioElasticsearchException->getMessage(),404); @@ -1313,7 +1337,7 @@ class ApiController extends Controller $queryBody = ''; - + // Log::info("FAPP PURNE"); foreach ($searchFields as $header => $fieldData) { if($header == "corpora") { @@ -1347,8 +1371,9 @@ class ApiController extends Controller } } - + //Log::info("suggeQveri: ".print_r($queryBody,1)); $results = $this->Elasticservice->getSuggestions($queryBody); + //Log::info("results ?: ".print_r($results,1)); $items = array("items" => array()); $foundItems = array(); @@ -1366,6 +1391,7 @@ class ApiController extends Controller $item['_index'] = $resultData['_index']; $item['corpus'] = $this->LaudatioUtilService->getCorpusNameByCorpusId($resultData['_source']['laudatio_corpus_id'],$resultData['_index']); + //Log::info("ITEMCORPUS ?: ".print_r($resultData,1)); if(substr_count(strtolower($resultData['text']),",") >= 1){ $subArray = explode(",",$resultData['text']); $resultData['text'] = $subArray[0]; @@ -1387,7 +1413,7 @@ class ApiController extends Controller if (in_array(strtolower($resultData['text']), $stringArray) || $this->LaudatioUtilService->strPosInArray($resultData['text'],$stringArray) != -1) { - + //Log::info("corps. safa ?: ".print_r($stringArray,1)); $foundIndex = $this->LaudatioUtilService->strPosInArray($resultData['text'], $stringArray); if ($foundIndex != -1) { $item['icon'] = $searchFields['corpora']['icons'][$source]; @@ -1408,13 +1434,14 @@ class ApiController extends Controller } } } - + //Log::info("CRAPPUS: itemtext ".print_r($item['text'],1)); + //$item['text'] = $resultData['_source']['corpus_title'][0]; $item['version'] = $resultData['_source']['publication_version']; end($resultData['_source']['corpus_publication_publication_date']); $last_date = key($resultData['_source']['corpus_publication_publication_date']); $item['date'] = $resultData['_source']['corpus_publication_publication_date'][$last_date]; $corpusSuggestCounter++; - + //Log::info($header. " " .$searchData["query"]." ITEM ?: ".print_r($item,1)); } else if($header == 'document_suggest'){ $item['suggestcounter'] = "document_".$documentSuggestCounter; @@ -1452,7 +1479,8 @@ class ApiController extends Controller } } } - + //Log::info("DOCUS: ".print_r($item['text'],1)); + //$item['text'] = $resultData['_source']['document_title'][0]; $item['version'] = $resultData['_source']['publication_version']; $documentSuggestCounter++; @@ -1491,7 +1519,7 @@ class ApiController extends Controller } } } - + //Log::info("ANNUS: ".print_r($item['text'],1)); $item['version'] = $resultData['_source']['publication_version']; $annotationSuggestCounter++; } @@ -1503,7 +1531,7 @@ class ApiController extends Controller } } } - + //Log::info("BAPP ?: ".print_r($items,1)); return $this->RestService->sendResponse($items, ' Search suggestions retrieved successfully.'); // } catch (LaudatioElasticsearchException $laudatioElasticsearchException) { // return $this->RestService->sendError('REST API Error.', $laudatioElasticsearchException->getMessage(),404); @@ -1525,7 +1553,7 @@ class ApiController extends Controller $isMixedSearch = false; $searchData = array(); $hasWildCards = false; - + //Log::info("corpusSeqarchMainFilter: request->searchData: ".print_r($request->searchData,1)); if(is_array($request->searchData)){ $searchData = $request->searchData; @@ -1533,7 +1561,7 @@ class ApiController extends Controller else { $searchData = json_decode($request->searchData,true); } - + //Log::info("corpusSeqarchMainFilter: searchData: ".print_r($searchData,1)); if((!empty($searchData['filterData']['corpus_publication_publication_date']) || !empty($searchData['filterData']['corpusYearTo'])) && (empty($searchData['filterData']['corpus_title']) && @@ -1771,7 +1799,7 @@ class ApiController extends Controller $data = $result['hits']['hits']; - + //Log::info("corpusSeqarchMainFilter: data: ".print_r($data,1)); for ($i = 0; $i < count($data); $i++) { $doc = $data[$i]; if(count($doc) > 0){ @@ -1785,6 +1813,17 @@ class ApiController extends Controller $result['hits']['hits'][$i]['_source']['doi'] = $this->LaudatioUtilService->getDOIByCorpusElasticsearchId($doc['_id'],$doc["_index"]); + /* + * if(isset($doc['highlight'])){ + foreach ($doc['highlight'] as $highlightName => $highlightData){ + if(strpos($highlightName,".string") > -1) { + $newHighlightName = str_replace(".string", "",$highlightName); + unset($result['hits']['hits'][$i]['highlight'][$highlightName]); + $result['hits']['hits'][$i]['highlight'][$newHighlightName] = $highlightData; + } + } + } + */ if(isset($doc['highlight'])){ $newHighlights = array(); foreach ($doc['highlight'] as $highlightName => $highlightData){ @@ -1836,6 +1875,7 @@ class ApiController extends Controller } } + //$result['hits']['hits'][$i]['highlight']['corpus_size_value'] = array(array(''.$doc['_source']['corpus_size_value'][0].'')); } $documentResult = array(); @@ -1860,7 +1900,12 @@ class ApiController extends Controller $mergedLanguages = $doc['_source']['corpus_merged_languages']; $result['hits']['hits'][$i]['_source']['corpus_merged_languages'] = $this->LaudatioUtilService->removeMergedDuplicates($this->LaudatioUtilService->removeMergedNA($mergedLanguages)); } - + /* + if(isset($doc['_source']['corpus_merged_formats'])) { + $mergedFormats = $doc['_source']['corpus_merged_formats']; + $result['hits']['hits'][$i]['_source']['corpus_merged_formats'] = $this->LaudatioUtilService->removeMergedDuplicates($this->LaudatioUtilService->removeMergedNA($mergedFormats)); + } + */ $result['hits']['hits'][$i]['_source']['visibility'] = 1; }//end if doc @@ -1885,7 +1930,7 @@ class ApiController extends Controller $isMixedSearch = false; $searchData = array(); $hasWildCards = false; - + //Log::info("corpusSeqarchMainFilter: request->searchData: ".print_r($request->searchData,1)); if(is_array($request->searchData)){ $searchData = $request->searchData; @@ -1893,7 +1938,7 @@ class ApiController extends Controller else { $searchData = json_decode($request->searchData,true); } - + //Log::info("corpusSeqarchMainFilter: searchData: ".print_r($searchData,1)); if((!empty($searchData['filterData']['corpus_publication_publication_date']) || !empty($searchData['filterData']['corpusYearTo'])) && (empty($searchData['filterData']['corpus_title']) && @@ -2220,9 +2265,12 @@ class ApiController extends Controller "document_merged_authors", "document_editor_forename", "document_editor_surname", + //"document_languages_language", "document_merged_languages", "document_languages_iso_code", "document_publication_place", + //@todo: not possible to search in date if the format is just a string "document_publication_publishing_date", + //"document_list_of_annotations_id" "document_list_of_annotations_id", "document_history_not_before", "document_history_not_after", @@ -2389,7 +2437,7 @@ class ApiController extends Controller $result = $this->Elasticservice->documentMixSearch($searchData['filterData'],$fullTextQuery, $searchData["fulltextFields"], array( "is_latest_publication" => true ),$searchData["fields"], $searchData["from"],$searchData["size"],$hasWildCards); - + //Log::info("REZ: ".print_r($result,1)); } else if(!$isDateSearch && !$isMixedSearch && !$isTokenSearch){ $result = $this->Elasticservice->filterSearch($searchData, $fullTextQuery ,$index,$searchData["from"],$searchData["size"], $source, $hasWildCards); @@ -2679,9 +2727,12 @@ class ApiController extends Controller "document_merged_authors", "document_editor_forename", "document_editor_surname", + //"document_languages_language", "document_merged_languages", "document_languages_iso_code", "document_publication_place", + //@todo: not possible to search in date if the format is just a string "document_publication_publishing_date", + //"document_list_of_annotations_id" "document_list_of_annotations_id", "document_history_not_before", "document_history_not_after", @@ -2849,6 +2900,7 @@ class ApiController extends Controller $result = $this->Elasticservice->documentMixSearch($searchData['filterData'],$fullTextQuery, $searchData["fulltextFields"], array( "is_latest_publication" => true ),$searchData["fields"], $searchData["from"],10000,$hasWildCards); + //Log::info("REZ: ".print_r($result,1)); } else if(!$isDateSearch && !$isMixedSearch && !$isTokenSearch){ $result = $this->Elasticservice->filterSearch($searchData, $fullTextQuery ,$index,$searchData["from"],10000, $source, $hasWildCards); @@ -2866,7 +2918,7 @@ class ApiController extends Controller } catch (LaudatioElasticsearchException $laudatioElasticsearchException) { return $this->RestService->sendError('REST API Error.', $laudatioElasticsearchException->getMessage(),503); } - + // Log::info("annotationSearchMainFilter: request->searchData: ".print_r($request->searchData,1)); try { $index = config("laudatio.elasticsearch_annotation_index","annotations"); $hasWildCards = false; @@ -3094,6 +3146,7 @@ class ApiController extends Controller $result = $this->Elasticservice->searchMain($searchData,$indexes,$source,$searchData["from"],10000); } + Log::info("corpusSearchMainCount: ".$result['hits']['total']['value']); return $this->RestService->sendResponse($result['hits']['total']['value'], ' Latest corpora count retrieved successfully.'); } catch (LaudatioElasticsearchException $laudatioElasticsearchException) { return $this->RestService->sendError('REST API Error.', $laudatioElasticsearchException->getMessage(),404); @@ -3149,18 +3202,22 @@ class ApiController extends Controller "document_merged_authors", "document_merged_editors", "document_history_original_place", + //"document_history_original_title", "document_merged_languages", "document_languages_iso_code", "document_publication_place", "document_publication_publishing_date.string", "document_history_not_before.string", "document_history_not_after.string", + //"document_list_of_annotations_id", "document_size_type", + //"document_size_extent", "document_genre" ]; $searchData["fields"] = $source; + //@todo: Do we have dates in our searchstring?, if so add the date_field until fix for the index mapping $dates = $this->LaudatioUtilService->convert_date_format(array($searchData["query"])); if(count($dates) > 0) { array_push($source,"document_publication_publishing_date"); @@ -3283,6 +3340,7 @@ class ApiController extends Controller "document_merged_authors", "document_merged_editors", "document_history_original_place", + //"document_history_original_title", "document_merged_languages", "document_languages_iso_code", "document_publication_place", @@ -3295,6 +3353,7 @@ class ApiController extends Controller $searchData["fields"] = $source; + //@todo: Do we have dates in our searchstring?, if so add the date_field until fix for the index mapping $dates = $this->LaudatioUtilService->convert_date_format(array($searchData["query"])); if(count($dates) > 0) { array_push($source,"document_publication_publishing_date"); @@ -3329,6 +3388,8 @@ class ApiController extends Controller $result = $this->Elasticservice->searchMain($searchData,$indexes,$source,$searchData["from"],10000); } + Log::info("documentSearchMainCount: ".$result['hits']['total']['value']); + return $this->RestService->sendResponse($result['hits']['total']['value'], ' Latest document result count retrieved successfully.'); } catch (LaudatioElasticsearchException $laudatioElasticsearchException) { return $this->RestService->sendError('REST API Error.', $laudatioElasticsearchException->getMessage(),404); @@ -3408,6 +3469,13 @@ class ApiController extends Controller $result['hits']['hits'][$i]['_source']['corpus_name'] = $corpusName; } + /* + if(isset($doc['_source']['annotation_merged_formats'])) { + $mergedFormats = $doc['_source']['annotation_merged_formats']; + $result['hits']['hits'][$i]['_source']['annotation_merged_formats'] = $this->LaudatioUtilService->removeMergedDuplicates($this->LaudatioUtilService->removeMergedNA($mergedFormats)); + } + */ + $result['hits']['hits'][$i]['_source']['visibility'] = 1; }//end if _index @@ -3481,6 +3549,7 @@ class ApiController extends Controller $result = $this->Elasticservice->searchMain($searchData,$indexes,$source,$searchData["from"],10000); } + Log::info("annotationSearchMainCount: ".$result['hits']['total']['value']); return $this->RestService->sendResponse($result['hits']['total']['value'], ' Latest annotation result count retrieved successfully.'); } catch (LaudatioElasticsearchException $laudatioElasticsearchException) { return $this->RestService->sendError('REST API Error.', $laudatioElasticsearchException->getMessage(),404); @@ -3566,8 +3635,7 @@ class ApiController extends Controller $auth_user_id = $request->input('auth_user_id'); $auth_user_email = $request->input('auth_user_email'); $toBeDeletedCollection = $request->input('tobedeleted'); - $fileDeleteResult = null; - + Log::info("destroyFormatFileContent: ".print_r($toBeDeletedCollection,1)); foreach ($toBeDeletedCollection as $toBeDeleted) { if(!is_array($toBeDeleted)){ $toBeDeleted = json_decode($toBeDeleted); @@ -3577,6 +3645,7 @@ class ApiController extends Controller if($corpusFile->format != 0) { $format = Format::findOrFail($corpusFile->format); $fileDeleteResult = $this->GitRepoService->deleteFormatFile($this->flysystem,$corpusPath."/".$format->name."/".$toBeDeleted['fileName'],$auth_user_name,$auth_user_email); + Log::info("fileDeleteResult: ".print_r($fileDeleteResult,1)); } } @@ -3590,9 +3659,11 @@ class ApiController extends Controller $corpusPath = $this->LaudatioUtilService->getCorpusAndProjectPathByCorpusId($corpusid); $dataFilePath = $corpusPath."/CORPUS-DATA"; - + Log::info("DELETING CACHE: : ".print_r($dataFilePath,1)); $this->LaudatioUtilService->emptyCorpusDataFileCache($dataFilePath,$corpusid); + //hmmmmmmmm, works, but not a good idea.. + //$this->LaudatioUtilService->emptyFlySystemFileCache(); $result['delete_content_response'] = "Corpus file content was successfully deleted"; } else{ @@ -3648,6 +3719,8 @@ class ApiController extends Controller $result['delete_filecache_response'] = "The annotation file cache was successfully deleted"; } else if(strpos($filePath,"CORPUS-DATA") !== false) { + + Log::info("DELETING CACHE FOR CORPUS-DATA: ".$filePath."".$corpusId); $this->LaudatioUtilService->emptyCorpusDataFileCache($filePath,$corpusId); $result['delete_filecache_response'] = "The CORPUS-DATA file cache was successfully deleted"; } @@ -3799,4 +3872,38 @@ class ApiController extends Controller $this->LaudatioUtilService->importAnnisLinks(); } + + public function testCache(Request $request){ + $corpusId = $request->input('corpusId'); + $path = $request->input('path'); + Log::info("EMPTYING: getCorpusDataFiles_".$corpusId.$path); + $redis = Cache::getRedis(); + $redis->connect('xxxxxx', 6379); // use your Host from Redis desktop Manager - connection + $redis->select('1'); + $listAllCorpusDatafiles = $redis->keys('*getCorpusDataFiles*'); + Log::info("testCache: listAllCorpusDatafiles: ".print_r($listAllCorpusDatafiles,1)); + foreach ($listAllCorpusDatafiles as $lkey){ + $result = $redis->del($lkey); + } + ; + Log::info("redis: : ".print_r($redis->keys('*'),1)); + + //Log::info("storage: : ".print_r(Storage::disk('redis')->getAdapter()->getCache(),1)); + Log::info("FLYBOY: ".print_r($this->flysystem->listContents('jojjemeg/germanc_1-0/CORPUS-DATA/THICK'),1)); + if(count($this->flysystem->listContents('jojjemeg/germanc_1-0/CORPUS-DATA/THICK')) < 1){ + Log::info("COUNT WAS : ".count($this->flysystem->listContents('jojjemeg/germanc_1-0/CORPUS-DATA/THICK'))." SO WE DELETE THE FORMAT FOLDER"); + foreach ($this->flysystem->listContents('jojjemeg/germanc_1-0/CORPUS-DATA') as $content){ + if($content['basename'] == "THICK"){ + $deletedir = $this->flysystem->deleteDir($content['path']); + Log::info("deletedir: ".print_r($deletedir,1)); + $delete = $this->flysystem->delete($content['path']); + Log::info("delete: ".print_r($delete,1)); + } + + } + + + Log::info("FLYBOY AFTER DELETE: ".print_r($this->flysystem->listContents('jojjemeg/germanc_1-0'),1)); + } + } } diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 5baf1c5ae73b251e0e1ae4e0a32d7c69e30159e6..00abd2ead448990ecc92ef3f011da4c39c9ba309 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -4,366 +4,332 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use Illuminate\Foundation\Auth\AuthenticatesUsers; -use Illuminate\Http\JsonResponse; -use Illuminate\Validation\ValidationException; -use LdapRecord\Auth\BindException; -use LdapRecord\Auth\PasswordRequiredException; -use LdapRecord\Auth\UsernameRequiredException; -use LdapRecord\ConnectionException; -use LdapRecord\ContainerException; -use LdapRecord\Laravel\Auth\HasLdapUser; -use LdapRecord\Laravel\Auth\ListensForLdapBindFailure; -use LdapRecord\Container; use Spatie\Permission\Traits\HasRoles; use Illuminate\Support\Facades\Redirect; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; +use Adldap\Laravel\Facades\Adldap; +use App\Custom\LDAPInterface; use App\User; use App\Role; -use App\Laudatio\Ldap\AttributeHandler; use Log; class LoginController extends Controller { - use AuthenticatesUsers,ListensForLdapBindFailure,HasLdapUser; - - use ListensForLdapBindFailure { - handleLdapBindError as baseHandleLdapBindError; - } + /* + |-------------------------------------------------------------------------- + | Login Controller + |-------------------------------------------------------------------------- + | + | This controller handles authenticating users for the application and + | redirecting them to your home screen. The controller uses a trait + | to conveniently provide its functionality to your applications. + | + */ + + use AuthenticatesUsers; + /** + * Where to redirect users after login. + * + * @var string + */ + protected $redirectTo = '/corpusprojects'; + protected $LDAPService; - public function __construct() + /** + * LoginController constructor. + * @param LDAPInterface $ldapService + */ + public function __construct(LDAPInterface $ldapService) { $this->middleware('guest')->except('logout'); - $this->listenForLdapBindFailure(); + $this->LDAPService = $ldapService; } - /** - * fetch credentials - * @param Request $request - * @return array - */ - protected function credentials(Request $request) + + public function username() { - return [ - 'uid' => $request->get('username'), - 'password' => $request->get('password'), - ]; + return config('ldap_auth.identifiers.database.username_column'); } - /** - * doLogin for in-campus LDAP records - * @param Request $request - * @return JsonResponse - * @throws PasswordRequiredException - * @throws UsernameRequiredException - */ - public function doLogin(Request $request) { + public function doLogin(Request $request){ + $credentials = $request->only($this->username(), 'password'); + $username = $credentials[$this->username()]; + $password = $credentials['password']; - $connection = Container::getDefaultConnection(); - $response = []; - try { - $connection->connect(); + $base_dn = config('ldap.connections.default.settings.base_dn'); + $user_format = config('laudatio.user_format','uid=%s'); + $userdn = sprintf($user_format, $username).','.$base_dn; - $credentials = $this->credentials($request); - $username = $credentials['uid']; - $password = $credentials['password']; + if(Adldap::auth()->attempt($userdn, $password, true)) { + $user = User::where($this->username(), $username)->first(); - $base_dn = config('ldap.connections.default.base_dn'); - $user_format = config('laudatio.user_format','uid=%s'); - $userdn = sprintf($user_format, $username).','.$base_dn; + if (!$user) { + //$ldapuser = Adldap::search()->where(config('laudatio.user_attribute'), '=', $username)->first(); + //Log::info("LDAPUSER?: ".print_r($ldapuser,1)); + // the user doesn't exist in the local database, so we have to create one - if ($connection->auth()->attempt($userdn, $password, true)) { - // Credentials are valid! - $dbuser = User::where('username',$username)->get(); - $user = null; + $user = new User(); + $user->username = $username; - if(count($dbuser) == 0) { + // you can skip this if there are no extra attributes to read from the LDAP server + // or you can move it below this if(!$user) block if you want to keep the user always + // in sync with the LDAP server - $sync_attrs = $this->retrieveSyncAttributes($username, $connection); + $sync_attrs = $this->retrieveSyncAttributes($username); - $user = new User(); - $user->username = $username; - foreach ($sync_attrs as $field => $value) { - $user->{$field} = $value !== null ? $value : ''; - } - $user->save(); - $user->roles()->attach(2); - } - else{ - $user = User::find($dbuser[0]->id); + foreach ($sync_attrs as $field => $value) { + $user->{$field} = $value !== null ? $value : ''; + //$user_data[$field] = $value !== null ? $value : ''; } + $user->save(); + $user->roles()->attach(2); + }//end no user - $intended = \URL::previous();//$request->session()->get('url.intended',url('/')); - $urlArray = explode("/", $intended); - $redirect = '/' . join('/', array_slice($urlArray, 3)); - - if (!$user->authenticated) { - if ($redirect == "/") { - $redirect = "/frontpage"; - } else if ($redirect == "/authenticateuser") { - $redirect = "/corpusprojects"; - } - $response = array('success' => true, 'redirect' => "/registerform", 'userid' => $user->id, "not_authenticated" => true, "authenticated_redirect" => $redirect); - return response()->json($response); - } else { - Auth::guard('web')->login($user, true); - - if ($redirect == "/authenticateuser") { - $redirect = "/corpusprojects"; - } - - $response = array('success' => true, 'redirect' => $redirect, "not_authenticated" => false, "authenticated_redirect" => $redirect); + + $intended = \URL::previous();//$request->session()->get('url.intended',url('/')); + $urlArray = explode("/",$intended); + $redirect = '/'.join('/',array_slice($urlArray, 3)); + + + if($user && !$user->authenticated){ + if($redirect == "/") { + $redirect = "/frontpage"; } + else if($redirect == "/authenticateuser") { + $redirect = "/corpusprojects"; + } + $response = array('success' => true, 'redirect' => "/registerform", 'userid' => $user->id, "not_authenticated" => true, "authenticated_redirect" => $redirect); + return response()->json($response); } - else{ - $response = array('success' => false, 'message' => 'Invalid login credentials'); + else { + // by logging the user we create the session, so there is no need to login again (in the configured time). + // pass false as second parameter if you want to force the session to expire when the user closes the browser. + // have a look at the section 'session lifetime' in `config/session.php` for more options. + //$this->guard()->login($user, true); + Auth::guard('web')->login($user, true); + + if($redirect == "/authenticateuser") { + $redirect = "/corpusprojects"; + } + + $response = array('success' => true, 'redirect' => $redirect, "not_authenticated" => false, "authenticated_redirect" => $redirect); + return response()->json($response); } - } catch (PasswordRequiredException $pe){ - $error = $pe->getDetailedError(); - $response = array('success' => false, 'message' => 'Could not authenticate, password required', - 'errorcode' => $error->getErrorCode(), - 'errormessage' => $error->getErrorMessage(), - 'errordiagnostic' => $error->getDiagnosticMessage()); - } catch (UsernameRequiredException $ue){ - $error = $ue->getDetailedError(); - $response = array('success' => false, 'message' => 'Could not authenticate, user name required', - 'errorcode' => $error->getErrorCode(), - 'errormessage' => $error->getErrorMessage(), - 'errordiagnostic' => $error->getDiagnosticMessage()); - } catch (BindException $be) { - $error = $be->getDetailedError(); - $response = array('success' => false, 'message' => 'Could not authenticate', - 'errorcode' => $error->getErrorCode(), - 'errormessage' => $error->getErrorMessage(), - 'errordiagnostic' => $error->getDiagnosticMessage()); - } catch (ConnectionException $ce) { - $error = $ce->getDetailedError(); - $response = array('success' => false, 'message' => 'Could not connect to authentication server', - 'errorcode' => $error->getErrorCode(), - 'errormessage' => $error->getErrorMessage(), - 'errordiagnostic' => $error->getDiagnosticMessage()); - } catch (\Exception $ex) { - $error = $ex->getDetailedError(); - $response = array('success' => false, 'message' => 'Could not connect to authentication server', - 'errorcode' => $error->getErrorCode(), - 'errormessage' => $error->getErrorMessage(), - 'errordiagnostic' => $error->getDiagnosticMessage()); - } - return response()->json($response); + } + else{ + $response = array('success' => false, 'message' => 'Invalid login credentials'); + return response()->json($response); + } } + public function doExternalLogin(Request $request){ + $credentials = $request->only('external_username', 'external_password'); + $username = $credentials['external_username']; + $password = $credentials['external_password']; - /** - * doLogin for External LDAP accounts - * @param Request $request - * @return JsonResponse - */ - public function doExternalLogin(Request $request) { - $response = []; - - try { - $connection = Container::getConnection("external"); - - try { - $connectionres = $connection->connect(); - $credentials = $request->only('external_username', 'external_password'); - $username = $credentials['external_username']; - $password = $credentials['external_password']; - - $saltedShaPAss = $this->generateSaltedSha512($password,$username); - $base_dn = config('laudatio.external_base_dn','ou=users,ou=Laudatio,ou=Services,ou=Computer- und Medienservice,o=Humboldt-Universitaet zu Berlin,c=de'); - - $user_format = config('laudatio.user_format','uid=%s'); - $userdn = sprintf($user_format, $username).','.$base_dn; - - - if ($connection->auth()->attempt($userdn, $saltedShaPAss, true)) { - // Credentials are valid! - $dbuser = User::where('username',$username)->get(); - $user = null; - - if(count($dbuser) == 0) { - - $sync_attrs = $this->retrieveExternalSyncAttributes($username, $connection); - $user = new User(); - $user->username = $username; - foreach ($sync_attrs as $field => $value) { - $user->{$field} = $value !== null ? $value : ''; - } - $user->save(); - $user->roles()->attach(2); - } - else{ - $user = User::find($dbuser[0]->id); - } - - - $intended = \URL::previous(); - $urlArray = explode("/", $intended); - $redirect = '/' . join('/', array_slice($urlArray, 3)); - - if (!$user->authenticated) { - if ($redirect == "/") { - $redirect = "/frontpage"; - } else if ($redirect == "/authenticateuser") { - $redirect = "/corpusprojects"; - } - $response = array('success' => true, 'redirect' => "/registerform", 'userid' => $user->id, "not_authenticated" => true, "authenticated_redirect" => $redirect); - return response()->json($response); - } else { - Auth::guard('web')->login($user, true); - - if ($redirect == "/authenticateuser") { - $redirect = "/corpusprojects"; - } - - $response = array('success' => true, 'redirect' => $redirect, "not_authenticated" => false, "authenticated_redirect" => $redirect); - } + $saltedShaPAss = $this->generateSaltedSha512($password,$username); + $base_dn = config('laudatio.external_base_dn','ou=users,ou=Laudatio,ou=Services,ou=Computer- und Medienservice,o=Humboldt-Universitaet zu Berlin,c=de'); + + $user_format = config('laudatio.user_format','uid=%s'); + + $userdn = sprintf($user_format, $username).','.$base_dn; + + if(Adldap::auth()->attempt($userdn, $saltedShaPAss, true)) { + $user = User::where($this->username(), $username)->first(); + if (!$user) { + + // the user doesn't exist in the local database, so we have to create one + + $user = new User(); + $user->username = $username; + + // you can skip this if there are no extra attributes to read from the LDAP server + // or you can move it below this if(!$user) block if you want to keep the user always + // in sync with the LDAP server + + $sync_attrs = $this->retrieveExternalSyncAttributes($username); + + foreach ($sync_attrs as $field => $value) { + $user->{$field} = $value !== null ? $value : ''; + //$user_data[$field] = $value !== null ? $value : ''; + } + + $user->save(); + $user->roles()->attach(2); + }//end no user + + + $intended = \URL::previous();//$request->session()->get('url.intended',url('/')); + $urlArray = explode("/",$intended); + $redirect = '/'.join('/',array_slice($urlArray, 3)); + + + if($user && !$user->authenticated){ + if($redirect == "/") { + $redirect = "/frontpage"; } - else{ - $response = array('success' => false, 'message' => 'Invalid login credentials'); + else if($redirect == "/authenticateuser") { + $redirect = "/corpusprojects"; } - } catch (PasswordRequiredException $pe){ - $error = $pe->getDetailedError(); - $response = array('success' => false, 'message' => 'Could not authenticate, password required', - 'errorcode' => $error->getErrorCode(), - 'errormessage' => $error->getErrorMessage(), - 'errordiagnostic' => $error->getDiagnosticMessage()); - } catch (UsernameRequiredException $ue){ - $error = $ue->getDetailedError(); - $response = array('success' => false, 'message' => 'Could not authenticate, user name required', - 'errorcode' => $error->getErrorCode(), - 'errormessage' => $error->getErrorMessage(), - 'errordiagnostic' => $error->getDiagnosticMessage()); - } catch (BindException $be) { - $error = $be->getDetailedError(); - $response = array('success' => false, 'message' => 'Could not authenticate', - 'errorcode' => $error->getErrorCode(), - 'errormessage' => $error->getErrorMessage(), - 'errordiagnostic' => $error->getDiagnosticMessage()); - } catch (ConnectionException $ce) { - $error = $ce->getDetailedError(); - $response = array('success' => false, 'message' => 'Could not connect to authentication server', - 'errorcode' => $error->getErrorCode()." ", - 'errormessage' => $error->getErrorMessage(), - 'errordiagnostic' => $error->getDiagnosticMessage()); - } catch (\Exception $ae) { - $response = array('success' => false, 'message' =>"We're sorry, but it seems we could not connect to the authentication server, please try again later"); + $response = array('success' => true, 'redirect' => "/registerform", 'userid' => $user->id, "not_authenticated" => true, "authenticated_redirect" => $redirect); + return response()->json($response); } + else if($user && $user->authenticated){ + // by logging the user we create the session, so there is no need to login again (in the configured time). + // pass false as second parameter if you want to force the session to expire when the user closes the browser. + // have a look at the section 'session lifetime' in `config/session.php` for more options. + //$this->guard()->login($user, true); + Auth::guard('web')->login($user, true); + + $redirect = '/corpusprojects'; + $intended = \URL::previous();//$request->session()->get('url.intended',url('/')); + $urlArray = explode("/",$intended); + $redirect = '/'.join('/',array_slice($urlArray, 3)); + Log::info("REDIRECT: ".print_r($redirect,1)); + if($redirect == "/authenticateuser") { + $redirect = "/corpusprojects"; + } + Log::info("REDIRECT AFTER: ".print_r($redirect,1)); + $response = array('success' => true, 'redirect' => $redirect); + return response()->json($response); + } + } - catch (ContainerException $e) { - $response = array('success' => false, 'message' =>"We're sorry, but it seems we could not connect to the authentication server, please try again later"); + else{ + Log::info("doExternalLogin: Invalid login: ".print_r($userdn,1)); + $response = array('success' => false, 'message' => 'Invalid login credentials'); + return response()->json($response); } + } - return response()->json($response); + public function signin(Request $request){ + return view('/auth.signin'); } - /** - * retrieveSyncAttributes for in-campus LDAP accounts - * @param $username - * @param $connection - * @return array|false - */ - protected function retrieveSyncAttributes($username, $connection) + protected function validateLogin(Request $request) { - $query = $connection->query(); - $entries = $query->where('uid', '=', $username)->get(); - if ( count($entries) < 1 ) { + $this->validate($request, [ + $this->username() => 'required|string|regex:/^\w+$/', + 'password' => 'required|string', + ]); + } + + protected function retrieveSyncAttributes($username) + { + $ldapuser = Adldap::search()->where(config('laudatio.user_attribute','uid'), '=', $username)->first(); + if ( !$ldapuser ) { // log error return false; } + // if you want to see the list of available attributes in your specific LDAP server: + //var_dump($ldapuser->attributes); exit; + + // needed if any attribute is not directly accessible via a method call. + // attributes in \Adldap\Models\User are protected, so we will need + // to retrieve them using reflection. + $ldapuser_attrs = null; $attrs = []; - foreach (config('auth.providers.ldap.database.sync_attributes') as $local_attr => $ldap_attr) { + foreach (config('ldap_auth.sync_attributes') as $local_attr => $ldap_attr) { if ( $local_attr == 'username' ) { continue; } - // now it returns the first item, but it could return - // a comma-separated string or any other thing that suits you better - $attrs[$local_attr] = $entries[0][$ldap_attr][0]; - } - return $attrs; - } + $method = 'get' . $ldap_attr; + if (method_exists($ldapuser, $method)) { + $attrs[$local_attr] = $ldapuser->$method(); + continue; + } - /** - * doLogout - * @param Request $request - * @return \Illuminate\Http\RedirectResponse - */ - public function doLogout(Request $request) { - Auth::logout(); - return Redirect::to(\URL::previous()); - } + if ($ldapuser_attrs === null) { + $ldapuser_attrs = self::accessProtected($ldapuser, 'attributes'); + } + if (!isset($ldapuser_attrs[$ldap_attr])) { + // an exception could be thrown + $attrs[$local_attr] = null; + continue; + } - /** - * generate salted sha for LDAP passwords - * @param $password - * @param $salt - * @return string - */ - protected function generateSaltedSha512($password,$salt) { - //$hash = hash('sha512', $salt.$password); - $hash = base64_encode(hash('sha512', $salt.$password, true)); - return $hash; - } + if (!is_array($ldapuser_attrs[$ldap_attr])) { + $attrs[$local_attr] = $ldapuser_attrs[$ldap_attr]; + } - /** - * LDAP bind error handler - * @param $message - * @param null $code - * @throws ValidationException - */ - protected function handleLdapBindError($message, $code = null) - { - if ($code == '773') { - // The users password has expired. Redirect them. - abort(redirect('/password-reset')); + if (count($ldapuser_attrs[$ldap_attr]) == 0) { + // an exception could be thrown + $attrs[$local_attr] = null; + continue; + } + // now it returns the first item, but it could return + // a comma-separated string or any other thing that suits you better + $attrs[$local_attr] = $ldapuser_attrs[$ldap_attr][0]; } - - $this->baseHandleLdapBindError($message, $code); + return $attrs; } + protected function retrieveExternalSyncAttributes($username) { + //connect to the tree + $this->LDAPService->connectADLDAP(); - /** - * retrieve Sync Attributes for External LDAP accounts - * @param $username - * @param $connection - * @return array|false - */ - protected function retrieveExternalSyncAttributes($username,$connection) { + $searchattrs = []; + + $ldapuser = $this->LDAPService->searchTree( + array( + config('laudatio.user_attribute','uid') => $username, - $query = $connection->query(); - $entries = $query->where('uid', '=', $username)->get(); - if ( count($entries) < 1 ) { + ),$searchattrs); + + if ( !$ldapuser ) { // log error return false; } - $attrs = []; + foreach ($searchattrs as $searchattr) { + $attrs[$local_attr] = $ldapuser->$method(); + } - foreach (config('auth.providers.ldap.database.external_sync_attributes') as $local_attr => $ldap_attr) { + $attrs = []; - if ( $local_attr == 'username' ) { - continue; - } - // now it returns the first item, but it could return - // a comma-separated string or any other thing that suits you better - $attrs[$local_attr] = $entries[0][$ldap_attr][0]; + foreach (config('ldap_auth.external_sync_attributes') as $local_attr => $ldap_attr){ + $attrs[$local_attr] = $ldapuser->pluck('attributes.'.$ldap_attr)[0][0]; } return $attrs; } -} \ No newline at end of file + public function doLogout(Request $request) { + Auth::logout(); + return Redirect::to(\URL::previous()); + } + + + protected static function accessProtected ($obj, $prop) + { + $reflection = new \ReflectionClass($obj); + $property = $reflection->getProperty($prop); + $property->setAccessible(true); + return $property->getValue($obj); + } + + private function encodePassword($password) + { + return iconv('UTF-8', 'UTF-16LE', '"'.$password.'"'); + } + + private function generateSaltedSha512($password,$salt) { + //$hash = hash('sha512', $salt.$password); + $hash = base64_encode(hash('sha512', $salt.$password, true)); + return $hash; + } +} diff --git a/app/Http/Controllers/BrowseController.php b/app/Http/Controllers/BrowseController.php index 2aa93d26749a9e8067aae7fd3c800e81180bca77..a98df796abe27014461865485df3ae16ebc6f26f 100644 --- a/app/Http/Controllers/BrowseController.php +++ b/app/Http/Controllers/BrowseController.php @@ -286,6 +286,8 @@ class BrowseController extends Controller )); } + + //dd($annotationData); if(!empty($annotationData)){ $annotators = array(); foreach ($annotationData as $annotationDatum) { @@ -334,6 +336,7 @@ class BrowseController extends Controller $current_annotation_index ); + //dd($allAnnotationGroupResult); $allAnnotationGroups = array(); if(isset($allAnnotationGroupResult['aggregations'])){ foreach($allAnnotationGroupResult['aggregations']['annotations']['buckets'] as $groupdata) { @@ -348,18 +351,20 @@ class BrowseController extends Controller $data['result']['allAnnotationGroups'] = $allAnnotationGroups; $data['result']['corpusannotationcount'] = $annotationcount; $data['result']['totalcorpusannotationcount'] = $totalannotationcount; + //$data['result']['document_genre'] = $this->LaudatioUtilService->getDocumentGenreByCorpusId($corpusId,$current_corpus_index); $data['result']['document_range'] = $document_range; $data['result']['corpus_encoding_project_description'] = $this->LaudatioUtilService->pickCorpusDescription($data['result']['corpus_encoding_project_description']); }//end if we have data $publishedcorpusresponses = $this->ElasticService->getPublishedCorpora(); - + //dd($publishedcorpusresponses); if(!empty($publishedcorpusresponses['result'][0])) { $currentrepoid = $this->LaudatioUtilService->getCorpusGitLabIdByElasticsearchId($id,$current_corpus_index); - + //dd($publishedcorpusresponses); foreach($publishedcorpusresponses['result'][0] as $publishedcorpusresponse) { $publishedcorpus = $publishedcorpusresponse['_source']; + // dd($publishedcorpus); if($publishedcorpus['laudatio_corpus_gitlab_id'] == $currentrepoid) { $currentElasticsearchId = $publishedcorpusresponse['_id']; $versions[$currentElasticsearchId] = array(); @@ -411,6 +416,7 @@ class BrowseController extends Controller $corpus_path = $this->LaudatioUtilService->getCorpusAndProjectPathByCorpusId($corpusId); $documentCorpusdata = $this->ElasticService->getCorpusByDocument(array(array('_id' => $corpusElasticId)),array($id),$current_corpus_index); + //dd($documentCorpusdata); $data['result']['documentCorpusdata'] = $documentCorpusdata[$id][0]['_source']; $citeData['authors'] = array(); @@ -463,6 +469,7 @@ class BrowseController extends Controller "preparation_author_annotator_surname", "generated_id" )); + //dd($annotationData); if(!$annotationData['error'] && count($annotationData['result']) > 0){ $annotators = array(); @@ -533,6 +540,8 @@ class BrowseController extends Controller $data = json_decode($apiData->getContent(), true); $corpusElasticId = is_array($data['result']['in_corpora']) ? $data['result']['in_corpora'][0]: $data['result']['in_corpora']; + //$workFlowStatus = $this->LaudatioUtilService->getWorkFlowStatus($corpusId); + //$corpusVersion = $this->LaudatioUtilService->getCorpusVersion($corpusId); if($corpusElasticId){ @@ -577,14 +586,15 @@ class BrowseController extends Controller $corpusFiles = $this->LaudatioUtilService->getFormatFilesByCorpusId($data['result']['laudatio_corpus_id']); $guidelines = $this->ElasticService->getGuidelinesByCorpusAndAnnotationId($corpusElasticId,$data['result']['preparation_annotation_id'][0],$current_guideline_index); - + //dd($guidelines); $formats = array(); $formatSearchResult = $this->ElasticService->getFormatsByCorpus($corpusElasticId,$current_guideline_index); $guidelineArray = array(); - + //dd($formatSearchResult); if(isset($formatSearchResult['aggregations'])){ foreach ($formatSearchResult['aggregations']['formats']['buckets'] as $formatSearchResult) { + //dd($formatSearchResult); if(!array_key_exists($formatSearchResult['key'],$guidelineArray)){ $guidelineArray[$formatSearchResult['key']] = array('annotations' => array()); } @@ -624,7 +634,7 @@ class BrowseController extends Controller } } - + //dd($guidelineArray); if(isset($data['result']['in_documents']) && count($data['result']['in_documents']) > 0){ $in_documents = array_unique(array_filter($data['result']['in_documents'],function($elm){return !is_array($elm);})); $documentsByAnnotation = $this->ElasticService->getDocumentsByAnnotationAndCorpusId($in_documents,$data['result']['laudatio_corpus_id'],$current_document_index); @@ -642,6 +652,8 @@ class BrowseController extends Controller $corpusPathArray = explode("/",$corpus_path); + // $data['result']['project_directorypath'] = $corpusPathArray[0]; +// $data['result']['corpus_directorypath'] = $corpusPathArray[1]; $corpusLogo = ""; $corpusLogobyCorpusid = $this->LaudatioUtilService->getCorpusLogoByCorpusId($corpusElasticId, $current_corpus_index); diff --git a/app/Http/Controllers/CorpusController.php b/app/Http/Controllers/CorpusController.php index 7c23850a3a77e17f1fbc8536bf7329509d85d354..9092813b740262e679521039c0e08eb81d4d4df4 100644 --- a/app/Http/Controllers/CorpusController.php +++ b/app/Http/Controllers/CorpusController.php @@ -103,6 +103,7 @@ class CorpusController extends Controller $corpusPath = $this->GitRepoService->createCorpusFileStructure($this->flysystem,$corpusProjectPath,$corpus_name,$user); } catch (GitInitException $gitInitException) { + //dd($gitInitException); $message = $gitInitException->createUserFacingMessage($gitInitException->getMessage()); //Log the error to file $gitInitException->logErrorMessage($gitInitException->getMessage()." : corpus directory path: ".$corpusProjectPath."/".$corpus_name,['file' => __FILE__, 'line' => __LINE__]); @@ -130,7 +131,7 @@ class CorpusController extends Controller $corpusAdminRole = Role::findById(3); - + //$user->roles()->sync($corpusAdminRole); if($user) { if(!$user->roles->contains($corpusAdminRole)){ $user->roles()->attach($corpusAdminRole); @@ -153,7 +154,12 @@ class CorpusController extends Controller 'admin' => $user_role ); - +/* + $this->LaudatioUtilService->emptyCorpusFileCache($filePath,$corpus->id); + $this->LaudatioUtilService->emptyCorpusFileInfoCache($filePath,$corpus->id); + $this->LaudatioUtilService->emptyCorpusFileCache($filePath.'/TEI-HEADERS/corpus',$corpus->id); + $this->LaudatioUtilService->emptyCorpusFileInfoCache($filePath.'/TEI-HEADERS/corpus',$corpus->id); + */ return redirect()->route('corpus.edit', compact('corpus')) ->with('isLoggedIn', $isLoggedIn) ->with('corpus_data', $corpus_data) @@ -225,6 +231,14 @@ class CorpusController extends Controller $corpusProjectPath = $corpusProject->directory_path; $corpusProjectId = $corpusProject->gitlab_id; $corpusPath = null; + /** + if(request('corpus_name')){ + $corpusPath = $this->GitRepoService->createCorpusFileStructure($this->flysystem,$corpusProjectPath,request('corpus_name')); + } + else{ + + } + * */ $corpusPath = "Untitled".$corpusProjectId; if($corpusPath){ @@ -298,6 +312,7 @@ class CorpusController extends Controller $corpusBasePath = $pathArray[0]."/".$pathArray[1]; if(strpos($corpusPath,"CORPUS-DATA") !== false && strpos($corpusPath,"TEI-HEADERS") === false){ $corpusData = $this->GitRepoService->getCorpusDataFiles($this->flysystem,$corpusPath,$corpus->id); + dd($corpusData); $headerData = $this->GitRepoService->getCorpusFileInfo($this->flysystem,$corpusBasePath.'/TEI-HEADERS',$corpus->id); $folderType = "CORPUS-DATA"; @@ -399,6 +414,7 @@ class CorpusController extends Controller } ksort($roles); + //dd($corpusUsers); foreach ($corpusUsers as $corpusUser){ $user_role = array(); @@ -455,6 +471,16 @@ class CorpusController extends Controller //Log the error to file $corpusRepositoryFileSystemException->logErrorMessage($corpusRepositoryFileSystemException,['file' => __FILE__, 'line' => __LINE__]); + //roll back the creation of the filestructure + /* + $corpusPath = $this->GitRepoService->normalizeString($corpus_name); + $deleted = $this->GitRepoService->deleteUntrackedCorpusFileStructure($this->flysystem, $corpusProjectPath."/".$corpusPath); + if($deleted) { + Log::stack(['daily', 'errorlog'])->error("Deleted : corpus directory path: ".$corpusProjectPath."/".$corpus_name." after unsuccessful GIT INIT"); + } + */ + //$corpus_data = array(); + //return redirect()->route('corpus.edit', compact('corpus'))->with('user',$user)->withError($message); return back()->withError($message); } @@ -466,8 +492,10 @@ class CorpusController extends Controller $corpusFileData = $this->GitRepoService->getCorpusFiles($this->flysystem,$corpus->id, $path."/TEI-HEADERS/corpus"); $documentFileData = $this->GitRepoService->getCorpusFiles($this->flysystem,$corpus->id, $path."/TEI-HEADERS/document"); $annotationFileData = $this->GitRepoService->getCorpusFiles($this->flysystem,$corpus->id, $path."/TEI-HEADERS/annotation"); - +//dd($annotationFileData); $corpusFormatData = $this->GitRepoService->getCorpusDataFiles($this->flysystem,$path."/CORPUS-DATA",$corpus->id); + //dd($corpusFormatData); + //get userinfo for the fileData $corpusnewelements = $this->GitRepoService->getUploader($corpusFileData['headerData']['elements'],'corpus'); $corpusFileData['headerData']['elements'] = $corpusnewelements; @@ -556,6 +584,7 @@ class CorpusController extends Controller "user_role_id" => $invitedRole->id, ); } + //dd($invitedUsers); $externalEnvironments = array(); foreach ($corpus->externalenvironments()->get() as $externalenvironment){ @@ -609,6 +638,7 @@ class CorpusController extends Controller ); + //dd($corpus_data); JavaScript::put([ 'corpusUpload' => $corpusUpload, 'documentUpload' => $documentUpload, @@ -844,6 +874,9 @@ class CorpusController extends Controller $pushResult = $this->GitRepoService->pushFiles($corpusPath,$corpusid,$auth_user_name); } + /* + $this->LaudatioUtilService->emptyCorpusCache($corpus->elasticsearch_id,$corpus->elasticsearch_index); + */ } } @@ -1075,6 +1108,17 @@ class CorpusController extends Controller array_push($user_roles[$corpusUser->pivot->role_id],$corpusUser->id); } + /* + $projects = $corpus->corpusprojects()->get(); + $project_user_roles = array(); + + foreach ($projects as $project){ + $projectUsers = $project->users()->get(); + foreach ($projectUsers as $projectUser){ + $project_user_roles[$projectUser->id] = $projectUser->pivot->role_id; + } + } +*/ $roles = Role::all(); $filteredRoles = array(); foreach ($roles as $role){ @@ -1089,6 +1133,8 @@ class CorpusController extends Controller } } + //dd($filteredRoles); + return view('project.corpus.assign_corpusroles_to_user') ->with('corpus', $corpus) ->with('users', $users) diff --git a/app/Http/Controllers/CorpusProjectController.php b/app/Http/Controllers/CorpusProjectController.php index 3dca226b17cc158844e594ea5728b4c7262e0b40..d30291e20e7f50f20844af74ae7cecb537929fb3 100644 --- a/app/Http/Controllers/CorpusProjectController.php +++ b/app/Http/Controllers/CorpusProjectController.php @@ -149,6 +149,7 @@ class CorpusProjectController extends Controller } array_push($foundcorpusroleuserids[$projectCorpus->id],$corpusUser->id); } + // dd($project_access_mapping); } $corpusProjectUsers = $corpusProject->users()->get(); @@ -223,7 +224,7 @@ class CorpusProjectController extends Controller array_push($invitations,$invite); } } - // dd($corpus_projects); + //dd($user_roles); return view('project.corpusproject.index') ->with('corpusProjects',$corpus_projects) ->with('isLoggedIn', $isLoggedIn) @@ -344,7 +345,7 @@ class CorpusProjectController extends Controller $user = \Auth::user(); $projectAdminRole = Role::findById(2); - + //$user->roles()->sync($projectAdminRole); if($user) { if(!$user->roles->contains($projectAdminRole)){ $user->roles()->attach($projectAdminRole); @@ -352,6 +353,8 @@ class CorpusProjectController extends Controller $corpusproject->users()->save($user,['role_id' => 2]); } + + } $deletecacheresult = $this->LaudatioUtilService->emptyCorpusProjectCache(); @@ -372,6 +375,7 @@ class CorpusProjectController extends Controller $corpusProjectUsers = $corpusproject->users()->get(); $corpora = $corpusproject->corpora()->get(); + //dd($corpusProjectUsers); foreach ($corpusProjectUsers as $corpusProjectUser){ if(!isset($user_roles[$corpusProjectUser->id])){ $user_roles[$corpusProjectUser->id]['roles'] = array(); @@ -413,6 +417,8 @@ class CorpusProjectController extends Controller catch (\Exception $e) { $status = "error"; $result['eloquent_response'] = "There was a problem updating the Project data. A message has been sent to the site administrator. Please try again later"; + //$e->getMessage(); + } @@ -618,7 +624,7 @@ class CorpusProjectController extends Controller $admin_roles = $this->LaudatioUtilService->determineAdminRole($admin_roles); $user_roles = $this->LaudatioUtilService->determineUserAdminRole($user_roles); $role_mappings = $this->LaudatioUtilService->getRoleMappingByUser($user); - + //dd($role_mappings); $corpusproject_data = array( 'user_roles' => $user_roles, 'roles' => $roles, diff --git a/app/Http/Controllers/DOIController.php b/app/Http/Controllers/DOIController.php index 96b9fc28eb64d5b7ed79054ef2665874d76807d0..9706294f861b5b30cb7caf0d4915010fd4089b1d 100644 --- a/app/Http/Controllers/DOIController.php +++ b/app/Http/Controllers/DOIController.php @@ -29,11 +29,70 @@ class DOIController extends Controller $this->LaudatioUtils = $laudatioUtils; } - /** - * registerDOI - * @param Request $request - * @return mixed - */ + + public function TestRegisterDoi(){ + + $response = $this->DOIService->mintDOIDataIdentifier("http://laudatio58-dev.local/api/elasticapi/v1/corpora/iWEbj24BnoDS0IgtYpcf/corpora"); + return Response::json($response); + } + + public function mintADOI(){ + + $response = $this->DOIService->mintDOIDataIdentifier("http://laudatio58-dev.local/api/elasticapi/v1/corpora/iWEbj24BnoDS0IgtYpcf/corpora"); + return Response::json($response); + } + + public function deleteADOI(){ + + $response = $this->DOIService->deleteDOIData("http://laudatio58-dev.local/api/elasticapi/v1/corpora/7bjqk24BDJzRMrR-rPaa/corpora"); + return Response::json($response); + } + + public function TestUpdateDoi(){ + + $myRequest = new Request(); + $myRequest->setMethod('POST'); + + $myRequest->request->add( + [ + 'isActive' => "false", + "state" => 'unavailable', + 'corpusid' => 3, + ] + ); + + $this->updateDOIMetadata($myRequest); + } + + public function TestDeleteDoi(){ + + $myRequest = new Request(); + $myRequest->setMethod('POST'); + + $myRequest->request->add( + [ + "corpusid" => 3, + ] + ); + + Log::info("TESTDELETEDOIR: ".print_r($myRequest->request,1)); + $this->deleteDOIdent($myRequest); + } + + public function TestGetDoi(){ + $myRequest = new Request(); + $myRequest->setMethod('POST'); + + $myRequest->request->add( + [ + 'doi_identifier' => 'doi:10.5072/laudatio-dev-5c98670bdf1b6', + ] + ); + + $result = $this->getDOIMetadata($myRequest); + } + + public function registerDOI(Request $request) { @@ -84,13 +143,9 @@ class DOIController extends Controller } - /** - * getDOIMetadata - * @param Request $request - * @return mixed - */ public function getDOIMetadata(Request $request) { + $result = array(); $status = "success"; @@ -124,16 +179,13 @@ class DOIController extends Controller return Response::json($response); } - /** - * updateDOIMetadata - * @param Request $request - * @return mixed - */ public function updateDOIMetadata(Request $request) { + $result = array(); $status = "success"; + try{ $doidata = null; $corpus = Corpus::find($request->input('corpusid')); @@ -153,9 +205,9 @@ class DOIController extends Controller $doiIdentifier = $doidata[0]->doi_id; } } - + Log::info("GOT DOIIDEN: ".$doiIdentifier); $updated = $this->DOIService->updateDOIData($doiIdentifier,$request); - + Log::info("UPDATED: ".print_r($updated,1)); if($updated){ $doiMetadata = $this->DOIService->getDOIData($doiIdentifier); @@ -192,11 +244,6 @@ class DOIController extends Controller return Response::json($response); } - /** - * deleteDOIdent - * @param Request $request - * @return mixed - */ public function deleteDOIdent(Request $request) { @@ -204,35 +251,41 @@ class DOIController extends Controller $status = "success"; $doiIdentifier = ""; + //try{ + $corpus = Corpus::find($request->input('corpusid')); + Log::info("GOT CORPUS: ".$corpus->name); + $doidata = null; - $corpus = Corpus::find($request->input('corpusid')); - $doidata = null; - - if(!empty($corpus)) { + if(!empty($corpus)) { - $doidata = $corpus->doi()->get(); + $doidata = $corpus->doi()->get(); - if(!empty($doidata[0])){ - $doiIdentifier = $doidata[0]->doi_id; + if(!empty($doidata[0])){ + $doiIdentifier = $doidata[0]->doi_id; + } } - } + Log::info("GOT DOIIDEN: ".$doiIdentifier); + $deleted = $this->DOIService->deleteDOIData($doiIdentifier); + if($deleted){ - $deleted = $this->DOIService->deleteDOIData($doiIdentifier); - if($deleted){ - - if(!empty($doidata[0])) { - $doi = Doi::findOrFail($doidata[0]->id); - $doi->delete(); - } + if(!empty($doidata[0])) { + $doi = Doi::findOrFail($doidata[0]->id); + $doi->delete(); + } - $result['delete_doi_response'] = "The Corpus DOI was successfully deleted with the following DOI indentifier: ".$doiIdentifier; - } - else{ - $status = "error"; - $result['delete_doi_response'] = "There was a problem deleting the DOI meta data for ".$doiIdentifier." Please try again later"; - } + $result['delete_doi_response'] = "The Corpus DOI was successfully deleted with the following DOI indentifier: ".$doiIdentifier; + } + else{ + $status = "error"; + $result['delete_doi_response'] = "There was a problem deleting the DOI meta data for ".$doiIdentifier." Please try again later"; + } + //} + //catch (\Exception $e) { + // $status = "error"; + // $result['delete_doi_response'] = "There was a problem deleting the DOI meta data for ".$doiIdentifier." The error was: ($e) A message has been sent to the site administrator. Please try again later"; + //} $response = array( 'status' => $status, diff --git a/app/Http/Controllers/DocumentController.php b/app/Http/Controllers/DocumentController.php index 17f47a13df86063d90c832967dd9488348cccede..238025d7f23d2de8326c84dc9972482b83e45b2c 100644 --- a/app/Http/Controllers/DocumentController.php +++ b/app/Http/Controllers/DocumentController.php @@ -46,6 +46,70 @@ class DocumentController extends Controller $this->annotationIndexName = config("laudatio.elasticsearch_annotation_index","annotations"); } + /** + * Display a listing of the resource. + * + * @return \Illuminate\Http\Response + */ + public function index() + { + // + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + // + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + // + } + + /** + * Display the specified resource. + * + * @param \App\Document $document + * @return \Illuminate\Http\Response + */ + public function show(Document $document) + { + // + } + + /** + * Show the form for editing the specified resource. + * + * @param \App\Document $document + * @return \Illuminate\Http\Response + */ + public function edit(Document $document) + { + // + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param \App\Document $document + * @return \Illuminate\Http\Response + */ + public function update(Request $request, Document $document) + { + // + } /** * Remove the specified resource from storage. @@ -156,8 +220,14 @@ class DocumentController extends Controller } } + + /* + $this->LaudatioUtilService->emptyDocumentCacheByCorpusId($corpus->corpus_id,$document->elasticsearch_index); + $this->LaudatioUtilService->emptyDocumentCacheByDocumentIndex($document->elasticsearch_index); + */ } else { + //$this->LaudatioUtilService->setMarkForDeletion("document",$document->id,1); if(count($document->annotations) > 0) { $document->annotations()->detach(); @@ -183,7 +253,7 @@ class DocumentController extends Controller 'status' => $status, 'msg' => $result, ); - + Log::info("DOCUMENTDELETE: ".print_r($response,1)); return Response::json($response); } } diff --git a/app/Http/Controllers/DownloadsController.php b/app/Http/Controllers/DownloadsController.php index 223b62a61960cb2a3070b6051fba1420bac921cd..febcaa1d8ceaa96bde12ce65617f46f7be216dfd 100644 --- a/app/Http/Controllers/DownloadsController.php +++ b/app/Http/Controllers/DownloadsController.php @@ -3,17 +3,13 @@ namespace App\Http\Controllers; use App\Corpus; -use App\Format; use App\Laudatio\GitLab\GitRepoService; use Illuminate\Http\Request; use GrahamCampbell\Flysystem\FlysystemManager; use App\Custom\LaudatioUtilsInterface; use Log; use Response; -use ZipArchive; -use File; -use RecursiveIteratorIterator; -use RecursiveDirectoryIterator; +use Chumper\Zipper\Zipper; /** * Class DownloadsController @@ -43,7 +39,6 @@ class DownloadsController extends Controller } /** - * teiDownload * @param $corpusid * @param $version * @param $path @@ -52,7 +47,7 @@ class DownloadsController extends Controller public function teiDownload($corpusid, $version, $path) { $corpus = Corpus::find($corpusid); if($corpus->workflow_status == 1){ - $corpus = Corpus::find($corpusid); + //git archive -o mercurius-baumbank.zip --prefix=-mercurius-baumbank-version-1-0 v1.0 TEI-HEADERS $storage_path = storage_path(); $archivedFileName = $this->gitRepoService->archiveFiles($path,$version); $response = \Response::download($storage_path."/".$archivedFileName.".zip")->deleteFileAfterSend(); @@ -66,84 +61,51 @@ class DownloadsController extends Controller } - /** - * unpublishedTeiDownload - * @param $path - * @return \Symfony\Component\HttpFoundation\BinaryFileResponse - */ public function unpublishedTeiDownload($path) { - $zipper = new ZipArchive(); + + $header_filesystem = $this->flysystem->listContents($path.'/TEI-HEADERS'); + $zipper = new Zipper(); $uniqueName = strtr(base64_encode(openssl_random_pseudo_bytes(16)), "+/=", "XXX"); - $fileName = str_replace("/","_",$path).'.zip'; + $zipper->make($uniqueName.'.zip'); - $filePath = $this->basePath.'/'.$path.'/TEI-HEADERS'; + for ($i = 0; $i < count($header_filesystem);$i++){ - if ($zipper->open(public_path($fileName), \ZipArchive::CREATE) !== true) { - throw new \RuntimeException('Cannot open ' . public_path($fileName)); + if($header_filesystem[$i]['type'] == "dir"){ + $subfiles = $this->flysystem->listContents($header_filesystem[$i]['path']); + $subfilearray = array(); + for($j=0;$j < count($subfiles);$j++){ + $zipper->folder($header_filesystem[$i]['path'])->add($this->basePath.'/'.$subfiles[$j]['path']); + } + } } - $this->addContent($zipper, $this->basePath.'/'.$path.'/TEI-HEADERS'); $zipper->close(); - - $response = response()->download(public_path($fileName))->deleteFileAfterSend(); + $response = \Response::download($uniqueName.'.zip')->deleteFileAfterSend(); ob_end_clean(); return $response; } - /** - * addContent This takes symlinks into account. - * @param ZipArchive $zip - * @param string $path - */ - private function addContent(\ZipArchive $zip, string $path) - { - /** @var SplFileInfo[] $files */ - $iterator = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator( - $path, - \FilesystemIterator::FOLLOW_SYMLINKS - ), - \RecursiveIteratorIterator::SELF_FIRST - ); + public function formatDownload($formatid,$corpusid) { + $corpusFiles = $this->laudatioUtils->getFormatFilesByCorpusId($corpusid); + $zipper = new Zipper(); + $uniqueName = strtr(base64_encode(openssl_random_pseudo_bytes(16)), "+/=", "XXX"); + $zipper->make($uniqueName.'.zip'); - while ($iterator->valid()) { - if (!$iterator->isDot()) { - $filePath = $iterator->getPathName(); - $relativePath = substr($filePath, strlen($path) + 1); - - if (!$iterator->isDir()) { - $zip->addFile($filePath, $relativePath); - } else { - if ($relativePath !== false) { - $zip->addEmptyDir($relativePath); - } + foreach ($corpusFiles as $corpusFileFormatid => $formatdata) { + if($corpusFileFormatid == $formatid) { + foreach ($formatdata['format_files'] as $formatPath) { + $zipper->folder($formatdata['format_name'])->add($this->basePath.'/'.$formatPath); } } - $iterator->next(); } - } - /** - * formatDownload - * @param $formatid - * @param $corpusid - * @return mixed - */ - public function formatDownload($formatid,$corpusid) { - $corpus = Corpus::find($corpusid); - $format = Format::find($formatid); - $path = $this->laudatioUtils->getCorpusAndProjectPathByCorpusId($corpusid)."/CORPUS-DATA/".$format->name; - - $storage_path = storage_path(); - $archivedFileName = $this->gitRepoService->archiveFiles($path,$corpus->publication_version); - $response = \Response::download($storage_path."/".$archivedFileName.".zip")->deleteFileAfterSend(); + $zipper->close(); + $response = \Response::download($uniqueName.'.zip')->deleteFileAfterSend(); ob_end_clean(); return $response; } - /** - * citeDownload * @param Request $request * @return mixed */ diff --git a/app/Http/Controllers/ElasticController.php b/app/Http/Controllers/ElasticController.php index 3cee9c61cb926befc501259248b8b3e1e2eef404..9a84ce0c8fefa7235a05b6d9f7f45a5ca4e49414 100644 --- a/app/Http/Controllers/ElasticController.php +++ b/app/Http/Controllers/ElasticController.php @@ -68,10 +68,11 @@ class ElasticController extends Controller ), 200 ); + + //return view("search.searchresult",["took" => $milliseconds, "maxScore" => $maxScore, "results" => $results['hits']['hits']]); } /** - * getPublishedIndexes * @return \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response */ public function getPublishedIndexes() { @@ -320,6 +321,7 @@ class ElasticController extends Controller if (Cache::store('redis')->has('search_listAllPublished_'.$randomIndexes)) { $resultData = Cache::store('redis')->get('search_listAllPublished_'.$randomIndexes); + Log::info("listAllPublishedController:GOT DATA FROM CACHE:redis: "); } else{ $indicesByCorpus = $request->searchData['indicesByCorpus']; @@ -340,6 +342,7 @@ class ElasticController extends Controller $latestIndexes = $this->LaudatioUtils->hasHigherCorpusVersionByGitRepoId($indicesByCorpus,$corpusRepoid); if(count($latestIndexes) > 0 && $doc["_index"] == $latestIndexes['corpus_index']){ + //Log::info("CORPUS:LATESTINDEXES: ".print_r($doc["_index"] ."==". $latestIndexes['corpus_index'],1)); $newresult['hits']['hits'][$i] = $doc; $projectPath = $this->LaudatioUtils->getCorpusProjectPathByCorpusId($doc['_id'],$doc["_index"]); @@ -372,15 +375,44 @@ class ElasticController extends Controller $newresult['hits']['hits'][$i]['_source']['documentrange'] = $document_range; } +/* + if(isset($doc['_source']['corpus_merged_languages'])) { + $mergedLanguages = $doc['_source']['corpus_merged_languages']; + $result['hits']['hits'][$i]['_source']['corpus_merged_languages'] = $this->LaudatioUtils->removeMergedDuplicates($this->LaudatioUtils->removeMergedNA($mergedLanguages)); + } + if(isset($doc['_source']['corpus_merged_formats'])) { + $mergedFormats = $doc['_source']['corpus_merged_formats']; + $result['hits']['hits'][$i]['_source']['corpus_merged_formats'] = $this->LaudatioUtils->removeMergedDuplicates($this->LaudatioUtils->removeMergedNA($mergedFormats)); + } + $result['hits']['hits'][$i]['_source']['projectpath'] = $projectPath; + $result['hits']['hits'][$i]['_source']['corpuspath'] = $corpusPath; + $result['hits']['hits'][$i]['_source']['corpuslogo'] = $corpusLogo; + + $indexes = $this->LaudatioUtils->transformElasticSearchIndexes($doc["_index"]); + $current_document_index = $indexes["documentIndex"]; + + $documentResult = $this->ElasticService->getDocumentByCorpus( + array(array("in_corpora" => $doc["_index"])), + array($doc["_index"]), + array("document_publication_publishing_date"), + $current_document_index + ); + $docdata = array("result" => $doc['_source']); + $document_range = $this->LaudatioUtils->getDocumentRange($docdata,$documentResult); + $result['hits']['hits'][$i]['_source']['documentrange'] = $document_range; +*/ } else if(strpos($doc["_index"],"document") !== false) { + //Log::info("DOCUMENT: GETTING LATESTINDEXES: ".print_r($doc["_id"].", ".$doc["_index"],1)); $corpusRepoid = $this->LaudatioUtils->getGitRepoId($doc["_id"], $doc["_index"], "document"); $latestIndexes = $this->LaudatioUtils->hasHigherCorpusVersionByGitRepoId($indicesByCorpus,$corpusRepoid); + //Log::info("DOCUMENT: GOT LATESTINDEXES: ".print_r($latestIndexes,1)); if(count($latestIndexes) > 0 && $doc["_index"] == $latestIndexes['document_index']){ $newresult['hits']['hits'][$i] = $doc; $corpusName = $this->LaudatioUtils->getCorpusNameByObjectElasticsearchId('document',$doc['_id']); + //Log::info("DOCUMENT:LATESTINDEXES: ".print_r($doc["_index"] ."==". $latestIndexes['document_index'],1)); if(!empty($corpusName)){ $newresult['hits']['hits'][$i]['_source']['corpus_name'] = $corpusName; @@ -392,7 +424,16 @@ class ElasticController extends Controller } } +/* + if(!empty($corpusName)){ + $result['hits']['hits'][$i]['_source']['corpus_name'] = $corpusName; + } + if(isset($doc['_source']['document_merged_languages'])) { + $mergedLanguages = $doc['_source']['document_merged_languages']; + $result['hits']['hits'][$i]['_source']['document_merged_languages'] = $this->LaudatioUtils->removeMergedDuplicates($this->LaudatioUtils->removeMergedNA($mergedLanguages)); + } +*/ } else if(strpos($doc["_index"],"annotation") !== false) { $corpusRepoid = $this->LaudatioUtils->getGitRepoId($doc["_id"], $doc["_index"], "annotation"); @@ -401,7 +442,7 @@ class ElasticController extends Controller if(count($latestIndexes) > 0 && $doc["_index"] == $latestIndexes['annotation_index']){ $newresult['hits']['hits'][$i] = $doc; - + //Log::info("ANNOTATION:LATESTINDEXES: ".print_r($doc["_index"] ."==". $latestIndexes['annotation_index'],1)); $corpusName = $this->LaudatioUtils->getCorpusNameByObjectElasticsearchId('annotation',$doc['_id']); if(!empty($corpusName)) { $newresult['hits']['hits'][$i]['_source']['corpus_name'] = $corpusName; @@ -413,8 +454,18 @@ class ElasticController extends Controller } } - } + /* + if(!empty($corpusName)) { + $result['hits']['hits'][$i]['_source']['corpus_name'] = $corpusName; + } + if(isset($doc['_source']['annotation_merged_formats'])) { + $mergedFormats = $doc['_source']['annotation_merged_formats']; + $result['hits']['hits'][$i]['_source']['annotation_merged_formats'] = $this->LaudatioUtils->removeMergedDuplicates($this->LaudatioUtils->removeMergedNA($mergedFormats)); + } + */ + } + //$result['hits']['hits'][$i]['_source']['visibility'] = 1; $newresult['hits']['hits'][$i]['_source']['visibility'] = 1; } } @@ -428,6 +479,7 @@ class ElasticController extends Controller 'total' => $result['hits']['total'] ); + Log::info("listAllPublishedController:STORING IN CACHE:redis: "); Cache::store('redis')->forever('search_listAllPublished_'.$randomIndexes); } @@ -452,7 +504,7 @@ class ElasticController extends Controller return back()->withError($message); } - + //Log::info(print_r($request->searchData['indices'],1)); $result = $this->ElasticService->listAllPublished($request->searchData); $data = $result['hits']['hits']; @@ -490,7 +542,9 @@ class ElasticController extends Controller //$result['hits']['hits'][$i]['_source']['corpus_merged_formats'] = $this->LaudatioUtils->removeMergedDuplicates($this->LaudatioUtils->removeMergedNA($mergedFormats)); $newresult['hits']['hits'][$i]['corpus_merged_formats'] = $this->LaudatioUtils->removeMergedDuplicates($this->LaudatioUtils->removeMergedNA($mergedFormats)); } - + //$result['hits']['hits'][$i]['_source']['projectpath'] = $projectPath; + //$result['hits']['hits'][$i]['_source']['corpuspath'] = $corpusPath; + //$result['hits']['hits'][$i]['_source']['corpuslogo'] = $corpusLogo; $newresult['hits']['hits'][$i]['_source']['projectpath'] = $projectPath; $newresult['hits']['hits'][$i]['_source']['corpuspath'] = $corpusPath; $newresult['hits']['hits'][$i]['_source']['corpuslogo'] = $corpusLogo; @@ -506,7 +560,7 @@ class ElasticController extends Controller ); $docdata = array("result" => $doc['_source']); $document_range = $this->LaudatioUtils->getDocumentRange($docdata,$documentResult); - + //$result['hits']['hits'][$i]['_source']['documentrange'] = $document_range; $newresult['hits']['hits'][$i]['_source']['documentrange'] = $document_range; } @@ -527,6 +581,7 @@ class ElasticController extends Controller if (isset($doc['_source']['document_merged_languages'])) { $mergedLanguages = $doc['_source']['document_merged_languages']; + //$result['hits']['hits'][$i]['_source']['document_merged_languages'] = $this->LaudatioUtils->removeMergedDuplicates($this->LaudatioUtils->removeMergedNA($mergedLanguages)); $newresult['hits']['hits'][$i]['_source']['document_merged_languages'] = $this->LaudatioUtils->removeMergedDuplicates($this->LaudatioUtils->removeMergedNA($mergedLanguages)); } } @@ -542,6 +597,7 @@ class ElasticController extends Controller if (isset($doc['_source']['document_merged_languages'])) { $mergedLanguages = $doc['_source']['document_merged_languages']; + //$result['hits']['hits'][$i]['_source']['document_merged_languages'] = $this->LaudatioUtils->removeMergedDuplicates($this->LaudatioUtils->removeMergedNA($mergedLanguages)); $newresult['hits']['hits'][$i]['_source']['document_merged_languages'] = $this->LaudatioUtils->removeMergedDuplicates($this->LaudatioUtils->removeMergedNA($mergedLanguages)); } } @@ -559,6 +615,7 @@ class ElasticController extends Controller if(isset($doc['_source']['annotation_merged_formats'])) { $mergedFormats = $doc['_source']['annotation_merged_formats']; + //$result['hits']['hits'][$i]['_source']['annotation_merged_formats'] = $this->LaudatioUtils->removeMergedDuplicates($this->LaudatioUtils->removeMergedNA($mergedFormats)); $newresult['hits']['hits'][$i]['_source']['annotation_merged_formats'] = $this->LaudatioUtils->removeMergedDuplicates($this->LaudatioUtils->removeMergedNA($mergedFormats)); } } @@ -566,12 +623,12 @@ class ElasticController extends Controller } - + //$result['hits']['hits'][$i]['_source']['visibility'] = 1; $newresult['hits']['hits'][$i]['_source']['visibility'] = 1; } } - + //Log::info("RETURNING: ".print_r($result['hits']['hits'],1)); $resultData = array( 'error' => false, 'milliseconds' => $result['took'], @@ -703,6 +760,7 @@ class ElasticController extends Controller 'total' => $result['hits']['total'] ); Cache::forever($cacheString.'|searchCorpusIndex', $resultData); + Log::info("SET: ".$cacheString.'|searchCorpusIndex'); } @@ -724,6 +782,7 @@ class ElasticController extends Controller $cacheString = $request->cacheString; if (Cache::has($cacheString.'|searchDocumentIndex')) { $resultData = Cache::get($cacheString.'|searchDocumentIndex'); + Log::info("GOT: ".$cacheString.'|searchDocumentIndex'); } else{ @@ -792,6 +851,8 @@ class ElasticController extends Controller $obj->fields = array(); if(isset($dateSearchKey) && $dateSearchKey != "" || isset($sizeSearchKey) && $sizeSearchKey != "") { + //Log::info("DOCUMENTSEARCH: ".print_r($request->searchData,1)); + if(isset($document_publication_publishing_date) || isset($document_publication_publishing_date_to) || isset($document_size_extent) || isset($document_size_extent_to)){ $obj->range->document_size_extent = $document_size_extent; @@ -828,6 +889,7 @@ class ElasticController extends Controller 'total' => $result['hits']['total'] ); Cache::forever($cacheString.'|searchDocumentIndex', $resultData); + Log::info("SET: ".$cacheString.'|searchDocumentIndex'); } @@ -904,6 +966,7 @@ class ElasticController extends Controller if (Cache::has($cacheString.'|getCorpusByDocument')) { $resultData = Cache::get($cacheString.'|getCorpusByDocument'); + Log::info("GOT: ".$cacheString.'|getCorpusByDocument'); } else{ $result = $this->ElasticService->getCorpusByDocument($request->corpusRefs, $request->documentRefs); @@ -912,6 +975,7 @@ class ElasticController extends Controller 'results' => $result ); Cache::forever($cacheString.'|getCorpusByDocument', $resultData); + Log::info("SET: ".$cacheString.'|getCorpusByDocument'); } @@ -929,9 +993,11 @@ class ElasticController extends Controller public function getAnnotationsByDocument(Request $request){ $resultData = null; $cacheString = $request->cacheString; - + Log::info("TIME TO GET ANNOS: ".$cacheString.'|getAnnotationsByDocument'); + //Cache::flush(); if (Cache::has($cacheString.'|getAnnotationsByDocument')) { + Log::info("GOT: ".$cacheString.'|getAnnotationsByDocument'); $resultData = Cache::get($cacheString.'|getAnnotationsByDocument'); } @@ -942,6 +1008,7 @@ class ElasticController extends Controller 'results' => $result ); Cache::forever($cacheString.'|getAnnotationsByDocument', $resultData); + Log::info("SET: ".$cacheString.'|getAnnotationsByDocument'); } return response( @@ -989,6 +1056,8 @@ class ElasticController extends Controller $cacheString = $request->cacheString; $index = $request->index; + //Log::info("getAnnotationByCorpus:FIELDS: ".print_r($request->fields,1)); + $corpusName = $this->LaudatioUtils->getCorpusNameByCorpusId($cacheString,$cacheString); @@ -1017,10 +1086,13 @@ class ElasticController extends Controller $resultData = null; $cacheString = $request->cacheString; + //Cache::flush(); + //Log::info("SEARCHING getDocumentsByAnnotation : ".$cacheString.'|getDocumentsByAnnotation'); if (Cache::has($cacheString.'|getDocumentsByAnnotation')) { $resultData = Cache::get($cacheString.'|getDocumentsByAnnotation'); } else{ + //Log::info("SEARCHING documentRefs : ".print_r($request->documentRefs,1 )); $result = $this->ElasticService->getDocumentsByAnnotation($request->documentRefs,$request->annotationRefs); $resultData = array( 'error' => false, @@ -1042,7 +1114,8 @@ class ElasticController extends Controller public function getCorporaByAnnotation(Request $request){ $resultData = null; $cacheString = $request->cacheString; - + // Cache::flush(); + Log::info("SEARCHING getCorporaByAnnotation : ".$cacheString.'|getCorporaByAnnotation'); if (Cache::has($cacheString.'|getCorporaByAnnotation')) { $resultData = Cache::get($cacheString.'|getCorporaByAnnotation'); } @@ -1061,6 +1134,71 @@ class ElasticController extends Controller ); } +/* + public function getDocumentsByAnnotation(Request $request){ + $corpusResult = array(); + $documentResult = array(); + $documentRefs = array(); + $corpusRefs = array(); + + for($i = 0; $i < count($request->annotationRefs); $i++){ + $annotationRef = $request->annotationRefs[$i]; + + if(!empty($request->corpusRefs[$i])){ + $corpusRefs = $request->corpusRefs[$i]; + } + else{ + $corpusRefs = array(); + } + + $corpusResult[$annotationRef] = array(); + if(!empty($request->documentRefs[$i])) { + if(is_array($request->documentRefs[$i])){ + $documentRefs = $request->documentRefs[$i]; + } + else{ + array_push($documentRefs,$request->documentRefs[$i]); + } + + } + else{ + $documentRefs = array(); + } + $documentResult[$annotationRef] = array(); + + $documentRefs = array_unique($documentRefs); + + if(count($corpusRefs) > 0) { + foreach ($corpusRefs as $corpusRef){ + array_push($corpusResult[$annotationRef],$this->ElasticService->getCorpusByAnnotation(array(array( + '_id' => $corpusRef + )))); + } + } + + + if (count($documentRefs) > 0) { + foreach ($documentRefs as $documentRef){ + array_push($documentResult[$annotationRef],$this->ElasticService->getDocumentsByAnnotation(array(array( + '_id' => $documentRef + )))); + } + } + + }//end for annotations + + $resultData = array( + "corpusResult" => $corpusResult, + "documentResult" => $documentResult + ); + + Log::info("GOT: ".print_r($resultData,1)); + return response( + $resultData, + 200 + ); + } +*/ /** * @param Request $request @@ -1071,12 +1209,15 @@ class ElasticController extends Controller $resultData = null; $cacheString = $request->cacheString; - + //Cache::flush(); + Log::info("SEARCHING ANNOTATONINDEX : ".$cacheString.'|searchAnnotationIndex'); if (Cache::has($cacheString.'|searchAnnotationIndex')) { $resultData = Cache::get($cacheString.'|searchAnnotationIndex'); + Log::info("GOT : ".$cacheString.'|searchAnnotationIndex'); } else{ $result = $this->ElasticService->searchAnnotationIndex($request->searchData); + Log::info("SEARCHING ANNOTATONINDEX MIILISEXZ: : ".$result['took']); $resultData = array( 'error' => false, 'milliseconds' => $result['took'], @@ -1085,6 +1226,7 @@ class ElasticController extends Controller 'total' => $result['hits']['total'] ); Cache::forever($cacheString.'|searchAnnotationIndex', $resultData); + Log::info("SET : ".$cacheString.'|searchAnnotationIndex'); } diff --git a/app/Http/Controllers/FormatController.php b/app/Http/Controllers/FormatController.php new file mode 100644 index 0000000000000000000000000000000000000000..c8b407e87b7204b6151c160021cd271a52b3cfb9 --- /dev/null +++ b/app/Http/Controllers/FormatController.php @@ -0,0 +1,85 @@ +GitLabService = $GitLabService; + } + + function listGroups(){ + + $data = $this->GitLabService->getGitLabGroups(); + return Response::json($data); + } + + public function showGitLabGroup($groupId){ + $data = $this->GitLabService->showGitLabGroup($groupId); + return Response::json($data); + } + public function createGitLabGroup($groupId){ + + } + + public function createGitLabProject($name, $path, $description,$visibility){ + + } + public function updateGitLabGroup($groupId){} + public function deleteGitLabGroup($groupId){} + +} \ No newline at end of file diff --git a/app/Http/Controllers/GitRepoController.php b/app/Http/Controllers/GitRepoController.php index fa727ac4b4d27cf93192dffcbd093a518ce976a9..c765f138cb68a58abca29c37b5223a7f4a7c6e52 100644 --- a/app/Http/Controllers/GitRepoController.php +++ b/app/Http/Controllers/GitRepoController.php @@ -80,7 +80,7 @@ class GitRepoController extends Controller $hasDiff = $gitFunction->hasDiff($this->basePath."/".$projects[$i]['path']); $projects[$i]['diffFiles'] = array(); - + //print print_r($hasDiff,1); if($hasDiff){ $projects[$i]['hasDiff'] = "true"; } @@ -91,6 +91,7 @@ class GitRepoController extends Controller array_push($projects[$i]['diffFiles'],$hasDiff); } + $patharray = explode("/",$path); $count = count($patharray); @@ -180,7 +181,7 @@ class GitRepoController extends Controller public function deleteFile($path){ $directoryPath = substr($path,0,strrpos($path,"/")); $dirArray = explode("/",$path); - + //dd($dirArray); $corpusPath = $dirArray[1]; if($dirArray[3] == 'corpus') { @@ -327,6 +328,7 @@ class GitRepoController extends Controller $result = $this->GitRepoService->deleteFile($this->flysystem,$path,null,null); } + Cache::flush(); if($result) { @@ -499,7 +501,7 @@ class GitRepoController extends Controller $formatName = $input['formatName']; $path = $input['path']; $gitFunction = new GitFunction(); - + //$created = $gitFunction->makeDirectory($path,$formatName); $created = $this->flysystem->createDir($path."/".$formatName); $msg .= ""; @@ -570,7 +656,7 @@ class PublicationController extends Controller $status = "error"; $result['publish_corpus_response'] = "There was a problem publishing the Corpus. The error was: The corpus could not be published to git due to failed GIT tagging. A message has been sent to the site administrator. Please try again later"; } - + Log::info("PUBLISHresponse: ".print_r($result,1)); }//end if corpusdocs and annotations } else{ @@ -585,7 +671,9 @@ class PublicationController extends Controller 'message' => $result, ); + return Response::json($response); + } diff --git a/app/Http/Controllers/RoleController.php b/app/Http/Controllers/RoleController.php index a94545bfa2d81e05dd4a8fed3387eec9617de53d..943fb7e175c038c2b0c83bfdfef6a64324c4ff4b 100644 --- a/app/Http/Controllers/RoleController.php +++ b/app/Http/Controllers/RoleController.php @@ -155,6 +155,8 @@ class RoleController extends Controller } + //dd("projectuserdata: ".print_r($project_user_roles,1)."\ncorpususerdata: ".print_r($corpus_user_roles,1)); + return view('admin.useradmin.roles.show', compact('role')) ->with('isLoggedIn', $isLoggedIn) ->with('project_user_roles', $project_user_roles) @@ -268,11 +270,17 @@ class RoleController extends Controller ); return Response::json($response); + /* + return redirect()->route('admin.roles.index') + ->with('flash_message', + 'Role deleted!') + ->with('isLoggedIn', $isLoggedIn) + ->with('user',$user); + */ } /** - * assignUsers - * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View + * @return $this */ public function assignUsers() { $isLoggedIn = \Auth::check(); @@ -298,12 +306,6 @@ class RoleController extends Controller ->with('user',$user); } - /** - * assignRolesToUsers - * @param $corpusProjectId - * @param $userId - * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View - */ public function assignRolesToUsers($corpusProjectId, $userId) { $isLoggedIn = \Auth::check(); $loggedInUser = \Auth::user(); @@ -373,14 +375,44 @@ class RoleController extends Controller return Response::json($response); } + public function storeRelations2(Request $request) + { + $input = $request->all(); + + $msg = ""; + if ($request->ajax()){ + $msg .= "

Assigned the following users to the following roles

"; + $role_users = $input['role_users']; + + $msg .= ""; + } + + $response = array( + 'status' => 'success', + 'msg' => $msg, + ); + + return Response::json($response); + } - /** - * removeRoleFromUser - * @param $roleId - * @param $userId - * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View - */ public function removeRoleFromUser($roleId, $userId){ $isLoggedIn = \Auth::check(); $loggedInUser = \Auth::user(); @@ -395,12 +427,6 @@ class RoleController extends Controller ->with('user',$loggedInUser); } - - /** - * removeSuperUserAssignment - * @param Request $request - * @return mixed - */ public function removeSuperUserAssignment(Request $request){ $result = array(); @@ -445,12 +471,6 @@ class RoleController extends Controller return Response::json($response); } - - /** - * storeRelationsByProject - * @param Request $request - * @return mixed - */ public function storeRelationsByProject(Request $request) { diff --git a/app/Http/Controllers/ScraperController.php b/app/Http/Controllers/ScraperController.php index e84258cbe1ec975768f5ff9d61307a2d0ae7ffa0..09e71ec1ba5b01c65414dc739713cf8899fa1ffc 100644 --- a/app/Http/Controllers/ScraperController.php +++ b/app/Http/Controllers/ScraperController.php @@ -57,10 +57,14 @@ class ScraperController extends Controller catch (\Exception $e) { $status = "error"; $result['message_assign_response'] = "There was a problem scraping the license deed. A message has been sent to the site administrator. Please try again later"; + Log::info("ERROR: ".$e->getMessage()); } } + + + $response = array( 'status' => $status, 'message' => $result, diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index 98e215f0494f643239f46a3ca474724b8fe7097e..7c42bf117d4ce53be991a19aa2c508c971dc548f 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -40,7 +40,6 @@ class SearchController extends Controller } /** - * index * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function index() { @@ -70,6 +69,7 @@ class SearchController extends Controller ->with('baseDomain',config('laudatio.base_domain')) ->with('elasticApiVersion',config('laudatio.elasticApiVersion')) ->with('frontpagequery',$frontpagequery); + //return view('search.search') } /** @@ -100,4 +100,33 @@ class SearchController extends Controller } + public function emptySearchCache(){ + $result = 0; + $corpusId = "7"; + $index = "poop"; + Cache::tags(['corpus_'.$corpusId.'_'.$index])->flush(); + + Cache::tags(['formats_'.$corpusId.'_'.$index])->flush(); + + $indexes = $this->LaudatioUtils->transformElasticSearchIndexes($index); + $guidelineIndex = $indexes["guidelineIndex"]; + Cache::tags(['guidelines_'.$corpusId.'_'.$guidelineIndex])->flush(); + + $redis = Cache::getRedis(); + $redis->connect('xxxxxx', 6379); // use your Host from Redis desktop Manager - connection + $redis->select('1'); + $corpora = $redis->keys('*corpora*'); + + foreach ($corpora as $lkey){ + $result = $redis->del($lkey); + } + + + + return response( + "DONE: ".$result, + 200 + ); + } + } \ No newline at end of file diff --git a/app/Http/Controllers/UploadController.php b/app/Http/Controllers/UploadController.php index 78331b5622415c5643b2263e9c693c6064d8ce03..3914a1470b9a28357bfd8732ae26e94556cf1827 100644 --- a/app/Http/Controllers/UploadController.php +++ b/app/Http/Controllers/UploadController.php @@ -162,6 +162,7 @@ class UploadController extends Controller $isWellFormed = $this->validationService->isWellFormed(true); //valid? + Log::info("STTING SCHEMA: ".$this->schemaBasePath.'/'.$headerPath.'/'.$headerPath.'.rng'); $this->validationService->setRelaxNGSchema($this->schemaBasePath.'/'.$headerPath.'/'.$headerPath.'.rng'); $isValid = $this->validationService->isValidByRNG(true); @@ -218,6 +219,8 @@ class UploadController extends Controller $gitFunction = new GitFunction(); // Is the Corpus Header uploaded ? We know that if the Corpus has an Eloquent version set $corpusIsVersioned = $this->laudatioUtilsService->corpusIsVersioned($corpusId); + Log::info("CORPUSISVERSIONED: ".$corpusIsVersioned); + Log::info("HEADERPATH: ".print_r($headerPath,1)); $latestGitTag = $this->laudatioUtilsService->getLatestCorpusTagByCorpusAndGitlabId($corpusId,$gitLabId); if($corpusIsVersioned) { @@ -330,6 +333,7 @@ class UploadController extends Controller $lastIndexes = $this->GitRepoService->getLastELasticsearchIndex($commitPath, $latestGitTag); + Log::info("ALREADZ VERSIONED: lastIndexes: ".print_r($lastIndexes,1)); //push $isPushedSucessfully = $this->GitRepoService->pushFiles($pushPath,$corpusId,$user); @@ -436,6 +440,7 @@ class UploadController extends Controller if(!isset($corpus->id)){ $elasticIds = $this->elasticService->getElasticIdByObjectId($this->corpusIndexName,$corpusObject); + Log::info("ALREADZ VERSIONED: ELASTICIDS: ".print_r($elasticIds,1)); foreach ($elasticIds as $ecorpusId => $elasticId){ $corpus->elasticsearch_id = $elasticIds[$ecorpusId]['elasticsearchid']; $corpus->elasticsearch_index = $this->corpusIndexName; @@ -550,6 +555,8 @@ class UploadController extends Controller return Response::json($responsearray, 400); } + Log::info("CREATED FILEE: ".print_r($fileName,1)." CREATED PATHS: ".print_r($createdPaths,1)); + $corpusPublicationVersion = ""; $addStructurePath = ""; //parse @@ -620,7 +627,7 @@ class UploadController extends Controller array( 'namespace_id' => $corpusProjectId, 'path' => $gitLabCorpusPath, - 'description' => $this->GitRepoService->truncateString($corpusDescription[0],2000), + 'description' => $corpusDescription[0], 'visibility' => 'private' )); @@ -730,6 +737,8 @@ class UploadController extends Controller } + Log::info("FILEPATH: ".print_r($filePath,1)); + $pushPath = $corpusProjectPath.'/'.$corpus->directory_path; if($pushCorpusStructure && !empty($initialPushPath) && $remoteRepoUrl @@ -739,6 +748,7 @@ class UploadController extends Controller && isset($addPath) && isset($filePath) ){ + Log::info("THIS ONLY WITH CORPUS RIGHT-0?"); $newRemoteRepoUrl = str_replace("scm.cms.hu-berlin.de",$this->sshAlias,$remoteRepoUrl); $addRemote = $this->GitRepoService->addRemote($newRemoteRepoUrl,$initialPushPath); @@ -832,12 +842,15 @@ class UploadController extends Controller } //add files + Log::info("CREATED FILEE AGAIN?: ".print_r($fileName,1)." CREATED PATHS: ".print_r($createdPaths,1)); //add .gitignore $gitIgnoreIsAdded = $gitFunction->addUntracked($addStructurePath,".gitignore"); $isAdded = $this->GitRepoService->addFiles($this->flysystem, $addStructurePath); if($isAdded) { + Log::info("ISADDED : ".print_r($isAdded,1)); $corpusCommitdata = $this->GitRepoService->commitFiles($corpusCommitpath, "Adding files for ", $corpusId, $user->name, $user->email); + Log::info("CORPUSCOMMITDATA : ".print_r($corpusCommitdata,1)); if(!empty($corpusCommitdata)){ $lastIndexes = $this->GitRepoService->getLastELasticsearchIndex($corpusCommitpath,'v0'); @@ -852,9 +865,11 @@ class UploadController extends Controller $corpusCommitdata['TEI-HEADERS/corpus/corpusHeader.xml']['elasticsearch_id'] = $corpusIndexedElasticsearchId; } + Log::info("CORPUSCOMMITDAT2 : ".print_r($corpusCommitdata,1)); $setData = $this->laudatioUtilsService->setCommitData($corpusCommitdata,$corpusId); + Log::info("SETDATA : ".print_r($setData,1)); $isPushedSucessfully = $this->GitRepoService->pushFiles($pushPath,$corpusId,$user); - + Log::info("isPushedSucessfully : ".print_r($isPushedSucessfully,1)); if(is_array($isPushedSucessfully)){ $exception = $isPushedSucessfully["exception"]; $message = $exception->createUserFacingJSONMessage($exception->getMessage()); @@ -960,7 +975,7 @@ class UploadController extends Controller }//end if reset }//end if pushcorpus }//end if corpus is versioned - + Log::info("REDIRECTING: "); return redirect()->route('corpus.edit', ['corpus' => $corpusId]); } @@ -1138,6 +1153,7 @@ class UploadController extends Controller $isPushedSucessfully = $this->GitRepoService->pushFiles($pushPath,$corpusId,$user); + //$isPushed = $this->GitRepoService->pushFiles($pushPath, $corpusId, $user); if(is_array($isPushedSucessfully)){ $exception = $isPushedSucessfully["exception"]; $message = $exception->createUserFacingProcessJSONMessage($exception->getMessage()); @@ -1164,6 +1180,8 @@ class UploadController extends Controller } if($isPushed) { + // Log::info("CORPUSFILE UPLOAD: DELETING CACHE FOR CORPUS-DATA: ".$corpusProjectPath."/".$corpusPath."/CORPUS-DATA/, " .$corpusId); + //$this->LaudatioUtilService->emptyCorpusDataFileCache($corpusProjectPath.'/'.$corpusPath."/CORPUS-DATA/",$corpusId); $contents = $this->flysystem->read($corpusProjectPath.'/'.$corpusPath."/CORPUS-DATA/"); } } diff --git a/app/Laudatio/Elasticsearch/ElasticService.php b/app/Laudatio/Elasticsearch/ElasticService.php index 9eecc4896f2b32a5d6a69049c40a69a3db09abd4..0c7849727d255cd9c2745a4c9aef8704a2dd6354 100644 --- a/app/Laudatio/Elasticsearch/ElasticService.php +++ b/app/Laudatio/Elasticsearch/ElasticService.php @@ -1228,22 +1228,11 @@ public function doSearch($params) foreach ($searchData['filterData'] as $field => $value) { if(!empty($field) && !empty($value)) { - - if($field == "corpus_publication_license"){ - for ($i = 0; $i < count($value); $i++){ - if(strpos(strtolower($value[$i]),"cc-") !== false){ - $value[$i] = str_replace("cc-","",strtolower($value[$i])); - } - else if(strpos(strtolower($value[$i]),"cc ") !== false){ - $value[$i] = str_replace("cc ","",strtolower($value[$i])); - } - } - } $fields[$field] = $value; } } - + //Log::info("filterSearch: ".print_r($searchData,1)); $fields['fields'] = $searchData['fields']; $queryBody = $queryBuilder->buildFilteredHighlightedMustQuery( @@ -2457,6 +2446,7 @@ public function doSearch($params) ]; } + Log::info("corpusRangeSearch: params: ".print_r($params,1)); return Elasticsearch::search($params); } @@ -2611,17 +2601,6 @@ public function doSearch($params) ) ) { - if($field == "corpus_publication_license"){ - for ($i = 0; $i < count($value); $i++){ - if(strpos(strtolower($value[$i]),"cc-") !== false){ - $value[$i] = str_replace("cc-","",strtolower($value[$i])); - } - else if(strpos(strtolower($value[$i]),"cc ") !== false){ - $value[$i] = str_replace("cc ","",strtolower($value[$i])); - } - } - } - foreach($value as $valueitem) { $obj = app()->make('stdClass'); $obj->field = $field; diff --git a/app/Laudatio/GitLab/GitFunction.php b/app/Laudatio/GitLab/GitFunction.php index 95ab4cce6a46b3e4bd3a12d37bdedee563859049..e53cc8e0b85b84a513056c5dbfe42022ec970a94 100644 --- a/app/Laudatio/GitLab/GitFunction.php +++ b/app/Laudatio/GitLab/GitFunction.php @@ -894,45 +894,20 @@ class GitFunction public function fetchGitArchive($path,$version){ $isArchived = ""; - $isFormat = false; $process = null; - $formatPath = ""; - if(strpos($path,"CORPUS-DATA") !== false) { - $formatPathArray = explode("/", $path); - - $fileName = $formatPathArray[3]; - $formatPath = $formatPathArray[0]."/".$formatPathArray[1]."/".$formatPathArray[2]; - $isFormat = true; - } - else{ - $corpusPath = substr($path,strpos($path,"/")+1); - $corpusPathArray = explode("_",$corpusPath); - $fileName = $corpusPathArray[0]; - } - + $corpusPath = substr($path,strpos($path,"/")+1); + $corpusPathArray = explode("_",$corpusPath); + $fileName = $corpusPathArray[0]; $storage_path = storage_path(); try { - $process = null; //git archive -o mercurius-baumbank.zip --prefix=-mercurius-baumbank-version-1-0 v1.0 TEI-HEADERS - if($isFormat){ - $process = new Process("git archive -o ".$storage_path."/".$fileName."-v".$version.".zip --prefix=".$fileName."-v".$version." v".$version." ".$fileName,$this->basePath."/".$formatPath); - } - else{ - $process = new Process("git archive -o ".$storage_path."/".$fileName.".zip --prefix=".$fileName."-v".$version." v".$version." TEI-HEADERS",$this->basePath."/".$path); - } - + $process = new Process("git archive -o ".$storage_path."/".$fileName.".zip --prefix=".$fileName."-v".$version." v".$version." TEI-HEADERS",$this->basePath."/".$path); $process->setTimeout(3600); $process->run(); $processOutput = $process->getOutput(); - if($isFormat){ - $isArchived = $fileName."-v".$version; - } - else { - $isArchived = $fileName; - } - + $isArchived = $fileName; } catch (RuntimeException $runtimeException){ throw new GitInitException($runtimeException->getMessage(),0,null); @@ -945,7 +920,6 @@ class GitFunction } - /** * * copyGitHooks: copy the githooks folder to the corpus diff --git a/app/Laudatio/GitLab/GitRepoService.php b/app/Laudatio/GitLab/GitRepoService.php index fe7daeb0712261fb9a946ac85c488bab7c63cb52..21eeec5008bf888104aa1232941ce8e2e65f2168 100644 --- a/app/Laudatio/GitLab/GitRepoService.php +++ b/app/Laudatio/GitLab/GitRepoService.php @@ -1358,12 +1358,6 @@ class GitRepoService implements GitRepoInterface $str = preg_replace("/(&)([a-z])([a-z]+;)/i", '$2', $str); return $str; } - - public function truncateString($str, $count) { - $clip = substr($str,0,$count); - $clip = substr($clip,0, strrpos($clip,".")+1); - return $clip." ..."; - } } \ No newline at end of file diff --git a/app/Laudatio/Utils/LDAPService.php b/app/Laudatio/Utils/LDAPService.php new file mode 100644 index 0000000000000000000000000000000000000000..0c091654fb26d43b79fd4d9609b27e7aa5e28a5e --- /dev/null +++ b/app/Laudatio/Utils/LDAPService.php @@ -0,0 +1,92 @@ +config = [ + // Mandatory Configuration Options + 'hosts' => ['ldapmaster.cms.hu-berlin.de'], + 'base_dn' => config('external_base_dn','ou=users,ou=Laudatio,ou=Services,ou=Computer- und Medienservice,o=Humboldt-Universitaet zu Berlin,c=de'), + 'username' => 'uid='.config('laudatio.external_admin_username').','.config('external_base_dn','ou=Laudatio,ou=Services,ou=Computer- und Medienservice,o=Humboldt-Universitaet zu Berlin,c=de'), + 'password' => config('laudatio.external_admin_password'), + 'schema' => config('ldap.connections.default.settings.schema'), + // Optional Configuration Options + 'account_prefix' => '', + 'account_suffix' => '', + 'port' => 389, + 'follow_referrals' => false, + 'use_ssl' => false, + 'use_tls' => true, + 'version' => 3, + 'timeout' => 10, + ]; + + $this->adldap = new Adldap(); + $this->adldap->addProvider($this->config,'master-config'); + + } + + + public function connectADLDAP() { + try { + $this->provider = $this->adldap->connect('master-config'); + // Great, we're connected! + } catch (Adldap\Auth\BindException $e) { + // Failed to connect. + } + } + + public function searchTree($searchData,$fields){ + $search = $this->provider->search(); + $search->select($fields); + $results = $search->where($searchData)->get(); + return $results; + } + + public function createUser($userData){ + $result = array(); + + $factory = $this->provider->make(); + + $user = $factory->user($userData); + + $ldaprecord['objectclass'][0] = "top"; + $ldaprecord['objectclass'][1] = "person"; + $ldaprecord['objectclass'][2] = "organizationalPerson"; + $ldaprecord['objectclass'][3] = "inetOrgPerson"; + + $user->fill($ldaprecord); + $user->setDn('uid=' . $userData['uid'] . ',' . $this->config['base_dn']); + + if ($user->save()) { + $result = array( + 'success' => true, + 'message' => 'The user was successfully created' + ); + + } else { + $result = array( + 'success' => false, + 'message' => 'There was an error creating the user' + ); + } + return $result; + } +} \ No newline at end of file diff --git a/app/Providers/LDAPServiceProvider.php b/app/Providers/LDAPServiceProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..d07bda85292f20994f6597482ff8cbd824608c7e --- /dev/null +++ b/app/Providers/LDAPServiceProvider.php @@ -0,0 +1,37 @@ +app->singleton('App\Custom\LDAPInterface', function ($app){ + return new LDAPService(); + }); + } +} diff --git a/app/User.php b/app/User.php index 1b5dc0d8e02f53f13228c1725daba142c7f22f54..b974ebee612120dc29a5decceb8b468c4132eae1 100644 --- a/app/User.php +++ b/app/User.php @@ -4,11 +4,8 @@ namespace App; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; -use LdapRecord\Laravel\Auth\HasLdapUser; use Spatie\Permission\Traits\HasRoles; -use LdapRecord\Laravel\Auth\LdapAuthenticatable; -use LdapRecord\Laravel\Auth\AuthenticatesWithLdap; -use LdapRecord\Laravel\Auth\ListensForLdapBindFailure; +use Adldap\Laravel\Traits\HasLdapUser; use Illuminate\Database\Eloquent\SoftDeletes; use App\Role; use Log; @@ -17,10 +14,11 @@ use Log; * @package App */ -class User extends Authenticatable implements LdapAuthenticatable +class User extends Authenticatable { - use Notifiable, AuthenticatesWithLdap; + use Notifiable; use HasRoles; + use HasLdapUser; /** * The attributes that are mass assignable. @@ -28,7 +26,7 @@ class User extends Authenticatable implements LdapAuthenticatable * @var array */ protected $fillable = [ - 'name', 'email','password','affiliation', 'username', 'gitlab-use-agree', 'terms-of-use-agree', 'authenticated','objectguid','guid','domain' + 'name', 'email','password','affiliation', 'username', 'gitlab-use-agree', 'terms-of-use-agree', 'authenticated','objectguid' ]; /** diff --git a/composer.json b/composer.json index c52282d0ff16b52828eea4bef4c717d1a08d6059..932eaa3d9354e7188a61cce3430411166b803a23 100644 --- a/composer.json +++ b/composer.json @@ -8,36 +8,37 @@ ], "license": "MIT", "require": { - "php": "^7.3", - "cviebrock/laravel-elasticsearch": "^4.2.1", - "directorytree/ldaprecord-laravel": "^1.7", + "php": "^7.1.3", + "adldap2/adldap2-laravel": "^6.0", + "chumper/zipper": "1.0.x", + "cviebrock/laravel-elasticsearch": "^3.6", "doctrine/dbal": "^2.9", "elasticsearch/elasticsearch": "^7.0", "fabpot/goutte": "^3.2", "fideloper/proxy": "^4.0", - "flow/jsonpath": "^0.5.0", - "graham-campbell/flysystem": "^6.3", - "graham-campbell/gitlab": "^3.2.0", + "flow/jsonpath": "^0.4.0", + "graham-campbell/flysystem": "^5.1", + "graham-campbell/gitlab": "^1.7", "graham-campbell/manager": "^4.1", "laracasts/utilities": "^3.0", - "laravel/framework": "^6.0", + "laravel/framework": "5.8.*", "laravel/tinker": "^1.0", - "laravelcollective/html": "^6.1.2", - "laravolt/avatar": "^3.2.1", + "laravelcollective/html": "^5.4", + "laravolt/avatar": "^2.1", "league/flysystem-cached-adapter": "~1.0", "mpociot/laravel-apidoc-generator": "dev-master", "olendorf/ezid-php": "^0.0.1", - "ongr/elasticsearch-dsl": "^7.2.0", + "ongr/elasticsearch-dsl": "^6.0.3", "php-http/guzzle6-adapter": "^1.1", "predis/predis": "^1.1", - "spatie/laravel-permission": "^3.13.0" + "spatie/laravel-permission": "^2.7" }, "require-dev": { "beyondcode/laravel-dump-server": "^1.0", "filp/whoops": "^2.0", "fzaninotto/faker": "^1.4", "mockery/mockery": "^1.0", - "nunomaduro/collision": "3.0.1", + "nunomaduro/collision": "^2.0", "phpunit/phpunit": "^7.5" }, "config": { diff --git a/composer.lock b/composer.lock index 370437052206ff8f5bc2c2b9f3231dce245535e7..d1007b677c3afd59d75a96e684d2d6cd9e6db121 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,179 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2d2f84e399c64adbeb1f7af780163066", + "content-hash": "1b0de5c37fc2ec86cbae255afc301b44", "packages": [ + { + "name": "adldap2/adldap2", + "version": "v10.0.11", + "source": { + "type": "git", + "url": "https://github.com/Adldap2/Adldap2.git", + "reference": "beb3c9cc28de752d6c3b0221605035659eccc42e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Adldap2/Adldap2/zipball/beb3c9cc28de752d6c3b0221605035659eccc42e", + "reference": "beb3c9cc28de752d6c3b0221605035659eccc42e", + "shasum": "" + }, + "require": { + "ext-ldap": "*", + "illuminate/contracts": "~5.0", + "php": ">=7.0", + "psr/log": "~1.0", + "tightenco/collect": "~5.0" + }, + "require-dev": { + "mockery/mockery": "~1.0", + "phpunit/phpunit": "~6.0" + }, + "suggest": { + "ext-fileinfo": "fileinfo is required when retrieving user encoded thumbnails" + }, + "type": "library", + "autoload": { + "psr-4": { + "Adldap\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Steve Bauman", + "email": "steven_bauman@outlook.com", + "role": "Developer" + } + ], + "description": "A PHP LDAP Package for humans.", + "keywords": [ + "active directory", + "ad", + "adLDAP", + "adldap2", + "directory", + "ldap", + "windows" + ], + "time": "2019-05-24T14:15:58+00:00" + }, + { + "name": "adldap2/adldap2-laravel", + "version": "v6.0.7", + "source": { + "type": "git", + "url": "https://github.com/Adldap2/Adldap2-Laravel.git", + "reference": "e7e60f0f10ff845bf8e8c965258c86a33c9ab266" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Adldap2/Adldap2-Laravel/zipball/e7e60f0f10ff845bf8e8c965258c86a33c9ab266", + "reference": "e7e60f0f10ff845bf8e8c965258c86a33c9ab266", + "shasum": "" + }, + "require": { + "adldap2/adldap2": "^10.0", + "illuminate/support": "~5.5.0|~5.6.0|~5.7.0|~5.8.0", + "php": ">=7.1" + }, + "require-dev": { + "mockery/mockery": "~1.0", + "orchestra/testbench": "~3.7", + "phpunit/phpunit": "~7.0" + }, + "type": "project", + "extra": { + "laravel": { + "providers": [ + "Adldap\\Laravel\\AdldapServiceProvider", + "Adldap\\Laravel\\AdldapAuthServiceProvider" + ], + "aliases": { + "Adldap": "Adldap\\Laravel\\Facades\\Adldap" + } + } + }, + "autoload": { + "psr-4": { + "Adldap\\Laravel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "LDAP Authentication & Management for Laravel.", + "keywords": [ + "adLDAP", + "adldap2", + "laravel", + "ldap" + ], + "time": "2019-06-28T17:34:46+00:00" + }, + { + "name": "chumper/zipper", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/Chumper/Zipper.git", + "reference": "6a1733c34d67c3952b8439afb36ad4ea5c3ceacb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Chumper/Zipper/zipball/6a1733c34d67c3952b8439afb36ad4ea5c3ceacb", + "reference": "6a1733c34d67c3952b8439afb36ad4ea5c3ceacb", + "shasum": "" + }, + "require": { + "illuminate/filesystem": "^5.0", + "illuminate/support": "^5.0", + "php": ">=5.6.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Chumper\\Zipper\\ZipperServiceProvider" + ], + "aliases": { + "Zipper": "Chumper\\Zipper\\Zipper" + } + } + }, + "autoload": { + "psr-4": { + "Chumper\\Zipper\\": "src/Chumper/Zipper" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "authors": [ + { + "name": "Nils Plaschke", + "email": "github@nilsplaschke.de", + "homepage": "http://nilsplaschke.de", + "role": "Developer" + } + ], + "description": "This is a little neat helper for the ZipArchive methods with handy functions", + "homepage": "http://github.com/Chumper/zipper", + "keywords": [ + "archive", + "laravel", + "zip" + ], + "time": "2017-07-17T08:05:10+00:00" + }, { "name": "clue/stream-filter", "version": "v1.4.1", @@ -60,28 +231,29 @@ }, { "name": "cviebrock/laravel-elasticsearch", - "version": "4.2.1", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/cviebrock/laravel-elasticsearch.git", - "reference": "ce8c890250df72e226dff9ee28d072361f686465" + "reference": "75a5d7e1ec993a4f4de275a28c0472ec94bd08ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cviebrock/laravel-elasticsearch/zipball/ce8c890250df72e226dff9ee28d072361f686465", - "reference": "ce8c890250df72e226dff9ee28d072361f686465", + "url": "https://api.github.com/repos/cviebrock/laravel-elasticsearch/zipball/75a5d7e1ec993a4f4de275a28c0472ec94bd08ff", + "reference": "75a5d7e1ec993a4f4de275a28c0472ec94bd08ff", "shasum": "" }, "require": { "elasticsearch/elasticsearch": "^7.0", - "illuminate/contracts": "^6.0|^7.0", - "illuminate/support": "^6.0|^7.0", - "php": "^7.2.5" + "illuminate/contracts": "~5.5.0|~5.6.0|~5.7.0|~5.8.0", + "illuminate/support": "~5.5.0|~5.6.0|~5.7.0|~5.8.0", + "monolog/monolog": "^1.23", + "php": "^7.0" }, "require-dev": { - "limedeck/phpunit-detailed-printer": "^5.0", - "orchestra/testbench": "^4.0|^5.0", - "phpunit/phpunit": "^8.0" + "limedeck/phpunit-detailed-printer": "^3.2|^4.1", + "orchestra/testbench": "~3.5.0|~3.6.0|~3.7.0", + "phpunit/phpunit": "^6.2|^7.0" }, "suggest": { "aws/aws-sdk-php": "Required to connect to an Elasticsearch host on AWS (^3.80)" @@ -120,41 +292,37 @@ "laravel", "search" ], - "time": "2020-03-05T02:28:17+00:00" + "time": "2019-06-27T02:04:10+00:00" }, { - "name": "directorytree/ldaprecord", - "version": "v1.9.0", + "name": "danielstjules/stringy", + "version": "3.1.0", "source": { "type": "git", - "url": "https://github.com/DirectoryTree/LdapRecord.git", - "reference": "1e281c2743ce026e2eee1fb6ca20cba3c60e2ca0" + "url": "https://github.com/danielstjules/Stringy.git", + "reference": "df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DirectoryTree/LdapRecord/zipball/1e281c2743ce026e2eee1fb6ca20cba3c60e2ca0", - "reference": "1e281c2743ce026e2eee1fb6ca20cba3c60e2ca0", + "url": "https://api.github.com/repos/danielstjules/Stringy/zipball/df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e", + "reference": "df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e", "shasum": "" }, "require": { - "ext-json": "*", - "ext-ldap": "*", - "illuminate/contracts": "^5.0|^6.0|^7.0", - "nesbot/carbon": "^1.0|^2.0", - "php": ">=7.2", - "psr/log": "^1.0", - "psr/simple-cache": "^1.0", - "tightenco/collect": "^5.0|^6.0|^7.0" + "php": ">=5.4.0", + "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "~4.0" }, "type": "library", "autoload": { "psr-4": { - "LdapRecord\\": "src/" - } + "Stringy\\": "src/" + }, + "files": [ + "src/Create.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -162,111 +330,47 @@ ], "authors": [ { - "name": "Steve Bauman", - "email": "steven_bauman@outlook.com", - "role": "Developer" + "name": "Daniel St. Jules", + "email": "danielst.jules@gmail.com", + "homepage": "http://www.danielstjules.com" } ], - "description": "A fully-featured LDAP ORM.", - "homepage": "https://www.ldaprecord.com", - "keywords": [ - "active directory", - "ad", - "adLDAP", - "adldap2", - "directory", - "ldap", - "ldaprecord", - "orm", - "windows" - ], - "funding": [ - { - "url": "https://github.com/stevebauman", - "type": "github" - } - ], - "time": "2020-07-07T16:32:49+00:00" - }, - { - "name": "directorytree/ldaprecord-laravel", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/DirectoryTree/LdapRecord-Laravel.git", - "reference": "0a84a0c9c279c6495241453ff13fb0779de53594" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/DirectoryTree/LdapRecord-Laravel/zipball/0a84a0c9c279c6495241453ff13fb0779de53594", - "reference": "0a84a0c9c279c6495241453ff13fb0779de53594", - "shasum": "" - }, - "require": { - "directorytree/ldaprecord": "^1.8.2", - "ext-ldap": "*", - "illuminate/support": "^5.6|^6.0|^7.0", - "php": ">=7.2" - }, - "require-dev": { - "mockery/mockery": "~1.0", - "orchestra/testbench": "~3.7", - "phpunit/phpunit": "~7.0" - }, - "type": "project", - "extra": { - "laravel": { - "providers": [ - "LdapRecord\\Laravel\\LdapServiceProvider", - "LdapRecord\\Laravel\\LdapAuthServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "LdapRecord\\Laravel\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "LDAP Authentication & Management for Laravel.", + "description": "A string manipulation library with multibyte support", + "homepage": "https://github.com/danielstjules/Stringy", "keywords": [ - "adldap2", - "laravel", - "ldap", - "ldaprecord" - ], - "funding": [ - { - "url": "https://github.com/stevebauman", - "type": "github" - } + "UTF", + "helpers", + "manipulation", + "methods", + "multibyte", + "string", + "utf-8", + "utility", + "utils" ], - "time": "2020-07-17T16:14:23+00:00" + "time": "2017-06-12T01:10:27+00:00" }, { "name": "dnoegel/php-xdg-base-dir", - "version": "v0.1.1", + "version": "0.1", "source": { "type": "git", "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", "shasum": "" }, "require": { "php": ">=5.3.2" }, "require-dev": { - "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" + "phpunit/phpunit": "@stable" }, - "type": "library", + "type": "project", "autoload": { "psr-4": { "XdgBaseDir\\": "src/" @@ -277,31 +381,31 @@ "MIT" ], "description": "implementation of xdg base directory specification for php", - "time": "2019-12-04T15:06:13+00:00" + "time": "2014-10-24T07:27:01+00:00" }, { "name": "doctrine/cache", - "version": "1.10.2", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "13e3381b25847283a91948d04640543941309727" + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/13e3381b25847283a91948d04640543941309727", - "reference": "13e3381b25847283a91948d04640543941309727", + "url": "https://api.github.com/repos/doctrine/cache/zipball/d768d58baee9a4862ca783840eca1b9add7a7f57", + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57", "shasum": "" }, "require": { - "php": "~7.1 || ^8.0" + "php": "~7.1" }, "conflict": { "doctrine/common": ">2.2,<2.4" }, "require-dev": { "alcaeus/mongo-php-adapter": "^1.1", - "doctrine/coding-standard": "^6.0", + "doctrine/coding-standard": "^4.0", "mongodb/mongodb": "^1.1", "phpunit/phpunit": "^7.0", "predis/predis": "~1.0" @@ -312,7 +416,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -325,10 +429,6 @@ "MIT" ], "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -337,6 +437,10 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -346,63 +450,41 @@ "email": "schmittjoh@gmail.com" } ], - "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", - "homepage": "https://www.doctrine-project.org/projects/cache.html", + "description": "Caching library offering an object-oriented API for many cache backends", + "homepage": "https://www.doctrine-project.org", "keywords": [ - "abstraction", - "apcu", "cache", - "caching", - "couchdb", - "memcached", - "php", - "redis", - "xcache" + "caching" ], - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", - "type": "tidelift" - } - ], - "time": "2020-07-07T18:54:01+00:00" + "time": "2018-08-21T18:01:43+00:00" }, { "name": "doctrine/dbal", - "version": "2.10.2", + "version": "v2.9.2", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "aab745e7b6b2de3b47019da81e7225e14dcfdac8" + "reference": "22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/aab745e7b6b2de3b47019da81e7225e14dcfdac8", - "reference": "aab745e7b6b2de3b47019da81e7225e14dcfdac8", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9", + "reference": "22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9", "shasum": "" }, "require": { "doctrine/cache": "^1.0", "doctrine/event-manager": "^1.0", "ext-pdo": "*", - "php": "^7.2" + "php": "^7.1" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "jetbrains/phpstorm-stubs": "^2019.1", - "nikic/php-parser": "^4.4", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^8.4.1", - "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", - "vimeo/psalm": "^3.11" + "doctrine/coding-standard": "^5.0", + "jetbrains/phpstorm-stubs": "^2018.1.2", + "phpstan/phpstan": "^0.10.1", + "phpunit/phpunit": "^7.4", + "symfony/console": "^2.0.5|^3.0|^4.0", + "symfony/phpunit-bridge": "^3.4.5|^4.0.5" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -413,7 +495,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.10.x-dev", + "dev-master": "2.9.x-dev", "dev-develop": "3.0.x-dev" } }, @@ -427,10 +509,6 @@ "MIT" ], "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -439,6 +517,10 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -449,62 +531,37 @@ "keywords": [ "abstraction", "database", - "db2", "dbal", - "mariadb", - "mssql", "mysql", - "oci8", - "oracle", - "pdo", + "persistence", "pgsql", - "postgresql", - "queryobject", - "sasql", - "sql", - "sqlanywhere", - "sqlite", - "sqlserver", - "sqlsrv" - ], - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", - "type": "tidelift" - } + "php", + "queryobject" ], - "time": "2020-04-20T17:19:26+00:00" + "time": "2018-12-31T03:27:51+00:00" }, { "name": "doctrine/event-manager", - "version": "1.1.1", + "version": "v1.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/event-manager.git", - "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f" + "reference": "a520bc093a0170feeb6b14e9d83f3a14452e64b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/41370af6a30faa9dc0368c4a6814d596e81aba7f", - "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/a520bc093a0170feeb6b14e9d83f3a14452e64b3", + "reference": "a520bc093a0170feeb6b14e9d83f3a14452e64b3", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.1" }, "conflict": { "doctrine/common": "<2.9@dev" }, "require-dev": { - "doctrine/coding-standard": "^6.0", + "doctrine/coding-standard": "^4.0", "phpunit/phpunit": "^7.0" }, "type": "library", @@ -523,10 +580,6 @@ "MIT" ], "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -535,6 +588,10 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -548,64 +605,44 @@ "email": "ocramius@gmail.com" } ], - "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "description": "Doctrine Event Manager component", "homepage": "https://www.doctrine-project.org/projects/event-manager.html", "keywords": [ "event", - "event dispatcher", - "event manager", - "event system", - "events" + "eventdispatcher", + "eventmanager" ], - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", - "type": "tidelift" - } - ], - "time": "2020-05-29T18:28:51+00:00" + "time": "2018-06-11T11:59:03+00:00" }, { "name": "doctrine/inflector", - "version": "2.0.3", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210" + "reference": "5527a48b7313d15261292c149e55e26eae771b0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210", - "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.1" }, "require-dev": { - "doctrine/coding-standard": "^7.0", - "phpstan/phpstan": "^0.11", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-strict-rules": "^0.11", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^6.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -613,10 +650,6 @@ "MIT" ], "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -625,6 +658,10 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -634,52 +671,32 @@ "email": "schmittjoh@gmail.com" } ], - "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", - "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", "keywords": [ "inflection", - "inflector", - "lowercase", - "manipulation", - "php", - "plural", - "singular", - "strings", - "uppercase", - "words" - ], - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", - "type": "tidelift" - } + "pluralize", + "singularize", + "string" ], - "time": "2020-05-29T15:13:26+00:00" + "time": "2018-01-09T20:05:19+00:00" }, { "name": "doctrine/lexer", - "version": "1.2.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" + "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", - "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e17f069ede36f7534b95adec71910ed1b49c74ea", + "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.2" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -689,7 +706,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -724,21 +741,7 @@ "parser", "php" ], - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2020-05-25T17:44:05+00:00" + "time": "2019-07-30T19:33:28+00:00" }, { "name": "dragonmantank/cron-expression", @@ -796,27 +799,27 @@ }, { "name": "egulias/email-validator", - "version": "2.1.19", + "version": "2.1.10", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "840d5603eb84cc81a6a0382adac3293e57c1c64c" + "reference": "a6c8d7101b19a451c1707b1b79bbbc56e4bdb7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/840d5603eb84cc81a6a0382adac3293e57c1c64c", - "reference": "840d5603eb84cc81a6a0382adac3293e57c1c64c", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/a6c8d7101b19a451c1707b1b79bbbc56e4bdb7ec", + "reference": "a6c8d7101b19a451c1707b1b79bbbc56e4bdb7ec", "shasum": "" }, "require": { "doctrine/lexer": "^1.0.1", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.10" + "php": ">= 5.5" }, "require-dev": { - "dominicsayers/isemail": "^3.0.7", - "phpunit/phpunit": "^4.8.36|^7.5.15", - "satooshi/php-coveralls": "^1.0.1" + "dominicsayers/isemail": "dev-master", + "phpunit/phpunit": "^4.8.35||^5.7||^6.0", + "satooshi/php-coveralls": "^1.0.1", + "symfony/phpunit-bridge": "^4.4@dev" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" @@ -824,12 +827,12 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Egulias\\EmailValidator\\": "src" + "Egulias\\EmailValidator\\": "EmailValidator" } }, "notification-url": "https://packagist.org/downloads/", @@ -850,25 +853,25 @@ "validation", "validator" ], - "time": "2020-08-08T21:28:19+00:00" + "time": "2019-07-19T20:52:08+00:00" }, { "name": "elasticsearch/elasticsearch", - "version": "v7.8.0", + "version": "v7.2.1", "source": { "type": "git", "url": "https://github.com/elastic/elasticsearch-php.git", - "reference": "5c2d039ae7bdaa1e28f1e66971c5b3314fc36383" + "reference": "47af862a9a481bad1cac5bf3a5db8c80a9323497" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/5c2d039ae7bdaa1e28f1e66971c5b3314fc36383", - "reference": "5c2d039ae7bdaa1e28f1e66971c5b3314fc36383", + "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/47af862a9a481bad1cac5bf3a5db8c80a9323497", + "reference": "47af862a9a481bad1cac5bf3a5db8c80a9323497", "shasum": "" }, "require": { "ext-json": ">=1.3.7", - "ezimuel/ringphp": "^1.1.2", + "guzzlehttp/ringphp": "~1.0", "php": "^7.1", "psr/log": "~1.0" }, @@ -876,7 +879,7 @@ "cpliakas/git-wrapper": "~2.0", "doctrine/inflector": "^1.3", "mockery/mockery": "^1.2", - "phpstan/phpstan": "^0.12", + "phpstan/phpstan-shim": "^0.11", "phpunit/phpunit": "^7.5", "squizlabs/php_codesniffer": "^3.4", "symfony/finder": "~4.0", @@ -888,9 +891,6 @@ }, "type": "library", "autoload": { - "files": [ - "src/autoload.php" - ], "psr-4": { "Elasticsearch\\": "src/Elasticsearch/" } @@ -913,20 +913,20 @@ "elasticsearch", "search" ], - "time": "2020-06-18T19:23:29+00:00" + "time": "2019-08-27T12:20:01+00:00" }, { "name": "erusev/parsedown", - "version": "1.7.4", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/erusev/parsedown.git", - "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3" + "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3", - "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/6d893938171a817f4e9bc9e86f2da1e370b7bcd7", + "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7", "shasum": "" }, "require": { @@ -937,115 +937,9 @@ "phpunit/phpunit": "^4.8.35" }, "type": "library", - "autoload": { - "psr-0": { - "Parsedown": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ], - "time": "2019-12-30T22:54:17+00:00" - }, - { - "name": "ezimuel/guzzlestreams", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/ezimuel/guzzlestreams.git", - "reference": "abe3791d231167f14eb80d413420d1eab91163a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ezimuel/guzzlestreams/zipball/abe3791d231167f14eb80d413420d1eab91163a8", - "reference": "abe3791d231167f14eb80d413420d1eab91163a8", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Stream\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Fork of guzzle/streams (abandoned) to be used with elasticsearch-php", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "stream" - ], - "time": "2020-02-14T23:11:50+00:00" - }, - { - "name": "ezimuel/ringphp", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/ezimuel/ringphp.git", - "reference": "0b78f89d8e0bb9e380046c31adfa40347e9f663b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ezimuel/ringphp/zipball/0b78f89d8e0bb9e380046c31adfa40347e9f663b", - "reference": "0b78f89d8e0bb9e380046c31adfa40347e9f663b", - "shasum": "" - }, - "require": { - "ezimuel/guzzlestreams": "^3.0.1", - "php": ">=5.4.0", - "react/promise": "~2.0" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "ext-curl": "Guzzle will use specific adapters if cURL is present" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Ring\\": "src/" + "autoload": { + "psr-0": { + "Parsedown": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -1054,42 +948,47 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" } ], - "description": "Fork of guzzle/RingPHP (abandoned) to be used with elasticsearch-php", - "time": "2020-02-14T23:51:21+00:00" + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ], + "time": "2019-03-17T18:48:37+00:00" }, { "name": "fabpot/goutte", - "version": "v3.3.0", + "version": "v3.2.3", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/Goutte.git", - "reference": "4ab5199e3ec0ffde0ee0b5ecf568a4fb8398dbae" + "reference": "3f0eaf0a40181359470651f1565b3e07e3dd31b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/4ab5199e3ec0ffde0ee0b5ecf568a4fb8398dbae", - "reference": "4ab5199e3ec0ffde0ee0b5ecf568a4fb8398dbae", + "url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/3f0eaf0a40181359470651f1565b3e07e3dd31b8", + "reference": "3f0eaf0a40181359470651f1565b3e07e3dd31b8", "shasum": "" }, "require": { "guzzlehttp/guzzle": "^6.0", - "php": "^7.1.3", - "symfony/browser-kit": "^4.4|^5.0", - "symfony/css-selector": "^4.4|^5.0", - "symfony/dom-crawler": "^4.4|^5.0" + "php": ">=5.5.0", + "symfony/browser-kit": "~2.1|~3.0|~4.0", + "symfony/css-selector": "~2.1|~3.0|~4.0", + "symfony/dom-crawler": "~2.1|~3.0|~4.0" }, "require-dev": { - "symfony/phpunit-bridge": "^5.0" + "symfony/phpunit-bridge": "^3.3 || ^4" }, "type": "application", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -1115,29 +1014,29 @@ "keywords": [ "scraper" ], - "time": "2019-12-06T13:11:18+00:00" + "time": "2018-06-29T15:13:57+00:00" }, { "name": "fideloper/proxy", - "version": "4.4.0", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8" + "reference": "39a4c2165e578bc771f5dc031c273210a3a9b6d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8", - "reference": "9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8", + "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/39a4c2165e578bc771f5dc031c273210a3a9b6d2", + "reference": "39a4c2165e578bc771f5dc031c273210a3a9b6d2", "shasum": "" }, "require": { - "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0", + "illuminate/contracts": "~5.0|~6.0", "php": ">=5.4.0" }, "require-dev": { - "illuminate/http": "^5.0|^6.0|^7.0|^8.0", - "mockery/mockery": "^1.0", + "illuminate/http": "~5.6|~6.0", + "mockery/mockery": "~1.0", "phpunit/phpunit": "^6.0" }, "type": "library", @@ -1169,81 +1068,20 @@ "proxy", "trusted proxy" ], - "time": "2020-06-23T01:36:47+00:00" - }, - { - "name": "filp/whoops", - "version": "2.7.3", - "source": { - "type": "git", - "url": "https://github.com/filp/whoops.git", - "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/5d5fe9bb3d656b514d455645b3addc5f7ba7714d", - "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d", - "shasum": "" - }, - "require": { - "php": "^5.5.9 || ^7.0", - "psr/log": "^1.0.1" - }, - "require-dev": { - "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0", - "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" - }, - "suggest": { - "symfony/var-dumper": "Pretty print complex values better with var-dumper available", - "whoops/soap": "Formats errors as SOAP responses" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Whoops\\": "src/Whoops/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp", - "role": "Developer" - } - ], - "description": "php error handling for cool kids", - "homepage": "https://filp.github.io/whoops/", - "keywords": [ - "error", - "exception", - "handling", - "library", - "throwable", - "whoops" - ], - "time": "2020-06-14T09:00:00+00:00" + "time": "2019-07-29T16:49:45+00:00" }, { "name": "flow/jsonpath", - "version": "0.5.0", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/FlowCommunications/JSONPath.git", - "reference": "b9738858c75d008c1211612b973e9510f8b7f8ea" + "reference": "f0222818d5c938e4ab668ab2e2c079bd51a27112" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FlowCommunications/JSONPath/zipball/b9738858c75d008c1211612b973e9510f8b7f8ea", - "reference": "b9738858c75d008c1211612b973e9510f8b7f8ea", + "url": "https://api.github.com/repos/FlowCommunications/JSONPath/zipball/f0222818d5c938e4ab668ab2e2c079bd51a27112", + "reference": "f0222818d5c938e4ab668ab2e2c079bd51a27112", "shasum": "" }, "require": { @@ -1251,7 +1089,7 @@ }, "require-dev": { "peekmo/jsonpath": "dev-master", - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^4.0" }, "type": "library", "autoload": { @@ -1271,20 +1109,20 @@ } ], "description": "JSONPath implementation for parsing, searching and flattening arrays", - "time": "2019-07-15T17:23:22+00:00" + "time": "2018-03-04T16:39:47+00:00" }, { "name": "fzaninotto/faker", - "version": "v1.9.1", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f" + "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fc10d778e4b84d5bd315dad194661e091d307c6f", - "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/f72816b43e74063c8b10357394b6bba8cb1c10de", + "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de", "shasum": "" }, "require": { @@ -1293,12 +1131,12 @@ "require-dev": { "ext-intl": "*", "phpunit/phpunit": "^4.8.35 || ^5.7", - "squizlabs/php_codesniffer": "^2.9.2" + "squizlabs/php_codesniffer": "^1.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -1321,36 +1159,42 @@ "faker", "fixtures" ], - "time": "2019-12-12T13:22:17+00:00" + "time": "2018-07-12T10:23:15+00:00" }, { - "name": "graham-campbell/bounded-cache", + "name": "graham-campbell/cache-plugin", "version": "v1.1.0", "source": { "type": "git", - "url": "https://github.com/GrahamCampbell/Bounded-Cache.git", - "reference": "ca58ead742af3e906737f6b09aa0e84d1a1bebad" + "url": "https://github.com/GrahamCampbell/Cache-Plugin.git", + "reference": "7090dd5e4a07f5c9c8e8a4ff65c3c57dab536b78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Bounded-Cache/zipball/ca58ead742af3e906737f6b09aa0e84d1a1bebad", - "reference": "ca58ead742af3e906737f6b09aa0e84d1a1bebad", + "url": "https://api.github.com/repos/GrahamCampbell/Cache-Plugin/zipball/7090dd5e4a07f5c9c8e8a4ff65c3c57dab536b78", + "reference": "7090dd5e4a07f5c9c8e8a4ff65c3c57dab536b78", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0", - "psr/simple-cache": "^1.0" + "php": "^7.0", + "php-http/cache-plugin": "^1.6", + "php-http/client-common": "^1.9|^2.0", + "php-http/message-factory": "^1.0", + "psr/cache": "^1.0" }, "require-dev": { - "graham-campbell/analyzer": "^3.0", - "graham-campbell/testbench-core": "^3.1", - "mockery/mockery": "^1.3.2", - "phpunit/phpunit": "^8.5 || ^9.0" + "graham-campbell/analyzer": "^2.1", + "phpunit/phpunit": "^6.5|^7.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, "autoload": { "psr-4": { - "GrahamCampbell\\BoundedCache\\": "src/" + "GrahamCampbell\\CachePlugin\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1363,56 +1207,44 @@ "email": "graham@alt-three.com" } ], - "description": "A Bounded TTL PSR-16 Cache Implementation", + "description": "Provides A Simple HTTP Cache Plugin With Good Defaults", "keywords": [ - "Bounded Cache", - "Bounded-Cache", + "Cache Plugin", + "Cache-Plugin", "Graham Campbell", "GrahamCampbell", - "bounded", "cache", - "psr16" - ], - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/graham-campbell/bounded-cache", - "type": "tidelift" - } + "http" ], - "time": "2020-07-15T19:08:22+00:00" + "time": "2019-01-27T13:36:25+00:00" }, { "name": "graham-campbell/flysystem", - "version": "v6.3.1", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Laravel-Flysystem.git", - "reference": "a74b4b14f873e2825446799d9fe34239d7d868aa" + "reference": "c96b32f7c39164b01ac80ee0587ef9f12e0fe88a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Flysystem/zipball/a74b4b14f873e2825446799d9fe34239d7d868aa", - "reference": "a74b4b14f873e2825446799d9fe34239d7d868aa", + "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Flysystem/zipball/c96b32f7c39164b01ac80ee0587ef9f12e0fe88a", + "reference": "c96b32f7c39164b01ac80ee0587ef9f12e0fe88a", "shasum": "" }, "require": { - "graham-campbell/manager": "^4.4", - "illuminate/cache": "^5.5|^6.0|^7.0", - "illuminate/contracts": "^5.5|^6.0|^7.0", - "illuminate/support": "^5.5|^6.0|^7.0", + "graham-campbell/manager": "^4.2", + "illuminate/cache": "5.5.*|5.6.*|5.7.*|5.8.*", + "illuminate/contracts": "5.5.*|5.6.*|5.7.*|5.8.*", + "illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*", "league/flysystem": "^1.0", "php": "^7.1.3" }, "require-dev": { - "alcaeus/mongo-php-adapter": "^1.1", - "graham-campbell/analyzer": "^2.4", - "graham-campbell/testbench": "^5.4", + "graham-campbell/analyzer": "^2.1", + "graham-campbell/testbench": "^5.2", "league/flysystem-aws-s3-v3": "^1.0", - "league/flysystem-azure-blob-storage": "^0.1.6", + "league/flysystem-azure": "^1.0", "league/flysystem-cached-adapter": "^1.0", "league/flysystem-eventable-filesystem": "^1.0", "league/flysystem-gridfs": "^1.0", @@ -1420,15 +1252,14 @@ "league/flysystem-sftp": "^1.0", "league/flysystem-webdav": "^1.0", "league/flysystem-ziparchive": "^1.0", - "mockery/mockery": "^1.3.1", + "mockery/mockery": "^1.0", "phpunit/phpunit": "^6.5|^7.0|^8.0", "spatie/flysystem-dropbox": "^1.0", "superbalist/flysystem-google-storage": "^7.2" }, "suggest": { - "alcaeus/mongo-php-adapter": "GridFS adapter support.", "league/flysystem-aws-s3-v3": "AwsS3 adapter support.", - "league/flysystem-azure-blob-storage": "Azure adapter support.", + "league/flysystem-azure": "Azure adapter support.", "league/flysystem-cached-adapter": "Adapter caching support.", "league/flysystem-eventable-filesystem": "Eventable filesystem support.", "league/flysystem-gridfs": "GridFS adapter support.", @@ -1443,7 +1274,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.3-dev" + "dev-master": "5.3-dev" }, "laravel": { "providers": [ @@ -1466,7 +1297,7 @@ "email": "graham@alt-three.com" } ], - "description": "Flysystem Is A Flysystem Bridge For Laravel", + "description": "Flysystem Is A Flysystem Bridge For Laravel 5", "keywords": [ "Flysystem", "Graham Campbell", @@ -1480,56 +1311,46 @@ "laravel", "s3" ], - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://www.patreon.com/GrahamJCampbell", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/graham-campbell/flysystem", - "type": "tidelift" - } - ], - "time": "2020-04-14T16:12:04+00:00" + "time": "2019-06-16T16:23:40+00:00" }, { "name": "graham-campbell/gitlab", - "version": "v3.2.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Laravel-GitLab.git", - "reference": "3ca8b2b39424ae56bdd1419a9140ac3677837c74" + "reference": "9f26fda19b6777cd9a126f40fb85d93607008a85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Laravel-GitLab/zipball/3ca8b2b39424ae56bdd1419a9140ac3677837c74", - "reference": "3ca8b2b39424ae56bdd1419a9140ac3677837c74", + "url": "https://api.github.com/repos/GrahamCampbell/Laravel-GitLab/zipball/9f26fda19b6777cd9a126f40fb85d93607008a85", + "reference": "9f26fda19b6777cd9a126f40fb85d93607008a85", "shasum": "" }, "require": { - "graham-campbell/bounded-cache": "^1.0", - "graham-campbell/manager": "^4.5", - "illuminate/contracts": "^6.0 || ^7.0", - "illuminate/support": "^6.0 || ^7.0", - "m4tthumphrey/php-gitlab-api": "9.18.*", - "php": "^7.2.5", - "php-http/cache-plugin": "^1.6", - "php-http/client-common": "^1.9 || ^2.0", - "symfony/cache": "^4.3 || ^5.0" + "graham-campbell/cache-plugin": "^1.0", + "graham-campbell/manager": "^4.2", + "illuminate/contracts": "5.5.*|5.6.*|5.7.*|5.8.*", + "illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*", + "m4tthumphrey/php-gitlab-api": "9.13.*", + "php": "^7.1.3" }, "require-dev": { - "graham-campbell/analyzer": "^3.0", - "graham-campbell/testbench": "^5.4", - "mockery/mockery": "^1.3.1", - "php-http/guzzle6-adapter": "^1.1 || ^2.0", - "phpunit/phpunit": "^8.5 || ^9.0" + "graham-campbell/analyzer": "^2.1", + "graham-campbell/testbench": "^5.2", + "madewithlove/illuminate-psr-cache-bridge": "^1.0", + "mockery/mockery": "^1.0", + "php-http/guzzle6-adapter": "^1.0", + "phpunit/phpunit": "^6.5|^7.0|^8.0" + }, + "suggest": { + "madewithlove/illuminate-psr-cache-bridge": "Allows caching GitLab HTTP requests" }, "type": "library", "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + }, "laravel": { "providers": [ "GrahamCampbell\\GitLab\\GitLabServiceProvider" @@ -1551,7 +1372,7 @@ "email": "graham@alt-three.com" } ], - "description": "GitLab Is A GitLab Bridge For Laravel", + "description": "GitLab Is A GitLab Bridge For Laravel 5", "keywords": [ "Bridge", "Graham Campbell", @@ -1565,44 +1386,39 @@ "laravel", "php-gitlab-api" ], - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/graham-campbell/gitlab", - "type": "tidelift" - } - ], - "time": "2020-07-14T12:09:47+00:00" + "time": "2019-05-16T21:10:31+00:00" }, { "name": "graham-campbell/manager", - "version": "v4.6.0", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Laravel-Manager.git", - "reference": "e18c29f98adb770bd890b6d66b27ba4730272599" + "reference": "b2e003d5b2064d013888ca8594f31a7991a4cc7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Manager/zipball/e18c29f98adb770bd890b6d66b27ba4730272599", - "reference": "e18c29f98adb770bd890b6d66b27ba4730272599", + "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Manager/zipball/b2e003d5b2064d013888ca8594f31a7991a4cc7a", + "reference": "b2e003d5b2064d013888ca8594f31a7991a4cc7a", "shasum": "" }, "require": { - "illuminate/contracts": "^5.5 || ^6.0 || ^7.0 || ^8.0", - "illuminate/support": "^5.5 || ^6.0 || ^7.0 || ^8.0", - "php": "^7.1.3 || ^8.0" + "illuminate/contracts": "5.5.*|5.6.*|5.7.*|5.8.*", + "illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*", + "php": "^7.1.3" }, "require-dev": { - "graham-campbell/analyzer": "^2.4 || ^3.0", - "graham-campbell/testbench-core": "^3.2", - "mockery/mockery": "^1.3.1", - "phpunit/phpunit": "^6.5 || ^7.5 || ^8.4 || ^9.0" + "graham-campbell/analyzer": "^2.1", + "graham-campbell/testbench-core": "^3.0", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.5|^7.0|^8.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, "autoload": { "psr-4": { "GrahamCampbell\\Manager\\": "src/" @@ -1618,7 +1434,7 @@ "email": "graham@alt-three.com" } ], - "description": "Manager Provides Some Manager Functionality For Laravel", + "description": "Manager Provides Some Manager Functionality For Laravel 5", "keywords": [ "Graham Campbell", "GrahamCampbell", @@ -1630,43 +1446,31 @@ "laravel", "manager" ], - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/graham-campbell/manager", - "type": "tidelift" - } - ], - "time": "2020-07-25T18:02:52+00:00" + "time": "2019-06-30T12:22:27+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "6.5.5", + "version": "6.3.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", "shasum": "" }, "require": { - "ext-json": "*", "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.6.1", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.17.0" + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" }, "require-dev": { "ext-curl": "*", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.1" + "psr/log": "^1.0" }, "suggest": { "psr/log": "Required for using the Log middleware" @@ -1674,16 +1478,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.5-dev" + "dev-master": "6.3-dev" } }, "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1707,7 +1511,7 @@ "rest", "web service" ], - "time": "2020-06-16T21:01:06+00:00" + "time": "2018-04-22T15:46:56+00:00" }, { "name": "guzzlehttp/promises", @@ -1754,54 +1558,164 @@ "homepage": "https://github.com/mtdowling" } ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "time": "2016-12-20T10:07:11+00:00" + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2019-07-01T23:21:34+00:00" + }, + { + "name": "guzzlehttp/ringphp", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/RingPHP.git", + "reference": "5e2a174052995663dd68e6b5ad838afd47dd615b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/5e2a174052995663dd68e6b5ad838afd47dd615b", + "reference": "5e2a174052995663dd68e6b5ad838afd47dd615b", + "shasum": "" + }, + "require": { + "guzzlehttp/streams": "~3.0", + "php": ">=5.4.0", + "react/promise": "~2.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "ext-curl": "Guzzle will use specific adapters if cURL is present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Ring\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", + "time": "2018-07-31T13:22:33+00:00" }, { - "name": "guzzlehttp/psr7", - "version": "1.6.1", + "name": "guzzlehttp/streams", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + "url": "https://github.com/guzzle/streams.git", + "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", + "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", "shasum": "" }, "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" + "php": ">=5.4.0" }, "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" - }, - "suggest": { - "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + "phpunit/phpunit": "~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "3.0-dev" } }, "autoload": { "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + "GuzzleHttp\\Stream\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1812,37 +1726,28 @@ "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" } ], - "description": "PSR-7 message implementation that also provides common utility methods", + "description": "Provides a simple abstraction over streams of data", + "homepage": "http://guzzlephp.org/", "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" + "Guzzle", + "stream" ], - "time": "2019-07-01T23:21:34+00:00" + "time": "2014-10-12T19:18:40+00:00" }, { "name": "intervention/image", - "version": "2.5.1", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/Intervention/image.git", - "reference": "abbf18d5ab8367f96b3205ca3c89fb2fa598c69e" + "reference": "39eaef720d082ecc54c64bf54541c55f10db546d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Intervention/image/zipball/abbf18d5ab8367f96b3205ca3c89fb2fa598c69e", - "reference": "abbf18d5ab8367f96b3205ca3c89fb2fa598c69e", + "url": "https://api.github.com/repos/Intervention/image/zipball/39eaef720d082ecc54c64bf54541c55f10db546d", + "reference": "39eaef720d082ecc54c64bf54541c55f10db546d", "shasum": "" }, "require": { @@ -1899,7 +1804,7 @@ "thumbnail", "watermark" ], - "time": "2019-11-02T09:15:47+00:00" + "time": "2019-06-24T14:06:31+00:00" }, { "name": "jakub-onderka/php-console-color", @@ -1941,7 +1846,6 @@ "email": "jakub.onderka@gmail.com" } ], - "abandoned": "php-parallel-lint/php-console-color", "time": "2018-09-29T17:23:10+00:00" }, { @@ -1988,26 +1892,25 @@ } ], "description": "Highlight PHP code in terminal", - "abandoned": "php-parallel-lint/php-console-highlighter", "time": "2018-09-29T18:48:56+00:00" }, { "name": "laracasts/utilities", - "version": "3.1", + "version": "3.0", "source": { "type": "git", "url": "https://github.com/laracasts/PHP-Vars-To-Js-Transformer.git", - "reference": "7c5eb11221de608eef8c70c2d3540c8cd80466e3" + "reference": "298fb3c6f29901a4550c4f98b57c05f368341d04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laracasts/PHP-Vars-To-Js-Transformer/zipball/7c5eb11221de608eef8c70c2d3540c8cd80466e3", - "reference": "7c5eb11221de608eef8c70c2d3540c8cd80466e3", + "url": "https://api.github.com/repos/laracasts/PHP-Vars-To-Js-Transformer/zipball/298fb3c6f29901a4550c4f98b57c05f368341d04", + "reference": "298fb3c6f29901a4550c4f98b57c05f368341d04", "shasum": "" }, "require": { - "illuminate/support": "^5.0|^6.0|^7.0", - "php": ">=5.5.0|>=7.2.5" + "illuminate/support": "~5.0", + "php": ">=5.4.0" }, "require-dev": { "phpspec/phpspec": "~2.0" @@ -2046,48 +1949,47 @@ "javascript", "laravel" ], - "time": "2020-03-03T16:07:08+00:00" + "time": "2017-09-01T17:25:57+00:00" }, { "name": "laravel/framework", - "version": "v6.18.35", + "version": "v5.8.30", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "baec6c2d7f433594cb858c35c2a2946df7ecac13" + "reference": "7ccf0cf63931a8d8391aed90e6fc011381ea6838" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/baec6c2d7f433594cb858c35c2a2946df7ecac13", - "reference": "baec6c2d7f433594cb858c35c2a2946df7ecac13", + "url": "https://api.github.com/repos/laravel/framework/zipball/7ccf0cf63931a8d8391aed90e6fc011381ea6838", + "reference": "7ccf0cf63931a8d8391aed90e6fc011381ea6838", "shasum": "" }, "require": { - "doctrine/inflector": "^1.4|^2.0", + "doctrine/inflector": "^1.1", "dragonmantank/cron-expression": "^2.0", - "egulias/email-validator": "^2.1.10", + "egulias/email-validator": "^2.0", + "erusev/parsedown": "^1.7", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "league/commonmark": "^1.3", - "league/flysystem": "^1.0.34", - "monolog/monolog": "^1.12|^2.0", - "nesbot/carbon": "^2.0", + "league/flysystem": "^1.0.8", + "monolog/monolog": "^1.12", + "nesbot/carbon": "^1.26.3 || ^2.0", "opis/closure": "^3.1", - "php": "^7.2", + "php": "^7.1.3", "psr/container": "^1.0", "psr/simple-cache": "^1.0", "ramsey/uuid": "^3.7", "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^4.3.4", - "symfony/debug": "^4.3.4", - "symfony/finder": "^4.3.4", - "symfony/http-foundation": "^4.3.4", - "symfony/http-kernel": "^4.3.4", - "symfony/polyfill-php73": "^1.17", - "symfony/process": "^4.3.4", - "symfony/routing": "^4.3.4", - "symfony/var-dumper": "^4.3.4", + "symfony/console": "^4.2", + "symfony/debug": "^4.2", + "symfony/finder": "^4.2", + "symfony/http-foundation": "^4.2", + "symfony/http-kernel": "^4.2", + "symfony/process": "^4.2", + "symfony/routing": "^4.2", + "symfony/var-dumper": "^4.2", "tijsverkoyen/css-to-inline-styles": "^2.2.1", "vlucas/phpdotenv": "^3.3" }, @@ -2127,46 +2029,46 @@ "require-dev": { "aws/aws-sdk-php": "^3.0", "doctrine/dbal": "^2.6", - "filp/whoops": "^2.4", - "guzzlehttp/guzzle": "^6.3|^7.0", + "filp/whoops": "^2.1.4", + "guzzlehttp/guzzle": "^6.3", "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "^1.3.1", + "mockery/mockery": "^1.0", "moontoast/math": "^1.1", - "orchestra/testbench-core": "^4.0", + "orchestra/testbench-core": "3.8.*", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^7.5.15|^8.4|^9.0", + "phpunit/phpunit": "^7.5|^8.0", "predis/predis": "^1.1.1", - "symfony/cache": "^4.3.4" + "symfony/css-selector": "^4.2", + "symfony/dom-crawler": "^4.2", + "true/punycode": "^2.1" }, "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (^3.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", - "ext-ftp": "Required to use the Flysystem FTP driver.", - "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", - "ext-memcached": "Required to use the memcache cache driver.", "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", - "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", - "filp/whoops": "Required for friendly error pages in development (^2.4).", - "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).", - "guzzlehttp/guzzle": "Required to use the Mailgun mail driver and the ping methods on schedules (^6.0|^7.0).", - "laravel/tinker": "Required to use the tinker console command (^2.0).", + "filp/whoops": "Required for friendly error pages in development (^2.1.4).", + "fzaninotto/faker": "Required to use the eloquent factory builder (^1.4).", + "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (^6.0).", + "laravel/tinker": "Required to use the tinker console command (^1.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", "moontoast/math": "Required to use ordered UUIDs (^1.1).", - "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", + "nexmo/client": "Required to use the Nexmo transport (^1.0).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^4.3.4).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.2).", + "predis/predis": "Required to use the redis cache and queue drivers (^1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^3.0).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (^4.2).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (^4.2).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.1).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "5.8-dev" } }, "autoload": { @@ -2194,20 +2096,20 @@ "framework", "laravel" ], - "time": "2020-08-07T15:06:09+00:00" + "time": "2019-07-30T14:08:47+00:00" }, { "name": "laravel/tinker", - "version": "v1.0.10", + "version": "v1.0.9", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7" + "reference": "eb0075527fdeeb1cc1d68bd4ca7d50256b30a827" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/ad571aacbac1539c30d480908f9d0c9614eaf1a7", - "reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7", + "url": "https://api.github.com/repos/laravel/tinker/zipball/eb0075527fdeeb1cc1d68bd4ca7d50256b30a827", + "reference": "eb0075527fdeeb1cc1d68bd4ca7d50256b30a827", "shasum": "" }, "require": { @@ -2257,39 +2159,39 @@ "laravel", "psysh" ], - "time": "2019-08-07T15:10:45+00:00" + "time": "2019-07-29T18:09:25+00:00" }, { "name": "laravelcollective/html", - "version": "v6.1.2", + "version": "v5.8.0", "source": { "type": "git", "url": "https://github.com/LaravelCollective/html.git", - "reference": "5ef9a3c9ae2423fe5618996f3cde375d461a3fc6" + "reference": "0e360143d3476fe4141d267a260c140569fa207b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/LaravelCollective/html/zipball/5ef9a3c9ae2423fe5618996f3cde375d461a3fc6", - "reference": "5ef9a3c9ae2423fe5618996f3cde375d461a3fc6", + "url": "https://api.github.com/repos/LaravelCollective/html/zipball/0e360143d3476fe4141d267a260c140569fa207b", + "reference": "0e360143d3476fe4141d267a260c140569fa207b", "shasum": "" }, "require": { - "illuminate/http": "^6.0|^7.0", - "illuminate/routing": "^6.0|^7.0", - "illuminate/session": "^6.0|^7.0", - "illuminate/support": "^6.0|^7.0", - "illuminate/view": "^6.0|^7.0", - "php": ">=7.2.5" + "illuminate/http": "5.8.*", + "illuminate/routing": "5.8.*", + "illuminate/session": "5.8.*", + "illuminate/support": "5.8.*", + "illuminate/view": "5.8.*", + "php": ">=7.1.3" }, "require-dev": { - "illuminate/database": "^6.0|^7.0", + "illuminate/database": "5.8.*", "mockery/mockery": "~1.0", "phpunit/phpunit": "~7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.0-dev" + "dev-master": "5.8-dev" }, "laravel": { "providers": [ @@ -2314,48 +2216,48 @@ "MIT" ], "authors": [ - { - "name": "Adam Engebretson", - "email": "adam@laravelcollective.com" - }, { "name": "Taylor Otwell", "email": "taylorotwell@gmail.com" + }, + { + "name": "Adam Engebretson", + "email": "adam@laravelcollective.com" } ], "description": "HTML and Form Builders for the Laravel Framework", "homepage": "https://laravelcollective.com", - "time": "2020-05-19T18:02:16+00:00" + "time": "2019-03-01T22:53:41+00:00" }, { "name": "laravolt/avatar", - "version": "3.2.1", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/laravolt/avatar.git", - "reference": "4650dd596e1fe3aa1909e30ee4fe5bf2b6766246" + "reference": "58470dbbac0704772d87e775ac60dcd1580f022a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravolt/avatar/zipball/4650dd596e1fe3aa1909e30ee4fe5bf2b6766246", - "reference": "4650dd596e1fe3aa1909e30ee4fe5bf2b6766246", + "url": "https://api.github.com/repos/laravolt/avatar/zipball/58470dbbac0704772d87e775ac60dcd1580f022a", + "reference": "58470dbbac0704772d87e775ac60dcd1580f022a", "shasum": "" }, "require": { - "illuminate/cache": "~5.6 | 6.* | 7.*", - "illuminate/support": "~5.6 | 6.* | 7.*", - "intervention/image": "^2.5", - "php": ">=7.1.3" + "danielstjules/stringy": "~3.1", + "illuminate/cache": "~5.2", + "illuminate/support": "~5.2", + "intervention/image": "^2.1", + "php": ">=7.0" }, "require-dev": { - "mockery/mockery": "~1.3", - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "~7.0" + "mockery/mockery": "^0.9.1", + "phpunit/phpunit": "~6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "2.0-dev" }, "laravel": { "providers": [ @@ -2379,7 +2281,7 @@ { "name": "Bayu Hendra Winata", "email": "uyab.exe@gmail.com", - "homepage": "https://laravolt.dev", + "homepage": "http://id-laravel.com", "role": "Developer" } ], @@ -2391,128 +2293,32 @@ "laravel", "laravolt" ], - "time": "2020-05-03T03:32:24+00:00" - }, - { - "name": "league/commonmark", - "version": "1.5.3", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/commonmark.git", - "reference": "2574454b97e4103dc4e36917bd783b25624aefcd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/2574454b97e4103dc4e36917bd783b25624aefcd", - "reference": "2574454b97e4103dc4e36917bd783b25624aefcd", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": "^7.1 || ^8.0" - }, - "conflict": { - "scrutinizer/ocular": "1.7.*" - }, - "require-dev": { - "cebe/markdown": "~1.0", - "commonmark/commonmark.js": "0.29.1", - "erusev/parsedown": "~1.0", - "ext-json": "*", - "github/gfm": "0.29.0", - "michelf/php-markdown": "~1.4", - "mikehaertl/php-shellcommand": "^1.4", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", - "scrutinizer/ocular": "^1.5", - "symfony/finder": "^4.2" - }, - "bin": [ - "bin/commonmark" - ], - "type": "library", - "autoload": { - "psr-4": { - "League\\CommonMark\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Colin O'Dell", - "email": "colinodell@gmail.com", - "homepage": "https://www.colinodell.com", - "role": "Lead Developer" - } - ], - "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)", - "homepage": "https://commonmark.thephpleague.com", - "keywords": [ - "commonmark", - "flavored", - "gfm", - "github", - "github-flavored", - "markdown", - "md", - "parser" - ], - "funding": [ - { - "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark", - "type": "custom" - }, - { - "url": "https://www.colinodell.com/sponsor", - "type": "custom" - }, - { - "url": "https://www.paypal.me/colinpodell/10.00", - "type": "custom" - }, - { - "url": "https://github.com/colinodell", - "type": "github" - }, - { - "url": "https://www.patreon.com/colinodell", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/commonmark", - "type": "tidelift" - } - ], - "time": "2020-07-19T22:47:30+00:00" + "time": "2019-05-24T23:46:54+00:00" }, { "name": "league/flysystem", - "version": "1.1.0", + "version": "1.0.53", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "481c0174b9c99b189959e2bb9d6f52188ed1f692" + "reference": "08e12b7628f035600634a5e76d95b5eb66cea674" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/481c0174b9c99b189959e2bb9d6f52188ed1f692", - "reference": "481c0174b9c99b189959e2bb9d6f52188ed1f692", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/08e12b7628f035600634a5e76d95b5eb66cea674", + "reference": "08e12b7628f035600634a5e76d95b5eb66cea674", "shasum": "" }, "require": { "ext-fileinfo": "*", - "league/mime-type-detection": "^1.3", - "php": "^7.2.5 || ^8.0" + "php": ">=5.5.9" }, "conflict": { "league/flysystem-sftp": "<1.0.6" }, "require-dev": { - "phpspec/prophecy": "^1.11.1", - "phpunit/phpunit": "^8.5.8" + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7.10" }, "suggest": { "ext-fileinfo": "Required for MimeType", @@ -2571,26 +2377,20 @@ "sftp", "storage" ], - "funding": [ - { - "url": "https://offset.earth/frankdejonge", - "type": "other" - } - ], - "time": "2020-08-09T15:57:10+00:00" + "time": "2019-06-18T20:09:29+00:00" }, { "name": "league/flysystem-cached-adapter", - "version": "1.1.0", + "version": "1.0.9", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-cached-adapter.git", - "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff" + "reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/d1925efb2207ac4be3ad0c40b8277175f99ffaff", - "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff", + "url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/08ef74e9be88100807a3b92cc9048a312bf01d6f", + "reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f", "shasum": "" }, "require": { @@ -2624,93 +2424,44 @@ } ], "description": "An adapter decorator to enable meta-data caching.", - "time": "2020-07-25T15:56:04+00:00" - }, - { - "name": "league/mime-type-detection", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "fda190b62b962d96a069fcc414d781db66d65b69" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/fda190b62b962d96a069fcc414d781db66d65b69", - "reference": "fda190b62b962d96a069fcc414d781db66d65b69", - "shasum": "" - }, - "require": { - "ext-fileinfo": "*", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.36", - "phpunit/phpunit": "^8.5.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "League\\MimeTypeDetection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frankdejonge.nl" - } - ], - "description": "Mime-type detection for Flysystem", - "funding": [ - { - "url": "https://github.com/frankdejonge", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/flysystem", - "type": "tidelift" - } - ], - "time": "2020-08-09T10:34:01+00:00" + "time": "2018-07-09T20:51:04+00:00" }, { "name": "m4tthumphrey/php-gitlab-api", - "version": "9.18.1", + "version": "9.13.0", "source": { "type": "git", - "url": "https://github.com/GitLabPHP/Client.git", - "reference": "b23f4ad6759ef806b3cac61354bba4108a3818df" + "url": "https://github.com/m4tthumphrey/php-gitlab-api.git", + "reference": "35c1719c9b0a87a14c76ebe7c540d7d07cdfff9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GitLabPHP/Client/zipball/b23f4ad6759ef806b3cac61354bba4108a3818df", - "reference": "b23f4ad6759ef806b3cac61354bba4108a3818df", + "url": "https://api.github.com/repos/m4tthumphrey/php-gitlab-api/zipball/35c1719c9b0a87a14c76ebe7c540d7d07cdfff9e", + "reference": "35c1719c9b0a87a14c76ebe7c540d7d07cdfff9e", "shasum": "" }, "require": { - "ext-json": "*", "ext-xml": "*", "php": "^5.6 || ^7.0", - "php-http/cache-plugin": "^1.4", - "php-http/client-common": "^1.6 || ^2.0", + "php-http/client-common": "^1.6", "php-http/client-implementation": "^1.0", "php-http/discovery": "^1.2", - "php-http/httplug": "^1.1 || ^2.0", + "php-http/httplug": "^1.1", "php-http/multipart-stream-builder": "^1.0", - "psr/cache": "^1.0", - "psr/http-message": "^1.0", - "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0 || ^5.0" + "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", "guzzlehttp/psr7": "^1.2", - "php-http/guzzle6-adapter": "^1.0 || ^2.0" + "php-http/guzzle6-adapter": "^1.0", + "php-http/mock-client": "^1.0", + "phpunit/phpunit": "^5.7.27 || ^6.5" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.12.x-dev" + } + }, "autoload": { "psr-4": { "Gitlab\\": "lib/Gitlab/" @@ -2722,61 +2473,49 @@ ], "authors": [ { - "name": "Fabien Bourigault", - "email": "bourigaultfabien@gmail.com" + "name": "Thibault Duplessis", + "email": "thibault.duplessis@gmail.com", + "homepage": "http://ornicar.github.com" }, { - "name": "Graham Campbell", - "email": "graham@alt-three.com" + "name": "KnpLabs Team", + "homepage": "http://knplabs.com" }, { "name": "Matt Humphrey", - "email": "matth@windsor-telecom.co.uk" - }, - { - "name": "Miguel Piedrafita", - "email": "github@miguelpiedrafita.com" + "homepage": "http://m4tt.io" } ], - "description": "GitLab API v4 client for PHP", + "description": "GitLab API client", + "homepage": "https://github.com/m4tthumphrey/php-gitlab-api", "keywords": [ "api", "gitlab" ], - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/m1guelpf", - "type": "github" - } - ], - "time": "2020-07-22T10:12:50+00:00" + "time": "2019-04-15T07:38:13+00:00" }, { "name": "mnapoli/front-yaml", - "version": "1.7.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/mnapoli/FrontYAML.git", - "reference": "7602e0ffe84ca07b68865960d255d3ae9502e5d4" + "reference": "24070ace8b741247bb3161cbb38ecc541268b296" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mnapoli/FrontYAML/zipball/7602e0ffe84ca07b68865960d255d3ae9502e5d4", - "reference": "7602e0ffe84ca07b68865960d255d3ae9502e5d4", + "url": "https://api.github.com/repos/mnapoli/FrontYAML/zipball/24070ace8b741247bb3161cbb38ecc541268b296", + "reference": "24070ace8b741247bb3161cbb38ecc541268b296", "shasum": "" }, "require": { "erusev/parsedown": "~1.0", - "php": "^7.2", - "symfony/yaml": "~2.1|^3.0|^4.0|^5.0" + "php": ">=5.4.0", + "symfony/yaml": "~2.1|^3.0|^4.0" }, "require-dev": { - "league/commonmark": "~1.4", - "phpunit/phpunit": "~8.5" + "league/commonmark": "~0.7", + "phpunit/phpunit": "~4.5" }, "type": "library", "autoload": { @@ -2788,27 +2527,27 @@ "license": [ "MIT" ], - "time": "2020-05-21T08:30:56+00:00" + "time": "2017-10-29T19:29:55+00:00" }, { "name": "mnapoli/silly", - "version": "1.7.2", + "version": "1.7.1", "source": { "type": "git", "url": "https://github.com/mnapoli/silly.git", - "reference": "66807f87abd2ab8e5708754d70b4b601f5614c32" + "reference": "5f7f34f4db75685e6fe7d652c12d9a7b6e8034d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mnapoli/silly/zipball/66807f87abd2ab8e5708754d70b4b601f5614c32", - "reference": "66807f87abd2ab8e5708754d70b4b601f5614c32", + "url": "https://api.github.com/repos/mnapoli/silly/zipball/5f7f34f4db75685e6fe7d652c12d9a7b6e8034d6", + "reference": "5f7f34f4db75685e6fe7d652c12d9a7b6e8034d6", "shasum": "" }, "require": { "php": ">=7.0", "php-di/invoker": "~2.0", "psr/container": "^1.0", - "symfony/console": "~3.0|~4.0|~5.0" + "symfony/console": "~3.0|~4.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.12", @@ -2834,25 +2573,25 @@ "micro-framework", "silly" ], - "time": "2019-11-26T20:07:27+00:00" + "time": "2018-12-26T21:17:30+00:00" }, { "name": "monolog/monolog", - "version": "2.1.1", + "version": "1.24.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5" + "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f9eee5cec93dfb313a38b6b288741e84e53f02d5", - "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", "shasum": "" }, "require": { - "php": ">=7.2", - "psr/log": "^1.0.1" + "php": ">=5.3.0", + "psr/log": "~1.0" }, "provide": { "psr/log-implementation": "1.0.0" @@ -2860,36 +2599,33 @@ "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^6.0", - "graylog2/gelf-php": "^1.4.2", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", - "php-parallel-lint/php-parallel-lint": "^1.0", - "phpspec/prophecy": "^1.6.1", - "phpunit/phpunit": "^8.5", - "predis/predis": "^1.1", - "rollbar/rollbar": "^1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", "swiftmailer/swiftmailer": "^5.3|^6.0" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-mongo": "Allow sending log messages to a MongoDB server", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", "php-console/php-console": "Allow sending log messages to Google Chrome", "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -2915,34 +2651,24 @@ "logging", "psr-3" ], - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2020-07-23T08:41:23+00:00" + "time": "2018-11-05T09:00:11+00:00" }, { "name": "mpociot/documentarian", - "version": "0.4.0", + "version": "0.2.1", "source": { "type": "git", "url": "https://github.com/mpociot/documentarian.git", - "reference": "c7dc266b6646a49f82b304a3451e41161cc4b1c3" + "reference": "477f67a975f4ee6a496455938b5558d9f2a3cceb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mpociot/documentarian/zipball/c7dc266b6646a49f82b304a3451e41161cc4b1c3", - "reference": "c7dc266b6646a49f82b304a3451e41161cc4b1c3", + "url": "https://api.github.com/repos/mpociot/documentarian/zipball/477f67a975f4ee6a496455938b5558d9f2a3cceb", + "reference": "477f67a975f4ee6a496455938b5558d9f2a3cceb", "shasum": "" }, "require": { - "illuminate/view": "5.*|^6.0|^7.0", + "illuminate/view": "5.*", "mnapoli/front-yaml": "^1.5", "mnapoli/silly": "~1.0", "php": ">=5.5.9", @@ -2973,7 +2699,7 @@ "email": "m.pociot@gmail.com" } ], - "time": "2020-03-06T07:31:21+00:00" + "time": "2016-08-26T21:14:19+00:00" }, { "name": "mpociot/laravel-apidoc-generator", @@ -2981,38 +2707,35 @@ "source": { "type": "git", "url": "https://github.com/mpociot/laravel-apidoc-generator.git", - "reference": "8be084e39e4373197aa734e6ef6da7deed3655af" + "reference": "c4422ce679f13ca99f4d05c91326c5a684ccd60f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mpociot/laravel-apidoc-generator/zipball/8be084e39e4373197aa734e6ef6da7deed3655af", - "reference": "8be084e39e4373197aa734e6ef6da7deed3655af", + "url": "https://api.github.com/repos/mpociot/laravel-apidoc-generator/zipball/c4422ce679f13ca99f4d05c91326c5a684ccd60f", + "reference": "c4422ce679f13ca99f4d05c91326c5a684ccd60f", "shasum": "" }, "require": { - "ext-json": "*", - "fzaninotto/faker": "^1.8", - "illuminate/console": "^5.7|^6.0|^7.0", - "illuminate/routing": "^5.7|^6.0|^7.0", - "illuminate/support": "^5.7|^6.0|^7.0", + "fzaninotto/faker": "~1.8", + "illuminate/console": "5.5.* || 5.6.* || 5.7.* || 5.8.*", + "illuminate/routing": "5.5.* || 5.6.* || 5.7.* || 5.8.*", + "illuminate/support": "5.5.* || 5.6.* || 5.7.* || 5.8.*", "league/flysystem": "^1.0", - "mpociot/documentarian": "^0.4.0", + "mpociot/documentarian": "^0.2.0", "mpociot/reflection-docblock": "^1.0.1", - "nunomaduro/collision": "^3.0|^4.0", - "php": ">=7.2.0", - "ramsey/uuid": "^3.8|^4.0", - "symfony/var-exporter": "^4.0|^5.0" + "php": ">=7.0.0", + "ramsey/uuid": "^3.8" }, "require-dev": { - "dms/phpunit-arraysubset-asserts": "^0.1.0", - "laravel/lumen-framework": "^5.7|^6.0|^7.0", - "league/fractal": "^0.19.0", - "orchestra/testbench": "^3.7|^4.0|^5.0", - "phpstan/phpstan": "^0.11.15", - "phpunit/phpunit": "^8.0" + "dingo/api": "2.0.0-alpha1", + "league/fractal": "^0.17.0", + "mockery/mockery": "^1.2.0", + "orchestra/testbench": "3.5.* || 3.6.* || 3.7.*", + "phpunit/phpunit": "^6.0.0 || ^7.4.0" }, "suggest": { - "league/fractal": "Required for transformers support" + "league/fractal": "Required for transformers support", + "nunomaduro/collision": "For better reporting of errors that are thrpwn when generating docs" }, "type": "library", "extra": { @@ -3020,9 +2743,6 @@ "providers": [ "Mpociot\\ApiDoc\\ApiDocGeneratorServiceProvider" ] - }, - "branch-alias": { - "dev-v4": "4.x-dev" } }, "autoload": { @@ -3047,7 +2767,7 @@ "documentation", "laravel" ], - "time": "2020-06-03T19:03:37+00:00" + "time": "2019-07-29T10:05:15+00:00" }, { "name": "mpociot/reflection-docblock", @@ -3100,31 +2820,28 @@ }, { "name": "nesbot/carbon", - "version": "2.38.0", + "version": "2.22.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "d8f6a6a91d1eb9304527b040500f61923e97674b" + "reference": "1a0e48b5f656065ba3c265b058b25d36c2162a5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d8f6a6a91d1eb9304527b040500f61923e97674b", - "reference": "d8f6a6a91d1eb9304527b040500f61923e97674b", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/1a0e48b5f656065ba3c265b058b25d36c2162a5e", + "reference": "1a0e48b5f656065ba3c265b058b25d36c2162a5e", "shasum": "" }, "require": { "ext-json": "*", "php": "^7.1.8 || ^8.0", - "symfony/polyfill-mbstring": "^1.0", - "symfony/translation": "^3.4 || ^4.0 || ^5.0" + "symfony/translation": "^3.4 || ^4.0" }, "require-dev": { - "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", - "kylekatarnls/multi-tester": "^2.0", - "phpmd/phpmd": "^2.8", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.35", + "kylekatarnls/multi-tester": "^1.1", + "phpmd/phpmd": "dev-php-7.1-compatibility", + "phpstan/phpstan": "^0.11", "phpunit/phpunit": "^7.5 || ^8.0", "squizlabs/php_codesniffer": "^3.4" }, @@ -3133,19 +2850,10 @@ ], "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.x-dev", - "dev-3.x": "3.x-dev" - }, "laravel": { "providers": [ "Carbon\\Laravel\\ServiceProvider" ] - }, - "phpstan": { - "includes": [ - "extension.neon" - ] } }, "autoload": { @@ -3168,37 +2876,27 @@ "homepage": "http://github.com/kylekatarnls" } ], - "description": "An API extension for DateTime that supports 281 different languages.", + "description": "A simple API extension for DateTime.", "homepage": "http://carbon.nesbot.com", "keywords": [ "date", "datetime", "time" ], - "funding": [ - { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", - "type": "tidelift" - } - ], - "time": "2020-08-04T19:12:46+00:00" + "time": "2019-07-28T09:02:12+00:00" }, { "name": "nikic/php-parser", - "version": "v4.8.0", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "8c58eb4cd4f3883f82611abeac2efbc3dbed787e" + "reference": "1bd73cc04c3843ad8d6b0bfc0956026a151fc420" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8c58eb4cd4f3883f82611abeac2efbc3dbed787e", - "reference": "8c58eb4cd4f3883f82611abeac2efbc3dbed787e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bd73cc04c3843ad8d6b0bfc0956026a151fc420", + "reference": "1bd73cc04c3843ad8d6b0bfc0956026a151fc420", "shasum": "" }, "require": { @@ -3206,8 +2904,7 @@ "php": ">=7.0" }, "require-dev": { - "ircmaxell/php-yacc": "^0.0.6", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^6.5 || ^7.0" }, "bin": [ "bin/php-parse" @@ -3215,93 +2912,29 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "time": "2020-08-09T10:23:20+00:00" - }, - { - "name": "nunomaduro/collision", - "version": "v3.0.1", - "source": { - "type": "git", - "url": "https://github.com/nunomaduro/collision.git", - "reference": "af42d339fe2742295a54f6fdd42aaa6f8c4aca68" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/af42d339fe2742295a54f6fdd42aaa6f8c4aca68", - "reference": "af42d339fe2742295a54f6fdd42aaa6f8c4aca68", - "shasum": "" - }, - "require": { - "filp/whoops": "^2.1.4", - "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", - "php": "^7.1", - "symfony/console": "~2.8|~3.3|~4.0" - }, - "require-dev": { - "laravel/framework": "5.8.*", - "nunomaduro/larastan": "^0.3.0", - "phpstan/phpstan": "^0.11", - "phpunit/phpunit": "~8.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" - ] + "dev-master": "4.2-dev" } }, "autoload": { "psr-4": { - "NunoMaduro\\Collision\\": "src/" + "PhpParser\\": "lib/PhpParser" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" + "name": "Nikita Popov" } ], - "description": "Cli error handling for console/command-line PHP applications.", + "description": "A PHP parser written in PHP", "keywords": [ - "artisan", - "cli", - "command-line", - "console", - "error", - "handling", - "laravel", - "laravel-zero", - "php", - "symfony" + "parser", + "php" ], - "time": "2019-03-07T21:35:13+00:00" + "time": "2019-05-25T20:07:01+00:00" }, { "name": "olendorf/ezid-php", @@ -3354,26 +2987,27 @@ }, { "name": "ongr/elasticsearch-dsl", - "version": "v7.2.0", + "version": "v6.0.3", "source": { "type": "git", "url": "https://github.com/ongr-io/ElasticsearchDSL.git", - "reference": "b7653ed32d6d5b65aeef3b7ef4f46e7ac069c393" + "reference": "56e59e51cf066f5ee4dff2612b3831b5a7792e67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ongr-io/ElasticsearchDSL/zipball/b7653ed32d6d5b65aeef3b7ef4f46e7ac069c393", - "reference": "b7653ed32d6d5b65aeef3b7ef4f46e7ac069c393", + "url": "https://api.github.com/repos/ongr-io/ElasticsearchDSL/zipball/56e59e51cf066f5ee4dff2612b3831b5a7792e67", + "reference": "56e59e51cf066f5ee4dff2612b3831b5a7792e67", "shasum": "" }, "require": { - "elasticsearch/elasticsearch": "^7.0", "paragonie/random_compat": "*", - "php": "^7.2", - "symfony/serializer": "^5.0" + "php": "^7.0", + "symfony/serializer": "^3.0|^4.0" }, "require-dev": { - "phpunit/phpunit": "^7.0", + "elasticsearch/elasticsearch": "^6.0", + "php-coveralls/php-coveralls": "~2.0", + "phpunit/phpunit": "^6.0", "squizlabs/php_codesniffer": "^3.0" }, "suggest": { @@ -3382,7 +3016,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.1-dev" + "dev-master": "6.0-dev" } }, "autoload": { @@ -3402,20 +3036,20 @@ ], "description": "Elasticsearch DSL library", "homepage": "http://ongr.io", - "time": "2020-02-20T20:35:10+00:00" + "time": "2019-01-24T21:34:23+00:00" }, { "name": "opis/closure", - "version": "3.5.6", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "e8d34df855b0a0549a300cb8cb4db472556e8aa9" + "reference": "92927e26d7fc3f271efe1f55bdbb073fbb2f0722" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/e8d34df855b0a0549a300cb8cb4db472556e8aa9", - "reference": "e8d34df855b0a0549a300cb8cb4db472556e8aa9", + "url": "https://api.github.com/repos/opis/closure/zipball/92927e26d7fc3f271efe1f55bdbb073fbb2f0722", + "reference": "92927e26d7fc3f271efe1f55bdbb073fbb2f0722", "shasum": "" }, "require": { @@ -3428,7 +3062,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.5.x-dev" + "dev-master": "3.3.x-dev" } }, "autoload": { @@ -3463,7 +3097,7 @@ "serialization", "serialize" ], - "time": "2020-08-11T08:46:50+00:00" + "time": "2019-07-09T21:58:11+00:00" }, { "name": "paragonie/random_compat", @@ -3512,25 +3146,24 @@ }, { "name": "php-di/invoker", - "version": "2.1.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/PHP-DI/Invoker.git", - "reference": "6a6f8f276d2680e77d06294b9fd67b4881b1f82d" + "reference": "540c27c86f663e20fe39a24cd72fa76cdb21d41a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/6a6f8f276d2680e77d06294b9fd67b4881b1f82d", - "reference": "6a6f8f276d2680e77d06294b9fd67b4881b1f82d", + "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/540c27c86f663e20fe39a24cd72fa76cdb21d41a", + "reference": "540c27c86f663e20fe39a24cd72fa76cdb21d41a", "shasum": "" }, "require": { - "php": ">=7.3", "psr/container": "~1.0" }, "require-dev": { "athletic/athletic": "~0.1.8", - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "~4.5" }, "type": "library", "autoload": { @@ -3552,31 +3185,32 @@ "invoke", "invoker" ], - "time": "2020-08-01T15:36:25+00:00" + "time": "2017-03-20T19:28:22+00:00" }, { "name": "php-http/cache-plugin", - "version": "1.7.1", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/php-http/cache-plugin.git", - "reference": "a1cb3e2a4f095f820e0a0e078f3dfd2d9c83a0f7" + "reference": "8e2505d2090316fac7cce637b39b6bbb5249c5a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/cache-plugin/zipball/a1cb3e2a4f095f820e0a0e078f3dfd2d9c83a0f7", - "reference": "a1cb3e2a4f095f820e0a0e078f3dfd2d9c83a0f7", + "url": "https://api.github.com/repos/php-http/cache-plugin/zipball/8e2505d2090316fac7cce637b39b6bbb5249c5a8", + "reference": "8e2505d2090316fac7cce637b39b6bbb5249c5a8", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", + "php": "^5.4 || ^7.0", "php-http/client-common": "^1.9 || ^2.0", "php-http/message-factory": "^1.0", "psr/cache": "^1.0", - "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0 || ^5.0" + "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^5.1 || ^6.0" + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.5" }, "type": "library", "extra": { @@ -3607,20 +3241,20 @@ "httplug", "plugin" ], - "time": "2020-07-13T10:55:38+00:00" + "time": "2019-01-23T16:51:58+00:00" }, { "name": "php-http/client-common", - "version": "1.10.0", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/php-http/client-common.git", - "reference": "c0390ae3c8f2ae9d50901feef0127fb9e396f6b4" + "reference": "0e156a12cc3e46f590c73bf57592a2252fc3dc48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/client-common/zipball/c0390ae3c8f2ae9d50901feef0127fb9e396f6b4", - "reference": "c0390ae3c8f2ae9d50901feef0127fb9e396f6b4", + "url": "https://api.github.com/repos/php-http/client-common/zipball/0e156a12cc3e46f590c73bf57592a2252fc3dc48", + "reference": "0e156a12cc3e46f590c73bf57592a2252fc3dc48", "shasum": "" }, "require": { @@ -3628,7 +3262,7 @@ "php-http/httplug": "^1.1", "php-http/message": "^1.6", "php-http/message-factory": "^1.0", - "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0 || ^5.0" + "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0" }, "require-dev": { "guzzlehttp/psr7": "^1.4", @@ -3642,7 +3276,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10.x-dev" + "dev-master": "1.9.x-dev" } }, "autoload": { @@ -3668,33 +3302,33 @@ "http", "httplug" ], - "time": "2019-11-18T08:54:36+00:00" + "time": "2019-02-02T07:03:15+00:00" }, { "name": "php-http/discovery", - "version": "1.9.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "64a18cc891957e05d91910b3c717d6bd11fbede9" + "reference": "e822f86a6983790aa17ab13aa7e69631e86806b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/64a18cc891957e05d91910b3c717d6bd11fbede9", - "reference": "64a18cc891957e05d91910b3c717d6bd11fbede9", + "url": "https://api.github.com/repos/php-http/discovery/zipball/e822f86a6983790aa17ab13aa7e69631e86806b6", + "reference": "e822f86a6983790aa17ab13aa7e69631e86806b6", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.1" }, "conflict": { "nyholm/psr7": "<1.0" }, "require-dev": { - "graham-campbell/phpspec-skip-example-extension": "^5.0", + "akeneo/phpspec-skip-example-extension": "^4.0", "php-http/httplug": "^1.0 || ^2.0", "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^5.1 || ^6.1", + "phpspec/phpspec": "^5.1", "puli/composer-plugin": "1.0.0-beta10" }, "suggest": { @@ -3704,7 +3338,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -3733,7 +3367,7 @@ "message", "psr7" ], - "time": "2020-07-13T15:44:45+00:00" + "time": "2019-06-30T09:04:27+00:00" }, { "name": "php-http/guzzle6-adapter", @@ -3853,21 +3487,21 @@ }, { "name": "php-http/message", - "version": "1.8.0", + "version": "1.7.2", "source": { "type": "git", "url": "https://github.com/php-http/message.git", - "reference": "ce8f43ac1e294b54aabf5808515c3554a19c1e1c" + "reference": "b159ffe570dffd335e22ef0b91a946eacb182fa1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/ce8f43ac1e294b54aabf5808515c3554a19c1e1c", - "reference": "ce8f43ac1e294b54aabf5808515c3554a19c1e1c", + "url": "https://api.github.com/repos/php-http/message/zipball/b159ffe570dffd335e22ef0b91a946eacb182fa1", + "reference": "b159ffe570dffd335e22ef0b91a946eacb182fa1", "shasum": "" }, "require": { "clue/stream-filter": "^1.4", - "php": "^7.1", + "php": "^5.4 || ^7.0", "php-http/message-factory": "^1.0.2", "psr/http-message": "^1.0" }, @@ -3893,7 +3527,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -3921,7 +3555,7 @@ "message", "psr-7" ], - "time": "2019-08-05T06:55:08+00:00" + "time": "2018-11-01T09:32:41+00:00" }, { "name": "php-http/message-factory", @@ -3975,34 +3609,33 @@ }, { "name": "php-http/multipart-stream-builder", - "version": "1.1.2", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/php-http/multipart-stream-builder.git", - "reference": "121299c2aad475a19087bc6298a1c9aa4d5c1ecc" + "reference": "1fa3c623fc813a43b39494b2a1612174e36e0fb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/multipart-stream-builder/zipball/121299c2aad475a19087bc6298a1c9aa4d5c1ecc", - "reference": "121299c2aad475a19087bc6298a1c9aa4d5c1ecc", + "url": "https://api.github.com/repos/php-http/multipart-stream-builder/zipball/1fa3c623fc813a43b39494b2a1612174e36e0fb0", + "reference": "1fa3c623fc813a43b39494b2a1612174e36e0fb0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", - "php-http/discovery": "^1.7", + "php": "^5.5 || ^7.0", + "php-http/discovery": "^1.0", "php-http/message-factory": "^1.0.2", - "psr/http-factory": "^1.0", "psr/http-message": "^1.0" }, "require-dev": { - "nyholm/psr7": "^1.0", "php-http/message": "^1.5", - "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3" + "phpunit/phpunit": "^4.8 || ^5.4", + "zendframework/zend-diactoros": "^1.3.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "0.3-dev" } }, "autoload": { @@ -4029,28 +3662,25 @@ "multipart stream", "stream" ], - "time": "2020-07-13T15:48:43+00:00" + "time": "2017-05-21T17:45:25+00:00" }, { "name": "php-http/promise", - "version": "1.1.0", + "version": "v1.0.0", "source": { "type": "git", "url": "https://github.com/php-http/promise.git", - "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88" + "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/promise/zipball/4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", - "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", + "url": "https://api.github.com/repos/php-http/promise/zipball/dc494cdc9d7160b9a09bd5573272195242ce7980", + "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980", "shasum": "" }, - "require": { - "php": "^7.1 || ^8.0" - }, "require-dev": { - "friends-of-phpspec/phpspec-code-coverage": "^4.3.2", - "phpspec/phpspec": "^5.1.2 || ^6.2" + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4" }, "type": "library", "extra": { @@ -4068,13 +3698,13 @@ "MIT" ], "authors": [ - { - "name": "Joel Wurtz", - "email": "joel.wurtz@gmail.com" - }, { "name": "Márk Sági-Kazár", "email": "mark.sagikazar@gmail.com" + }, + { + "name": "Joel Wurtz", + "email": "joel.wurtz@gmail.com" } ], "description": "Promise used for asynchronous HTTP requests", @@ -4082,52 +3712,47 @@ "keywords": [ "promise" ], - "time": "2020-07-07T09:29:14+00:00" + "time": "2016-01-26T13:27:02+00:00" }, { "name": "phpoption/phpoption", - "version": "1.7.5", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525" + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525", - "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0" + "php": ">=5.3.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "4.7.*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.3-dev" } }, "autoload": { - "psr-4": { - "PhpOption\\": "src/PhpOption/" + "psr-0": { + "PhpOption\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "Apache2" ], "authors": [ { "name": "Johannes M. Schmitt", "email": "schmittjoh@gmail.com" - }, - { - "name": "Graham Campbell", - "email": "graham@alt-three.com" } ], "description": "Option Type for PHP", @@ -4137,29 +3762,19 @@ "php", "type" ], - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", - "type": "tidelift" - } - ], - "time": "2020-07-20T17:29:33+00:00" + "time": "2015-07-25T16:39:46+00:00" }, { "name": "predis/predis", "version": "v1.1.1", "source": { "type": "git", - "url": "https://github.com/predis/predis.git", + "url": "https://github.com/nrk/predis.git", "reference": "f0210e38881631afeafb56ab43405a92cafd9fd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/predis/predis/zipball/f0210e38881631afeafb56ab43405a92cafd9fd1", + "url": "https://api.github.com/repos/nrk/predis/zipball/f0210e38881631afeafb56ab43405a92cafd9fd1", "reference": "f0210e38881631afeafb56ab43405a92cafd9fd1", "shasum": "" }, @@ -4294,58 +3909,6 @@ ], "time": "2017-02-14T16:28:37+00:00" }, - { - "name": "psr/http-factory", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "time": "2019-04-30T12:38:16+00:00" - }, { "name": "psr/http-message", "version": "1.0.1", @@ -4398,16 +3961,16 @@ }, { "name": "psr/log", - "version": "1.1.3", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "shasum": "" }, "require": { @@ -4416,7 +3979,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -4441,7 +4004,7 @@ "psr", "psr-3" ], - "time": "2020-03-23T09:12:05+00:00" + "time": "2018-11-20T15:27:04+00:00" }, { "name": "psr/simple-cache", @@ -4493,27 +4056,27 @@ }, { "name": "psy/psysh", - "version": "v0.9.12", + "version": "v0.9.9", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "90da7f37568aee36b116a030c5f99c915267edd4" + "reference": "9aaf29575bb8293206bb0420c1e1c87ff2ffa94e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/90da7f37568aee36b116a030c5f99c915267edd4", - "reference": "90da7f37568aee36b116a030c5f99c915267edd4", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/9aaf29575bb8293206bb0420c1e1c87ff2ffa94e", + "reference": "9aaf29575bb8293206bb0420c1e1c87ff2ffa94e", "shasum": "" }, "require": { - "dnoegel/php-xdg-base-dir": "0.1.*", + "dnoegel/php-xdg-base-dir": "0.1", "ext-json": "*", "ext-tokenizer": "*", "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", "php": ">=5.4.0", - "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0|~5.0", - "symfony/var-dumper": "~2.7|~3.0|~4.0|~5.0" + "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0", + "symfony/var-dumper": "~2.7|~3.0|~4.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.2", @@ -4563,7 +4126,7 @@ "interactive", "shell" ], - "time": "2019-12-06T14:19:43+00:00" + "time": "2018-10-13T15:16:03+00:00" }, { "name": "ralouphie/getallheaders", @@ -4607,46 +4170,44 @@ }, { "name": "ramsey/uuid", - "version": "3.9.3", + "version": "3.8.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92" + "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/7e1633a6964b48589b142d60542f9ed31bd37a92", - "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/d09ea80159c1929d75b3f9c60504d613aeb4a1e3", + "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3", "shasum": "" }, "require": { - "ext-json": "*", - "paragonie/random_compat": "^1 | ^2 | 9.99.99", - "php": "^5.4 | ^7 | ^8", + "paragonie/random_compat": "^1.0|^2.0|9.99.99", + "php": "^5.4 || ^7.0", "symfony/polyfill-ctype": "^1.8" }, "replace": { "rhumsaa/uuid": "self.version" }, "require-dev": { - "codeception/aspect-mock": "^1 | ^2", - "doctrine/annotations": "^1.2", - "goaop/framework": "1.0.0-alpha.2 | ^1 | ^2.1", - "jakub-onderka/php-parallel-lint": "^1", - "mockery/mockery": "^0.9.11 | ^1", + "codeception/aspect-mock": "^1.0 | ~2.0.0", + "doctrine/annotations": "~1.2.0", + "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ~2.1.0", + "ircmaxell/random-lib": "^1.1", + "jakub-onderka/php-parallel-lint": "^0.9.0", + "mockery/mockery": "^0.9.9", "moontoast/math": "^1.1", - "paragonie/random-lib": "^2", - "php-mock/php-mock-phpunit": "^0.3 | ^1.1", - "phpunit/phpunit": "^4.8 | ^5.4 | ^6.5", - "squizlabs/php_codesniffer": "^3.5" + "php-mock/php-mock-phpunit": "^0.3|^1.1", + "phpunit/phpunit": "^4.7|^5.0|^6.5", + "squizlabs/php_codesniffer": "^2.3" }, "suggest": { "ext-ctype": "Provides support for PHP Ctype functions", "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", - "ext-openssl": "Provides the OpenSSL extension for use with the OpenSslGenerator", "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", + "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", - "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, @@ -4659,21 +4220,13 @@ "autoload": { "psr-4": { "Ramsey\\Uuid\\": "src/" - }, - "files": [ - "src/functions.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - }, { "name": "Marijn Huizendveld", "email": "marijn.huizendveld@gmail.com" @@ -4681,6 +4234,11 @@ { "name": "Thibaud Fabre", "email": "thibaud@aztech.io" + }, + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" } ], "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", @@ -4690,27 +4248,27 @@ "identifier", "uuid" ], - "time": "2020-02-21T04:36:14+00:00" + "time": "2018-07-19T23:38:55+00:00" }, { "name": "react/promise", - "version": "v2.8.0", + "version": "v2.7.1", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4" + "reference": "31ffa96f8d2ed0341a57848cbb84d88b89dd664d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/f3cff96a19736714524ca0dd1d4130de73dbbbc4", - "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4", + "url": "https://api.github.com/repos/reactphp/promise/zipball/31ffa96f8d2ed0341a57848cbb84d88b89dd664d", + "reference": "31ffa96f8d2ed0341a57848cbb84d88b89dd664d", "shasum": "" }, "require": { "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36" + "phpunit/phpunit": "~4.8" }, "type": "library", "autoload": { @@ -4736,32 +4294,32 @@ "promise", "promises" ], - "time": "2020-05-12T15:16:56+00:00" + "time": "2019-01-07T21:25:54+00:00" }, { "name": "spatie/laravel-permission", - "version": "3.13.0", + "version": "2.37.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-permission.git", - "reference": "49b8063fbb9ec52ebef98cc6ec527a80d8853141" + "reference": "81dbe9d372d70c255b66a2727a235076509f8d45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/49b8063fbb9ec52ebef98cc6ec527a80d8853141", - "reference": "49b8063fbb9ec52ebef98cc6ec527a80d8853141", + "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/81dbe9d372d70c255b66a2727a235076509f8d45", + "reference": "81dbe9d372d70c255b66a2727a235076509f8d45", "shasum": "" }, "require": { - "illuminate/auth": "^5.8|^6.0|^7.0", - "illuminate/container": "^5.8|^6.0|^7.0", - "illuminate/contracts": "^5.8|^6.0|^7.0", - "illuminate/database": "^5.8|^6.0|^7.0", - "php": "^7.2.5" + "illuminate/auth": "~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0", + "illuminate/container": "~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0", + "illuminate/contracts": "~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0", + "illuminate/database": "~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0", + "php": ">=7.0" }, "require-dev": { - "orchestra/testbench": "^3.8|^4.0|^5.0", - "phpunit/phpunit": "^8.0|^9.0", + "orchestra/testbench": "~3.4.2|~3.5.0|~3.6.0|~3.7.0", + "phpunit/phpunit": "^5.7|6.2|^7.0", "predis/predis": "^1.1" }, "type": "library", @@ -4792,217 +4350,55 @@ "role": "Developer" } ], - "description": "Permission handling for Laravel 5.8 and up", + "description": "Permission handling for Laravel 5.4 and up", "homepage": "https://github.com/spatie/laravel-permission", "keywords": [ - "acl", - "laravel", - "permission", - "permissions", - "rbac", - "roles", - "security", - "spatie" - ], - "funding": [ - { - "url": "https://spatie.be/open-source/support-us", - "type": "custom" - } - ], - "time": "2020-05-20T00:31:29+00:00" - }, - { - "name": "swiftmailer/swiftmailer", - "version": "v6.2.3", - "source": { - "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/149cfdf118b169f7840bbe3ef0d4bc795d1780c9", - "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9", - "shasum": "" - }, - "require": { - "egulias/email-validator": "~2.0", - "php": ">=7.0.0", - "symfony/polyfill-iconv": "^1.0", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" - }, - "require-dev": { - "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "^3.4.19|^4.1.8" - }, - "suggest": { - "ext-intl": "Needed to support internationalized email addresses", - "true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, - "autoload": { - "files": [ - "lib/swift_required.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Corbyn" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "https://swiftmailer.symfony.com", - "keywords": [ - "email", - "mail", - "mailer" - ], - "time": "2019-11-12T09:31:26+00:00" - }, - { - "name": "symfony/browser-kit", - "version": "v5.1.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/browser-kit.git", - "reference": "b9545e08790be2d3d7d92306e339bbcd79f461e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/b9545e08790be2d3d7d92306e339bbcd79f461e4", - "reference": "b9545e08790be2d3d7d92306e339bbcd79f461e4", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/dom-crawler": "^4.4|^5.0" - }, - "require-dev": { - "symfony/css-selector": "^4.4|^5.0", - "symfony/http-client": "^4.4|^5.0", - "symfony/mime": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0" - }, - "suggest": { - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\BrowserKit\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony BrowserKit Component", - "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } + "acl", + "laravel", + "permission", + "security", + "spatie" ], - "time": "2020-06-24T13:36:18+00:00" + "time": "2019-04-09T12:45:17+00:00" }, { - "name": "symfony/cache", - "version": "v5.1.3", + "name": "swiftmailer/swiftmailer", + "version": "v6.2.1", "source": { "type": "git", - "url": "https://github.com/symfony/cache.git", - "reference": "a9ac09a5e9786b734a4baa98158c2cd3251f1e4c" + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/a9ac09a5e9786b734a4baa98158c2cd3251f1e4c", - "reference": "a9ac09a5e9786b734a4baa98158c2cd3251f1e4c", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a", + "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/cache": "~1.0", - "psr/log": "~1.0", - "symfony/cache-contracts": "^1.1.7|^2", - "symfony/polyfill-php80": "^1.15", - "symfony/service-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0" - }, - "conflict": { - "doctrine/dbal": "<2.5", - "symfony/dependency-injection": "<4.4", - "symfony/http-kernel": "<4.4", - "symfony/var-dumper": "<4.4" - }, - "provide": { - "psr/cache-implementation": "1.0", - "psr/simple-cache-implementation": "1.0", - "symfony/cache-implementation": "1.0" + "egulias/email-validator": "~2.0", + "php": ">=7.0.0", + "symfony/polyfill-iconv": "^1.0", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" }, "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/cache": "^1.6", - "doctrine/dbal": "^2.5|^3.0", - "predis/predis": "^1.1", - "psr/simple-cache": "^1.0", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/var-dumper": "^4.4|^5.0" + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "^3.4.19|^4.1.8" + }, + "suggest": { + "ext-intl": "Needed to support internationalized email addresses", + "true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-master": "6.2-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\Cache\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "lib/swift_required.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -5011,71 +4407,62 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Chris Corbyn" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], - "description": "Symfony Cache component with PSR-6, PSR-16, and tags", - "homepage": "https://symfony.com", + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "https://swiftmailer.symfony.com", "keywords": [ - "caching", - "psr6" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } + "email", + "mail", + "mailer" ], - "time": "2020-07-23T17:22:30+00:00" + "time": "2019-04-21T09:21:45+00:00" }, { - "name": "symfony/cache-contracts", - "version": "v2.1.3", + "name": "symfony/browser-kit", + "version": "v4.3.3", "source": { "type": "git", - "url": "https://github.com/symfony/cache-contracts.git", - "reference": "9771a09d2e6b84ecb8c9f0a7dbc72ee92aeba009" + "url": "https://github.com/symfony/browser-kit.git", + "reference": "a29dd02a1f3f81b9a15c7730cc3226718ddb55ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/9771a09d2e6b84ecb8c9f0a7dbc72ee92aeba009", - "reference": "9771a09d2e6b84ecb8c9f0a7dbc72ee92aeba009", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/a29dd02a1f3f81b9a15c7730cc3226718ddb55ca", + "reference": "a29dd02a1f3f81b9a15c7730cc3226718ddb55ca", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/cache": "^1.0" + "php": "^7.1.3", + "symfony/dom-crawler": "~3.4|~4.0" + }, + "require-dev": { + "symfony/css-selector": "~3.4|~4.0", + "symfony/http-client": "^4.3", + "symfony/mime": "^4.3", + "symfony/process": "~3.4|~4.0" }, "suggest": { - "symfony/cache-implementation": "" + "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "4.3-dev" } }, "autoload": { "psr-4": { - "Symfony\\Contracts\\Cache\\": "" - } + "Symfony\\Component\\BrowserKit\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -5083,65 +4470,41 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Generic abstractions related to caching", + "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-06T13:23:11+00:00" + "time": "2019-06-11T15:41:59+00:00" }, { "name": "symfony/console", - "version": "v4.4.11", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "55d07021da933dd0d633ffdab6f45d5b230c7e02" + "reference": "8b0ae5742ce9aaa8b0075665862c1ca397d1c1d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/55d07021da933dd0d633ffdab6f45d5b230c7e02", - "reference": "55d07021da933dd0d633ffdab6f45d5b230c7e02", + "url": "https://api.github.com/repos/symfony/console/zipball/8b0ae5742ce9aaa8b0075665862c1ca397d1c1d9", + "reference": "8b0ae5742ce9aaa8b0075665862c1ca397d1c1d9", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": "^7.1.3", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.15", - "symfony/service-contracts": "^1.1|^2" + "symfony/service-contracts": "^1.1" }, "conflict": { "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3|>=5", - "symfony/lock": "<4.4", + "symfony/event-dispatcher": "<4.3", "symfony/process": "<3.3" }, "provide": { @@ -5149,12 +4512,12 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", "symfony/event-dispatcher": "^4.3", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/var-dumper": "^4.3|^5.0" + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0", + "symfony/var-dumper": "^4.3" }, "suggest": { "psr/log": "For using the console logger", @@ -5165,7 +4528,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -5192,43 +4555,29 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-06T13:18:39+00:00" + "time": "2019-07-24T17:13:59+00:00" }, { "name": "symfony/css-selector", - "version": "v5.1.3", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9" + "reference": "105c98bb0c5d8635bea056135304bd8edcc42b4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/e544e24472d4c97b2d11ade7caacd446727c6bf9", - "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/105c98bb0c5d8635bea056135304bd8edcc42b4d", + "reference": "105c98bb0c5d8635bea056135304bd8edcc42b4d", "shasum": "" }, "require": { - "php": ">=7.2.5" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -5259,51 +4608,36 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-20T17:43:50+00:00" + "time": "2019-01-16T21:53:39+00:00" }, { "name": "symfony/debug", - "version": "v4.4.11", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "47aa9064d75db36389692dd4d39895a0820f00f2" + "reference": "527887c3858a2462b0137662c74837288b998ee3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/47aa9064d75db36389692dd4d39895a0820f00f2", - "reference": "47aa9064d75db36389692dd4d39895a0820f00f2", + "url": "https://api.github.com/repos/symfony/debug/zipball/527887c3858a2462b0137662c74837288b998ee3", + "reference": "527887c3858a2462b0137662c74837288b998ee3", "shasum": "" }, "require": { - "php": ">=7.1.3", - "psr/log": "~1.0", - "symfony/polyfill-php80": "^1.15" + "php": "^7.1.3", + "psr/log": "~1.0" }, "conflict": { "symfony/http-kernel": "<3.4" }, "require-dev": { - "symfony/http-kernel": "^3.4|^4.0|^5.0" + "symfony/http-kernel": "~3.4|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -5330,112 +4664,33 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-23T08:31:43+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.1.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5e20b83385a77593259c9f8beb2c43cd03b2ac14", - "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-06-06T08:49:21+00:00" + "time": "2019-07-23T11:21:36+00:00" }, { "name": "symfony/dom-crawler", - "version": "v5.1.3", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "a96aecb36aaf081f1b012e1e62d71f1069ab3dca" + "reference": "291397232a2eefb3347eaab9170409981eaad0e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/a96aecb36aaf081f1b012e1e62d71f1069ab3dca", - "reference": "a96aecb36aaf081f1b012e1e62d71f1069ab3dca", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/291397232a2eefb3347eaab9170409981eaad0e2", + "reference": "291397232a2eefb3347eaab9170409981eaad0e2", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": "^7.1.3", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { "masterminds/html5": "<2.6" }, "require-dev": { "masterminds/html5": "^2.6", - "symfony/css-selector": "^4.4|^5.0" + "symfony/css-selector": "~3.4|~4.0" }, "suggest": { "symfony/css-selector": "" @@ -5443,7 +4698,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -5470,109 +4725,24 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-23T08:36:24+00:00" - }, - { - "name": "symfony/error-handler", - "version": "v4.4.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/error-handler.git", - "reference": "66f151360550ec2b3273b3746febb12e6ba0348b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/66f151360550ec2b3273b3746febb12e6ba0348b", - "reference": "66f151360550ec2b3273b3746febb12e6ba0348b", - "shasum": "" - }, - "require": { - "php": ">=7.1.3", - "psr/log": "~1.0", - "symfony/debug": "^4.4.5", - "symfony/polyfill-php80": "^1.15", - "symfony/var-dumper": "^4.4|^5.0" - }, - "require-dev": { - "symfony/http-kernel": "^4.4|^5.0", - "symfony/serializer": "^4.4|^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\ErrorHandler\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony ErrorHandler Component", - "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-23T08:35:20+00:00" + "time": "2019-06-13T11:03:18+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.11", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "6140fc7047dafc5abbe84ba16a34a86c0b0229b8" + "reference": "212b020949331b6531250584531363844b34a94e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/6140fc7047dafc5abbe84ba16a34a86c0b0229b8", - "reference": "6140fc7047dafc5abbe84ba16a34a86c0b0229b8", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/212b020949331b6531250584531363844b34a94e", + "reference": "212b020949331b6531250584531363844b34a94e", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": "^7.1.3", "symfony/event-dispatcher-contracts": "^1.1" }, "conflict": { @@ -5584,12 +4754,12 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/http-foundation": "^3.4|^4.0|^5.0", - "symfony/service-contracts": "^1.1|^2", - "symfony/stopwatch": "^3.4|^4.0|^5.0" + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/http-foundation": "^3.4|^4.0", + "symfony/service-contracts": "^1.1", + "symfony/stopwatch": "~3.4|~4.0" }, "suggest": { "symfony/dependency-injection": "", @@ -5598,7 +4768,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -5625,38 +4795,24 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-06-18T17:59:13+00:00" + "time": "2019-06-27T06:42:14+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v1.1.9", + "version": "v1.1.5", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7" + "reference": "c61766f4440ca687de1084a5c00b08e167a2575c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/84e23fdcd2517bf37aecbd16967e83f0caee25a7", - "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c61766f4440ca687de1084a5c00b08e167a2575c", + "reference": "c61766f4440ca687de1084a5c00b08e167a2575c", "shasum": "" }, "require": { - "php": ">=7.1.3" + "php": "^7.1.3" }, "suggest": { "psr/event-dispatcher": "", @@ -5666,10 +4822,6 @@ "extra": { "branch-alias": { "dev-master": "1.1-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -5701,43 +4853,29 @@ "interoperability", "standards" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-06T13:19:58+00:00" + "time": "2019-06-20T06:46:26+00:00" }, { "name": "symfony/finder", - "version": "v4.4.11", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "2727aa35fddfada1dd37599948528e9b152eb742" + "reference": "9638d41e3729459860bb96f6247ccb61faaa45f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2727aa35fddfada1dd37599948528e9b152eb742", - "reference": "2727aa35fddfada1dd37599948528e9b152eb742", + "url": "https://api.github.com/repos/symfony/finder/zipball/9638d41e3729459860bb96f6247ccb61faaa45f2", + "reference": "9638d41e3729459860bb96f6247ccb61faaa45f2", "shasum": "" }, "require": { - "php": ">=7.1.3" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -5764,49 +4902,35 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-05T09:39:30+00:00" + "time": "2019-06-28T13:16:30+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.4.11", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "3675676b6a47f3e71d3ab10bcf53fb9239eb77e6" + "reference": "8b778ee0c27731105fbf1535f51793ad1ae0ba2b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3675676b6a47f3e71d3ab10bcf53fb9239eb77e6", - "reference": "3675676b6a47f3e71d3ab10bcf53fb9239eb77e6", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/8b778ee0c27731105fbf1535f51793ad1ae0ba2b", + "reference": "8b778ee0c27731105fbf1535f51793ad1ae0ba2b", "shasum": "" }, "require": { - "php": ">=7.1.3", - "symfony/mime": "^4.3|^5.0", + "php": "^7.1.3", + "symfony/mime": "^4.3", "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { "predis/predis": "~1.0", - "symfony/expression-language": "^3.4|^4.0|^5.0" + "symfony/expression-language": "~3.4|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -5833,52 +4957,37 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-23T09:48:09+00:00" + "time": "2019-07-23T11:21:36+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.4.11", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "a675d2bf04a9328f164910cae6e3918b295151f3" + "reference": "a414548d236ddd8fa3df52367d583e82339c5e95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a675d2bf04a9328f164910cae6e3918b295151f3", - "reference": "a675d2bf04a9328f164910cae6e3918b295151f3", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a414548d236ddd8fa3df52367d583e82339c5e95", + "reference": "a414548d236ddd8fa3df52367d583e82339c5e95", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": "^7.1.3", "psr/log": "~1.0", - "symfony/error-handler": "^4.4", - "symfony/event-dispatcher": "^4.4", - "symfony/http-foundation": "^4.4|^5.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.15" + "symfony/debug": "~3.4|~4.0", + "symfony/event-dispatcher": "^4.3", + "symfony/http-foundation": "^4.1.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php73": "^1.9" }, "conflict": { "symfony/browser-kit": "<4.3", "symfony/config": "<3.4", - "symfony/console": ">=5", "symfony/dependency-injection": "<4.3", "symfony/translation": "<4.2", + "symfony/var-dumper": "<4.1.1", "twig/twig": "<1.34|<2.4,>=2" }, "provide": { @@ -5886,32 +4995,34 @@ }, "require-dev": { "psr/cache": "~1.0", - "symfony/browser-kit": "^4.3|^5.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/console": "^3.4|^4.0", - "symfony/css-selector": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^4.3|^5.0", - "symfony/dom-crawler": "^3.4|^4.0|^5.0", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/finder": "^3.4|^4.0|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/routing": "^3.4|^4.0|^5.0", - "symfony/stopwatch": "^3.4|^4.0|^5.0", - "symfony/templating": "^3.4|^4.0|^5.0", - "symfony/translation": "^4.2|^5.0", - "symfony/translation-contracts": "^1.1|^2", - "twig/twig": "^1.34|^2.4|^3.0" + "symfony/browser-kit": "^4.3", + "symfony/config": "~3.4|~4.0", + "symfony/console": "~3.4|~4.0", + "symfony/css-selector": "~3.4|~4.0", + "symfony/dependency-injection": "^4.3", + "symfony/dom-crawler": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/finder": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0", + "symfony/routing": "~3.4|~4.0", + "symfony/stopwatch": "~3.4|~4.0", + "symfony/templating": "~3.4|~4.0", + "symfony/translation": "~4.2", + "symfony/translation-contracts": "^1.1", + "symfony/var-dumper": "^4.1.1", + "twig/twig": "^1.34|^2.4" }, "suggest": { "symfony/browser-kit": "", "symfony/config": "", "symfony/console": "", - "symfony/dependency-injection": "" + "symfony/dependency-injection": "", + "symfony/var-dumper": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -5938,53 +5049,35 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-24T04:10:09+00:00" + "time": "2019-07-28T07:10:23+00:00" }, { "name": "symfony/mime", - "version": "v5.1.3", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "149fb0ad35aae3c7637b496b38478797fa6a7ea6" + "reference": "6b7148029b1dd5eda1502064f06d01357b7b2d8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/149fb0ad35aae3c7637b496b38478797fa6a7ea6", - "reference": "149fb0ad35aae3c7637b496b38478797fa6a7ea6", + "url": "https://api.github.com/repos/symfony/mime/zipball/6b7148029b1dd5eda1502064f06d01357b7b2d8b", + "reference": "6b7148029b1dd5eda1502064f06d01357b7b2d8b", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": "^7.1.3", "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.15" - }, - "conflict": { - "symfony/mailer": "<4.4" + "symfony/polyfill-mbstring": "^1.0" }, "require-dev": { - "egulias/email-validator": "^2.1.10", - "symfony/dependency-injection": "^4.4|^5.0" + "egulias/email-validator": "^2.0", + "symfony/dependency-injection": "~3.4|^4.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -6015,45 +5108,29 @@ "mime", "mime-type" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-23T10:04:31+00:00" + "time": "2019-07-19T16:21:19+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.1.3", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "9ff59517938f88d90b6e65311fef08faa640f681" + "reference": "40762ead607c8f792ee4516881369ffa553fee6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/9ff59517938f88d90b6e65311fef08faa640f681", - "reference": "9ff59517938f88d90b6e65311fef08faa640f681", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/40762ead607c8f792ee4516881369ffa553fee6f", + "reference": "40762ead607c8f792ee4516881369ffa553fee6f", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-php80": "^1.15" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -6085,34 +5162,20 @@ "configuration", "options" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-12T12:58:00+00:00" + "time": "2019-06-13T11:01:17+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.18.1", + "version": "v1.12.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" + "reference": "550ebaac289296ce228a706d0867afc34687e3f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4", "shasum": "" }, "require": { @@ -6124,11 +5187,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "1.12-dev" } }, "autoload": { @@ -6161,34 +5220,20 @@ "polyfill", "portable" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2019-08-06T08:03:45+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.18.1", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36" + "reference": "f037ea22acfaee983e271dd9c3b8bb4150bd8ad7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36", - "reference": "6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/f037ea22acfaee983e271dd9c3b8bb4150bd8ad7", + "reference": "f037ea22acfaee983e271dd9c3b8bb4150bd8ad7", "shasum": "" }, "require": { @@ -6200,11 +5245,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "1.11-dev" } }, "autoload": { @@ -6238,41 +5279,26 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2019-02-06T07:57:58+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.18.1", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251" + "reference": "c766e95bec706cdd89903b1eda8afab7d7a6b7af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/5dcab1bc7146cf8c1beaa4502a3d9be344334251", - "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c766e95bec706cdd89903b1eda8afab7d7a6b7af", + "reference": "c766e95bec706cdd89903b1eda8afab7d7a6b7af", "shasum": "" }, "require": { "php": ">=5.3.3", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php70": "^1.10", - "symfony/polyfill-php72": "^1.10" + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php72": "^1.9" }, "suggest": { "ext-intl": "For best performance" @@ -6280,11 +5306,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "1.9-dev" } }, "autoload": { @@ -6300,138 +5322,39 @@ "MIT" ], "authors": [ - { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-08-04T06:02:08+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.18.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", - "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Laurent Bassin", + "email": "laurent@bassin.info" } ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "idn", "intl", - "normalizer", "polyfill", "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2019-03-04T13:44:35+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.18.1", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" + "reference": "fe5e94c604826c35a32fa832f35bd036b6799609" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", - "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609", + "reference": "fe5e94c604826c35a32fa832f35bd036b6799609", "shasum": "" }, "require": { @@ -6443,11 +5366,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "1.11-dev" } }, "autoload": { @@ -6481,111 +5400,20 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-14T12:35:20+00:00" - }, - { - "name": "symfony/polyfill-php70", - "version": "v1.18.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", - "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", - "shasum": "" - }, - "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2019-02-06T07:57:58+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.18.1", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "639447d008615574653fb3bc60d1986d7172eaae" + "reference": "ab50dcf166d5f577978419edd37aa2bb8eabce0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", - "reference": "639447d008615574653fb3bc60d1986d7172eaae", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/ab50dcf166d5f577978419edd37aa2bb8eabce0c", + "reference": "ab50dcf166d5f577978419edd37aa2bb8eabce0c", "shasum": "" }, "require": { @@ -6594,11 +5422,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "1.11-dev" } }, "autoload": { @@ -6631,34 +5455,20 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2019-02-06T07:57:58+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.18.1", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" + "reference": "d1fb4abcc0c47be136208ad9d68bf59f1ee17abd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", - "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/d1fb4abcc0c47be136208ad9d68bf59f1ee17abd", + "reference": "d1fb4abcc0c47be136208ad9d68bf59f1ee17abd", "shasum": "" }, "require": { @@ -6667,11 +5477,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "1.11-dev" } }, "autoload": { @@ -6707,123 +5513,29 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-14T12:35:20+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.18.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", - "shasum": "" - }, - "require": { - "php": ">=7.0.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2019-02-06T07:57:58+00:00" }, { "name": "symfony/process", - "version": "v4.4.11", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "65e70bab62f3da7089a8d4591fb23fbacacb3479" + "reference": "856d35814cf287480465bb7a6c413bb7f5f5e69c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/65e70bab62f3da7089a8d4591fb23fbacacb3479", - "reference": "65e70bab62f3da7089a8d4591fb23fbacacb3479", + "url": "https://api.github.com/repos/symfony/process/zipball/856d35814cf287480465bb7a6c413bb7f5f5e69c", + "reference": "856d35814cf287480465bb7a6c413bb7f5f5e69c", "shasum": "" }, "require": { - "php": ">=7.1.3" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -6850,38 +5562,24 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-23T08:31:43+00:00" + "time": "2019-05-30T16:10:05+00:00" }, { "name": "symfony/routing", - "version": "v4.4.11", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "e103381a4c2f0731c14589041852bf979e97c7af" + "reference": "a88c47a5861549f5dc1197660818084c3b67d773" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/e103381a4c2f0731c14589041852bf979e97c7af", - "reference": "e103381a4c2f0731c14589041852bf979e97c7af", + "url": "https://api.github.com/repos/symfony/routing/zipball/a88c47a5861549f5dc1197660818084c3b67d773", + "reference": "a88c47a5861549f5dc1197660818084c3b67d773", "shasum": "" }, "require": { - "php": ">=7.1.3" + "php": "^7.1.3" }, "conflict": { "symfony/config": "<4.2", @@ -6891,11 +5589,11 @@ "require-dev": { "doctrine/annotations": "~1.2", "psr/log": "~1.0", - "symfony/config": "^4.2|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/http-foundation": "^3.4|^4.0|^5.0", - "symfony/yaml": "^3.4|^4.0|^5.0" + "symfony/config": "~4.2", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/http-foundation": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" }, "suggest": { "doctrine/annotations": "For using the annotation loader", @@ -6907,7 +5605,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -6940,69 +5638,52 @@ "uri", "url" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-05T09:39:30+00:00" + "time": "2019-07-23T14:43:56+00:00" }, { "name": "symfony/serializer", - "version": "v5.1.3", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "c977301a898088f483f7a9b479dd050d84ef3fed" + "reference": "702900654e0ceed9ca7a9eccffb1d6ec69d7c8b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/c977301a898088f483f7a9b479dd050d84ef3fed", - "reference": "c977301a898088f483f7a9b479dd050d84ef3fed", + "url": "https://api.github.com/repos/symfony/serializer/zipball/702900654e0ceed9ca7a9eccffb1d6ec69d7c8b6", + "reference": "702900654e0ceed9ca7a9eccffb1d6ec69d7c8b6", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.15" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { "phpdocumentor/type-resolver": "<0.2.1", - "symfony/dependency-injection": "<4.4", - "symfony/property-access": "<4.4", - "symfony/property-info": "<4.4", - "symfony/yaml": "<4.4" + "symfony/dependency-injection": "<3.4", + "symfony/property-access": "<3.4", + "symfony/property-info": "<3.4", + "symfony/yaml": "<3.4" }, "require-dev": { "doctrine/annotations": "~1.0", "doctrine/cache": "~1.0", - "phpdocumentor/reflection-docblock": "^3.2|^4.0", - "symfony/cache": "^4.4|^5.0", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/error-handler": "^4.4|^5.0", - "symfony/http-foundation": "^4.4|^5.0", - "symfony/mime": "^4.4|^5.0", - "symfony/property-access": "^4.4|^5.0", - "symfony/property-info": "^4.4|^5.0", - "symfony/validator": "^4.4|^5.0", - "symfony/yaml": "^4.4|^5.0" + "phpdocumentor/reflection-docblock": "^3.0|^4.0", + "symfony/cache": "~3.4|~4.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/http-foundation": "~3.4|~4.0", + "symfony/property-access": "~3.4|~4.0", + "symfony/property-info": "^3.4.13|~4.0", + "symfony/validator": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" }, "suggest": { "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", "doctrine/cache": "For using the default cached annotation reader and metadata cache.", "psr/cache-implementation": "For using the metadata cache.", "symfony/config": "For using the XML mapping loader.", - "symfony/mime": "For using a MIME type guesser within the DataUriNormalizer.", + "symfony/http-foundation": "For using a MIME type guesser within the DataUriNormalizer.", "symfony/property-access": "For using the ObjectNormalizer.", "symfony/property-info": "To deserialize relations.", "symfony/yaml": "For using the default YAML mapping loader." @@ -7010,7 +5691,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -7037,38 +5718,24 @@ ], "description": "Symfony Serializer Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-23T08:36:24+00:00" + "time": "2019-08-26T08:55:16+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.1.3", + "version": "v1.1.5", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442" + "reference": "f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/58c7475e5457c5492c26cc740cc0ad7464be9442", - "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d", + "reference": "f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": "^7.1.3", "psr/container": "^1.0" }, "suggest": { @@ -7077,11 +5744,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "1.1-dev" } }, "autoload": { @@ -7113,45 +5776,30 @@ "interoperability", "standards" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-06T13:23:11+00:00" + "time": "2019-06-13T11:15:36+00:00" }, { "name": "symfony/translation", - "version": "v4.4.11", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "a8ea9d97353294eb6783f2894ef8cee99a045822" + "reference": "4e3e39cc485304f807622bdc64938e4633396406" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/a8ea9d97353294eb6783f2894ef8cee99a045822", - "reference": "a8ea9d97353294eb6783f2894ef8cee99a045822", + "url": "https://api.github.com/repos/symfony/translation/zipball/4e3e39cc485304f807622bdc64938e4633396406", + "reference": "4e3e39cc485304f807622bdc64938e4633396406", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": "^7.1.3", "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^1.1.6|^2" + "symfony/translation-contracts": "^1.1.2" }, "conflict": { "symfony/config": "<3.4", "symfony/dependency-injection": "<3.4", - "symfony/http-kernel": "<4.4", "symfony/yaml": "<3.4" }, "provide": { @@ -7159,14 +5807,15 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/console": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/finder": "~2.8|~3.0|~4.0|^5.0", - "symfony/http-kernel": "^4.4", - "symfony/intl": "^3.4|^4.0|^5.0", - "symfony/service-contracts": "^1.1.2|^2", - "symfony/yaml": "^3.4|^4.0|^5.0" + "symfony/config": "~3.4|~4.0", + "symfony/console": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/http-kernel": "~3.4|~4.0", + "symfony/intl": "~3.4|~4.0", + "symfony/service-contracts": "^1.1.2", + "symfony/var-dumper": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" }, "suggest": { "psr/log-implementation": "To use logging capability in translator", @@ -7176,7 +5825,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -7203,38 +5852,24 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-23T08:31:43+00:00" + "time": "2019-07-18T10:34:59+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.1.3", + "version": "v1.1.5", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "616a9773c853097607cf9dd6577d5b143ffdcd63" + "reference": "cb4b18ad7b92a26e83b65dde940fab78339e6f3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/616a9773c853097607cf9dd6577d5b143ffdcd63", - "reference": "616a9773c853097607cf9dd6577d5b143ffdcd63", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/cb4b18ad7b92a26e83b65dde940fab78339e6f3c", + "reference": "cb4b18ad7b92a26e83b65dde940fab78339e6f3c", "shasum": "" }, "require": { - "php": ">=7.2.5" + "php": "^7.1.3" }, "suggest": { "symfony/translation-implementation": "" @@ -7242,11 +5877,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "1.1-dev" } }, "autoload": { @@ -7278,41 +5909,26 @@ "interoperability", "standards" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-06T13:23:11+00:00" + "time": "2019-06-13T11:15:36+00:00" }, { "name": "symfony/var-dumper", - "version": "v4.4.11", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc" + "reference": "e4110b992d2cbe198d7d3b244d079c1c58761d07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2125805a1a4e57f2340bc566c3013ca94d2722dc", - "reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e4110b992d2cbe198d7d3b244d079c1c58761d07", + "reference": "e4110b992d2cbe198d7d3b244d079c1c58761d07", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": "^7.1.3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php72": "~1.5" }, "conflict": { "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", @@ -7320,9 +5936,9 @@ }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^3.4|^4.0|^5.0", - "symfony/process": "^4.4|^5.0", - "twig/twig": "^1.34|^2.4|^3.0" + "symfony/console": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0", + "twig/twig": "~1.34|~2.4" }, "suggest": { "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", @@ -7335,7 +5951,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -7369,132 +5985,39 @@ "debug", "dump" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-06-24T13:34:53+00:00" - }, - { - "name": "symfony/var-exporter", - "version": "v5.1.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-exporter.git", - "reference": "eabaabfe1485ca955c5b53307eade15ccda57a15" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/eabaabfe1485ca955c5b53307eade15ccda57a15", - "reference": "eabaabfe1485ca955c5b53307eade15ccda57a15", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15" - }, - "require-dev": { - "symfony/var-dumper": "^4.4.9|^5.0.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\VarExporter\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code", - "homepage": "https://symfony.com", - "keywords": [ - "clone", - "construct", - "export", - "hydrate", - "instantiate", - "serialize" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-06-07T15:42:22+00:00" + "time": "2019-07-27T06:42:46+00:00" }, { "name": "symfony/yaml", - "version": "v5.1.3", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23" + "reference": "34d29c2acd1ad65688f58452fd48a46bd996d5a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ea342353a3ef4f453809acc4ebc55382231d4d23", - "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23", + "url": "https://api.github.com/repos/symfony/yaml/zipball/34d29c2acd1ad65688f58452fd48a46bd996d5a6", + "reference": "34d29c2acd1ad65688f58452fd48a46bd996d5a6", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "php": "^7.1.3", "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/console": "<4.4" + "symfony/console": "<3.4" }, "require-dev": { - "symfony/console": "^4.4|^5.0" + "symfony/console": "~3.4|~4.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" }, - "bin": [ - "Resources/bin/yaml-lint" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -7521,43 +6044,29 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-20T17:43:50+00:00" + "time": "2019-07-24T14:47:54+00:00" }, { "name": "tightenco/collect", - "version": "v7.19.1", + "version": "v5.8.30", "source": { "type": "git", "url": "https://github.com/tightenco/collect.git", - "reference": "e070bf74564f311bb3c97e673e97ea036b38a449" + "reference": "957e430c26c51b65c80acc87896023229dc05a21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tightenco/collect/zipball/e070bf74564f311bb3c97e673e97ea036b38a449", - "reference": "e070bf74564f311bb3c97e673e97ea036b38a449", + "url": "https://api.github.com/repos/tightenco/collect/zipball/957e430c26c51b65c80acc87896023229dc05a21", + "reference": "957e430c26c51b65c80acc87896023229dc05a21", "shasum": "" }, "require": { "php": "^7.1.3", - "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0" + "symfony/var-dumper": ">=3.4 <5" }, "require-dev": { "mockery/mockery": "^1.0", - "nesbot/carbon": "^2.23.0", + "nesbot/carbon": "^1.26.3", "phpunit/phpunit": "^7.0" }, "type": "library", @@ -7585,30 +6094,28 @@ "collection", "laravel" ], - "time": "2020-07-10T22:08:24+00:00" + "time": "2019-07-30T19:16:47+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.3", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5" + "reference": "0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/b43b05cf43c1b6d849478965062b6ef73e223bb5", - "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757", + "reference": "0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-libxml": "*", - "php": "^5.5 || ^7.0 || ^8.0", - "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0" + "php": "^5.5 || ^7.0", + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", "extra": { @@ -7634,40 +6141,34 @@ ], "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", - "time": "2020-07-13T06:12:54+00:00" + "time": "2017-11-27T11:13:29+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v3.6.7", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "2065beda6cbe75e2603686907b2e45f6f3a5ad82" + "reference": "5084b23845c24dbff8ac6c204290c341e4776c92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2065beda6cbe75e2603686907b2e45f6f3a5ad82", - "reference": "2065beda6cbe75e2603686907b2e45f6f3a5ad82", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/5084b23845c24dbff8ac6c204290c341e4776c92", + "reference": "5084b23845c24dbff8ac6c204290c341e4776c92", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0 || ^8.0", - "phpoption/phpoption": "^1.5.2", - "symfony/polyfill-ctype": "^1.17" + "php": "^5.4 || ^7.0", + "phpoption/phpoption": "^1.5", + "symfony/polyfill-ctype": "^1.9" }, "require-dev": { - "ext-filter": "*", - "ext-pcre": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0" - }, - "suggest": { - "ext-filter": "Required to use the boolean validator.", - "ext-pcre": "Required to use most of the library." + "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.6-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -7680,15 +6181,10 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Graham Campbell", - "email": "graham@alt-three.com", - "homepage": "https://gjcampbell.co.uk/" - }, { "name": "Vance Lucas", "email": "vance@vancelucas.com", - "homepage": "https://vancelucas.com/" + "homepage": "http://www.vancelucas.com" } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", @@ -7697,30 +6193,20 @@ "env", "environment" ], - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", - "type": "tidelift" - } - ], - "time": "2020-07-14T19:04:52+00:00" + "time": "2019-06-15T22:40:20+00:00" }, { "name": "windwalker/renderer", - "version": "3.5.21", + "version": "3.5.9", "source": { "type": "git", "url": "https://github.com/ventoviro/windwalker-renderer.git", - "reference": "b157f2832dac02209db032cb61e21b8264ee4499" + "reference": "b5543585e54fab4e2f4d844e910272c2b405ba8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ventoviro/windwalker-renderer/zipball/b157f2832dac02209db032cb61e21b8264ee4499", - "reference": "b157f2832dac02209db032cb61e21b8264ee4499", + "url": "https://api.github.com/repos/ventoviro/windwalker-renderer/zipball/b5543585e54fab4e2f4d844e910272c2b405ba8f", + "reference": "b5543585e54fab4e2f4d844e910272c2b405ba8f", "shasum": "" }, "require": { @@ -7730,228 +6216,115 @@ "require-dev": { "illuminate/view": "5.2.*", "league/plates": "3.*", - "mustache/mustache": "2.*", - "twig/twig": "1.*", - "windwalker/dom": "~3.0", - "windwalker/filesystem": "~3.0", - "windwalker/test": "~3.0" - }, - "suggest": { - "illuminate/view": "Install 5.* if you require Laravel Blade engine.", - "league/plates": "Install 3.* if you require Plates template engine.", - "mustache/mustache": "Install 2.* if you require Mustache engine.", - "twig/twig": "Install 1.* if you require Twig engine." - }, - "type": "windwalker-package", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Windwalker\\Renderer\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.0-or-later" - ], - "description": "Windwalker Renderer package", - "homepage": "https://github.com/ventoviro/windwalker-renderer", - "keywords": [ - "framework", - "renderer", - "windwalker" - ], - "time": "2019-10-26T15:42:26+00:00" - }, - { - "name": "windwalker/structure", - "version": "3.5.21", - "source": { - "type": "git", - "url": "https://github.com/ventoviro/windwalker-structure.git", - "reference": "59466adb846685d60463f9c1403df2832d2fcf90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ventoviro/windwalker-structure/zipball/59466adb846685d60463f9c1403df2832d2fcf90", - "reference": "59466adb846685d60463f9c1403df2832d2fcf90", - "shasum": "" - }, - "require": { - "php": ">=7.1.3" - }, - "require-dev": { - "ext-json": "*", - "laktak/hjson": "^2.1", - "symfony/yaml": "^4.0||^5.0", - "windwalker/test": "~3.0", - "yosymfony/toml": "^1.0" - }, - "suggest": { - "laktak/hjson": "Install ~2.0 if you require HJSON support.", - "symfony/yaml": "Install 3.* if you require YAML support.", - "yosymfony/toml": "Install ~1.0 if you require TOML support." - }, - "type": "windwalker-package", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Windwalker\\Structure\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.0-or-later" - ], - "description": "Windwalker Structure package", - "homepage": "https://github.com/ventoviro/windwalker-structure", - "keywords": [ - "framework", - "structure", - "windwalker" - ], - "time": "2020-07-04T09:50:33+00:00" - } - ], - "packages-dev": [ - { - "name": "adldap2/adldap2", - "version": "v10.3.0", - "source": { - "type": "git", - "url": "https://github.com/Adldap2/Adldap2.git", - "reference": "1294c92746e3fb3bb59cd7756ca7838a1e705a2a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Adldap2/Adldap2/zipball/1294c92746e3fb3bb59cd7756ca7838a1e705a2a", - "reference": "1294c92746e3fb3bb59cd7756ca7838a1e705a2a", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-ldap": "*", - "illuminate/contracts": "~5.0|~6.0|~7.0", - "php": ">=7.0", - "psr/log": "~1.0", - "psr/simple-cache": "~1.0", - "tightenco/collect": "~5.0|~6.0|~7.0" - }, - "require-dev": { - "mockery/mockery": "~1.0", - "phpunit/phpunit": "~6.0" + "mustache/mustache": "2.*", + "twig/twig": "1.*", + "windwalker/dom": "~3.0", + "windwalker/filesystem": "~3.0", + "windwalker/test": "~3.0" }, "suggest": { - "ext-fileinfo": "fileinfo is required when retrieving user encoded thumbnails" + "illuminate/view": "Install 5.* if you require Laravel Blade engine.", + "league/plates": "Install 3.* if you require Plates template engine.", + "mustache/mustache": "Install 2.* if you require Mustache engine.", + "twig/twig": "Install 1.* if you require Twig engine." + }, + "type": "windwalker-package", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } }, - "type": "library", "autoload": { "psr-4": { - "Adldap\\": "src/" + "Windwalker\\Renderer\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" - ], - "authors": [ - { - "name": "Steve Bauman", - "email": "steven_bauman@outlook.com", - "role": "Developer" - } + "LGPL-2.0-or-later" ], - "description": "A PHP LDAP Package for humans.", + "description": "Windwalker Renderer package", + "homepage": "https://github.com/ventoviro/windwalker-renderer", "keywords": [ - "active directory", - "ad", - "adLDAP", - "adldap2", - "directory", - "ldap", - "windows" + "framework", + "renderer", + "windwalker" ], - "time": "2020-05-04T21:10:15+00:00" + "time": "2019-05-29T13:58:28+00:00" }, { - "name": "adldap2/adldap2-laravel", - "version": "v6.1.1", + "name": "windwalker/structure", + "version": "3.5.9", "source": { "type": "git", - "url": "https://github.com/Adldap2/Adldap2-Laravel.git", - "reference": "c72a2e3757919c39d6a03bd345ec4e586284825c" + "url": "https://github.com/ventoviro/windwalker-structure.git", + "reference": "6d3fc1ae456069a717d5a235532a68d1ef51486d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Adldap2/Adldap2-Laravel/zipball/c72a2e3757919c39d6a03bd345ec4e586284825c", - "reference": "c72a2e3757919c39d6a03bd345ec4e586284825c", + "url": "https://api.github.com/repos/ventoviro/windwalker-structure/zipball/6d3fc1ae456069a717d5a235532a68d1ef51486d", + "reference": "6d3fc1ae456069a717d5a235532a68d1ef51486d", "shasum": "" }, "require": { - "adldap2/adldap2": "^10.1", - "illuminate/support": "~5.5|~6.0|~7.0", - "php": ">=7.1" + "php": ">=7.1.3" }, "require-dev": { - "mockery/mockery": "~1.0", - "orchestra/testbench": "~3.7", - "phpunit/phpunit": "~7.0" + "ext-json": "*", + "laktak/hjson": "^2.1", + "symfony/yaml": "3.*", + "windwalker/test": "~3.0", + "yosymfony/toml": "^1.0" }, - "type": "project", + "suggest": { + "laktak/hjson": "Install ~2.0 if you require HJSON support.", + "symfony/yaml": "Install 3.* if you require YAML support.", + "yosymfony/toml": "Install ~1.0 if you require TOML support." + }, + "type": "windwalker-package", "extra": { - "laravel": { - "providers": [ - "Adldap\\Laravel\\AdldapServiceProvider", - "Adldap\\Laravel\\AdldapAuthServiceProvider" - ], - "aliases": { - "Adldap": "Adldap\\Laravel\\Facades\\Adldap" - } + "branch-alias": { + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Adldap\\Laravel\\": "src/" + "Windwalker\\Structure\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "LGPL-2.0-or-later" ], - "description": "LDAP Authentication & Management for Laravel.", + "description": "Windwalker Structure package", + "homepage": "https://github.com/ventoviro/windwalker-structure", "keywords": [ - "adLDAP", - "adldap2", - "laravel", - "ldap" + "framework", + "structure", + "windwalker" ], - "time": "2020-06-02T00:45:05+00:00" - }, + "time": "2019-04-28T06:01:00+00:00" + } + ], + "packages-dev": [ { "name": "beyondcode/laravel-dump-server", - "version": "1.3.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/beyondcode/laravel-dump-server.git", - "reference": "fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a" + "reference": "8864b9efcb48e0a79e83014dd7f0a5481f5c808f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/beyondcode/laravel-dump-server/zipball/fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a", - "reference": "fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a", + "url": "https://api.github.com/repos/beyondcode/laravel-dump-server/zipball/8864b9efcb48e0a79e83014dd7f0a5481f5c808f", + "reference": "8864b9efcb48e0a79e83014dd7f0a5481f5c808f", "shasum": "" }, "require": { - "illuminate/console": "5.6.*|5.7.*|5.8.*|^6.0", - "illuminate/http": "5.6.*|5.7.*|5.8.*|^6.0", - "illuminate/support": "5.6.*|5.7.*|5.8.*|^6.0", + "illuminate/console": "5.6.*|5.7.*|5.8.*", + "illuminate/http": "5.6.*|5.7.*|5.8.*", + "illuminate/support": "5.6.*|5.7.*|5.8.*", "php": "^7.1", "symfony/var-dumper": "^4.1.1" }, @@ -7983,7 +6356,7 @@ { "name": "Marcel Pociot", "email": "marcel@beyondco.de", - "homepage": "https://beyondco.de", + "homepage": "https://beyondcode.de", "role": "Developer" } ], @@ -7993,24 +6366,24 @@ "beyondcode", "laravel-dump-server" ], - "time": "2019-08-11T13:17:40+00:00" + "time": "2018-10-04T07:22:24+00:00" }, { "name": "doctrine/instantiator", - "version": "1.3.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "f350df0268e904597e3bd9c4685c53e0e333feea" + "reference": "a2c590166b2133a4633738648b6b064edae0814a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", - "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", + "reference": "a2c590166b2133a4633738648b6b064edae0814a", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.1" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -8049,38 +6422,85 @@ "constructor", "instantiate" ], - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, + "time": "2019-03-17T17:37:11+00:00" + }, + { + "name": "filp/whoops", + "version": "2.4.1", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "6fb502c23885701a991b0bba974b1a8eb6673577" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/6fb502c23885701a991b0bba974b1a8eb6673577", + "reference": "6fb502c23885701a991b0bba974b1a8eb6673577", + "shasum": "" + }, + "require": { + "php": "^5.5.9 || ^7.0", + "psr/log": "^1.0.1" + }, + "require-dev": { + "mockery/mockery": "^0.9 || ^1.0", + "phpunit/phpunit": "^4.8.35 || ^5.7", + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" } ], - "time": "2020-05-29T17:27:14+00:00" + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "time": "2019-07-04T09:00:00+00:00" }, { "name": "hamcrest/hamcrest-php", - "version": "v2.0.1", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", "shasum": "" }, "require": { - "php": "^5.3|^7.0|^8.0" + "php": "^5.3|^7.0" }, "replace": { "cordoval/hamcrest-php": "*", @@ -8088,13 +6508,14 @@ "kodova/hamcrest-php": "*" }, "require-dev": { - "phpunit/php-file-iterator": "^1.4 || ^2.0", - "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + "phpunit/php-file-iterator": "1.3.3", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -8104,40 +6525,40 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "BSD" ], "description": "This is the PHP port of Hamcrest Matchers", "keywords": [ "test" ], - "time": "2020-07-09T08:09:16+00:00" + "time": "2016-01-20T08:20:44+00:00" }, { "name": "mockery/mockery", - "version": "1.3.2", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "9b6f117dd7d36dc3858d8d8ddf9b3d584fcae283" + "reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/9b6f117dd7d36dc3858d8d8ddf9b3d584fcae283", - "reference": "9b6f117dd7d36dc3858d8d8ddf9b3d584fcae283", + "url": "https://api.github.com/repos/mockery/mockery/zipball/0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2", + "reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2", "shasum": "" }, "require": { - "hamcrest/hamcrest-php": "^2.0.1", + "hamcrest/hamcrest-php": "~2.0", "lib-pcre": ">=7.0", "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0|~9.0" + "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -8175,24 +6596,24 @@ "test double", "testing" ], - "time": "2020-07-09T08:23:05+00:00" + "time": "2019-02-13T09:37:52+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.1", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5" + "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", - "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", + "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.1" }, "replace": { "myclabs/deep-copy": "self.version" @@ -8223,13 +6644,71 @@ "object", "object graph" ], - "funding": [ + "time": "2019-04-07T13:18:21+00:00" + }, + { + "name": "nunomaduro/collision", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/collision.git", + "reference": "b5feb0c0d92978ec7169232ce5d70d6da6b29f63" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/b5feb0c0d92978ec7169232ce5d70d6da6b29f63", + "reference": "b5feb0c0d92978ec7169232ce5d70d6da6b29f63", + "shasum": "" + }, + "require": { + "filp/whoops": "^2.1.4", + "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", + "php": "^7.1", + "symfony/console": "~2.8|~3.3|~4.0" + }, + "require-dev": { + "laravel/framework": "5.7.*", + "nunomaduro/larastan": "^0.3.0", + "phpstan/phpstan": "^0.10", + "phpunit/phpunit": "~7.3" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "NunoMaduro\\Collision\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" } ], - "time": "2020-06-29T13:22:24+00:00" + "description": "Cli error handling for console/command-line PHP applications.", + "keywords": [ + "artisan", + "cli", + "command-line", + "console", + "error", + "handling", + "laravel", + "laravel-zero", + "php", + "symfony" + ], + "time": "2018-11-21T21:40:54+00:00" }, { "name": "phar-io/manifest", @@ -8335,30 +6814,35 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.2.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" }, "type": "library", "extra": { "branch-alias": { - "dev-2.x": "2.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": "src/" + "phpDocumentor\\Reflection\\": [ + "src" + ] } }, "notification-url": "https://packagist.org/downloads/", @@ -8380,41 +6864,44 @@ "reflection", "static analysis" ], - "time": "2020-06-27T09:03:43+00:00" + "time": "2017-09-11T18:02:19+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.2.0", + "version": "4.3.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "3170448f5769fe19f456173d833734e0ff1b84df" + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/3170448f5769fe19f456173d833734e0ff1b84df", - "reference": "3170448f5769fe19f456173d833734e0ff1b84df", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", "shasum": "" }, "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" }, "require-dev": { - "mockery/mockery": "~1.3.2" + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": "src" + "phpDocumentor\\Reflection\\": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", @@ -8425,45 +6912,44 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2020-07-20T20:05:34+00:00" + "time": "2019-04-30T17:48:53+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.3.0", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "e878a14a65245fbe78f8080eba03b47c3b705651" + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651", - "reference": "e878a14a65245fbe78f8080eba03b47c3b705651", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { - "ext-tokenizer": "*" + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" }, "type": "library", "extra": { "branch-alias": { - "dev-1.x": "1.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": "src" + "phpDocumentor\\Reflection\\": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", @@ -8476,38 +6962,37 @@ "email": "me@mikevanriel.com" } ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-06-27T10:12:23+00:00" + "time": "2017-07-14T14:27:02+00:00" }, { "name": "phpspec/prophecy", - "version": "1.11.1", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160" + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b20034be5efcdab4fb60ca3a29cba2949aead160", - "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2", - "phpdocumentor/reflection-docblock": "^5.0", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { - "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0" + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -8540,7 +7025,7 @@ "spy", "stub" ], - "time": "2020-07-08T12:44:21+00:00" + "time": "2019-06-13T12:50:23+00:00" }, { "name": "phpunit/php-code-coverage", @@ -8747,16 +7232,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "3.1.1", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" + "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e899757bb3df5ff6e95089132f32cd59aac2220a", + "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a", "shasum": "" }, "require": { @@ -8792,20 +7277,20 @@ "keywords": [ "tokenizer" ], - "time": "2019-09-17T06:23:10+00:00" + "time": "2019-07-25T05:29:42+00:00" }, { "name": "phpunit/phpunit", - "version": "7.5.20", + "version": "7.5.14", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" + "reference": "2834789aeb9ac182ad69bfdf9ae91856a59945ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2834789aeb9ac182ad69bfdf9ae91856a59945ff", + "reference": "2834789aeb9ac182ad69bfdf9ae91856a59945ff", "shasum": "" }, "require": { @@ -8865,8 +7350,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "role": "lead", + "email": "sebastian@phpunit.de" } ], "description": "The PHP Unit Testing framework.", @@ -8876,7 +7361,7 @@ "testing", "xunit" ], - "time": "2020-01-08T08:45:45+00:00" + "time": "2019-07-15T06:24:08+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -9045,16 +7530,16 @@ }, { "name": "sebastian/environment", - "version": "4.2.3", + "version": "4.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" + "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404", + "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404", "shasum": "" }, "require": { @@ -9094,20 +7579,20 @@ "environment", "hhvm" ], - "time": "2019-11-20T08:46:58+00:00" + "time": "2019-05-05T09:05:15+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", "shasum": "" }, "require": { @@ -9134,10 +7619,6 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -9147,12 +7628,16 @@ "email": "github@wallbash.com" }, { - "name": "Adam Harvey", - "email": "aharvey@php.net" + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" }, { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], "description": "Provides the functionality to export PHP variables for visualization", @@ -9161,7 +7646,7 @@ "export", "exporter" ], - "time": "2019-09-14T09:02:43+00:00" + "time": "2017-04-03T13:19:02+00:00" }, { "name": "sebastian/global-state", @@ -9446,23 +7931,23 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.0", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "75a63c33a8577608444246075ea0af0d052e452a" + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", - "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" + "php": "^7.0" }, "type": "library", "autoload": { @@ -9482,40 +7967,36 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2020-07-12T23:59:07+00:00" + "time": "2019-06-13T22:48:21+00:00" }, { "name": "webmozart/assert", - "version": "1.9.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0 || ^8.0", + "php": "^5.3.3 || ^7.0", "symfony/polyfill-ctype": "^1.8" }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<3.9.1" - }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -9537,7 +8018,7 @@ "check", "validate" ], - "time": "2020-07-08T17:02:28+00:00" + "time": "2018-12-25T11:19:39+00:00" } ], "aliases": [], @@ -9548,8 +8029,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^7.3" + "php": "^7.1.3" }, - "platform-dev": [], - "plugin-api-version": "1.1.0" + "platform-dev": [] } diff --git a/config/app.php b/config/app.php index 29cec5cacb48710bbf78d910285dc03079000cf9..caa1ea71500d1cee2a8857744446c320c048863e 100644 --- a/config/app.php +++ b/config/app.php @@ -171,6 +171,7 @@ return [ */ App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, + // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, Spatie\Permission\PermissionServiceProvider::class, @@ -185,6 +186,8 @@ return [ App\Providers\ValidatorServiceProvider::class, App\Providers\DOIServiceProvider::class, App\Providers\RestServiceProvider::class, + App\Providers\LDAPServiceProvider::class, + Chumper\Zipper\ZipperServiceProvider::class, Laracasts\Utilities\JavaScript\JavaScriptServiceProvider::class ], @@ -201,6 +204,7 @@ return [ */ 'aliases' => [ + 'Adldap' => \Adldap\Laravel\Facades\Adldap::class, 'App' => Illuminate\Support\Facades\App::class, 'Arr' => Illuminate\Support\Arr::class, 'Artisan' => Illuminate\Support\Facades\Artisan::class, @@ -244,6 +248,7 @@ return [ 'GitLab' => GrahamCampbell\GitLab\Facades\GitLab::class, 'Elasticsearch' => Cviebrock\LaravelElasticsearch\Facade::class, 'JavaScript' => \Laracasts\Utilities\JavaScript\JavaScriptFacade::class + ], ]; diff --git a/config/auth.php b/config/auth.php index 3f4af9a4e18026bec4c32f5848b5220bfc1c6711..c4d6a5e85f7cd81e00c226a2be61058b383ebca8 100644 --- a/config/auth.php +++ b/config/auth.php @@ -38,7 +38,7 @@ return [ 'guards' => [ 'web' => [ 'driver' => 'session', - 'provider' => 'ldap', + 'provider' => 'users', ], 'api' => [ @@ -66,29 +66,6 @@ return [ */ 'providers' => [ - 'ldap' => [ - 'driver' => 'ldap', - 'model' => LdapRecord\Models\OpenLDAP\User::class, - 'database' => [ - 'model' => App\User::class, - 'sync_passwords' => false, - 'password_column' => false, - 'sync_attributes' => [ - 'email' => 'publicemailaddress', - 'objectguid' => 'uidnumber', - 'username' => 'uid', - 'name' => 'cn', - ], - 'external_sync_attributes' => [ - 'email' => 'mail', - 'username' => 'uid', - 'name' => 'cn', - ], - 'sync_existing' => [ - 'email' => 'publicemailaddress', - ], - ], - ], 'users' => [ 'driver' => 'ldap',//'eloquent' 'model' => App\User::class, diff --git a/config/laudatio.php b/config/laudatio.php index 978416681ad0dc2008bcc4ffe9954068e10bcd7c..8ef9302a6ce7201236c048888015f155f22d97fa 100644 --- a/config/laudatio.php +++ b/config/laudatio.php @@ -22,7 +22,7 @@ return [ 'datacite_resolve_uri' => env('DATACITE_RESOLVE_URI'), 'datacite_callback_uri' => env('DATACITE_CALLBACK_URI'), 'datacite_environment' => env('DATACITE_ENVIRONMENT'), - 'base_domain' => 'http://laudatio6/', + 'base_domain' => 'http://laudatio58-dev.local/', 'gitlab_uri' => 'scm.cms.hu-berlin.de', 'elasticApiVersion' => 'v1', 'elasticsearch_limit' => 100, @@ -35,14 +35,9 @@ return [ 'elasticsearch_scheme' => env('ELASTICSEARCH_SCHEME','http'), 'elasticsearch_user' => env('ELASTICSEARCH_USER','elastic'), 'elasticsearch_pass' => env('ELASTICSEARCH_PASS','elastic'), - 'ldap_external_host' => env('LDAP_EXTERNAL_HOST'), - 'ldap_port' => env('LDAP_PORT', 389), - 'ldap_ssl' => env('LDAP_SSL', false), - 'ldap_tls' => env('LDAP_TLS', false), 'external_base_dn' => env('LDAP_EXTERNAL_BASE_DN', 'ou=users,ou=Laudatio,ou=Services,ou=Computer- und Medienservice,o=Humboldt-Universitaet zu Berlin,c=de'), 'external_admin_username' => env('LDAP_EXTERNAL_ADMIN_USERNAME','uid=laudatioldapadmin,ou=Laudatio,ou=Services,ou=Computer- und Medienservice,o=Humboldt-Universitaet zu Berlin,c=de'), - 'external_admin_password' => env('LDAP_EXTERNAL_PASSWORD'), - 'external_admin_timeout' => env('LDAP_EXTERNAL_TIMEOUT'), + 'external_admin_password' => env('LDAP_EXTERNAL_ADMIN_PASSWORD'), 'user_format' => env('LDAP_USER_FORMAT', 'uid=%s'), 'user_attribute' => env('LDAP_USER_ATTRIBUTE','uid'), 'ssh-alias' => 'lauda-scm' diff --git a/config/ldap.php b/config/ldap.php index 315e66f15c2bfecbdbc4c19cca8d47e7ef29483e..29c1924d18076c25e3136bd9eb8a4e90ba7dba1c 100644 --- a/config/ldap.php +++ b/config/ldap.php @@ -4,90 +4,243 @@ return [ /* |-------------------------------------------------------------------------- - | Default LDAP Connection Name + | Logging |-------------------------------------------------------------------------- | - | Here you may specify which of the LDAP connections below you wish - | to use as your default connection for all LDAP operations. Of - | course you may add as many connections you'd like below. + | This option enables logging all LDAP operations on all configured + | connections such as bind requests and CRUD operations. + | + | Log entries will be created in your default logging stack. + | + | This option is extremely helpful for debugging connectivity issues. | */ - 'default' => env('LDAP_CONNECTION', 'default'), + 'logging' => env('LDAP_LOGGING', false), /* |-------------------------------------------------------------------------- - | LDAP Connections + | Connections |-------------------------------------------------------------------------- | - | Below you may configure each LDAP connection your application requires - | access to. Be sure to include a valid base DN - otherwise you may - | not receive any results when performing LDAP search operations. + | This array stores the connections that are added to Adldap. You can add + | as many connections as you like. + | + | The key is the name of the connection you wish to use and the value is + | an array of configuration settings. | */ 'connections' => [ 'default' => [ - 'hosts' => explode(' ', env('LDAP_HOSTS', 'ldap1.cms.hu-berlin.de ldap2.cms.hu-berlin.de')), - 'username' => env('LDAP_USERNAME', 'uid=laudaadm,ou=users,ou=Benutzerverwaltung,ou=Computer- und Medienservice,o=Humboldt-Universitaet zu Berlin,c=DE'), - 'password' => env('LDAP_PASSWORD', 'secret'), - 'port' => env('LDAP_PORT', 389), - 'base_dn' => env('LDAP_BASE_DN', 'ou=users,ou=Laudatio,ou=Services,ou=Computer- und Medienservice,o=Humboldt-Universitaet zu Berlin,c=de'), - 'timeout' => env('LDAP_TIMEOUT', 5), - 'use_ssl' => env('LDAP_SSL', false), - 'use_tls' => env('LDAP_TLS', true), - ], - 'admin' => [ - 'hosts' => [config('laudatio.ldap_external_host', 'ldapmaster.cms.hu-berlin.de')], - 'username' => config('laudatio.external_admin_username'), - 'password' => config('laudatio.external_admin_password'), - 'port' => config('laudatio.ldap_port', 389), - 'base_dn' => config('laudatio.external_base_dn', 'ou=users,ou=Laudatio,ou=Services,ou=Computer- und Medienservice,o=Humboldt-Universitaet zu Berlin,c=de'), - 'timeout' => env('laudatio.external_admin_timeout', 10), - 'use_ssl' => config('laudatio.ldap_ssl', false), - 'use_tls' => config('laudatio.ldap_tls', true) - ], - 'external' => [ - 'hosts' => explode(' ', env('LDAP_HOSTS', 'ldap1.cms.hu-berlin.de ldap2.cms.hu-berlin.de')), - 'username' => config('laudatio.external_admin_username'), - 'password' => config('laudatio.external_admin_password'), - 'port' => config('laudatio.ldap_port', 389), - 'base_dn' => config('laudatio.external_base_dn', 'ou=users,ou=Laudatio,ou=Services,ou=Computer- und Medienservice,o=Humboldt-Universitaet zu Berlin,c=de'), - 'timeout' => env('laudatio.external_admin_timeout', 10), - 'use_ssl' => config('laudatio.ldap_ssl', false), - 'use_tls' => config('laudatio.ldap_tls', true) - ], - ], + /* + |-------------------------------------------------------------------------- + | Auto Connect + |-------------------------------------------------------------------------- + | + | If auto connect is true, Adldap will try to automatically connect to + | your LDAP server in your configuration. This allows you to assume + | connectivity rather than having to connect manually + | in your application. + | + | If this is set to false, you **must** connect manually before running + | LDAP operations. Otherwise, you will receive exceptions. + | + */ - /* - |-------------------------------------------------------------------------- - | LDAP Logging - |-------------------------------------------------------------------------- - | - | When LDAP logging is enabled, all LDAP search and authentication - | operations are logged using the default application logging - | driver. This can assist in debugging issues and more. - | - */ + 'auto_connect' => env('LDAP_AUTO_CONNECT', true), - 'logging' => env('LDAP_LOGGING', true), + /* + |-------------------------------------------------------------------------- + | Connection + |-------------------------------------------------------------------------- + | + | The connection class to use to run raw LDAP operations on. + | + | Custom connection classes must implement: + | + | Adldap\Connections\ConnectionInterface + | + */ - /* - |-------------------------------------------------------------------------- - | LDAP Cache - |-------------------------------------------------------------------------- - | - | LDAP caching enables the ability of caching search results using the - | query builder. This is great for running expensive operations that - | may take many seconds to complete, such as a pagination request. - | - */ + 'connection' => Adldap\Connections\Ldap::class, + + /* + |-------------------------------------------------------------------------- + | Connection Settings + |-------------------------------------------------------------------------- + | + | This connection settings array is directly passed into the Adldap constructor. + | + | Feel free to add or remove settings you don't need. + | + */ + + 'settings' => [ + + /* + |-------------------------------------------------------------------------- + | Schema + |-------------------------------------------------------------------------- + | + | The schema class to use for retrieving attributes and generating models. + | + | You can also set this option to `null` to use the default schema class. + | + | For OpenLDAP, you must use the schema: + | + | Adldap\Schemas\OpenLDAP::class + | + | For FreeIPA, you must use the schema: + | + | Adldap\Schemas\FreeIPA::class + | + | Custom schema classes must implement Adldap\Schemas\SchemaInterface + | + */ + + 'schema' => env('LDAP_SCHEMA', '') == 'OpenLDAP' ? + Adldap\Schemas\OpenLDAP::class : + ( env('LDAP_SCHEMA', '') == 'FreeIPA' ? + Adldap\Schemas\FreeIPA::class : + Adldap\Schemas\ActiveDirectory::class ), + + /* + |-------------------------------------------------------------------------- + | Account Prefix + |-------------------------------------------------------------------------- + | + | The account prefix option is the prefix of your user accounts in LDAP directory. + | + | This string is prepended to all authenticating users usernames. + | + */ + + 'account_prefix' => env('LDAP_ACCOUNT_PREFIX', ''), + + /* + |-------------------------------------------------------------------------- + | Account Suffix + |-------------------------------------------------------------------------- + | + | The account suffix option is the suffix of your user accounts in your LDAP directory. + | + | This string is appended to all authenticating users usernames. + | + */ + + 'account_suffix' => env('LDAP_ACCOUNT_SUFFIX', ''), + + /* + |-------------------------------------------------------------------------- + | Domain Controllers + |-------------------------------------------------------------------------- + | + | The domain controllers option is an array of servers located on your + | network that serve Active Directory. You can insert as many servers or + | as little as you'd like depending on your forest (with the + | minimum of one of course). + | + | These can be IP addresses of your server(s), or the host name. + | + */ + + 'hosts' => explode(' ', env('LDAP_HOSTS', 'ldap1.cms.hu-berlin.de ldap2.cms.hu-berlin.de')), + + /* + |-------------------------------------------------------------------------- + | Port + |-------------------------------------------------------------------------- + | + | The port option is used for authenticating and binding to your LDAP server. + | + */ + + 'port' => env('LDAP_PORT', 389), + + /* + |-------------------------------------------------------------------------- + | Timeout + |-------------------------------------------------------------------------- + | + | The timeout option allows you to configure the amount of time in + | seconds that your application waits until a response + | is received from your LDAP server. + | + */ + + 'timeout' => env('LDAP_TIMEOUT', 2), + + /* + |-------------------------------------------------------------------------- + | Base Distinguished Name + |-------------------------------------------------------------------------- + | + | The base distinguished name is the base distinguished name you'd + | like to perform query operations on. An example base DN would be: + | + | dc=corp,dc=acme,dc=org + | + | A correct base DN is required for any query results to be returned. + | + */ + + 'base_dn' => env('LDAP_BASE_DN', 'ou=users,ou=Benutzerverwaltung,ou=Computer- und Medienservice,o=Humboldt-Universitaet zu Berlin,c=DE'), + /* + |-------------------------------------------------------------------------- + | LDAP Username & Password + |-------------------------------------------------------------------------- + | + | When connecting to your LDAP server, a username and password is required + | to be able to query and run operations on your server(s). You can + | use any user account that has these permissions. This account + | does not need to be a domain administrator unless you + | require changing and resetting user passwords. + | + */ + + 'username' => env('LDAP_USERNAME','uid=laudaadm,ou=users,ou=Benutzerverwaltung,ou=Computer- und Medienservice,o=Humboldt-Universitaet zu Berlin,c=DE'), + 'password' => env('LDAP_PASSWORD'), + + /* + |-------------------------------------------------------------------------- + | Follow Referrals + |-------------------------------------------------------------------------- + | + | The follow referrals option is a boolean to tell active directory + | to follow a referral to another server on your network if the + | server queried knows the information your asking for exists, + | but does not yet contain a copy of it locally. + | + | This option is defaulted to false. + | + */ + + 'follow_referrals' => false, + + /* + |-------------------------------------------------------------------------- + | SSL & TLS + |-------------------------------------------------------------------------- + | + | If you need to be able to change user passwords on your server, then an + | SSL or TLS connection is required. All other operations are allowed + | on unsecured protocols. + | + | One of these options are definitely recommended if you + | have the ability to connect to your server securely. + | + */ + + 'use_ssl' => env('LDAP_USE_SSL', false), + 'use_tls' => env('LDAP_USE_TLS', true), + + ], + + ], - 'cache' => [ - 'enabled' => env('LDAP_CACHE', false), - 'driver' => env('CACHE_DRIVER', 'file'), ], ]; diff --git a/config/ldap_auth.php b/config/ldap_auth.php new file mode 100644 index 0000000000000000000000000000000000000000..2812b2d3eb2739ed39164064cfcdec7e158a0301 --- /dev/null +++ b/config/ldap_auth.php @@ -0,0 +1,348 @@ + env('LDAP_CONNECTION', 'default'), + + /* + |-------------------------------------------------------------------------- + | Provider + |-------------------------------------------------------------------------- + | + | The LDAP authentication provider to use depending + | if you require database synchronization. + | + | For synchronizing LDAP users to your local applications database, use the provider: + | + | Adldap\Laravel\Auth\DatabaseUserProvider::class + | + | Otherwise, if you just require LDAP authentication, use the provider: + | + | Adldap\Laravel\Auth\NoDatabaseUserProvider::class + | + */ + + 'provider' => Adldap\Laravel\Auth\DatabaseUserProvider::class, + + /* + |-------------------------------------------------------------------------- + | Model + |-------------------------------------------------------------------------- + | + | The model to utilize for authentication and importing. + | + | This option is only applicable to the DatabaseUserProvider. + | + */ + + 'model' => App\User::class, + + /* + |-------------------------------------------------------------------------- + | Rules + |-------------------------------------------------------------------------- + | + | Rules allow you to control user authentication requests depending on scenarios. + | + | You can create your own rules and insert them here. + | + | All rules must extend from the following class: + | + | Adldap\Laravel\Validation\Rules\Rule + | + */ + + 'rules' => [ + + // Denys deleted users from authenticating. + + Adldap\Laravel\Validation\Rules\DenyTrashed::class, + + // Allows only manually imported users to authenticate. + + // Adldap\Laravel\Validation\Rules\OnlyImported::class, + + ], + + /* + |-------------------------------------------------------------------------- + | Scopes + |-------------------------------------------------------------------------- + | + | Scopes allow you to restrict the LDAP query that locates + | users upon import and authentication. + | + | All scopes must implement the following interface: + | + | Adldap\Laravel\Scopes\ScopeInterface + | + */ + + 'scopes' => [ + + // Only allows users with a user principal name to authenticate. + // Suitable when using ActiveDirectory. + // Adldap\Laravel\Scopes\UpnScope::class, + + // Only allows users with a uid to authenticate. + // Suitable when using OpenLDAP. + // Adldap\Laravel\Scopes\UidScope::class, + + ], + + 'identifiers' => [ + + /* + |-------------------------------------------------------------------------- + | LDAP + |-------------------------------------------------------------------------- + | + | Locate Users By: + | + | This value is the users attribute you would like to locate LDAP + | users by in your directory. + | + | For example, using the default configuration below, if you're + | authenticating users with an email address, your LDAP server + | will be queried for a user with the a `userprincipalname` + | equal to the entered email address. + | + | Bind Users By: + | + | This value is the users attribute you would + | like to use to bind to your LDAP server. + | + | For example, when a user is located by the above attribute, + | the users attribute you specify below will be used as + | the 'username' to bind to your LDAP server. + | + | This is usually their distinguished name. + | + */ + + 'ldap' => [ + + /*'locate_users_by' => 'userprincipalname',*/ + 'locate_users_by' => env('LDAP_USER_ATTRIBUTE', 'uid'), + 'bind_users_by' => env('LDAP_USER_ATTRIBUTE', 'uid'), + + ], + + 'database' => [ + + /* + |-------------------------------------------------------------------------- + | GUID Column + |-------------------------------------------------------------------------- + | + | The value of this option is the database column that will contain the + | LDAP users global identifier. This column does not need to be added + | to the sync attributes below. It is synchronized automatically. + | + | This option is only applicable to the DatabaseUserProvider. + | + */ + + 'guid_column' => 'objectguid', + + /* + |-------------------------------------------------------------------------- + | Username Column + |-------------------------------------------------------------------------- + | + | The value of this option is the database column that contains your + | users login username. + | + | This column must be added to your sync attributes below to be + | properly synchronized. + | + | This option is only applicable to the DatabaseUserProvider. + | + */ + + 'username_column' => 'username', + + ], + + /* + |-------------------------------------------------------------------------- + | Windows Authentication Middleware (SSO) + |-------------------------------------------------------------------------- + | + | Local Users By: + | + | This value is the users attribute you would like to locate LDAP + | users by in your directory. + | + | For example, if 'samaccountname' is the value, then your LDAP server is + | queried for a user with the 'samaccountname' equal to the value of + | $_SERVER['AUTH_USER']. + | + | If a user is found, they are imported (if using the DatabaseUserProvider) + | into your local database, then logged in. + | + | Server Key: + | + | This value represents the 'key' of the $_SERVER + | array to pull the users account name from. + | + | For example, $_SERVER['AUTH_USER']. + | + */ + + 'windows' => [ + + 'locate_users_by' => 'samaccountname', + + 'server_key' => 'AUTH_USER', + + ], + + ], + + 'passwords' => [ + + /* + |-------------------------------------------------------------------------- + | Password Sync + |-------------------------------------------------------------------------- + | + | The password sync option allows you to automatically synchronize users + | LDAP passwords to your local database. These passwords are hashed + | natively by Laravel using the Hash::make() method. + | + | Enabling this option would also allow users to login to their accounts + | using the password last used when an LDAP connection was present. + | + | If this option is disabled, the local database account is applied a + | random 16 character hashed password upon first login, and will + | lose access to this account upon loss of LDAP connectivity. + | + | This option is only applicable to the DatabaseUserProvider. + | + */ + + 'sync' => env('LDAP_PASSWORD_SYNC', false), + + /* + |-------------------------------------------------------------------------- + | Column + |-------------------------------------------------------------------------- + | + | This is the column of your users database table + | that is used to store passwords. + | + | Set this to `null` if you do not have a password column. + | + | This option is only applicable to the DatabaseUserProvider. + | + */ + + 'column' => 'password', + + ], + + /* + |-------------------------------------------------------------------------- + | Login Fallback + |-------------------------------------------------------------------------- + | + | The login fallback option allows you to login as a user located in the + | local database if active directory authentication fails. + | + | Set this to true if you would like to enable it. + | + | This option is only applicable to the DatabaseUserProvider. + | + */ + + 'login_fallback' => env('LDAP_LOGIN_FALLBACK', false), + + /* + |-------------------------------------------------------------------------- + | Sync Attributes + |-------------------------------------------------------------------------- + | + | Attributes specified here will be added / replaced on the user model + | upon login, automatically synchronizing and keeping the attributes + | up to date. + | + | The array key represents the users Laravel model key, and + | the value represents the users LDAP attribute. + | + | You **must** include the users login attribute here. + | + | This option is only applicable to the DatabaseUserProvider. + | + */ + + 'sync_attributes' => [ + + 'email' => 'publicemailaddress', + 'objectguid' => 'uidnumber', + 'username' => 'uid', + 'name' => 'cn', + + ], + + 'external_sync_attributes' => [ + + 'email' => 'mail', + 'username' => 'uid', + 'name' => 'cn', + + ], + + /* + |-------------------------------------------------------------------------- + | Logging + |-------------------------------------------------------------------------- + | + | User authentication attempts will be logged using Laravel's + | default logger if this setting is enabled. + | + | No credentials are logged, only usernames. + | + | This is usually stored in the '/storage/logs' directory + | in the root of your application. + | + | This option is useful for debugging as well as auditing. + | + | You can freely remove any events you would not like to log below, + | as well as use your own listeners if you would prefer. + | + */ + + 'logging' => [ + + 'enabled' => env('LDAP_LOGGING', true), + + 'events' => [ + + \Adldap\Laravel\Events\Importing::class => \Adldap\Laravel\Listeners\LogImport::class, + \Adldap\Laravel\Events\Synchronized::class => \Adldap\Laravel\Listeners\LogSynchronized::class, + \Adldap\Laravel\Events\Synchronizing::class => \Adldap\Laravel\Listeners\LogSynchronizing::class, + \Adldap\Laravel\Events\Authenticated::class => \Adldap\Laravel\Listeners\LogAuthenticated::class, + \Adldap\Laravel\Events\Authenticating::class => \Adldap\Laravel\Listeners\LogAuthentication::class, + \Adldap\Laravel\Events\AuthenticationFailed::class => \Adldap\Laravel\Listeners\LogAuthenticationFailure::class, + \Adldap\Laravel\Events\AuthenticationRejected::class => \Adldap\Laravel\Listeners\LogAuthenticationRejection::class, + \Adldap\Laravel\Events\AuthenticationSuccessful::class => \Adldap\Laravel\Listeners\LogAuthenticationSuccess::class, + \Adldap\Laravel\Events\DiscoveredWithCredentials::class => \Adldap\Laravel\Listeners\LogDiscovery::class, + \Adldap\Laravel\Events\AuthenticatedWithWindows::class => \Adldap\Laravel\Listeners\LogWindowsAuth::class, + \Adldap\Laravel\Events\AuthenticatedModelTrashed::class => \Adldap\Laravel\Listeners\LogTrashedModel::class, + + ], + ], + +]; \ No newline at end of file diff --git a/deploy.php b/deploy.php index 54852e5071d37a522458ff9a4906b5d0559f7bf6..fc915cfe2ff6b9537874329ad9325b32821df124 100644 --- a/deploy.php +++ b/deploy.php @@ -61,7 +61,7 @@ host('laudatio1.cms.hu-berlin.de') host('depot1-5.cms.hu-berlin.de') ->identityFile('/Users/rolfguescini/.ssh/deploy', '/Users/rolfguescini/.ssh/deploy', '') ->set('deploy_path', '/var/www/html/laravelaudatio') - ->set('branch', 'upgrade_laravel6') + ->set('branch', 'develop') ->user('rolfguescini'); diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn deleted file mode 120000 index cf76760386200fb3e0ff9c6827bef9c9fc0305b5..0000000000000000000000000000000000000000 --- a/node_modules/.bin/acorn +++ /dev/null @@ -1 +0,0 @@ -../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/@babel/compat-data/LICENSE b/node_modules/@babel/compat-data/LICENSE deleted file mode 100644 index f31575ec773bb199aeb7c0d0f1612cfe1c7038f1..0000000000000000000000000000000000000000 --- a/node_modules/@babel/compat-data/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -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. diff --git a/node_modules/@babel/compat-data/corejs2-built-ins.js b/node_modules/@babel/compat-data/corejs2-built-ins.js deleted file mode 100644 index ccbe72f0d58bb64e9756cce5399354b7b341c60a..0000000000000000000000000000000000000000 --- a/node_modules/@babel/compat-data/corejs2-built-ins.js +++ /dev/null @@ -1,4 +0,0 @@ -// Node < 13.3 doesn't support export maps in package.json. -// Use this proxy file as a fallback. - -module.exports = require("./data/corejs2-built-ins.json"); diff --git a/node_modules/@babel/compat-data/corejs3-shipped-proposals.js b/node_modules/@babel/compat-data/corejs3-shipped-proposals.js deleted file mode 100644 index b6abc7d2676758c5f66ce9f031576225be96eba5..0000000000000000000000000000000000000000 --- a/node_modules/@babel/compat-data/corejs3-shipped-proposals.js +++ /dev/null @@ -1,4 +0,0 @@ -// Node < 13.3 doesn't support export maps in package.json. -// Use this proxy file as a fallback. - -module.exports = require("./data/corejs3-shipped-proposals.json"); diff --git a/node_modules/@babel/compat-data/data/corejs2-built-ins.json b/node_modules/@babel/compat-data/data/corejs2-built-ins.json deleted file mode 100644 index 7efce2678676ca2048e27dd803d6ef0f85d62d8c..0000000000000000000000000000000000000000 --- a/node_modules/@babel/compat-data/data/corejs2-built-ins.json +++ /dev/null @@ -1,1690 +0,0 @@ -{ - "es6.array.copy-within": { - "chrome": "45", - "opera": "32", - "edge": "12", - "firefox": "32", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "5", - "electron": "0.31" - }, - "es6.array.every": { - "chrome": "5", - "opera": "10.10", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.array.fill": { - "chrome": "45", - "opera": "32", - "edge": "12", - "firefox": "31", - "safari": "7.1", - "node": "4", - "ios": "8", - "samsung": "5", - "electron": "0.31" - }, - "es6.array.filter": { - "chrome": "5", - "opera": "10.10", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.array.find": { - "chrome": "45", - "opera": "32", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "4", - "ios": "8", - "samsung": "5", - "electron": "0.31" - }, - "es6.array.find-index": { - "chrome": "45", - "opera": "32", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "4", - "ios": "8", - "samsung": "5", - "electron": "0.31" - }, - "es7.array.flat-map": { - "chrome": "69", - "opera": "56", - "edge": "79", - "firefox": "62", - "safari": "12", - "node": "11", - "ios": "12", - "samsung": "10", - "electron": "4" - }, - "es6.array.for-each": { - "chrome": "5", - "opera": "10.10", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.array.from": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "36", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es7.array.includes": { - "chrome": "47", - "opera": "34", - "edge": "14", - "firefox": "43", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.36" - }, - "es6.array.index-of": { - "chrome": "5", - "opera": "10.10", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.array.is-array": { - "chrome": "5", - "opera": "10.50", - "edge": "12", - "firefox": "4", - "safari": "4", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.array.iterator": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "28", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.array.last-index-of": { - "chrome": "5", - "opera": "10.10", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.array.map": { - "chrome": "5", - "opera": "10.10", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.array.of": { - "chrome": "45", - "opera": "32", - "edge": "12", - "firefox": "25", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "5", - "electron": "0.31" - }, - "es6.array.reduce": { - "chrome": "5", - "opera": "10.50", - "edge": "12", - "firefox": "3", - "safari": "4", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.array.reduce-right": { - "chrome": "5", - "opera": "10.50", - "edge": "12", - "firefox": "3", - "safari": "4", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.array.some": { - "chrome": "5", - "opera": "10.10", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.array.sort": { - "chrome": "63", - "opera": "50", - "edge": "12", - "firefox": "5", - "safari": "12", - "node": "10", - "ie": "9", - "ios": "12", - "samsung": "8", - "electron": "3" - }, - "es6.array.species": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es6.date.now": { - "chrome": "5", - "opera": "10.50", - "edge": "12", - "firefox": "2", - "safari": "4", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.date.to-iso-string": { - "chrome": "5", - "opera": "10.50", - "edge": "12", - "firefox": "3.5", - "safari": "4", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.date.to-json": { - "chrome": "5", - "opera": "12.10", - "edge": "12", - "firefox": "4", - "safari": "10", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "10", - "samsung": "1", - "electron": "0.20" - }, - "es6.date.to-primitive": { - "chrome": "47", - "opera": "34", - "edge": "15", - "firefox": "44", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.36" - }, - "es6.date.to-string": { - "chrome": "5", - "opera": "10.50", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.10", - "ie": "10", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.function.bind": { - "chrome": "7", - "opera": "12", - "edge": "12", - "firefox": "4", - "safari": "5.1", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.function.has-instance": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "50", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es6.function.name": { - "chrome": "5", - "opera": "10.50", - "edge": "14", - "firefox": "2", - "safari": "4", - "node": "0.10", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.map": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es6.math.acosh": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.asinh": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.atanh": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.cbrt": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.clz32": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "31", - "safari": "9", - "node": "0.12", - "ios": "9", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.cosh": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.expm1": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.fround": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "26", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.hypot": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "27", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.imul": { - "chrome": "30", - "opera": "17", - "edge": "12", - "firefox": "23", - "safari": "7", - "node": "0.12", - "android": "4.4", - "ios": "7", - "samsung": "2", - "electron": "0.20" - }, - "es6.math.log1p": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.log10": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.log2": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.sign": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "9", - "node": "0.12", - "ios": "9", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.sinh": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.tanh": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.math.trunc": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "ios": "8", - "samsung": "3", - "electron": "0.20" - }, - "es6.number.constructor": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "36", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "3.4", - "electron": "0.21" - }, - "es6.number.epsilon": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "25", - "safari": "9", - "node": "0.12", - "ios": "9", - "samsung": "2", - "electron": "0.20" - }, - "es6.number.is-finite": { - "chrome": "19", - "opera": "15", - "edge": "12", - "firefox": "16", - "safari": "9", - "node": "0.12", - "android": "4.1", - "ios": "9", - "samsung": "1.5", - "electron": "0.20" - }, - "es6.number.is-integer": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "16", - "safari": "9", - "node": "0.12", - "ios": "9", - "samsung": "2", - "electron": "0.20" - }, - "es6.number.is-nan": { - "chrome": "19", - "opera": "15", - "edge": "12", - "firefox": "15", - "safari": "9", - "node": "0.12", - "android": "4.1", - "ios": "9", - "samsung": "1.5", - "electron": "0.20" - }, - "es6.number.is-safe-integer": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "32", - "safari": "9", - "node": "0.12", - "ios": "9", - "samsung": "2", - "electron": "0.20" - }, - "es6.number.max-safe-integer": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "31", - "safari": "9", - "node": "0.12", - "ios": "9", - "samsung": "2", - "electron": "0.20" - }, - "es6.number.min-safe-integer": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "31", - "safari": "9", - "node": "0.12", - "ios": "9", - "samsung": "2", - "electron": "0.20" - }, - "es6.number.parse-float": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "25", - "safari": "9", - "node": "0.12", - "ios": "9", - "samsung": "2", - "electron": "0.20" - }, - "es6.number.parse-int": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "25", - "safari": "9", - "node": "0.12", - "ios": "9", - "samsung": "2", - "electron": "0.20" - }, - "es6.object.assign": { - "chrome": "49", - "opera": "36", - "edge": "13", - "firefox": "36", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "es6.object.create": { - "chrome": "5", - "opera": "12", - "edge": "12", - "firefox": "4", - "safari": "4", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es7.object.define-getter": { - "chrome": "62", - "opera": "49", - "edge": "16", - "firefox": "48", - "safari": "9", - "node": "8.10", - "ios": "9", - "samsung": "8", - "electron": "3" - }, - "es7.object.define-setter": { - "chrome": "62", - "opera": "49", - "edge": "16", - "firefox": "48", - "safari": "9", - "node": "8.10", - "ios": "9", - "samsung": "8", - "electron": "3" - }, - "es6.object.define-property": { - "chrome": "5", - "opera": "12", - "edge": "12", - "firefox": "4", - "safari": "5.1", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.object.define-properties": { - "chrome": "5", - "opera": "12", - "edge": "12", - "firefox": "4", - "safari": "4", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es7.object.entries": { - "chrome": "54", - "opera": "41", - "edge": "14", - "firefox": "47", - "safari": "10.1", - "node": "7", - "ios": "10.3", - "samsung": "6", - "electron": "1.5" - }, - "es6.object.freeze": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "4", - "electron": "0.30" - }, - "es6.object.get-own-property-descriptor": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "4", - "electron": "0.30" - }, - "es7.object.get-own-property-descriptors": { - "chrome": "54", - "opera": "41", - "edge": "15", - "firefox": "50", - "safari": "10.1", - "node": "7", - "ios": "10.3", - "samsung": "6", - "electron": "1.5" - }, - "es6.object.get-own-property-names": { - "chrome": "40", - "opera": "27", - "edge": "12", - "firefox": "33", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "3.4", - "electron": "0.21" - }, - "es6.object.get-prototype-of": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "4", - "electron": "0.30" - }, - "es7.object.lookup-getter": { - "chrome": "62", - "opera": "49", - "edge": "79", - "firefox": "36", - "safari": "9", - "node": "8.10", - "ios": "9", - "samsung": "8", - "electron": "3" - }, - "es7.object.lookup-setter": { - "chrome": "62", - "opera": "49", - "edge": "79", - "firefox": "36", - "safari": "9", - "node": "8.10", - "ios": "9", - "samsung": "8", - "electron": "3" - }, - "es6.object.prevent-extensions": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "4", - "electron": "0.30" - }, - "es6.object.to-string": { - "chrome": "57", - "opera": "44", - "edge": "15", - "firefox": "51", - "safari": "10", - "node": "8", - "ios": "10", - "samsung": "7", - "electron": "1.7" - }, - "es6.object.is": { - "chrome": "19", - "opera": "15", - "edge": "12", - "firefox": "22", - "safari": "9", - "node": "0.12", - "android": "4.1", - "ios": "9", - "samsung": "1.5", - "electron": "0.20" - }, - "es6.object.is-frozen": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "4", - "electron": "0.30" - }, - "es6.object.is-sealed": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "4", - "electron": "0.30" - }, - "es6.object.is-extensible": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "4", - "electron": "0.30" - }, - "es6.object.keys": { - "chrome": "40", - "opera": "27", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "3.4", - "electron": "0.21" - }, - "es6.object.seal": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "4", - "electron": "0.30" - }, - "es6.object.set-prototype-of": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "31", - "safari": "9", - "node": "0.12", - "ie": "11", - "ios": "9", - "samsung": "2", - "electron": "0.20" - }, - "es7.object.values": { - "chrome": "54", - "opera": "41", - "edge": "14", - "firefox": "47", - "safari": "10.1", - "node": "7", - "ios": "10.3", - "samsung": "6", - "electron": "1.5" - }, - "es6.promise": { - "chrome": "51", - "opera": "38", - "edge": "14", - "firefox": "45", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es7.promise.finally": { - "chrome": "63", - "opera": "50", - "edge": "18", - "firefox": "58", - "safari": "11.1", - "node": "10", - "ios": "11.3", - "samsung": "8", - "electron": "3" - }, - "es6.reflect.apply": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "es6.reflect.construct": { - "chrome": "49", - "opera": "36", - "edge": "13", - "firefox": "49", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "es6.reflect.define-property": { - "chrome": "49", - "opera": "36", - "edge": "13", - "firefox": "42", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "es6.reflect.delete-property": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "es6.reflect.get": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "es6.reflect.get-own-property-descriptor": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "es6.reflect.get-prototype-of": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "es6.reflect.has": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "es6.reflect.is-extensible": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "es6.reflect.own-keys": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "es6.reflect.prevent-extensions": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "es6.reflect.set": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "es6.reflect.set-prototype-of": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "es6.regexp.constructor": { - "chrome": "50", - "opera": "37", - "edge": "79", - "firefox": "40", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "1.1" - }, - "es6.regexp.flags": { - "chrome": "49", - "opera": "36", - "edge": "79", - "firefox": "37", - "safari": "9", - "node": "6", - "ios": "9", - "samsung": "5", - "electron": "0.37" - }, - "es6.regexp.match": { - "chrome": "50", - "opera": "37", - "edge": "79", - "firefox": "49", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "1.1" - }, - "es6.regexp.replace": { - "chrome": "50", - "opera": "37", - "edge": "79", - "firefox": "49", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "1.1" - }, - "es6.regexp.split": { - "chrome": "50", - "opera": "37", - "edge": "79", - "firefox": "49", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "1.1" - }, - "es6.regexp.search": { - "chrome": "50", - "opera": "37", - "edge": "79", - "firefox": "49", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "1.1" - }, - "es6.regexp.to-string": { - "chrome": "50", - "opera": "37", - "edge": "79", - "firefox": "39", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "1.1" - }, - "es6.set": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es6.symbol": { - "chrome": "51", - "opera": "38", - "edge": "79", - "firefox": "51", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es7.symbol.async-iterator": { - "chrome": "63", - "opera": "50", - "edge": "79", - "firefox": "57", - "safari": "12", - "node": "10", - "ios": "12", - "samsung": "8", - "electron": "3" - }, - "es6.string.anchor": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.10", - "android": "4", - "ios": "7", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.string.big": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.10", - "android": "4", - "ios": "7", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.string.blink": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.10", - "android": "4", - "ios": "7", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.string.bold": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.10", - "android": "4", - "ios": "7", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.string.code-point-at": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "29", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "3.4", - "electron": "0.21" - }, - "es6.string.ends-with": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "29", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "3.4", - "electron": "0.21" - }, - "es6.string.fixed": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.10", - "android": "4", - "ios": "7", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.string.fontcolor": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.10", - "android": "4", - "ios": "7", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.string.fontsize": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.10", - "android": "4", - "ios": "7", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.string.from-code-point": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "29", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "3.4", - "electron": "0.21" - }, - "es6.string.includes": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "40", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "3.4", - "electron": "0.21" - }, - "es6.string.italics": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.10", - "android": "4", - "ios": "7", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.string.iterator": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "36", - "safari": "9", - "node": "0.12", - "ios": "9", - "samsung": "3", - "electron": "0.20" - }, - "es6.string.link": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.10", - "android": "4", - "ios": "7", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es7.string.pad-start": { - "chrome": "57", - "opera": "44", - "edge": "15", - "firefox": "48", - "safari": "10", - "node": "8", - "ios": "10", - "samsung": "7", - "electron": "1.7" - }, - "es7.string.pad-end": { - "chrome": "57", - "opera": "44", - "edge": "15", - "firefox": "48", - "safari": "10", - "node": "8", - "ios": "10", - "samsung": "7", - "electron": "1.7" - }, - "es6.string.raw": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "34", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "3.4", - "electron": "0.21" - }, - "es6.string.repeat": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "24", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "3.4", - "electron": "0.21" - }, - "es6.string.small": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.10", - "android": "4", - "ios": "7", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.string.starts-with": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "29", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "3.4", - "electron": "0.21" - }, - "es6.string.strike": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.10", - "android": "4", - "ios": "7", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.string.sub": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.10", - "android": "4", - "ios": "7", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.string.sup": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.10", - "android": "4", - "ios": "7", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.string.trim": { - "chrome": "5", - "opera": "10.50", - "edge": "12", - "firefox": "3.5", - "safari": "4", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es7.string.trim-left": { - "chrome": "66", - "opera": "53", - "edge": "79", - "firefox": "61", - "safari": "12", - "node": "10", - "ios": "12", - "samsung": "9", - "electron": "3" - }, - "es7.string.trim-right": { - "chrome": "66", - "opera": "53", - "edge": "79", - "firefox": "61", - "safari": "12", - "node": "10", - "ios": "12", - "samsung": "9", - "electron": "3" - }, - "es6.typed.array-buffer": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es6.typed.data-view": { - "chrome": "5", - "opera": "12", - "edge": "12", - "firefox": "15", - "safari": "5.1", - "node": "0.10", - "ie": "10", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "es6.typed.int8-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es6.typed.uint8-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es6.typed.uint8-clamped-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es6.typed.int16-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es6.typed.uint16-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es6.typed.int32-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es6.typed.uint32-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es6.typed.float32-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es6.typed.float64-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "es6.weak-map": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", - "safari": "9", - "node": "6.5", - "ios": "9", - "samsung": "5", - "electron": "1.2" - }, - "es6.weak-set": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", - "safari": "9", - "node": "6.5", - "ios": "9", - "samsung": "5", - "electron": "1.2" - } -} diff --git a/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json b/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json deleted file mode 100644 index 7ce01ed934442f06a6a65f534a8dc0ab1c933de2..0000000000000000000000000000000000000000 --- a/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - "esnext.global-this", - "esnext.promise.all-settled", - "esnext.string.match-all" -] diff --git a/node_modules/@babel/compat-data/data/native-modules.json b/node_modules/@babel/compat-data/data/native-modules.json deleted file mode 100644 index 4ede11b4dd973fead4da322a415d29eae79db1b7..0000000000000000000000000000000000000000 --- a/node_modules/@babel/compat-data/data/native-modules.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "es6.module": { - "chrome": "61", - "and_chr": "61", - "edge": "16", - "firefox": "60", - "and_ff": "60", - "node": "13.2.0", - "opera": "48", - "op_mob": "48", - "safari": "10.1", - "ios_saf": "10.3", - "samsung": "8.2", - "android": "61" - } -} diff --git a/node_modules/@babel/compat-data/data/overlapping-plugins.json b/node_modules/@babel/compat-data/data/overlapping-plugins.json deleted file mode 100644 index e5d9e4af42971e96dc86065c2a4e8846892b70b9..0000000000000000000000000000000000000000 --- a/node_modules/@babel/compat-data/data/overlapping-plugins.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "transform-async-to-generator": [ - "bugfix/transform-async-arrows-in-class" - ], - "transform-parameters": [ - "bugfix/transform-edge-default-parameters" - ], - "transform-function-name": [ - "bugfix/transform-edge-function-name" - ], - "transform-block-scoping": [ - "bugfix/transform-safari-block-shadowing", - "bugfix/transform-safari-for-shadowing" - ], - "transform-template-literals": [ - "bugfix/transform-tagged-template-caching" - ] -} diff --git a/node_modules/@babel/compat-data/data/plugin-bugfixes.json b/node_modules/@babel/compat-data/data/plugin-bugfixes.json deleted file mode 100644 index e7c13dc5129d2394823ffc92f2cf5a33527b8965..0000000000000000000000000000000000000000 --- a/node_modules/@babel/compat-data/data/plugin-bugfixes.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "transform-async-to-generator": { - "chrome": "55", - "opera": "42", - "edge": "15", - "firefox": "52", - "safari": "10.1", - "node": "7.6", - "ios": "10.3", - "samsung": "6", - "electron": "1.6" - }, - "bugfix/transform-async-arrows-in-class": { - "chrome": "55", - "opera": "42", - "edge": "15", - "firefox": "52", - "safari": "11", - "node": "7.6", - "ios": "11", - "samsung": "6", - "electron": "1.6" - }, - "transform-parameters": { - "chrome": "49", - "opera": "36", - "edge": "15", - "firefox": "53", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "bugfix/transform-edge-default-parameters": { - "chrome": "49", - "opera": "36", - "edge": "18", - "firefox": "52", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "transform-function-name": { - "chrome": "51", - "opera": "38", - "edge": "14", - "firefox": "53", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "bugfix/transform-edge-function-name": { - "chrome": "51", - "opera": "38", - "edge": "79", - "firefox": "53", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "transform-block-scoping": { - "chrome": "49", - "opera": "36", - "edge": "14", - "firefox": "51", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "bugfix/transform-safari-block-shadowing": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "44", - "safari": "11", - "node": "6", - "ie": "11", - "ios": "11", - "samsung": "5", - "electron": "0.37" - }, - "bugfix/transform-safari-for-shadowing": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "4", - "safari": "11", - "node": "6", - "ie": "11", - "ios": "11", - "samsung": "5", - "electron": "0.37" - }, - "transform-template-literals": { - "chrome": "41", - "opera": "28", - "edge": "13", - "firefox": "34", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "3.4", - "electron": "0.21" - }, - "bugfix/transform-tagged-template-caching": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "34", - "safari": "13", - "node": "4", - "ios": "13", - "samsung": "3.4", - "electron": "0.21" - } -} diff --git a/node_modules/@babel/compat-data/data/plugins.json b/node_modules/@babel/compat-data/data/plugins.json deleted file mode 100644 index 5664681d221409d532015a5274f3aa202b3b0aaa..0000000000000000000000000000000000000000 --- a/node_modules/@babel/compat-data/data/plugins.json +++ /dev/null @@ -1,433 +0,0 @@ -{ - "proposal-class-properties": { - "chrome": "74", - "opera": "61", - "edge": "79", - "node": "12", - "samsung": "11", - "electron": "6" - }, - "proposal-private-methods": { - "chrome": "84", - "edge": "84", - "electron": "10" - }, - "proposal-numeric-separator": { - "chrome": "75", - "opera": "62", - "edge": "79", - "firefox": "70", - "safari": "13", - "node": "12.5", - "ios": "13", - "samsung": "11", - "electron": "6" - }, - "proposal-logical-assignment-operators": { - "chrome": "85", - "firefox": "79", - "safari": "14", - "electron": "10" - }, - "proposal-nullish-coalescing-operator": { - "chrome": "80", - "opera": "67", - "edge": "80", - "firefox": "72", - "safari": "13.1", - "node": "14", - "ios": "13.4", - "electron": "8" - }, - "proposal-optional-chaining": { - "chrome": "80", - "opera": "67", - "edge": "80", - "firefox": "74", - "safari": "13.1", - "node": "14", - "ios": "13.4", - "electron": "8" - }, - "proposal-json-strings": { - "chrome": "66", - "opera": "53", - "edge": "79", - "firefox": "62", - "safari": "12", - "node": "10", - "ios": "12", - "samsung": "9", - "electron": "3" - }, - "proposal-optional-catch-binding": { - "chrome": "66", - "opera": "53", - "edge": "79", - "firefox": "58", - "safari": "11.1", - "node": "10", - "ios": "11.3", - "samsung": "9", - "electron": "3" - }, - "transform-parameters": { - "chrome": "49", - "opera": "36", - "edge": "18", - "firefox": "53", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "proposal-async-generator-functions": { - "chrome": "63", - "opera": "50", - "edge": "79", - "firefox": "57", - "safari": "12", - "node": "10", - "ios": "12", - "samsung": "8", - "electron": "3" - }, - "proposal-object-rest-spread": { - "chrome": "60", - "opera": "47", - "edge": "79", - "firefox": "55", - "safari": "11.1", - "node": "8.3", - "ios": "11.3", - "samsung": "8", - "electron": "2" - }, - "transform-dotall-regex": { - "chrome": "62", - "opera": "49", - "edge": "79", - "firefox": "78", - "safari": "11.1", - "node": "8.10", - "ios": "11.3", - "samsung": "8", - "electron": "3" - }, - "proposal-unicode-property-regex": { - "chrome": "64", - "opera": "51", - "edge": "79", - "firefox": "78", - "safari": "11.1", - "node": "10", - "ios": "11.3", - "samsung": "9", - "electron": "3" - }, - "transform-named-capturing-groups-regex": { - "chrome": "64", - "opera": "51", - "edge": "79", - "firefox": "78", - "safari": "11.1", - "node": "10", - "ios": "11.3", - "samsung": "9", - "electron": "3" - }, - "transform-async-to-generator": { - "chrome": "55", - "opera": "42", - "edge": "15", - "firefox": "52", - "safari": "11", - "node": "7.6", - "ios": "11", - "samsung": "6", - "electron": "1.6" - }, - "transform-exponentiation-operator": { - "chrome": "52", - "opera": "39", - "edge": "14", - "firefox": "52", - "safari": "10.1", - "node": "7", - "ios": "10.3", - "samsung": "6", - "electron": "1.3" - }, - "transform-template-literals": { - "chrome": "41", - "opera": "28", - "edge": "13", - "firefox": "34", - "safari": "13", - "node": "4", - "ios": "13", - "samsung": "3.4", - "electron": "0.21" - }, - "transform-literals": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "53", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "4", - "electron": "0.30" - }, - "transform-function-name": { - "chrome": "51", - "opera": "38", - "edge": "79", - "firefox": "53", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "transform-arrow-functions": { - "chrome": "47", - "opera": "34", - "edge": "13", - "firefox": "45", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.36" - }, - "transform-block-scoped-functions": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "46", - "safari": "10", - "node": "4", - "ie": "11", - "ios": "10", - "samsung": "3.4", - "electron": "0.21" - }, - "transform-classes": { - "chrome": "46", - "opera": "33", - "edge": "13", - "firefox": "45", - "safari": "10", - "node": "5", - "ios": "10", - "samsung": "5", - "electron": "0.36" - }, - "transform-object-super": { - "chrome": "46", - "opera": "33", - "edge": "13", - "firefox": "45", - "safari": "10", - "node": "5", - "ios": "10", - "samsung": "5", - "electron": "0.36" - }, - "transform-shorthand-properties": { - "chrome": "43", - "opera": "30", - "edge": "12", - "firefox": "33", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "4", - "electron": "0.27" - }, - "transform-duplicate-keys": { - "chrome": "42", - "opera": "29", - "edge": "12", - "firefox": "34", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "3.4", - "electron": "0.25" - }, - "transform-computed-properties": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "34", - "safari": "7.1", - "node": "4", - "ios": "8", - "samsung": "4", - "electron": "0.30" - }, - "transform-for-of": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "transform-sticky-regex": { - "chrome": "49", - "opera": "36", - "edge": "13", - "firefox": "3", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, - "transform-unicode-escapes": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "53", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "4", - "electron": "0.30" - }, - "transform-unicode-regex": { - "chrome": "50", - "opera": "37", - "edge": "13", - "firefox": "46", - "safari": "12", - "node": "6", - "ios": "12", - "samsung": "5", - "electron": "1.1" - }, - "transform-spread": { - "chrome": "46", - "opera": "33", - "edge": "13", - "firefox": "36", - "safari": "10", - "node": "5", - "ios": "10", - "samsung": "5", - "electron": "0.36" - }, - "transform-destructuring": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, - "transform-block-scoping": { - "chrome": "49", - "opera": "36", - "edge": "14", - "firefox": "51", - "safari": "11", - "node": "6", - "ios": "11", - "samsung": "5", - "electron": "0.37" - }, - "transform-typeof-symbol": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "36", - "safari": "9", - "node": "0.12", - "ios": "9", - "samsung": "3", - "electron": "0.20" - }, - "transform-new-target": { - "chrome": "46", - "opera": "33", - "edge": "14", - "firefox": "41", - "safari": "10", - "node": "5", - "ios": "10", - "samsung": "5", - "electron": "0.36" - }, - "transform-regenerator": { - "chrome": "50", - "opera": "37", - "edge": "13", - "firefox": "53", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "1.1" - }, - "transform-member-expression-literals": { - "chrome": "7", - "opera": "12", - "edge": "12", - "firefox": "2", - "safari": "5.1", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "transform-property-literals": { - "chrome": "7", - "opera": "12", - "edge": "12", - "firefox": "2", - "safari": "5.1", - "node": "0.10", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "transform-reserved-words": { - "chrome": "13", - "opera": "10.50", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.10", - "ie": "9", - "android": "4.4", - "ios": "6", - "phantom": "2", - "samsung": "1", - "electron": "0.20" - }, - "proposal-export-namespace-from": { - "chrome": "72", - "edge": "79", - "opera": "60", - "firefox": "80", - "node": "13.2", - "samsung": "11.0" - } -} diff --git a/node_modules/@babel/compat-data/native-modules.js b/node_modules/@babel/compat-data/native-modules.js deleted file mode 100644 index efa3031c0a5322f5861d8cf1b4deff99e8fde667..0000000000000000000000000000000000000000 --- a/node_modules/@babel/compat-data/native-modules.js +++ /dev/null @@ -1,4 +0,0 @@ -// Node < 13.3 doesn't support export maps in package.json. -// Use this proxy file as a fallback. - -module.exports = require("./data/native-modules.json"); diff --git a/node_modules/@babel/compat-data/overlapping-plugins.js b/node_modules/@babel/compat-data/overlapping-plugins.js deleted file mode 100644 index 9f7d8efde56f442ea2e77e84ba7d751f312c8fb1..0000000000000000000000000000000000000000 --- a/node_modules/@babel/compat-data/overlapping-plugins.js +++ /dev/null @@ -1,4 +0,0 @@ -// Node < 13.3 doesn't support export maps in package.json. -// Use this proxy file as a fallback. - -module.exports = require("./data/overlapping-plugins.json"); diff --git a/node_modules/@babel/compat-data/package.json b/node_modules/@babel/compat-data/package.json deleted file mode 100644 index 0921e8e669e32ba2b3ecf7cdb4362750428f44ab..0000000000000000000000000000000000000000 --- a/node_modules/@babel/compat-data/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_from": "@babel/compat-data@^7.11.0", - "_id": "@babel/compat-data@7.11.0", - "_inBundle": false, - "_integrity": "sha512-TPSvJfv73ng0pfnEOh17bYMPQbI95+nGWc71Ss4vZdRBHTDqmM9Z8ZV4rYz8Ks7sfzc95n30k6ODIq5UGnXcYQ==", - "_location": "/@babel/compat-data", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/compat-data@^7.11.0", - "name": "@babel/compat-data", - "escapedName": "@babel%2fcompat-data", - "scope": "@babel", - "rawSpec": "^7.11.0", - "saveSpec": null, - "fetchSpec": "^7.11.0" - }, - "_requiredBy": [ - "/@babel/helper-compilation-targets", - "/@babel/preset-env" - ], - "_resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.11.0.tgz", - "_shasum": "e9f73efe09af1355b723a7f39b11bad637d7c99c", - "_spec": "@babel/compat-data@^7.11.0", - "_where": "/Users/rolfguescini/source/laudatio6/node_modules/@babel/preset-env", - "author": { - "name": "The Babel Team", - "url": "https://babeljs.io/team" - }, - "bugs": { - "url": "https://github.com/babel/babel/issues" - }, - "bundleDependencies": false, - "dependencies": { - "browserslist": "^4.12.0", - "invariant": "^2.2.4", - "semver": "^5.5.0" - }, - "deprecated": false, - "description": "", - "devDependencies": { - "@babel/helper-compilation-targets": "^7.10.4", - "electron-to-chromium": "1.3.513", - "lodash": "^4.17.19", - "mdn-browser-compat-data": "1.0.31" - }, - "exports": { - "./plugins": "./data/plugins.json", - "./native-modules": "./data/native-modules.json", - "./corejs2-built-ins": "./data/corejs2-built-ins.json", - "./corejs3-shipped-proposals": "./data/corejs3-shipped-proposals.json", - "./overlapping-plugins": "./data/overlapping-plugins.json", - "./plugin-bugfixes": "./data/plugin-bugfixes.json" - }, - "gitHead": "38dda069eeac2e31bce3f56290998d30bee1ed6b", - "homepage": "https://github.com/babel/babel#readme", - "keywords": [ - "babel", - "compat-table", - "compat-data" - ], - "license": "MIT", - "name": "@babel/compat-data", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/babel/babel.git", - "directory": "packages/babel-compat-data" - }, - "scripts": { - "build-data": "./scripts/download-compat-table.sh && node ./scripts/build-data.js && node ./scripts/build-modules-support.js && node ./scripts/build-bugfixes-targets.js" - }, - "version": "7.11.0" -} diff --git a/node_modules/@babel/compat-data/plugin-bugfixes.js b/node_modules/@babel/compat-data/plugin-bugfixes.js deleted file mode 100644 index 79e5bfb7b572e5b87cced0a78322d97feef8d3a7..0000000000000000000000000000000000000000 --- a/node_modules/@babel/compat-data/plugin-bugfixes.js +++ /dev/null @@ -1,4 +0,0 @@ -// Node < 13.3 doesn't support export maps in package.json. -// Use this proxy file as a fallback. - -module.exports = require("./data/plugin-bugfixes.json"); diff --git a/node_modules/@babel/compat-data/plugins.js b/node_modules/@babel/compat-data/plugins.js deleted file mode 100644 index 74a9d60f2310adcdbcc04e6c22e61424f1f3d070..0000000000000000000000000000000000000000 --- a/node_modules/@babel/compat-data/plugins.js +++ /dev/null @@ -1,4 +0,0 @@ -// Node < 13.3 doesn't support export maps in package.json. -// Use this proxy file as a fallback. - -module.exports = require("./data/plugins.json"); diff --git a/node_modules/@babel/core/lib/config/files/import.js b/node_modules/@babel/core/lib/config/files/import.js deleted file mode 100644 index 97a5d83a0567295cae5471454f775807b1aa669d..0000000000000000000000000000000000000000 --- a/node_modules/@babel/core/lib/config/files/import.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = import_; - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function import_(filepath) { - return Promise.resolve(`${filepath}`).then(s => _interopRequireWildcard(require(s))); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/module-types.js b/node_modules/@babel/core/lib/config/files/module-types.js deleted file mode 100644 index 6c17b8e374bf88b483dd67e918e22ac0f85e6ffc..0000000000000000000000000000000000000000 --- a/node_modules/@babel/core/lib/config/files/module-types.js +++ /dev/null @@ -1,96 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = loadCjsOrMjsDefault; - -var _async = require("../../gensync-utils/async"); - -function _path() { - const data = _interopRequireDefault(require("path")); - - _path = function () { - return data; - }; - - return data; -} - -function _url() { - const data = require("url"); - - _url = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -let import_; - -try { - import_ = require("./import").default; -} catch (_unused) {} - -function* loadCjsOrMjsDefault(filepath, asyncError) { - switch (guessJSModuleType(filepath)) { - case "cjs": - return loadCjsDefault(filepath); - - case "unknown": - try { - return loadCjsDefault(filepath); - } catch (e) { - if (e.code !== "ERR_REQUIRE_ESM") throw e; - } - - case "mjs": - if (yield* (0, _async.isAsync)()) { - return yield* (0, _async.waitFor)(loadMjsDefault(filepath)); - } - - throw new Error(asyncError); - } -} - -function guessJSModuleType(filename) { - switch (_path().default.extname(filename)) { - case ".cjs": - return "cjs"; - - case ".mjs": - return "mjs"; - - default: - return "unknown"; - } -} - -function loadCjsDefault(filepath) { - const module = require(filepath); - - return (module == null ? void 0 : module.__esModule) ? module.default || undefined : module; -} - -function loadMjsDefault(_x) { - return _loadMjsDefault.apply(this, arguments); -} - -function _loadMjsDefault() { - _loadMjsDefault = _asyncToGenerator(function* (filepath) { - if (!import_) { - throw new Error("Internal error: Native ECMAScript modules aren't supported" + " by this platform.\n"); - } - - const module = yield import_((0, _url().pathToFileURL)(filepath)); - return module.default; - }); - return _loadMjsDefault.apply(this, arguments); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/printer.js b/node_modules/@babel/core/lib/config/printer.js deleted file mode 100644 index b007aa4c968d892935b470d807db5296f109bfe7..0000000000000000000000000000000000000000 --- a/node_modules/@babel/core/lib/config/printer.js +++ /dev/null @@ -1,127 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ConfigPrinter = exports.ChainFormatter = void 0; -const ChainFormatter = { - Programmatic: 0, - Config: 1 -}; -exports.ChainFormatter = ChainFormatter; -const Formatter = { - title(type, callerName, filepath) { - let title = ""; - - if (type === ChainFormatter.Programmatic) { - title = "programmatic options"; - - if (callerName) { - title += " from " + callerName; - } - } else { - title = "config " + filepath; - } - - return title; - }, - - loc(index, envName) { - let loc = ""; - - if (index != null) { - loc += `.overrides[${index}]`; - } - - if (envName != null) { - loc += `.env["${envName}"]`; - } - - return loc; - }, - - optionsAndDescriptors(opt) { - const content = Object.assign({}, opt.options); - delete content.overrides; - delete content.env; - const pluginDescriptors = [...opt.plugins()]; - - if (pluginDescriptors.length) { - content.plugins = pluginDescriptors.map(d => descriptorToConfig(d)); - } - - const presetDescriptors = [...opt.presets()]; - - if (presetDescriptors.length) { - content.presets = [...presetDescriptors].map(d => descriptorToConfig(d)); - } - - return JSON.stringify(content, undefined, 2); - } - -}; - -function descriptorToConfig(d) { - var _d$file; - - let name = (_d$file = d.file) == null ? void 0 : _d$file.request; - - if (name == null) { - if (typeof d.value === "object") { - name = d.value; - } else if (typeof d.value === "function") { - name = `[Function: ${d.value.toString().substr(0, 50)} ... ]`; - } - } - - if (name == null) { - name = "[Unknown]"; - } - - if (d.options === undefined) { - return name; - } else if (d.name == null) { - return [name, d.options]; - } else { - return [name, d.options, d.name]; - } -} - -class ConfigPrinter { - constructor() { - this._stack = []; - } - - configure(enabled, type, { - callerName, - filepath - }) { - if (!enabled) return () => {}; - return (content, index, envName) => { - this._stack.push({ - type, - callerName, - filepath, - content, - index, - envName - }); - }; - } - - static format(config) { - let title = Formatter.title(config.type, config.callerName, config.filepath); - const loc = Formatter.loc(config.index, config.envName); - if (loc) title += ` ${loc}`; - const content = Formatter.optionsAndDescriptors(config.content); - return `${title}\n${content}`; - } - - output() { - if (this._stack.length === 0) return ""; - return this._stack.map(s => ConfigPrinter.format(s)).join("\n\n"); - } - -} - -exports.ConfigPrinter = ConfigPrinter; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/gensync-utils/async.js b/node_modules/@babel/core/lib/gensync-utils/async.js deleted file mode 100644 index 36b777d52712a43f6937b055c26cb0f56ed7007d..0000000000000000000000000000000000000000 --- a/node_modules/@babel/core/lib/gensync-utils/async.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.maybeAsync = maybeAsync; -exports.forwardAsync = forwardAsync; -exports.isThenable = isThenable; -exports.waitFor = exports.onFirstPause = exports.isAsync = void 0; - -function _gensync() { - const data = _interopRequireDefault(require("gensync")); - - _gensync = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const id = x => x; - -const runGenerator = (0, _gensync().default)(function* (item) { - return yield* item; -}); -const isAsync = (0, _gensync().default)({ - sync: () => false, - errback: cb => cb(null, true) -}); -exports.isAsync = isAsync; - -function maybeAsync(fn, message) { - return (0, _gensync().default)({ - sync(...args) { - const result = fn.apply(this, args); - if (isThenable(result)) throw new Error(message); - return result; - }, - - async(...args) { - return Promise.resolve(fn.apply(this, args)); - } - - }); -} - -const withKind = (0, _gensync().default)({ - sync: cb => cb("sync"), - async: cb => cb("async") -}); - -function forwardAsync(action, cb) { - const g = (0, _gensync().default)(action); - return withKind(kind => { - const adapted = g[kind]; - return cb(adapted); - }); -} - -const onFirstPause = (0, _gensync().default)({ - name: "onFirstPause", - arity: 2, - sync: function (item) { - return runGenerator.sync(item); - }, - errback: function (item, firstPause, cb) { - let completed = false; - runGenerator.errback(item, (err, value) => { - completed = true; - cb(err, value); - }); - - if (!completed) { - firstPause(); - } - } -}); -exports.onFirstPause = onFirstPause; -const waitFor = (0, _gensync().default)({ - sync: id, - async: id -}); -exports.waitFor = waitFor; - -function isThenable(val) { - return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function"; -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/gensync-utils/fs.js b/node_modules/@babel/core/lib/gensync-utils/fs.js deleted file mode 100644 index 02f445387f63cc65aab2296fa50cbe86aacfbae2..0000000000000000000000000000000000000000 --- a/node_modules/@babel/core/lib/gensync-utils/fs.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.stat = exports.exists = exports.readFile = void 0; - -function _fs() { - const data = _interopRequireDefault(require("fs")); - - _fs = function () { - return data; - }; - - return data; -} - -function _gensync() { - const data = _interopRequireDefault(require("gensync")); - - _gensync = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const readFile = (0, _gensync().default)({ - sync: _fs().default.readFileSync, - errback: _fs().default.readFile -}); -exports.readFile = readFile; -const exists = (0, _gensync().default)({ - sync(path) { - try { - _fs().default.accessSync(path); - - return true; - } catch (_unused) { - return false; - } - }, - - errback: (path, cb) => _fs().default.access(path, undefined, err => cb(null, !err)) -}); -exports.exists = exists; -const stat = (0, _gensync().default)({ - sync: _fs().default.statSync, - errback: _fs().default.stat -}); -exports.stat = stat; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/gensync-utils/resolve.js b/node_modules/@babel/core/lib/gensync-utils/resolve.js deleted file mode 100644 index 2ca39d7612d47204e48716f7cb40f6c9533234bd..0000000000000000000000000000000000000000 --- a/node_modules/@babel/core/lib/gensync-utils/resolve.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _resolve() { - const data = _interopRequireDefault(require("resolve")); - - _resolve = function () { - return data; - }; - - return data; -} - -function _gensync() { - const data = _interopRequireDefault(require("gensync")); - - _gensync = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _default = (0, _gensync().default)({ - sync: _resolve().default.sync, - errback: _resolve().default -}); - -exports.default = _default; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/parser/index.js b/node_modules/@babel/core/lib/parser/index.js deleted file mode 100644 index e8fcc7fe4ac4ffd657c28f4dd17d3d180abc0664..0000000000000000000000000000000000000000 --- a/node_modules/@babel/core/lib/parser/index.js +++ /dev/null @@ -1,97 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = parser; - -function _parser() { - const data = require("@babel/parser"); - - _parser = function () { - return data; - }; - - return data; -} - -function _codeFrame() { - const data = require("@babel/code-frame"); - - _codeFrame = function () { - return data; - }; - - return data; -} - -var _missingPluginHelper = _interopRequireDefault(require("./util/missing-plugin-helper")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function* parser(pluginPasses, { - parserOpts, - highlightCode = true, - filename = "unknown" -}, code) { - try { - const results = []; - - for (const plugins of pluginPasses) { - for (const plugin of plugins) { - const { - parserOverride - } = plugin; - - if (parserOverride) { - const ast = parserOverride(code, parserOpts, _parser().parse); - if (ast !== undefined) results.push(ast); - } - } - } - - if (results.length === 0) { - return (0, _parser().parse)(code, parserOpts); - } else if (results.length === 1) { - yield* []; - - if (typeof results[0].then === "function") { - throw new Error(`You appear to be using an async parser plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); - } - - return results[0]; - } - - throw new Error("More than one plugin attempted to override parsing."); - } catch (err) { - if (err.code === "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED") { - err.message += "\nConsider renaming the file to '.mjs', or setting sourceType:module " + "or sourceType:unambiguous in your Babel config for this file."; - } - - const { - loc, - missingPlugin - } = err; - - if (loc) { - const codeFrame = (0, _codeFrame().codeFrameColumns)(code, { - start: { - line: loc.line, - column: loc.column + 1 - } - }, { - highlightCode - }); - - if (missingPlugin) { - err.message = `${filename}: ` + (0, _missingPluginHelper.default)(missingPlugin[0], loc, codeFrame); - } else { - err.message = `${filename}: ${err.message}\n\n` + codeFrame; - } - - err.code = "BABEL_PARSE_ERROR"; - } - - throw err; - } -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js b/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js deleted file mode 100644 index ae58e1ecac50b48855f5f6840a6b4cd1510f9ed5..0000000000000000000000000000000000000000 --- a/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js +++ /dev/null @@ -1,291 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = generateMissingPluginMessage; -const pluginNameMap = { - classProperties: { - syntax: { - name: "@babel/plugin-syntax-class-properties", - url: "https://git.io/vb4yQ" - }, - transform: { - name: "@babel/plugin-proposal-class-properties", - url: "https://git.io/vb4SL" - } - }, - classPrivateProperties: { - syntax: { - name: "@babel/plugin-syntax-class-properties", - url: "https://git.io/vb4yQ" - }, - transform: { - name: "@babel/plugin-proposal-class-properties", - url: "https://git.io/vb4SL" - } - }, - classPrivateMethods: { - syntax: { - name: "@babel/plugin-syntax-class-properties", - url: "https://git.io/vb4yQ" - }, - transform: { - name: "@babel/plugin-proposal-private-methods", - url: "https://git.io/JvpRG" - } - }, - decimal: { - syntax: { - name: "@babel/plugin-syntax-decimal", - url: "https://git.io/JfKOH" - } - }, - decorators: { - syntax: { - name: "@babel/plugin-syntax-decorators", - url: "https://git.io/vb4y9" - }, - transform: { - name: "@babel/plugin-proposal-decorators", - url: "https://git.io/vb4ST" - } - }, - doExpressions: { - syntax: { - name: "@babel/plugin-syntax-do-expressions", - url: "https://git.io/vb4yh" - }, - transform: { - name: "@babel/plugin-proposal-do-expressions", - url: "https://git.io/vb4S3" - } - }, - dynamicImport: { - syntax: { - name: "@babel/plugin-syntax-dynamic-import", - url: "https://git.io/vb4Sv" - } - }, - exportDefaultFrom: { - syntax: { - name: "@babel/plugin-syntax-export-default-from", - url: "https://git.io/vb4SO" - }, - transform: { - name: "@babel/plugin-proposal-export-default-from", - url: "https://git.io/vb4yH" - } - }, - exportNamespaceFrom: { - syntax: { - name: "@babel/plugin-syntax-export-namespace-from", - url: "https://git.io/vb4Sf" - }, - transform: { - name: "@babel/plugin-proposal-export-namespace-from", - url: "https://git.io/vb4SG" - } - }, - flow: { - syntax: { - name: "@babel/plugin-syntax-flow", - url: "https://git.io/vb4yb" - }, - transform: { - name: "@babel/preset-flow", - url: "https://git.io/JfeDn" - } - }, - functionBind: { - syntax: { - name: "@babel/plugin-syntax-function-bind", - url: "https://git.io/vb4y7" - }, - transform: { - name: "@babel/plugin-proposal-function-bind", - url: "https://git.io/vb4St" - } - }, - functionSent: { - syntax: { - name: "@babel/plugin-syntax-function-sent", - url: "https://git.io/vb4yN" - }, - transform: { - name: "@babel/plugin-proposal-function-sent", - url: "https://git.io/vb4SZ" - } - }, - importMeta: { - syntax: { - name: "@babel/plugin-syntax-import-meta", - url: "https://git.io/vbKK6" - } - }, - jsx: { - syntax: { - name: "@babel/plugin-syntax-jsx", - url: "https://git.io/vb4yA" - }, - transform: { - name: "@babel/preset-react", - url: "https://git.io/JfeDR" - } - }, - moduleAttributes: { - syntax: { - name: "@babel/plugin-syntax-module-attributes", - url: "https://git.io/JfK3k" - } - }, - numericSeparator: { - syntax: { - name: "@babel/plugin-syntax-numeric-separator", - url: "https://git.io/vb4Sq" - }, - transform: { - name: "@babel/plugin-proposal-numeric-separator", - url: "https://git.io/vb4yS" - } - }, - optionalChaining: { - syntax: { - name: "@babel/plugin-syntax-optional-chaining", - url: "https://git.io/vb4Sc" - }, - transform: { - name: "@babel/plugin-proposal-optional-chaining", - url: "https://git.io/vb4Sk" - } - }, - pipelineOperator: { - syntax: { - name: "@babel/plugin-syntax-pipeline-operator", - url: "https://git.io/vb4yj" - }, - transform: { - name: "@babel/plugin-proposal-pipeline-operator", - url: "https://git.io/vb4SU" - } - }, - privateIn: { - syntax: { - name: "@babel/plugin-syntax-private-property-in-object", - url: "https://git.io/JfK3q" - }, - transform: { - name: "@babel/plugin-proposal-private-property-in-object", - url: "https://git.io/JfK3O" - } - }, - recordAndTuple: { - syntax: { - name: "@babel/plugin-syntax-record-and-tuple", - url: "https://git.io/JvKp3" - } - }, - throwExpressions: { - syntax: { - name: "@babel/plugin-syntax-throw-expressions", - url: "https://git.io/vb4SJ" - }, - transform: { - name: "@babel/plugin-proposal-throw-expressions", - url: "https://git.io/vb4yF" - } - }, - typescript: { - syntax: { - name: "@babel/plugin-syntax-typescript", - url: "https://git.io/vb4SC" - }, - transform: { - name: "@babel/preset-typescript", - url: "https://git.io/JfeDz" - } - }, - asyncGenerators: { - syntax: { - name: "@babel/plugin-syntax-async-generators", - url: "https://git.io/vb4SY" - }, - transform: { - name: "@babel/plugin-proposal-async-generator-functions", - url: "https://git.io/vb4yp" - } - }, - logicalAssignment: { - syntax: { - name: "@babel/plugin-syntax-logical-assignment-operators", - url: "https://git.io/vAlBp" - }, - transform: { - name: "@babel/plugin-proposal-logical-assignment-operators", - url: "https://git.io/vAlRe" - } - }, - nullishCoalescingOperator: { - syntax: { - name: "@babel/plugin-syntax-nullish-coalescing-operator", - url: "https://git.io/vb4yx" - }, - transform: { - name: "@babel/plugin-proposal-nullish-coalescing-operator", - url: "https://git.io/vb4Se" - } - }, - objectRestSpread: { - syntax: { - name: "@babel/plugin-syntax-object-rest-spread", - url: "https://git.io/vb4y5" - }, - transform: { - name: "@babel/plugin-proposal-object-rest-spread", - url: "https://git.io/vb4Ss" - } - }, - optionalCatchBinding: { - syntax: { - name: "@babel/plugin-syntax-optional-catch-binding", - url: "https://git.io/vb4Sn" - }, - transform: { - name: "@babel/plugin-proposal-optional-catch-binding", - url: "https://git.io/vb4SI" - } - } -}; -pluginNameMap.privateIn.syntax = pluginNameMap.privateIn.transform; - -const getNameURLCombination = ({ - name, - url -}) => `${name} (${url})`; - -function generateMissingPluginMessage(missingPluginName, loc, codeFrame) { - let helpMessage = `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` + `(${loc.line}:${loc.column + 1}):\n\n` + codeFrame; - const pluginInfo = pluginNameMap[missingPluginName]; - - if (pluginInfo) { - const { - syntax: syntaxPlugin, - transform: transformPlugin - } = pluginInfo; - - if (syntaxPlugin) { - const syntaxPluginInfo = getNameURLCombination(syntaxPlugin); - - if (transformPlugin) { - const transformPluginInfo = getNameURLCombination(transformPlugin); - const sectionType = transformPlugin.name.startsWith("@babel/plugin") ? "plugins" : "presets"; - helpMessage += `\n\nAdd ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation. -If you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`; - } else { - helpMessage += `\n\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` + `to enable parsing.`; - } - } - } - - return helpMessage; -} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/ms/index.js b/node_modules/@babel/core/node_modules/ms/index.js deleted file mode 100644 index c4498bcc212589664a5fe0d45e5908b174ab0a37..0000000000000000000000000000000000000000 --- a/node_modules/@babel/core/node_modules/ms/index.js +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} diff --git a/node_modules/@babel/core/node_modules/ms/license.md b/node_modules/@babel/core/node_modules/ms/license.md deleted file mode 100644 index 69b61253a38926757b7de1d4df4880fc2105c2c9..0000000000000000000000000000000000000000 --- a/node_modules/@babel/core/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Zeit, Inc. - -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. diff --git a/node_modules/@babel/core/node_modules/ms/package.json b/node_modules/@babel/core/node_modules/ms/package.json deleted file mode 100644 index 895f66939c14ab1395f3ceaf2939ff1130094ff2..0000000000000000000000000000000000000000 --- a/node_modules/@babel/core/node_modules/ms/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "ms@^2.1.1", - "_id": "ms@2.1.2", - "_inBundle": false, - "_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "_location": "/@babel/core/ms", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "ms@^2.1.1", - "name": "ms", - "escapedName": "ms", - "rawSpec": "^2.1.1", - "saveSpec": null, - "fetchSpec": "^2.1.1" - }, - "_requiredBy": [ - "/@babel/core/debug" - ], - "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "_shasum": "d09d1f357b443f493382a8eb3ccd183872ae6009", - "_spec": "ms@^2.1.1", - "_where": "/Users/rolfguescini/source/laudatio6/node_modules/@babel/core/node_modules/debug", - "bugs": { - "url": "https://github.com/zeit/ms/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Tiny millisecond conversion utility", - "devDependencies": { - "eslint": "4.12.1", - "expect.js": "0.3.1", - "husky": "0.14.3", - "lint-staged": "5.0.0", - "mocha": "4.0.1" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/zeit/ms#readme", - "license": "MIT", - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "main": "./index", - "name": "ms", - "repository": { - "type": "git", - "url": "git+https://github.com/zeit/ms.git" - }, - "scripts": { - "lint": "eslint lib/* bin/*", - "precommit": "lint-staged", - "test": "mocha tests.js" - }, - "version": "2.1.2" -} diff --git a/node_modules/@babel/core/node_modules/ms/readme.md b/node_modules/@babel/core/node_modules/ms/readme.md deleted file mode 100644 index 9a1996b17e0de6854dd1cf10c5f2ee642e494085..0000000000000000000000000000000000000000 --- a/node_modules/@babel/core/node_modules/ms/readme.md +++ /dev/null @@ -1,60 +0,0 @@ -# ms - -[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) -[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit) - -Use this package to easily convert various time formats to milliseconds. - -## Examples - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('1y') // 31557600000 -ms('100') // 100 -ms('-3 days') // -259200000 -ms('-1h') // -3600000 -ms('-200') // -200 -``` - -### Convert from Milliseconds - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(-3 * 60000) // "-3m" -ms(ms('10 hours')) // "10h" -``` - -### Time Format Written-Out - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(-3 * 60000, { long: true }) // "-3 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -## Features - -- Works both in [Node.js](https://nodejs.org) and in the browser -- If a number is supplied to `ms`, a string with a unit is returned -- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) -- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned - -## Related Packages - -- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. - -## Caught a Bug? - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! - -As always, you can run the tests using: `npm test` diff --git a/node_modules/@babel/helper-compilation-targets/LICENSE b/node_modules/@babel/helper-compilation-targets/LICENSE deleted file mode 100644 index f31575ec773bb199aeb7c0d0f1612cfe1c7038f1..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-compilation-targets/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -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. diff --git a/node_modules/@babel/helper-compilation-targets/lib/debug.js b/node_modules/@babel/helper-compilation-targets/lib/debug.js deleted file mode 100644 index 78cc3aa8e5ee0605cfe9433237c495289a88e70e..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-compilation-targets/lib/debug.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getInclusionReasons = getInclusionReasons; - -var _semver = _interopRequireDefault(require("semver")); - -var _pretty = require("./pretty"); - -var _utils = require("./utils"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getInclusionReasons(item, targetVersions, list) { - const minVersions = list[item] || {}; - return Object.keys(targetVersions).reduce((result, env) => { - const minVersion = (0, _utils.getLowestImplementedVersion)(minVersions, env); - const targetVersion = targetVersions[env]; - - if (!minVersion) { - result[env] = (0, _pretty.prettifyVersion)(targetVersion); - } else { - const minIsUnreleased = (0, _utils.isUnreleasedVersion)(minVersion, env); - const targetIsUnreleased = (0, _utils.isUnreleasedVersion)(targetVersion, env); - - if (!targetIsUnreleased && (minIsUnreleased || _semver.default.lt(targetVersion.toString(), (0, _utils.semverify)(minVersion)))) { - result[env] = (0, _pretty.prettifyVersion)(targetVersion); - } - } - - return result; - }, {}); -} \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/lib/filter-items.js b/node_modules/@babel/helper-compilation-targets/lib/filter-items.js deleted file mode 100644 index 50f9de50ecbd488d5ac690e18132752a24bbd556..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-compilation-targets/lib/filter-items.js +++ /dev/null @@ -1,90 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.targetsSupported = targetsSupported; -exports.isRequired = isRequired; -exports.default = filterItems; - -var _semver = _interopRequireDefault(require("semver")); - -var _plugins = _interopRequireDefault(require("@babel/compat-data/plugins")); - -var _utils = require("./utils"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function targetsSupported(target, support) { - const targetEnvironments = Object.keys(target); - - if (targetEnvironments.length === 0) { - return false; - } - - const unsupportedEnvironments = targetEnvironments.filter(environment => { - const lowestImplementedVersion = (0, _utils.getLowestImplementedVersion)(support, environment); - - if (!lowestImplementedVersion) { - return true; - } - - const lowestTargetedVersion = target[environment]; - - if ((0, _utils.isUnreleasedVersion)(lowestTargetedVersion, environment)) { - return false; - } - - if ((0, _utils.isUnreleasedVersion)(lowestImplementedVersion, environment)) { - return true; - } - - if (!_semver.default.valid(lowestTargetedVersion.toString())) { - throw new Error(`Invalid version passed for target "${environment}": "${lowestTargetedVersion}". ` + "Versions must be in semver format (major.minor.patch)"); - } - - return _semver.default.gt((0, _utils.semverify)(lowestImplementedVersion), lowestTargetedVersion.toString()); - }); - return unsupportedEnvironments.length === 0; -} - -function isRequired(name, targets, { - compatData = _plugins.default, - includes, - excludes -} = {}) { - if (excludes == null ? void 0 : excludes.has(name)) return false; - if (includes == null ? void 0 : includes.has(name)) return true; - return !targetsSupported(targets, compatData[name]); -} - -function filterItems(list, includes, excludes, targets, defaultIncludes, defaultExcludes, pluginSyntaxMap) { - const result = new Set(); - const options = { - compatData: list, - includes, - excludes - }; - - for (const item in list) { - if (isRequired(item, targets, options)) { - result.add(item); - } else if (pluginSyntaxMap) { - const shippedProposalsSyntax = pluginSyntaxMap.get(item); - - if (shippedProposalsSyntax) { - result.add(shippedProposalsSyntax); - } - } - } - - if (defaultIncludes) { - defaultIncludes.forEach(item => !excludes.has(item) && result.add(item)); - } - - if (defaultExcludes) { - defaultExcludes.forEach(item => !includes.has(item) && result.delete(item)); - } - - return result; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/lib/index.js b/node_modules/@babel/helper-compilation-targets/lib/index.js deleted file mode 100644 index bd069773222d9a117773bf58a4b52c20a15eb27c..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-compilation-targets/lib/index.js +++ /dev/null @@ -1,235 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isBrowsersQueryValid = isBrowsersQueryValid; -exports.default = getTargets; -Object.defineProperty(exports, "unreleasedLabels", { - enumerable: true, - get: function () { - return _targets.unreleasedLabels; - } -}); -Object.defineProperty(exports, "prettifyTargets", { - enumerable: true, - get: function () { - return _pretty.prettifyTargets; - } -}); -Object.defineProperty(exports, "getInclusionReasons", { - enumerable: true, - get: function () { - return _debug.getInclusionReasons; - } -}); -Object.defineProperty(exports, "filterItems", { - enumerable: true, - get: function () { - return _filterItems.default; - } -}); -Object.defineProperty(exports, "isRequired", { - enumerable: true, - get: function () { - return _filterItems.isRequired; - } -}); - -var _browserslist = _interopRequireDefault(require("browserslist")); - -var _levenary = _interopRequireDefault(require("levenary")); - -var _invariant = _interopRequireDefault(require("invariant")); - -var _nativeModules = _interopRequireDefault(require("@babel/compat-data/native-modules")); - -var _utils = require("./utils"); - -var _targets = require("./targets"); - -var _options = require("./options"); - -var _pretty = require("./pretty"); - -var _debug = require("./debug"); - -var _filterItems = _interopRequireWildcard(require("./filter-items")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const browserslistDefaults = _browserslist.default.defaults; -const validBrowserslistTargets = [...Object.keys(_browserslist.default.data), ...Object.keys(_browserslist.default.aliases)]; - -function objectToBrowserslist(object) { - return Object.keys(object).reduce((list, targetName) => { - if (validBrowserslistTargets.indexOf(targetName) >= 0) { - const targetVersion = object[targetName]; - return list.concat(`${targetName} ${targetVersion}`); - } - - return list; - }, []); -} - -function validateTargetNames(targets) { - const validTargets = Object.keys(_options.TargetNames); - - for (const target in targets) { - if (!_options.TargetNames[target]) { - throw new Error(`Invalid Option: '${target}' is not a valid target - Maybe you meant to use '${(0, _levenary.default)(target, validTargets)}'?`); - } - } - - return targets; -} - -function isBrowsersQueryValid(browsers) { - return typeof browsers === "string" || Array.isArray(browsers); -} - -function validateBrowsers(browsers) { - (0, _invariant.default)(typeof browsers === "undefined" || isBrowsersQueryValid(browsers), `Invalid Option: '${String(browsers)}' is not a valid browserslist query`); - return browsers; -} - -function getLowestVersions(browsers) { - return browsers.reduce((all, browser) => { - const [browserName, browserVersion] = browser.split(" "); - const normalizedBrowserName = _targets.browserNameMap[browserName]; - - if (!normalizedBrowserName) { - return all; - } - - try { - const splitVersion = browserVersion.split("-")[0].toLowerCase(); - const isSplitUnreleased = (0, _utils.isUnreleasedVersion)(splitVersion, browserName); - - if (!all[normalizedBrowserName]) { - all[normalizedBrowserName] = isSplitUnreleased ? splitVersion : (0, _utils.semverify)(splitVersion); - return all; - } - - const version = all[normalizedBrowserName]; - const isUnreleased = (0, _utils.isUnreleasedVersion)(version, browserName); - - if (isUnreleased && isSplitUnreleased) { - all[normalizedBrowserName] = (0, _utils.getLowestUnreleased)(version, splitVersion, browserName); - } else if (isUnreleased) { - all[normalizedBrowserName] = (0, _utils.semverify)(splitVersion); - } else if (!isUnreleased && !isSplitUnreleased) { - const parsedBrowserVersion = (0, _utils.semverify)(splitVersion); - all[normalizedBrowserName] = (0, _utils.semverMin)(version, parsedBrowserVersion); - } - } catch (e) {} - - return all; - }, {}); -} - -function outputDecimalWarning(decimalTargets) { - if (!(decimalTargets == null ? void 0 : decimalTargets.length)) { - return; - } - - console.log("Warning, the following targets are using a decimal version:"); - console.log(""); - decimalTargets.forEach(({ - target, - value - }) => console.log(` ${target}: ${value}`)); - console.log(""); - console.log("We recommend using a string for minor/patch versions to avoid numbers like 6.10"); - console.log("getting parsed as 6.1, which can lead to unexpected behavior."); - console.log(""); -} - -function semverifyTarget(target, value) { - try { - return (0, _utils.semverify)(value); - } catch (error) { - throw new Error(`Invalid Option: '${value}' is not a valid value for 'targets.${target}'.`); - } -} - -const targetParserMap = { - __default(target, value) { - const version = (0, _utils.isUnreleasedVersion)(value, target) ? value.toLowerCase() : semverifyTarget(target, value); - return [target, version]; - }, - - node(target, value) { - const parsed = value === true || value === "current" ? process.versions.node : semverifyTarget(target, value); - return [target, parsed]; - } - -}; - -function getTargets(inputTargets = {}, options = {}) { - const targetOpts = {}; - let { - browsers - } = inputTargets; - - if (inputTargets.esmodules) { - const supportsESModules = _nativeModules.default["es6.module"]; - browsers = Object.keys(supportsESModules).map(browser => `${browser} ${supportsESModules[browser]}`).join(", "); - } - - const browsersquery = validateBrowsers(browsers); - const input = Object.assign({}, inputTargets); - delete input.esmodules; - delete input.browsers; - let targets = validateTargetNames(input); - const shouldParseBrowsers = !!browsersquery; - const hasTargets = shouldParseBrowsers || Object.keys(targets).length > 0; - const shouldSearchForConfig = !options.ignoreBrowserslistConfig && !hasTargets; - - if (shouldParseBrowsers || shouldSearchForConfig) { - if (!hasTargets) { - _browserslist.default.defaults = objectToBrowserslist(targets); - } - - const browsers = (0, _browserslist.default)(browsersquery, { - path: options.configPath, - mobileToDesktop: true, - env: options.browserslistEnv - }); - const queryBrowsers = getLowestVersions(browsers); - targets = Object.assign(queryBrowsers, targets); - _browserslist.default.defaults = browserslistDefaults; - } - - const parsed = Object.keys(targets).sort().reduce((results, target) => { - var _targetParserMap$targ; - - const value = targets[target]; - - if (typeof value === "number" && value % 1 !== 0) { - results.decimalWarnings.push({ - target, - value - }); - } - - const parser = (_targetParserMap$targ = targetParserMap[target]) != null ? _targetParserMap$targ : targetParserMap.__default; - const [parsedTarget, parsedValue] = parser(target, value); - - if (parsedValue) { - results.targets[parsedTarget] = parsedValue; - } - - return results; - }, { - targets: targetOpts, - decimalWarnings: [] - }); - outputDecimalWarning(parsed.decimalWarnings); - return parsed.targets; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/lib/options.js b/node_modules/@babel/helper-compilation-targets/lib/options.js deleted file mode 100644 index fcabd96094366adea98093f4edce15324105e484..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-compilation-targets/lib/options.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TargetNames = void 0; -const TargetNames = { - node: "node", - chrome: "chrome", - opera: "opera", - edge: "edge", - firefox: "firefox", - safari: "safari", - ie: "ie", - ios: "ios", - android: "android", - electron: "electron", - samsung: "samsung" -}; -exports.TargetNames = TargetNames; \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/lib/pretty.js b/node_modules/@babel/helper-compilation-targets/lib/pretty.js deleted file mode 100644 index cc94228c1256f307eaf813664228f252c2690d28..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-compilation-targets/lib/pretty.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.prettifyVersion = prettifyVersion; -exports.prettifyTargets = prettifyTargets; - -var _semver = _interopRequireDefault(require("semver")); - -var _targets = require("./targets"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function prettifyVersion(version) { - if (typeof version !== "string") { - return version; - } - - const parts = [_semver.default.major(version)]; - - const minor = _semver.default.minor(version); - - const patch = _semver.default.patch(version); - - if (minor || patch) { - parts.push(minor); - } - - if (patch) { - parts.push(patch); - } - - return parts.join("."); -} - -function prettifyTargets(targets) { - return Object.keys(targets).reduce((results, target) => { - let value = targets[target]; - const unreleasedLabel = _targets.unreleasedLabels[target]; - - if (typeof value === "string" && unreleasedLabel !== value) { - value = prettifyVersion(value); - } - - results[target] = value; - return results; - }, {}); -} \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/lib/targets.js b/node_modules/@babel/helper-compilation-targets/lib/targets.js deleted file mode 100644 index 9cd9e5443b44c0d826d414a4a6ac8f8d321cdb8a..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-compilation-targets/lib/targets.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.browserNameMap = exports.unreleasedLabels = void 0; -const unreleasedLabels = { - safari: "tp" -}; -exports.unreleasedLabels = unreleasedLabels; -const browserNameMap = { - and_chr: "chrome", - and_ff: "firefox", - android: "android", - chrome: "chrome", - edge: "edge", - firefox: "firefox", - ie: "ie", - ie_mob: "ie", - ios_saf: "ios", - node: "node", - op_mob: "opera", - opera: "opera", - safari: "safari", - samsung: "samsung" -}; -exports.browserNameMap = browserNameMap; \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/lib/types.js b/node_modules/@babel/helper-compilation-targets/lib/types.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/node_modules/@babel/helper-compilation-targets/lib/utils.js b/node_modules/@babel/helper-compilation-targets/lib/utils.js deleted file mode 100644 index f02c926f955f3413b43a897ab6c036a0810fe68b..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-compilation-targets/lib/utils.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.semverMin = semverMin; -exports.semverify = semverify; -exports.isUnreleasedVersion = isUnreleasedVersion; -exports.getLowestUnreleased = getLowestUnreleased; -exports.getLowestImplementedVersion = getLowestImplementedVersion; - -var _invariant = _interopRequireDefault(require("invariant")); - -var _semver = _interopRequireDefault(require("semver")); - -var _targets = require("./targets"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const versionRegExp = /^(\d+|\d+.\d+)$/; - -function semverMin(first, second) { - return first && _semver.default.lt(first, second) ? first : second; -} - -function semverify(version) { - if (typeof version === "string" && _semver.default.valid(version)) { - return version; - } - - (0, _invariant.default)(typeof version === "number" || typeof version === "string" && versionRegExp.test(version), `'${version}' is not a valid version`); - const split = version.toString().split("."); - - while (split.length < 3) { - split.push("0"); - } - - return split.join("."); -} - -function isUnreleasedVersion(version, env) { - const unreleasedLabel = _targets.unreleasedLabels[env]; - return !!unreleasedLabel && unreleasedLabel === version.toString().toLowerCase(); -} - -function getLowestUnreleased(a, b, env) { - const unreleasedLabel = _targets.unreleasedLabels[env]; - const hasUnreleased = [a, b].some(item => item === unreleasedLabel); - - if (hasUnreleased) { - return a === hasUnreleased ? b : a || b; - } - - return semverMin(a, b); -} - -function getLowestImplementedVersion(plugin, environment) { - const result = plugin[environment]; - - if (!result && environment === "android") { - return plugin.chrome; - } - - return result; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/package.json b/node_modules/@babel/helper-compilation-targets/package.json deleted file mode 100644 index 03c0a9d8eaed3e2c18dfbffac54aa0d24741b80a..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-compilation-targets/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_from": "@babel/helper-compilation-targets@^7.10.4", - "_id": "@babel/helper-compilation-targets@7.10.4", - "_inBundle": false, - "_integrity": "sha512-a3rYhlsGV0UHNDvrtOXBg8/OpfV0OKTkxKPzIplS1zpx7CygDcWWxckxZeDd3gzPzC4kUT0A4nVFDK0wGMh4MQ==", - "_location": "/@babel/helper-compilation-targets", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/helper-compilation-targets@^7.10.4", - "name": "@babel/helper-compilation-targets", - "escapedName": "@babel%2fhelper-compilation-targets", - "scope": "@babel", - "rawSpec": "^7.10.4", - "saveSpec": null, - "fetchSpec": "^7.10.4" - }, - "_requiredBy": [ - "/@babel/preset-env" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.10.4.tgz", - "_shasum": "804ae8e3f04376607cc791b9d47d540276332bd2", - "_spec": "@babel/helper-compilation-targets@^7.10.4", - "_where": "/Users/rolfguescini/source/laudatio6/node_modules/@babel/preset-env", - "author": { - "name": "The Babel Team", - "url": "https://babeljs.io/team" - }, - "bugs": { - "url": "https://github.com/babel/babel/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/compat-data": "^7.10.4", - "browserslist": "^4.12.0", - "invariant": "^2.2.4", - "levenary": "^1.1.1", - "semver": "^5.5.0" - }, - "deprecated": false, - "description": "Engine compat data used in @babel/preset-env", - "devDependencies": { - "@babel/core": "^7.10.4", - "@babel/helper-plugin-test-runner": "^7.10.4" - }, - "exports": { - ".": "./lib/index.js" - }, - "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df", - "homepage": "https://github.com/babel/babel#readme", - "keywords": [ - "babel", - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-compilation-targets", - "peerDependencies": { - "@babel/core": "^7.0.0" - }, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/babel/babel.git", - "directory": "packages/babel-helper-compilation-targets" - }, - "version": "7.10.4" -} diff --git a/node_modules/@babel/helper-create-class-features-plugin/LICENSE b/node_modules/@babel/helper-create-class-features-plugin/LICENSE deleted file mode 100644 index f31575ec773bb199aeb7c0d0f1612cfe1c7038f1..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-class-features-plugin/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -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. diff --git a/node_modules/@babel/helper-create-class-features-plugin/README.md b/node_modules/@babel/helper-create-class-features-plugin/README.md deleted file mode 100644 index 5ce5e8c6b57054ddac5200b4e729047e77f4738a..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-class-features-plugin/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/helper-create-class-features-plugin - -> Compile class public and private fields, private methods and decorators to ES6 - -See our website [@babel/helper-create-class-features-plugin](https://babeljs.io/docs/en/next/babel-helper-create-class-features-plugin.html) for more information. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/helper-create-class-features-plugin -``` - -or using yarn: - -```sh -yarn add @babel/helper-create-class-features-plugin --dev -``` diff --git a/node_modules/@babel/helper-create-class-features-plugin/lib/decorators.js b/node_modules/@babel/helper-create-class-features-plugin/lib/decorators.js deleted file mode 100644 index 1bcac9dcd0ae5ee6758c575ad94cfb2f7da176cd..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-class-features-plugin/lib/decorators.js +++ /dev/null @@ -1,164 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.hasOwnDecorators = hasOwnDecorators; -exports.hasDecorators = hasDecorators; -exports.buildDecoratedClass = buildDecoratedClass; - -var _core = require("@babel/core"); - -var _helperReplaceSupers = _interopRequireDefault(require("@babel/helper-replace-supers")); - -var _helperFunctionName = _interopRequireDefault(require("@babel/helper-function-name")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function hasOwnDecorators(node) { - return !!(node.decorators && node.decorators.length); -} - -function hasDecorators(node) { - return hasOwnDecorators(node) || node.body.body.some(hasOwnDecorators); -} - -function prop(key, value) { - if (!value) return null; - return _core.types.objectProperty(_core.types.identifier(key), value); -} - -function method(key, body) { - return _core.types.objectMethod("method", _core.types.identifier(key), [], _core.types.blockStatement(body)); -} - -function takeDecorators(node) { - let result; - - if (node.decorators && node.decorators.length > 0) { - result = _core.types.arrayExpression(node.decorators.map(decorator => decorator.expression)); - } - - node.decorators = undefined; - return result; -} - -function getKey(node) { - if (node.computed) { - return node.key; - } else if (_core.types.isIdentifier(node.key)) { - return _core.types.stringLiteral(node.key.name); - } else { - return _core.types.stringLiteral(String(node.key.value)); - } -} - -function extractElementDescriptor(classRef, superRef, path) { - const { - node, - scope - } = path; - const isMethod = path.isClassMethod(); - - if (path.isPrivate()) { - throw path.buildCodeFrameError(`Private ${isMethod ? "methods" : "fields"} in decorated classes are not supported yet.`); - } - - new _helperReplaceSupers.default({ - methodPath: path, - methodNode: node, - objectRef: classRef, - isStatic: node.static, - superRef, - scope, - file: this - }, true).replace(); - const properties = [prop("kind", _core.types.stringLiteral(isMethod ? node.kind : "field")), prop("decorators", takeDecorators(node)), prop("static", node.static && _core.types.booleanLiteral(true)), prop("key", getKey(node))].filter(Boolean); - - if (isMethod) { - const id = node.computed ? null : node.key; - - _core.types.toExpression(node); - - properties.push(prop("value", (0, _helperFunctionName.default)({ - node, - id, - scope - }) || node)); - } else if (node.value) { - properties.push(method("value", _core.template.statements.ast`return ${node.value}`)); - } else { - properties.push(prop("value", scope.buildUndefinedNode())); - } - - path.remove(); - return _core.types.objectExpression(properties); -} - -function addDecorateHelper(file) { - try { - return file.addHelper("decorate"); - } catch (err) { - if (err.code === "BABEL_HELPER_UNKNOWN") { - err.message += "\n '@babel/plugin-transform-decorators' in non-legacy mode" + " requires '@babel/core' version ^7.0.2 and you appear to be using" + " an older version."; - } - - throw err; - } -} - -function buildDecoratedClass(ref, path, elements, file) { - const { - node, - scope - } = path; - const initializeId = scope.generateUidIdentifier("initialize"); - const isDeclaration = node.id && path.isDeclaration(); - const isStrict = path.isInStrictMode(); - const { - superClass - } = node; - node.type = "ClassDeclaration"; - if (!node.id) node.id = _core.types.cloneNode(ref); - let superId; - - if (superClass) { - superId = scope.generateUidIdentifierBasedOnNode(node.superClass, "super"); - node.superClass = superId; - } - - const classDecorators = takeDecorators(node); - - const definitions = _core.types.arrayExpression(elements.filter(element => !element.node.abstract).map(extractElementDescriptor.bind(file, node.id, superId))); - - let replacement = _core.template.expression.ast` - ${addDecorateHelper(file)}( - ${classDecorators || _core.types.nullLiteral()}, - function (${initializeId}, ${superClass ? _core.types.cloneNode(superId) : null}) { - ${node} - return { F: ${_core.types.cloneNode(node.id)}, d: ${definitions} }; - }, - ${superClass} - ) - `; - let classPathDesc = "arguments.1.body.body.0"; - - if (!isStrict) { - replacement.arguments[1].body.directives.push(_core.types.directive(_core.types.directiveLiteral("use strict"))); - } - - if (isDeclaration) { - replacement = _core.template.ast`let ${ref} = ${replacement}`; - classPathDesc = "declarations.0.init." + classPathDesc; - } - - return { - instanceNodes: [_core.template.statement.ast`${_core.types.cloneNode(initializeId)}(this)`], - - wrapClass(path) { - path.replaceWith(replacement); - return path.get(classPathDesc); - } - - }; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-create-class-features-plugin/lib/features.js b/node_modules/@babel/helper-create-class-features-plugin/lib/features.js deleted file mode 100644 index db121d302a2ca064bf566451566f69277dcb24c5..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-class-features-plugin/lib/features.js +++ /dev/null @@ -1,115 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.enableFeature = enableFeature; -exports.isLoose = isLoose; -exports.verifyUsedFeatures = verifyUsedFeatures; -exports.FEATURES = void 0; - -var _decorators = require("./decorators"); - -const FEATURES = Object.freeze({ - fields: 1 << 1, - privateMethods: 1 << 2, - decorators: 1 << 3, - privateIn: 1 << 4 -}); -exports.FEATURES = FEATURES; -const featuresSameLoose = new Map([[FEATURES.fields, "@babel/plugin-proposal-class-properties"], [FEATURES.privateMethods, "@babel/plugin-proposal-private-methods"], [FEATURES.privateIn, "@babel/plugin-proposal-private-private-property-in-object"]]); -const featuresKey = "@babel/plugin-class-features/featuresKey"; -const looseKey = "@babel/plugin-class-features/looseKey"; -const looseLowPriorityKey = "@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing"; - -function enableFeature(file, feature, loose) { - if (!hasFeature(file, feature) || canIgnoreLoose(file, feature)) { - file.set(featuresKey, file.get(featuresKey) | feature); - - if (loose === "#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error") { - setLoose(file, feature, true); - file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) | feature); - } else if (loose === "#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error") { - setLoose(file, feature, false); - file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) | feature); - } else { - setLoose(file, feature, loose); - } - } - - let resolvedLoose; - let higherPriorityPluginName; - - for (const [mask, name] of featuresSameLoose) { - if (!hasFeature(file, mask)) continue; - const loose = isLoose(file, mask); - - if (canIgnoreLoose(file, mask)) { - continue; - } else if (resolvedLoose === !loose) { - throw new Error("'loose' mode configuration must be the same for @babel/plugin-proposal-class-properties, " + "@babel/plugin-proposal-private-methods and " + "@babel/plugin-proposal-private-property-in-object (when they are enabled)."); - } else { - resolvedLoose = loose; - higherPriorityPluginName = name; - } - } - - if (resolvedLoose !== undefined) { - for (const [mask, name] of featuresSameLoose) { - if (hasFeature(file, mask) && isLoose(file, mask) !== resolvedLoose) { - setLoose(file, mask, resolvedLoose); - console.warn(`Though the "loose" option was set to "${!resolvedLoose}" in your @babel/preset-env ` + `config, it will not be used for ${name} since the "loose" mode option was set to ` + `"${resolvedLoose}" for ${higherPriorityPluginName}.\nThe "loose" option must be the ` + `same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods ` + `and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can ` + `silence this warning by explicitly adding\n` + `\t["${name}", { "loose": ${resolvedLoose} }]\n` + `to the "plugins" section of your Babel config.`); - } - } - } -} - -function hasFeature(file, feature) { - return !!(file.get(featuresKey) & feature); -} - -function isLoose(file, feature) { - return !!(file.get(looseKey) & feature); -} - -function setLoose(file, feature, loose) { - if (loose) file.set(looseKey, file.get(looseKey) | feature);else file.set(looseKey, file.get(looseKey) & ~feature); - file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) & ~feature); -} - -function canIgnoreLoose(file, feature) { - return !!(file.get(looseLowPriorityKey) & feature); -} - -function verifyUsedFeatures(path, file) { - if ((0, _decorators.hasOwnDecorators)(path.node)) { - if (!hasFeature(file, FEATURES.decorators)) { - throw path.buildCodeFrameError("Decorators are not enabled." + "\nIf you are using " + '["@babel/plugin-proposal-decorators", { "legacy": true }], ' + 'make sure it comes *before* "@babel/plugin-proposal-class-properties" ' + "and enable loose mode, like so:\n" + '\t["@babel/plugin-proposal-decorators", { "legacy": true }]\n' + '\t["@babel/plugin-proposal-class-properties", { "loose": true }]'); - } - - if (path.isPrivate()) { - throw path.buildCodeFrameError(`Private ${path.isClassMethod() ? "methods" : "fields"} in decorated classes are not supported yet.`); - } - } - - if (path.isPrivate() && path.isMethod()) { - if (!hasFeature(file, FEATURES.privateMethods)) { - throw path.buildCodeFrameError("Class private methods are not enabled."); - } - } - - if (path.isPrivateName() && path.parentPath.isBinaryExpression({ - operator: "in", - left: path.node - })) { - if (!hasFeature(file, FEATURES.privateIn)) { - throw path.buildCodeFrameError("Private property in checks are not enabled."); - } - } - - if (path.isProperty()) { - if (!hasFeature(file, FEATURES.fields)) { - throw path.buildCodeFrameError("Class fields are not enabled."); - } - } -} \ No newline at end of file diff --git a/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js b/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js deleted file mode 100644 index 184d871724e22afb690e48ab3344b9521b584816..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js +++ /dev/null @@ -1,760 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.buildPrivateNamesMap = buildPrivateNamesMap; -exports.buildPrivateNamesNodes = buildPrivateNamesNodes; -exports.transformPrivateNamesUsage = transformPrivateNamesUsage; -exports.buildFieldsInitNodes = buildFieldsInitNodes; - -var _core = require("@babel/core"); - -var _helperReplaceSupers = _interopRequireWildcard(require("@babel/helper-replace-supers")); - -var _helperMemberExpressionToFunctions = _interopRequireDefault(require("@babel/helper-member-expression-to-functions")); - -var _helperOptimiseCallExpression = _interopRequireDefault(require("@babel/helper-optimise-call-expression")); - -var ts = _interopRequireWildcard(require("./typescript")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function buildPrivateNamesMap(props) { - const privateNamesMap = new Map(); - - for (const prop of props) { - const isPrivate = prop.isPrivate(); - const isMethod = !prop.isProperty(); - const isInstance = !prop.node.static; - - if (isPrivate) { - const { - name - } = prop.node.key.id; - const update = privateNamesMap.has(name) ? privateNamesMap.get(name) : { - id: prop.scope.generateUidIdentifier(name), - static: !isInstance, - method: isMethod - }; - - if (prop.node.kind === "get") { - update.getId = prop.scope.generateUidIdentifier(`get_${name}`); - } else if (prop.node.kind === "set") { - update.setId = prop.scope.generateUidIdentifier(`set_${name}`); - } else if (prop.node.kind === "method") { - update.methodId = prop.scope.generateUidIdentifier(name); - } - - privateNamesMap.set(name, update); - } - } - - return privateNamesMap; -} - -function buildPrivateNamesNodes(privateNamesMap, loose, state) { - const initNodes = []; - - for (const [name, value] of privateNamesMap) { - const { - static: isStatic, - method: isMethod, - getId, - setId - } = value; - const isAccessor = getId || setId; - - const id = _core.types.cloneNode(value.id); - - if (loose) { - initNodes.push(_core.template.statement.ast` - var ${id} = ${state.addHelper("classPrivateFieldLooseKey")}("${name}") - `); - } else if (isMethod && !isStatic) { - if (isAccessor) { - initNodes.push(_core.template.statement.ast`var ${id} = new WeakMap();`); - } else { - initNodes.push(_core.template.statement.ast`var ${id} = new WeakSet();`); - } - } else if (!isStatic) { - initNodes.push(_core.template.statement.ast`var ${id} = new WeakMap();`); - } - } - - return initNodes; -} - -function privateNameVisitorFactory(visitor) { - const privateNameVisitor = Object.assign({}, visitor, { - Class(path) { - const { - privateNamesMap - } = this; - const body = path.get("body.body"); - const visiblePrivateNames = new Map(privateNamesMap); - const redeclared = []; - - for (const prop of body) { - if (!prop.isPrivate()) continue; - const { - name - } = prop.node.key.id; - visiblePrivateNames.delete(name); - redeclared.push(name); - } - - if (!redeclared.length) { - return; - } - - path.get("body").traverse(nestedVisitor, Object.assign({}, this, { - redeclared - })); - path.traverse(privateNameVisitor, Object.assign({}, this, { - privateNamesMap: visiblePrivateNames - })); - path.skipKey("body"); - } - - }); - - const nestedVisitor = _core.traverse.visitors.merge([Object.assign({}, visitor), _helperReplaceSupers.environmentVisitor]); - - return privateNameVisitor; -} - -const privateNameVisitor = privateNameVisitorFactory({ - PrivateName(path) { - const { - privateNamesMap, - redeclared - } = this; - const { - node, - parentPath - } = path; - - if (!parentPath.isMemberExpression({ - property: node - }) && !parentPath.isOptionalMemberExpression({ - property: node - })) { - return; - } - - const { - name - } = node.id; - if (!privateNamesMap.has(name)) return; - if (redeclared && redeclared.includes(name)) return; - this.handle(parentPath); - } - -}); -const privateInVisitor = privateNameVisitorFactory({ - BinaryExpression(path) { - const { - operator, - left, - right - } = path.node; - if (operator !== "in") return; - if (!path.get("left").isPrivateName()) return; - const { - loose, - privateNamesMap, - redeclared - } = this; - const { - name - } = left.id; - if (!privateNamesMap.has(name)) return; - if (redeclared && redeclared.includes(name)) return; - - if (loose) { - const { - id - } = privateNamesMap.get(name); - path.replaceWith(_core.template.expression.ast` - Object.prototype.hasOwnProperty.call(${right}, ${_core.types.cloneNode(id)}) - `); - return; - } - - const { - id, - static: isStatic - } = privateNamesMap.get(name); - - if (isStatic) { - path.replaceWith(_core.template.expression.ast`${right} === ${this.classRef}`); - return; - } - - path.replaceWith(_core.template.expression.ast`${_core.types.cloneNode(id)}.has(${right})`); - } - -}); -const privateNameHandlerSpec = { - memoise(member, count) { - const { - scope - } = member; - const { - object - } = member.node; - const memo = scope.maybeGenerateMemoised(object); - - if (!memo) { - return; - } - - this.memoiser.set(object, memo, count); - }, - - receiver(member) { - const { - object - } = member.node; - - if (this.memoiser.has(object)) { - return _core.types.cloneNode(this.memoiser.get(object)); - } - - return _core.types.cloneNode(object); - }, - - get(member) { - const { - classRef, - privateNamesMap, - file - } = this; - const { - name - } = member.node.property.id; - const { - id, - static: isStatic, - method: isMethod, - methodId, - getId, - setId - } = privateNamesMap.get(name); - const isAccessor = getId || setId; - - if (isStatic) { - const helperName = isMethod && !isAccessor ? "classStaticPrivateMethodGet" : "classStaticPrivateFieldSpecGet"; - return _core.types.callExpression(file.addHelper(helperName), [this.receiver(member), _core.types.cloneNode(classRef), _core.types.cloneNode(id)]); - } - - if (isMethod) { - if (isAccessor) { - return _core.types.callExpression(file.addHelper("classPrivateFieldGet"), [this.receiver(member), _core.types.cloneNode(id)]); - } - - return _core.types.callExpression(file.addHelper("classPrivateMethodGet"), [this.receiver(member), _core.types.cloneNode(id), _core.types.cloneNode(methodId)]); - } - - return _core.types.callExpression(file.addHelper("classPrivateFieldGet"), [this.receiver(member), _core.types.cloneNode(id)]); - }, - - boundGet(member) { - this.memoise(member, 1); - return _core.types.callExpression(_core.types.memberExpression(this.get(member), _core.types.identifier("bind")), [this.receiver(member)]); - }, - - set(member, value) { - const { - classRef, - privateNamesMap, - file - } = this; - const { - name - } = member.node.property.id; - const { - id, - static: isStatic, - method: isMethod, - setId, - getId - } = privateNamesMap.get(name); - const isAccessor = getId || setId; - - if (isStatic) { - const helperName = isMethod && !isAccessor ? "classStaticPrivateMethodSet" : "classStaticPrivateFieldSpecSet"; - return _core.types.callExpression(file.addHelper(helperName), [this.receiver(member), _core.types.cloneNode(classRef), _core.types.cloneNode(id), value]); - } - - if (isMethod) { - if (setId) { - return _core.types.callExpression(file.addHelper("classPrivateFieldSet"), [this.receiver(member), _core.types.cloneNode(id), value]); - } - - return _core.types.callExpression(file.addHelper("classPrivateMethodSet"), []); - } - - return _core.types.callExpression(file.addHelper("classPrivateFieldSet"), [this.receiver(member), _core.types.cloneNode(id), value]); - }, - - destructureSet(member) { - const { - privateNamesMap, - file - } = this; - const { - name - } = member.node.property.id; - const { - id - } = privateNamesMap.get(name); - return _core.types.memberExpression(_core.types.callExpression(file.addHelper("classPrivateFieldDestructureSet"), [this.receiver(member), _core.types.cloneNode(id)]), _core.types.identifier("value")); - }, - - call(member, args) { - this.memoise(member, 1); - return (0, _helperOptimiseCallExpression.default)(this.get(member), this.receiver(member), args, false); - }, - - optionalCall(member, args) { - this.memoise(member, 1); - return (0, _helperOptimiseCallExpression.default)(this.get(member), this.receiver(member), args, true); - } - -}; -const privateNameHandlerLoose = { - get(member) { - const { - privateNamesMap, - file - } = this; - const { - object - } = member.node; - const { - name - } = member.node.property.id; - return _core.template.expression`BASE(REF, PROP)[PROP]`({ - BASE: file.addHelper("classPrivateFieldLooseBase"), - REF: _core.types.cloneNode(object), - PROP: _core.types.cloneNode(privateNamesMap.get(name).id) - }); - }, - - boundGet(member) { - return _core.types.callExpression(_core.types.memberExpression(this.get(member), _core.types.identifier("bind")), [_core.types.cloneNode(member.node.object)]); - }, - - simpleSet(member) { - return this.get(member); - }, - - destructureSet(member) { - return this.get(member); - }, - - call(member, args) { - return _core.types.callExpression(this.get(member), args); - }, - - optionalCall(member, args) { - return _core.types.optionalCallExpression(this.get(member), args, true); - } - -}; - -function transformPrivateNamesUsage(ref, path, privateNamesMap, loose, state) { - if (!privateNamesMap.size) return; - const body = path.get("body"); - const handler = loose ? privateNameHandlerLoose : privateNameHandlerSpec; - (0, _helperMemberExpressionToFunctions.default)(body, privateNameVisitor, Object.assign({ - privateNamesMap, - classRef: ref, - file: state - }, handler)); - body.traverse(privateInVisitor, { - privateNamesMap, - classRef: ref, - file: state, - loose - }); -} - -function buildPrivateFieldInitLoose(ref, prop, privateNamesMap) { - const { - id - } = privateNamesMap.get(prop.node.key.id.name); - const value = prop.node.value || prop.scope.buildUndefinedNode(); - return _core.template.statement.ast` - Object.defineProperty(${ref}, ${_core.types.cloneNode(id)}, { - // configurable is false by default - // enumerable is false by default - writable: true, - value: ${value} - }); - `; -} - -function buildPrivateInstanceFieldInitSpec(ref, prop, privateNamesMap) { - const { - id - } = privateNamesMap.get(prop.node.key.id.name); - const value = prop.node.value || prop.scope.buildUndefinedNode(); - return _core.template.statement.ast`${_core.types.cloneNode(id)}.set(${ref}, { - // configurable is always false for private elements - // enumerable is always false for private elements - writable: true, - value: ${value}, - })`; -} - -function buildPrivateStaticFieldInitSpec(prop, privateNamesMap) { - const privateName = privateNamesMap.get(prop.node.key.id.name); - const { - id, - getId, - setId, - initAdded - } = privateName; - const isAccessor = getId || setId; - if (!prop.isProperty() && (initAdded || !isAccessor)) return; - - if (isAccessor) { - privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, { - initAdded: true - })); - return _core.template.statement.ast` - var ${_core.types.cloneNode(id)} = { - // configurable is false by default - // enumerable is false by default - // writable is false by default - get: ${getId ? getId.name : prop.scope.buildUndefinedNode()}, - set: ${setId ? setId.name : prop.scope.buildUndefinedNode()} - } - `; - } - - const value = prop.node.value || prop.scope.buildUndefinedNode(); - return _core.template.statement.ast` - var ${_core.types.cloneNode(id)} = { - // configurable is false by default - // enumerable is false by default - writable: true, - value: ${value} - }; - `; -} - -function buildPrivateMethodInitLoose(ref, prop, privateNamesMap) { - const privateName = privateNamesMap.get(prop.node.key.id.name); - const { - methodId, - id, - getId, - setId, - initAdded - } = privateName; - if (initAdded) return; - - if (methodId) { - return _core.template.statement.ast` - Object.defineProperty(${ref}, ${id}, { - // configurable is false by default - // enumerable is false by default - // writable is false by default - value: ${methodId.name} - }); - `; - } - - const isAccessor = getId || setId; - - if (isAccessor) { - privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, { - initAdded: true - })); - return _core.template.statement.ast` - Object.defineProperty(${ref}, ${id}, { - // configurable is false by default - // enumerable is false by default - // writable is false by default - get: ${getId ? getId.name : prop.scope.buildUndefinedNode()}, - set: ${setId ? setId.name : prop.scope.buildUndefinedNode()} - }); - `; - } -} - -function buildPrivateInstanceMethodInitSpec(ref, prop, privateNamesMap) { - const privateName = privateNamesMap.get(prop.node.key.id.name); - const { - id, - getId, - setId, - initAdded - } = privateName; - if (initAdded) return; - const isAccessor = getId || setId; - - if (isAccessor) { - privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, { - initAdded: true - })); - return _core.template.statement.ast` - ${id}.set(${ref}, { - get: ${getId ? getId.name : prop.scope.buildUndefinedNode()}, - set: ${setId ? setId.name : prop.scope.buildUndefinedNode()} - }); - `; - } - - return _core.template.statement.ast`${id}.add(${ref})`; -} - -function buildPublicFieldInitLoose(ref, prop) { - const { - key, - computed - } = prop.node; - const value = prop.node.value || prop.scope.buildUndefinedNode(); - return _core.types.expressionStatement(_core.types.assignmentExpression("=", _core.types.memberExpression(ref, key, computed || _core.types.isLiteral(key)), value)); -} - -function buildPublicFieldInitSpec(ref, prop, state) { - const { - key, - computed - } = prop.node; - const value = prop.node.value || prop.scope.buildUndefinedNode(); - return _core.types.expressionStatement(_core.types.callExpression(state.addHelper("defineProperty"), [ref, computed || _core.types.isLiteral(key) ? key : _core.types.stringLiteral(key.name), value])); -} - -function buildPrivateStaticMethodInitLoose(ref, prop, state, privateNamesMap) { - const privateName = privateNamesMap.get(prop.node.key.id.name); - const { - id, - methodId, - getId, - setId, - initAdded - } = privateName; - if (initAdded) return; - const isAccessor = getId || setId; - - if (isAccessor) { - privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, { - initAdded: true - })); - return _core.template.statement.ast` - Object.defineProperty(${ref}, ${id}, { - // configurable is false by default - // enumerable is false by default - // writable is false by default - get: ${getId ? getId.name : prop.scope.buildUndefinedNode()}, - set: ${setId ? setId.name : prop.scope.buildUndefinedNode()} - }) - `; - } - - return _core.template.statement.ast` - Object.defineProperty(${ref}, ${id}, { - // configurable is false by default - // enumerable is false by default - // writable is false by default - value: ${methodId.name} - }); - `; -} - -function buildPrivateMethodDeclaration(prop, privateNamesMap, loose = false) { - const privateName = privateNamesMap.get(prop.node.key.id.name); - const { - id, - methodId, - getId, - setId, - getterDeclared, - setterDeclared, - static: isStatic - } = privateName; - const { - params, - body, - generator, - async - } = prop.node; - - const methodValue = _core.types.functionExpression(methodId, params, body, generator, async); - - const isGetter = getId && !getterDeclared && params.length === 0; - const isSetter = setId && !setterDeclared && params.length > 0; - - if (isGetter) { - privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, { - getterDeclared: true - })); - return _core.types.variableDeclaration("var", [_core.types.variableDeclarator(getId, methodValue)]); - } - - if (isSetter) { - privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, { - setterDeclared: true - })); - return _core.types.variableDeclaration("var", [_core.types.variableDeclarator(setId, methodValue)]); - } - - if (isStatic && !loose) { - return _core.types.variableDeclaration("var", [_core.types.variableDeclarator(_core.types.cloneNode(id), _core.types.functionExpression(id, params, body, generator, async))]); - } - - return _core.types.variableDeclaration("var", [_core.types.variableDeclarator(_core.types.cloneNode(methodId), methodValue)]); -} - -const thisContextVisitor = _core.traverse.visitors.merge([{ - ThisExpression(path, state) { - state.needsClassRef = true; - path.replaceWith(_core.types.cloneNode(state.classRef)); - } - -}, _helperReplaceSupers.environmentVisitor]); - -function replaceThisContext(path, ref, superRef, file, loose) { - const state = { - classRef: ref, - needsClassRef: false - }; - const replacer = new _helperReplaceSupers.default({ - methodPath: path, - isLoose: loose, - superRef, - file, - - getObjectRef() { - state.needsClassRef = true; - return path.node.static ? ref : _core.types.memberExpression(ref, _core.types.identifier("prototype")); - } - - }); - replacer.replace(); - - if (path.isProperty()) { - path.traverse(thisContextVisitor, state); - } - - return state.needsClassRef; -} - -function buildFieldsInitNodes(ref, superRef, props, privateNamesMap, state, loose) { - const staticNodes = []; - const instanceNodes = []; - let needsClassRef = false; - - for (const prop of props) { - ts.assertFieldTransformed(prop); - const isStatic = prop.node.static; - const isInstance = !isStatic; - const isPrivate = prop.isPrivate(); - const isPublic = !isPrivate; - const isField = prop.isProperty(); - const isMethod = !isField; - - if (isStatic || isMethod && isPrivate) { - const replaced = replaceThisContext(prop, ref, superRef, state, loose); - needsClassRef = needsClassRef || replaced; - } - - switch (true) { - case isStatic && isPrivate && isField && loose: - needsClassRef = true; - staticNodes.push(buildPrivateFieldInitLoose(_core.types.cloneNode(ref), prop, privateNamesMap)); - break; - - case isStatic && isPrivate && isField && !loose: - needsClassRef = true; - staticNodes.push(buildPrivateStaticFieldInitSpec(prop, privateNamesMap)); - break; - - case isStatic && isPublic && isField && loose: - needsClassRef = true; - staticNodes.push(buildPublicFieldInitLoose(_core.types.cloneNode(ref), prop)); - break; - - case isStatic && isPublic && isField && !loose: - needsClassRef = true; - staticNodes.push(buildPublicFieldInitSpec(_core.types.cloneNode(ref), prop, state)); - break; - - case isInstance && isPrivate && isField && loose: - instanceNodes.push(buildPrivateFieldInitLoose(_core.types.thisExpression(), prop, privateNamesMap)); - break; - - case isInstance && isPrivate && isField && !loose: - instanceNodes.push(buildPrivateInstanceFieldInitSpec(_core.types.thisExpression(), prop, privateNamesMap)); - break; - - case isInstance && isPrivate && isMethod && loose: - instanceNodes.unshift(buildPrivateMethodInitLoose(_core.types.thisExpression(), prop, privateNamesMap)); - staticNodes.push(buildPrivateMethodDeclaration(prop, privateNamesMap, loose)); - break; - - case isInstance && isPrivate && isMethod && !loose: - instanceNodes.unshift(buildPrivateInstanceMethodInitSpec(_core.types.thisExpression(), prop, privateNamesMap)); - staticNodes.push(buildPrivateMethodDeclaration(prop, privateNamesMap, loose)); - break; - - case isStatic && isPrivate && isMethod && !loose: - needsClassRef = true; - staticNodes.push(buildPrivateStaticFieldInitSpec(prop, privateNamesMap)); - staticNodes.unshift(buildPrivateMethodDeclaration(prop, privateNamesMap, loose)); - break; - - case isStatic && isPrivate && isMethod && loose: - needsClassRef = true; - staticNodes.push(buildPrivateStaticMethodInitLoose(_core.types.cloneNode(ref), prop, state, privateNamesMap)); - staticNodes.unshift(buildPrivateMethodDeclaration(prop, privateNamesMap, loose)); - break; - - case isInstance && isPublic && isField && loose: - instanceNodes.push(buildPublicFieldInitLoose(_core.types.thisExpression(), prop)); - break; - - case isInstance && isPublic && isField && !loose: - instanceNodes.push(buildPublicFieldInitSpec(_core.types.thisExpression(), prop, state)); - break; - - default: - throw new Error("Unreachable."); - } - } - - return { - staticNodes: staticNodes.filter(Boolean), - instanceNodes: instanceNodes.filter(Boolean), - - wrapClass(path) { - for (const prop of props) { - prop.remove(); - } - - if (!needsClassRef) return path; - - if (path.isClassExpression()) { - path.scope.push({ - id: ref - }); - path.replaceWith(_core.types.assignmentExpression("=", _core.types.cloneNode(ref), path.node)); - } else if (!path.node.id) { - path.node.id = ref; - } - - return path; - } - - }; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-create-class-features-plugin/lib/index.js b/node_modules/@babel/helper-create-class-features-plugin/lib/index.js deleted file mode 100644 index acbd0f5af74a4c727108078e47f163c3da574177..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-class-features-plugin/lib/index.js +++ /dev/null @@ -1,189 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.createClassFeaturePlugin = createClassFeaturePlugin; -Object.defineProperty(exports, "injectInitialization", { - enumerable: true, - get: function () { - return _misc.injectInitialization; - } -}); -Object.defineProperty(exports, "FEATURES", { - enumerable: true, - get: function () { - return _features.FEATURES; - } -}); - -var _core = require("@babel/core"); - -var _helperFunctionName = _interopRequireDefault(require("@babel/helper-function-name")); - -var _helperSplitExportDeclaration = _interopRequireDefault(require("@babel/helper-split-export-declaration")); - -var _fields = require("./fields"); - -var _decorators = require("./decorators"); - -var _misc = require("./misc"); - -var _features = require("./features"); - -var _package = _interopRequireDefault(require("../package.json")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const version = _package.default.version.split(".").reduce((v, x) => v * 1e5 + +x, 0); - -const versionKey = "@babel/plugin-class-features/version"; - -function createClassFeaturePlugin({ - name, - feature, - loose, - manipulateOptions -}) { - return { - name, - manipulateOptions, - - pre() { - (0, _features.enableFeature)(this.file, feature, loose); - - if (!this.file.get(versionKey) || this.file.get(versionKey) < version) { - this.file.set(versionKey, version); - } - }, - - visitor: { - Class(path, state) { - if (this.file.get(versionKey) !== version) return; - (0, _features.verifyUsedFeatures)(path, this.file); - const loose = (0, _features.isLoose)(this.file, feature); - let constructor; - let isDecorated = (0, _decorators.hasOwnDecorators)(path.node); - const props = []; - const elements = []; - const computedPaths = []; - const privateNames = new Set(); - const body = path.get("body"); - - for (const path of body.get("body")) { - (0, _features.verifyUsedFeatures)(path, this.file); - - if (path.node.computed) { - computedPaths.push(path); - } - - if (path.isPrivate()) { - const { - name - } = path.node.key.id; - const getName = `get ${name}`; - const setName = `set ${name}`; - - if (path.node.kind === "get") { - if (privateNames.has(getName) || privateNames.has(name) && !privateNames.has(setName)) { - throw path.buildCodeFrameError("Duplicate private field"); - } - - privateNames.add(getName).add(name); - } else if (path.node.kind === "set") { - if (privateNames.has(setName) || privateNames.has(name) && !privateNames.has(getName)) { - throw path.buildCodeFrameError("Duplicate private field"); - } - - privateNames.add(setName).add(name); - } else { - if (privateNames.has(name) && !privateNames.has(getName) && !privateNames.has(setName) || privateNames.has(name) && (privateNames.has(getName) || privateNames.has(setName))) { - throw path.buildCodeFrameError("Duplicate private field"); - } - - privateNames.add(name); - } - } - - if (path.isClassMethod({ - kind: "constructor" - })) { - constructor = path; - } else { - elements.push(path); - - if (path.isProperty() || path.isPrivate()) { - props.push(path); - } - } - - if (!isDecorated) isDecorated = (0, _decorators.hasOwnDecorators)(path.node); - } - - if (!props.length && !isDecorated) return; - let ref; - - if (path.isClassExpression() || !path.node.id) { - (0, _helperFunctionName.default)(path); - ref = path.scope.generateUidIdentifier("class"); - } else { - ref = _core.types.cloneNode(path.node.id); - } - - const privateNamesMap = (0, _fields.buildPrivateNamesMap)(props); - const privateNamesNodes = (0, _fields.buildPrivateNamesNodes)(privateNamesMap, loose, state); - (0, _fields.transformPrivateNamesUsage)(ref, path, privateNamesMap, loose, state); - let keysNodes, staticNodes, instanceNodes, wrapClass; - - if (isDecorated) { - staticNodes = keysNodes = []; - ({ - instanceNodes, - wrapClass - } = (0, _decorators.buildDecoratedClass)(ref, path, elements, this.file)); - } else { - keysNodes = (0, _misc.extractComputedKeys)(ref, path, computedPaths, this.file); - ({ - staticNodes, - instanceNodes, - wrapClass - } = (0, _fields.buildFieldsInitNodes)(ref, path.node.superClass, props, privateNamesMap, state, loose)); - } - - if (instanceNodes.length > 0) { - (0, _misc.injectInitialization)(path, constructor, instanceNodes, (referenceVisitor, state) => { - if (isDecorated) return; - - for (const prop of props) { - if (prop.node.static) continue; - prop.traverse(referenceVisitor, state); - } - }); - } - - path = wrapClass(path); - path.insertBefore([...privateNamesNodes, ...keysNodes]); - path.insertAfter(staticNodes); - }, - - PrivateName(path) { - if (this.file.get(versionKey) !== version) return; - throw path.buildCodeFrameError(`Unknown PrivateName "${path}"`); - }, - - ExportDefaultDeclaration(path) { - if (this.file.get(versionKey) !== version) return; - const decl = path.get("declaration"); - - if (decl.isClassDeclaration() && (0, _decorators.hasDecorators)(decl.node)) { - if (decl.node.id) { - (0, _helperSplitExportDeclaration.default)(path); - } else { - decl.node.type = "ClassExpression"; - } - } - } - - } - }; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-create-class-features-plugin/lib/misc.js b/node_modules/@babel/helper-create-class-features-plugin/lib/misc.js deleted file mode 100644 index 0430d5c949d998527f9b6c146ca1ed38cff3e2c9..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-class-features-plugin/lib/misc.js +++ /dev/null @@ -1,127 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.injectInitialization = injectInitialization; -exports.extractComputedKeys = extractComputedKeys; - -var _core = require("@babel/core"); - -var _helperReplaceSupers = require("@babel/helper-replace-supers"); - -const findBareSupers = _core.traverse.visitors.merge([{ - Super(path) { - const { - node, - parentPath - } = path; - - if (parentPath.isCallExpression({ - callee: node - })) { - this.push(parentPath); - } - } - -}, _helperReplaceSupers.environmentVisitor]); - -const referenceVisitor = { - "TSTypeAnnotation|TypeAnnotation"(path) { - path.skip(); - }, - - ReferencedIdentifier(path) { - if (this.scope.hasOwnBinding(path.node.name)) { - this.scope.rename(path.node.name); - path.skip(); - } - } - -}; - -function handleClassTDZ(path, state) { - if (state.classBinding && state.classBinding === path.scope.getBinding(path.node.name)) { - const classNameTDZError = state.file.addHelper("classNameTDZError"); - - const throwNode = _core.types.callExpression(classNameTDZError, [_core.types.stringLiteral(path.node.name)]); - - path.replaceWith(_core.types.sequenceExpression([throwNode, path.node])); - path.skip(); - } -} - -const classFieldDefinitionEvaluationTDZVisitor = { - ReferencedIdentifier: handleClassTDZ -}; - -function injectInitialization(path, constructor, nodes, renamer) { - if (!nodes.length) return; - const isDerived = !!path.node.superClass; - - if (!constructor) { - const newConstructor = _core.types.classMethod("constructor", _core.types.identifier("constructor"), [], _core.types.blockStatement([])); - - if (isDerived) { - newConstructor.params = [_core.types.restElement(_core.types.identifier("args"))]; - newConstructor.body.body.push(_core.template.statement.ast`super(...args)`); - } - - [constructor] = path.get("body").unshiftContainer("body", newConstructor); - } - - if (renamer) { - renamer(referenceVisitor, { - scope: constructor.scope - }); - } - - if (isDerived) { - const bareSupers = []; - constructor.traverse(findBareSupers, bareSupers); - let isFirst = true; - - for (const bareSuper of bareSupers) { - if (isFirst) { - bareSuper.insertAfter(nodes); - isFirst = false; - } else { - bareSuper.insertAfter(nodes.map(n => _core.types.cloneNode(n))); - } - } - } else { - constructor.get("body").unshiftContainer("body", nodes); - } -} - -function extractComputedKeys(ref, path, computedPaths, file) { - const declarations = []; - const state = { - classBinding: path.node.id && path.scope.getBinding(path.node.id.name), - file - }; - - for (const computedPath of computedPaths) { - const computedKey = computedPath.get("key"); - - if (computedKey.isReferencedIdentifier()) { - handleClassTDZ(computedKey, state); - } else { - computedKey.traverse(classFieldDefinitionEvaluationTDZVisitor, state); - } - - const computedNode = computedPath.node; - - if (!computedKey.isConstantExpression()) { - const ident = path.scope.generateUidIdentifierBasedOnNode(computedNode.key); - path.scope.push({ - id: ident, - kind: "let" - }); - declarations.push(_core.types.expressionStatement(_core.types.assignmentExpression("=", _core.types.cloneNode(ident), computedNode.key))); - computedNode.key = _core.types.cloneNode(ident); - } - } - - return declarations; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-create-class-features-plugin/lib/typescript.js b/node_modules/@babel/helper-create-class-features-plugin/lib/typescript.js deleted file mode 100644 index 394c48349801132b57723c4dc23498b7c044482a..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-class-features-plugin/lib/typescript.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.assertFieldTransformed = assertFieldTransformed; - -function assertFieldTransformed(path) { - if (path.node.declare) { - throw path.buildCodeFrameError(`TypeScript 'declare' fields must first be transformed by ` + `@babel/plugin-transform-typescript.\n` + `If you have already enabled that plugin (or '@babel/preset-typescript'), make sure ` + `that it runs before any plugin related to additional class features:\n` + ` - @babel/plugin-proposal-class-properties\n` + ` - @babel/plugin-proposal-private-methods\n` + ` - @babel/plugin-proposal-decorators`); - } -} \ No newline at end of file diff --git a/node_modules/@babel/helper-create-class-features-plugin/package.json b/node_modules/@babel/helper-create-class-features-plugin/package.json deleted file mode 100644 index 813835105a3e1651cbdb7ccd5bf39f81cd477af6..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-class-features-plugin/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "@babel/helper-create-class-features-plugin@^7.10.4", - "_id": "@babel/helper-create-class-features-plugin@7.10.5", - "_inBundle": false, - "_integrity": "sha512-0nkdeijB7VlZoLT3r/mY3bUkw3T8WG/hNw+FATs/6+pG2039IJWjTYL0VTISqsNHMUTEnwbVnc89WIJX9Qed0A==", - "_location": "/@babel/helper-create-class-features-plugin", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/helper-create-class-features-plugin@^7.10.4", - "name": "@babel/helper-create-class-features-plugin", - "escapedName": "@babel%2fhelper-create-class-features-plugin", - "scope": "@babel", - "rawSpec": "^7.10.4", - "saveSpec": null, - "fetchSpec": "^7.10.4" - }, - "_requiredBy": [ - "/@babel/plugin-proposal-class-properties", - "/@babel/plugin-proposal-private-methods" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.5.tgz", - "_shasum": "9f61446ba80e8240b0a5c85c6fdac8459d6f259d", - "_spec": "@babel/helper-create-class-features-plugin@^7.10.4", - "_where": "/Users/rolfguescini/source/laudatio6/node_modules/@babel/plugin-proposal-class-properties", - "author": { - "name": "The Babel Team", - "url": "https://babeljs.io/team" - }, - "bugs": { - "url": "https://github.com/babel/babel/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-member-expression-to-functions": "^7.10.5", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-replace-supers": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.10.4" - }, - "deprecated": false, - "description": "Compile class public and private fields, private methods and decorators to ES6", - "devDependencies": { - "@babel/core": "^7.10.5", - "@babel/helper-plugin-test-runner": "^7.10.4" - }, - "gitHead": "f7964a9ac51356f7df6404a25b27ba1cffba1ba7", - "homepage": "https://github.com/babel/babel#readme", - "keywords": [ - "babel", - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-create-class-features-plugin", - "peerDependencies": { - "@babel/core": "^7.0.0" - }, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/babel/babel.git", - "directory": "packages/babel-helper-create-class-features-plugin" - }, - "version": "7.10.5" -} diff --git a/node_modules/@babel/helper-create-regexp-features-plugin/LICENSE b/node_modules/@babel/helper-create-regexp-features-plugin/LICENSE deleted file mode 100644 index f31575ec773bb199aeb7c0d0f1612cfe1c7038f1..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-regexp-features-plugin/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -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. diff --git a/node_modules/@babel/helper-create-regexp-features-plugin/README.md b/node_modules/@babel/helper-create-regexp-features-plugin/README.md deleted file mode 100644 index 69f661bd987e314d74fc822160bbfdc31077489f..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-regexp-features-plugin/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/helper-create-regexp-features-plugin - -> Compile ESNext Regular Expressions to ES5 - -See our website [@babel/helper-create-regexp-features-plugin](https://babeljs.io/docs/en/next/babel-helper-create-regexp-features-plugin.html) for more information. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/helper-create-regexp-features-plugin -``` - -or using yarn: - -```sh -yarn add @babel/helper-create-regexp-features-plugin --dev -``` diff --git a/node_modules/@babel/helper-create-regexp-features-plugin/lib/features.js b/node_modules/@babel/helper-create-regexp-features-plugin/lib/features.js deleted file mode 100644 index c7a852f7fdb425569789c0ae9ed022c06e1683e9..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-regexp-features-plugin/lib/features.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.enableFeature = enableFeature; -exports.hasFeature = hasFeature; -exports.runtimeKey = exports.featuresKey = exports.FEATURES = void 0; -const FEATURES = Object.freeze({ - unicodeFlag: 1 << 0, - dotAllFlag: 1 << 1, - unicodePropertyEscape: 1 << 2, - namedCaptureGroups: 1 << 3 -}); -exports.FEATURES = FEATURES; -const featuresKey = "@babel/plugin-regexp-features/featuresKey"; -exports.featuresKey = featuresKey; -const runtimeKey = "@babel/plugin-regexp-features/runtimeKey"; -exports.runtimeKey = runtimeKey; - -function enableFeature(features, feature) { - return features | feature; -} - -function hasFeature(features, feature) { - return !!(features & feature); -} \ No newline at end of file diff --git a/node_modules/@babel/helper-create-regexp-features-plugin/lib/index.js b/node_modules/@babel/helper-create-regexp-features-plugin/lib/index.js deleted file mode 100644 index c576b476f07c6bd31233b1a1b480ed7ae4a4e394..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-regexp-features-plugin/lib/index.js +++ /dev/null @@ -1,121 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.createRegExpFeaturePlugin = createRegExpFeaturePlugin; - -var _regexpuCore = _interopRequireDefault(require("regexpu-core")); - -var _features = require("./features"); - -var _util = require("./util"); - -var _package = _interopRequireDefault(require("../package.json")); - -var _core = require("@babel/core"); - -var _helperRegex = require("@babel/helper-regex"); - -var _helperAnnotateAsPure = _interopRequireDefault(require("@babel/helper-annotate-as-pure")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const version = _package.default.version.split(".").reduce((v, x) => v * 1e5 + +x, 0); - -const versionKey = "@babel/plugin-regexp-features/version"; - -function createRegExpFeaturePlugin({ - name, - feature, - options = {} -}) { - return { - name, - - pre() { - var _file$get; - - const { - file - } = this; - const features = (_file$get = file.get(_features.featuresKey)) != null ? _file$get : 0; - let newFeatures = (0, _features.enableFeature)(features, _features.FEATURES[feature]); - const { - useUnicodeFlag, - runtime = true - } = options; - - if (useUnicodeFlag === false) { - newFeatures = (0, _features.enableFeature)(newFeatures, _features.FEATURES.unicodeFlag); - } - - if (newFeatures !== features) { - file.set(_features.featuresKey, newFeatures); - } - - if (!runtime) { - file.set(_features.runtimeKey, false); - } - - if (!file.has(versionKey) || file.get(versionKey) < version) { - file.set(versionKey, version); - } - }, - - visitor: { - RegExpLiteral(path) { - var _file$get2; - - const { - node - } = path; - const { - file - } = this; - const features = file.get(_features.featuresKey); - const runtime = (_file$get2 = file.get(_features.runtimeKey)) != null ? _file$get2 : true; - const regexpuOptions = (0, _util.generateRegexpuOptions)(node, features); - - if (regexpuOptions === null) { - return; - } - - const namedCaptureGroups = {}; - - if (regexpuOptions.namedGroup) { - regexpuOptions.onNamedGroup = (name, index) => { - namedCaptureGroups[name] = index; - }; - } - - node.pattern = (0, _regexpuCore.default)(node.pattern, node.flags, regexpuOptions); - - if (regexpuOptions.namedGroup && Object.keys(namedCaptureGroups).length > 0 && runtime && !isRegExpTest(path)) { - const call = _core.types.callExpression(this.addHelper("wrapRegExp"), [node, _core.types.valueToNode(namedCaptureGroups)]); - - (0, _helperAnnotateAsPure.default)(call); - path.replaceWith(call); - } - - if ((0, _features.hasFeature)(features, _features.FEATURES.unicodeFlag)) { - (0, _helperRegex.pullFlag)(node, "u"); - } - - if ((0, _features.hasFeature)(features, _features.FEATURES.dotAllFlag)) { - (0, _helperRegex.pullFlag)(node, "s"); - } - } - - } - }; -} - -function isRegExpTest(path) { - return path.parentPath.isMemberExpression({ - object: path.node, - computed: false - }) && path.parentPath.get("property").isIdentifier({ - name: "test" - }); -} \ No newline at end of file diff --git a/node_modules/@babel/helper-create-regexp-features-plugin/lib/util.js b/node_modules/@babel/helper-create-regexp-features-plugin/lib/util.js deleted file mode 100644 index 8a365c8b01bedeb4f06b6169fbcb5a33464d44bc..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-regexp-features-plugin/lib/util.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.generateRegexpuOptions = generateRegexpuOptions; - -var _features = require("./features"); - -function generateRegexpuOptions(node, features) { - let useUnicodeFlag = false, - dotAllFlag = false, - unicodePropertyEscape = false, - namedGroup = false; - const { - flags, - pattern - } = node; - const flagsIncludesU = flags.includes("u"); - - if (flagsIncludesU) { - if (!(0, _features.hasFeature)(features, _features.FEATURES.unicodeFlag)) { - useUnicodeFlag = true; - } - - if ((0, _features.hasFeature)(features, _features.FEATURES.unicodePropertyEscape) && /\\[pP]{/.test(pattern)) { - unicodePropertyEscape = true; - } - } - - if ((0, _features.hasFeature)(features, _features.FEATURES.dotAllFlag) && flags.indexOf("s") >= 0) { - dotAllFlag = true; - } - - if ((0, _features.hasFeature)(features, _features.FEATURES.namedCaptureGroups) && /\(\?<(?![=!])/.test(pattern)) { - namedGroup = true; - } - - if (!namedGroup && !unicodePropertyEscape && !dotAllFlag && (!flagsIncludesU || useUnicodeFlag)) { - return null; - } - - if (flagsIncludesU && flags.indexOf("s") >= 0) { - dotAllFlag = true; - } - - return { - useUnicodeFlag, - onNamedGroup: () => {}, - namedGroup, - unicodePropertyEscape, - dotAllFlag, - lookbehind: true - }; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-create-regexp-features-plugin/package.json b/node_modules/@babel/helper-create-regexp-features-plugin/package.json deleted file mode 100644 index 86b5d49b0c5cee066c2d709fa72530beb3c92b2d..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-create-regexp-features-plugin/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "@babel/helper-create-regexp-features-plugin@^7.10.4", - "_id": "@babel/helper-create-regexp-features-plugin@7.10.4", - "_inBundle": false, - "_integrity": "sha512-2/hu58IEPKeoLF45DBwx3XFqsbCXmkdAay4spVr2x0jYgRxrSNp+ePwvSsy9g6YSaNDcKIQVPXk1Ov8S2edk2g==", - "_location": "/@babel/helper-create-regexp-features-plugin", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/helper-create-regexp-features-plugin@^7.10.4", - "name": "@babel/helper-create-regexp-features-plugin", - "escapedName": "@babel%2fhelper-create-regexp-features-plugin", - "scope": "@babel", - "rawSpec": "^7.10.4", - "saveSpec": null, - "fetchSpec": "^7.10.4" - }, - "_requiredBy": [ - "/@babel/plugin-proposal-unicode-property-regex", - "/@babel/plugin-transform-dotall-regex", - "/@babel/plugin-transform-named-capturing-groups-regex", - "/@babel/plugin-transform-unicode-regex" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz", - "_shasum": "fdd60d88524659a0b6959c0579925e425714f3b8", - "_spec": "@babel/helper-create-regexp-features-plugin@^7.10.4", - "_where": "/Users/rolfguescini/source/laudatio6/node_modules/@babel/plugin-proposal-unicode-property-regex", - "author": { - "name": "The Babel Team", - "url": "https://babeljs.io/team" - }, - "bugs": { - "url": "https://github.com/babel/babel/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.10.4", - "@babel/helper-regex": "^7.10.4", - "regexpu-core": "^4.7.0" - }, - "deprecated": false, - "description": "Compile ESNext Regular Expressions to ES5", - "devDependencies": { - "@babel/core": "^7.10.4", - "@babel/helper-plugin-test-runner": "^7.10.4" - }, - "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df", - "homepage": "https://github.com/babel/babel#readme", - "keywords": [ - "babel", - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-create-regexp-features-plugin", - "peerDependencies": { - "@babel/core": "^7.0.0" - }, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/babel/babel.git", - "directory": "packages/babel-helper-create-regexp-features-plugin" - }, - "version": "7.10.4" -} diff --git a/node_modules/@babel/helper-module-transforms/lib/get-module-name.js b/node_modules/@babel/helper-module-transforms/lib/get-module-name.js deleted file mode 100644 index 005469dc1d1738efab035375295ef8d272956a91..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-module-transforms/lib/get-module-name.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = getModuleName; - -function getModuleName(rootOpts, pluginOpts) { - var _pluginOpts$moduleRoo, _rootOpts$moduleIds, _rootOpts$moduleRoot; - - const { - filename, - filenameRelative = filename, - sourceRoot = (_pluginOpts$moduleRoo = pluginOpts.moduleRoot) != null ? _pluginOpts$moduleRoo : rootOpts.moduleRoot - } = rootOpts; - const { - moduleId = rootOpts.moduleId, - moduleIds = (_rootOpts$moduleIds = rootOpts.moduleIds) != null ? _rootOpts$moduleIds : !!moduleId, - getModuleId = rootOpts.getModuleId, - moduleRoot = (_rootOpts$moduleRoot = rootOpts.moduleRoot) != null ? _rootOpts$moduleRoot : sourceRoot - } = pluginOpts; - if (!moduleIds) return null; - - if (moduleId != null && !getModuleId) { - return moduleId; - } - - let moduleName = moduleRoot != null ? moduleRoot + "/" : ""; - - if (filenameRelative) { - const sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : ""; - moduleName += filenameRelative.replace(sourceRootReplacer, "").replace(/\.(\w*?)$/, ""); - } - - moduleName = moduleName.replace(/\\/g, "/"); - - if (getModuleId) { - return getModuleId(moduleName) || moduleName; - } else { - return moduleName; - } -} \ No newline at end of file diff --git a/node_modules/@babel/helper-skip-transparent-expression-wrappers/LICENSE b/node_modules/@babel/helper-skip-transparent-expression-wrappers/LICENSE deleted file mode 100644 index f31575ec773bb199aeb7c0d0f1612cfe1c7038f1..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-skip-transparent-expression-wrappers/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -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. diff --git a/node_modules/@babel/helper-skip-transparent-expression-wrappers/README.md b/node_modules/@babel/helper-skip-transparent-expression-wrappers/README.md deleted file mode 100644 index ac89e026937c46181ba151a7e5e97960f842c59d..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-skip-transparent-expression-wrappers/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# @babel/helper-skip-transparent-expression-wrappers - -> Helper which skips types and parentheses - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/helper-skip-transparent-expression-wrappers -``` - -or using yarn: - -```sh -yarn add @babel/helper-skip-transparent-expression-wrappers --dev -``` diff --git a/node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js b/node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js deleted file mode 100644 index ac87adf517d02c088db7204338b3f18ffeceeb3d..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isTransparentExprWrapper = isTransparentExprWrapper; -exports.skipTransparentExprWrappers = skipTransparentExprWrappers; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function isTransparentExprWrapper(node) { - return t.isTSAsExpression(node) || t.isTSTypeAssertion(node) || t.isTSNonNullExpression(node) || t.isTypeCastExpression(node) || t.isParenthesizedExpression(node); -} - -function skipTransparentExprWrappers(path) { - while (isTransparentExprWrapper(path.node)) { - path = path.get("expression"); - } - - return path; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-skip-transparent-expression-wrappers/package.json b/node_modules/@babel/helper-skip-transparent-expression-wrappers/package.json deleted file mode 100644 index f1d61d51f5627d90e039351391c15f28f71ebef9..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-skip-transparent-expression-wrappers/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_from": "@babel/helper-skip-transparent-expression-wrappers@^7.11.0", - "_id": "@babel/helper-skip-transparent-expression-wrappers@7.11.0", - "_inBundle": false, - "_integrity": "sha512-0XIdiQln4Elglgjbwo9wuJpL/K7AGCY26kmEt0+pRP0TAj4jjyNq1MjoRvikrTVqKcx4Gysxt4cXvVFXP/JO2Q==", - "_location": "/@babel/helper-skip-transparent-expression-wrappers", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/helper-skip-transparent-expression-wrappers@^7.11.0", - "name": "@babel/helper-skip-transparent-expression-wrappers", - "escapedName": "@babel%2fhelper-skip-transparent-expression-wrappers", - "scope": "@babel", - "rawSpec": "^7.11.0", - "saveSpec": null, - "fetchSpec": "^7.11.0" - }, - "_requiredBy": [ - "/@babel/plugin-proposal-optional-chaining", - "/@babel/plugin-transform-spread" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.11.0.tgz", - "_shasum": "eec162f112c2f58d3af0af125e3bb57665146729", - "_spec": "@babel/helper-skip-transparent-expression-wrappers@^7.11.0", - "_where": "/Users/rolfguescini/source/laudatio6/node_modules/@babel/plugin-proposal-optional-chaining", - "bugs": { - "url": "https://github.com/babel/babel/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/types": "^7.11.0" - }, - "deprecated": false, - "description": "Helper which skips types and parentheses", - "devDependencies": { - "@babel/traverse": "^7.11.0" - }, - "exports": { - ".": "./lib/index.js", - "./package.json": "./package.json" - }, - "homepage": "https://github.com/babel/babel#readme", - "license": "MIT", - "main": "./lib/index.js", - "name": "@babel/helper-skip-transparent-expression-wrappers", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/babel/babel.git", - "directory": "packages/babel-helper-skip-transparent-expression-wrappers" - }, - "version": "7.11.0" -} diff --git a/node_modules/@babel/helper-validator-identifier/LICENSE b/node_modules/@babel/helper-validator-identifier/LICENSE deleted file mode 100644 index f31575ec773bb199aeb7c0d0f1612cfe1c7038f1..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-validator-identifier/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -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. diff --git a/node_modules/@babel/helper-validator-identifier/README.md b/node_modules/@babel/helper-validator-identifier/README.md deleted file mode 100644 index ab2dad173149e874cea3dee201a275aac7b053ed..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-validator-identifier/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/helper-validator-identifier - -> Validate identifier/keywords name - -See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/en/next/babel-helper-validator-identifier.html) for more information. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/helper-validator-identifier -``` - -or using yarn: - -```sh -yarn add @babel/helper-validator-identifier --dev -``` diff --git a/node_modules/@babel/helper-validator-identifier/lib/identifier.js b/node_modules/@babel/helper-validator-identifier/lib/identifier.js deleted file mode 100644 index 51ec76370ccfc623feb6ecd8f1169600a9c45c19..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-validator-identifier/lib/identifier.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isIdentifierStart = isIdentifierStart; -exports.isIdentifierChar = isIdentifierChar; -exports.isIdentifierName = isIdentifierName; -let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08c7\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\u9ffc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7ca\ua7f5-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; -let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf\u1ac0\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; -const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; -const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938]; -const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; - -function isInAstralSet(code, set) { - let pos = 0x10000; - - for (let i = 0, length = set.length; i < length; i += 2) { - pos += set[i]; - if (pos > code) return false; - pos += set[i + 1]; - if (pos >= code) return true; - } - - return false; -} - -function isIdentifierStart(code) { - if (code < 65) return code === 36; - if (code <= 90) return true; - if (code < 97) return code === 95; - if (code <= 122) return true; - - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - } - - return isInAstralSet(code, astralIdentifierStartCodes); -} - -function isIdentifierChar(code) { - if (code < 48) return code === 36; - if (code < 58) return true; - if (code < 65) return false; - if (code <= 90) return true; - if (code < 97) return code === 95; - if (code <= 122) return true; - - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - } - - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} - -function isIdentifierName(name) { - let isFirst = true; - - for (let _i = 0, _Array$from = Array.from(name); _i < _Array$from.length; _i++) { - const char = _Array$from[_i]; - const cp = char.codePointAt(0); - - if (isFirst) { - if (!isIdentifierStart(cp)) { - return false; - } - - isFirst = false; - } else if (!isIdentifierChar(cp)) { - return false; - } - } - - return !isFirst; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/lib/index.js b/node_modules/@babel/helper-validator-identifier/lib/index.js deleted file mode 100644 index 7b623c90a6e164c669cedff262de4048c2290857..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-validator-identifier/lib/index.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "isIdentifierName", { - enumerable: true, - get: function () { - return _identifier.isIdentifierName; - } -}); -Object.defineProperty(exports, "isIdentifierChar", { - enumerable: true, - get: function () { - return _identifier.isIdentifierChar; - } -}); -Object.defineProperty(exports, "isIdentifierStart", { - enumerable: true, - get: function () { - return _identifier.isIdentifierStart; - } -}); -Object.defineProperty(exports, "isReservedWord", { - enumerable: true, - get: function () { - return _keyword.isReservedWord; - } -}); -Object.defineProperty(exports, "isStrictBindOnlyReservedWord", { - enumerable: true, - get: function () { - return _keyword.isStrictBindOnlyReservedWord; - } -}); -Object.defineProperty(exports, "isStrictBindReservedWord", { - enumerable: true, - get: function () { - return _keyword.isStrictBindReservedWord; - } -}); -Object.defineProperty(exports, "isStrictReservedWord", { - enumerable: true, - get: function () { - return _keyword.isStrictReservedWord; - } -}); -Object.defineProperty(exports, "isKeyword", { - enumerable: true, - get: function () { - return _keyword.isKeyword; - } -}); - -var _identifier = require("./identifier"); - -var _keyword = require("./keyword"); \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/lib/keyword.js b/node_modules/@babel/helper-validator-identifier/lib/keyword.js deleted file mode 100644 index 110cee4002896b7024e15c0e92f505eb40b9afa6..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-validator-identifier/lib/keyword.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isReservedWord = isReservedWord; -exports.isStrictReservedWord = isStrictReservedWord; -exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; -exports.isStrictBindReservedWord = isStrictBindReservedWord; -exports.isKeyword = isKeyword; -const reservedWords = { - keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], - strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], - strictBind: ["eval", "arguments"] -}; -const keywords = new Set(reservedWords.keyword); -const reservedWordsStrictSet = new Set(reservedWords.strict); -const reservedWordsStrictBindSet = new Set(reservedWords.strictBind); - -function isReservedWord(word, inModule) { - return inModule && word === "await" || word === "enum"; -} - -function isStrictReservedWord(word, inModule) { - return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); -} - -function isStrictBindOnlyReservedWord(word) { - return reservedWordsStrictBindSet.has(word); -} - -function isStrictBindReservedWord(word, inModule) { - return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); -} - -function isKeyword(word) { - return keywords.has(word); -} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/package.json b/node_modules/@babel/helper-validator-identifier/package.json deleted file mode 100644 index 475dc2beb66d4a70dd8ecb11771fab4949c90fd4..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-validator-identifier/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "_from": "@babel/helper-validator-identifier@^7.10.4", - "_id": "@babel/helper-validator-identifier@7.10.4", - "_inBundle": false, - "_integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", - "_location": "/@babel/helper-validator-identifier", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/helper-validator-identifier@^7.10.4", - "name": "@babel/helper-validator-identifier", - "escapedName": "@babel%2fhelper-validator-identifier", - "scope": "@babel", - "rawSpec": "^7.10.4", - "saveSpec": null, - "fetchSpec": "^7.10.4" - }, - "_requiredBy": [ - "/@babel/highlight", - "/@babel/types" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", - "_shasum": "a78c7a7251e01f616512d31b10adcf52ada5e0d2", - "_spec": "@babel/helper-validator-identifier@^7.10.4", - "_where": "/Users/rolfguescini/source/laudatio6/node_modules/@babel/highlight", - "bugs": { - "url": "https://github.com/babel/babel/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Validate identifier/keywords name", - "devDependencies": { - "charcodes": "^0.2.0", - "unicode-13.0.0": "^0.8.0" - }, - "exports": "./lib/index.js", - "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df", - "homepage": "https://github.com/babel/babel#readme", - "license": "MIT", - "main": "./lib/index.js", - "name": "@babel/helper-validator-identifier", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/babel/babel.git", - "directory": "packages/babel-helper-validator-identifier" - }, - "version": "7.10.4" -} diff --git a/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js b/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js deleted file mode 100644 index 70b371508bdb1b84753d5a6afd98f17bfa970f8a..0000000000000000000000000000000000000000 --- a/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; - -// Always use the latest available version of Unicode! -// https://tc39.github.io/ecma262/#sec-conformance -const version = "13.0.0"; - -const start = require("unicode-" + - version + - "/Binary_Property/ID_Start/code-points.js").filter(function (ch) { - return ch > 0x7f; -}); -let last = -1; -const cont = [0x200c, 0x200d].concat( - require("unicode-" + - version + - "/Binary_Property/ID_Continue/code-points.js").filter(function (ch) { - return ch > 0x7f && search(start, ch, last + 1) == -1; - }) -); - -function search(arr, ch, starting) { - for (let i = starting; arr[i] <= ch && i < arr.length; last = i++) { - if (arr[i] === ch) return i; - } - return -1; -} - -function pad(str, width) { - while (str.length < width) str = "0" + str; - return str; -} - -function esc(code) { - const hex = code.toString(16); - if (hex.length <= 2) return "\\x" + pad(hex, 2); - else return "\\u" + pad(hex, 4); -} - -function generate(chars) { - const astral = []; - let re = ""; - for (let i = 0, at = 0x10000; i < chars.length; i++) { - const from = chars[i]; - let to = from; - while (i < chars.length - 1 && chars[i + 1] == to + 1) { - i++; - to++; - } - if (to <= 0xffff) { - if (from == to) re += esc(from); - else if (from + 1 == to) re += esc(from) + esc(to); - else re += esc(from) + "-" + esc(to); - } else { - astral.push(from - at, to - from); - at = to; - } - } - return { nonASCII: re, astral: astral }; -} - -const startData = generate(start); -const contData = generate(cont); - -console.log("/* prettier-ignore */"); -console.log('let nonASCIIidentifierStartChars = "' + startData.nonASCII + '";'); -console.log("/* prettier-ignore */"); -console.log('let nonASCIIidentifierChars = "' + contData.nonASCII + '";'); -console.log("/* prettier-ignore */"); -console.log( - "const astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";" -); -console.log("/* prettier-ignore */"); -console.log( - "const astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";" -); diff --git a/node_modules/@babel/parser/lib/index.js.map b/node_modules/@babel/parser/lib/index.js.map deleted file mode 100644 index b5b41b306318117553ed69d90ccf4cb5a8c6b2cd..0000000000000000000000000000000000000000 --- a/node_modules/@babel/parser/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../src/tokenizer/types.js","../src/util/scopeflags.js","../src/util/whitespace.js","../src/util/location.js","../src/parser/base.js","../src/parser/comments.js","../src/parser/error-message.js","../src/parser/error.js","../src/plugins/estree.js","../src/tokenizer/context.js","../../babel-helper-validator-identifier/src/identifier.js","../../babel-helper-validator-identifier/src/keyword.js","../src/util/identifier.js","../src/plugins/flow.js","../src/plugins/jsx/xhtml.js","../src/plugins/jsx/index.js","../src/util/scope.js","../src/plugins/typescript/scope.js","../src/util/production-parameter.js","../src/plugins/typescript/index.js","../src/plugins/placeholders.js","../src/plugins/v8intrinsic.js","../src/plugin-utils.js","../src/options.js","../src/tokenizer/state.js","../src/tokenizer/index.js","../src/parser/util.js","../src/parser/node.js","../src/parser/lval.js","../src/parser/expression.js","../src/parser/statement.js","../src/util/class-scope.js","../src/parser/index.js","../src/index.js"],"sourcesContent":["// @flow\n\n// ## Token types\n\n// The assignment of fine-grained, information-carrying type objects\n// allows the tokenizer to store the information it has about a\n// token in a way that is very cheap for the parser to look up.\n\n// All token type variables start with an underscore, to make them\n// easy to recognize.\n\n// The `beforeExpr` property is used to disambiguate between regular\n// expressions and divisions. It is set on all token types that can\n// be followed by an expression (thus, a slash after them would be a\n// regular expression).\n\n// The `startsExpr` property is used to determine whether an expression\n// may be the “argument” subexpression of a `yield` expression or\n// `yield` statement. It is set on all token types that may be at the\n// start of a subexpression.\n\n// `isLoop` marks a keyword as starting a loop, which is important\n// to know when parsing a label, in order to allow or disallow\n// continue jumps to that label.\n\nconst beforeExpr = true;\nconst startsExpr = true;\nconst isLoop = true;\nconst isAssign = true;\nconst prefix = true;\nconst postfix = true;\n\ntype TokenOptions = {\n keyword?: string,\n beforeExpr?: boolean,\n startsExpr?: boolean,\n rightAssociative?: boolean,\n isLoop?: boolean,\n isAssign?: boolean,\n prefix?: boolean,\n postfix?: boolean,\n binop?: ?number,\n};\n\nexport class TokenType {\n label: string;\n keyword: ?string;\n beforeExpr: boolean;\n startsExpr: boolean;\n rightAssociative: boolean;\n isLoop: boolean;\n isAssign: boolean;\n prefix: boolean;\n postfix: boolean;\n binop: ?number;\n updateContext: ?(prevType: TokenType) => void;\n\n constructor(label: string, conf: TokenOptions = {}) {\n this.label = label;\n this.keyword = conf.keyword;\n this.beforeExpr = !!conf.beforeExpr;\n this.startsExpr = !!conf.startsExpr;\n this.rightAssociative = !!conf.rightAssociative;\n this.isLoop = !!conf.isLoop;\n this.isAssign = !!conf.isAssign;\n this.prefix = !!conf.prefix;\n this.postfix = !!conf.postfix;\n this.binop = conf.binop != null ? conf.binop : null;\n this.updateContext = null;\n }\n}\n\nexport const keywords = new Map();\n\nfunction createKeyword(name: string, options: TokenOptions = {}): TokenType {\n options.keyword = name;\n const token = new TokenType(name, options);\n keywords.set(name, token);\n return token;\n}\n\nfunction createBinop(name: string, binop: number) {\n return new TokenType(name, { beforeExpr, binop });\n}\n\nexport const types: { [name: string]: TokenType } = {\n num: new TokenType(\"num\", { startsExpr }),\n bigint: new TokenType(\"bigint\", { startsExpr }),\n decimal: new TokenType(\"decimal\", { startsExpr }),\n regexp: new TokenType(\"regexp\", { startsExpr }),\n string: new TokenType(\"string\", { startsExpr }),\n name: new TokenType(\"name\", { startsExpr }),\n eof: new TokenType(\"eof\"),\n\n // Punctuation token types.\n bracketL: new TokenType(\"[\", { beforeExpr, startsExpr }),\n bracketHashL: new TokenType(\"#[\", { beforeExpr, startsExpr }),\n bracketBarL: new TokenType(\"[|\", { beforeExpr, startsExpr }),\n bracketR: new TokenType(\"]\"),\n bracketBarR: new TokenType(\"|]\"),\n braceL: new TokenType(\"{\", { beforeExpr, startsExpr }),\n braceBarL: new TokenType(\"{|\", { beforeExpr, startsExpr }),\n braceHashL: new TokenType(\"#{\", { beforeExpr, startsExpr }),\n braceR: new TokenType(\"}\"),\n braceBarR: new TokenType(\"|}\"),\n parenL: new TokenType(\"(\", { beforeExpr, startsExpr }),\n parenR: new TokenType(\")\"),\n comma: new TokenType(\",\", { beforeExpr }),\n semi: new TokenType(\";\", { beforeExpr }),\n colon: new TokenType(\":\", { beforeExpr }),\n doubleColon: new TokenType(\"::\", { beforeExpr }),\n dot: new TokenType(\".\"),\n question: new TokenType(\"?\", { beforeExpr }),\n questionDot: new TokenType(\"?.\"),\n arrow: new TokenType(\"=>\", { beforeExpr }),\n template: new TokenType(\"template\"),\n ellipsis: new TokenType(\"...\", { beforeExpr }),\n backQuote: new TokenType(\"`\", { startsExpr }),\n dollarBraceL: new TokenType(\"${\", { beforeExpr, startsExpr }),\n at: new TokenType(\"@\"),\n hash: new TokenType(\"#\", { startsExpr }),\n\n // Special hashbang token.\n interpreterDirective: new TokenType(\"#!...\"),\n\n // Operators. These carry several kinds of properties to help the\n // parser use them properly (the presence of these properties is\n // what categorizes them as operators).\n //\n // `binop`, when present, specifies that this operator is a binary\n // operator, and will refer to its precedence.\n //\n // `prefix` and `postfix` mark the operator as a prefix or postfix\n // unary operator.\n //\n // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as\n // binary operators with a very low precedence, that should result\n // in AssignmentExpression nodes.\n\n eq: new TokenType(\"=\", { beforeExpr, isAssign }),\n assign: new TokenType(\"_=\", { beforeExpr, isAssign }),\n incDec: new TokenType(\"++/--\", { prefix, postfix, startsExpr }),\n bang: new TokenType(\"!\", { beforeExpr, prefix, startsExpr }),\n tilde: new TokenType(\"~\", { beforeExpr, prefix, startsExpr }),\n pipeline: createBinop(\"|>\", 0),\n nullishCoalescing: createBinop(\"??\", 1),\n logicalOR: createBinop(\"||\", 1),\n logicalAND: createBinop(\"&&\", 2),\n bitwiseOR: createBinop(\"|\", 3),\n bitwiseXOR: createBinop(\"^\", 4),\n bitwiseAND: createBinop(\"&\", 5),\n equality: createBinop(\"==/!=/===/!==\", 6),\n relational: createBinop(\"/<=/>=\", 7),\n bitShift: createBinop(\"<>/>>>\", 8),\n plusMin: new TokenType(\"+/-\", { beforeExpr, binop: 9, prefix, startsExpr }),\n // startsExpr: required by v8intrinsic plugin\n modulo: new TokenType(\"%\", { beforeExpr, binop: 10, startsExpr }),\n star: createBinop(\"*\", 10),\n slash: createBinop(\"/\", 10),\n exponent: new TokenType(\"**\", {\n beforeExpr,\n binop: 11,\n rightAssociative: true,\n }),\n\n // Keywords\n // Don't forget to update packages/babel-helper-validator-identifier/src/keyword.js\n // when new keywords are added\n _break: createKeyword(\"break\"),\n _case: createKeyword(\"case\", { beforeExpr }),\n _catch: createKeyword(\"catch\"),\n _continue: createKeyword(\"continue\"),\n _debugger: createKeyword(\"debugger\"),\n _default: createKeyword(\"default\", { beforeExpr }),\n _do: createKeyword(\"do\", { isLoop, beforeExpr }),\n _else: createKeyword(\"else\", { beforeExpr }),\n _finally: createKeyword(\"finally\"),\n _for: createKeyword(\"for\", { isLoop }),\n _function: createKeyword(\"function\", { startsExpr }),\n _if: createKeyword(\"if\"),\n _return: createKeyword(\"return\", { beforeExpr }),\n _switch: createKeyword(\"switch\"),\n _throw: createKeyword(\"throw\", { beforeExpr, prefix, startsExpr }),\n _try: createKeyword(\"try\"),\n _var: createKeyword(\"var\"),\n _const: createKeyword(\"const\"),\n _while: createKeyword(\"while\", { isLoop }),\n _with: createKeyword(\"with\"),\n _new: createKeyword(\"new\", { beforeExpr, startsExpr }),\n _this: createKeyword(\"this\", { startsExpr }),\n _super: createKeyword(\"super\", { startsExpr }),\n _class: createKeyword(\"class\", { startsExpr }),\n _extends: createKeyword(\"extends\", { beforeExpr }),\n _export: createKeyword(\"export\"),\n _import: createKeyword(\"import\", { startsExpr }),\n _null: createKeyword(\"null\", { startsExpr }),\n _true: createKeyword(\"true\", { startsExpr }),\n _false: createKeyword(\"false\", { startsExpr }),\n _in: createKeyword(\"in\", { beforeExpr, binop: 7 }),\n _instanceof: createKeyword(\"instanceof\", { beforeExpr, binop: 7 }),\n _typeof: createKeyword(\"typeof\", { beforeExpr, prefix, startsExpr }),\n _void: createKeyword(\"void\", { beforeExpr, prefix, startsExpr }),\n _delete: createKeyword(\"delete\", { beforeExpr, prefix, startsExpr }),\n};\n","// @flow\n\n// Each scope gets a bitset that may contain these flags\n// prettier-ignore\nexport const SCOPE_OTHER = 0b00000000,\n SCOPE_PROGRAM = 0b00000001,\n SCOPE_FUNCTION = 0b00000010,\n SCOPE_ARROW = 0b00000100,\n SCOPE_SIMPLE_CATCH = 0b00001000,\n SCOPE_SUPER = 0b00010000,\n SCOPE_DIRECT_SUPER = 0b00100000,\n SCOPE_CLASS = 0b01000000,\n SCOPE_TS_MODULE = 0b10000000,\n SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION | SCOPE_TS_MODULE;\n\nexport type ScopeFlags =\n | typeof SCOPE_OTHER\n | typeof SCOPE_PROGRAM\n | typeof SCOPE_FUNCTION\n | typeof SCOPE_VAR\n | typeof SCOPE_ARROW\n | typeof SCOPE_SIMPLE_CATCH\n | typeof SCOPE_SUPER\n | typeof SCOPE_DIRECT_SUPER\n | typeof SCOPE_CLASS;\n\n// These flags are meant to be _only_ used inside the Scope class (or subclasses).\n// prettier-ignore\nexport const BIND_KIND_VALUE = 0b00000_0000_01,\n BIND_KIND_TYPE = 0b00000_0000_10,\n // Used in checkLVal and declareName to determine the type of a binding\n BIND_SCOPE_VAR = 0b00000_0001_00, // Var-style binding\n BIND_SCOPE_LEXICAL = 0b00000_0010_00, // Let- or const-style binding\n BIND_SCOPE_FUNCTION = 0b00000_0100_00, // Function declaration\n BIND_SCOPE_OUTSIDE = 0b00000_1000_00, // Special case for function names as\n // bound inside the function\n // Misc flags\n BIND_FLAGS_NONE = 0b00001_0000_00,\n BIND_FLAGS_CLASS = 0b00010_0000_00,\n BIND_FLAGS_TS_ENUM = 0b00100_0000_00,\n BIND_FLAGS_TS_CONST_ENUM = 0b01000_0000_00,\n BIND_FLAGS_TS_EXPORT_ONLY = 0b10000_0000_00;\n\n// These flags are meant to be _only_ used by Scope consumers\n// prettier-ignore\n/* = is value? | is type? | scope | misc flags */\nexport const BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS ,\n BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0 ,\n BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0 ,\n BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0 ,\n BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS ,\n BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0 ,\n BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM,\n BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY,\n // These bindings don't introduce anything in the scope. They are used for assignments and\n // function expressions IDs.\n BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE ,\n BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE ,\n\n BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM,\n BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;\n\nexport type BindingTypes =\n | typeof BIND_NONE\n | typeof BIND_OUTSIDE\n | typeof BIND_VAR\n | typeof BIND_LEXICAL\n | typeof BIND_CLASS\n | typeof BIND_FUNCTION\n | typeof BIND_TS_INTERFACE\n | typeof BIND_TS_TYPE\n | typeof BIND_TS_ENUM\n | typeof BIND_TS_AMBIENT\n | typeof BIND_TS_NAMESPACE;\n\n// prettier-ignore\nexport const CLASS_ELEMENT_FLAG_STATIC = 0b1_00,\n CLASS_ELEMENT_KIND_GETTER = 0b0_10,\n CLASS_ELEMENT_KIND_SETTER = 0b0_01,\n CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER;\n\n// prettier-ignore\nexport const CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC,\n CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC,\n CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER,\n CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER,\n CLASS_ELEMENT_OTHER = 0;\n\nexport type ClassElementTypes =\n | typeof CLASS_ELEMENT_STATIC_GETTER\n | typeof CLASS_ELEMENT_STATIC_SETTER\n | typeof CLASS_ELEMENT_INSTANCE_GETTER\n | typeof CLASS_ELEMENT_INSTANCE_SETTER\n | typeof CLASS_ELEMENT_OTHER;\n","// @flow\n\nimport * as charCodes from \"charcodes\";\n\n// Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\nexport const lineBreak = /\\r\\n?|[\\n\\u2028\\u2029]/;\nexport const lineBreakG = new RegExp(lineBreak.source, \"g\");\n\n// https://tc39.github.io/ecma262/#sec-line-terminators\nexport function isNewLine(code: number): boolean {\n switch (code) {\n case charCodes.lineFeed:\n case charCodes.carriageReturn:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return true;\n\n default:\n return false;\n }\n}\n\nexport const skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g;\n\n// https://tc39.github.io/ecma262/#sec-white-space\nexport function isWhitespace(code: number): boolean {\n switch (code) {\n case 0x0009: // CHARACTER TABULATION\n case 0x000b: // LINE TABULATION\n case 0x000c: // FORM FEED\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.oghamSpaceMark:\n case 0x2000: // EN QUAD\n case 0x2001: // EM QUAD\n case 0x2002: // EN SPACE\n case 0x2003: // EM SPACE\n case 0x2004: // THREE-PER-EM SPACE\n case 0x2005: // FOUR-PER-EM SPACE\n case 0x2006: // SIX-PER-EM SPACE\n case 0x2007: // FIGURE SPACE\n case 0x2008: // PUNCTUATION SPACE\n case 0x2009: // THIN SPACE\n case 0x200a: // HAIR SPACE\n case 0x202f: // NARROW NO-BREAK SPACE\n case 0x205f: // MEDIUM MATHEMATICAL SPACE\n case 0x3000: // IDEOGRAPHIC SPACE\n case 0xfeff: // ZERO WIDTH NO-BREAK SPACE\n return true;\n\n default:\n return false;\n }\n}\n","// @flow\n\nimport { lineBreakG } from \"./whitespace\";\n\nexport type Pos = {\n start: number,\n};\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nexport class Position {\n line: number;\n column: number;\n\n constructor(line: number, col: number) {\n this.line = line;\n this.column = col;\n }\n}\n\nexport class SourceLocation {\n start: Position;\n end: Position;\n filename: string;\n identifierName: ?string;\n\n constructor(start: Position, end?: Position) {\n this.start = start;\n // $FlowIgnore (may start as null, but initialized later)\n this.end = end;\n }\n}\n\n// The `getLineInfo` function is mostly useful when the\n// `locations` option is off (for performance reasons) and you\n// want to find the line/column position for a given character\n// offset. `input` should be the code string that the offset refers\n// into.\n\nexport function getLineInfo(input: string, offset: number): Position {\n let line = 1;\n let lineStart = 0;\n let match;\n lineBreakG.lastIndex = 0;\n while ((match = lineBreakG.exec(input)) && match.index < offset) {\n line++;\n lineStart = lineBreakG.lastIndex;\n }\n\n return new Position(line, offset - lineStart);\n}\n","// @flow\n\nimport type { Options } from \"../options\";\nimport type State from \"../tokenizer/state\";\nimport type { PluginsMap } from \"./index\";\nimport type ScopeHandler from \"../util/scope\";\nimport type ClassScopeHandler from \"../util/class-scope\";\nimport type ProductionParameterHandler from \"../util/production-parameter\";\n\nexport default class BaseParser {\n // Properties set by constructor in index.js\n options: Options;\n inModule: boolean;\n scope: ScopeHandler<*>;\n classScope: ClassScopeHandler;\n prodParam: ProductionParameterHandler;\n plugins: PluginsMap;\n filename: ?string;\n sawUnambiguousESM: boolean = false;\n ambiguousScriptDifferentAst: boolean = false;\n\n // Initialized by Tokenizer\n state: State;\n // input and length are not in state as they are constant and we do\n // not want to ever copy them, which happens if state gets cloned\n input: string;\n length: number;\n\n hasPlugin(name: string): boolean {\n return this.plugins.has(name);\n }\n\n getPluginOption(plugin: string, name: string) {\n // $FlowIssue\n if (this.hasPlugin(plugin)) return this.plugins.get(plugin)[name];\n }\n}\n","// @flow\n\n/**\n * Based on the comment attachment algorithm used in espree and estraverse.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport BaseParser from \"./base\";\nimport type { Comment, Node } from \"../types\";\n\nfunction last(stack: $ReadOnlyArray): T {\n return stack[stack.length - 1];\n}\n\nexport default class CommentsParser extends BaseParser {\n addComment(comment: Comment): void {\n if (this.filename) comment.loc.filename = this.filename;\n this.state.trailingComments.push(comment);\n this.state.leadingComments.push(comment);\n }\n\n adjustCommentsAfterTrailingComma(\n node: Node,\n elements: (Node | null)[],\n // When the current node is followed by a token which hasn't a respective AST node, we\n // need to take all the trailing comments to prevent them from being attached to an\n // unrelated node. e.g. in\n // var { x } /* cmt */ = { y }\n // we don't want /* cmt */ to be attached to { y }.\n // On the other hand, in\n // fn(x) [new line] /* cmt */ [new line] y\n // /* cmt */ is both a trailing comment of fn(x) and a leading comment of y\n takeAllComments?: boolean,\n ) {\n if (this.state.leadingComments.length === 0) {\n return;\n }\n\n let lastElement = null;\n let i = elements.length;\n while (lastElement === null && i > 0) {\n lastElement = elements[--i];\n }\n if (lastElement === null) {\n return;\n }\n\n for (let j = 0; j < this.state.leadingComments.length; j++) {\n if (\n this.state.leadingComments[j].end < this.state.commentPreviousNode.end\n ) {\n this.state.leadingComments.splice(j, 1);\n j--;\n }\n }\n\n const newTrailingComments = [];\n for (let i = 0; i < this.state.leadingComments.length; i++) {\n const leadingComment = this.state.leadingComments[i];\n if (leadingComment.end < node.end) {\n newTrailingComments.push(leadingComment);\n\n // Perf: we don't need to splice if we are going to reset the array anyway\n if (!takeAllComments) {\n this.state.leadingComments.splice(i, 1);\n i--;\n }\n } else {\n if (node.trailingComments === undefined) {\n node.trailingComments = [];\n }\n node.trailingComments.push(leadingComment);\n }\n }\n if (takeAllComments) this.state.leadingComments = [];\n\n if (newTrailingComments.length > 0) {\n lastElement.trailingComments = newTrailingComments;\n } else if (lastElement.trailingComments !== undefined) {\n lastElement.trailingComments = [];\n }\n }\n\n processComment(node: Node): void {\n if (node.type === \"Program\" && node.body.length > 0) return;\n\n const stack = this.state.commentStack;\n\n let firstChild, lastChild, trailingComments, i, j;\n\n if (this.state.trailingComments.length > 0) {\n // If the first comment in trailingComments comes after the\n // current node, then we're good - all comments in the array will\n // come after the node and so it's safe to add them as official\n // trailingComments.\n if (this.state.trailingComments[0].start >= node.end) {\n trailingComments = this.state.trailingComments;\n this.state.trailingComments = [];\n } else {\n // Otherwise, if the first comment doesn't come after the\n // current node, that means we have a mix of leading and trailing\n // comments in the array and that leadingComments contains the\n // same items as trailingComments. Reset trailingComments to\n // zero items and we'll handle this by evaluating leadingComments\n // later.\n this.state.trailingComments.length = 0;\n }\n } else if (stack.length > 0) {\n const lastInStack = last(stack);\n if (\n lastInStack.trailingComments &&\n lastInStack.trailingComments[0].start >= node.end\n ) {\n trailingComments = lastInStack.trailingComments;\n delete lastInStack.trailingComments;\n }\n }\n\n // Eating the stack.\n if (stack.length > 0 && last(stack).start >= node.start) {\n firstChild = stack.pop();\n }\n\n while (stack.length > 0 && last(stack).start >= node.start) {\n lastChild = stack.pop();\n }\n\n if (!lastChild && firstChild) lastChild = firstChild;\n\n // Adjust comments that follow a trailing comma on the last element in a\n // comma separated list of nodes to be the trailing comments on the last\n // element\n if (firstChild) {\n switch (node.type) {\n case \"ObjectExpression\":\n this.adjustCommentsAfterTrailingComma(node, node.properties);\n break;\n case \"ObjectPattern\":\n this.adjustCommentsAfterTrailingComma(node, node.properties, true);\n break;\n case \"CallExpression\":\n this.adjustCommentsAfterTrailingComma(node, node.arguments);\n break;\n case \"ArrayExpression\":\n this.adjustCommentsAfterTrailingComma(node, node.elements);\n break;\n case \"ArrayPattern\":\n this.adjustCommentsAfterTrailingComma(node, node.elements, true);\n break;\n }\n } else if (\n this.state.commentPreviousNode &&\n ((this.state.commentPreviousNode.type === \"ImportSpecifier\" &&\n node.type !== \"ImportSpecifier\") ||\n (this.state.commentPreviousNode.type === \"ExportSpecifier\" &&\n node.type !== \"ExportSpecifier\"))\n ) {\n this.adjustCommentsAfterTrailingComma(node, [\n this.state.commentPreviousNode,\n ]);\n }\n\n if (lastChild) {\n if (lastChild.leadingComments) {\n if (\n lastChild !== node &&\n lastChild.leadingComments.length > 0 &&\n last(lastChild.leadingComments).end <= node.start\n ) {\n node.leadingComments = lastChild.leadingComments;\n delete lastChild.leadingComments;\n } else {\n // A leading comment for an anonymous class had been stolen by its first ClassMethod,\n // so this takes back the leading comment.\n // See also: https://github.com/eslint/espree/issues/158\n for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {\n if (lastChild.leadingComments[i].end <= node.start) {\n node.leadingComments = lastChild.leadingComments.splice(0, i + 1);\n break;\n }\n }\n }\n }\n } else if (this.state.leadingComments.length > 0) {\n if (last(this.state.leadingComments).end <= node.start) {\n if (this.state.commentPreviousNode) {\n for (j = 0; j < this.state.leadingComments.length; j++) {\n if (\n this.state.leadingComments[j].end <\n this.state.commentPreviousNode.end\n ) {\n this.state.leadingComments.splice(j, 1);\n j--;\n }\n }\n }\n if (this.state.leadingComments.length > 0) {\n node.leadingComments = this.state.leadingComments;\n this.state.leadingComments = [];\n }\n } else {\n // https://github.com/eslint/espree/issues/2\n //\n // In special cases, such as return (without a value) and\n // debugger, all comments will end up as leadingComments and\n // will otherwise be eliminated. This step runs when the\n // commentStack is empty and there are comments left\n // in leadingComments.\n //\n // This loop figures out the stopping point between the actual\n // leading and trailing comments by finding the location of the\n // first comment that comes after the given node.\n for (i = 0; i < this.state.leadingComments.length; i++) {\n if (this.state.leadingComments[i].end > node.start) {\n break;\n }\n }\n\n // Split the array based on the location of the first comment\n // that comes after the node. Keep in mind that this could\n // result in an empty array, and if so, the array must be\n // deleted.\n const leadingComments = this.state.leadingComments.slice(0, i);\n\n if (leadingComments.length) {\n node.leadingComments = leadingComments;\n }\n\n // Similarly, trailing comments are attached later. The variable\n // must be reset to null if there are no trailing comments.\n trailingComments = this.state.leadingComments.slice(i);\n if (trailingComments.length === 0) {\n trailingComments = null;\n }\n }\n }\n\n this.state.commentPreviousNode = node;\n\n if (trailingComments) {\n if (\n trailingComments.length &&\n trailingComments[0].start >= node.start &&\n last(trailingComments).end <= node.end\n ) {\n node.innerComments = trailingComments;\n } else {\n // TrailingComments maybe contain innerComments\n const firstTrailingCommentIndex = trailingComments.findIndex(\n comment => comment.end >= node.end,\n );\n\n if (firstTrailingCommentIndex > 0) {\n node.innerComments = trailingComments.slice(\n 0,\n firstTrailingCommentIndex,\n );\n node.trailingComments = trailingComments.slice(\n firstTrailingCommentIndex,\n );\n } else {\n node.trailingComments = trailingComments;\n }\n }\n }\n\n stack.push(node);\n }\n}\n","// @flow\n/* eslint sort-keys: \"error\" */\n\n// The Errors key follows https://cs.chromium.org/chromium/src/v8/src/common/message-template.h unless it does not exist\nexport const ErrorMessages = Object.freeze({\n AccessorIsGenerator: \"A %0ter cannot be a generator\",\n ArgumentsDisallowedInInitializer:\n \"'arguments' is not allowed in class field initializer\",\n AsyncFunctionInSingleStatementContext:\n \"Async functions can only be declared at the top level or inside a block\",\n AwaitBindingIdentifier:\n \"Can not use 'await' as identifier inside an async function\",\n AwaitExpressionFormalParameter:\n \"await is not allowed in async function parameters\",\n AwaitNotInAsyncFunction:\n \"Can not use keyword 'await' outside an async function\",\n BadGetterArity: \"getter must not have any formal parameters\",\n BadSetterArity: \"setter must have exactly one formal parameter\",\n BadSetterRestParameter:\n \"setter function argument must not be a rest parameter\",\n ConstructorClassField: \"Classes may not have a field named 'constructor'\",\n ConstructorClassPrivateField:\n \"Classes may not have a private field named '#constructor'\",\n ConstructorIsAccessor: \"Class constructor may not be an accessor\",\n ConstructorIsAsync: \"Constructor can't be an async function\",\n ConstructorIsGenerator: \"Constructor can't be a generator\",\n DeclarationMissingInitializer: \"%0 require an initialization value\",\n DecoratorBeforeExport:\n \"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax\",\n DecoratorConstructor:\n \"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?\",\n DecoratorExportClass:\n \"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.\",\n DecoratorSemicolon: \"Decorators must not be followed by a semicolon\",\n DeletePrivateField: \"Deleting a private field is not allowed\",\n DestructureNamedImport:\n \"ES2015 named imports do not destructure. Use another statement for destructuring after the import.\",\n DuplicateConstructor: \"Duplicate constructor in the same class\",\n DuplicateDefaultExport: \"Only one default export allowed per module.\",\n DuplicateExport:\n \"`%0` has already been exported. Exported identifiers must be unique.\",\n DuplicateProto: \"Redefinition of __proto__ property\",\n DuplicateRegExpFlags: \"Duplicate regular expression flag\",\n ElementAfterRest: \"Rest element must be last element\",\n EscapedCharNotAnIdentifier: \"Invalid Unicode escape\",\n ExportDefaultFromAsIdentifier:\n \"'from' is not allowed as an identifier after 'export default'\",\n ForInOfLoopInitializer:\n \"%0 loop variable declaration may not have an initializer\",\n GeneratorInSingleStatementContext:\n \"Generators can only be declared at the top level or inside a block\",\n IllegalBreakContinue: \"Unsyntactic %0\",\n IllegalLanguageModeDirective:\n \"Illegal 'use strict' directive in function with non-simple parameter list\",\n IllegalReturn: \"'return' outside of function\",\n ImportCallArgumentTrailingComma:\n \"Trailing comma is disallowed inside import(...) arguments\",\n ImportCallArity: \"import() requires exactly %0\",\n ImportCallNotNewExpression: \"Cannot use new with import(...)\",\n ImportCallSpreadArgument: \"... is not allowed in import()\",\n ImportMetaOutsideModule: `import.meta may appear only with 'sourceType: \"module\"'`,\n ImportOutsideModule: `'import' and 'export' may appear only with 'sourceType: \"module\"'`,\n InvalidBigIntLiteral: \"Invalid BigIntLiteral\",\n InvalidCodePoint: \"Code point out of bounds\",\n InvalidDecimal: \"Invalid decimal\",\n InvalidDigit: \"Expected number in radix %0\",\n InvalidEscapeSequence: \"Bad character escape sequence\",\n InvalidEscapeSequenceTemplate: \"Invalid escape sequence in template\",\n InvalidEscapedReservedWord: \"Escape sequence in keyword %0\",\n InvalidIdentifier: \"Invalid identifier %0\",\n InvalidLhs: \"Invalid left-hand side in %0\",\n InvalidLhsBinding: \"Binding invalid left-hand side in %0\",\n InvalidNumber: \"Invalid number\",\n InvalidOrUnexpectedToken: \"Unexpected character '%0'\",\n InvalidParenthesizedAssignment: \"Invalid parenthesized assignment pattern\",\n InvalidPrivateFieldResolution: \"Private name #%0 is not defined\",\n InvalidPropertyBindingPattern: \"Binding member expression\",\n InvalidRecordProperty:\n \"Only properties and spread elements are allowed in record definitions\",\n InvalidRestAssignmentPattern: \"Invalid rest operator's argument\",\n LabelRedeclaration: \"Label '%0' is already declared\",\n LetInLexicalBinding:\n \"'let' is not allowed to be used as a name in 'let' or 'const' declarations.\",\n LineTerminatorBeforeArrow: \"No line break is allowed before '=>'\",\n MalformedRegExpFlags: \"Invalid regular expression flag\",\n MissingClassName: \"A class name is required\",\n MissingEqInAssignment:\n \"Only '=' operator can be used for specifying default value.\",\n MissingUnicodeEscape: \"Expecting Unicode escape sequence \\\\uXXXX\",\n MixingCoalesceWithLogical:\n \"Nullish coalescing operator(??) requires parens when mixing with logical operators\",\n ModuleAttributeDifferentFromType:\n \"The only accepted module attribute is `type`\",\n ModuleAttributeInvalidValue:\n \"Only string literals are allowed as module attribute values\",\n ModuleAttributesWithDuplicateKeys:\n 'Duplicate key \"%0\" is not allowed in module attributes',\n ModuleExportUndefined: \"Export '%0' is not defined\",\n MultipleDefaultsInSwitch: \"Multiple default clauses\",\n NewlineAfterThrow: \"Illegal newline after throw\",\n NoCatchOrFinally: \"Missing catch or finally clause\",\n NumberIdentifier: \"Identifier directly after number\",\n NumericSeparatorInEscapeSequence:\n \"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences\",\n ObsoleteAwaitStar:\n \"await* has been removed from the async functions proposal. Use Promise.all() instead.\",\n OptionalChainingNoNew:\n \"constructors in/after an Optional Chain are not allowed\",\n OptionalChainingNoTemplate:\n \"Tagged Template Literals are not allowed in optionalChain\",\n ParamDupe: \"Argument name clash\",\n PatternHasAccessor: \"Object pattern can't contain getter or setter\",\n PatternHasMethod: \"Object pattern can't contain methods\",\n PipelineBodyNoArrow:\n 'Unexpected arrow \"=>\" after pipeline body; arrow function in pipeline body must be parenthesized',\n PipelineBodySequenceExpression:\n \"Pipeline body may not be a comma-separated sequence expression\",\n PipelineHeadSequenceExpression:\n \"Pipeline head should not be a comma-separated sequence expression\",\n PipelineTopicUnused:\n \"Pipeline is in topic style but does not use topic reference\",\n PrimaryTopicNotAllowed:\n \"Topic reference was used in a lexical context without topic binding\",\n PrimaryTopicRequiresSmartPipeline:\n \"Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.\",\n PrivateInExpectedIn:\n \"Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`)\",\n PrivateNameRedeclaration: \"Duplicate private name #%0\",\n RecordExpressionBarIncorrectEndSyntaxType:\n \"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'\",\n RecordExpressionBarIncorrectStartSyntaxType:\n \"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'\",\n RecordExpressionHashIncorrectStartSyntaxType:\n \"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'\",\n RecordNoProto: \"'__proto__' is not allowed in Record expressions\",\n RestTrailingComma: \"Unexpected trailing comma after rest element\",\n SloppyFunction:\n \"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement\",\n StaticPrototype: \"Classes may not have static property named prototype\",\n StrictDelete: \"Deleting local variable in strict mode\",\n StrictEvalArguments: \"Assigning to '%0' in strict mode\",\n StrictEvalArgumentsBinding: \"Binding '%0' in strict mode\",\n StrictFunction:\n \"In strict mode code, functions can only be declared at top level or inside a block\",\n StrictNumericEscape: \"The only valid numeric escape in strict mode is '\\\\0'\",\n StrictOctalLiteral: \"Legacy octal literals are not allowed in strict mode\",\n StrictWith: \"'with' in strict mode\",\n SuperNotAllowed:\n \"super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?\",\n SuperPrivateField: \"Private fields can't be accessed on super\",\n TrailingDecorator: \"Decorators must be attached to a class element\",\n TupleExpressionBarIncorrectEndSyntaxType:\n \"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'\",\n TupleExpressionBarIncorrectStartSyntaxType:\n \"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'\",\n TupleExpressionHashIncorrectStartSyntaxType:\n \"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'\",\n UnexpectedArgumentPlaceholder: \"Unexpected argument placeholder\",\n UnexpectedAwaitAfterPipelineBody:\n 'Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal',\n UnexpectedDigitAfterHash: \"Unexpected digit after hash token\",\n UnexpectedImportExport:\n \"'import' and 'export' may only appear at the top level\",\n UnexpectedKeyword: \"Unexpected keyword '%0'\",\n UnexpectedLeadingDecorator:\n \"Leading decorators must be attached to a class declaration\",\n UnexpectedLexicalDeclaration:\n \"Lexical declaration cannot appear in a single-statement context\",\n UnexpectedNewTarget: \"new.target can only be used in functions\",\n UnexpectedNumericSeparator:\n \"A numeric separator is only allowed between two digits\",\n UnexpectedPrivateField:\n \"Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\\n or a property of member expression (i.e. this.#p).\",\n UnexpectedReservedWord: \"Unexpected reserved word '%0'\",\n UnexpectedSuper: \"super is only allowed in object methods and classes\",\n UnexpectedToken: \"Unexpected token '%0'\",\n UnexpectedTokenUnaryExponentiation:\n \"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.\",\n UnsupportedBind: \"Binding should be performed on object property.\",\n UnsupportedDecoratorExport:\n \"A decorated export must export a class declaration\",\n UnsupportedDefaultExport:\n \"Only expressions, functions or classes are allowed as the `default` export.\",\n UnsupportedImport: \"import can only be used in import() or import.meta\",\n UnsupportedMetaProperty: \"The only valid meta property for %0 is %0.%1\",\n UnsupportedParameterDecorator:\n \"Decorators cannot be used to decorate parameters\",\n UnsupportedPropertyDecorator:\n \"Decorators cannot be used to decorate object literal properties\",\n UnsupportedSuper:\n \"super can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop])\",\n UnterminatedComment: \"Unterminated comment\",\n UnterminatedRegExp: \"Unterminated regular expression\",\n UnterminatedString: \"Unterminated string constant\",\n UnterminatedTemplate: \"Unterminated template\",\n VarRedeclaration: \"Identifier '%0' has already been declared\",\n YieldBindingIdentifier:\n \"Can not use 'yield' as identifier inside a generator\",\n YieldInParameter: \"yield is not allowed in generator parameters\",\n ZeroDigitNumericSeparator:\n \"Numeric separator can not be used after leading 0\",\n});\n","// @flow\n/* eslint sort-keys: \"error\" */\nimport { getLineInfo, type Position } from \"../util/location\";\nimport CommentsParser from \"./comments\";\n\n// This function is used to raise exceptions on parse errors. It\n// takes an offset integer (into the current `input`) to indicate\n// the location of the error, attaches the position to the end\n// of the error message, and then raises a `SyntaxError` with that\n// message.\n\ntype ErrorContext = {\n pos: number,\n loc: Position,\n missingPlugin?: Array,\n code?: string,\n};\n\nexport { ErrorMessages as Errors } from \"./error-message.js\";\n\nexport default class ParserError extends CommentsParser {\n // Forward-declaration: defined in tokenizer/index.js\n /*::\n +isLookahead: boolean;\n */\n\n getLocationForPosition(pos: number): Position {\n let loc;\n if (pos === this.state.start) loc = this.state.startLoc;\n else if (pos === this.state.lastTokStart) loc = this.state.lastTokStartLoc;\n else if (pos === this.state.end) loc = this.state.endLoc;\n else if (pos === this.state.lastTokEnd) loc = this.state.lastTokEndLoc;\n else loc = getLineInfo(this.input, pos);\n\n return loc;\n }\n\n raise(pos: number, errorTemplate: string, ...params: any): Error | empty {\n return this.raiseWithData(pos, undefined, errorTemplate, ...params);\n }\n\n raiseWithData(\n pos: number,\n data?: {\n missingPlugin?: Array,\n code?: string,\n },\n errorTemplate: string,\n ...params: any\n ): Error | empty {\n const loc = this.getLocationForPosition(pos);\n const message =\n errorTemplate.replace(/%(\\d+)/g, (_, i: number) => params[i]) +\n ` (${loc.line}:${loc.column})`;\n return this._raise(Object.assign(({ loc, pos }: Object), data), message);\n }\n\n _raise(errorContext: ErrorContext, message: string): Error | empty {\n // $FlowIgnore\n const err: SyntaxError & ErrorContext = new SyntaxError(message);\n Object.assign(err, errorContext);\n if (this.options.errorRecovery) {\n if (!this.isLookahead) this.state.errors.push(err);\n return err;\n } else {\n throw err;\n }\n }\n}\n","// @flow\n\nimport { types as tt, TokenType } from \"../tokenizer/types\";\nimport type Parser from \"../parser\";\nimport type { ExpressionErrors } from \"../parser/util\";\nimport * as N from \"../types\";\nimport type { Position } from \"../util/location\";\nimport { type BindingTypes, BIND_NONE } from \"../util/scopeflags\";\nimport { Errors } from \"../parser/error\";\n\nfunction isSimpleProperty(node: N.Node): boolean {\n return (\n node != null &&\n node.type === \"Property\" &&\n node.kind === \"init\" &&\n node.method === false\n );\n}\n\nexport default (superClass: Class): Class =>\n class extends superClass {\n estreeParseRegExpLiteral({ pattern, flags }: N.RegExpLiteral): N.Node {\n let regex = null;\n try {\n regex = new RegExp(pattern, flags);\n } catch (e) {\n // In environments that don't support these flags value will\n // be null as the regex can't be represented natively.\n }\n const node = this.estreeParseLiteral(regex);\n node.regex = { pattern, flags };\n\n return node;\n }\n\n estreeParseBigIntLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/es2020.md#bigintliteral\n // $FlowIgnore\n const bigInt = typeof BigInt !== \"undefined\" ? BigInt(value) : null;\n const node = this.estreeParseLiteral(bigInt);\n node.bigint = String(node.value || value);\n\n return node;\n }\n\n estreeParseDecimalLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/experimental/decimal.md\n // $FlowIgnore\n // todo: use BigDecimal when node supports it.\n const decimal = null;\n const node = this.estreeParseLiteral(decimal);\n node.decimal = String(node.value || value);\n\n return node;\n }\n\n estreeParseLiteral(value: any): N.Node {\n return this.parseLiteral(value, \"Literal\");\n }\n\n directiveToStmt(directive: N.Directive): N.ExpressionStatement {\n const directiveLiteral = directive.value;\n\n const stmt = this.startNodeAt(directive.start, directive.loc.start);\n const expression = this.startNodeAt(\n directiveLiteral.start,\n directiveLiteral.loc.start,\n );\n\n expression.value = directiveLiteral.value;\n expression.raw = directiveLiteral.extra.raw;\n\n stmt.expression = this.finishNodeAt(\n expression,\n \"Literal\",\n directiveLiteral.end,\n directiveLiteral.loc.end,\n );\n stmt.directive = directiveLiteral.extra.raw.slice(1, -1);\n\n return this.finishNodeAt(\n stmt,\n \"ExpressionStatement\",\n directive.end,\n directive.loc.end,\n );\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n initFunction(\n node: N.BodilessFunctionOrMethodBase,\n isAsync: ?boolean,\n ): void {\n super.initFunction(node, isAsync);\n node.expression = false;\n }\n\n checkDeclaration(node: N.Pattern | N.ObjectProperty): void {\n if (isSimpleProperty(node)) {\n this.checkDeclaration(((node: any): N.EstreeProperty).value);\n } else {\n super.checkDeclaration(node);\n }\n }\n\n checkGetterSetterParams(method: N.ObjectMethod | N.ClassMethod): void {\n const prop = ((method: any): N.EstreeProperty | N.EstreeMethodDefinition);\n const paramCount = prop.kind === \"get\" ? 0 : 1;\n const start = prop.start;\n if (prop.value.params.length !== paramCount) {\n if (method.kind === \"get\") {\n this.raise(start, Errors.BadGetterArity);\n } else {\n this.raise(start, Errors.BadSetterArity);\n }\n } else if (\n prop.kind === \"set\" &&\n prop.value.params[0].type === \"RestElement\"\n ) {\n this.raise(start, Errors.BadSetterRestParameter);\n }\n }\n\n checkLVal(\n expr: N.Expression,\n bindingType: BindingTypes = BIND_NONE,\n checkClashes: ?{ [key: string]: boolean },\n contextDescription: string,\n disallowLetBinding?: boolean,\n ): void {\n switch (expr.type) {\n case \"ObjectPattern\":\n expr.properties.forEach(prop => {\n this.checkLVal(\n prop.type === \"Property\" ? prop.value : prop,\n bindingType,\n checkClashes,\n \"object destructuring pattern\",\n disallowLetBinding,\n );\n });\n break;\n default:\n super.checkLVal(\n expr,\n bindingType,\n checkClashes,\n contextDescription,\n disallowLetBinding,\n );\n }\n }\n\n checkProto(\n prop: N.ObjectMember | N.SpreadElement,\n isRecord: boolean,\n protoRef: { used: boolean },\n refExpressionErrors: ?ExpressionErrors,\n ): void {\n // $FlowIgnore: check prop.method and fallback to super method\n if (prop.method) {\n return;\n }\n super.checkProto(prop, isRecord, protoRef, refExpressionErrors);\n }\n\n isValidDirective(stmt: N.Statement): boolean {\n return (\n stmt.type === \"ExpressionStatement\" &&\n stmt.expression.type === \"Literal\" &&\n typeof stmt.expression.value === \"string\" &&\n !stmt.expression.extra?.parenthesized\n );\n }\n\n stmtToDirective(stmt: N.Statement): N.Directive {\n const directive = super.stmtToDirective(stmt);\n const value = stmt.expression.value;\n\n // Reset value to the actual value as in estree mode we want\n // the stmt to have the real value and not the raw value\n directive.value.value = value;\n\n return directive;\n }\n\n parseBlockBody(\n node: N.BlockStatementLike,\n allowDirectives: ?boolean,\n topLevel: boolean,\n end: TokenType,\n ): void {\n super.parseBlockBody(node, allowDirectives, topLevel, end);\n\n const directiveStatements = node.directives.map(d =>\n this.directiveToStmt(d),\n );\n node.body = directiveStatements.concat(node.body);\n // $FlowIgnore - directives isn't optional in the type definition\n delete node.directives;\n }\n\n pushClassMethod(\n classBody: N.ClassBody,\n method: N.ClassMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowsDirectSuper: boolean,\n ): void {\n this.parseMethod(\n method,\n isGenerator,\n isAsync,\n isConstructor,\n allowsDirectSuper,\n \"ClassMethod\",\n true,\n );\n if (method.typeParameters) {\n // $FlowIgnore\n method.value.typeParameters = method.typeParameters;\n delete method.typeParameters;\n }\n classBody.body.push(method);\n }\n\n parseExprAtom(refExpressionErrors?: ?ExpressionErrors): N.Expression {\n switch (this.state.type) {\n case tt.num:\n case tt.string:\n return this.estreeParseLiteral(this.state.value);\n\n case tt.regexp:\n return this.estreeParseRegExpLiteral(this.state.value);\n\n case tt.bigint:\n return this.estreeParseBigIntLiteral(this.state.value);\n\n case tt.decimal:\n return this.estreeParseDecimalLiteral(this.state.value);\n\n case tt._null:\n return this.estreeParseLiteral(null);\n\n case tt._true:\n return this.estreeParseLiteral(true);\n\n case tt._false:\n return this.estreeParseLiteral(false);\n\n default:\n return super.parseExprAtom(refExpressionErrors);\n }\n }\n\n parseLiteral(\n value: any,\n type: /*T[\"kind\"]*/ string,\n startPos?: number,\n startLoc?: Position,\n ): T {\n const node = super.parseLiteral(value, type, startPos, startLoc);\n node.raw = node.extra.raw;\n delete node.extra;\n\n return node;\n }\n\n parseFunctionBody(\n node: N.Function,\n allowExpression: ?boolean,\n isMethod?: boolean = false,\n ): void {\n super.parseFunctionBody(node, allowExpression, isMethod);\n node.expression = node.body.type !== \"BlockStatement\";\n }\n\n parseMethod(\n node: T,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowDirectSuper: boolean,\n type: string,\n inClassScope: boolean = false,\n ): T {\n let funcNode = this.startNode();\n funcNode.kind = node.kind; // provide kind, so super method correctly sets state\n funcNode = super.parseMethod(\n funcNode,\n isGenerator,\n isAsync,\n isConstructor,\n allowDirectSuper,\n type,\n inClassScope,\n );\n funcNode.type = \"FunctionExpression\";\n delete funcNode.kind;\n // $FlowIgnore\n node.value = funcNode;\n\n type = type === \"ClassMethod\" ? \"MethodDefinition\" : type;\n return this.finishNode(node, type);\n }\n\n parseObjectMethod(\n prop: N.ObjectMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n ): ?N.ObjectMethod {\n const node: N.EstreeProperty = (super.parseObjectMethod(\n prop,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n ): any);\n\n if (node) {\n node.type = \"Property\";\n if (((node: any): N.ClassMethod).kind === \"method\") node.kind = \"init\";\n node.shorthand = false;\n }\n\n return (node: any);\n }\n\n parseObjectProperty(\n prop: N.ObjectProperty,\n startPos: ?number,\n startLoc: ?Position,\n isPattern: boolean,\n refExpressionErrors: ?ExpressionErrors,\n ): ?N.ObjectProperty {\n const node: N.EstreeProperty = (super.parseObjectProperty(\n prop,\n startPos,\n startLoc,\n isPattern,\n refExpressionErrors,\n ): any);\n\n if (node) {\n node.kind = \"init\";\n node.type = \"Property\";\n }\n\n return (node: any);\n }\n\n toAssignable(node: N.Node): N.Node {\n if (isSimpleProperty(node)) {\n this.toAssignable(node.value);\n\n return node;\n }\n\n return super.toAssignable(node);\n }\n\n toAssignableObjectExpressionProp(prop: N.Node, isLast: boolean) {\n if (prop.kind === \"get\" || prop.kind === \"set\") {\n throw this.raise(prop.key.start, Errors.PatternHasAccessor);\n } else if (prop.method) {\n throw this.raise(prop.key.start, Errors.PatternHasMethod);\n } else {\n super.toAssignableObjectExpressionProp(prop, isLast);\n }\n }\n\n finishCallExpression(\n node: T,\n optional: boolean,\n ): N.Expression {\n super.finishCallExpression(node, optional);\n\n if (node.callee.type === \"Import\") {\n ((node: N.Node): N.EstreeImportExpression).type = \"ImportExpression\";\n ((node: N.Node): N.EstreeImportExpression).source = node.arguments[0];\n // $FlowIgnore - arguments isn't optional in the type definition\n delete node.arguments;\n // $FlowIgnore - callee isn't optional in the type definition\n delete node.callee;\n }\n\n return node;\n }\n\n toReferencedListDeep(\n exprList: $ReadOnlyArray,\n isParenthesizedExpr?: boolean,\n ): void {\n // ImportExpressions do not have an arguments array.\n if (!exprList) {\n return;\n }\n\n super.toReferencedListDeep(exprList, isParenthesizedExpr);\n }\n\n parseExport(node: N.Node) {\n super.parseExport(node);\n\n switch (node.type) {\n case \"ExportAllDeclaration\":\n node.exported = null;\n break;\n\n case \"ExportNamedDeclaration\":\n if (\n node.specifiers.length === 1 &&\n node.specifiers[0].type === \"ExportNamespaceSpecifier\"\n ) {\n node.type = \"ExportAllDeclaration\";\n node.exported = node.specifiers[0].exported;\n delete node.specifiers;\n }\n\n break;\n }\n\n return node;\n }\n\n parseSubscript(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls: ?boolean,\n state: N.ParseSubscriptState,\n ) {\n const node = super.parseSubscript(\n base,\n startPos,\n startLoc,\n noCalls,\n state,\n );\n\n if (state.optionalChainMember) {\n // https://github.com/estree/estree/blob/master/es2020.md#chainexpression\n if (\n node.type === \"OptionalMemberExpression\" ||\n node.type === \"OptionalCallExpression\"\n ) {\n node.type = node.type.substring(8); // strip Optional prefix\n }\n if (state.stop) {\n const chain = this.startNodeAtNode(node);\n chain.expression = node;\n return this.finishNode(chain, \"ChainExpression\");\n }\n } else if (\n node.type === \"MemberExpression\" ||\n node.type === \"CallExpression\"\n ) {\n node.optional = false;\n }\n\n return node;\n }\n };\n","// @flow\n\n// The algorithm used to determine whether a regexp can appear at a\n// given point in the program is loosely based on sweet.js' approach.\n// See https://github.com/mozilla/sweet.js/wiki/design\n\nimport { types as tt } from \"./types\";\nimport { lineBreak } from \"../util/whitespace\";\n\nexport class TokContext {\n constructor(\n token: string,\n isExpr?: boolean,\n preserveSpace?: boolean,\n override?: ?Function, // Takes a Tokenizer as a this-parameter, and returns void.\n ) {\n this.token = token;\n this.isExpr = !!isExpr;\n this.preserveSpace = !!preserveSpace;\n this.override = override;\n }\n\n token: string;\n isExpr: boolean;\n preserveSpace: boolean;\n override: ?Function;\n}\n\nexport const types: {\n [key: string]: TokContext,\n} = {\n braceStatement: new TokContext(\"{\", false),\n braceExpression: new TokContext(\"{\", true),\n templateQuasi: new TokContext(\"${\", false),\n parenStatement: new TokContext(\"(\", false),\n parenExpression: new TokContext(\"(\", true),\n template: new TokContext(\"`\", true, true, p => p.readTmplToken()),\n functionExpression: new TokContext(\"function\", true),\n functionStatement: new TokContext(\"function\", false),\n};\n\n// Token-specific context update code\n\ntt.parenR.updateContext = tt.braceR.updateContext = function () {\n if (this.state.context.length === 1) {\n this.state.exprAllowed = true;\n return;\n }\n\n let out = this.state.context.pop();\n if (out === types.braceStatement && this.curContext().token === \"function\") {\n out = this.state.context.pop();\n }\n\n this.state.exprAllowed = !out.isExpr;\n};\n\ntt.name.updateContext = function (prevType) {\n let allowed = false;\n if (prevType !== tt.dot) {\n if (\n (this.state.value === \"of\" &&\n !this.state.exprAllowed &&\n prevType !== tt._function &&\n prevType !== tt._class) ||\n (this.state.value === \"yield\" && this.prodParam.hasYield)\n ) {\n allowed = true;\n }\n }\n this.state.exprAllowed = allowed;\n\n if (this.state.isIterator) {\n this.state.isIterator = false;\n }\n};\n\ntt.braceL.updateContext = function (prevType) {\n this.state.context.push(\n this.braceIsBlock(prevType) ? types.braceStatement : types.braceExpression,\n );\n this.state.exprAllowed = true;\n};\n\ntt.dollarBraceL.updateContext = function () {\n this.state.context.push(types.templateQuasi);\n this.state.exprAllowed = true;\n};\n\ntt.parenL.updateContext = function (prevType) {\n const statementParens =\n prevType === tt._if ||\n prevType === tt._for ||\n prevType === tt._with ||\n prevType === tt._while;\n this.state.context.push(\n statementParens ? types.parenStatement : types.parenExpression,\n );\n this.state.exprAllowed = true;\n};\n\ntt.incDec.updateContext = function () {\n // tokExprAllowed stays unchanged\n};\n\ntt._function.updateContext = tt._class.updateContext = function (prevType) {\n if (prevType === tt.dot || prevType === tt.questionDot) {\n // when function/class follows dot/questionDot, it is part of\n // (optional)MemberExpression, then we don't need to push new token context\n } else if (\n prevType.beforeExpr &&\n prevType !== tt.semi &&\n prevType !== tt._else &&\n !(\n prevType === tt._return &&\n lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))\n ) &&\n !(\n (prevType === tt.colon || prevType === tt.braceL) &&\n this.curContext() === types.b_stat\n )\n ) {\n this.state.context.push(types.functionExpression);\n } else {\n this.state.context.push(types.functionStatement);\n }\n\n this.state.exprAllowed = false;\n};\n\ntt.backQuote.updateContext = function () {\n if (this.curContext() === types.template) {\n this.state.context.pop();\n } else {\n this.state.context.push(types.template);\n }\n this.state.exprAllowed = false;\n};\n\ntt.star.updateContext = function () {\n this.state.exprAllowed = false;\n};\n","// @flow\n\nimport * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.js`.\n\n/* prettier-ignore */\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u08a0-\\u08b4\\u08b6-\\u08c7\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c88\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\u9ffc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7bf\\ua7c2-\\ua7ca\\ua7f5-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u08d3-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf\\u1ac0\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1df9\\u1dfb-\\u1dff\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\";\n\nconst nonASCIIidentifierStart = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.js`.\n/* prettier-ignore */\n/* prettier-ignore */\nconst astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938];\n/* prettier-ignore */\nconst astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: $ReadOnlyArray): boolean {\n let pos = 0x10000;\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return (\n code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n );\n }\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n if (code < charCodes.digit0) return code === charCodes.dollarSign;\n if (code < charCodes.colon) return true;\n if (code < charCodes.uppercaseA) return false;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n return (\n isInAstralSet(code, astralIdentifierStartCodes) ||\n isInAstralSet(code, astralIdentifierCodes)\n );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n let isFirst = true;\n for (const char of Array.from(name)) {\n const cp = char.codePointAt(0);\n if (isFirst) {\n if (!isIdentifierStart(cp)) {\n return false;\n }\n isFirst = false;\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n return !isFirst;\n}\n","// @flow\n\nconst reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n","/* eslint max-len: 0 */\n\n// @flow\n\nimport * as charCodes from \"charcodes\";\n\nexport {\n isIdentifierStart,\n isIdentifierChar,\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\nexport const keywordRelationalOperator = /^in(stanceof)?$/;\n\n// Test whether a current state character code and next character code is @\n\nexport function isIteratorStart(current: number, next: number): boolean {\n return current === charCodes.atSign && next === charCodes.atSign;\n}\n","// @flow\n\n/*:: declare var invariant; */\n\n// Error messages are colocated with the plugin.\n/* eslint-disable @babel/development-internal/dry-error-messages */\n\nimport type Parser from \"../parser\";\nimport { types as tt, type TokenType } from \"../tokenizer/types\";\nimport * as N from \"../types\";\nimport type { Options } from \"../options\";\nimport type { Pos, Position } from \"../util/location\";\nimport type State from \"../tokenizer/state\";\nimport { types as tc } from \"../tokenizer/context\";\nimport * as charCodes from \"charcodes\";\nimport { isIteratorStart } from \"../util/identifier\";\nimport {\n type BindingTypes,\n BIND_NONE,\n BIND_LEXICAL,\n BIND_VAR,\n BIND_FUNCTION,\n SCOPE_ARROW,\n SCOPE_FUNCTION,\n SCOPE_OTHER,\n} from \"../util/scopeflags\";\nimport type { ExpressionErrors } from \"../parser/util\";\nimport { Errors } from \"../parser/error\";\n\nconst reservedTypes = new Set([\n \"_\",\n \"any\",\n \"bool\",\n \"boolean\",\n \"empty\",\n \"extends\",\n \"false\",\n \"interface\",\n \"mixed\",\n \"null\",\n \"number\",\n \"static\",\n \"string\",\n \"true\",\n \"typeof\",\n \"void\",\n]);\n\n/* eslint sort-keys: \"error\" */\n// The Errors key follows https://github.com/facebook/flow/blob/master/src/parser/parse_error.ml unless it does not exist\nconst FlowErrors = Object.freeze({\n AmbiguousConditionalArrow:\n \"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.\",\n AmbiguousDeclareModuleKind:\n \"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module\",\n AssignReservedType: \"Cannot overwrite reserved type %0\",\n DeclareClassElement:\n \"The `declare` modifier can only appear on class fields.\",\n DeclareClassFieldInitializer:\n \"Initializers are not allowed in fields with the `declare` modifier.\",\n DuplicateDeclareModuleExports: \"Duplicate `declare module.exports` statement\",\n EnumBooleanMemberNotInitialized:\n \"Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.\",\n EnumDuplicateMemberName:\n \"Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.\",\n EnumInconsistentMemberValues:\n \"Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.\",\n EnumInvalidExplicitType:\n \"Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.\",\n EnumInvalidExplicitTypeUnknownSupplied:\n \"Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.\",\n EnumInvalidMemberInitializerPrimaryType:\n \"Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.\",\n EnumInvalidMemberInitializerSymbolType:\n \"Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.\",\n EnumInvalidMemberInitializerUnknownType:\n \"The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.\",\n EnumInvalidMemberName:\n \"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.\",\n EnumNumberMemberNotInitialized:\n \"Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.\",\n EnumStringMemberInconsistentlyInitailized:\n \"String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.\",\n ImportTypeShorthandOnlyInPureImport:\n \"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements\",\n InexactInsideExact:\n \"Explicit inexact syntax cannot appear inside an explicit exact object type\",\n InexactInsideNonObject:\n \"Explicit inexact syntax cannot appear in class or interface definitions\",\n InexactVariance: \"Explicit inexact syntax cannot have variance\",\n InvalidNonTypeImportInDeclareModule:\n \"Imports within a `declare module` body must always be `import type` or `import typeof`\",\n MissingTypeParamDefault:\n \"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.\",\n NestedDeclareModule:\n \"`declare module` cannot be used inside another `declare module`\",\n NestedFlowComment: \"Cannot have a flow comment inside another flow comment\",\n OptionalBindingPattern:\n \"A binding pattern parameter cannot be optional in an implementation signature.\",\n SpreadVariance: \"Spread properties cannot have variance\",\n TypeBeforeInitializer:\n \"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`\",\n TypeCastInPattern:\n \"The type cast expression is expected to be wrapped with parenthesis\",\n UnexpectedExplicitInexactInObject:\n \"Explicit inexact syntax must appear at the end of an inexact object\",\n UnexpectedReservedType: \"Unexpected reserved type %0\",\n UnexpectedReservedUnderscore:\n \"`_` is only allowed as a type argument to call or new\",\n UnexpectedSpaceBetweenModuloChecks:\n \"Spaces between `%` and `checks` are not allowed here.\",\n UnexpectedSpreadType:\n \"Spread operator cannot appear in class or interface definitions\",\n UnexpectedSubtractionOperand:\n 'Unexpected token, expected \"number\" or \"bigint\"',\n UnexpectedTokenAfterTypeParameter:\n \"Expected an arrow function after this type parameter declaration\",\n UnsupportedDeclareExportKind:\n \"`declare export %0` is not supported. Use `%1` instead\",\n UnsupportedStatementInDeclareModule:\n \"Only declares and type imports are allowed inside declare module\",\n UnterminatedFlowComment: \"Unterminated flow-comment\",\n});\n/* eslint-disable sort-keys */\n\nfunction isEsModuleType(bodyElement: N.Node): boolean {\n return (\n bodyElement.type === \"DeclareExportAllDeclaration\" ||\n (bodyElement.type === \"DeclareExportDeclaration\" &&\n (!bodyElement.declaration ||\n (bodyElement.declaration.type !== \"TypeAlias\" &&\n bodyElement.declaration.type !== \"InterfaceDeclaration\")))\n );\n}\n\nfunction hasTypeImportKind(node: N.Node): boolean {\n return node.importKind === \"type\" || node.importKind === \"typeof\";\n}\n\nfunction isMaybeDefaultImport(state: State): boolean {\n return (\n (state.type === tt.name || !!state.type.keyword) && state.value !== \"from\"\n );\n}\n\nconst exportSuggestions = {\n const: \"declare export var\",\n let: \"declare export var\",\n type: \"export type\",\n interface: \"export interface\",\n};\n\n// Like Array#filter, but returns a tuple [ acceptedElements, discardedElements ]\nfunction partition(\n list: T[],\n test: (T, number, T[]) => ?boolean,\n): [T[], T[]] {\n const list1 = [];\n const list2 = [];\n for (let i = 0; i < list.length; i++) {\n (test(list[i], i, list) ? list1 : list2).push(list[i]);\n }\n return [list1, list2];\n}\n\nconst FLOW_PRAGMA_REGEX = /\\*?\\s*@((?:no)?flow)\\b/;\n\n// Flow enums types\ntype EnumExplicitType = null | \"boolean\" | \"number\" | \"string\" | \"symbol\";\ntype EnumContext = {|\n enumName: string,\n explicitType: EnumExplicitType,\n memberName: string,\n|};\ntype EnumMemberInit =\n | {| type: \"number\", pos: number, value: N.Node |}\n | {| type: \"string\", pos: number, value: N.Node |}\n | {| type: \"boolean\", pos: number, value: N.Node |}\n | {| type: \"invalid\", pos: number |}\n | {| type: \"none\", pos: number |};\n\nexport default (superClass: Class): Class =>\n class extends superClass {\n // The value of the @flow/@noflow pragma. Initially undefined, transitions\n // to \"@flow\" or \"@noflow\" if we see a pragma. Transitions to null if we are\n // past the initial comment.\n flowPragma: void | null | \"flow\" | \"noflow\";\n\n constructor(options: ?Options, input: string) {\n super(options, input);\n this.flowPragma = undefined;\n }\n\n shouldParseTypes(): boolean {\n return this.getPluginOption(\"flow\", \"all\") || this.flowPragma === \"flow\";\n }\n\n shouldParseEnums(): boolean {\n return !!this.getPluginOption(\"flow\", \"enums\");\n }\n\n finishToken(type: TokenType, val: any): void {\n if (\n type !== tt.string &&\n type !== tt.semi &&\n type !== tt.interpreterDirective\n ) {\n if (this.flowPragma === undefined) {\n this.flowPragma = null;\n }\n }\n return super.finishToken(type, val);\n }\n\n addComment(comment: N.Comment): void {\n if (this.flowPragma === undefined) {\n // Try to parse a flow pragma.\n const matches = FLOW_PRAGMA_REGEX.exec(comment.value);\n if (!matches) {\n // do nothing\n } else if (matches[1] === \"flow\") {\n this.flowPragma = \"flow\";\n } else if (matches[1] === \"noflow\") {\n this.flowPragma = \"noflow\";\n } else {\n throw new Error(\"Unexpected flow pragma\");\n }\n }\n return super.addComment(comment);\n }\n\n flowParseTypeInitialiser(tok?: TokenType): N.FlowType {\n const oldInType = this.state.inType;\n this.state.inType = true;\n this.expect(tok || tt.colon);\n\n const type = this.flowParseType();\n this.state.inType = oldInType;\n return type;\n }\n\n flowParsePredicate(): N.FlowType {\n const node = this.startNode();\n const moduloLoc = this.state.startLoc;\n const moduloPos = this.state.start;\n this.expect(tt.modulo);\n const checksLoc = this.state.startLoc;\n this.expectContextual(\"checks\");\n // Force '%' and 'checks' to be adjacent\n if (\n moduloLoc.line !== checksLoc.line ||\n moduloLoc.column !== checksLoc.column - 1\n ) {\n this.raise(moduloPos, FlowErrors.UnexpectedSpaceBetweenModuloChecks);\n }\n if (this.eat(tt.parenL)) {\n node.value = this.parseExpression();\n this.expect(tt.parenR);\n return this.finishNode(node, \"DeclaredPredicate\");\n } else {\n return this.finishNode(node, \"InferredPredicate\");\n }\n }\n\n flowParseTypeAndPredicateInitialiser(): [?N.FlowType, ?N.FlowPredicate] {\n const oldInType = this.state.inType;\n this.state.inType = true;\n this.expect(tt.colon);\n let type = null;\n let predicate = null;\n if (this.match(tt.modulo)) {\n this.state.inType = oldInType;\n predicate = this.flowParsePredicate();\n } else {\n type = this.flowParseType();\n this.state.inType = oldInType;\n if (this.match(tt.modulo)) {\n predicate = this.flowParsePredicate();\n }\n }\n return [type, predicate];\n }\n\n flowParseDeclareClass(node: N.FlowDeclareClass): N.FlowDeclareClass {\n this.next();\n this.flowParseInterfaceish(node, /*isClass*/ true);\n return this.finishNode(node, \"DeclareClass\");\n }\n\n flowParseDeclareFunction(\n node: N.FlowDeclareFunction,\n ): N.FlowDeclareFunction {\n this.next();\n\n const id = (node.id = this.parseIdentifier());\n\n const typeNode = this.startNode();\n const typeContainer = this.startNode();\n\n if (this.isRelational(\"<\")) {\n typeNode.typeParameters = this.flowParseTypeParameterDeclaration();\n } else {\n typeNode.typeParameters = null;\n }\n\n this.expect(tt.parenL);\n const tmp = this.flowParseFunctionTypeParams();\n typeNode.params = tmp.params;\n typeNode.rest = tmp.rest;\n this.expect(tt.parenR);\n\n [\n // $FlowFixMe (destructuring not supported yet)\n typeNode.returnType,\n // $FlowFixMe (destructuring not supported yet)\n node.predicate,\n ] = this.flowParseTypeAndPredicateInitialiser();\n\n typeContainer.typeAnnotation = this.finishNode(\n typeNode,\n \"FunctionTypeAnnotation\",\n );\n\n id.typeAnnotation = this.finishNode(typeContainer, \"TypeAnnotation\");\n\n this.resetEndLocation(id);\n this.semicolon();\n\n return this.finishNode(node, \"DeclareFunction\");\n }\n\n flowParseDeclare(\n node: N.FlowDeclare,\n insideModule?: boolean,\n ): N.FlowDeclare {\n if (this.match(tt._class)) {\n return this.flowParseDeclareClass(node);\n } else if (this.match(tt._function)) {\n return this.flowParseDeclareFunction(node);\n } else if (this.match(tt._var)) {\n return this.flowParseDeclareVariable(node);\n } else if (this.eatContextual(\"module\")) {\n if (this.match(tt.dot)) {\n return this.flowParseDeclareModuleExports(node);\n } else {\n if (insideModule) {\n this.raise(this.state.lastTokStart, FlowErrors.NestedDeclareModule);\n }\n return this.flowParseDeclareModule(node);\n }\n } else if (this.isContextual(\"type\")) {\n return this.flowParseDeclareTypeAlias(node);\n } else if (this.isContextual(\"opaque\")) {\n return this.flowParseDeclareOpaqueType(node);\n } else if (this.isContextual(\"interface\")) {\n return this.flowParseDeclareInterface(node);\n } else if (this.match(tt._export)) {\n return this.flowParseDeclareExportDeclaration(node, insideModule);\n } else {\n throw this.unexpected();\n }\n }\n\n flowParseDeclareVariable(\n node: N.FlowDeclareVariable,\n ): N.FlowDeclareVariable {\n this.next();\n node.id = this.flowParseTypeAnnotatableIdentifier(\n /*allowPrimitiveOverride*/ true,\n );\n this.scope.declareName(node.id.name, BIND_VAR, node.id.start);\n this.semicolon();\n return this.finishNode(node, \"DeclareVariable\");\n }\n\n flowParseDeclareModule(node: N.FlowDeclareModule): N.FlowDeclareModule {\n this.scope.enter(SCOPE_OTHER);\n\n if (this.match(tt.string)) {\n node.id = this.parseExprAtom();\n } else {\n node.id = this.parseIdentifier();\n }\n\n const bodyNode = (node.body = this.startNode());\n const body = (bodyNode.body = []);\n this.expect(tt.braceL);\n while (!this.match(tt.braceR)) {\n let bodyNode = this.startNode();\n\n if (this.match(tt._import)) {\n this.next();\n if (!this.isContextual(\"type\") && !this.match(tt._typeof)) {\n this.raise(\n this.state.lastTokStart,\n FlowErrors.InvalidNonTypeImportInDeclareModule,\n );\n }\n this.parseImport(bodyNode);\n } else {\n this.expectContextual(\n \"declare\",\n FlowErrors.UnsupportedStatementInDeclareModule,\n );\n\n bodyNode = this.flowParseDeclare(bodyNode, true);\n }\n\n body.push(bodyNode);\n }\n\n this.scope.exit();\n\n this.expect(tt.braceR);\n\n this.finishNode(bodyNode, \"BlockStatement\");\n\n let kind = null;\n let hasModuleExport = false;\n body.forEach(bodyElement => {\n if (isEsModuleType(bodyElement)) {\n if (kind === \"CommonJS\") {\n this.raise(\n bodyElement.start,\n FlowErrors.AmbiguousDeclareModuleKind,\n );\n }\n kind = \"ES\";\n } else if (bodyElement.type === \"DeclareModuleExports\") {\n if (hasModuleExport) {\n this.raise(\n bodyElement.start,\n FlowErrors.DuplicateDeclareModuleExports,\n );\n }\n if (kind === \"ES\") {\n this.raise(\n bodyElement.start,\n FlowErrors.AmbiguousDeclareModuleKind,\n );\n }\n kind = \"CommonJS\";\n hasModuleExport = true;\n }\n });\n\n node.kind = kind || \"CommonJS\";\n return this.finishNode(node, \"DeclareModule\");\n }\n\n flowParseDeclareExportDeclaration(\n node: N.FlowDeclareExportDeclaration,\n insideModule: ?boolean,\n ): N.FlowDeclareExportDeclaration {\n this.expect(tt._export);\n\n if (this.eat(tt._default)) {\n if (this.match(tt._function) || this.match(tt._class)) {\n // declare export default class ...\n // declare export default function ...\n node.declaration = this.flowParseDeclare(this.startNode());\n } else {\n // declare export default [type];\n node.declaration = this.flowParseType();\n this.semicolon();\n }\n node.default = true;\n\n return this.finishNode(node, \"DeclareExportDeclaration\");\n } else {\n if (\n this.match(tt._const) ||\n this.isLet() ||\n ((this.isContextual(\"type\") || this.isContextual(\"interface\")) &&\n !insideModule)\n ) {\n const label = this.state.value;\n const suggestion = exportSuggestions[label];\n\n throw this.raise(\n this.state.start,\n FlowErrors.UnsupportedDeclareExportKind,\n label,\n suggestion,\n );\n }\n\n if (\n this.match(tt._var) || // declare export var ...\n this.match(tt._function) || // declare export function ...\n this.match(tt._class) || // declare export class ...\n this.isContextual(\"opaque\") // declare export opaque ..\n ) {\n node.declaration = this.flowParseDeclare(this.startNode());\n node.default = false;\n\n return this.finishNode(node, \"DeclareExportDeclaration\");\n } else if (\n this.match(tt.star) || // declare export * from ''\n this.match(tt.braceL) || // declare export {} ...\n this.isContextual(\"interface\") || // declare export interface ...\n this.isContextual(\"type\") || // declare export type ...\n this.isContextual(\"opaque\") // declare export opaque type ...\n ) {\n node = this.parseExport(node);\n if (node.type === \"ExportNamedDeclaration\") {\n // flow does not support the ExportNamedDeclaration\n // $FlowIgnore\n node.type = \"ExportDeclaration\";\n // $FlowFixMe\n node.default = false;\n delete node.exportKind;\n }\n\n // $FlowIgnore\n node.type = \"Declare\" + node.type;\n\n return node;\n }\n }\n\n throw this.unexpected();\n }\n\n flowParseDeclareModuleExports(\n node: N.FlowDeclareModuleExports,\n ): N.FlowDeclareModuleExports {\n this.next();\n this.expectContextual(\"exports\");\n node.typeAnnotation = this.flowParseTypeAnnotation();\n this.semicolon();\n\n return this.finishNode(node, \"DeclareModuleExports\");\n }\n\n flowParseDeclareTypeAlias(\n node: N.FlowDeclareTypeAlias,\n ): N.FlowDeclareTypeAlias {\n this.next();\n this.flowParseTypeAlias(node);\n // Don't do finishNode as we don't want to process comments twice\n node.type = \"DeclareTypeAlias\";\n return node;\n }\n\n flowParseDeclareOpaqueType(\n node: N.FlowDeclareOpaqueType,\n ): N.FlowDeclareOpaqueType {\n this.next();\n this.flowParseOpaqueType(node, true);\n // Don't do finishNode as we don't want to process comments twice\n node.type = \"DeclareOpaqueType\";\n return node;\n }\n\n flowParseDeclareInterface(\n node: N.FlowDeclareInterface,\n ): N.FlowDeclareInterface {\n this.next();\n this.flowParseInterfaceish(node);\n return this.finishNode(node, \"DeclareInterface\");\n }\n\n // Interfaces\n\n flowParseInterfaceish(\n node: N.FlowDeclare,\n isClass?: boolean = false,\n ): void {\n node.id = this.flowParseRestrictedIdentifier(\n /* liberal */ !isClass,\n /* declaration */ true,\n );\n\n this.scope.declareName(\n node.id.name,\n isClass ? BIND_FUNCTION : BIND_LEXICAL,\n node.id.start,\n );\n\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n } else {\n node.typeParameters = null;\n }\n\n node.extends = [];\n node.implements = [];\n node.mixins = [];\n\n if (this.eat(tt._extends)) {\n do {\n node.extends.push(this.flowParseInterfaceExtends());\n } while (!isClass && this.eat(tt.comma));\n }\n\n if (this.isContextual(\"mixins\")) {\n this.next();\n do {\n node.mixins.push(this.flowParseInterfaceExtends());\n } while (this.eat(tt.comma));\n }\n\n if (this.isContextual(\"implements\")) {\n this.next();\n do {\n node.implements.push(this.flowParseInterfaceExtends());\n } while (this.eat(tt.comma));\n }\n\n node.body = this.flowParseObjectType({\n allowStatic: isClass,\n allowExact: false,\n allowSpread: false,\n allowProto: isClass,\n allowInexact: false,\n });\n }\n\n flowParseInterfaceExtends(): N.FlowInterfaceExtends {\n const node = this.startNode();\n\n node.id = this.flowParseQualifiedTypeIdentifier();\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterInstantiation();\n } else {\n node.typeParameters = null;\n }\n\n return this.finishNode(node, \"InterfaceExtends\");\n }\n\n flowParseInterface(node: N.FlowInterface): N.FlowInterface {\n this.flowParseInterfaceish(node);\n return this.finishNode(node, \"InterfaceDeclaration\");\n }\n\n checkNotUnderscore(word: string) {\n if (word === \"_\") {\n this.raise(this.state.start, FlowErrors.UnexpectedReservedUnderscore);\n }\n }\n\n checkReservedType(word: string, startLoc: number, declaration?: boolean) {\n if (!reservedTypes.has(word)) return;\n\n this.raise(\n startLoc,\n declaration\n ? FlowErrors.AssignReservedType\n : FlowErrors.UnexpectedReservedType,\n word,\n );\n }\n\n flowParseRestrictedIdentifier(\n liberal?: boolean,\n declaration?: boolean,\n ): N.Identifier {\n this.checkReservedType(this.state.value, this.state.start, declaration);\n return this.parseIdentifier(liberal);\n }\n\n // Type aliases\n\n flowParseTypeAlias(node: N.FlowTypeAlias): N.FlowTypeAlias {\n node.id = this.flowParseRestrictedIdentifier(\n /* liberal */ false,\n /* declaration */ true,\n );\n this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start);\n\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n } else {\n node.typeParameters = null;\n }\n\n node.right = this.flowParseTypeInitialiser(tt.eq);\n this.semicolon();\n\n return this.finishNode(node, \"TypeAlias\");\n }\n\n flowParseOpaqueType(\n node: N.FlowOpaqueType,\n declare: boolean,\n ): N.FlowOpaqueType {\n this.expectContextual(\"type\");\n node.id = this.flowParseRestrictedIdentifier(\n /* liberal */ true,\n /* declaration */ true,\n );\n this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start);\n\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n } else {\n node.typeParameters = null;\n }\n\n // Parse the supertype\n node.supertype = null;\n if (this.match(tt.colon)) {\n node.supertype = this.flowParseTypeInitialiser(tt.colon);\n }\n\n node.impltype = null;\n if (!declare) {\n node.impltype = this.flowParseTypeInitialiser(tt.eq);\n }\n this.semicolon();\n\n return this.finishNode(node, \"OpaqueType\");\n }\n\n // Type annotations\n\n flowParseTypeParameter(requireDefault?: boolean = false): N.TypeParameter {\n const nodeStart = this.state.start;\n\n const node = this.startNode();\n\n const variance = this.flowParseVariance();\n\n const ident = this.flowParseTypeAnnotatableIdentifier();\n node.name = ident.name;\n node.variance = variance;\n node.bound = ident.typeAnnotation;\n\n if (this.match(tt.eq)) {\n this.eat(tt.eq);\n node.default = this.flowParseType();\n } else {\n if (requireDefault) {\n this.raise(nodeStart, FlowErrors.MissingTypeParamDefault);\n }\n }\n\n return this.finishNode(node, \"TypeParameter\");\n }\n\n flowParseTypeParameterDeclaration(): N.TypeParameterDeclaration {\n const oldInType = this.state.inType;\n const node = this.startNode();\n node.params = [];\n\n this.state.inType = true;\n\n // istanbul ignore else: this condition is already checked at all call sites\n if (this.isRelational(\"<\") || this.match(tt.jsxTagStart)) {\n this.next();\n } else {\n this.unexpected();\n }\n\n let defaultRequired = false;\n\n do {\n const typeParameter = this.flowParseTypeParameter(defaultRequired);\n\n node.params.push(typeParameter);\n\n if (typeParameter.default) {\n defaultRequired = true;\n }\n\n if (!this.isRelational(\">\")) {\n this.expect(tt.comma);\n }\n } while (!this.isRelational(\">\"));\n this.expectRelational(\">\");\n\n this.state.inType = oldInType;\n\n return this.finishNode(node, \"TypeParameterDeclaration\");\n }\n\n flowParseTypeParameterInstantiation(): N.TypeParameterInstantiation {\n const node = this.startNode();\n const oldInType = this.state.inType;\n node.params = [];\n\n this.state.inType = true;\n\n this.expectRelational(\"<\");\n const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n this.state.noAnonFunctionType = false;\n while (!this.isRelational(\">\")) {\n node.params.push(this.flowParseType());\n if (!this.isRelational(\">\")) {\n this.expect(tt.comma);\n }\n }\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n this.expectRelational(\">\");\n\n this.state.inType = oldInType;\n\n return this.finishNode(node, \"TypeParameterInstantiation\");\n }\n\n flowParseTypeParameterInstantiationCallOrNew(): N.TypeParameterInstantiation {\n const node = this.startNode();\n const oldInType = this.state.inType;\n node.params = [];\n\n this.state.inType = true;\n\n this.expectRelational(\"<\");\n while (!this.isRelational(\">\")) {\n node.params.push(this.flowParseTypeOrImplicitInstantiation());\n if (!this.isRelational(\">\")) {\n this.expect(tt.comma);\n }\n }\n this.expectRelational(\">\");\n\n this.state.inType = oldInType;\n\n return this.finishNode(node, \"TypeParameterInstantiation\");\n }\n\n flowParseInterfaceType(): N.FlowInterfaceType {\n const node = this.startNode();\n this.expectContextual(\"interface\");\n\n node.extends = [];\n if (this.eat(tt._extends)) {\n do {\n node.extends.push(this.flowParseInterfaceExtends());\n } while (this.eat(tt.comma));\n }\n\n node.body = this.flowParseObjectType({\n allowStatic: false,\n allowExact: false,\n allowSpread: false,\n allowProto: false,\n allowInexact: false,\n });\n\n return this.finishNode(node, \"InterfaceTypeAnnotation\");\n }\n\n flowParseObjectPropertyKey(): N.Expression {\n return this.match(tt.num) || this.match(tt.string)\n ? this.parseExprAtom()\n : this.parseIdentifier(true);\n }\n\n flowParseObjectTypeIndexer(\n node: N.FlowObjectTypeIndexer,\n isStatic: boolean,\n variance: ?N.FlowVariance,\n ): N.FlowObjectTypeIndexer {\n node.static = isStatic;\n\n // Note: bracketL has already been consumed\n if (this.lookahead().type === tt.colon) {\n node.id = this.flowParseObjectPropertyKey();\n node.key = this.flowParseTypeInitialiser();\n } else {\n node.id = null;\n node.key = this.flowParseType();\n }\n this.expect(tt.bracketR);\n node.value = this.flowParseTypeInitialiser();\n node.variance = variance;\n\n return this.finishNode(node, \"ObjectTypeIndexer\");\n }\n\n flowParseObjectTypeInternalSlot(\n node: N.FlowObjectTypeInternalSlot,\n isStatic: boolean,\n ): N.FlowObjectTypeInternalSlot {\n node.static = isStatic;\n // Note: both bracketL have already been consumed\n node.id = this.flowParseObjectPropertyKey();\n this.expect(tt.bracketR);\n this.expect(tt.bracketR);\n if (this.isRelational(\"<\") || this.match(tt.parenL)) {\n node.method = true;\n node.optional = false;\n node.value = this.flowParseObjectTypeMethodish(\n this.startNodeAt(node.start, node.loc.start),\n );\n } else {\n node.method = false;\n if (this.eat(tt.question)) {\n node.optional = true;\n }\n node.value = this.flowParseTypeInitialiser();\n }\n return this.finishNode(node, \"ObjectTypeInternalSlot\");\n }\n\n flowParseObjectTypeMethodish(\n node: N.FlowFunctionTypeAnnotation,\n ): N.FlowFunctionTypeAnnotation {\n node.params = [];\n node.rest = null;\n node.typeParameters = null;\n\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n\n this.expect(tt.parenL);\n while (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {\n node.params.push(this.flowParseFunctionTypeParam());\n if (!this.match(tt.parenR)) {\n this.expect(tt.comma);\n }\n }\n\n if (this.eat(tt.ellipsis)) {\n node.rest = this.flowParseFunctionTypeParam();\n }\n this.expect(tt.parenR);\n node.returnType = this.flowParseTypeInitialiser();\n\n return this.finishNode(node, \"FunctionTypeAnnotation\");\n }\n\n flowParseObjectTypeCallProperty(\n node: N.FlowObjectTypeCallProperty,\n isStatic: boolean,\n ): N.FlowObjectTypeCallProperty {\n const valueNode = this.startNode();\n node.static = isStatic;\n node.value = this.flowParseObjectTypeMethodish(valueNode);\n return this.finishNode(node, \"ObjectTypeCallProperty\");\n }\n\n flowParseObjectType({\n allowStatic,\n allowExact,\n allowSpread,\n allowProto,\n allowInexact,\n }: {\n allowStatic: boolean,\n allowExact: boolean,\n allowSpread: boolean,\n allowProto: boolean,\n allowInexact: boolean,\n }): N.FlowObjectTypeAnnotation {\n const oldInType = this.state.inType;\n this.state.inType = true;\n\n const nodeStart = this.startNode();\n\n nodeStart.callProperties = [];\n nodeStart.properties = [];\n nodeStart.indexers = [];\n nodeStart.internalSlots = [];\n\n let endDelim;\n let exact;\n let inexact = false;\n if (allowExact && this.match(tt.braceBarL)) {\n this.expect(tt.braceBarL);\n endDelim = tt.braceBarR;\n exact = true;\n } else {\n this.expect(tt.braceL);\n endDelim = tt.braceR;\n exact = false;\n }\n\n nodeStart.exact = exact;\n\n while (!this.match(endDelim)) {\n let isStatic = false;\n let protoStart: ?number = null;\n let inexactStart: ?number = null;\n const node = this.startNode();\n\n if (allowProto && this.isContextual(\"proto\")) {\n const lookahead = this.lookahead();\n\n if (lookahead.type !== tt.colon && lookahead.type !== tt.question) {\n this.next();\n protoStart = this.state.start;\n allowStatic = false;\n }\n }\n\n if (allowStatic && this.isContextual(\"static\")) {\n const lookahead = this.lookahead();\n\n // static is a valid identifier name\n if (lookahead.type !== tt.colon && lookahead.type !== tt.question) {\n this.next();\n isStatic = true;\n }\n }\n\n const variance = this.flowParseVariance();\n\n if (this.eat(tt.bracketL)) {\n if (protoStart != null) {\n this.unexpected(protoStart);\n }\n if (this.eat(tt.bracketL)) {\n if (variance) {\n this.unexpected(variance.start);\n }\n nodeStart.internalSlots.push(\n this.flowParseObjectTypeInternalSlot(node, isStatic),\n );\n } else {\n nodeStart.indexers.push(\n this.flowParseObjectTypeIndexer(node, isStatic, variance),\n );\n }\n } else if (this.match(tt.parenL) || this.isRelational(\"<\")) {\n if (protoStart != null) {\n this.unexpected(protoStart);\n }\n if (variance) {\n this.unexpected(variance.start);\n }\n nodeStart.callProperties.push(\n this.flowParseObjectTypeCallProperty(node, isStatic),\n );\n } else {\n let kind = \"init\";\n\n if (this.isContextual(\"get\") || this.isContextual(\"set\")) {\n const lookahead = this.lookahead();\n if (\n lookahead.type === tt.name ||\n lookahead.type === tt.string ||\n lookahead.type === tt.num\n ) {\n kind = this.state.value;\n this.next();\n }\n }\n\n const propOrInexact = this.flowParseObjectTypeProperty(\n node,\n isStatic,\n protoStart,\n variance,\n kind,\n allowSpread,\n allowInexact ?? !exact,\n );\n\n if (propOrInexact === null) {\n inexact = true;\n inexactStart = this.state.lastTokStart;\n } else {\n nodeStart.properties.push(propOrInexact);\n }\n }\n\n this.flowObjectTypeSemicolon();\n\n if (\n inexactStart &&\n !this.match(tt.braceR) &&\n !this.match(tt.braceBarR)\n ) {\n this.raise(\n inexactStart,\n FlowErrors.UnexpectedExplicitInexactInObject,\n );\n }\n }\n\n this.expect(endDelim);\n\n /* The inexact flag should only be added on ObjectTypeAnnotations that\n * are not the body of an interface, declare interface, or declare class.\n * Since spreads are only allowed in object types, checking that is\n * sufficient here.\n */\n if (allowSpread) {\n nodeStart.inexact = inexact;\n }\n\n const out = this.finishNode(nodeStart, \"ObjectTypeAnnotation\");\n\n this.state.inType = oldInType;\n\n return out;\n }\n\n flowParseObjectTypeProperty(\n node: N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty,\n isStatic: boolean,\n protoStart: ?number,\n variance: ?N.FlowVariance,\n kind: string,\n allowSpread: boolean,\n allowInexact: boolean,\n ): (N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty) | null {\n if (this.eat(tt.ellipsis)) {\n const isInexactToken =\n this.match(tt.comma) ||\n this.match(tt.semi) ||\n this.match(tt.braceR) ||\n this.match(tt.braceBarR);\n\n if (isInexactToken) {\n if (!allowSpread) {\n this.raise(\n this.state.lastTokStart,\n FlowErrors.InexactInsideNonObject,\n );\n } else if (!allowInexact) {\n this.raise(this.state.lastTokStart, FlowErrors.InexactInsideExact);\n }\n if (variance) {\n this.raise(variance.start, FlowErrors.InexactVariance);\n }\n\n return null;\n }\n\n if (!allowSpread) {\n this.raise(this.state.lastTokStart, FlowErrors.UnexpectedSpreadType);\n }\n if (protoStart != null) {\n this.unexpected(protoStart);\n }\n if (variance) {\n this.raise(variance.start, FlowErrors.SpreadVariance);\n }\n\n node.argument = this.flowParseType();\n return this.finishNode(node, \"ObjectTypeSpreadProperty\");\n } else {\n node.key = this.flowParseObjectPropertyKey();\n node.static = isStatic;\n node.proto = protoStart != null;\n node.kind = kind;\n\n let optional = false;\n if (this.isRelational(\"<\") || this.match(tt.parenL)) {\n // This is a method property\n node.method = true;\n\n if (protoStart != null) {\n this.unexpected(protoStart);\n }\n if (variance) {\n this.unexpected(variance.start);\n }\n\n node.value = this.flowParseObjectTypeMethodish(\n this.startNodeAt(node.start, node.loc.start),\n );\n if (kind === \"get\" || kind === \"set\") {\n this.flowCheckGetterSetterParams(node);\n }\n } else {\n if (kind !== \"init\") this.unexpected();\n\n node.method = false;\n\n if (this.eat(tt.question)) {\n optional = true;\n }\n node.value = this.flowParseTypeInitialiser();\n node.variance = variance;\n }\n\n node.optional = optional;\n\n return this.finishNode(node, \"ObjectTypeProperty\");\n }\n }\n\n // This is similar to checkGetterSetterParams, but as\n // @babel/parser uses non estree properties we cannot reuse it here\n flowCheckGetterSetterParams(\n property: N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty,\n ): void {\n const paramCount = property.kind === \"get\" ? 0 : 1;\n const start = property.start;\n const length =\n property.value.params.length + (property.value.rest ? 1 : 0);\n if (length !== paramCount) {\n if (property.kind === \"get\") {\n this.raise(start, Errors.BadGetterArity);\n } else {\n this.raise(start, Errors.BadSetterArity);\n }\n }\n\n if (property.kind === \"set\" && property.value.rest) {\n this.raise(start, Errors.BadSetterRestParameter);\n }\n }\n\n flowObjectTypeSemicolon(): void {\n if (\n !this.eat(tt.semi) &&\n !this.eat(tt.comma) &&\n !this.match(tt.braceR) &&\n !this.match(tt.braceBarR)\n ) {\n this.unexpected();\n }\n }\n\n flowParseQualifiedTypeIdentifier(\n startPos?: number,\n startLoc?: Position,\n id?: N.Identifier,\n ): N.FlowQualifiedTypeIdentifier {\n startPos = startPos || this.state.start;\n startLoc = startLoc || this.state.startLoc;\n let node = id || this.flowParseRestrictedIdentifier(true);\n\n while (this.eat(tt.dot)) {\n const node2 = this.startNodeAt(startPos, startLoc);\n node2.qualification = node;\n node2.id = this.flowParseRestrictedIdentifier(true);\n node = this.finishNode(node2, \"QualifiedTypeIdentifier\");\n }\n\n return node;\n }\n\n flowParseGenericType(\n startPos: number,\n startLoc: Position,\n id: N.Identifier,\n ): N.FlowGenericTypeAnnotation {\n const node = this.startNodeAt(startPos, startLoc);\n\n node.typeParameters = null;\n node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);\n\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterInstantiation();\n }\n\n return this.finishNode(node, \"GenericTypeAnnotation\");\n }\n\n flowParseTypeofType(): N.FlowTypeofTypeAnnotation {\n const node = this.startNode();\n this.expect(tt._typeof);\n node.argument = this.flowParsePrimaryType();\n return this.finishNode(node, \"TypeofTypeAnnotation\");\n }\n\n flowParseTupleType(): N.FlowTupleTypeAnnotation {\n const node = this.startNode();\n node.types = [];\n this.expect(tt.bracketL);\n // We allow trailing commas\n while (this.state.pos < this.length && !this.match(tt.bracketR)) {\n node.types.push(this.flowParseType());\n if (this.match(tt.bracketR)) break;\n this.expect(tt.comma);\n }\n this.expect(tt.bracketR);\n return this.finishNode(node, \"TupleTypeAnnotation\");\n }\n\n flowParseFunctionTypeParam(): N.FlowFunctionTypeParam {\n let name = null;\n let optional = false;\n let typeAnnotation = null;\n const node = this.startNode();\n const lh = this.lookahead();\n if (lh.type === tt.colon || lh.type === tt.question) {\n name = this.parseIdentifier();\n if (this.eat(tt.question)) {\n optional = true;\n }\n typeAnnotation = this.flowParseTypeInitialiser();\n } else {\n typeAnnotation = this.flowParseType();\n }\n node.name = name;\n node.optional = optional;\n node.typeAnnotation = typeAnnotation;\n return this.finishNode(node, \"FunctionTypeParam\");\n }\n\n reinterpretTypeAsFunctionTypeParam(\n type: N.FlowType,\n ): N.FlowFunctionTypeParam {\n const node = this.startNodeAt(type.start, type.loc.start);\n node.name = null;\n node.optional = false;\n node.typeAnnotation = type;\n return this.finishNode(node, \"FunctionTypeParam\");\n }\n\n flowParseFunctionTypeParams(\n params: N.FlowFunctionTypeParam[] = [],\n ): { params: N.FlowFunctionTypeParam[], rest: ?N.FlowFunctionTypeParam } {\n let rest: ?N.FlowFunctionTypeParam = null;\n while (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {\n params.push(this.flowParseFunctionTypeParam());\n if (!this.match(tt.parenR)) {\n this.expect(tt.comma);\n }\n }\n if (this.eat(tt.ellipsis)) {\n rest = this.flowParseFunctionTypeParam();\n }\n return { params, rest };\n }\n\n flowIdentToTypeAnnotation(\n startPos: number,\n startLoc: Position,\n node: N.FlowTypeAnnotation,\n id: N.Identifier,\n ): N.FlowTypeAnnotation {\n switch (id.name) {\n case \"any\":\n return this.finishNode(node, \"AnyTypeAnnotation\");\n\n case \"bool\":\n case \"boolean\":\n return this.finishNode(node, \"BooleanTypeAnnotation\");\n\n case \"mixed\":\n return this.finishNode(node, \"MixedTypeAnnotation\");\n\n case \"empty\":\n return this.finishNode(node, \"EmptyTypeAnnotation\");\n\n case \"number\":\n return this.finishNode(node, \"NumberTypeAnnotation\");\n\n case \"string\":\n return this.finishNode(node, \"StringTypeAnnotation\");\n\n case \"symbol\":\n return this.finishNode(node, \"SymbolTypeAnnotation\");\n\n default:\n this.checkNotUnderscore(id.name);\n return this.flowParseGenericType(startPos, startLoc, id);\n }\n }\n\n // The parsing of types roughly parallels the parsing of expressions, and\n // primary types are kind of like primary expressions...they're the\n // primitives with which other types are constructed.\n flowParsePrimaryType(): N.FlowTypeAnnotation {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const node = this.startNode();\n let tmp;\n let type;\n let isGroupedType = false;\n const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n\n switch (this.state.type) {\n case tt.name:\n if (this.isContextual(\"interface\")) {\n return this.flowParseInterfaceType();\n }\n\n return this.flowIdentToTypeAnnotation(\n startPos,\n startLoc,\n node,\n this.parseIdentifier(),\n );\n\n case tt.braceL:\n return this.flowParseObjectType({\n allowStatic: false,\n allowExact: false,\n allowSpread: true,\n allowProto: false,\n allowInexact: true,\n });\n\n case tt.braceBarL:\n return this.flowParseObjectType({\n allowStatic: false,\n allowExact: true,\n allowSpread: true,\n allowProto: false,\n allowInexact: false,\n });\n\n case tt.bracketL:\n this.state.noAnonFunctionType = false;\n type = this.flowParseTupleType();\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n return type;\n\n case tt.relational:\n if (this.state.value === \"<\") {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n this.expect(tt.parenL);\n tmp = this.flowParseFunctionTypeParams();\n node.params = tmp.params;\n node.rest = tmp.rest;\n this.expect(tt.parenR);\n\n this.expect(tt.arrow);\n\n node.returnType = this.flowParseType();\n\n return this.finishNode(node, \"FunctionTypeAnnotation\");\n }\n break;\n\n case tt.parenL:\n this.next();\n\n // Check to see if this is actually a grouped type\n if (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {\n if (this.match(tt.name)) {\n const token = this.lookahead().type;\n isGroupedType = token !== tt.question && token !== tt.colon;\n } else {\n isGroupedType = true;\n }\n }\n\n if (isGroupedType) {\n this.state.noAnonFunctionType = false;\n type = this.flowParseType();\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n\n // A `,` or a `) =>` means this is an anonymous function type\n if (\n this.state.noAnonFunctionType ||\n !(\n this.match(tt.comma) ||\n (this.match(tt.parenR) && this.lookahead().type === tt.arrow)\n )\n ) {\n this.expect(tt.parenR);\n return type;\n } else {\n // Eat a comma if there is one\n this.eat(tt.comma);\n }\n }\n\n if (type) {\n tmp = this.flowParseFunctionTypeParams([\n this.reinterpretTypeAsFunctionTypeParam(type),\n ]);\n } else {\n tmp = this.flowParseFunctionTypeParams();\n }\n\n node.params = tmp.params;\n node.rest = tmp.rest;\n\n this.expect(tt.parenR);\n\n this.expect(tt.arrow);\n\n node.returnType = this.flowParseType();\n\n node.typeParameters = null;\n\n return this.finishNode(node, \"FunctionTypeAnnotation\");\n\n case tt.string:\n return this.parseLiteral(\n this.state.value,\n \"StringLiteralTypeAnnotation\",\n );\n\n case tt._true:\n case tt._false:\n node.value = this.match(tt._true);\n this.next();\n return this.finishNode(node, \"BooleanLiteralTypeAnnotation\");\n\n case tt.plusMin:\n if (this.state.value === \"-\") {\n this.next();\n if (this.match(tt.num)) {\n return this.parseLiteral(\n -this.state.value,\n \"NumberLiteralTypeAnnotation\",\n node.start,\n node.loc.start,\n );\n }\n\n if (this.match(tt.bigint)) {\n return this.parseLiteral(\n -this.state.value,\n \"BigIntLiteralTypeAnnotation\",\n node.start,\n node.loc.start,\n );\n }\n\n throw this.raise(\n this.state.start,\n FlowErrors.UnexpectedSubtractionOperand,\n );\n }\n\n throw this.unexpected();\n case tt.num:\n return this.parseLiteral(\n this.state.value,\n \"NumberLiteralTypeAnnotation\",\n );\n\n case tt.bigint:\n return this.parseLiteral(\n this.state.value,\n \"BigIntLiteralTypeAnnotation\",\n );\n\n case tt._void:\n this.next();\n return this.finishNode(node, \"VoidTypeAnnotation\");\n\n case tt._null:\n this.next();\n return this.finishNode(node, \"NullLiteralTypeAnnotation\");\n\n case tt._this:\n this.next();\n return this.finishNode(node, \"ThisTypeAnnotation\");\n\n case tt.star:\n this.next();\n return this.finishNode(node, \"ExistsTypeAnnotation\");\n\n default:\n if (this.state.type.keyword === \"typeof\") {\n return this.flowParseTypeofType();\n } else if (this.state.type.keyword) {\n const label = this.state.type.label;\n this.next();\n return super.createIdentifier(node, label);\n }\n }\n\n throw this.unexpected();\n }\n\n flowParsePostfixType(): N.FlowTypeAnnotation {\n const startPos = this.state.start,\n startLoc = this.state.startLoc;\n let type = this.flowParsePrimaryType();\n while (this.match(tt.bracketL) && !this.canInsertSemicolon()) {\n const node = this.startNodeAt(startPos, startLoc);\n node.elementType = type;\n this.expect(tt.bracketL);\n this.expect(tt.bracketR);\n type = this.finishNode(node, \"ArrayTypeAnnotation\");\n }\n return type;\n }\n\n flowParsePrefixType(): N.FlowTypeAnnotation {\n const node = this.startNode();\n if (this.eat(tt.question)) {\n node.typeAnnotation = this.flowParsePrefixType();\n return this.finishNode(node, \"NullableTypeAnnotation\");\n } else {\n return this.flowParsePostfixType();\n }\n }\n\n flowParseAnonFunctionWithoutParens(): N.FlowTypeAnnotation {\n const param = this.flowParsePrefixType();\n if (!this.state.noAnonFunctionType && this.eat(tt.arrow)) {\n // TODO: This should be a type error. Passing in a SourceLocation, and it expects a Position.\n const node = this.startNodeAt(param.start, param.loc.start);\n node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];\n node.rest = null;\n node.returnType = this.flowParseType();\n node.typeParameters = null;\n return this.finishNode(node, \"FunctionTypeAnnotation\");\n }\n return param;\n }\n\n flowParseIntersectionType(): N.FlowTypeAnnotation {\n const node = this.startNode();\n this.eat(tt.bitwiseAND);\n const type = this.flowParseAnonFunctionWithoutParens();\n node.types = [type];\n while (this.eat(tt.bitwiseAND)) {\n node.types.push(this.flowParseAnonFunctionWithoutParens());\n }\n return node.types.length === 1\n ? type\n : this.finishNode(node, \"IntersectionTypeAnnotation\");\n }\n\n flowParseUnionType(): N.FlowTypeAnnotation {\n const node = this.startNode();\n this.eat(tt.bitwiseOR);\n const type = this.flowParseIntersectionType();\n node.types = [type];\n while (this.eat(tt.bitwiseOR)) {\n node.types.push(this.flowParseIntersectionType());\n }\n return node.types.length === 1\n ? type\n : this.finishNode(node, \"UnionTypeAnnotation\");\n }\n\n flowParseType(): N.FlowTypeAnnotation {\n const oldInType = this.state.inType;\n this.state.inType = true;\n const type = this.flowParseUnionType();\n this.state.inType = oldInType;\n // Ensure that a brace after a function generic type annotation is a\n // statement, except in arrow functions (noAnonFunctionType)\n this.state.exprAllowed =\n this.state.exprAllowed || this.state.noAnonFunctionType;\n return type;\n }\n\n flowParseTypeOrImplicitInstantiation(): N.FlowTypeAnnotation {\n if (this.state.type === tt.name && this.state.value === \"_\") {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const node = this.parseIdentifier();\n return this.flowParseGenericType(startPos, startLoc, node);\n } else {\n return this.flowParseType();\n }\n }\n\n flowParseTypeAnnotation(): N.FlowTypeAnnotation {\n const node = this.startNode();\n node.typeAnnotation = this.flowParseTypeInitialiser();\n return this.finishNode(node, \"TypeAnnotation\");\n }\n\n flowParseTypeAnnotatableIdentifier(\n allowPrimitiveOverride?: boolean,\n ): N.Identifier {\n const ident = allowPrimitiveOverride\n ? this.parseIdentifier()\n : this.flowParseRestrictedIdentifier();\n if (this.match(tt.colon)) {\n ident.typeAnnotation = this.flowParseTypeAnnotation();\n this.resetEndLocation(ident);\n }\n return ident;\n }\n\n typeCastToParameter(node: N.Node): N.Node {\n node.expression.typeAnnotation = node.typeAnnotation;\n\n this.resetEndLocation(\n node.expression,\n node.typeAnnotation.end,\n node.typeAnnotation.loc.end,\n );\n\n return node.expression;\n }\n\n flowParseVariance(): ?N.FlowVariance {\n let variance = null;\n if (this.match(tt.plusMin)) {\n variance = this.startNode();\n if (this.state.value === \"+\") {\n variance.kind = \"plus\";\n } else {\n variance.kind = \"minus\";\n }\n this.next();\n this.finishNode(variance, \"Variance\");\n }\n return variance;\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n parseFunctionBody(\n node: N.Function,\n allowExpressionBody: ?boolean,\n isMethod?: boolean = false,\n ): void {\n if (allowExpressionBody) {\n return this.forwardNoArrowParamsConversionAt(node, () =>\n super.parseFunctionBody(node, true, isMethod),\n );\n }\n\n return super.parseFunctionBody(node, false, isMethod);\n }\n\n parseFunctionBodyAndFinish(\n node: N.BodilessFunctionOrMethodBase,\n type: string,\n isMethod?: boolean = false,\n ): void {\n if (this.match(tt.colon)) {\n const typeNode = this.startNode();\n\n [\n // $FlowFixMe (destructuring not supported yet)\n typeNode.typeAnnotation,\n // $FlowFixMe (destructuring not supported yet)\n node.predicate,\n ] = this.flowParseTypeAndPredicateInitialiser();\n\n node.returnType = typeNode.typeAnnotation\n ? this.finishNode(typeNode, \"TypeAnnotation\")\n : null;\n }\n\n super.parseFunctionBodyAndFinish(node, type, isMethod);\n }\n\n // interfaces and enums\n parseStatement(context: ?string, topLevel?: boolean): N.Statement {\n // strict mode handling of `interface` since it's a reserved word\n if (\n this.state.strict &&\n this.match(tt.name) &&\n this.state.value === \"interface\"\n ) {\n const node = this.startNode();\n this.next();\n return this.flowParseInterface(node);\n } else if (this.shouldParseEnums() && this.isContextual(\"enum\")) {\n const node = this.startNode();\n this.next();\n return this.flowParseEnumDeclaration(node);\n } else {\n const stmt = super.parseStatement(context, topLevel);\n // We will parse a flow pragma in any comment before the first statement.\n if (this.flowPragma === undefined && !this.isValidDirective(stmt)) {\n this.flowPragma = null;\n }\n return stmt;\n }\n }\n\n // declares, interfaces and type aliases\n parseExpressionStatement(\n node: N.ExpressionStatement,\n expr: N.Expression,\n ): N.ExpressionStatement {\n if (expr.type === \"Identifier\") {\n if (expr.name === \"declare\") {\n if (\n this.match(tt._class) ||\n this.match(tt.name) ||\n this.match(tt._function) ||\n this.match(tt._var) ||\n this.match(tt._export)\n ) {\n return this.flowParseDeclare(node);\n }\n } else if (this.match(tt.name)) {\n if (expr.name === \"interface\") {\n return this.flowParseInterface(node);\n } else if (expr.name === \"type\") {\n return this.flowParseTypeAlias(node);\n } else if (expr.name === \"opaque\") {\n return this.flowParseOpaqueType(node, false);\n }\n }\n }\n\n return super.parseExpressionStatement(node, expr);\n }\n\n // export type\n shouldParseExportDeclaration(): boolean {\n return (\n this.isContextual(\"type\") ||\n this.isContextual(\"interface\") ||\n this.isContextual(\"opaque\") ||\n (this.shouldParseEnums() && this.isContextual(\"enum\")) ||\n super.shouldParseExportDeclaration()\n );\n }\n\n isExportDefaultSpecifier(): boolean {\n if (\n this.match(tt.name) &&\n (this.state.value === \"type\" ||\n this.state.value === \"interface\" ||\n this.state.value === \"opaque\" ||\n (this.shouldParseEnums() && this.state.value === \"enum\"))\n ) {\n return false;\n }\n\n return super.isExportDefaultSpecifier();\n }\n\n parseExportDefaultExpression(): N.Expression | N.Declaration {\n if (this.shouldParseEnums() && this.isContextual(\"enum\")) {\n const node = this.startNode();\n this.next();\n return this.flowParseEnumDeclaration(node);\n }\n return super.parseExportDefaultExpression();\n }\n\n parseConditional(\n expr: N.Expression,\n noIn: ?boolean,\n startPos: number,\n startLoc: Position,\n refNeedsArrowPos?: ?Pos,\n ): N.Expression {\n if (!this.match(tt.question)) return expr;\n\n // only use the expensive \"tryParse\" method if there is a question mark\n // and if we come from inside parens\n if (refNeedsArrowPos) {\n const result = this.tryParse(() =>\n super.parseConditional(expr, noIn, startPos, startLoc),\n );\n\n if (!result.node) {\n // $FlowIgnore\n refNeedsArrowPos.start = result.error.pos || this.state.start;\n return expr;\n }\n\n if (result.error) this.state = result.failState;\n return result.node;\n }\n\n this.expect(tt.question);\n const state = this.state.clone();\n const originalNoArrowAt = this.state.noArrowAt;\n const node = this.startNodeAt(startPos, startLoc);\n let { consequent, failed } = this.tryParseConditionalConsequent();\n let [valid, invalid] = this.getArrowLikeExpressions(consequent);\n\n if (failed || invalid.length > 0) {\n const noArrowAt = [...originalNoArrowAt];\n\n if (invalid.length > 0) {\n this.state = state;\n this.state.noArrowAt = noArrowAt;\n\n for (let i = 0; i < invalid.length; i++) {\n noArrowAt.push(invalid[i].start);\n }\n\n ({ consequent, failed } = this.tryParseConditionalConsequent());\n [valid, invalid] = this.getArrowLikeExpressions(consequent);\n }\n\n if (failed && valid.length > 1) {\n // if there are two or more possible correct ways of parsing, throw an\n // error.\n // e.g. Source: a ? (b): c => (d): e => f\n // Result 1: a ? b : (c => ((d): e => f))\n // Result 2: a ? ((b): c => d) : (e => f)\n this.raise(state.start, FlowErrors.AmbiguousConditionalArrow);\n }\n\n if (failed && valid.length === 1) {\n this.state = state;\n this.state.noArrowAt = noArrowAt.concat(valid[0].start);\n ({ consequent, failed } = this.tryParseConditionalConsequent());\n }\n }\n\n this.getArrowLikeExpressions(consequent, true);\n\n this.state.noArrowAt = originalNoArrowAt;\n this.expect(tt.colon);\n\n node.test = expr;\n node.consequent = consequent;\n node.alternate = this.forwardNoArrowParamsConversionAt(node, () =>\n this.parseMaybeAssign(noIn, undefined, undefined, undefined),\n );\n\n return this.finishNode(node, \"ConditionalExpression\");\n }\n\n tryParseConditionalConsequent(): {\n consequent: N.Expression,\n failed: boolean,\n } {\n this.state.noArrowParamsConversionAt.push(this.state.start);\n\n const consequent = this.parseMaybeAssign();\n const failed = !this.match(tt.colon);\n\n this.state.noArrowParamsConversionAt.pop();\n\n return { consequent, failed };\n }\n\n // Given an expression, walks through out its arrow functions whose body is\n // an expression and through out conditional expressions. It returns every\n // function which has been parsed with a return type but could have been\n // parenthesized expressions.\n // These functions are separated into two arrays: one containing the ones\n // whose parameters can be converted to assignable lists, one containing the\n // others.\n getArrowLikeExpressions(\n node: N.Expression,\n disallowInvalid?: boolean,\n ): [N.ArrowFunctionExpression[], N.ArrowFunctionExpression[]] {\n const stack = [node];\n const arrows: N.ArrowFunctionExpression[] = [];\n\n while (stack.length !== 0) {\n const node = stack.pop();\n if (node.type === \"ArrowFunctionExpression\") {\n if (node.typeParameters || !node.returnType) {\n // This is an arrow expression without ambiguity, so check its parameters\n this.finishArrowValidation(node);\n } else {\n arrows.push(node);\n }\n stack.push(node.body);\n } else if (node.type === \"ConditionalExpression\") {\n stack.push(node.consequent);\n stack.push(node.alternate);\n }\n }\n\n if (disallowInvalid) {\n arrows.forEach(node => this.finishArrowValidation(node));\n return [arrows, []];\n }\n\n return partition(arrows, node =>\n node.params.every(param => this.isAssignable(param, true)),\n );\n }\n\n finishArrowValidation(node: N.ArrowFunctionExpression) {\n this.toAssignableList(\n // node.params is Expression[] instead of $ReadOnlyArray because it\n // has not been converted yet.\n ((node.params: any): N.Expression[]),\n node.extra?.trailingComma,\n );\n // Enter scope, as checkParams defines bindings\n this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW);\n // Use super's method to force the parameters to be checked\n super.checkParams(node, false, true);\n this.scope.exit();\n }\n\n forwardNoArrowParamsConversionAt(node: N.Node, parse: () => T): T {\n let result: T;\n if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {\n this.state.noArrowParamsConversionAt.push(this.state.start);\n result = parse();\n this.state.noArrowParamsConversionAt.pop();\n } else {\n result = parse();\n }\n\n return result;\n }\n\n parseParenItem(\n node: N.Expression,\n startPos: number,\n startLoc: Position,\n ): N.Expression {\n node = super.parseParenItem(node, startPos, startLoc);\n if (this.eat(tt.question)) {\n node.optional = true;\n // Include questionmark in location of node\n // Don't use this.finishNode() as otherwise we might process comments twice and\n // include already consumed parens\n this.resetEndLocation(node);\n }\n\n if (this.match(tt.colon)) {\n const typeCastNode = this.startNodeAt(startPos, startLoc);\n typeCastNode.expression = node;\n typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();\n\n return this.finishNode(typeCastNode, \"TypeCastExpression\");\n }\n\n return node;\n }\n\n assertModuleNodeAllowed(node: N.Node) {\n if (\n (node.type === \"ImportDeclaration\" &&\n (node.importKind === \"type\" || node.importKind === \"typeof\")) ||\n (node.type === \"ExportNamedDeclaration\" &&\n node.exportKind === \"type\") ||\n (node.type === \"ExportAllDeclaration\" && node.exportKind === \"type\")\n ) {\n // Allow Flowtype imports and exports in all conditions because\n // Flow itself does not care about 'sourceType'.\n return;\n }\n\n super.assertModuleNodeAllowed(node);\n }\n\n parseExport(node: N.Node): N.AnyExport {\n const decl = super.parseExport(node);\n if (\n decl.type === \"ExportNamedDeclaration\" ||\n decl.type === \"ExportAllDeclaration\"\n ) {\n decl.exportKind = decl.exportKind || \"value\";\n }\n return decl;\n }\n\n parseExportDeclaration(node: N.ExportNamedDeclaration): ?N.Declaration {\n if (this.isContextual(\"type\")) {\n node.exportKind = \"type\";\n\n const declarationNode = this.startNode();\n this.next();\n\n if (this.match(tt.braceL)) {\n // export type { foo, bar };\n node.specifiers = this.parseExportSpecifiers();\n this.parseExportFrom(node);\n return null;\n } else {\n // export type Foo = Bar;\n return this.flowParseTypeAlias(declarationNode);\n }\n } else if (this.isContextual(\"opaque\")) {\n node.exportKind = \"type\";\n\n const declarationNode = this.startNode();\n this.next();\n // export opaque type Foo = Bar;\n return this.flowParseOpaqueType(declarationNode, false);\n } else if (this.isContextual(\"interface\")) {\n node.exportKind = \"type\";\n const declarationNode = this.startNode();\n this.next();\n return this.flowParseInterface(declarationNode);\n } else if (this.shouldParseEnums() && this.isContextual(\"enum\")) {\n node.exportKind = \"value\";\n const declarationNode = this.startNode();\n this.next();\n return this.flowParseEnumDeclaration(declarationNode);\n } else {\n return super.parseExportDeclaration(node);\n }\n }\n\n eatExportStar(node: N.Node): boolean {\n if (super.eatExportStar(...arguments)) return true;\n\n if (this.isContextual(\"type\") && this.lookahead().type === tt.star) {\n node.exportKind = \"type\";\n this.next();\n this.next();\n return true;\n }\n\n return false;\n }\n\n maybeParseExportNamespaceSpecifier(node: N.Node): boolean {\n const pos = this.state.start;\n const hasNamespace = super.maybeParseExportNamespaceSpecifier(node);\n if (hasNamespace && node.exportKind === \"type\") {\n this.unexpected(pos);\n }\n return hasNamespace;\n }\n\n parseClassId(node: N.Class, isStatement: boolean, optionalId: ?boolean) {\n super.parseClassId(node, isStatement, optionalId);\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n }\n\n parseClassMember(\n classBody: N.ClassBody,\n member: any,\n state: { hadConstructor: boolean },\n constructorAllowsSuper: boolean,\n ): void {\n const pos = this.state.start;\n if (this.isContextual(\"declare\")) {\n if (this.parseClassMemberFromModifier(classBody, member)) {\n // 'declare' is a class element name\n return;\n }\n\n member.declare = true;\n }\n\n super.parseClassMember(classBody, member, state, constructorAllowsSuper);\n\n if (member.declare) {\n if (\n member.type !== \"ClassProperty\" &&\n member.type !== \"ClassPrivateProperty\"\n ) {\n this.raise(pos, FlowErrors.DeclareClassElement);\n } else if (member.value) {\n this.raise(\n member.value.start,\n FlowErrors.DeclareClassFieldInitializer,\n );\n }\n }\n }\n\n // ensure that inside flow types, we bypass the jsx parser plugin\n getTokenFromCode(code: number): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (code === charCodes.leftCurlyBrace && next === charCodes.verticalBar) {\n return this.finishOp(tt.braceBarL, 2);\n } else if (\n this.state.inType &&\n (code === charCodes.greaterThan || code === charCodes.lessThan)\n ) {\n return this.finishOp(tt.relational, 1);\n } else if (this.state.inType && code === charCodes.questionMark) {\n // allow double nullable types in Flow: ??string\n return this.finishOp(tt.question, 1);\n } else if (isIteratorStart(code, next)) {\n this.state.isIterator = true;\n return super.readWord();\n } else {\n return super.getTokenFromCode(code);\n }\n }\n\n isAssignable(node: N.Node, isBinding?: boolean): boolean {\n switch (node.type) {\n case \"Identifier\":\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n case \"AssignmentPattern\":\n return true;\n\n case \"ObjectExpression\": {\n const last = node.properties.length - 1;\n return node.properties.every((prop, i) => {\n return (\n prop.type !== \"ObjectMethod\" &&\n (i === last || prop.type === \"SpreadElement\") &&\n this.isAssignable(prop)\n );\n });\n }\n\n case \"ObjectProperty\":\n return this.isAssignable(node.value);\n\n case \"SpreadElement\":\n return this.isAssignable(node.argument);\n\n case \"ArrayExpression\":\n return node.elements.every(element => this.isAssignable(element));\n\n case \"AssignmentExpression\":\n return node.operator === \"=\";\n\n case \"ParenthesizedExpression\":\n case \"TypeCastExpression\":\n return this.isAssignable(node.expression);\n\n case \"MemberExpression\":\n case \"OptionalMemberExpression\":\n return !isBinding;\n\n default:\n return false;\n }\n }\n\n toAssignable(node: N.Node): N.Node {\n if (node.type === \"TypeCastExpression\") {\n return super.toAssignable(this.typeCastToParameter(node));\n } else {\n return super.toAssignable(node);\n }\n }\n\n // turn type casts that we found in function parameter head into type annotated params\n toAssignableList(\n exprList: N.Expression[],\n trailingCommaPos?: ?number,\n ): $ReadOnlyArray {\n for (let i = 0; i < exprList.length; i++) {\n const expr = exprList[i];\n if (expr?.type === \"TypeCastExpression\") {\n exprList[i] = this.typeCastToParameter(expr);\n }\n }\n return super.toAssignableList(exprList, trailingCommaPos);\n }\n\n // this is a list of nodes, from something like a call expression, we need to filter the\n // type casts that we've found that are illegal in this context\n toReferencedList(\n exprList: $ReadOnlyArray,\n isParenthesizedExpr?: boolean,\n ): $ReadOnlyArray {\n for (let i = 0; i < exprList.length; i++) {\n const expr = exprList[i];\n if (\n expr &&\n expr.type === \"TypeCastExpression\" &&\n !expr.extra?.parenthesized &&\n (exprList.length > 1 || !isParenthesizedExpr)\n ) {\n this.raise(expr.typeAnnotation.start, FlowErrors.TypeCastInPattern);\n }\n }\n\n return exprList;\n }\n\n checkLVal(\n expr: N.Expression,\n bindingType: BindingTypes = BIND_NONE,\n checkClashes: ?{ [key: string]: boolean },\n contextDescription: string,\n ): void {\n if (expr.type !== \"TypeCastExpression\") {\n return super.checkLVal(\n expr,\n bindingType,\n checkClashes,\n contextDescription,\n );\n }\n }\n\n // parse class property type annotations\n parseClassProperty(node: N.ClassProperty): N.ClassProperty {\n if (this.match(tt.colon)) {\n node.typeAnnotation = this.flowParseTypeAnnotation();\n }\n return super.parseClassProperty(node);\n }\n\n parseClassPrivateProperty(\n node: N.ClassPrivateProperty,\n ): N.ClassPrivateProperty {\n if (this.match(tt.colon)) {\n node.typeAnnotation = this.flowParseTypeAnnotation();\n }\n return super.parseClassPrivateProperty(node);\n }\n\n // determine whether or not we're currently in the position where a class method would appear\n isClassMethod(): boolean {\n return this.isRelational(\"<\") || super.isClassMethod();\n }\n\n // determine whether or not we're currently in the position where a class property would appear\n isClassProperty(): boolean {\n return this.match(tt.colon) || super.isClassProperty();\n }\n\n isNonstaticConstructor(method: N.ClassMethod | N.ClassProperty): boolean {\n return !this.match(tt.colon) && super.isNonstaticConstructor(method);\n }\n\n // parse type parameters for class methods\n pushClassMethod(\n classBody: N.ClassBody,\n method: N.ClassMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowsDirectSuper: boolean,\n ): void {\n if ((method: $FlowFixMe).variance) {\n this.unexpected((method: $FlowFixMe).variance.start);\n }\n delete (method: $FlowFixMe).variance;\n if (this.isRelational(\"<\")) {\n method.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n\n super.pushClassMethod(\n classBody,\n method,\n isGenerator,\n isAsync,\n isConstructor,\n allowsDirectSuper,\n );\n }\n\n pushClassPrivateMethod(\n classBody: N.ClassBody,\n method: N.ClassPrivateMethod,\n isGenerator: boolean,\n isAsync: boolean,\n ): void {\n if ((method: $FlowFixMe).variance) {\n this.unexpected((method: $FlowFixMe).variance.start);\n }\n delete (method: $FlowFixMe).variance;\n if (this.isRelational(\"<\")) {\n method.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n\n super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);\n }\n\n // parse a the super class type parameters and implements\n parseClassSuper(node: N.Class): void {\n super.parseClassSuper(node);\n if (node.superClass && this.isRelational(\"<\")) {\n node.superTypeParameters = this.flowParseTypeParameterInstantiation();\n }\n if (this.isContextual(\"implements\")) {\n this.next();\n const implemented: N.FlowClassImplements[] = (node.implements = []);\n do {\n const node = this.startNode();\n node.id = this.flowParseRestrictedIdentifier(/*liberal*/ true);\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterInstantiation();\n } else {\n node.typeParameters = null;\n }\n implemented.push(this.finishNode(node, \"ClassImplements\"));\n } while (this.eat(tt.comma));\n }\n }\n\n parsePropertyName(\n node: N.ObjectOrClassMember | N.ClassMember | N.TsNamedTypeElementBase,\n isPrivateNameAllowed: boolean,\n ): N.Identifier {\n const variance = this.flowParseVariance();\n const key = super.parsePropertyName(node, isPrivateNameAllowed);\n // $FlowIgnore (\"variance\" not defined on TsNamedTypeElementBase)\n node.variance = variance;\n return key;\n }\n\n // parse type parameters for object method shorthand\n parseObjPropValue(\n prop: N.ObjectMember,\n startPos: ?number,\n startLoc: ?Position,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n refExpressionErrors: ?ExpressionErrors,\n ): void {\n if ((prop: $FlowFixMe).variance) {\n this.unexpected((prop: $FlowFixMe).variance.start);\n }\n delete (prop: $FlowFixMe).variance;\n\n let typeParameters;\n\n // method shorthand\n if (this.isRelational(\"<\") && !isAccessor) {\n typeParameters = this.flowParseTypeParameterDeclaration();\n if (!this.match(tt.parenL)) this.unexpected();\n }\n\n super.parseObjPropValue(\n prop,\n startPos,\n startLoc,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n refExpressionErrors,\n );\n\n // add typeParameters if we found them\n if (typeParameters) {\n (prop.value || prop).typeParameters = typeParameters;\n }\n }\n\n parseAssignableListItemTypes(param: N.Pattern): N.Pattern {\n if (this.eat(tt.question)) {\n if (param.type !== \"Identifier\") {\n this.raise(param.start, FlowErrors.OptionalBindingPattern);\n }\n\n ((param: any): N.Identifier).optional = true;\n }\n if (this.match(tt.colon)) {\n param.typeAnnotation = this.flowParseTypeAnnotation();\n }\n this.resetEndLocation(param);\n return param;\n }\n\n parseMaybeDefault(\n startPos?: ?number,\n startLoc?: ?Position,\n left?: ?N.Pattern,\n ): N.Pattern {\n const node = super.parseMaybeDefault(startPos, startLoc, left);\n\n if (\n node.type === \"AssignmentPattern\" &&\n node.typeAnnotation &&\n node.right.start < node.typeAnnotation.start\n ) {\n this.raise(node.typeAnnotation.start, FlowErrors.TypeBeforeInitializer);\n }\n\n return node;\n }\n\n shouldParseDefaultImport(node: N.ImportDeclaration): boolean {\n if (!hasTypeImportKind(node)) {\n return super.shouldParseDefaultImport(node);\n }\n\n return isMaybeDefaultImport(this.state);\n }\n\n parseImportSpecifierLocal(\n node: N.ImportDeclaration,\n specifier: N.Node,\n type: string,\n contextDescription: string,\n ): void {\n specifier.local = hasTypeImportKind(node)\n ? this.flowParseRestrictedIdentifier(\n /* liberal */ true,\n /* declaration */ true,\n )\n : this.parseIdentifier();\n\n this.checkLVal(\n specifier.local,\n BIND_LEXICAL,\n undefined,\n contextDescription,\n );\n node.specifiers.push(this.finishNode(specifier, type));\n }\n\n // parse typeof and type imports\n maybeParseDefaultImportSpecifier(node: N.ImportDeclaration): boolean {\n node.importKind = \"value\";\n\n let kind = null;\n if (this.match(tt._typeof)) {\n kind = \"typeof\";\n } else if (this.isContextual(\"type\")) {\n kind = \"type\";\n }\n if (kind) {\n const lh = this.lookahead();\n\n // import type * is not allowed\n if (kind === \"type\" && lh.type === tt.star) {\n this.unexpected(lh.start);\n }\n\n if (\n isMaybeDefaultImport(lh) ||\n lh.type === tt.braceL ||\n lh.type === tt.star\n ) {\n this.next();\n node.importKind = kind;\n }\n }\n\n return super.maybeParseDefaultImportSpecifier(node);\n }\n\n // parse import-type/typeof shorthand\n parseImportSpecifier(node: N.ImportDeclaration): void {\n const specifier = this.startNode();\n const firstIdentLoc = this.state.start;\n const firstIdent = this.parseIdentifier(true);\n\n let specifierTypeKind = null;\n if (firstIdent.name === \"type\") {\n specifierTypeKind = \"type\";\n } else if (firstIdent.name === \"typeof\") {\n specifierTypeKind = \"typeof\";\n }\n\n let isBinding = false;\n if (this.isContextual(\"as\") && !this.isLookaheadContextual(\"as\")) {\n const as_ident = this.parseIdentifier(true);\n if (\n specifierTypeKind !== null &&\n !this.match(tt.name) &&\n !this.state.type.keyword\n ) {\n // `import {type as ,` or `import {type as }`\n specifier.imported = as_ident;\n specifier.importKind = specifierTypeKind;\n specifier.local = as_ident.__clone();\n } else {\n // `import {type as foo`\n specifier.imported = firstIdent;\n specifier.importKind = null;\n specifier.local = this.parseIdentifier();\n }\n } else if (\n specifierTypeKind !== null &&\n (this.match(tt.name) || this.state.type.keyword)\n ) {\n // `import {type foo`\n specifier.imported = this.parseIdentifier(true);\n specifier.importKind = specifierTypeKind;\n if (this.eatContextual(\"as\")) {\n specifier.local = this.parseIdentifier();\n } else {\n isBinding = true;\n specifier.local = specifier.imported.__clone();\n }\n } else {\n isBinding = true;\n specifier.imported = firstIdent;\n specifier.importKind = null;\n specifier.local = specifier.imported.__clone();\n }\n\n const nodeIsTypeImport = hasTypeImportKind(node);\n const specifierIsTypeImport = hasTypeImportKind(specifier);\n\n if (nodeIsTypeImport && specifierIsTypeImport) {\n this.raise(\n firstIdentLoc,\n FlowErrors.ImportTypeShorthandOnlyInPureImport,\n );\n }\n\n if (nodeIsTypeImport || specifierIsTypeImport) {\n this.checkReservedType(\n specifier.local.name,\n specifier.local.start,\n /* declaration */ true,\n );\n }\n\n if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) {\n this.checkReservedWord(\n specifier.local.name,\n specifier.start,\n true,\n true,\n );\n }\n\n this.checkLVal(\n specifier.local,\n BIND_LEXICAL,\n undefined,\n \"import specifier\",\n );\n node.specifiers.push(this.finishNode(specifier, \"ImportSpecifier\"));\n }\n\n // parse function type parameters - function foo() {}\n parseFunctionParams(node: N.Function, allowModifiers?: boolean): void {\n // $FlowFixMe\n const kind = node.kind;\n if (kind !== \"get\" && kind !== \"set\" && this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n super.parseFunctionParams(node, allowModifiers);\n }\n\n // parse flow type annotations on variable declarator heads - let foo: string = bar\n parseVarId(\n decl: N.VariableDeclarator,\n kind: \"var\" | \"let\" | \"const\",\n ): void {\n super.parseVarId(decl, kind);\n if (this.match(tt.colon)) {\n decl.id.typeAnnotation = this.flowParseTypeAnnotation();\n this.resetEndLocation(decl.id); // set end position to end of type\n }\n }\n\n // parse the return type of an async arrow function - let foo = (async (): number => {});\n parseAsyncArrowFromCallExpression(\n node: N.ArrowFunctionExpression,\n call: N.CallExpression,\n ): N.ArrowFunctionExpression {\n if (this.match(tt.colon)) {\n const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n this.state.noAnonFunctionType = true;\n node.returnType = this.flowParseTypeAnnotation();\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n }\n\n return super.parseAsyncArrowFromCallExpression(node, call);\n }\n\n // todo description\n shouldParseAsyncArrow(): boolean {\n return this.match(tt.colon) || super.shouldParseAsyncArrow();\n }\n\n // We need to support type parameter declarations for arrow functions. This\n // is tricky. There are three situations we need to handle\n //\n // 1. This is either JSX or an arrow function. We'll try JSX first. If that\n // fails, we'll try an arrow function. If that fails, we'll throw the JSX\n // error.\n // 2. This is an arrow function. We'll parse the type parameter declaration,\n // parse the rest, make sure the rest is an arrow function, and go from\n // there\n // 3. This is neither. Just call the super method\n parseMaybeAssign(\n noIn?: ?boolean,\n refExpressionErrors?: ?ExpressionErrors,\n afterLeftParse?: Function,\n refNeedsArrowPos?: ?Pos,\n ): N.Expression {\n let state = null;\n\n let jsx;\n\n if (\n this.hasPlugin(\"jsx\") &&\n (this.match(tt.jsxTagStart) || this.isRelational(\"<\"))\n ) {\n state = this.state.clone();\n\n jsx = this.tryParse(\n () =>\n super.parseMaybeAssign(\n noIn,\n refExpressionErrors,\n afterLeftParse,\n refNeedsArrowPos,\n ),\n state,\n );\n /*:: invariant(!jsx.aborted) */\n\n if (!jsx.error) return jsx.node;\n\n // Remove `tc.j_expr` and `tc.j_oTag` from context added\n // by parsing `jsxTagStart` to stop the JSX plugin from\n // messing with the tokens\n const { context } = this.state;\n if (context[context.length - 1] === tc.j_oTag) {\n context.length -= 2;\n } else if (context[context.length - 1] === tc.j_expr) {\n context.length -= 1;\n }\n }\n\n if (jsx?.error || this.isRelational(\"<\")) {\n state = state || this.state.clone();\n\n let typeParameters;\n\n const arrow = this.tryParse(() => {\n typeParameters = this.flowParseTypeParameterDeclaration();\n\n const arrowExpression = this.forwardNoArrowParamsConversionAt(\n typeParameters,\n () =>\n super.parseMaybeAssign(\n noIn,\n refExpressionErrors,\n afterLeftParse,\n refNeedsArrowPos,\n ),\n );\n arrowExpression.typeParameters = typeParameters;\n this.resetStartLocationFromNode(arrowExpression, typeParameters);\n\n return arrowExpression;\n }, state);\n\n const arrowExpression: ?N.ArrowFunctionExpression =\n arrow.node?.type === \"ArrowFunctionExpression\" ? arrow.node : null;\n\n if (!arrow.error && arrowExpression) return arrowExpression;\n\n // If we are here, both JSX and Flow parsing attempts failed.\n // Give the precedence to the JSX error, except if JSX had an\n // unrecoverable error while Flow didn't.\n // If the error is recoverable, we can only re-report it if there is\n // a node we can return.\n\n if (jsx?.node) {\n /*:: invariant(jsx.failState) */\n this.state = jsx.failState;\n return jsx.node;\n }\n\n if (arrowExpression) {\n /*:: invariant(arrow.failState) */\n this.state = arrow.failState;\n return arrowExpression;\n }\n\n if (jsx?.thrown) throw jsx.error;\n if (arrow.thrown) throw arrow.error;\n\n /*:: invariant(typeParameters) */\n throw this.raise(\n typeParameters.start,\n FlowErrors.UnexpectedTokenAfterTypeParameter,\n );\n }\n\n return super.parseMaybeAssign(\n noIn,\n refExpressionErrors,\n afterLeftParse,\n refNeedsArrowPos,\n );\n }\n\n // handle return types for arrow functions\n parseArrow(node: N.ArrowFunctionExpression): ?N.ArrowFunctionExpression {\n if (this.match(tt.colon)) {\n const result = this.tryParse(() => {\n const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n this.state.noAnonFunctionType = true;\n\n const typeNode = this.startNode();\n\n [\n // $FlowFixMe (destructuring not supported yet)\n typeNode.typeAnnotation,\n // $FlowFixMe (destructuring not supported yet)\n node.predicate,\n ] = this.flowParseTypeAndPredicateInitialiser();\n\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n\n if (this.canInsertSemicolon()) this.unexpected();\n if (!this.match(tt.arrow)) this.unexpected();\n\n return typeNode;\n });\n\n if (result.thrown) return null;\n /*:: invariant(result.node) */\n\n if (result.error) this.state = result.failState;\n\n // assign after it is clear it is an arrow\n node.returnType = result.node.typeAnnotation\n ? this.finishNode(result.node, \"TypeAnnotation\")\n : null;\n }\n\n return super.parseArrow(node);\n }\n\n shouldParseArrow(): boolean {\n return this.match(tt.colon) || super.shouldParseArrow();\n }\n\n setArrowFunctionParameters(\n node: N.ArrowFunctionExpression,\n params: N.Expression[],\n ): void {\n if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {\n node.params = params;\n } else {\n super.setArrowFunctionParameters(node, params);\n }\n }\n\n checkParams(\n node: N.Function,\n allowDuplicates: boolean,\n isArrowFunction: ?boolean,\n ): void {\n if (\n isArrowFunction &&\n this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1\n ) {\n return;\n }\n\n return super.checkParams(...arguments);\n }\n\n parseParenAndDistinguishExpression(canBeArrow: boolean): N.Expression {\n return super.parseParenAndDistinguishExpression(\n canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1,\n );\n }\n\n parseSubscripts(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls?: ?boolean,\n ): N.Expression {\n if (\n base.type === \"Identifier\" &&\n base.name === \"async\" &&\n this.state.noArrowAt.indexOf(startPos) !== -1\n ) {\n this.next();\n\n const node = this.startNodeAt(startPos, startLoc);\n node.callee = base;\n node.arguments = this.parseCallExpressionArguments(tt.parenR, false);\n base = this.finishNode(node, \"CallExpression\");\n } else if (\n base.type === \"Identifier\" &&\n base.name === \"async\" &&\n this.isRelational(\"<\")\n ) {\n const state = this.state.clone();\n const arrow = this.tryParse(\n abort =>\n this.parseAsyncArrowWithTypeParameters(startPos, startLoc) ||\n abort(),\n state,\n );\n\n if (!arrow.error && !arrow.aborted) return arrow.node;\n\n const result = this.tryParse(\n () => super.parseSubscripts(base, startPos, startLoc, noCalls),\n state,\n );\n\n if (result.node && !result.error) return result.node;\n\n if (arrow.node) {\n this.state = arrow.failState;\n return arrow.node;\n }\n\n if (result.node) {\n this.state = result.failState;\n return result.node;\n }\n\n throw arrow.error || result.error;\n }\n\n return super.parseSubscripts(base, startPos, startLoc, noCalls);\n }\n\n parseSubscript(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls: ?boolean,\n subscriptState: N.ParseSubscriptState,\n ): N.Expression {\n if (this.match(tt.questionDot) && this.isLookaheadToken_lt()) {\n subscriptState.optionalChainMember = true;\n if (noCalls) {\n subscriptState.stop = true;\n return base;\n }\n this.next();\n const node: N.OptionalCallExpression = this.startNodeAt(\n startPos,\n startLoc,\n );\n node.callee = base;\n node.typeArguments = this.flowParseTypeParameterInstantiation();\n this.expect(tt.parenL);\n // $FlowFixMe\n node.arguments = this.parseCallExpressionArguments(tt.parenR, false);\n node.optional = true;\n return this.finishCallExpression(node, /* optional */ true);\n } else if (\n !noCalls &&\n this.shouldParseTypes() &&\n this.isRelational(\"<\")\n ) {\n const node = this.startNodeAt(startPos, startLoc);\n node.callee = base;\n\n const result = this.tryParse(() => {\n node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew();\n this.expect(tt.parenL);\n node.arguments = this.parseCallExpressionArguments(tt.parenR, false);\n if (subscriptState.optionalChainMember) node.optional = false;\n return this.finishCallExpression(\n node,\n subscriptState.optionalChainMember,\n );\n });\n\n if (result.node) {\n if (result.error) this.state = result.failState;\n return result.node;\n }\n }\n\n return super.parseSubscript(\n base,\n startPos,\n startLoc,\n noCalls,\n subscriptState,\n );\n }\n\n parseNewArguments(node: N.NewExpression): void {\n let targs = null;\n if (this.shouldParseTypes() && this.isRelational(\"<\")) {\n targs = this.tryParse(() =>\n this.flowParseTypeParameterInstantiationCallOrNew(),\n ).node;\n }\n node.typeArguments = targs;\n\n super.parseNewArguments(node);\n }\n\n parseAsyncArrowWithTypeParameters(\n startPos: number,\n startLoc: Position,\n ): ?N.ArrowFunctionExpression {\n const node = this.startNodeAt(startPos, startLoc);\n this.parseFunctionParams(node);\n if (!this.parseArrow(node)) return;\n return this.parseArrowExpression(\n node,\n /* params */ undefined,\n /* isAsync */ true,\n );\n }\n\n readToken_mult_modulo(code: number): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (\n code === charCodes.asterisk &&\n next === charCodes.slash &&\n this.state.hasFlowComment\n ) {\n this.state.hasFlowComment = false;\n this.state.pos += 2;\n this.nextToken();\n return;\n }\n\n super.readToken_mult_modulo(code);\n }\n\n readToken_pipe_amp(code: number): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (\n code === charCodes.verticalBar &&\n next === charCodes.rightCurlyBrace\n ) {\n // '|}'\n this.finishOp(tt.braceBarR, 2);\n return;\n }\n\n super.readToken_pipe_amp(code);\n }\n\n parseTopLevel(file: N.File, program: N.Program): N.File {\n const fileNode = super.parseTopLevel(file, program);\n if (this.state.hasFlowComment) {\n this.raise(this.state.pos, FlowErrors.UnterminatedFlowComment);\n }\n return fileNode;\n }\n\n skipBlockComment(): void {\n if (this.hasPlugin(\"flowComments\") && this.skipFlowComment()) {\n if (this.state.hasFlowComment) {\n this.unexpected(null, FlowErrors.NestedFlowComment);\n }\n this.hasFlowCommentCompletion();\n this.state.pos += this.skipFlowComment();\n this.state.hasFlowComment = true;\n return;\n }\n\n if (this.state.hasFlowComment) {\n const end = this.input.indexOf(\"*-/\", (this.state.pos += 2));\n if (end === -1) {\n throw this.raise(this.state.pos - 2, Errors.UnterminatedComment);\n }\n this.state.pos = end + 3;\n return;\n }\n\n super.skipBlockComment();\n }\n\n skipFlowComment(): number | boolean {\n const { pos } = this.state;\n let shiftToFirstNonWhiteSpace = 2;\n while (\n [charCodes.space, charCodes.tab].includes(\n this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace),\n )\n ) {\n shiftToFirstNonWhiteSpace++;\n }\n\n const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);\n const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);\n\n if (ch2 === charCodes.colon && ch3 === charCodes.colon) {\n return shiftToFirstNonWhiteSpace + 2; // check for /*::\n }\n if (\n this.input.slice(\n shiftToFirstNonWhiteSpace + pos,\n shiftToFirstNonWhiteSpace + pos + 12,\n ) === \"flow-include\"\n ) {\n return shiftToFirstNonWhiteSpace + 12; // check for /*flow-include\n }\n if (ch2 === charCodes.colon && ch3 !== charCodes.colon) {\n return shiftToFirstNonWhiteSpace; // check for /*:, advance up to :\n }\n return false;\n }\n\n hasFlowCommentCompletion(): void {\n const end = this.input.indexOf(\"*/\", this.state.pos);\n if (end === -1) {\n throw this.raise(this.state.pos, Errors.UnterminatedComment);\n }\n }\n\n // Flow enum parsing\n\n flowEnumErrorBooleanMemberNotInitialized(\n pos: number,\n { enumName, memberName }: { enumName: string, memberName: string },\n ): void {\n this.raise(\n pos,\n FlowErrors.EnumBooleanMemberNotInitialized,\n memberName,\n enumName,\n );\n }\n\n flowEnumErrorInvalidMemberName(\n pos: number,\n { enumName, memberName }: { enumName: string, memberName: string },\n ): void {\n const suggestion = memberName[0].toUpperCase() + memberName.slice(1);\n this.raise(\n pos,\n FlowErrors.EnumInvalidMemberName,\n memberName,\n suggestion,\n enumName,\n );\n }\n\n flowEnumErrorDuplicateMemberName(\n pos: number,\n { enumName, memberName }: { enumName: string, memberName: string },\n ): void {\n this.raise(pos, FlowErrors.EnumDuplicateMemberName, memberName, enumName);\n }\n\n flowEnumErrorInconsistentMemberValues(\n pos: number,\n { enumName }: { enumName: string },\n ): void {\n this.raise(pos, FlowErrors.EnumInconsistentMemberValues, enumName);\n }\n\n flowEnumErrorInvalidExplicitType(\n pos: number,\n {\n enumName,\n suppliedType,\n }: { enumName: string, suppliedType: null | string },\n ) {\n return this.raise(\n pos,\n suppliedType === null\n ? FlowErrors.EnumInvalidExplicitTypeUnknownSupplied\n : FlowErrors.EnumInvalidExplicitType,\n enumName,\n suppliedType,\n );\n }\n\n flowEnumErrorInvalidMemberInitializer(\n pos: number,\n { enumName, explicitType, memberName }: EnumContext,\n ) {\n let message = null;\n switch (explicitType) {\n case \"boolean\":\n case \"number\":\n case \"string\":\n message = FlowErrors.EnumInvalidMemberInitializerPrimaryType;\n break;\n case \"symbol\":\n message = FlowErrors.EnumInvalidMemberInitializerSymbolType;\n break;\n default:\n // null\n message = FlowErrors.EnumInvalidMemberInitializerUnknownType;\n }\n return this.raise(pos, message, enumName, memberName, explicitType);\n }\n\n flowEnumErrorNumberMemberNotInitialized(\n pos: number,\n { enumName, memberName }: { enumName: string, memberName: string },\n ): void {\n this.raise(\n pos,\n FlowErrors.EnumNumberMemberNotInitialized,\n enumName,\n memberName,\n );\n }\n\n flowEnumErrorStringMemberInconsistentlyInitailized(\n pos: number,\n { enumName }: { enumName: string },\n ): void {\n this.raise(\n pos,\n FlowErrors.EnumStringMemberInconsistentlyInitailized,\n enumName,\n );\n }\n\n flowEnumMemberInit(): EnumMemberInit {\n const startPos = this.state.start;\n const endOfInit = () => this.match(tt.comma) || this.match(tt.braceR);\n switch (this.state.type) {\n case tt.num: {\n const literal = this.parseLiteral(this.state.value, \"NumericLiteral\");\n if (endOfInit()) {\n return { type: \"number\", pos: literal.start, value: literal };\n }\n return { type: \"invalid\", pos: startPos };\n }\n case tt.string: {\n const literal = this.parseLiteral(this.state.value, \"StringLiteral\");\n if (endOfInit()) {\n return { type: \"string\", pos: literal.start, value: literal };\n }\n return { type: \"invalid\", pos: startPos };\n }\n case tt._true:\n case tt._false: {\n const literal = this.parseBooleanLiteral();\n if (endOfInit()) {\n return {\n type: \"boolean\",\n pos: literal.start,\n value: literal,\n };\n }\n return { type: \"invalid\", pos: startPos };\n }\n default:\n return { type: \"invalid\", pos: startPos };\n }\n }\n\n flowEnumMemberRaw(): { id: N.Node, init: EnumMemberInit } {\n const pos = this.state.start;\n const id = this.parseIdentifier(true);\n const init = this.eat(tt.eq)\n ? this.flowEnumMemberInit()\n : { type: \"none\", pos };\n return { id, init };\n }\n\n flowEnumCheckExplicitTypeMismatch(\n pos: number,\n context: EnumContext,\n expectedType: EnumExplicitType,\n ): void {\n const { explicitType } = context;\n if (explicitType === null) {\n return;\n }\n if (explicitType !== expectedType) {\n this.flowEnumErrorInvalidMemberInitializer(pos, context);\n }\n }\n\n flowEnumMembers({\n enumName,\n explicitType,\n }: {\n enumName: string,\n explicitType: EnumExplicitType,\n }): {|\n booleanMembers: Array,\n numberMembers: Array,\n stringMembers: Array,\n defaultedMembers: Array,\n |} {\n const seenNames = new Set();\n const members = {\n booleanMembers: [],\n numberMembers: [],\n stringMembers: [],\n defaultedMembers: [],\n };\n while (!this.match(tt.braceR)) {\n const memberNode = this.startNode();\n const { id, init } = this.flowEnumMemberRaw();\n const memberName = id.name;\n if (memberName === \"\") {\n continue;\n }\n if (/^[a-z]/.test(memberName)) {\n this.flowEnumErrorInvalidMemberName(id.start, {\n enumName,\n memberName,\n });\n }\n if (seenNames.has(memberName)) {\n this.flowEnumErrorDuplicateMemberName(id.start, {\n enumName,\n memberName,\n });\n }\n seenNames.add(memberName);\n const context = { enumName, explicitType, memberName };\n memberNode.id = id;\n switch (init.type) {\n case \"boolean\": {\n this.flowEnumCheckExplicitTypeMismatch(\n init.pos,\n context,\n \"boolean\",\n );\n memberNode.init = init.value;\n members.booleanMembers.push(\n this.finishNode(memberNode, \"EnumBooleanMember\"),\n );\n break;\n }\n case \"number\": {\n this.flowEnumCheckExplicitTypeMismatch(init.pos, context, \"number\");\n memberNode.init = init.value;\n members.numberMembers.push(\n this.finishNode(memberNode, \"EnumNumberMember\"),\n );\n break;\n }\n case \"string\": {\n this.flowEnumCheckExplicitTypeMismatch(init.pos, context, \"string\");\n memberNode.init = init.value;\n members.stringMembers.push(\n this.finishNode(memberNode, \"EnumStringMember\"),\n );\n break;\n }\n case \"invalid\": {\n throw this.flowEnumErrorInvalidMemberInitializer(init.pos, context);\n }\n case \"none\": {\n switch (explicitType) {\n case \"boolean\":\n this.flowEnumErrorBooleanMemberNotInitialized(\n init.pos,\n context,\n );\n break;\n case \"number\":\n this.flowEnumErrorNumberMemberNotInitialized(init.pos, context);\n break;\n default:\n members.defaultedMembers.push(\n this.finishNode(memberNode, \"EnumDefaultedMember\"),\n );\n }\n }\n }\n\n if (!this.match(tt.braceR)) {\n this.expect(tt.comma);\n }\n }\n return members;\n }\n\n flowEnumStringMembers(\n initializedMembers: Array,\n defaultedMembers: Array,\n { enumName }: { enumName: string },\n ): Array {\n if (initializedMembers.length === 0) {\n return defaultedMembers;\n } else if (defaultedMembers.length === 0) {\n return initializedMembers;\n } else if (defaultedMembers.length > initializedMembers.length) {\n for (const member of initializedMembers) {\n this.flowEnumErrorStringMemberInconsistentlyInitailized(\n member.start,\n { enumName },\n );\n }\n return defaultedMembers;\n } else {\n for (const member of defaultedMembers) {\n this.flowEnumErrorStringMemberInconsistentlyInitailized(\n member.start,\n { enumName },\n );\n }\n return initializedMembers;\n }\n }\n\n flowEnumParseExplicitType({\n enumName,\n }: {\n enumName: string,\n }): EnumExplicitType {\n if (this.eatContextual(\"of\")) {\n if (!this.match(tt.name)) {\n throw this.flowEnumErrorInvalidExplicitType(this.state.start, {\n enumName,\n suppliedType: null,\n });\n }\n\n const { value } = this.state;\n this.next();\n\n if (\n value !== \"boolean\" &&\n value !== \"number\" &&\n value !== \"string\" &&\n value !== \"symbol\"\n ) {\n this.flowEnumErrorInvalidExplicitType(this.state.start, {\n enumName,\n suppliedType: value,\n });\n }\n\n return value;\n }\n return null;\n }\n\n flowEnumBody(node: N.Node, { enumName, nameLoc }): N.Node {\n const explicitType = this.flowEnumParseExplicitType({ enumName });\n this.expect(tt.braceL);\n const members = this.flowEnumMembers({ enumName, explicitType });\n\n switch (explicitType) {\n case \"boolean\":\n node.explicitType = true;\n node.members = members.booleanMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumBooleanBody\");\n case \"number\":\n node.explicitType = true;\n node.members = members.numberMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumNumberBody\");\n case \"string\":\n node.explicitType = true;\n node.members = this.flowEnumStringMembers(\n members.stringMembers,\n members.defaultedMembers,\n { enumName },\n );\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumStringBody\");\n case \"symbol\":\n node.members = members.defaultedMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumSymbolBody\");\n default: {\n // `explicitType` is `null`\n const empty = () => {\n node.members = [];\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumStringBody\");\n };\n node.explicitType = false;\n\n const boolsLen = members.booleanMembers.length;\n const numsLen = members.numberMembers.length;\n const strsLen = members.stringMembers.length;\n const defaultedLen = members.defaultedMembers.length;\n\n if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {\n return empty();\n } else if (!boolsLen && !numsLen) {\n node.members = this.flowEnumStringMembers(\n members.stringMembers,\n members.defaultedMembers,\n { enumName },\n );\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumStringBody\");\n } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {\n for (const member of members.defaultedMembers) {\n this.flowEnumErrorBooleanMemberNotInitialized(member.start, {\n enumName,\n memberName: member.id.name,\n });\n }\n node.members = members.booleanMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumBooleanBody\");\n } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {\n for (const member of members.defaultedMembers) {\n this.flowEnumErrorNumberMemberNotInitialized(member.start, {\n enumName,\n memberName: member.id.name,\n });\n }\n node.members = members.numberMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumNumberBody\");\n } else {\n this.flowEnumErrorInconsistentMemberValues(nameLoc, { enumName });\n return empty();\n }\n }\n }\n }\n\n flowParseEnumDeclaration(node: N.Node): N.Node {\n const id = this.parseIdentifier();\n node.id = id;\n node.body = this.flowEnumBody(this.startNode(), {\n enumName: id.name,\n nameLoc: id.start,\n });\n return this.finishNode(node, \"EnumDeclaration\");\n }\n\n updateContext(prevType: TokenType): void {\n if (\n this.match(tt.name) &&\n this.state.value === \"of\" &&\n prevType === tt.name &&\n this.input.slice(this.state.lastTokStart, this.state.lastTokEnd) ===\n \"interface\"\n ) {\n this.state.exprAllowed = false;\n } else {\n super.updateContext(prevType);\n }\n }\n\n // check if the next token is a tt.relation(\"<\")\n isLookaheadToken_lt(): boolean {\n const next = this.nextTokenStart();\n if (this.input.charCodeAt(next) === charCodes.lessThan) {\n const afterNext = this.input.charCodeAt(next + 1);\n return (\n afterNext !== charCodes.lessThan && afterNext !== charCodes.equalsTo\n );\n }\n return false;\n }\n };\n","// @flow\n\nconst entities: { [name: string]: string } = {\n quot: \"\\u0022\",\n amp: \"&\",\n apos: \"\\u0027\",\n lt: \"<\",\n gt: \">\",\n nbsp: \"\\u00A0\",\n iexcl: \"\\u00A1\",\n cent: \"\\u00A2\",\n pound: \"\\u00A3\",\n curren: \"\\u00A4\",\n yen: \"\\u00A5\",\n brvbar: \"\\u00A6\",\n sect: \"\\u00A7\",\n uml: \"\\u00A8\",\n copy: \"\\u00A9\",\n ordf: \"\\u00AA\",\n laquo: \"\\u00AB\",\n not: \"\\u00AC\",\n shy: \"\\u00AD\",\n reg: \"\\u00AE\",\n macr: \"\\u00AF\",\n deg: \"\\u00B0\",\n plusmn: \"\\u00B1\",\n sup2: \"\\u00B2\",\n sup3: \"\\u00B3\",\n acute: \"\\u00B4\",\n micro: \"\\u00B5\",\n para: \"\\u00B6\",\n middot: \"\\u00B7\",\n cedil: \"\\u00B8\",\n sup1: \"\\u00B9\",\n ordm: \"\\u00BA\",\n raquo: \"\\u00BB\",\n frac14: \"\\u00BC\",\n frac12: \"\\u00BD\",\n frac34: \"\\u00BE\",\n iquest: \"\\u00BF\",\n Agrave: \"\\u00C0\",\n Aacute: \"\\u00C1\",\n Acirc: \"\\u00C2\",\n Atilde: \"\\u00C3\",\n Auml: \"\\u00C4\",\n Aring: \"\\u00C5\",\n AElig: \"\\u00C6\",\n Ccedil: \"\\u00C7\",\n Egrave: \"\\u00C8\",\n Eacute: \"\\u00C9\",\n Ecirc: \"\\u00CA\",\n Euml: \"\\u00CB\",\n Igrave: \"\\u00CC\",\n Iacute: \"\\u00CD\",\n Icirc: \"\\u00CE\",\n Iuml: \"\\u00CF\",\n ETH: \"\\u00D0\",\n Ntilde: \"\\u00D1\",\n Ograve: \"\\u00D2\",\n Oacute: \"\\u00D3\",\n Ocirc: \"\\u00D4\",\n Otilde: \"\\u00D5\",\n Ouml: \"\\u00D6\",\n times: \"\\u00D7\",\n Oslash: \"\\u00D8\",\n Ugrave: \"\\u00D9\",\n Uacute: \"\\u00DA\",\n Ucirc: \"\\u00DB\",\n Uuml: \"\\u00DC\",\n Yacute: \"\\u00DD\",\n THORN: \"\\u00DE\",\n szlig: \"\\u00DF\",\n agrave: \"\\u00E0\",\n aacute: \"\\u00E1\",\n acirc: \"\\u00E2\",\n atilde: \"\\u00E3\",\n auml: \"\\u00E4\",\n aring: \"\\u00E5\",\n aelig: \"\\u00E6\",\n ccedil: \"\\u00E7\",\n egrave: \"\\u00E8\",\n eacute: \"\\u00E9\",\n ecirc: \"\\u00EA\",\n euml: \"\\u00EB\",\n igrave: \"\\u00EC\",\n iacute: \"\\u00ED\",\n icirc: \"\\u00EE\",\n iuml: \"\\u00EF\",\n eth: \"\\u00F0\",\n ntilde: \"\\u00F1\",\n ograve: \"\\u00F2\",\n oacute: \"\\u00F3\",\n ocirc: \"\\u00F4\",\n otilde: \"\\u00F5\",\n ouml: \"\\u00F6\",\n divide: \"\\u00F7\",\n oslash: \"\\u00F8\",\n ugrave: \"\\u00F9\",\n uacute: \"\\u00FA\",\n ucirc: \"\\u00FB\",\n uuml: \"\\u00FC\",\n yacute: \"\\u00FD\",\n thorn: \"\\u00FE\",\n yuml: \"\\u00FF\",\n OElig: \"\\u0152\",\n oelig: \"\\u0153\",\n Scaron: \"\\u0160\",\n scaron: \"\\u0161\",\n Yuml: \"\\u0178\",\n fnof: \"\\u0192\",\n circ: \"\\u02C6\",\n tilde: \"\\u02DC\",\n Alpha: \"\\u0391\",\n Beta: \"\\u0392\",\n Gamma: \"\\u0393\",\n Delta: \"\\u0394\",\n Epsilon: \"\\u0395\",\n Zeta: \"\\u0396\",\n Eta: \"\\u0397\",\n Theta: \"\\u0398\",\n Iota: \"\\u0399\",\n Kappa: \"\\u039A\",\n Lambda: \"\\u039B\",\n Mu: \"\\u039C\",\n Nu: \"\\u039D\",\n Xi: \"\\u039E\",\n Omicron: \"\\u039F\",\n Pi: \"\\u03A0\",\n Rho: \"\\u03A1\",\n Sigma: \"\\u03A3\",\n Tau: \"\\u03A4\",\n Upsilon: \"\\u03A5\",\n Phi: \"\\u03A6\",\n Chi: \"\\u03A7\",\n Psi: \"\\u03A8\",\n Omega: \"\\u03A9\",\n alpha: \"\\u03B1\",\n beta: \"\\u03B2\",\n gamma: \"\\u03B3\",\n delta: \"\\u03B4\",\n epsilon: \"\\u03B5\",\n zeta: \"\\u03B6\",\n eta: \"\\u03B7\",\n theta: \"\\u03B8\",\n iota: \"\\u03B9\",\n kappa: \"\\u03BA\",\n lambda: \"\\u03BB\",\n mu: \"\\u03BC\",\n nu: \"\\u03BD\",\n xi: \"\\u03BE\",\n omicron: \"\\u03BF\",\n pi: \"\\u03C0\",\n rho: \"\\u03C1\",\n sigmaf: \"\\u03C2\",\n sigma: \"\\u03C3\",\n tau: \"\\u03C4\",\n upsilon: \"\\u03C5\",\n phi: \"\\u03C6\",\n chi: \"\\u03C7\",\n psi: \"\\u03C8\",\n omega: \"\\u03C9\",\n thetasym: \"\\u03D1\",\n upsih: \"\\u03D2\",\n piv: \"\\u03D6\",\n ensp: \"\\u2002\",\n emsp: \"\\u2003\",\n thinsp: \"\\u2009\",\n zwnj: \"\\u200C\",\n zwj: \"\\u200D\",\n lrm: \"\\u200E\",\n rlm: \"\\u200F\",\n ndash: \"\\u2013\",\n mdash: \"\\u2014\",\n lsquo: \"\\u2018\",\n rsquo: \"\\u2019\",\n sbquo: \"\\u201A\",\n ldquo: \"\\u201C\",\n rdquo: \"\\u201D\",\n bdquo: \"\\u201E\",\n dagger: \"\\u2020\",\n Dagger: \"\\u2021\",\n bull: \"\\u2022\",\n hellip: \"\\u2026\",\n permil: \"\\u2030\",\n prime: \"\\u2032\",\n Prime: \"\\u2033\",\n lsaquo: \"\\u2039\",\n rsaquo: \"\\u203A\",\n oline: \"\\u203E\",\n frasl: \"\\u2044\",\n euro: \"\\u20AC\",\n image: \"\\u2111\",\n weierp: \"\\u2118\",\n real: \"\\u211C\",\n trade: \"\\u2122\",\n alefsym: \"\\u2135\",\n larr: \"\\u2190\",\n uarr: \"\\u2191\",\n rarr: \"\\u2192\",\n darr: \"\\u2193\",\n harr: \"\\u2194\",\n crarr: \"\\u21B5\",\n lArr: \"\\u21D0\",\n uArr: \"\\u21D1\",\n rArr: \"\\u21D2\",\n dArr: \"\\u21D3\",\n hArr: \"\\u21D4\",\n forall: \"\\u2200\",\n part: \"\\u2202\",\n exist: \"\\u2203\",\n empty: \"\\u2205\",\n nabla: \"\\u2207\",\n isin: \"\\u2208\",\n notin: \"\\u2209\",\n ni: \"\\u220B\",\n prod: \"\\u220F\",\n sum: \"\\u2211\",\n minus: \"\\u2212\",\n lowast: \"\\u2217\",\n radic: \"\\u221A\",\n prop: \"\\u221D\",\n infin: \"\\u221E\",\n ang: \"\\u2220\",\n and: \"\\u2227\",\n or: \"\\u2228\",\n cap: \"\\u2229\",\n cup: \"\\u222A\",\n int: \"\\u222B\",\n there4: \"\\u2234\",\n sim: \"\\u223C\",\n cong: \"\\u2245\",\n asymp: \"\\u2248\",\n ne: \"\\u2260\",\n equiv: \"\\u2261\",\n le: \"\\u2264\",\n ge: \"\\u2265\",\n sub: \"\\u2282\",\n sup: \"\\u2283\",\n nsub: \"\\u2284\",\n sube: \"\\u2286\",\n supe: \"\\u2287\",\n oplus: \"\\u2295\",\n otimes: \"\\u2297\",\n perp: \"\\u22A5\",\n sdot: \"\\u22C5\",\n lceil: \"\\u2308\",\n rceil: \"\\u2309\",\n lfloor: \"\\u230A\",\n rfloor: \"\\u230B\",\n lang: \"\\u2329\",\n rang: \"\\u232A\",\n loz: \"\\u25CA\",\n spades: \"\\u2660\",\n clubs: \"\\u2663\",\n hearts: \"\\u2665\",\n diams: \"\\u2666\",\n};\nexport default entities;\n","// @flow\n\n// Error messages are colocated with the plugin.\n/* eslint-disable @babel/development-internal/dry-error-messages */\n\nimport * as charCodes from \"charcodes\";\n\nimport XHTMLEntities from \"./xhtml\";\nimport type Parser from \"../../parser\";\nimport type { ExpressionErrors } from \"../../parser/util\";\nimport { TokenType, types as tt } from \"../../tokenizer/types\";\nimport { TokContext, types as tc } from \"../../tokenizer/context\";\nimport * as N from \"../../types\";\nimport { isIdentifierChar, isIdentifierStart } from \"../../util/identifier\";\nimport type { Position } from \"../../util/location\";\nimport { isNewLine } from \"../../util/whitespace\";\nimport { Errors } from \"../../parser/error\";\n\nconst HEX_NUMBER = /^[\\da-fA-F]+$/;\nconst DECIMAL_NUMBER = /^\\d+$/;\n\nconst JsxErrors = Object.freeze({\n AttributeIsEmpty:\n \"JSX attributes must only be assigned a non-empty expression\",\n MissingClosingTagFragment: \"Expected corresponding JSX closing tag for <>\",\n MissingClosingTagElement: \"Expected corresponding JSX closing tag for <%0>\",\n UnsupportedJsxValue:\n \"JSX value should be either an expression or a quoted JSX text\",\n UnterminatedJsxContent: \"Unterminated JSX contents\",\n UnwrappedAdjacentJSXElements:\n \"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?\",\n});\n\n// Be aware that this file is always executed and not only when the plugin is enabled.\n// Therefore this contexts and tokens do always exist.\ntc.j_oTag = new TokContext(\"...\", true, true);\n\ntt.jsxName = new TokenType(\"jsxName\");\ntt.jsxText = new TokenType(\"jsxText\", { beforeExpr: true });\ntt.jsxTagStart = new TokenType(\"jsxTagStart\", { startsExpr: true });\ntt.jsxTagEnd = new TokenType(\"jsxTagEnd\");\n\ntt.jsxTagStart.updateContext = function () {\n this.state.context.push(tc.j_expr); // treat as beginning of JSX expression\n this.state.context.push(tc.j_oTag); // start opening tag context\n this.state.exprAllowed = false;\n};\n\ntt.jsxTagEnd.updateContext = function (prevType) {\n const out = this.state.context.pop();\n if ((out === tc.j_oTag && prevType === tt.slash) || out === tc.j_cTag) {\n this.state.context.pop();\n this.state.exprAllowed = this.curContext() === tc.j_expr;\n } else {\n this.state.exprAllowed = true;\n }\n};\n\nfunction isFragment(object: ?N.JSXElement): boolean {\n return object\n ? object.type === \"JSXOpeningFragment\" ||\n object.type === \"JSXClosingFragment\"\n : false;\n}\n\n// Transforms JSX element name to string.\n\nfunction getQualifiedJSXName(\n object: N.JSXIdentifier | N.JSXNamespacedName | N.JSXMemberExpression,\n): string {\n if (object.type === \"JSXIdentifier\") {\n return object.name;\n }\n\n if (object.type === \"JSXNamespacedName\") {\n return object.namespace.name + \":\" + object.name.name;\n }\n\n if (object.type === \"JSXMemberExpression\") {\n return (\n getQualifiedJSXName(object.object) +\n \".\" +\n getQualifiedJSXName(object.property)\n );\n }\n\n // istanbul ignore next\n throw new Error(\"Node had unexpected type: \" + object.type);\n}\n\nexport default (superClass: Class): Class =>\n class extends superClass {\n // Reads inline JSX contents token.\n\n jsxReadToken(): void {\n let out = \"\";\n let chunkStart = this.state.pos;\n for (;;) {\n if (this.state.pos >= this.length) {\n throw this.raise(this.state.start, JsxErrors.UnterminatedJsxContent);\n }\n\n const ch = this.input.charCodeAt(this.state.pos);\n\n switch (ch) {\n case charCodes.lessThan:\n case charCodes.leftCurlyBrace:\n if (this.state.pos === this.state.start) {\n if (ch === charCodes.lessThan && this.state.exprAllowed) {\n ++this.state.pos;\n return this.finishToken(tt.jsxTagStart);\n }\n return super.getTokenFromCode(ch);\n }\n out += this.input.slice(chunkStart, this.state.pos);\n return this.finishToken(tt.jsxText, out);\n\n case charCodes.ampersand:\n out += this.input.slice(chunkStart, this.state.pos);\n out += this.jsxReadEntity();\n chunkStart = this.state.pos;\n break;\n\n default:\n if (isNewLine(ch)) {\n out += this.input.slice(chunkStart, this.state.pos);\n out += this.jsxReadNewLine(true);\n chunkStart = this.state.pos;\n } else {\n ++this.state.pos;\n }\n }\n }\n }\n\n jsxReadNewLine(normalizeCRLF: boolean): string {\n const ch = this.input.charCodeAt(this.state.pos);\n let out;\n ++this.state.pos;\n if (\n ch === charCodes.carriageReturn &&\n this.input.charCodeAt(this.state.pos) === charCodes.lineFeed\n ) {\n ++this.state.pos;\n out = normalizeCRLF ? \"\\n\" : \"\\r\\n\";\n } else {\n out = String.fromCharCode(ch);\n }\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n\n return out;\n }\n\n jsxReadString(quote: number): void {\n let out = \"\";\n let chunkStart = ++this.state.pos;\n for (;;) {\n if (this.state.pos >= this.length) {\n throw this.raise(this.state.start, Errors.UnterminatedString);\n }\n\n const ch = this.input.charCodeAt(this.state.pos);\n if (ch === quote) break;\n if (ch === charCodes.ampersand) {\n out += this.input.slice(chunkStart, this.state.pos);\n out += this.jsxReadEntity();\n chunkStart = this.state.pos;\n } else if (isNewLine(ch)) {\n out += this.input.slice(chunkStart, this.state.pos);\n out += this.jsxReadNewLine(false);\n chunkStart = this.state.pos;\n } else {\n ++this.state.pos;\n }\n }\n out += this.input.slice(chunkStart, this.state.pos++);\n return this.finishToken(tt.string, out);\n }\n\n jsxReadEntity(): string {\n let str = \"\";\n let count = 0;\n let entity;\n let ch = this.input[this.state.pos];\n\n const startPos = ++this.state.pos;\n while (this.state.pos < this.length && count++ < 10) {\n ch = this.input[this.state.pos++];\n if (ch === \";\") {\n if (str[0] === \"#\") {\n if (str[1] === \"x\") {\n str = str.substr(2);\n if (HEX_NUMBER.test(str)) {\n entity = String.fromCodePoint(parseInt(str, 16));\n }\n } else {\n str = str.substr(1);\n if (DECIMAL_NUMBER.test(str)) {\n entity = String.fromCodePoint(parseInt(str, 10));\n }\n }\n } else {\n entity = XHTMLEntities[str];\n }\n break;\n }\n str += ch;\n }\n if (!entity) {\n this.state.pos = startPos;\n return \"&\";\n }\n return entity;\n }\n\n // Read a JSX identifier (valid tag or attribute name).\n //\n // Optimized version since JSX identifiers can\"t contain\n // escape characters and so can be read as single slice.\n // Also assumes that first character was already checked\n // by isIdentifierStart in readToken.\n\n jsxReadWord(): void {\n let ch;\n const start = this.state.pos;\n do {\n ch = this.input.charCodeAt(++this.state.pos);\n } while (isIdentifierChar(ch) || ch === charCodes.dash);\n return this.finishToken(\n tt.jsxName,\n this.input.slice(start, this.state.pos),\n );\n }\n\n // Parse next token as JSX identifier\n\n jsxParseIdentifier(): N.JSXIdentifier {\n const node = this.startNode();\n if (this.match(tt.jsxName)) {\n node.name = this.state.value;\n } else if (this.state.type.keyword) {\n node.name = this.state.type.keyword;\n } else {\n this.unexpected();\n }\n this.next();\n return this.finishNode(node, \"JSXIdentifier\");\n }\n\n // Parse namespaced identifier.\n\n jsxParseNamespacedName(): N.JSXNamespacedName {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const name = this.jsxParseIdentifier();\n if (!this.eat(tt.colon)) return name;\n\n const node = this.startNodeAt(startPos, startLoc);\n node.namespace = name;\n node.name = this.jsxParseIdentifier();\n return this.finishNode(node, \"JSXNamespacedName\");\n }\n\n // Parses element name in any form - namespaced, member\n // or single identifier.\n\n jsxParseElementName():\n | N.JSXIdentifier\n | N.JSXNamespacedName\n | N.JSXMemberExpression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n let node = this.jsxParseNamespacedName();\n if (node.type === \"JSXNamespacedName\") {\n return node;\n }\n while (this.eat(tt.dot)) {\n const newNode = this.startNodeAt(startPos, startLoc);\n newNode.object = node;\n newNode.property = this.jsxParseIdentifier();\n node = this.finishNode(newNode, \"JSXMemberExpression\");\n }\n return node;\n }\n\n // Parses any type of JSX attribute value.\n\n jsxParseAttributeValue(): N.Expression {\n let node;\n switch (this.state.type) {\n case tt.braceL:\n node = this.startNode();\n this.next();\n node = this.jsxParseExpressionContainer(node);\n if (node.expression.type === \"JSXEmptyExpression\") {\n this.raise(node.start, JsxErrors.AttributeIsEmpty);\n }\n return node;\n\n case tt.jsxTagStart:\n case tt.string:\n return this.parseExprAtom();\n\n default:\n throw this.raise(this.state.start, JsxErrors.UnsupportedJsxValue);\n }\n }\n\n // JSXEmptyExpression is unique type since it doesn't actually parse anything,\n // and so it should start at the end of last read token (left brace) and finish\n // at the beginning of the next one (right brace).\n\n jsxParseEmptyExpression(): N.JSXEmptyExpression {\n const node = this.startNodeAt(\n this.state.lastTokEnd,\n this.state.lastTokEndLoc,\n );\n return this.finishNodeAt(\n node,\n \"JSXEmptyExpression\",\n this.state.start,\n this.state.startLoc,\n );\n }\n\n // Parse JSX spread child\n\n jsxParseSpreadChild(node: N.JSXSpreadChild): N.JSXSpreadChild {\n this.next(); // ellipsis\n node.expression = this.parseExpression();\n this.expect(tt.braceR);\n\n return this.finishNode(node, \"JSXSpreadChild\");\n }\n\n // Parses JSX expression enclosed into curly brackets.\n\n jsxParseExpressionContainer(\n node: N.JSXExpressionContainer,\n ): N.JSXExpressionContainer {\n if (this.match(tt.braceR)) {\n node.expression = this.jsxParseEmptyExpression();\n } else {\n node.expression = this.parseExpression();\n }\n this.expect(tt.braceR);\n return this.finishNode(node, \"JSXExpressionContainer\");\n }\n\n // Parses following JSX attribute name-value pair.\n\n jsxParseAttribute(): N.JSXAttribute {\n const node = this.startNode();\n if (this.eat(tt.braceL)) {\n this.expect(tt.ellipsis);\n node.argument = this.parseMaybeAssign();\n this.expect(tt.braceR);\n return this.finishNode(node, \"JSXSpreadAttribute\");\n }\n node.name = this.jsxParseNamespacedName();\n node.value = this.eat(tt.eq) ? this.jsxParseAttributeValue() : null;\n return this.finishNode(node, \"JSXAttribute\");\n }\n\n // Parses JSX opening tag starting after \"<\".\n\n jsxParseOpeningElementAt(\n startPos: number,\n startLoc: Position,\n ): N.JSXOpeningElement {\n const node = this.startNodeAt(startPos, startLoc);\n if (this.match(tt.jsxTagEnd)) {\n this.expect(tt.jsxTagEnd);\n return this.finishNode(node, \"JSXOpeningFragment\");\n }\n node.name = this.jsxParseElementName();\n return this.jsxParseOpeningElementAfterName(node);\n }\n\n jsxParseOpeningElementAfterName(\n node: N.JSXOpeningElement,\n ): N.JSXOpeningElement {\n const attributes: N.JSXAttribute[] = [];\n while (!this.match(tt.slash) && !this.match(tt.jsxTagEnd)) {\n attributes.push(this.jsxParseAttribute());\n }\n node.attributes = attributes;\n node.selfClosing = this.eat(tt.slash);\n this.expect(tt.jsxTagEnd);\n return this.finishNode(node, \"JSXOpeningElement\");\n }\n\n // Parses JSX closing tag starting after \" JSX open tag -> ... anymore\n this.state.context.push(tc.j_cTag); // reconsider as closing tag context\n this.state.exprAllowed = false;\n } else {\n return super.updateContext(prevType);\n }\n }\n };\n","// @flow\nimport {\n SCOPE_ARROW,\n SCOPE_DIRECT_SUPER,\n SCOPE_FUNCTION,\n SCOPE_SIMPLE_CATCH,\n SCOPE_SUPER,\n SCOPE_PROGRAM,\n SCOPE_VAR,\n SCOPE_CLASS,\n BIND_SCOPE_FUNCTION,\n BIND_SCOPE_VAR,\n BIND_SCOPE_LEXICAL,\n BIND_KIND_VALUE,\n type ScopeFlags,\n type BindingTypes,\n} from \"./scopeflags\";\nimport * as N from \"../types\";\nimport { Errors } from \"../parser/error\";\n\n// Start an AST node, attaching a start offset.\nexport class Scope {\n flags: ScopeFlags;\n // A list of var-declared names in the current lexical scope\n var: string[] = [];\n // A list of lexically-declared names in the current lexical scope\n lexical: string[] = [];\n // A list of lexically-declared FunctionDeclaration names in the current lexical scope\n functions: string[] = [];\n\n constructor(flags: ScopeFlags) {\n this.flags = flags;\n }\n}\n\ntype raiseFunction = (number, string, ...any) => void;\n\n// The functions in this module keep track of declared variables in the\n// current scope in order to detect duplicate variable names.\nexport default class ScopeHandler {\n scopeStack: Array = [];\n raise: raiseFunction;\n inModule: boolean;\n undefinedExports: Map = new Map();\n undefinedPrivateNames: Map = new Map();\n\n constructor(raise: raiseFunction, inModule: boolean) {\n this.raise = raise;\n this.inModule = inModule;\n }\n\n get inFunction() {\n return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;\n }\n get allowSuper() {\n return (this.currentThisScope().flags & SCOPE_SUPER) > 0;\n }\n get allowDirectSuper() {\n return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0;\n }\n get inClass() {\n return (this.currentThisScope().flags & SCOPE_CLASS) > 0;\n }\n get inNonArrowFunction() {\n return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0;\n }\n get treatFunctionsAsVar() {\n return this.treatFunctionsAsVarInScope(this.currentScope());\n }\n\n createScope(flags: ScopeFlags): Scope {\n return new Scope(flags);\n }\n // This method will be overwritten by subclasses\n /*:: +createScope: (flags: ScopeFlags) => IScope; */\n\n enter(flags: ScopeFlags) {\n this.scopeStack.push(this.createScope(flags));\n }\n\n exit() {\n this.scopeStack.pop();\n }\n\n // The spec says:\n // > At the top level of a function, or script, function declarations are\n // > treated like var declarations rather than like lexical declarations.\n treatFunctionsAsVarInScope(scope: IScope): boolean {\n return !!(\n scope.flags & SCOPE_FUNCTION ||\n (!this.inModule && scope.flags & SCOPE_PROGRAM)\n );\n }\n\n declareName(name: string, bindingType: BindingTypes, pos: number) {\n let scope = this.currentScope();\n if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {\n this.checkRedeclarationInScope(scope, name, bindingType, pos);\n\n if (bindingType & BIND_SCOPE_FUNCTION) {\n scope.functions.push(name);\n } else {\n scope.lexical.push(name);\n }\n\n if (bindingType & BIND_SCOPE_LEXICAL) {\n this.maybeExportDefined(scope, name);\n }\n } else if (bindingType & BIND_SCOPE_VAR) {\n for (let i = this.scopeStack.length - 1; i >= 0; --i) {\n scope = this.scopeStack[i];\n this.checkRedeclarationInScope(scope, name, bindingType, pos);\n scope.var.push(name);\n this.maybeExportDefined(scope, name);\n\n if (scope.flags & SCOPE_VAR) break;\n }\n }\n if (this.inModule && scope.flags & SCOPE_PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n maybeExportDefined(scope: IScope, name: string) {\n if (this.inModule && scope.flags & SCOPE_PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n checkRedeclarationInScope(\n scope: IScope,\n name: string,\n bindingType: BindingTypes,\n pos: number,\n ) {\n if (this.isRedeclaredInScope(scope, name, bindingType)) {\n this.raise(pos, Errors.VarRedeclaration, name);\n }\n }\n\n isRedeclaredInScope(\n scope: IScope,\n name: string,\n bindingType: BindingTypes,\n ): boolean {\n if (!(bindingType & BIND_KIND_VALUE)) return false;\n\n if (bindingType & BIND_SCOPE_LEXICAL) {\n return (\n scope.lexical.indexOf(name) > -1 ||\n scope.functions.indexOf(name) > -1 ||\n scope.var.indexOf(name) > -1\n );\n }\n\n if (bindingType & BIND_SCOPE_FUNCTION) {\n return (\n scope.lexical.indexOf(name) > -1 ||\n (!this.treatFunctionsAsVarInScope(scope) &&\n scope.var.indexOf(name) > -1)\n );\n }\n\n return (\n (scope.lexical.indexOf(name) > -1 &&\n !(scope.flags & SCOPE_SIMPLE_CATCH && scope.lexical[0] === name)) ||\n (!this.treatFunctionsAsVarInScope(scope) &&\n scope.functions.indexOf(name) > -1)\n );\n }\n\n checkLocalExport(id: N.Identifier) {\n if (\n this.scopeStack[0].lexical.indexOf(id.name) === -1 &&\n this.scopeStack[0].var.indexOf(id.name) === -1 &&\n // In strict mode, scope.functions will always be empty.\n // Modules are strict by default, but the `scriptMode` option\n // can overwrite this behavior.\n this.scopeStack[0].functions.indexOf(id.name) === -1\n ) {\n this.undefinedExports.set(id.name, id.start);\n }\n }\n\n currentScope(): IScope {\n return this.scopeStack[this.scopeStack.length - 1];\n }\n\n // $FlowIgnore\n currentVarScope(): IScope {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const scope = this.scopeStack[i];\n if (scope.flags & SCOPE_VAR) {\n return scope;\n }\n }\n }\n\n // Could be useful for `arguments`, `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\n // $FlowIgnore\n currentThisScope(): IScope {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const scope = this.scopeStack[i];\n if (\n (scope.flags & SCOPE_VAR || scope.flags & SCOPE_CLASS) &&\n !(scope.flags & SCOPE_ARROW)\n ) {\n return scope;\n }\n }\n }\n}\n","// @flow\n\nimport ScopeHandler, { Scope } from \"../../util/scope\";\nimport {\n BIND_KIND_TYPE,\n BIND_FLAGS_TS_ENUM,\n BIND_FLAGS_TS_CONST_ENUM,\n BIND_FLAGS_TS_EXPORT_ONLY,\n BIND_KIND_VALUE,\n BIND_FLAGS_CLASS,\n type ScopeFlags,\n type BindingTypes,\n} from \"../../util/scopeflags\";\nimport * as N from \"../../types\";\n\nclass TypeScriptScope extends Scope {\n types: string[] = [];\n\n // enums (which are also in .types)\n enums: string[] = [];\n\n // const enums (which are also in .enums and .types)\n constEnums: string[] = [];\n\n // classes (which are also in .lexical) and interface (which are also in .types)\n classes: string[] = [];\n\n // namespaces and ambient functions (or classes) are too difficult to track,\n // especially without type analysis.\n // We need to track them anyway, to avoid \"X is not defined\" errors\n // when exporting them.\n exportOnlyBindings: string[] = [];\n}\n\n// See https://github.com/babel/babel/pull/9766#discussion_r268920730 for an\n// explanation of how typescript handles scope.\n\nexport default class TypeScriptScopeHandler extends ScopeHandler {\n createScope(flags: ScopeFlags): TypeScriptScope {\n return new TypeScriptScope(flags);\n }\n\n declareName(name: string, bindingType: BindingTypes, pos: number) {\n const scope = this.currentScope();\n if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {\n this.maybeExportDefined(scope, name);\n scope.exportOnlyBindings.push(name);\n return;\n }\n\n super.declareName(...arguments);\n\n if (bindingType & BIND_KIND_TYPE) {\n if (!(bindingType & BIND_KIND_VALUE)) {\n // \"Value\" bindings have already been registered by the superclass.\n this.checkRedeclarationInScope(scope, name, bindingType, pos);\n this.maybeExportDefined(scope, name);\n }\n scope.types.push(name);\n }\n if (bindingType & BIND_FLAGS_TS_ENUM) scope.enums.push(name);\n if (bindingType & BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.push(name);\n if (bindingType & BIND_FLAGS_CLASS) scope.classes.push(name);\n }\n\n isRedeclaredInScope(\n scope: TypeScriptScope,\n name: string,\n bindingType: BindingTypes,\n ): boolean {\n if (scope.enums.indexOf(name) > -1) {\n if (bindingType & BIND_FLAGS_TS_ENUM) {\n // Enums can be merged with other enums if they are both\n // const or both non-const.\n const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);\n const wasConst = scope.constEnums.indexOf(name) > -1;\n return isConst !== wasConst;\n }\n return true;\n }\n if (bindingType & BIND_FLAGS_CLASS && scope.classes.indexOf(name) > -1) {\n if (scope.lexical.indexOf(name) > -1) {\n // Classes can be merged with interfaces\n return !!(bindingType & BIND_KIND_VALUE);\n } else {\n // Interface can be merged with other classes or interfaces\n return false;\n }\n }\n if (bindingType & BIND_KIND_TYPE && scope.types.indexOf(name) > -1) {\n return true;\n }\n\n return super.isRedeclaredInScope(...arguments);\n }\n\n checkLocalExport(id: N.Identifier) {\n if (\n this.scopeStack[0].types.indexOf(id.name) === -1 &&\n this.scopeStack[0].exportOnlyBindings.indexOf(id.name) === -1\n ) {\n super.checkLocalExport(id);\n }\n }\n}\n","// @flow\nexport const PARAM = 0b000, // Initial Parameter flags\n PARAM_YIELD = 0b001, // track [Yield] production parameter\n PARAM_AWAIT = 0b010, // track [Await] production parameter\n PARAM_RETURN = 0b100; // track [Return] production parameter\n\n// ProductionParameterHandler is a stack fashioned production parameter tracker\n// https://tc39.es/ecma262/#sec-grammar-notation\n// The tracked parameters are defined above. Note that the [In] parameter is\n// tracked in `noIn` argument of `parseExpression`.\n//\n// Whenever [+Await]/[+Yield] appears in the right-hand sides of a production,\n// we must enter a new tracking stack. For example when parsing\n//\n// AsyncFunctionDeclaration [Yield, Await]:\n// async [no LineTerminator here] function BindingIdentifier[?Yield, ?Await]\n// ( FormalParameters[~Yield, +Await] ) { AsyncFunctionBody }\n//\n// we must follow such process:\n//\n// 1. parse async keyword\n// 2. parse function keyword\n// 3. parse bindingIdentifier <= inherit current parameters: [?Await]\n// 4. enter new stack with (PARAM_AWAIT)\n// 5. parse formal parameters <= must have [Await] parameter [+Await]\n// 6. parse function body\n// 7. exit current stack\n\nexport type ParamKind = typeof PARAM | typeof PARAM_AWAIT | typeof PARAM_YIELD;\n\nexport default class ProductionParameterHandler {\n stacks: Array = [];\n enter(flags: ParamKind) {\n this.stacks.push(flags);\n }\n\n exit() {\n this.stacks.pop();\n }\n\n currentFlags(): ParamKind {\n return this.stacks[this.stacks.length - 1];\n }\n\n get hasAwait(): boolean {\n return (this.currentFlags() & PARAM_AWAIT) > 0;\n }\n\n get hasYield(): boolean {\n return (this.currentFlags() & PARAM_YIELD) > 0;\n }\n\n get hasReturn(): boolean {\n return (this.currentFlags() & PARAM_RETURN) > 0;\n }\n}\n\nexport function functionFlags(\n isAsync: boolean,\n isGenerator: boolean,\n): ParamKind {\n return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);\n}\n","// @flow\n\n/*:: declare var invariant; */\n\n// Error messages are colocated with the plugin.\n/* eslint-disable @babel/development-internal/dry-error-messages */\n\nimport type { TokenType } from \"../../tokenizer/types\";\nimport type State from \"../../tokenizer/state\";\nimport { types as tt } from \"../../tokenizer/types\";\nimport { types as ct } from \"../../tokenizer/context\";\nimport * as N from \"../../types\";\nimport type { Pos, Position } from \"../../util/location\";\nimport type Parser from \"../../parser\";\nimport {\n type BindingTypes,\n BIND_NONE,\n SCOPE_TS_MODULE,\n SCOPE_OTHER,\n BIND_TS_ENUM,\n BIND_TS_CONST_ENUM,\n BIND_TS_TYPE,\n BIND_TS_INTERFACE,\n BIND_TS_AMBIENT,\n BIND_TS_NAMESPACE,\n BIND_CLASS,\n BIND_LEXICAL,\n} from \"../../util/scopeflags\";\nimport TypeScriptScopeHandler from \"./scope\";\nimport * as charCodes from \"charcodes\";\nimport type { ExpressionErrors } from \"../../parser/util\";\nimport { PARAM } from \"../../util/production-parameter\";\nimport { Errors } from \"../../parser/error\";\n\ntype TsModifier =\n | \"readonly\"\n | \"abstract\"\n | \"declare\"\n | \"static\"\n | \"public\"\n | \"private\"\n | \"protected\";\n\nfunction nonNull(x: ?T): T {\n if (x == null) {\n // $FlowIgnore\n throw new Error(`Unexpected ${x} value.`);\n }\n return x;\n}\n\nfunction assert(x: boolean): void {\n if (!x) {\n throw new Error(\"Assert fail\");\n }\n}\n\ntype ParsingContext =\n | \"EnumMembers\"\n | \"HeritageClauseElement\"\n | \"TupleElementTypes\"\n | \"TypeMembers\"\n | \"TypeParametersOrArguments\";\n\nconst TSErrors = Object.freeze({\n ClassMethodHasDeclare: \"Class methods cannot have the 'declare' modifier\",\n ClassMethodHasReadonly: \"Class methods cannot have the 'readonly' modifier\",\n DeclareClassFieldHasInitializer:\n \"'declare' class fields cannot have an initializer\",\n DuplicateModifier: \"Duplicate modifier: '%0'\",\n EmptyHeritageClauseType: \"'%0' list cannot be empty.\",\n IndexSignatureHasAbstract:\n \"Index signatures cannot have the 'abstract' modifier\",\n IndexSignatureHasAccessibility:\n \"Index signatures cannot have an accessibility modifier ('%0')\",\n IndexSignatureHasStatic: \"Index signatures cannot have the 'static' modifier\",\n InvalidTupleMemberLabel:\n \"Tuple members must be labeled with a simple identifier.\",\n MixedLabeledAndUnlabeledElements:\n \"Tuple members must all have names or all not have names.\",\n OptionalTypeBeforeRequired:\n \"A required element cannot follow an optional element.\",\n PatternIsOptional:\n \"A binding pattern parameter cannot be optional in an implementation signature.\",\n PrivateElementHasAbstract:\n \"Private elements cannot have the 'abstract' modifier.\",\n PrivateElementHasAccessibility:\n \"Private elements cannot have an accessibility modifier ('%0')\",\n TemplateTypeHasSubstitution:\n \"Template literal types cannot have any substitution\",\n TypeAnnotationAfterAssign:\n \"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`\",\n UnexpectedReadonly:\n \"'readonly' type modifier is only permitted on array and tuple literal types.\",\n UnexpectedTypeAnnotation: \"Did not expect a type annotation here.\",\n UnexpectedTypeCastInParameter: \"Unexpected type cast in parameter position.\",\n UnsupportedImportTypeArgument:\n \"Argument in a type import must be a string literal\",\n UnsupportedParameterPropertyKind:\n \"A parameter property may not be declared using a binding pattern.\",\n UnsupportedSignatureParameterKind:\n \"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0\",\n});\n\n// Doesn't handle \"void\" or \"null\" because those are keywords, not identifiers.\nfunction keywordTypeFromName(\n value: string,\n): N.TsKeywordTypeType | typeof undefined {\n switch (value) {\n case \"any\":\n return \"TSAnyKeyword\";\n case \"boolean\":\n return \"TSBooleanKeyword\";\n case \"bigint\":\n return \"TSBigIntKeyword\";\n case \"never\":\n return \"TSNeverKeyword\";\n case \"number\":\n return \"TSNumberKeyword\";\n case \"object\":\n return \"TSObjectKeyword\";\n case \"string\":\n return \"TSStringKeyword\";\n case \"symbol\":\n return \"TSSymbolKeyword\";\n case \"undefined\":\n return \"TSUndefinedKeyword\";\n case \"unknown\":\n return \"TSUnknownKeyword\";\n default:\n return undefined;\n }\n}\n\nexport default (superClass: Class): Class =>\n class extends superClass {\n getScopeHandler(): Class {\n return TypeScriptScopeHandler;\n }\n\n tsIsIdentifier(): boolean {\n // TODO: actually a bit more complex in TypeScript, but shouldn't matter.\n // See https://github.com/Microsoft/TypeScript/issues/15008\n return this.match(tt.name);\n }\n\n tsNextTokenCanFollowModifier() {\n // Note: TypeScript's implementation is much more complicated because\n // more things are considered modifiers there.\n // This implementation only handles modifiers not handled by @babel/parser itself. And \"static\".\n // TODO: Would be nice to avoid lookahead. Want a hasLineBreakUpNext() method...\n this.next();\n return (\n !this.hasPrecedingLineBreak() &&\n !this.match(tt.parenL) &&\n !this.match(tt.parenR) &&\n !this.match(tt.colon) &&\n !this.match(tt.eq) &&\n !this.match(tt.question) &&\n !this.match(tt.bang)\n );\n }\n\n /** Parses a modifier matching one the given modifier names. */\n tsParseModifier(allowedModifiers: T[]): ?T {\n if (!this.match(tt.name)) {\n return undefined;\n }\n\n const modifier = this.state.value;\n if (\n allowedModifiers.indexOf(modifier) !== -1 &&\n this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))\n ) {\n return modifier;\n }\n return undefined;\n }\n\n /** Parses a list of modifiers, in any order.\n * If you need a specific order, you must call this function multiple times:\n * this.tsParseModifiers(node, [\"public\"]);\n * this.tsParseModifiers(node, [\"abstract\", \"readonly\"]);\n */\n tsParseModifiers(\n modified: { [key: TsModifier]: ?true },\n allowedModifiers: T[],\n ): void {\n for (;;) {\n const startPos = this.state.start;\n const modifier: ?T = this.tsParseModifier(allowedModifiers);\n\n if (!modifier) break;\n\n if (Object.hasOwnProperty.call(modified, modifier)) {\n this.raise(startPos, TSErrors.DuplicateModifier, modifier);\n }\n modified[modifier] = true;\n }\n }\n\n tsIsListTerminator(kind: ParsingContext): boolean {\n switch (kind) {\n case \"EnumMembers\":\n case \"TypeMembers\":\n return this.match(tt.braceR);\n case \"HeritageClauseElement\":\n return this.match(tt.braceL);\n case \"TupleElementTypes\":\n return this.match(tt.bracketR);\n case \"TypeParametersOrArguments\":\n return this.isRelational(\">\");\n }\n\n throw new Error(\"Unreachable\");\n }\n\n tsParseList(kind: ParsingContext, parseElement: () => T): T[] {\n const result: T[] = [];\n while (!this.tsIsListTerminator(kind)) {\n // Skipping \"parseListElement\" from the TS source since that's just for error handling.\n result.push(parseElement());\n }\n return result;\n }\n\n tsParseDelimitedList(\n kind: ParsingContext,\n parseElement: () => T,\n ): T[] {\n return nonNull(\n this.tsParseDelimitedListWorker(\n kind,\n parseElement,\n /* expectSuccess */ true,\n ),\n );\n }\n\n /**\n * If !expectSuccess, returns undefined instead of failing to parse.\n * If expectSuccess, parseElement should always return a defined value.\n */\n tsParseDelimitedListWorker(\n kind: ParsingContext,\n parseElement: () => ?T,\n expectSuccess: boolean,\n ): ?(T[]) {\n const result = [];\n\n for (;;) {\n if (this.tsIsListTerminator(kind)) {\n break;\n }\n\n const element = parseElement();\n if (element == null) {\n return undefined;\n }\n result.push(element);\n\n if (this.eat(tt.comma)) {\n continue;\n }\n\n if (this.tsIsListTerminator(kind)) {\n break;\n }\n\n if (expectSuccess) {\n // This will fail with an error about a missing comma\n this.expect(tt.comma);\n }\n return undefined;\n }\n\n return result;\n }\n\n tsParseBracketedList(\n kind: ParsingContext,\n parseElement: () => T,\n bracket: boolean,\n skipFirstToken: boolean,\n ): T[] {\n if (!skipFirstToken) {\n if (bracket) {\n this.expect(tt.bracketL);\n } else {\n this.expectRelational(\"<\");\n }\n }\n\n const result = this.tsParseDelimitedList(kind, parseElement);\n\n if (bracket) {\n this.expect(tt.bracketR);\n } else {\n this.expectRelational(\">\");\n }\n\n return result;\n }\n\n tsParseImportType(): N.TsImportType {\n const node: N.TsImportType = this.startNode();\n this.expect(tt._import);\n this.expect(tt.parenL);\n if (!this.match(tt.string)) {\n this.raise(this.state.start, TSErrors.UnsupportedImportTypeArgument);\n }\n\n // For compatibility to estree we cannot call parseLiteral directly here\n node.argument = this.parseExprAtom();\n this.expect(tt.parenR);\n\n if (this.eat(tt.dot)) {\n node.qualifier = this.tsParseEntityName(/* allowReservedWords */ true);\n }\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.tsParseTypeArguments();\n }\n return this.finishNode(node, \"TSImportType\");\n }\n\n tsParseEntityName(allowReservedWords: boolean): N.TsEntityName {\n let entity: N.TsEntityName = this.parseIdentifier();\n while (this.eat(tt.dot)) {\n const node: N.TsQualifiedName = this.startNodeAtNode(entity);\n node.left = entity;\n node.right = this.parseIdentifier(allowReservedWords);\n entity = this.finishNode(node, \"TSQualifiedName\");\n }\n return entity;\n }\n\n tsParseTypeReference(): N.TsTypeReference {\n const node: N.TsTypeReference = this.startNode();\n node.typeName = this.tsParseEntityName(/* allowReservedWords */ false);\n if (!this.hasPrecedingLineBreak() && this.isRelational(\"<\")) {\n node.typeParameters = this.tsParseTypeArguments();\n }\n return this.finishNode(node, \"TSTypeReference\");\n }\n\n tsParseThisTypePredicate(lhs: N.TsThisType): N.TsTypePredicate {\n this.next();\n const node: N.TsTypePredicate = this.startNodeAtNode(lhs);\n node.parameterName = lhs;\n node.typeAnnotation = this.tsParseTypeAnnotation(/* eatColon */ false);\n return this.finishNode(node, \"TSTypePredicate\");\n }\n\n tsParseThisTypeNode(): N.TsThisType {\n const node: N.TsThisType = this.startNode();\n this.next();\n return this.finishNode(node, \"TSThisType\");\n }\n\n tsParseTypeQuery(): N.TsTypeQuery {\n const node: N.TsTypeQuery = this.startNode();\n this.expect(tt._typeof);\n if (this.match(tt._import)) {\n node.exprName = this.tsParseImportType();\n } else {\n node.exprName = this.tsParseEntityName(/* allowReservedWords */ true);\n }\n return this.finishNode(node, \"TSTypeQuery\");\n }\n\n tsParseTypeParameter(): N.TsTypeParameter {\n const node: N.TsTypeParameter = this.startNode();\n node.name = this.parseIdentifierName(node.start);\n node.constraint = this.tsEatThenParseType(tt._extends);\n node.default = this.tsEatThenParseType(tt.eq);\n return this.finishNode(node, \"TSTypeParameter\");\n }\n\n tsTryParseTypeParameters(): ?N.TsTypeParameterDeclaration {\n if (this.isRelational(\"<\")) {\n return this.tsParseTypeParameters();\n }\n }\n\n tsParseTypeParameters() {\n const node: N.TsTypeParameterDeclaration = this.startNode();\n\n if (this.isRelational(\"<\") || this.match(tt.jsxTagStart)) {\n this.next();\n } else {\n this.unexpected();\n }\n\n node.params = this.tsParseBracketedList(\n \"TypeParametersOrArguments\",\n this.tsParseTypeParameter.bind(this),\n /* bracket */ false,\n /* skipFirstToken */ true,\n );\n return this.finishNode(node, \"TSTypeParameterDeclaration\");\n }\n\n tsTryNextParseConstantContext(): ?N.TsTypeReference {\n if (this.lookahead().type === tt._const) {\n this.next();\n return this.tsParseTypeReference();\n }\n return null;\n }\n\n // Note: In TypeScript implementation we must provide `yieldContext` and `awaitContext`,\n // but here it's always false, because this is only used for types.\n tsFillSignature(\n returnToken: TokenType,\n signature: N.TsSignatureDeclaration,\n ): void {\n // Arrow fns *must* have return token (`=>`). Normal functions can omit it.\n const returnTokenRequired = returnToken === tt.arrow;\n signature.typeParameters = this.tsTryParseTypeParameters();\n this.expect(tt.parenL);\n signature.parameters = this.tsParseBindingListForSignature();\n if (returnTokenRequired) {\n signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(\n returnToken,\n );\n } else if (this.match(returnToken)) {\n signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(\n returnToken,\n );\n }\n }\n\n tsParseBindingListForSignature(): $ReadOnlyArray<\n N.Identifier | N.RestElement | N.ObjectPattern | N.ArrayPattern,\n > {\n return this.parseBindingList(tt.parenR, charCodes.rightParenthesis).map(\n pattern => {\n if (\n pattern.type !== \"Identifier\" &&\n pattern.type !== \"RestElement\" &&\n pattern.type !== \"ObjectPattern\" &&\n pattern.type !== \"ArrayPattern\"\n ) {\n this.raise(\n pattern.start,\n TSErrors.UnsupportedSignatureParameterKind,\n pattern.type,\n );\n }\n return (pattern: any);\n },\n );\n }\n\n tsParseTypeMemberSemicolon(): void {\n if (!this.eat(tt.comma)) {\n this.semicolon();\n }\n }\n\n tsParseSignatureMember(\n kind: \"TSCallSignatureDeclaration\" | \"TSConstructSignatureDeclaration\",\n node: N.TsCallSignatureDeclaration | N.TsConstructSignatureDeclaration,\n ): N.TsCallSignatureDeclaration | N.TsConstructSignatureDeclaration {\n this.tsFillSignature(tt.colon, node);\n this.tsParseTypeMemberSemicolon();\n return this.finishNode(node, kind);\n }\n\n tsIsUnambiguouslyIndexSignature() {\n this.next(); // Skip '{'\n return this.eat(tt.name) && this.match(tt.colon);\n }\n\n tsTryParseIndexSignature(node: N.Node): ?N.TsIndexSignature {\n if (\n !(\n this.match(tt.bracketL) &&\n this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))\n )\n ) {\n return undefined;\n }\n\n this.expect(tt.bracketL);\n const id = this.parseIdentifier();\n id.typeAnnotation = this.tsParseTypeAnnotation();\n this.resetEndLocation(id); // set end position to end of type\n\n this.expect(tt.bracketR);\n node.parameters = [id];\n\n const type = this.tsTryParseTypeAnnotation();\n if (type) node.typeAnnotation = type;\n this.tsParseTypeMemberSemicolon();\n return this.finishNode(node, \"TSIndexSignature\");\n }\n\n tsParsePropertyOrMethodSignature(\n node: N.TsPropertySignature | N.TsMethodSignature,\n readonly: boolean,\n ): N.TsPropertySignature | N.TsMethodSignature {\n if (this.eat(tt.question)) node.optional = true;\n const nodeAny: any = node;\n\n if (!readonly && (this.match(tt.parenL) || this.isRelational(\"<\"))) {\n const method: N.TsMethodSignature = nodeAny;\n this.tsFillSignature(tt.colon, method);\n this.tsParseTypeMemberSemicolon();\n return this.finishNode(method, \"TSMethodSignature\");\n } else {\n const property: N.TsPropertySignature = nodeAny;\n if (readonly) property.readonly = true;\n const type = this.tsTryParseTypeAnnotation();\n if (type) property.typeAnnotation = type;\n this.tsParseTypeMemberSemicolon();\n return this.finishNode(property, \"TSPropertySignature\");\n }\n }\n\n tsParseTypeMember(): N.TsTypeElement {\n const node: any = this.startNode();\n\n if (this.match(tt.parenL) || this.isRelational(\"<\")) {\n return this.tsParseSignatureMember(\"TSCallSignatureDeclaration\", node);\n }\n\n if (this.match(tt._new)) {\n const id: N.Identifier = this.startNode();\n this.next();\n if (this.match(tt.parenL) || this.isRelational(\"<\")) {\n return this.tsParseSignatureMember(\n \"TSConstructSignatureDeclaration\",\n node,\n );\n } else {\n node.key = this.createIdentifier(id, \"new\");\n return this.tsParsePropertyOrMethodSignature(node, false);\n }\n }\n\n const readonly = !!this.tsParseModifier([\"readonly\"]);\n\n const idx = this.tsTryParseIndexSignature(node);\n if (idx) {\n if (readonly) node.readonly = true;\n return idx;\n }\n\n this.parsePropertyName(node, /* isPrivateNameAllowed */ false);\n return this.tsParsePropertyOrMethodSignature(node, readonly);\n }\n\n tsParseTypeLiteral(): N.TsTypeLiteral {\n const node: N.TsTypeLiteral = this.startNode();\n node.members = this.tsParseObjectTypeMembers();\n return this.finishNode(node, \"TSTypeLiteral\");\n }\n\n tsParseObjectTypeMembers(): $ReadOnlyArray {\n this.expect(tt.braceL);\n const members = this.tsParseList(\n \"TypeMembers\",\n this.tsParseTypeMember.bind(this),\n );\n this.expect(tt.braceR);\n return members;\n }\n\n tsIsStartOfMappedType(): boolean {\n this.next();\n if (this.eat(tt.plusMin)) {\n return this.isContextual(\"readonly\");\n }\n if (this.isContextual(\"readonly\")) {\n this.next();\n }\n if (!this.match(tt.bracketL)) {\n return false;\n }\n this.next();\n if (!this.tsIsIdentifier()) {\n return false;\n }\n this.next();\n return this.match(tt._in);\n }\n\n tsParseMappedTypeParameter(): N.TsTypeParameter {\n const node: N.TsTypeParameter = this.startNode();\n node.name = this.parseIdentifierName(node.start);\n node.constraint = this.tsExpectThenParseType(tt._in);\n return this.finishNode(node, \"TSTypeParameter\");\n }\n\n tsParseMappedType(): N.TsMappedType {\n const node: N.TsMappedType = this.startNode();\n\n this.expect(tt.braceL);\n\n if (this.match(tt.plusMin)) {\n node.readonly = this.state.value;\n this.next();\n this.expectContextual(\"readonly\");\n } else if (this.eatContextual(\"readonly\")) {\n node.readonly = true;\n }\n\n this.expect(tt.bracketL);\n node.typeParameter = this.tsParseMappedTypeParameter();\n this.expect(tt.bracketR);\n\n if (this.match(tt.plusMin)) {\n node.optional = this.state.value;\n this.next();\n this.expect(tt.question);\n } else if (this.eat(tt.question)) {\n node.optional = true;\n }\n\n node.typeAnnotation = this.tsTryParseType();\n this.semicolon();\n this.expect(tt.braceR);\n\n return this.finishNode(node, \"TSMappedType\");\n }\n\n tsParseTupleType(): N.TsTupleType {\n const node: N.TsTupleType = this.startNode();\n node.elementTypes = this.tsParseBracketedList(\n \"TupleElementTypes\",\n this.tsParseTupleElementType.bind(this),\n /* bracket */ true,\n /* skipFirstToken */ false,\n );\n\n // Validate the elementTypes to ensure that no mandatory elements\n // follow optional elements\n let seenOptionalElement = false;\n let labeledElements = null;\n node.elementTypes.forEach(elementNode => {\n let { type } = elementNode;\n\n if (\n seenOptionalElement &&\n type !== \"TSRestType\" &&\n type !== \"TSOptionalType\" &&\n !(type === \"TSNamedTupleMember\" && elementNode.optional)\n ) {\n this.raise(elementNode.start, TSErrors.OptionalTypeBeforeRequired);\n }\n\n // Flow doesn't support ||=\n seenOptionalElement =\n seenOptionalElement ||\n (type === \"TSNamedTupleMember\" && elementNode.optional) ||\n type === \"TSOptionalType\";\n\n // When checking labels, check the argument of the spread operator\n if (type === \"TSRestType\") {\n elementNode = elementNode.typeAnnotation;\n type = elementNode.type;\n }\n\n const isLabeled = type === \"TSNamedTupleMember\";\n // Flow doesn't support ??=\n labeledElements = labeledElements ?? isLabeled;\n if (labeledElements !== isLabeled) {\n this.raise(\n elementNode.start,\n TSErrors.MixedLabeledAndUnlabeledElements,\n );\n }\n });\n\n return this.finishNode(node, \"TSTupleType\");\n }\n\n tsParseTupleElementType(): N.TsType | N.TsNamedTupleMember {\n // parses `...TsType[]`\n\n const { start: startPos, startLoc } = this.state;\n\n const rest = this.eat(tt.ellipsis);\n let type = this.tsParseType();\n const optional = this.eat(tt.question);\n const labeled = this.eat(tt.colon);\n\n if (labeled) {\n const labeledNode: N.TsNamedTupleMember = this.startNodeAtNode(type);\n labeledNode.optional = optional;\n\n if (\n type.type === \"TSTypeReference\" &&\n !type.typeParameters &&\n type.typeName.type === \"Identifier\"\n ) {\n labeledNode.label = (type.typeName: N.Identifier);\n } else {\n this.raise(type.start, TSErrors.InvalidTupleMemberLabel);\n // This produces an invalid AST, but at least we don't drop\n // nodes representing the invalid source.\n // $FlowIgnore\n labeledNode.label = type;\n }\n\n labeledNode.elementType = this.tsParseType();\n type = this.finishNode(labeledNode, \"TSNamedTupleMember\");\n } else if (optional) {\n const optionalTypeNode: N.TsOptionalType = this.startNodeAtNode(type);\n optionalTypeNode.typeAnnotation = type;\n type = this.finishNode(optionalTypeNode, \"TSOptionalType\");\n }\n\n if (rest) {\n const restNode: N.TsRestType = this.startNodeAt(startPos, startLoc);\n restNode.typeAnnotation = type;\n type = this.finishNode(restNode, \"TSRestType\");\n }\n\n return type;\n }\n\n tsParseParenthesizedType(): N.TsParenthesizedType {\n const node = this.startNode();\n this.expect(tt.parenL);\n node.typeAnnotation = this.tsParseType();\n this.expect(tt.parenR);\n return this.finishNode(node, \"TSParenthesizedType\");\n }\n\n tsParseFunctionOrConstructorType(\n type: \"TSFunctionType\" | \"TSConstructorType\",\n ): N.TsFunctionOrConstructorType {\n const node: N.TsFunctionOrConstructorType = this.startNode();\n if (type === \"TSConstructorType\") {\n this.expect(tt._new);\n }\n this.tsFillSignature(tt.arrow, node);\n return this.finishNode(node, type);\n }\n\n tsParseLiteralTypeNode(): N.TsLiteralType {\n const node: N.TsLiteralType = this.startNode();\n node.literal = (() => {\n switch (this.state.type) {\n case tt.num:\n case tt.bigint:\n case tt.string:\n case tt._true:\n case tt._false:\n // For compatibility to estree we cannot call parseLiteral directly here\n return this.parseExprAtom();\n default:\n throw this.unexpected();\n }\n })();\n return this.finishNode(node, \"TSLiteralType\");\n }\n\n tsParseTemplateLiteralType(): N.TsType {\n const node: N.TsLiteralType = this.startNode();\n const templateNode = this.parseTemplate(false);\n if (templateNode.expressions.length > 0) {\n this.raise(\n templateNode.expressions[0].start,\n TSErrors.TemplateTypeHasSubstitution,\n );\n }\n node.literal = templateNode;\n return this.finishNode(node, \"TSLiteralType\");\n }\n\n tsParseThisTypeOrThisTypePredicate(): N.TsThisType | N.TsTypePredicate {\n const thisKeyword = this.tsParseThisTypeNode();\n if (this.isContextual(\"is\") && !this.hasPrecedingLineBreak()) {\n return this.tsParseThisTypePredicate(thisKeyword);\n } else {\n return thisKeyword;\n }\n }\n\n tsParseNonArrayType(): N.TsType {\n switch (this.state.type) {\n case tt.name:\n case tt._void:\n case tt._null: {\n const type = this.match(tt._void)\n ? \"TSVoidKeyword\"\n : this.match(tt._null)\n ? \"TSNullKeyword\"\n : keywordTypeFromName(this.state.value);\n if (\n type !== undefined &&\n this.lookaheadCharCode() !== charCodes.dot\n ) {\n const node: N.TsKeywordType = this.startNode();\n this.next();\n return this.finishNode(node, type);\n }\n return this.tsParseTypeReference();\n }\n case tt.string:\n case tt.num:\n case tt.bigint:\n case tt._true:\n case tt._false:\n return this.tsParseLiteralTypeNode();\n case tt.plusMin:\n if (this.state.value === \"-\") {\n const node: N.TsLiteralType = this.startNode();\n const nextToken = this.lookahead();\n if (nextToken.type !== tt.num && nextToken.type !== tt.bigint) {\n throw this.unexpected();\n }\n node.literal = this.parseMaybeUnary();\n return this.finishNode(node, \"TSLiteralType\");\n }\n break;\n case tt._this:\n return this.tsParseThisTypeOrThisTypePredicate();\n case tt._typeof:\n return this.tsParseTypeQuery();\n case tt._import:\n return this.tsParseImportType();\n case tt.braceL:\n return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))\n ? this.tsParseMappedType()\n : this.tsParseTypeLiteral();\n case tt.bracketL:\n return this.tsParseTupleType();\n case tt.parenL:\n return this.tsParseParenthesizedType();\n case tt.backQuote:\n return this.tsParseTemplateLiteralType();\n }\n\n throw this.unexpected();\n }\n\n tsParseArrayTypeOrHigher(): N.TsType {\n let type = this.tsParseNonArrayType();\n while (!this.hasPrecedingLineBreak() && this.eat(tt.bracketL)) {\n if (this.match(tt.bracketR)) {\n const node: N.TsArrayType = this.startNodeAtNode(type);\n node.elementType = type;\n this.expect(tt.bracketR);\n type = this.finishNode(node, \"TSArrayType\");\n } else {\n const node: N.TsIndexedAccessType = this.startNodeAtNode(type);\n node.objectType = type;\n node.indexType = this.tsParseType();\n this.expect(tt.bracketR);\n type = this.finishNode(node, \"TSIndexedAccessType\");\n }\n }\n return type;\n }\n\n tsParseTypeOperator(\n operator: \"keyof\" | \"unique\" | \"readonly\",\n ): N.TsTypeOperator {\n const node: N.TsTypeOperator = this.startNode();\n this.expectContextual(operator);\n node.operator = operator;\n node.typeAnnotation = this.tsParseTypeOperatorOrHigher();\n\n if (operator === \"readonly\") {\n this.tsCheckTypeAnnotationForReadOnly(node);\n }\n\n return this.finishNode(node, \"TSTypeOperator\");\n }\n\n tsCheckTypeAnnotationForReadOnly(node: N.Node) {\n switch (node.typeAnnotation.type) {\n case \"TSTupleType\":\n case \"TSArrayType\":\n return;\n default:\n this.raise(node.start, TSErrors.UnexpectedReadonly);\n }\n }\n\n tsParseInferType(): N.TsInferType {\n const node = this.startNode();\n this.expectContextual(\"infer\");\n const typeParameter = this.startNode();\n typeParameter.name = this.parseIdentifierName(typeParameter.start);\n node.typeParameter = this.finishNode(typeParameter, \"TSTypeParameter\");\n return this.finishNode(node, \"TSInferType\");\n }\n\n tsParseTypeOperatorOrHigher(): N.TsType {\n const operator = [\"keyof\", \"unique\", \"readonly\"].find(kw =>\n this.isContextual(kw),\n );\n return operator\n ? this.tsParseTypeOperator(operator)\n : this.isContextual(\"infer\")\n ? this.tsParseInferType()\n : this.tsParseArrayTypeOrHigher();\n }\n\n tsParseUnionOrIntersectionType(\n kind: \"TSUnionType\" | \"TSIntersectionType\",\n parseConstituentType: () => N.TsType,\n operator: TokenType,\n ): N.TsType {\n this.eat(operator);\n let type = parseConstituentType();\n if (this.match(operator)) {\n const types = [type];\n while (this.eat(operator)) {\n types.push(parseConstituentType());\n }\n const node: N.TsUnionType | N.TsIntersectionType = this.startNodeAtNode(\n type,\n );\n node.types = types;\n type = this.finishNode(node, kind);\n }\n return type;\n }\n\n tsParseIntersectionTypeOrHigher(): N.TsType {\n return this.tsParseUnionOrIntersectionType(\n \"TSIntersectionType\",\n this.tsParseTypeOperatorOrHigher.bind(this),\n tt.bitwiseAND,\n );\n }\n\n tsParseUnionTypeOrHigher() {\n return this.tsParseUnionOrIntersectionType(\n \"TSUnionType\",\n this.tsParseIntersectionTypeOrHigher.bind(this),\n tt.bitwiseOR,\n );\n }\n\n tsIsStartOfFunctionType() {\n if (this.isRelational(\"<\")) {\n return true;\n }\n return (\n this.match(tt.parenL) &&\n this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))\n );\n }\n\n tsSkipParameterStart(): boolean {\n if (this.match(tt.name) || this.match(tt._this)) {\n this.next();\n return true;\n }\n\n if (this.match(tt.braceL)) {\n let braceStackCounter = 1;\n this.next();\n\n while (braceStackCounter > 0) {\n if (this.match(tt.braceL)) {\n ++braceStackCounter;\n } else if (this.match(tt.braceR)) {\n --braceStackCounter;\n }\n this.next();\n }\n return true;\n }\n\n if (this.match(tt.bracketL)) {\n let braceStackCounter = 1;\n this.next();\n\n while (braceStackCounter > 0) {\n if (this.match(tt.bracketL)) {\n ++braceStackCounter;\n } else if (this.match(tt.bracketR)) {\n --braceStackCounter;\n }\n this.next();\n }\n return true;\n }\n\n return false;\n }\n\n tsIsUnambiguouslyStartOfFunctionType(): boolean {\n this.next();\n if (this.match(tt.parenR) || this.match(tt.ellipsis)) {\n // ( )\n // ( ...\n return true;\n }\n if (this.tsSkipParameterStart()) {\n if (\n this.match(tt.colon) ||\n this.match(tt.comma) ||\n this.match(tt.question) ||\n this.match(tt.eq)\n ) {\n // ( xxx :\n // ( xxx ,\n // ( xxx ?\n // ( xxx =\n return true;\n }\n if (this.match(tt.parenR)) {\n this.next();\n if (this.match(tt.arrow)) {\n // ( xxx ) =>\n return true;\n }\n }\n }\n return false;\n }\n\n tsParseTypeOrTypePredicateAnnotation(\n returnToken: TokenType,\n ): N.TsTypeAnnotation {\n return this.tsInType(() => {\n const t: N.TsTypeAnnotation = this.startNode();\n this.expect(returnToken);\n\n const asserts = this.tsTryParse(\n this.tsParseTypePredicateAsserts.bind(this),\n );\n\n if (asserts && this.match(tt._this)) {\n // When asserts is false, thisKeyword is handled by tsParseNonArrayType\n // : asserts this is type\n let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate();\n // if it turns out to be a `TSThisType`, wrap it with `TSTypePredicate`\n // : asserts this\n if (thisTypePredicate.type === \"TSThisType\") {\n const node: N.TsTypePredicate = this.startNodeAtNode(t);\n node.parameterName = (thisTypePredicate: N.TsThisType);\n node.asserts = true;\n thisTypePredicate = this.finishNode(node, \"TSTypePredicate\");\n } else {\n (thisTypePredicate: N.TsTypePredicate).asserts = true;\n }\n t.typeAnnotation = thisTypePredicate;\n return this.finishNode(t, \"TSTypeAnnotation\");\n }\n\n const typePredicateVariable =\n this.tsIsIdentifier() &&\n this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));\n\n if (!typePredicateVariable) {\n if (!asserts) {\n // : type\n return this.tsParseTypeAnnotation(/* eatColon */ false, t);\n }\n\n const node: N.TsTypePredicate = this.startNodeAtNode(t);\n // : asserts foo\n node.parameterName = this.parseIdentifier();\n node.asserts = asserts;\n t.typeAnnotation = this.finishNode(node, \"TSTypePredicate\");\n return this.finishNode(t, \"TSTypeAnnotation\");\n }\n\n // : asserts foo is type\n const type = this.tsParseTypeAnnotation(/* eatColon */ false);\n const node = this.startNodeAtNode(t);\n node.parameterName = typePredicateVariable;\n node.typeAnnotation = type;\n node.asserts = asserts;\n t.typeAnnotation = this.finishNode(node, \"TSTypePredicate\");\n return this.finishNode(t, \"TSTypeAnnotation\");\n });\n }\n\n tsTryParseTypeOrTypePredicateAnnotation(): ?N.TsTypeAnnotation {\n return this.match(tt.colon)\n ? this.tsParseTypeOrTypePredicateAnnotation(tt.colon)\n : undefined;\n }\n\n tsTryParseTypeAnnotation(): ?N.TsTypeAnnotation {\n return this.match(tt.colon) ? this.tsParseTypeAnnotation() : undefined;\n }\n\n tsTryParseType(): ?N.TsType {\n return this.tsEatThenParseType(tt.colon);\n }\n\n tsParseTypePredicatePrefix(): ?N.Identifier {\n const id = this.parseIdentifier();\n if (this.isContextual(\"is\") && !this.hasPrecedingLineBreak()) {\n this.next();\n return id;\n }\n }\n\n tsParseTypePredicateAsserts(): boolean {\n if (\n !this.match(tt.name) ||\n this.state.value !== \"asserts\" ||\n this.hasPrecedingLineBreak()\n ) {\n return false;\n }\n const containsEsc = this.state.containsEsc;\n this.next();\n if (!this.match(tt.name) && !this.match(tt._this)) {\n return false;\n }\n\n if (containsEsc) {\n this.raise(\n this.state.lastTokStart,\n Errors.InvalidEscapedReservedWord,\n \"asserts\",\n );\n }\n\n return true;\n }\n\n tsParseTypeAnnotation(\n eatColon = true,\n t: N.TsTypeAnnotation = this.startNode(),\n ): N.TsTypeAnnotation {\n this.tsInType(() => {\n if (eatColon) this.expect(tt.colon);\n t.typeAnnotation = this.tsParseType();\n });\n return this.finishNode(t, \"TSTypeAnnotation\");\n }\n\n /** Be sure to be in a type context before calling this, using `tsInType`. */\n tsParseType(): N.TsType {\n // Need to set `state.inType` so that we don't parse JSX in a type context.\n assert(this.state.inType);\n const type = this.tsParseNonConditionalType();\n if (this.hasPrecedingLineBreak() || !this.eat(tt._extends)) {\n return type;\n }\n const node: N.TsConditionalType = this.startNodeAtNode(type);\n node.checkType = type;\n node.extendsType = this.tsParseNonConditionalType();\n this.expect(tt.question);\n node.trueType = this.tsParseType();\n this.expect(tt.colon);\n node.falseType = this.tsParseType();\n return this.finishNode(node, \"TSConditionalType\");\n }\n\n tsParseNonConditionalType(): N.TsType {\n if (this.tsIsStartOfFunctionType()) {\n return this.tsParseFunctionOrConstructorType(\"TSFunctionType\");\n }\n if (this.match(tt._new)) {\n // As in `new () => Date`\n return this.tsParseFunctionOrConstructorType(\"TSConstructorType\");\n }\n return this.tsParseUnionTypeOrHigher();\n }\n\n tsParseTypeAssertion(): N.TsTypeAssertion {\n const node: N.TsTypeAssertion = this.startNode();\n const _const = this.tsTryNextParseConstantContext();\n node.typeAnnotation = _const || this.tsNextThenParseType();\n this.expectRelational(\">\");\n node.expression = this.parseMaybeUnary();\n return this.finishNode(node, \"TSTypeAssertion\");\n }\n\n tsParseHeritageClause(\n descriptor: string,\n ): $ReadOnlyArray {\n const originalStart = this.state.start;\n\n const delimitedList = this.tsParseDelimitedList(\n \"HeritageClauseElement\",\n this.tsParseExpressionWithTypeArguments.bind(this),\n );\n\n if (!delimitedList.length) {\n this.raise(originalStart, TSErrors.EmptyHeritageClauseType, descriptor);\n }\n\n return delimitedList;\n }\n\n tsParseExpressionWithTypeArguments(): N.TsExpressionWithTypeArguments {\n const node: N.TsExpressionWithTypeArguments = this.startNode();\n // Note: TS uses parseLeftHandSideExpressionOrHigher,\n // then has grammar errors later if it's not an EntityName.\n node.expression = this.tsParseEntityName(/* allowReservedWords */ false);\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.tsParseTypeArguments();\n }\n\n return this.finishNode(node, \"TSExpressionWithTypeArguments\");\n }\n\n tsParseInterfaceDeclaration(\n node: N.TsInterfaceDeclaration,\n ): N.TsInterfaceDeclaration {\n node.id = this.parseIdentifier();\n this.checkLVal(\n node.id,\n BIND_TS_INTERFACE,\n undefined,\n \"typescript interface declaration\",\n );\n node.typeParameters = this.tsTryParseTypeParameters();\n if (this.eat(tt._extends)) {\n node.extends = this.tsParseHeritageClause(\"extends\");\n }\n const body: N.TSInterfaceBody = this.startNode();\n body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));\n node.body = this.finishNode(body, \"TSInterfaceBody\");\n return this.finishNode(node, \"TSInterfaceDeclaration\");\n }\n\n tsParseTypeAliasDeclaration(\n node: N.TsTypeAliasDeclaration,\n ): N.TsTypeAliasDeclaration {\n node.id = this.parseIdentifier();\n this.checkLVal(node.id, BIND_TS_TYPE, undefined, \"typescript type alias\");\n\n node.typeParameters = this.tsTryParseTypeParameters();\n node.typeAnnotation = this.tsExpectThenParseType(tt.eq);\n this.semicolon();\n return this.finishNode(node, \"TSTypeAliasDeclaration\");\n }\n\n tsInNoContext(cb: () => T): T {\n const oldContext = this.state.context;\n this.state.context = [oldContext[0]];\n try {\n return cb();\n } finally {\n this.state.context = oldContext;\n }\n }\n\n /**\n * Runs `cb` in a type context.\n * This should be called one token *before* the first type token,\n * so that the call to `next()` is run in type context.\n */\n tsInType(cb: () => T): T {\n const oldInType = this.state.inType;\n this.state.inType = true;\n try {\n return cb();\n } finally {\n this.state.inType = oldInType;\n }\n }\n\n tsEatThenParseType(token: TokenType): N.TsType | typeof undefined {\n return !this.match(token) ? undefined : this.tsNextThenParseType();\n }\n\n tsExpectThenParseType(token: TokenType): N.TsType {\n return this.tsDoThenParseType(() => this.expect(token));\n }\n\n tsNextThenParseType(): N.TsType {\n return this.tsDoThenParseType(() => this.next());\n }\n\n tsDoThenParseType(cb: () => void): N.TsType {\n return this.tsInType(() => {\n cb();\n return this.tsParseType();\n });\n }\n\n tsParseEnumMember(): N.TsEnumMember {\n const node: N.TsEnumMember = this.startNode();\n // Computed property names are grammar errors in an enum, so accept just string literal or identifier.\n node.id = this.match(tt.string)\n ? this.parseExprAtom()\n : this.parseIdentifier(/* liberal */ true);\n if (this.eat(tt.eq)) {\n node.initializer = this.parseMaybeAssign();\n }\n return this.finishNode(node, \"TSEnumMember\");\n }\n\n tsParseEnumDeclaration(\n node: N.TsEnumDeclaration,\n isConst: boolean,\n ): N.TsEnumDeclaration {\n if (isConst) node.const = true;\n node.id = this.parseIdentifier();\n this.checkLVal(\n node.id,\n isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM,\n undefined,\n \"typescript enum declaration\",\n );\n\n this.expect(tt.braceL);\n node.members = this.tsParseDelimitedList(\n \"EnumMembers\",\n this.tsParseEnumMember.bind(this),\n );\n this.expect(tt.braceR);\n return this.finishNode(node, \"TSEnumDeclaration\");\n }\n\n tsParseModuleBlock(): N.TsModuleBlock {\n const node: N.TsModuleBlock = this.startNode();\n this.scope.enter(SCOPE_OTHER);\n\n this.expect(tt.braceL);\n // Inside of a module block is considered \"top-level\", meaning it can have imports and exports.\n this.parseBlockOrModuleBlockBody(\n (node.body = []),\n /* directives */ undefined,\n /* topLevel */ true,\n /* end */ tt.braceR,\n );\n this.scope.exit();\n return this.finishNode(node, \"TSModuleBlock\");\n }\n\n tsParseModuleOrNamespaceDeclaration(\n node: N.TsModuleDeclaration,\n nested?: boolean = false,\n ): N.TsModuleDeclaration {\n node.id = this.parseIdentifier();\n\n if (!nested) {\n this.checkLVal(\n node.id,\n BIND_TS_NAMESPACE,\n null,\n \"module or namespace declaration\",\n );\n }\n\n if (this.eat(tt.dot)) {\n const inner = this.startNode();\n this.tsParseModuleOrNamespaceDeclaration(inner, true);\n node.body = inner;\n } else {\n this.scope.enter(SCOPE_TS_MODULE);\n this.prodParam.enter(PARAM);\n node.body = this.tsParseModuleBlock();\n this.prodParam.exit();\n this.scope.exit();\n }\n return this.finishNode(node, \"TSModuleDeclaration\");\n }\n\n tsParseAmbientExternalModuleDeclaration(\n node: N.TsModuleDeclaration,\n ): N.TsModuleDeclaration {\n if (this.isContextual(\"global\")) {\n node.global = true;\n node.id = this.parseIdentifier();\n } else if (this.match(tt.string)) {\n node.id = this.parseExprAtom();\n } else {\n this.unexpected();\n }\n if (this.match(tt.braceL)) {\n this.scope.enter(SCOPE_TS_MODULE);\n this.prodParam.enter(PARAM);\n node.body = this.tsParseModuleBlock();\n this.prodParam.exit();\n this.scope.exit();\n } else {\n this.semicolon();\n }\n\n return this.finishNode(node, \"TSModuleDeclaration\");\n }\n\n tsParseImportEqualsDeclaration(\n node: N.TsImportEqualsDeclaration,\n isExport?: boolean,\n ): N.TsImportEqualsDeclaration {\n node.isExport = isExport || false;\n node.id = this.parseIdentifier();\n this.checkLVal(\n node.id,\n BIND_LEXICAL,\n undefined,\n \"import equals declaration\",\n );\n this.expect(tt.eq);\n node.moduleReference = this.tsParseModuleReference();\n this.semicolon();\n return this.finishNode(node, \"TSImportEqualsDeclaration\");\n }\n\n tsIsExternalModuleReference(): boolean {\n return (\n this.isContextual(\"require\") &&\n this.lookaheadCharCode() === charCodes.leftParenthesis\n );\n }\n\n tsParseModuleReference(): N.TsModuleReference {\n return this.tsIsExternalModuleReference()\n ? this.tsParseExternalModuleReference()\n : this.tsParseEntityName(/* allowReservedWords */ false);\n }\n\n tsParseExternalModuleReference(): N.TsExternalModuleReference {\n const node: N.TsExternalModuleReference = this.startNode();\n this.expectContextual(\"require\");\n this.expect(tt.parenL);\n if (!this.match(tt.string)) {\n throw this.unexpected();\n }\n // For compatibility to estree we cannot call parseLiteral directly here\n node.expression = this.parseExprAtom();\n this.expect(tt.parenR);\n return this.finishNode(node, \"TSExternalModuleReference\");\n }\n\n // Utilities\n\n tsLookAhead(f: () => T): T {\n const state = this.state.clone();\n const res = f();\n this.state = state;\n return res;\n }\n\n tsTryParseAndCatch(f: () => T): ?T {\n const result = this.tryParse(abort => f() || abort());\n\n if (result.aborted || !result.node) return undefined;\n if (result.error) this.state = result.failState;\n return result.node;\n }\n\n tsTryParse(f: () => ?T): ?T {\n const state = this.state.clone();\n const result = f();\n if (result !== undefined && result !== false) {\n return result;\n } else {\n this.state = state;\n return undefined;\n }\n }\n\n tsTryParseDeclare(nany: any): ?N.Declaration {\n if (this.isLineTerminator()) {\n return;\n }\n let starttype = this.state.type;\n let kind;\n\n if (this.isContextual(\"let\")) {\n starttype = tt._var;\n kind = \"let\";\n }\n\n switch (starttype) {\n case tt._function:\n return this.parseFunctionStatement(\n nany,\n /* async */ false,\n /* declarationPosition */ true,\n );\n case tt._class:\n // While this is also set by tsParseExpressionStatement, we need to set it\n // before parsing the class declaration to now how to register it in the scope.\n nany.declare = true;\n return this.parseClass(\n nany,\n /* isStatement */ true,\n /* optionalId */ false,\n );\n case tt._const:\n if (this.match(tt._const) && this.isLookaheadContextual(\"enum\")) {\n // `const enum = 0;` not allowed because \"enum\" is a strict mode reserved word.\n this.expect(tt._const);\n this.expectContextual(\"enum\");\n return this.tsParseEnumDeclaration(nany, /* isConst */ true);\n }\n // falls through\n case tt._var:\n kind = kind || this.state.value;\n return this.parseVarStatement(nany, kind);\n case tt.name: {\n const value = this.state.value;\n if (value === \"global\") {\n return this.tsParseAmbientExternalModuleDeclaration(nany);\n } else {\n return this.tsParseDeclaration(nany, value, /* next */ true);\n }\n }\n }\n }\n\n // Note: this won't be called unless the keyword is allowed in `shouldParseExportDeclaration`.\n tsTryParseExportDeclaration(): ?N.Declaration {\n return this.tsParseDeclaration(\n this.startNode(),\n this.state.value,\n /* next */ true,\n );\n }\n\n tsParseExpressionStatement(node: any, expr: N.Identifier): ?N.Declaration {\n switch (expr.name) {\n case \"declare\": {\n const declaration = this.tsTryParseDeclare(node);\n if (declaration) {\n declaration.declare = true;\n return declaration;\n }\n break;\n }\n case \"global\":\n // `global { }` (with no `declare`) may appear inside an ambient module declaration.\n // Would like to use tsParseAmbientExternalModuleDeclaration here, but already ran past \"global\".\n if (this.match(tt.braceL)) {\n this.scope.enter(SCOPE_TS_MODULE);\n this.prodParam.enter(PARAM);\n const mod: N.TsModuleDeclaration = node;\n mod.global = true;\n mod.id = expr;\n mod.body = this.tsParseModuleBlock();\n this.scope.exit();\n this.prodParam.exit();\n return this.finishNode(mod, \"TSModuleDeclaration\");\n }\n break;\n\n default:\n return this.tsParseDeclaration(node, expr.name, /* next */ false);\n }\n }\n\n // Common to tsTryParseDeclare, tsTryParseExportDeclaration, and tsParseExpressionStatement.\n tsParseDeclaration(\n node: any,\n value: string,\n next: boolean,\n ): ?N.Declaration {\n switch (value) {\n case \"abstract\":\n if (this.tsCheckLineTerminatorAndMatch(tt._class, next)) {\n const cls: N.ClassDeclaration = node;\n cls.abstract = true;\n if (next) {\n this.next();\n if (!this.match(tt._class)) {\n this.unexpected(null, tt._class);\n }\n }\n return this.parseClass(\n cls,\n /* isStatement */ true,\n /* optionalId */ false,\n );\n }\n break;\n\n case \"enum\":\n if (next || this.match(tt.name)) {\n if (next) this.next();\n return this.tsParseEnumDeclaration(node, /* isConst */ false);\n }\n break;\n\n case \"interface\":\n if (this.tsCheckLineTerminatorAndMatch(tt.name, next)) {\n if (next) this.next();\n return this.tsParseInterfaceDeclaration(node);\n }\n break;\n\n case \"module\":\n if (next) this.next();\n if (this.match(tt.string)) {\n return this.tsParseAmbientExternalModuleDeclaration(node);\n } else if (this.tsCheckLineTerminatorAndMatch(tt.name, next)) {\n return this.tsParseModuleOrNamespaceDeclaration(node);\n }\n break;\n\n case \"namespace\":\n if (this.tsCheckLineTerminatorAndMatch(tt.name, next)) {\n if (next) this.next();\n return this.tsParseModuleOrNamespaceDeclaration(node);\n }\n break;\n\n case \"type\":\n if (this.tsCheckLineTerminatorAndMatch(tt.name, next)) {\n if (next) this.next();\n return this.tsParseTypeAliasDeclaration(node);\n }\n break;\n }\n }\n\n tsCheckLineTerminatorAndMatch(tokenType: TokenType, next: boolean) {\n return (next || this.match(tokenType)) && !this.isLineTerminator();\n }\n\n tsTryParseGenericAsyncArrowFunction(\n startPos: number,\n startLoc: Position,\n ): ?N.ArrowFunctionExpression {\n if (!this.isRelational(\"<\")) {\n return undefined;\n }\n\n const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n const oldYieldPos = this.state.yieldPos;\n const oldAwaitPos = this.state.awaitPos;\n this.state.maybeInArrowParameters = true;\n this.state.yieldPos = -1;\n this.state.awaitPos = -1;\n\n const res: ?N.ArrowFunctionExpression = this.tsTryParseAndCatch(() => {\n const node: N.ArrowFunctionExpression = this.startNodeAt(\n startPos,\n startLoc,\n );\n node.typeParameters = this.tsParseTypeParameters();\n // Don't use overloaded parseFunctionParams which would look for \"<\" again.\n super.parseFunctionParams(node);\n node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();\n this.expect(tt.arrow);\n return node;\n });\n\n this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n this.state.yieldPos = oldYieldPos;\n this.state.awaitPos = oldAwaitPos;\n\n if (!res) {\n return undefined;\n }\n\n return this.parseArrowExpression(\n res,\n /* params are already set */ null,\n /* async */ true,\n );\n }\n\n tsParseTypeArguments(): N.TsTypeParameterInstantiation {\n const node = this.startNode();\n node.params = this.tsInType(() =>\n // Temporarily remove a JSX parsing context, which makes us scan different tokens.\n this.tsInNoContext(() => {\n this.expectRelational(\"<\");\n return this.tsParseDelimitedList(\n \"TypeParametersOrArguments\",\n this.tsParseType.bind(this),\n );\n }),\n );\n // This reads the next token after the `>` too, so do this in the enclosing context.\n // But be sure not to parse a regex in the jsx expression ` />`, so set exprAllowed = false\n this.state.exprAllowed = false;\n this.expectRelational(\">\");\n return this.finishNode(node, \"TSTypeParameterInstantiation\");\n }\n\n tsIsDeclarationStart(): boolean {\n if (this.match(tt.name)) {\n switch (this.state.value) {\n case \"abstract\":\n case \"declare\":\n case \"enum\":\n case \"interface\":\n case \"module\":\n case \"namespace\":\n case \"type\":\n return true;\n }\n }\n\n return false;\n }\n\n // ======================================================\n // OVERRIDES\n // ======================================================\n\n isExportDefaultSpecifier(): boolean {\n if (this.tsIsDeclarationStart()) return false;\n return super.isExportDefaultSpecifier();\n }\n\n parseAssignableListItem(\n allowModifiers: ?boolean,\n decorators: N.Decorator[],\n ): N.Pattern | N.TSParameterProperty {\n // Store original location/position to include modifiers in range\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n\n let accessibility: ?N.Accessibility;\n let readonly = false;\n if (allowModifiers) {\n accessibility = this.parseAccessModifier();\n readonly = !!this.tsParseModifier([\"readonly\"]);\n }\n\n const left = this.parseMaybeDefault();\n this.parseAssignableListItemTypes(left);\n const elt = this.parseMaybeDefault(left.start, left.loc.start, left);\n if (accessibility || readonly) {\n const pp: N.TSParameterProperty = this.startNodeAt(startPos, startLoc);\n if (decorators.length) {\n pp.decorators = decorators;\n }\n if (accessibility) pp.accessibility = accessibility;\n if (readonly) pp.readonly = readonly;\n if (elt.type !== \"Identifier\" && elt.type !== \"AssignmentPattern\") {\n this.raise(pp.start, TSErrors.UnsupportedParameterPropertyKind);\n }\n pp.parameter = ((elt: any): N.Identifier | N.AssignmentPattern);\n return this.finishNode(pp, \"TSParameterProperty\");\n }\n\n if (decorators.length) {\n left.decorators = decorators;\n }\n\n return elt;\n }\n\n parseFunctionBodyAndFinish(\n node: N.BodilessFunctionOrMethodBase,\n type: string,\n isMethod?: boolean = false,\n ): void {\n if (this.match(tt.colon)) {\n node.returnType = this.tsParseTypeOrTypePredicateAnnotation(tt.colon);\n }\n\n const bodilessType =\n type === \"FunctionDeclaration\"\n ? \"TSDeclareFunction\"\n : type === \"ClassMethod\"\n ? \"TSDeclareMethod\"\n : undefined;\n if (bodilessType && !this.match(tt.braceL) && this.isLineTerminator()) {\n this.finishNode(node, bodilessType);\n return;\n }\n\n super.parseFunctionBodyAndFinish(node, type, isMethod);\n }\n\n registerFunctionStatementId(node: N.Function): void {\n if (!node.body && node.id) {\n // Function ids are validated after parsing their body.\n // For bodyless function, we need to do it here.\n this.checkLVal(node.id, BIND_TS_AMBIENT, null, \"function name\");\n } else {\n super.registerFunctionStatementId(...arguments);\n }\n }\n\n parseSubscript(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls: ?boolean,\n state: N.ParseSubscriptState,\n ): N.Expression {\n if (!this.hasPrecedingLineBreak() && this.match(tt.bang)) {\n this.state.exprAllowed = false;\n this.next();\n\n const nonNullExpression: N.TsNonNullExpression = this.startNodeAt(\n startPos,\n startLoc,\n );\n nonNullExpression.expression = base;\n return this.finishNode(nonNullExpression, \"TSNonNullExpression\");\n }\n\n if (this.isRelational(\"<\")) {\n // tsTryParseAndCatch is expensive, so avoid if not necessary.\n // There are number of things we are going to \"maybe\" parse, like type arguments on\n // tagged template expressions. If any of them fail, walk it back and continue.\n const result = this.tsTryParseAndCatch(() => {\n if (!noCalls && this.atPossibleAsyncArrow(base)) {\n // Almost certainly this is a generic async function `async () => ...\n // But it might be a call with a type argument `async();`\n const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(\n startPos,\n startLoc,\n );\n if (asyncArrowFn) {\n return asyncArrowFn;\n }\n }\n\n const node: N.CallExpression = this.startNodeAt(startPos, startLoc);\n node.callee = base;\n\n const typeArguments = this.tsParseTypeArguments();\n\n if (typeArguments) {\n if (!noCalls && this.eat(tt.parenL)) {\n // possibleAsync always false here, because we would have handled it above.\n // $FlowIgnore (won't be any undefined arguments)\n node.arguments = this.parseCallExpressionArguments(\n tt.parenR,\n /* possibleAsync */ false,\n );\n node.typeParameters = typeArguments;\n return this.finishCallExpression(node, state.optionalChainMember);\n } else if (this.match(tt.backQuote)) {\n const result = this.parseTaggedTemplateExpression(\n base,\n startPos,\n startLoc,\n state,\n );\n result.typeParameters = typeArguments;\n return result;\n }\n }\n\n this.unexpected();\n });\n\n if (result) return result;\n }\n\n return super.parseSubscript(base, startPos, startLoc, noCalls, state);\n }\n\n parseNewArguments(node: N.NewExpression): void {\n if (this.isRelational(\"<\")) {\n // tsTryParseAndCatch is expensive, so avoid if not necessary.\n // 99% certain this is `new C();`. But may be `new C < T;`, which is also legal.\n const typeParameters = this.tsTryParseAndCatch(() => {\n const args = this.tsParseTypeArguments();\n if (!this.match(tt.parenL)) this.unexpected();\n return args;\n });\n if (typeParameters) {\n node.typeParameters = typeParameters;\n }\n }\n\n super.parseNewArguments(node);\n }\n\n parseExprOp(\n left: N.Expression,\n leftStartPos: number,\n leftStartLoc: Position,\n minPrec: number,\n noIn: ?boolean,\n ) {\n if (\n nonNull(tt._in.binop) > minPrec &&\n !this.hasPrecedingLineBreak() &&\n this.isContextual(\"as\")\n ) {\n const node: N.TsAsExpression = this.startNodeAt(\n leftStartPos,\n leftStartLoc,\n );\n node.expression = left;\n const _const = this.tsTryNextParseConstantContext();\n if (_const) {\n node.typeAnnotation = _const;\n } else {\n node.typeAnnotation = this.tsNextThenParseType();\n }\n this.finishNode(node, \"TSAsExpression\");\n // rescan `<`, `>` because they were scanned when this.state.inType was true\n this.reScan_lt_gt();\n return this.parseExprOp(\n node,\n leftStartPos,\n leftStartLoc,\n minPrec,\n noIn,\n );\n }\n\n return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn);\n }\n\n checkReservedWord(\n word: string, // eslint-disable-line no-unused-vars\n startLoc: number, // eslint-disable-line no-unused-vars\n checkKeywords: boolean, // eslint-disable-line no-unused-vars\n // eslint-disable-next-line no-unused-vars\n isBinding: boolean,\n ): void {\n // Don't bother checking for TypeScript code.\n // Strict mode words may be allowed as in `declare namespace N { const static: number; }`.\n // And we have a type checker anyway, so don't bother having the parser do it.\n }\n\n /*\n Don't bother doing this check in TypeScript code because:\n 1. We may have a nested export statement with the same name:\n export const x = 0;\n export namespace N {\n export const x = 1;\n }\n 2. We have a type checker to warn us about this sort of thing.\n */\n checkDuplicateExports() {}\n\n parseImport(node: N.Node): N.AnyImport {\n if (this.match(tt.name) || this.match(tt.star) || this.match(tt.braceL)) {\n const ahead = this.lookahead();\n\n if (this.match(tt.name) && ahead.type === tt.eq) {\n return this.tsParseImportEqualsDeclaration(node);\n }\n\n if (\n this.isContextual(\"type\") &&\n // import type, { a } from \"b\";\n ahead.type !== tt.comma &&\n // import type from \"a\";\n !(ahead.type === tt.name && ahead.value === \"from\")\n ) {\n node.importKind = \"type\";\n this.next();\n } else {\n node.importKind = \"value\";\n }\n }\n\n const importNode = super.parseImport(node);\n /*:: invariant(importNode.type !== \"TSImportEqualsDeclaration\") */\n\n // `import type` can only be used on imports with named imports or with a\n // default import - but not both\n if (\n importNode.importKind === \"type\" &&\n importNode.specifiers.length > 1 &&\n importNode.specifiers[0].type === \"ImportDefaultSpecifier\"\n ) {\n this.raise(\n importNode.start,\n \"A type-only import can specify a default import or named bindings, but not both.\",\n );\n }\n\n return importNode;\n }\n\n parseExport(node: N.Node): N.AnyExport {\n if (this.match(tt._import)) {\n // `export import A = B;`\n this.expect(tt._import);\n return this.tsParseImportEqualsDeclaration(node, /* isExport */ true);\n } else if (this.eat(tt.eq)) {\n // `export = x;`\n const assign: N.TsExportAssignment = node;\n assign.expression = this.parseExpression();\n this.semicolon();\n return this.finishNode(assign, \"TSExportAssignment\");\n } else if (this.eatContextual(\"as\")) {\n // `export as namespace A;`\n const decl: N.TsNamespaceExportDeclaration = node;\n // See `parseNamespaceExportDeclaration` in TypeScript's own parser\n this.expectContextual(\"namespace\");\n decl.id = this.parseIdentifier();\n this.semicolon();\n return this.finishNode(decl, \"TSNamespaceExportDeclaration\");\n } else {\n if (this.isContextual(\"type\") && this.lookahead().type === tt.braceL) {\n this.next();\n node.exportKind = \"type\";\n } else {\n node.exportKind = \"value\";\n }\n\n return super.parseExport(node);\n }\n }\n\n isAbstractClass(): boolean {\n return (\n this.isContextual(\"abstract\") && this.lookahead().type === tt._class\n );\n }\n\n parseExportDefaultExpression(): N.Expression | N.Declaration {\n if (this.isAbstractClass()) {\n const cls = this.startNode();\n this.next(); // Skip \"abstract\"\n this.parseClass(cls, true, true);\n cls.abstract = true;\n return cls;\n }\n\n // export default interface allowed in:\n // https://github.com/Microsoft/TypeScript/pull/16040\n if (this.state.value === \"interface\") {\n const result = this.tsParseDeclaration(\n this.startNode(),\n this.state.value,\n true,\n );\n\n if (result) return result;\n }\n\n return super.parseExportDefaultExpression();\n }\n\n parseStatementContent(context: ?string, topLevel: ?boolean): N.Statement {\n if (this.state.type === tt._const) {\n const ahead = this.lookahead();\n if (ahead.type === tt.name && ahead.value === \"enum\") {\n const node: N.TsEnumDeclaration = this.startNode();\n this.expect(tt._const);\n this.expectContextual(\"enum\");\n return this.tsParseEnumDeclaration(node, /* isConst */ true);\n }\n }\n return super.parseStatementContent(context, topLevel);\n }\n\n parseAccessModifier(): ?N.Accessibility {\n return this.tsParseModifier([\"public\", \"protected\", \"private\"]);\n }\n\n parseClassMember(\n classBody: N.ClassBody,\n member: any,\n state: { hadConstructor: boolean },\n constructorAllowsSuper: boolean,\n ): void {\n this.tsParseModifiers(member, [\"declare\"]);\n const accessibility = this.parseAccessModifier();\n if (accessibility) member.accessibility = accessibility;\n this.tsParseModifiers(member, [\"declare\"]);\n\n super.parseClassMember(classBody, member, state, constructorAllowsSuper);\n }\n\n parseClassMemberWithIsStatic(\n classBody: N.ClassBody,\n member: N.ClassMember | N.TsIndexSignature,\n state: { hadConstructor: boolean },\n isStatic: boolean,\n constructorAllowsSuper: boolean,\n ): void {\n this.tsParseModifiers(member, [\"abstract\", \"readonly\", \"declare\"]);\n\n const idx = this.tsTryParseIndexSignature(member);\n if (idx) {\n classBody.body.push(idx);\n\n if ((member: any).abstract) {\n this.raise(member.start, TSErrors.IndexSignatureHasAbstract);\n }\n if (isStatic) {\n this.raise(member.start, TSErrors.IndexSignatureHasStatic);\n }\n if ((member: any).accessibility) {\n this.raise(\n member.start,\n TSErrors.IndexSignatureHasAccessibility,\n (member: any).accessibility,\n );\n }\n\n return;\n }\n\n /*:: invariant(member.type !== \"TSIndexSignature\") */\n\n super.parseClassMemberWithIsStatic(\n classBody,\n member,\n state,\n isStatic,\n constructorAllowsSuper,\n );\n }\n\n parsePostMemberNameModifiers(\n methodOrProp: N.ClassMethod | N.ClassProperty | N.ClassPrivateProperty,\n ): void {\n const optional = this.eat(tt.question);\n if (optional) methodOrProp.optional = true;\n\n if ((methodOrProp: any).readonly && this.match(tt.parenL)) {\n this.raise(methodOrProp.start, TSErrors.ClassMethodHasReadonly);\n }\n\n if ((methodOrProp: any).declare && this.match(tt.parenL)) {\n this.raise(methodOrProp.start, TSErrors.ClassMethodHasDeclare);\n }\n }\n\n // Note: The reason we do this in `parseExpressionStatement` and not `parseStatement`\n // is that e.g. `type()` is valid JS, so we must try parsing that first.\n // If it's really a type, we will parse `type` as the statement, and can correct it here\n // by parsing the rest.\n parseExpressionStatement(\n node: N.ExpressionStatement,\n expr: N.Expression,\n ): N.Statement {\n const decl =\n expr.type === \"Identifier\"\n ? this.tsParseExpressionStatement(node, expr)\n : undefined;\n return decl || super.parseExpressionStatement(node, expr);\n }\n\n // export type\n // Should be true for anything parsed by `tsTryParseExportDeclaration`.\n shouldParseExportDeclaration(): boolean {\n if (this.tsIsDeclarationStart()) return true;\n return super.shouldParseExportDeclaration();\n }\n\n // An apparent conditional expression could actually be an optional parameter in an arrow function.\n parseConditional(\n expr: N.Expression,\n noIn: ?boolean,\n startPos: number,\n startLoc: Position,\n refNeedsArrowPos?: ?Pos,\n ): N.Expression {\n // only do the expensive clone if there is a question mark\n // and if we come from inside parens\n if (!refNeedsArrowPos || !this.match(tt.question)) {\n return super.parseConditional(\n expr,\n noIn,\n startPos,\n startLoc,\n refNeedsArrowPos,\n );\n }\n\n const result = this.tryParse(() =>\n super.parseConditional(expr, noIn, startPos, startLoc),\n );\n\n if (!result.node) {\n // $FlowIgnore\n refNeedsArrowPos.start = result.error.pos || this.state.start;\n return expr;\n }\n if (result.error) this.state = result.failState;\n return result.node;\n }\n\n // Note: These \"type casts\" are *not* valid TS expressions.\n // But we parse them here and change them when completing the arrow function.\n parseParenItem(\n node: N.Expression,\n startPos: number,\n startLoc: Position,\n ): N.Expression {\n node = super.parseParenItem(node, startPos, startLoc);\n if (this.eat(tt.question)) {\n node.optional = true;\n // Include questionmark in location of node\n // Don't use this.finishNode() as otherwise we might process comments twice and\n // include already consumed parens\n this.resetEndLocation(node);\n }\n\n if (this.match(tt.colon)) {\n const typeCastNode: N.TsTypeCastExpression = this.startNodeAt(\n startPos,\n startLoc,\n );\n typeCastNode.expression = node;\n typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();\n\n return this.finishNode(typeCastNode, \"TSTypeCastExpression\");\n }\n\n return node;\n }\n\n parseExportDeclaration(node: N.ExportNamedDeclaration): ?N.Declaration {\n // Store original location/position\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n\n // \"export declare\" is equivalent to just \"export\".\n const isDeclare = this.eatContextual(\"declare\");\n\n let declaration: ?N.Declaration;\n\n if (this.match(tt.name)) {\n declaration = this.tsTryParseExportDeclaration();\n }\n if (!declaration) {\n declaration = super.parseExportDeclaration(node);\n }\n if (\n declaration &&\n (declaration.type === \"TSInterfaceDeclaration\" ||\n declaration.type === \"TSTypeAliasDeclaration\" ||\n isDeclare)\n ) {\n node.exportKind = \"type\";\n }\n\n if (declaration && isDeclare) {\n // Reset location to include `declare` in range\n this.resetStartLocation(declaration, startPos, startLoc);\n\n declaration.declare = true;\n }\n\n return declaration;\n }\n\n parseClassId(\n node: N.Class,\n isStatement: boolean,\n optionalId: ?boolean,\n ): void {\n if ((!isStatement || optionalId) && this.isContextual(\"implements\")) {\n return;\n }\n\n super.parseClassId(\n node,\n isStatement,\n optionalId,\n (node: any).declare ? BIND_TS_AMBIENT : BIND_CLASS,\n );\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters) node.typeParameters = typeParameters;\n }\n\n parseClassPropertyAnnotation(\n node: N.ClassProperty | N.ClassPrivateProperty,\n ): void {\n if (!node.optional && this.eat(tt.bang)) {\n node.definite = true;\n }\n\n const type = this.tsTryParseTypeAnnotation();\n if (type) node.typeAnnotation = type;\n }\n\n parseClassProperty(node: N.ClassProperty): N.ClassProperty {\n this.parseClassPropertyAnnotation(node);\n\n if (node.declare && this.match(tt.equal)) {\n this.raise(this.state.start, TSErrors.DeclareClassFieldHasInitializer);\n }\n\n return super.parseClassProperty(node);\n }\n\n parseClassPrivateProperty(\n node: N.ClassPrivateProperty,\n ): N.ClassPrivateProperty {\n // $FlowIgnore\n if (node.abstract) {\n this.raise(node.start, TSErrors.PrivateElementHasAbstract);\n }\n\n // $FlowIgnore\n if (node.accessibility) {\n this.raise(\n node.start,\n TSErrors.PrivateElementHasAccessibility,\n node.accessibility,\n );\n }\n\n this.parseClassPropertyAnnotation(node);\n return super.parseClassPrivateProperty(node);\n }\n\n pushClassMethod(\n classBody: N.ClassBody,\n method: N.ClassMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowsDirectSuper: boolean,\n ): void {\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters) method.typeParameters = typeParameters;\n super.pushClassMethod(\n classBody,\n method,\n isGenerator,\n isAsync,\n isConstructor,\n allowsDirectSuper,\n );\n }\n\n pushClassPrivateMethod(\n classBody: N.ClassBody,\n method: N.ClassPrivateMethod,\n isGenerator: boolean,\n isAsync: boolean,\n ): void {\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters) method.typeParameters = typeParameters;\n super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);\n }\n\n parseClassSuper(node: N.Class): void {\n super.parseClassSuper(node);\n if (node.superClass && this.isRelational(\"<\")) {\n node.superTypeParameters = this.tsParseTypeArguments();\n }\n if (this.eatContextual(\"implements\")) {\n node.implements = this.tsParseHeritageClause(\"implements\");\n }\n }\n\n parseObjPropValue(prop: N.ObjectMember, ...args): void {\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters) prop.typeParameters = typeParameters;\n\n super.parseObjPropValue(prop, ...args);\n }\n\n parseFunctionParams(node: N.Function, allowModifiers?: boolean): void {\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters) node.typeParameters = typeParameters;\n super.parseFunctionParams(node, allowModifiers);\n }\n\n // `let x: number;`\n parseVarId(\n decl: N.VariableDeclarator,\n kind: \"var\" | \"let\" | \"const\",\n ): void {\n super.parseVarId(decl, kind);\n if (decl.id.type === \"Identifier\" && this.eat(tt.bang)) {\n decl.definite = true;\n }\n\n const type = this.tsTryParseTypeAnnotation();\n if (type) {\n decl.id.typeAnnotation = type;\n this.resetEndLocation(decl.id); // set end position to end of type\n }\n }\n\n // parse the return type of an async arrow function - let foo = (async (): number => {});\n parseAsyncArrowFromCallExpression(\n node: N.ArrowFunctionExpression,\n call: N.CallExpression,\n ): N.ArrowFunctionExpression {\n if (this.match(tt.colon)) {\n node.returnType = this.tsParseTypeAnnotation();\n }\n return super.parseAsyncArrowFromCallExpression(node, call);\n }\n\n parseMaybeAssign(...args): N.Expression {\n // Note: When the JSX plugin is on, type assertions (` x`) aren't valid syntax.\n\n let state: ?State;\n let jsx;\n let typeCast;\n\n if (this.match(tt.jsxTagStart)) {\n // Prefer to parse JSX if possible. But may be an arrow fn.\n state = this.state.clone();\n\n jsx = this.tryParse(() => super.parseMaybeAssign(...args), state);\n /*:: invariant(!jsx.aborted) */\n\n if (!jsx.error) return jsx.node;\n\n // Remove `tc.j_expr` and `tc.j_oTag` from context added\n // by parsing `jsxTagStart` to stop the JSX plugin from\n // messing with the tokens\n const { context } = this.state;\n if (context[context.length - 1] === ct.j_oTag) {\n context.length -= 2;\n } else if (context[context.length - 1] === ct.j_expr) {\n context.length -= 1;\n }\n }\n\n if (!jsx?.error && !this.isRelational(\"<\")) {\n return super.parseMaybeAssign(...args);\n }\n\n // Either way, we're looking at a '<': tt.jsxTagStart or relational.\n\n let typeParameters: N.TsTypeParameterDeclaration;\n state = state || this.state.clone();\n\n const arrow = this.tryParse(abort => {\n // This is similar to TypeScript's `tryParseParenthesizedArrowFunctionExpression`.\n typeParameters = this.tsParseTypeParameters();\n const expr = super.parseMaybeAssign(...args);\n\n if (\n expr.type !== \"ArrowFunctionExpression\" ||\n (expr.extra && expr.extra.parenthesized)\n ) {\n abort();\n }\n\n // Correct TypeScript code should have at least 1 type parameter, but don't crash on bad code.\n if (typeParameters?.params.length !== 0) {\n this.resetStartLocationFromNode(expr, typeParameters);\n }\n expr.typeParameters = typeParameters;\n return expr;\n }, state);\n\n if (!arrow.error && !arrow.aborted) return arrow.node;\n\n if (!jsx) {\n // Try parsing a type cast instead of an arrow function.\n // This will never happen outside of JSX.\n // (Because in JSX the '<' should be a jsxTagStart and not a relational.\n assert(!this.hasPlugin(\"jsx\"));\n\n // This will start with a type assertion (via parseMaybeUnary).\n // But don't directly call `this.tsParseTypeAssertion` because we want to handle any binary after it.\n typeCast = this.tryParse(() => super.parseMaybeAssign(...args), state);\n /*:: invariant(!typeCast.aborted) */\n if (!typeCast.error) return typeCast.node;\n }\n\n if (jsx?.node) {\n /*:: invariant(jsx.failState) */\n this.state = jsx.failState;\n return jsx.node;\n }\n\n if (arrow.node) {\n /*:: invariant(arrow.failState) */\n this.state = arrow.failState;\n return arrow.node;\n }\n\n if (typeCast?.node) {\n /*:: invariant(typeCast.failState) */\n this.state = typeCast.failState;\n return typeCast.node;\n }\n\n if (jsx?.thrown) throw jsx.error;\n if (arrow.thrown) throw arrow.error;\n if (typeCast?.thrown) throw typeCast.error;\n\n throw jsx?.error || arrow.error || typeCast?.error;\n }\n\n // Handle type assertions\n parseMaybeUnary(refExpressionErrors?: ?ExpressionErrors): N.Expression {\n if (!this.hasPlugin(\"jsx\") && this.isRelational(\"<\")) {\n return this.tsParseTypeAssertion();\n } else {\n return super.parseMaybeUnary(refExpressionErrors);\n }\n }\n\n parseArrow(node: N.ArrowFunctionExpression): ?N.ArrowFunctionExpression {\n if (this.match(tt.colon)) {\n // This is different from how the TS parser does it.\n // TS uses lookahead. The Babel Parser parses it as a parenthesized expression and converts.\n\n const result = this.tryParse(abort => {\n const returnType = this.tsParseTypeOrTypePredicateAnnotation(\n tt.colon,\n );\n if (this.canInsertSemicolon() || !this.match(tt.arrow)) abort();\n return returnType;\n });\n\n if (result.aborted) return;\n\n if (!result.thrown) {\n if (result.error) this.state = result.failState;\n node.returnType = result.node;\n }\n }\n\n return super.parseArrow(node);\n }\n\n // Allow type annotations inside of a parameter list.\n parseAssignableListItemTypes(param: N.Pattern) {\n if (this.eat(tt.question)) {\n if (param.type !== \"Identifier\") {\n this.raise(param.start, TSErrors.PatternIsOptional);\n }\n\n ((param: any): N.Identifier).optional = true;\n }\n const type = this.tsTryParseTypeAnnotation();\n if (type) param.typeAnnotation = type;\n this.resetEndLocation(param);\n\n return param;\n }\n\n toAssignable(node: N.Node): N.Node {\n switch (node.type) {\n case \"TSTypeCastExpression\":\n return super.toAssignable(this.typeCastToParameter(node));\n case \"TSParameterProperty\":\n return super.toAssignable(node);\n case \"TSAsExpression\":\n case \"TSNonNullExpression\":\n case \"TSTypeAssertion\":\n node.expression = this.toAssignable(node.expression);\n return node;\n default:\n return super.toAssignable(node);\n }\n }\n\n checkLVal(\n expr: N.Expression,\n bindingType: BindingTypes = BIND_NONE,\n checkClashes: ?{ [key: string]: boolean },\n contextDescription: string,\n ): void {\n switch (expr.type) {\n case \"TSTypeCastExpression\":\n // Allow \"typecasts\" to appear on the left of assignment expressions,\n // because it may be in an arrow function.\n // e.g. `const f = (foo: number = 0) => foo;`\n return;\n case \"TSParameterProperty\":\n this.checkLVal(\n expr.parameter,\n bindingType,\n checkClashes,\n \"parameter property\",\n );\n return;\n case \"TSAsExpression\":\n case \"TSNonNullExpression\":\n case \"TSTypeAssertion\":\n this.checkLVal(\n expr.expression,\n bindingType,\n checkClashes,\n contextDescription,\n );\n return;\n default:\n super.checkLVal(expr, bindingType, checkClashes, contextDescription);\n return;\n }\n }\n\n parseBindingAtom(): N.Pattern {\n switch (this.state.type) {\n case tt._this:\n // \"this\" may be the name of a parameter, so allow it.\n return this.parseIdentifier(/* liberal */ true);\n default:\n return super.parseBindingAtom();\n }\n }\n\n parseMaybeDecoratorArguments(expr: N.Expression): N.Expression {\n if (this.isRelational(\"<\")) {\n const typeArguments = this.tsParseTypeArguments();\n\n if (this.match(tt.parenL)) {\n const call = super.parseMaybeDecoratorArguments(expr);\n call.typeParameters = typeArguments;\n return call;\n }\n\n this.unexpected(this.state.start, tt.parenL);\n }\n\n return super.parseMaybeDecoratorArguments(expr);\n }\n\n // === === === === === === === === === === === === === === === ===\n // Note: All below methods are duplicates of something in flow.js.\n // Not sure what the best way to combine these is.\n // === === === === === === === === === === === === === === === ===\n\n isClassMethod(): boolean {\n return this.isRelational(\"<\") || super.isClassMethod();\n }\n\n isClassProperty(): boolean {\n return (\n this.match(tt.bang) || this.match(tt.colon) || super.isClassProperty()\n );\n }\n\n parseMaybeDefault(...args): N.Pattern {\n const node = super.parseMaybeDefault(...args);\n\n if (\n node.type === \"AssignmentPattern\" &&\n node.typeAnnotation &&\n node.right.start < node.typeAnnotation.start\n ) {\n this.raise(\n node.typeAnnotation.start,\n TSErrors.TypeAnnotationAfterAssign,\n );\n }\n\n return node;\n }\n\n // ensure that inside types, we bypass the jsx parser plugin\n getTokenFromCode(code: number): void {\n if (\n this.state.inType &&\n (code === charCodes.greaterThan || code === charCodes.lessThan)\n ) {\n return this.finishOp(tt.relational, 1);\n } else {\n return super.getTokenFromCode(code);\n }\n }\n\n // used after we have finished parsing types\n reScan_lt_gt() {\n if (this.match(tt.relational)) {\n const code = this.input.charCodeAt(this.state.start);\n if (code === charCodes.lessThan || code === charCodes.greaterThan) {\n this.state.pos -= 1;\n this.readToken_lt_gt(code);\n }\n }\n }\n\n toAssignableList(exprList: N.Expression[]): $ReadOnlyArray {\n for (let i = 0; i < exprList.length; i++) {\n const expr = exprList[i];\n if (!expr) continue;\n switch (expr.type) {\n case \"TSTypeCastExpression\":\n exprList[i] = this.typeCastToParameter(expr);\n break;\n case \"TSAsExpression\":\n case \"TSTypeAssertion\":\n if (!this.state.maybeInArrowParameters) {\n exprList[i] = this.typeCastToParameter(expr);\n } else {\n this.raise(expr.start, TSErrors.UnexpectedTypeCastInParameter);\n }\n break;\n }\n }\n return super.toAssignableList(...arguments);\n }\n\n typeCastToParameter(node: N.TsTypeCastExpression): N.Node {\n node.expression.typeAnnotation = node.typeAnnotation;\n\n this.resetEndLocation(\n node.expression,\n node.typeAnnotation.end,\n node.typeAnnotation.loc.end,\n );\n\n return node.expression;\n }\n\n toReferencedList(\n exprList: $ReadOnlyArray,\n isInParens?: boolean, // eslint-disable-line no-unused-vars\n ): $ReadOnlyArray {\n for (let i = 0; i < exprList.length; i++) {\n const expr = exprList[i];\n if (expr?.type === \"TSTypeCastExpression\") {\n this.raise(expr.start, TSErrors.UnexpectedTypeAnnotation);\n }\n }\n\n return exprList;\n }\n\n shouldParseArrow() {\n return this.match(tt.colon) || super.shouldParseArrow();\n }\n\n shouldParseAsyncArrow(): boolean {\n return this.match(tt.colon) || super.shouldParseAsyncArrow();\n }\n\n canHaveLeadingDecorator() {\n // Avoid unnecessary lookahead in checking for abstract class unless needed!\n return super.canHaveLeadingDecorator() || this.isAbstractClass();\n }\n\n jsxParseOpeningElementAfterName(\n node: N.JSXOpeningElement,\n ): N.JSXOpeningElement {\n if (this.isRelational(\"<\")) {\n const typeArguments = this.tsTryParseAndCatch(() =>\n this.tsParseTypeArguments(),\n );\n if (typeArguments) node.typeParameters = typeArguments;\n }\n return super.jsxParseOpeningElementAfterName(node);\n }\n\n getGetterSetterExpectedParamCount(\n method: N.ObjectMethod | N.ClassMethod,\n ): number {\n const baseCount = super.getGetterSetterExpectedParamCount(method);\n const firstParam = method.params[0];\n const hasContextParam =\n firstParam &&\n firstParam.type === \"Identifier\" &&\n firstParam.name === \"this\";\n\n return hasContextParam ? baseCount + 1 : baseCount;\n }\n\n parseCatchClauseParam(): N.Identifier {\n const param = super.parseCatchClauseParam();\n const type = this.tsTryParseTypeAnnotation();\n\n if (type) {\n pa