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ACAC,MACAC,KACAC,KACAlB,KACAmB,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,KACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,KACAC,KACAvB,MACAmB,MACAK,KACAC,KACAC,KACAC,KACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,UAG+B,CAC/BC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,MACAC,KACAC,MACAC,MACAC,MACAC,MACAC,KACAC,MACAC,MACAC,MACAC,MACAC,KACAC,MACAC,MACAC,MACAC,KACAC,KACAC,MACAC,MACAC,MACAC,MACAC,KACAC,KACAC,MACAC,MACAC,MACAC,MACAC,MACAC,+LC7QI,MAAOC,GAMXvjE,cAJAQ,gBAAY,EAEZA,WAAQ,IAAIsjC,KAEG,CAAC5jC,kDANLqjE,GAAyB,sCAAzBA,GAAyBpjE,+OCRtCC,oBAAQA,gCAAS+iC,eAAY,GAM3B/iC,0BACFA,cAJEA,+SCKI,MAAOojE,GAEXxjE,cAAe,CAEfC,WAAkB,CAACC,kDAJRsjE,GAAyB,sCAAzBA,GAAyBrjE,2MCRtCC,iBACEA,uBACAA,oBAA6BA,SAAoDA,iBAApDA,qYCAxB,MAAMqjE,GAAsB,CAACC,iOCKhCtjE,iBAC+CA,SAEyBA,+BAHnEA,uEAC0CA,wSAG/CA,eAAqDA,SAEyBA,+BAFzBA,2RCAnD,MAAOujE,WAAmCrjE,MAC9CN,YACU8f,GAED4M,GAEPzrB,QAJQT,eAEDA,iBAGT,CAEAP,WAAkB,CAElB2jE,gBACEpjE,KAAKgjC,aACLhjC,KAAKsf,OAAOY,SAASljB,sBAA6B,KACpD,CAAC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KACrD,CAEAngC,cACErrC,KAAK0uB,cAAc0C,aACrB,CAAC1xB,kDA7BU0rE,IAAY5xD,oFAAZ4xD,GAAYzrE,0FAAZgjC,aAAgB,8FCb7B/iC,yBAA+B,gBAA/BA,CAA+B,oBAA/BA,CAA+B,4CCazB,MAAO6rE,GAAS/rE,kDAAT+rE,GAAS,sCAATA,GAASC,WAFRN,MAAY1rE,wCADd8oE,GAAkB+B,GAAYlG,QCJtCrnE,oBACF2uE,SAGFC,OACGC,gBAAgBJ,IAChBjgD,KAAKsgD,IACJ7jD,OAAOiV,aAAkB4uC,EAAOx1D,WAEjCo7B,MAAMxuB,GAAO1e,QAAQwjB,IAAI9E,qBCf5B,OACA,kCACA,mCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,6DACA,iCACA,mCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,6DACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,gCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,6DACA,sDACA,yDACA,sDACA,yDACA,uDACA,oDACA,uDACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,gCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,gCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,gCACA,iCACA,kCACA,kCACA,kCACA,iCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,iCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,iCACA,kCACA,iCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,kCACA,iCACA,8DAIA,cACA,WACA,WACA,CACA,cACA,cACA,8CACA,gCACAnb,EAEA,WACA,CACAgkE,kBACA,qBACA,EACAA,YACAD,YACAC","names":["redirectUrl","URL","environment","configs","general","homePageUrl","loginUrl","parser","modelsMapperStrategy","item","entityName","Models","Error","parserStrategy","defaultParser","guard","checkUserRoutePermission","state","authService","url","includes","user","isAdmin","loaderService","customLoader","component","FullscreenLoadingComponent","params","fixed","tokenQueryParmName","localStorageTokenName","localStorageRefreshTokenName","getGenerateTokenApiConfig","token","method","code","redirectUri","searchParams","get","getAuthTokenComponent","signInComponent","SignInComponent","constructor","ngOnInit","static","selectors","i0","SuperModalComponent","BaseModal","ngAfterViewInit","this","modal","disabledHandleKeyboardEvent","handleKeyboardEvent","t","Modal","Collaborator","SuperModel","collaborator","super","User","serialised","id","Group","payload","settings","GroupSettings","createdOnDate","Date","createdOn","undefined","canAddUser","nameWithDefault","name","isDefault","description","aiModels","reaction","retrosynthesis","apiLimitEnabled","apiMaxCallPerMinute","apiMinTimeBetweenCall","Molecule","molecule","moleculeImageSvg","svgToUrl","moleculeImage","library","smiles","reactionsCount","Reaction","data","attemptDTO","fieldsToCopy","forEach","field","attemptId","productMolecule","precursorMolecules","map","attentionWeightsSvg","attentionWeights","creatorName","createdBy","fullName","confidence","message","ERetrosynthesisMoleculeAction","EConfidenceTagName","EConfidenceTagColor","EConfidenceTagTextColor","ERetrosynthesisStatus","ESynthesisStatusClassColor","ERetrosynthesisSteps","ERetrosynthesisTypology","EReactorStatus","PredictionTask","object","attempts","attempt","taskId","Login","console","error","Reagent","Challenge","challenge","challengeReaction","groundTruthReaction","ChallengeResult","challengeResult","humanPrediction","machinePredictions","humanTotalTime","machineTotalTime","humanCorrect","machineCorrect","Invitation","invitation","email","status","ChallengesResultsStats","totalHumanTime","totalMachineTime","nOfCorrectHumanChallenges","nOfCorrectMachineChallenges","RetrosynthesisWizardConfig","speed","step","values","Action","label","toUpperCase","substring","content","material","value","duration","Object","keys","key","actionContent","emptyActionContent","Array","isArray","quantity","unit","stoichiometryFactor","isChanged","RetrosynthesisMolecule","children","m","parent","actions","a","initialActions","statusLogs","e","StatusLog","reactors","isValid","isParentValid","cloneMeWithOnlyFirstChild","assign","c","toJSON","time","timestamp","RetrosynthesisSequence","tree","outcomeMolecules","length","complexityGraphSvg","complexityGraph","RetrosynthesisSibling","reactions","r","s","Retrosynthesis","molecules","sequences","siblings","metaData","willBeCompletedOn","project","Project","uploadedFile","FileEntry","typology","isFromFile","isInteractive","FROM_FILE","INTERACTIVE","AUTOMATIC","typologyLabel","QueueState","RoboRxnConfig","webcamUrl","ActionSchema","parameters","p","ActionSchemaParameter","validations","RoboRxnSummary","Reactor","currentSynthesis","index","LatestSynthesis","queued","SynthesisExecution","completed","EAiTrainingModelType","EAiTrainingModelTypeLabel","EAiTrainingModelStatusLabel","EAiTrainingModelStatus","AiTrainingModel","aiTrainingFile","AiTrainingFile","projectIds","typeLabel","modelType","statusLabel","previewReactions","previewReaction","outcomeMolecule","SimilarReaction","score","Math","abs","similaritiesScore","toExponential","toFixed","ESynthesisExecutionStatus","SynthesisSuperModel","synthesis","SynthesisProcedure","isProcedure","Tmap","TmapReaction","reactantsMolecules","reactantsMolecule","join","concat","TuneRxnConfig","reactionDataSampleFileContent","reactionDataFileMaxSize","reactionDataPreviewLimit","Activity","creator","activityStatusLabel","EActivityStatus","activityTypeLabel","activityType","EActivityType","projectId","projectName","activityName","EBoundingBoxType","ReactionSettingsIngredient","isMissing","messages","some","shortMessage","image","ingredientCategory","EIngredientPhase","ReactionSettings","action","product","SynthesisAnnotation","title","ReactionPropertyPrediction","atomMapping","type","replace","ReactionCompletion","precursorMolecule","reactionCompletionPredictionId","feedback","productSmiles","precursorSmiles","ReactionCompletionPrediction","reactionCompletion","request","errorMessage","canGenerateCompletions","aiModel","isAiModelDeleted","reactionCompletions","OpticalChemicalRecognition","x","OpticalChemicalRecognitionReaction","segments","OpticalChemicalRecognitionSegment","base64Image","fileExtension","fileImage","xBottomRightInitial","xBottomRight","xTopLeftInitial","xTopLeft","yBottomRightInitial","yBottomRight","yTopLeftInitial","yTopLeft","boundingBoxType","fromUser","reactant","text","polygon","Country","country","countryName","countryCode2","countryCode3","ESubscriptionStatus","EPlanForecastType","ESocketNotificationSubTopic","ESocketNotificationLevel","ESocketNotificationTarget","UserBillingInformation","fullAddress","addressLine1","addressLine2","addressLine3","locality","province","postalCode","phone","UserPlanUsage","Subscription","endTerm","endTermDate","plan","subscriptionInProgress","SubscriptionCost","tax","total","BillingOverview","SocketNotification","SubscriptionTeam","documentNumber","EPlanType","Plan","nameWithCountry","canActivate","levels","currencyCode","planType","collaborators","colaborator","colaborators","isOwner","modifiedBy","toString","ESynthesisTypologyFilter","ESynthesisSourceType","sourceTypeLabel","sourceType","TEXT","RETROSYNTHESIS","UserRole","ERoboRxnApiKeyType","projects","group","password","firstName","surname","lastName","picture","apiKey","groupName","role","ADMIN","hasFreePlan","hasNoLimitFileUpload","isTeamOwner","isTeamMember","subscriptionGroupId","isTerms","termsAccepted","isBlocked","blocked","hasPayGoPlan","hasSelectedCountry","ActionsService","ApiSuperService","http","injector","convertSimlesToSvgs","smilesList","path","relation","queryParams","convertSimlesToMols","body","isBodyRaw","validateSmiles","convertMaterialToSmiles","convertSmilesToMaterial","getSimilarReactionDocuments","page","size","referenceSize","sort","aiModelType","generateFingerprint","mapForReaction","retrosynthesisSequenceId","modelTag","numberOfNeighbors","tmapNumberOfNeighbors","filter","renderReaction","vertexIndex","showImage","imageBackgroundColor","_angular_core__WEBPACK_IMPORTED_MODULE_1__","factory","ActivitiesService","getQueuedActivities","requestParams","apiUrl","modelMapper","AdminService","getPlans","patchPlanLevel","planLevel","AiModelsService","getAiModelsForRetrosynthesis","categoryName","getAiModelsForPredictions","getAiModelsForSynthesisFromSequence","getAiModelsForSynthesisFromText","getAiModelsForPropertyPrediction","getAiModelsForReactionCompletion","getAiModelCategoriesForRetrosynthesis","AiTrainingModelsService","core","AiTrainingFilesService","ReactionPropertyPredictionService","PlansService","getForecast","AddressesService","validate","searchString","format","formatUrl","BillingsService","overview","SubscriptionsTeamService","getCurrentSubscription","getInvitations","ApiService","drafts","users","emails","admin","auth","reagents","generic","reactionsCollection","challenges","challengesResults","paragraphToActions","synthesisProcedures","synthesisExecutions","retrosynthesisSequences","groups","aiTrainingModels","aiTrainingFiles","robotRxn","fileEntries","activities","reactionPropertyPrediction","opticalChemicalRecognition","hubspot","plans","addresses","userBillingInformation","subscriptions","billings","payments","subscriptionsTeam","AttemptsService","submitFeedback","fetch","likeDislikeAttempt","ChallengesResultsService","bulkDelete","pipe","envelope","parseEnvelope","getChallengeResults","getById","metadata","uiMessages","errors","isResultReady","retryWhen","errorObs","delayWhen","timer","checkResultsInterval","throwError","_angular_core__WEBPACK_IMPORTED_MODULE_6__","ChallengesService","CollaboratorsService","DraftsService","EmailService","shareApp","FileEntriesService","GroupsService","mockGroups","totalUsers","isDeletable","of","pagination","first","last","itemsInPage","totalItems","totalPages","mockGroup","groupId","delay","_angular_core__WEBPACK_IMPORTED_MODULE_4__","HubspotService","subscribeHubspot","ConfigService","RetrosynthesisSnapshotService","CommonService","router","dialogsService","onCreateForwardReaction","dialog","open","SelectProjectDialogComponent","buttonCallToAction","afterClosed","event","EDialogCloseEventStatus","subscribe","response","navigate","onCreatePredictRetrosyntheticRoutes","CreateRetrosynthesisWizardDialogComponent","onPlanASynthesis","roboRxnEnabled","CreateSynthesisWizardDialogComponent","GetRoborxnKeyDialogComponent","onCreateReactionCompletion","MoleculesService","export","OpticalChemicalRecognitionService","ParagraphToActionsService","post","PaymentsService","ProjectsService","getProjectsWithRetrosynthesis","ReactionsCollectionService","ReactionsService","predict","predictionData","predictionTaskId","beam","predictionId","getOutcomes","Observable","observer","embed","areOutcomesReady","next","checkOutcomesInterval","complete","predictionTask","_angular_core__WEBPACK_IMPORTED_MODULE_7__","ReagentsService","RetrosynthesisSequencesService","retrosynthesisPolling","intervalMs","service","nextPoll$","Subject","complete$","timeoutId","repeatWhen","takeUntil","switchMap","getRetrosynthesisResult","tap","catchError","err","setTimeout","finalize","clearTimeout","RetrosynthesisService","getWizardConfig","getRetrosynthesis","getExpandSequences","retroId","nodeId","task","task_id","expandInterval","pollQueueState","interval","pollQueueStateInterval","startWith","getRel","shareRetrosynthesis","selectedSequenceId","postRel","sequenceId","RobotRxnService","getRobotHardwareSettings","deleteIngredient","ingredientName","SubscriptionsService","cost","planId","currentSubscription","deleteCurrentSubscription","SynthesisExecutionsService","SynthesisProceduresService","UserBillingInformationService","UsersService","logout","localStorage","setItem","changePasswordUsingToken","changePassword","generateKey","removeKey","addTerms","getPlanUsage","userId","getPaymentMethods","EUiHelperElement","AppSessionService","eventTrackingService","breakpointObserver","platform","isXSmall","isSmall","isMedium","isLarge","isXLarge","isHandset","isTablet","isWeb","isHandsetPortrait","isTabletPortrait","isWebPortrait","isHandsetLandscape","isTabletLandscape","isWebLandscape","isAndroid","isIOS","isFirefox","isWebkit","isTrident","isEdge","isSafari","BehaviorSubject","left","right","init","initBreakpointListener","setPlatformInformation","log","window","printEnv","isSidebarVisible","sidebarType","sidebarVisible","getActivePanel","sidebarActivePanel","toggleSidebarVisibility","setSidebarVisibility","isVisible","setSidebarPanel","panel","cleanSession","redirectUrlKey","getItem","removeItem","projectsFavoritesChanges","projectsFavorites$","currentProject","currentProject$","setCurrentProject","getUiHelper","element","uiHelpers$","el","showUIHelper","_uiHelpers","active","hideUIHelper","resetListTableStateForProject","listTableState","ETableList","platformInformation","IOS","navigator","maxTouchPoints","ANDROID","FIREFOX","WEBKIT","EDGE","TRIDENT","observe","Breakpoints","activeBreakpoints","isMatched","activeBreakpointsChanges$","DialogsService","modalService","wrapCarbonDialog","bind","closeAll","options","closeEvent$","obs","openModal","then","mdl","instance","close","result","dialogResult","dismiss","_this","create","inputs","dialogData","_angular_core__WEBPACK_IMPORTED_MODULE_2__","EventTrackingService","blueMixAnalyticsEnabled","AuthService","isBluemixAnalitycsEnabled","bluemixAnalytics","trackLoginLogout","eventName","_options","loginMethod","userAgent","sendEvent","trackEvent","objectType","warn","now","toISOString","SocialFbService","Promise","resolve","reject","initialised","FB","appId","hideFlashCallback","cookie","version","ui","SocialGoogleService","share","googleShareUrl","KetcherDataService","_smiles","clear","SynthesisReactionSettingsService","apiService","isSimulator","roboRxnApiKeyType","SocketNotificationService","socketService","toastMessagesService","watch","parseNotification","notifications$","notification","target","showToastMessages","showDialog","toastMessageType","level","EToastMessageType","show","timeout","OkCancelDialogComponent","okText","SocketService","connect","_ref","rxStomp","RxStomp","configure","brokerURL","getWsUrl","heartbeatIncoming","heartbeatOutgoing","reconnectDelay","beforeConnect","client","isTokenValid","authToken","renewToken","toPromise","stompClient","connectHeaders","Authorization","activate","destination","modelMapperEntityName","responseParser","JSON","parse","unsubscribe","deactivate","EToastVerticalPosition","EToastHorizontalPosition","ToastMessagesService","notificationService","horizontalPosition","verticalPosition","showToast","toLowerCase","closeLabel","subtitle","showClose","lowContrast","componentRef","notificationRef","info","loaded","percentage","HttpClient","patch","put","delete","count","doGetRel","getAction","getRels","getRelById","relationId","putRel","patchRel","deleteRel","deleteRelBulk","countRel","addEditRel","removeRel","upload","formData","FormData","files","file","append","builtRequestParams","buildRequest","HttpParams","encoder","HTTP_PARAMETERS_CODEC","fromObject","HttpRequest","getUploadStatus","HttpEventType","parseBody","apiCall","toLocaleLowerCase","refreshToken","retryEvent","errorEvent","HttpErrorResponse","from","requestBody","headers","bodyParser","push","headerName","getParser","parserType","requestParser","getModelMapper","apiOutput","entries","val","set","bodyString","mockApiUrl","fileUploadStatus","round","encodeKey","encodeURIComponent","encodeValue","decodeKey","decodeURIComponent","decodeValue","IApiSortDirection","ArrayBuffer","parsedEnvelope","isResponsePaged","unwrapExtraModelFields","modelsMapper","parsePagination","number","numberOfElements","totalElements","sorting","parseSorting","sortingResponse","property","direction","isResponseList","apiActionData","apiCount","apiAction","success","extraFields","extraField","returnObj","query","computedFields","responseType","HttpHeaders","raw","stringify","isNaN","sortingString","stringifySort","sortingItem","header","reportProgress","parserName","selectedParser","items","LoaderAction","LoaderService","onLoaderChange","hide","LoaderComponent","resolver","loaderAction","isReady","loaderType","componentFactory","clearContent","resolveComponentFactory","createComponent","destroy","ViewContainerRef","AuthGuard","usersService","appSessionService","TimeoutError","canActivateChild","childRoute","EcommerceGuard","BitfSafeHtml","sanitizer","transform","style","bypassSecurityTrustHtml","_angular_core__WEBPACK_IMPORTED_MODULE_0__","pure","SuperAuthService","_user","user$","login","loginResponse","setHeapIdentify","idToken","heap","identify","emailDomain","split","pop","addUserProperties","Provider","provider","MigratedUser","migratedUser","SubscriptionType","EmailDomain","logoutUrl","authTokenMetaData","location","href","generateToken","tokenGeneratorUrl","tokenApiConfig","_authToken","localStorageToken","_refreshToken","localStorageRefreshToken","_authTokenMetaData","rawAuthToken","TryCatch","propertyKey","descriptor","descriptorType","decoratorFunctionFactory","_decoratorFunctionFactory","originalFunction","args","apply","rootInjector","ErrorHandlerService","handle","fromDecorator","className","functionName","decodeToken","jwtDecode","decodedToken","tokenExpiration","getTokenExpirationInMilliseconds","exp","__decorate","tslib_es6","GenericService","callAction","LoggerService","locationStrategy","addToLogMessagesPipe","createLogObj","route","PathLocationStrategy","fullUrl","logObj","clientJs","ClientJS","browserData","getBrowserData","browser","os","device","getDeviceType","timeZone","getTimeZone","keyName","logMessages","logMessagesArray","unshift","ErrorHandler","handleError","errorObj","loggerParams","loggerService","stackParts","stack","httpErrorResponse","bitfPromptToDownloadFile","fileContent","fileType","fileName","downloadFile","Blob","objectUrl","createObjectURL","document","createElement","download","appendChild","click","removeChild","getRange","to","propertyName","$and","o","$gte","getRangeValue","$lte","$date","getMongoQuery","filters","searchText","searchTextFields","filtersQuery","searchQuery","$or","getRegexQueryFromKeyword","keyword","fields","excludeKeyword","searchValue","$regex","$options","fieldName","obj","goToSignUp","goToLogin","goToLoginGoogle","goToLoginFacebook","ctx","SmilesEditorDialogComponent","actionLabel","maxNumberOfMolecules","Infinity","closeModal","emit","onConfirmSmiles","_angular_core__WEBPACK_IMPORTED_MODULE_3__","SmilesEditorHeaderComponent","ESmilesEditorType","EventEmitter","SmilesEditorTextualComponent","smilesForm","initForm","patchValue","fb","Validators","loadInKetcher","isValidating","loadSmilesInVisualEditor","SmilesEditorComponent","EVisualEditorType","ngOnChanges","changes","currentValue","ketcher","setSmiles","onLoadSmilesInVisualEditor","onChangeEditorType","editorType","currentEditor","onAction","ketcherInitialised","checkMaxNumberOfMolecules","mol","dimensionUnits","getBestDimensionUnit","bytes","i","min","max","floor","convertToBytes","convertFromBytes","copyToClipboard","_x","test","clipboard","input","setAttribute","position","top","select","focus","execCommand","write","ClipboardItem","sequencesFromSiblingsForMolecule","sequence","treeNode","sibling","siblingToSequence","newSiblingSequence","confidenceTag","reactionSmiles","custom","rclass","siblingId","isThermal","isPhotochemical","reduce","acc","widthRegex","EPredictionLibrary","heightRegex","pxToMM","px","svg","DomSanitizer","base64Url","bypassSecurityTrustUrl","width","height","originalWidth","originalHeight","RegExp","regex","regexWidthResult","exec","regexHeightResult","btoa","AdminSidenavComponent","AIModelSelectionDialogComponent","FormControl","mapAiModels","onSelectAIModel","aiModelFromControl","model","selected","setValue","CloseButtonComponent","CopySmilesDialogComponent","onCopySmiles","copied","_angular_core__WEBPACK_IMPORTED_MODULE_5__","CreateProjectDialogComponent","createForm","createProjectForm","isAddingCollaborator","collaboratorsSelectionChanged","collaboratorsEmails","selectedCollaborators","collaboratorEmail","createProject","newProject","invitations","SuperWizardComponent","form","startFrom","fileId","requiredIf","getProjectsListItems","subscription","add","valueChanges","updateValueAndValidity","maxFileSizeString","uploadFileMaxSize","onSelectedFiles","selectedFile","uploaded","invalid","invalidText","createRetro","getOrCreateProject","projectGroup","onDownloadExampleFile","ngOnDestroy","retroStartFrom","fromProject","FROM_EXISTING_RETROSYNTHESIS","selectedRetrosynthesis","selectedSequence","selectedAiModel","FROM_RETROSYNTHESIS_FILE","resetStartFromRetrosynthesisForm","retroStartFromChange","fromProjectChange","retrosyntheticRouteChange","sequenceRouteChange","save","EXPERIMENTAL_PROCEDURE","fromProjects","emitEvent","isFromProjectLoading","projectsService","loadAiModels","models","selectedAIModel","isRetrosynthesisListLoading","retro","isSelected","isSequencesListLoading","canCreateSynthesis","debounceTime","isAiModelsLoading","DownloadFileEntryButtonComponent","onDownloadFile","fileEntry","mimeType","extension","baseFileName","DropdownMenuComponent","opened","dropDown","openDropdown","closeDropdown","openedAfterViewInit","Dropdown","dropDownEl","nativeElement","dropdownOpened","toggleDropdown","closed","_toggle","classList","contains","EShareType","FeedbackShareBarComponent","formBuilder","EFeedback","intiForm","feedbackBackup","feedbackForm","opinion","onShareOn","shareType","shareOn","closeAllBoxes","onCopyShareUrl","copyShareUrl","sendFeedback","onChangeFeedback","eFeedbackType","LIKE","disable","clearValidators","DISLIKE","enable","setValidators","reset","toggleFeedbackBox","showShareBox","showFeedbackBox","toggleShareBox","onOpenKetcher","isKetcherOpened","closeEvent","onCancelShare","onCancelFeedback","onClickOutside","FileUploaderDialogComponent","fileResponse","exampleFileContent","exampleFileName","onConfirm","FileUploaderComponent","Set","onSelectFiles","transferredFiles","selectedFiles","promises","readFileAndCheckTypePromise","all","filePromiseArray","acceptedFile","acceptedFiles","validFileItems","catch","currentTarget","fileObj","reader","FileReader","readAsArrayBuffer","onload","isExtAllowed","acceptedExtensions","ext","endsWith","isFileSizeAllowed","maxFileSize","onerror","FiltersComponent","EFilterType","filtersForm","dateRange","favorite","minConfidence","MinMaxValidator","maxConfidence","moleculeSelectionType","moleculeSelectionOptions","solvent","catalyst","stepsFrom","stepsTo","creatorFullName","retrosynthesisTypology","synthesisSourceTypology","retrosynthesisSource","disabled","filtersValues","synthesisProcedure","onFiltersFormSubmit","valid","filtersChange","getActiveFilters","closeFilters","onSearch","filterType","search","getSmilesQuery","smilesString","smilesQueryList","onSynthesisSourceTypologyChange","resetFilters","showFilters","overflowMenu","openFilters","shouldCloseFilters","toggleFilters","isFiltersDataLoaded","loadFiltersData","filtersData","showFiltersChange","isOpen","getTime","confidenceRange","smilesQuery","$in","interactive","fromFile","retrosynthesisId","synthesisId","OverflowMenuDirective","FingerprintButtonComponent","onCopyFingerprint","getFingerprint","fingerprint","showFingerprintConfirmMessage","showFingerprintErrorMessage","getElementById","innerText","FullHeightPanelComponent","panelWidth","ngAfterContentChecked","buttonRef","getBoundingClientRect","panelPosition","onTogglePanel","showPanel","togglePanel","onActivateNow","onCancel","simulatorKeyClick","HeaderComponent","hasSidenav","isModal","isLeftSidenavActive","InformationDetailsMenuComponent","KetcherComponent","getSmiles","ketcherDataService","initKetcher","ketcherIframe","contentWindow","initAutosave","initOnChange","afterInitKetcher","molToSet","setMolecule","molToAdd","addFragment","enableAutoSave","autosaveIntervaHandler","setInterval","getMolfile","autoSave","autoSaveInterval","editor","on","change","addSmiles","clearInterval","ElementRef","NewProjectButtonComponent","onNewProject","NoItemsFoundComponent","onOk","confirmDropdown","PaymentMethodDialogComponent","usersServices","paymentsService","userBillingInformationService","isLoading","initPaymentService","paymentService","PaymentService","startSession","isRetry","requestHeader","cssUrl","language","countryCode","orderId","nanoid","customer","city","stateCode","orderAmounts","amount","subscriptionCost","price","isRecurringPayment","walletid","autoSubmit","isWalletManagementSession","fail","callback","hasError","cancel","onClose","walletId","cardBrand","paymentDetails","instrument","authorizationReferenceNumber","authorizationReferenceNumberExtended","autoResize","_angular_core__WEBPACK_IMPORTED_MODULE_10__","PlanComponent","onOpenTrainingCostDetails","TrainingCostDetailDialogComponent","limits","overageTrainingCostRates","onOpenTrainingHoursHelp","TrainingHoursHelpDialogComponent","onChangePlan","changePlan","ReactionImageComponent","ReleaseNotesDialogComponent","actionsService","RenameDialogComponent","onRename","RetrosynthesisQueueStateComponent","retrosynthesisService","queueState","ESearchType","SearchBarComponent","searchData","searchType","isSmiles","searchSub$","_","searchChange","onOpenKetcherFilter","showSmilesOption","onSearchTypeSelected","SearchBillingAddressComponent","placeholder","search$","results","suggestion","addressesDropDown","openMenu","onSelect","valueChange","y","onClear","SearchCollaboratorsComponent","searchCollaboratorsForm","searchTextControl","addCollaborator","removeSelectedCollaboratorsFromList","selectionChanged","resetInput","addCollaboratorByEmail","regexEmail","showUsersList","deleteCollaborator","splice","onClickedOutside","collaboratorsSelectionChange","clearSelectedCollaboratorsList","find","SelectCountryDialogComponent","countries","countryMappings","country1","country2","localeCompare","countryForm","onSaveCountry","selectedCountry","EProjectSelectionMode","SelectOrCreateProjectComponent","projectForm","projectRadio","NEW_PROJECT","selectedProject","EXISTING_PROJECT","addControl","selectedItem","onSelectProject","SequenceBarComponent","SidenavComponent","commonService","loadFavoritesProjects","isFavoriteProjectMenuExpanded","sidenavMenus","expanded","showCookieConsent","cookieBtn","querySelector","isFetchingFavoritesProjects","onCreate","resourceType","onExternalLinkClick","SideNavMenu","SimilarReactionsDocumentsListComponent","viewDocs","similarReactions","paginationModel","similarReaction","currentPage","pageLength","totalDataLength","references","onSelectPage","paginatorIndex","onViewDocument","$event","stopPropagation","selectProjectId","projectGroupValue","source$","_angular_core__WEBPACK_IMPORTED_MODULE_11__","SynthesisExecutionStateComponent","pollingInterval","summary","totalSynthesisByStatus","SynthesisRetrosynthesisInformationComponent","SynthesisStatusIconComponent","TableListExpansionComponent","TmapButtonComponent","bitfLoadAsset","fileUrl","assetElement","getElementsByTagName","getStatusBoxProperties","sequenceNode","buttonProps","fill","isInspectable","textStroke","TreeGraphComponent","elRef","truncDecimalPipe","fontFamily","fontSize","fontWeight","moleculeToolsIcon","smilesText","card","strokeWidth","strokeColor","labelText","toolsBox","icons","zoomStep","minZoom","maxZoom","padding","expand","paddingTop","relativeWidth","readonly","treeData","isFinalized","roborxn","uiConfig","defaultUiConfig","zoomSteps","isTreeEditable","editMode","parseTreeData","showSequenceByIndex","sequenceIndex","previousValue","zoomToFit","selectedMoleculeId","annotationsMode","_this2","loadRappidScripts","initJoint","initTreeGraph","jointInitialised","joint","dia","Element","define","markup","tagName","selector","isTreeGraphInitialised","treeLayout","showEdges","graph","Graph","paper","Paper","paperScroller","PaperScroller","baseWidth","baseHeight","cursor","$el","appendTo","startPanning","linkView","evt","nodeClicked","getTargetElement","attributes","newSequence","isEditable","isExpandable","newRetroResponse","newSequences","edgeClicked","interactiveButtonClicked","toEmit","_this3","source","layout","TreeLayout","parentGap","siblingGap","parsedTreeData","membersAndConnections","members","connections","parseSequence","parentNode","addEdge","siblingRank","moleculeId","moleculeMember","createNode","createLinkBetweenNodes","sequenceNodeChild","sequenceIndexChange","resetCells","currentZoomIndex","findIndex","z","initialZoom","zoom","positionContent","isLeaf","belowBoxVisible","noLeafButtons","belowBox","createBelowBox","belowBoxText","createBelowBoxText","isParentSelected","useFilter","shapes","ibm","attrs","root","opacity","color","blur","stroke","showMoleculesColor","borderColor","pointerEvents","xlinkHref","createInlineSvgImage","lineSeparator","x1","y1","x2","y2","textAnchor","textVerticalAnchor","refY","refX","textWrap","moleculeName","ellipsis","numberOfMoleculesBox","rx","ry","numberOfMoleculesBoxText","editIcon","copyIcon","deleteIcon","offset","isCommercial","belowBoxTextExpand","belowBoxTextSeparator","belowBoxTextCustomExpand","link","standard","Link","line","sourceMarker","d","targetMarker","isLinkBetweenNodes","isChildrenEditable","isChildrenDeletable","isConfidenceComputed","isInvalid","numberOfAnnotations","labelBody","ref","reactionSettingsIcon","preserveAspectRatio","viewAlternativeReactionsIcon","refDx","actionsWarn","actionsWarnBkg","actionsValid","actionsValidBkg","interactiveDeleteIcon","interactiveEditIcon","interactiveAddChildIcon","heatBkg","heatIcon","lightBkg","lightIcon","notesIcon","distance","setZoom","zoomValue","newZoomValue","absolute","TreeLegendComponent","UnsubscribeButtonComponent","datePipe","socketNotificationService","fetchSubscription","subscribeToNotifications","onDeleteSubscription","cancelText","okButtonType","useConfirmDropdown","confirmDropdownLabel","confirmDropdownOptions","subTopic","take","canUnsubscribe","UnsuccessfulPaymentNotificationComponent","onRetryPayment","userResponse","UpgradePlanButtonComponent","UserAccountMenuComponent","UserOverflowMenuComponent","onToggleUserMenu","userMenuOpened","ZoomComponent","zoomOptions","zoomValues","defaultZoomIndex","indexOf","defaultZoomValue","currentZoom","resetToDefault","onZoomIn","emitZoomValue","onZoomOut","onZoomSelected","option","onFitToScreen","fitToScreen","zoomSelected","AvatarDirective","elementRef","ibmAvatar","src","BackgroundAvatarDirective","renderer","ibmBackgroundAvatar","setStyle","ClickOutsideDirective","_el","_ngZone","platformId","_initOnClickBody","_onClickBody","_onWindowBlur","isPlatformBrowser","_init","_removeClickOutsideListener","_removeAttachOutsideOnClickListener","_removeWindowBlurListener","attachOutsideOnClick","exclude","emitOnBlur","clickOutsideEvents","_events","trim","_excludeCheck","_initAttachOutsideOnClickListener","_initWindowBlurListener","delayClickOutsideInit","_initClickOutsideListener","nodes","querySelectorAll","_nodesExcluded","ev","clickOutsideEnabled","excludeBeforeClick","_shouldExclude","_emit","hidden","run","ibmClickOutside","excludedNode","runOutsideAngular","addEventListener","removeEventListener","PLATFORM_ID","ClipboardDirective","copyEvent","dom","trigger","parentElement","DOCUMENT","DraggableResizableDirective","onClick","clickElement","makeInteractive","interact","unset","draggable","listeners","move","updateElement","mutableElement","dx","dy","autoScroll","inertia","modifiers","restriction","endOnly","resizable","edges","bottom","margin","deltaRect","outer","HeapDirective","sendTrackToHeap","track","EAiModelType","EPredictionType","EReactionPropertyPredictionWizardStep","EIngredientType","EAddIngredientWizardStep","FormValidationMessagePipe","errorMessages","FormConstants","ValidationMessageComponent","controlContainer","attachedTo","inputElement","removeAttribute","touched","formSubmitted","formDirective","submitted","ValidationMessageDirective","formField","formControl","unsubscribeAll","view","viewContainer","createEmbeddedView","templateRef","rootNodes","cmpFactory","cfr","errorComponent","validateOnSubmitOnly","statusChangeSubscription","statusChanges","manipulateCSSClasses","submitChangeSubscription","ngSubmit","onSubmit","markAsTouched","pristine","classes","hasInvalid","NativeElementInjectorDirective","control","MatchOtherValidator","otherControlName","currentControl","otherControl","valueChanges$","invalidMatchOther","maxControlName","minControl","maxControl","invalidMinMax","controlGetter","RoboSynthesisStatus","translate","NEW","DONE","charAt","slice","TruncDecimalPipe","decimals","pow","Number","isInteger","CARBON_MODULES","FadeModule","UserAvatarFilledAltModule","AddModule","HomeModule","FoldersModule","StarModule","ChemistryModule","MigrateModule","SankeyDiagramModule","CollaborateModule","EducationModule","LaunchModule","StarFilledModule","VideoModule","SettingsModule","DeleteModule","EmailModule","SendModule","EditModule","CloseFilledModule","ArrowRightModule","ViewModule","CheckmarkFilledModule","ErrorFilledModule","ErrorModule","PauseOutlineFilledModule","StopFilledModule","DraggableModule","DownloadModule","FilterModule","LogoTwitterModule","FaceWinkModule","CloseModule","FaceSatisfiedModule","FaceDissatisfiedModule","ZoomOutModule","ZoomInModule","CopyModule","InformationModule","InformationFilledModule","CopyFileModule","ChartLineSmoothModule","GeneratePdfModule","ChartLineModule","FlowModule","PauseFilledModule","PlayFilledModule","RenewModule","WarningModule","WarningFilledModule","WarningAltFilledModule","DataVis_1Module","ChevronDownModule","InProgressModule","SkipForwardOutlineFilledModule","TimeModule","DashboardModule","SchematicsModule","UserMultipleModule","EventsAltModule","UserAdminModule","UserModule","ReportModule","SaveModule","MachineLearningModelModule","ImageModule","NotebookModule","FingerprintRecognitionModule","ShareModule","IdeaModule","TemperatureHotModule","ChevronUpModule","CameraModule","OpenPanelRightModule","OpenPanelFilledRightModule","HelpModule","CheckboxIconModule","CheckboxCheckedModule","InProgressErrorModule","RocketModule","FitToScreenModule","DocumentViewModule","InProgressWarningModule","DataBaseModule","DragVerticalModule","AddCommentModule","ArrowLeftModule","VisualRecognitionModule","TaskViewModule","TextCreationModule","ArrowsHorizontalModule","SubtractModule","Network_1Module","Network_2Module","Network_3Module","ObjectStorageModule","WalletModule","SideNavModule","HeaderModule","GridModule","DialogModule","PlaceholderModule","ModalModule","NotificationModule","LoadingModule","TableModule","PaginationModule","TagModule","StructuredListModule","SearchModule","SkeletonModule","ButtonModule","DropdownModule","InputModule","DatePickerModule","NumberModule","CheckboxModule","RadioModule","ComboBoxModule","SliderModule","TilesModule","SelectModule","ListModule","TabsModule","ProgressIndicatorModule","ProgressBarModule","FileUploaderModule","InlineLoadingModule","AccordionModule","ToggleModule","IconModule","BreadcrumbModule","ModalCloseButtonComponent","FileUploadLoaderComponent","ANGULAR_CDK_MODULES","DragDropModule","UpgradePlanDialogComponent","onUpgradePlan","PlanForecastNotificationComponent","planForecast","filterByType","condition","getLocalStorageKey","String","limitToShow","BytesToSizePipe","dimension","parseInt","SHARED_MODULES","CommonModule","ReactiveFormsModule","FormsModule","RouterModule","SHARED_PIPES","SharedModule","ngModule","providers","imports","fade","hostUrl","production","appName","storageVersion","wsUrl","userProfileUrl","upgradeUrl","plansEnabled","ecommerceEnabled","authInterceptorUrl","logUrl","fbAppId","httpRetryConfig","enabled","verbs","maxRetries","retryForStatusesCodes","loggerConfig","maxLogRentention","logHttpErrorsWithStatusesCodes","logDecoratedExceptions","logExceptions","heapAnalyticsEnabled","ibmHeapId","NotFoundComponent","LogoutComponent","RedirectComponent","genericService","snapshot","redirectTo","navigateByUrl","errorRedirect","GetAuthTokenComponent","activatedRoute","queryParamMap","userIsBlocked","MainLayoutComponent","onResize","innerWidth","isLeftSidenavVisible","isFullscreen","node","fullscreen","firstChild","TermsOfUseComponent","routes","pathMatch","loadChildren","__webpack_require__","ProjectsModule","RoboRxnModule","LearnModule","SubscriptionModule","AccountModule","ActionsModule","StreamingModule","CollaboratorsModule","PublicModule","AdminModule","TmapModule","ModelTunerModule","OpticalChemicalRecognitionModule","AppRoutingModule","paramsInheritanceStrategy","anchorScrolling","scrollOffset","FooterComponent","LoginModule","isCallingApi","req","ApiUiMessagesInterceptor","intercept","HttpResponse","parseUiMessages","messageTypes","messageType","parseUiMessageByType","uiMessage","OAuthInterceptor","isCallingLoginEndpoints","authReq","clone","RetryInterceptor","config","retryAttempt","mergeMap","shouldRetryForStatus","shouldRetryAgain","shouldRetryOnTimeout","MessageAfterLoginComponent","onOK","enrollUpdates","DplFailComponent","CoreModule","parentModule","throwIfAlreadyLoaded","moduleName","provide","HTTP_INTERCEPTORS","useClass","multi","BrowserModule","HttpClientModule","MessagesAfterLoginService","showMessages","releaseNotes","AppComponent","messagesAfterLoginService","documentElement","setProperty","innerHeight","AppModule","bootstrap","enableProdMode","__NgCli_bootstrap_1","bootstrapModule","module","webpackContext"],"sourceRoot":"webpack:///","sources":["./src/app/configs/configs.ts","./src/app/core/services/api/models-mapper/models-mapper.strategy.ts","./src/app/core/components/fullscreen-loading/fullscreen-loading.component.ts","./src/app/core/components/fullscreen-loading/fullscreen-loading.component.html","./src/app/core/components/super-modal/super-modal.component.ts","./src/app/core/models/collaborator.model.ts","./src/app/core/models/group.model.ts","./src/app/core/models/molecule.model.ts","./src/app/core/models/reaction.model.ts","./src/app/core/models/retrosynthesis-molecule.model.ts","./src/app/core/models/retrosynthesis-sequence.model.ts","./src/app/core/models/retrosynthesis.model.ts","./src/app/core/models/reactor.model.ts","./src/app/core/models/prediction-task.model.ts","./src/app/core/models/login.model.ts","./src/app/core/models/reagent.model.ts","./src/app/core/models/challenge.model.ts","./src/app/core/models/challenge-result.model.ts","./src/app/core/models/invitation.model.ts","./src/app/core/models/challenges-results-stats.model.ts","./src/app/core/models/retrosynthesis-wizard-config.model.ts","./src/app/core/models/action.model.ts","./src/app/core/models/retrosynthesis-sibling.model.ts","./src/app/core/models/queue-state.model.ts","./src/app/core/models/roborxn-config.model.ts","./src/app/core/models/action-schema.model.ts","./src/app/core/models/roborxn-summary.model.ts","./src/app/core/models/latest-synthesis.model.ts","./src/app/core/models/ai-training-model.ts","./src/app/core/models/ai-training-file.ts","./src/app/core/models/similar-reaction.model.ts","./src/app/core/models/synthesis-execution.model.ts","./src/app/core/models/synthesis-procedure.model.ts","./src/app/core/models/tmap.model.ts","./src/app/core/models/tmap-reaction.model.ts","./src/app/core/models/tune-rxn-config.model.ts","./src/app/core/models/file-entry.model.ts","./src/app/core/models/activity.model.ts","./src/app/core/models/optical-chemical-recognition.model.ts","./src/app/core/models/reaction-settings-ingredient.model.ts","./src/app/core/models/reaction-settings.model.ts","./src/app/core/models/synthesis-annotation.model.ts","./src/app/core/models/reaction-property-prediction.model.ts","./src/app/core/models/reaction-completion.model.ts","./src/app/core/models/reaction-completion-prediction.model.ts","./src/app/core/models/country.model.ts","./src/app/core/models/subscription.model.ts","./src/app/core/models/plan-forecast.interface.ts","./src/app/core/models/socket-notification.model.ts","./src/app/core/models/user-billing-information.model.ts","./src/app/core/models/user-plan-usage.model.ts","./src/app/core/models/subscription-cost.model.ts","./src/app/core/models/billing-overview.model.ts","./src/app/core/models/subscription-team.model.ts","./src/app/core/models/plan.model.ts","./src/app/core/models/project.model.ts","./src/app/core/models/super-model.model.ts","./src/app/core/models/synthesis-super.model.ts","./src/app/core/models/user.model.ts","./src/app/core/services/api/actions.service.ts","./src/app/core/services/api/activities.service.ts","./src/app/core/services/api/admin.service.ts","./src/app/core/services/api/ai-models.service.ts","./src/app/core/services/api/ai-training-models.service.ts","./src/app/core/services/api/ai-training-files.service.ts","./src/app/core/services/api/reaction-property-prediction.service.ts","./src/app/core/services/api/plans.service.ts","./src/app/core/services/api/addresses.service.ts","./src/app/core/services/api/billings.service.ts","./src/app/core/services/api/subscriptions-team.service.ts","./src/app/core/services/api/api.service.ts","./src/app/core/services/api/attempts.service.ts","./src/app/core/services/api/challenges-results.service.ts","./src/app/core/services/api/challenges.service.ts","./src/app/core/services/api/collaborators.service.ts","./src/app/core/services/api/drafts.service.ts","./src/app/core/services/api/email.service.ts","./src/app/core/services/api/file-entries.service.ts","./src/app/core/services/api/groups.service.ts","./src/app/core/services/api/hubspot.service.ts","./src/app/core/services/api/config.service.ts","./src/app/core/services/api/retrosynthesis-snapshot.service.ts","./src/app/core/services/api/common.service.ts","./src/app/core/services/api/molecules.service.ts","./src/app/core/services/api/optical-chemical-recognition.service.ts","./src/app/core/services/api/paragraph-to-actions.service.ts","./src/app/core/services/api/payments.service.ts","./src/app/core/services/api/projects.service.ts","./src/app/core/services/api/reactions-collection.service.ts","./src/app/core/services/api/reactions.service.ts","./src/app/core/services/api/reagents.service.ts","./src/app/core/services/api/retrosynthesis-sequences.service.ts","./src/app/core/services/retrosynthesis-polling.ts","./src/app/core/services/api/retrosynthesis.service.ts","./src/app/core/services/api/roborxn.service.ts","./src/app/core/services/api/subscriptions.service.ts","./src/app/core/services/api/synthesis-executions.service.ts","./src/app/core/services/api/synthesis-procedures.service.ts","./src/app/core/services/api/user-billing-informations.service.ts","./src/app/core/services/api/users.service.ts","./src/app/core/services/app-session.service.ts","./src/environments/version.ts","./src/app/core/services/dialog/dialog.enum.ts","./src/app/core/services/dialog/dialog.service.ts","./src/app/core/services/event-tracking/event-tracking.service.ts","./src/app/core/services/social/social-fb.service.ts","./src/app/core/services/social/social-google.service.ts","./src/app/core/services/shared-data/ketcher-data.service.ts","./src/app/core/services/synthesis-reaction-settings.service.ts","./src/app/core/services/socket-notification.service.ts","./src/app/core/services/socket.service.ts","./src/app/core/services/toast-messages/toast-message.enum.ts","./src/app/core/services/toast-messages/toast-messages.service.ts","./src/app/libs/bitforce/api/api-super.service.ts","./src/app/libs/bitforce/api/api.interfaces.ts","./src/app/libs/bitforce/api/parsers/default-parser/default-response-parser.ts","./src/app/libs/bitforce/api/parsers/default-parser/default-request-parser.ts","./src/app/libs/bitforce/api/parsers/index.ts","./src/app/libs/bitforce/components/ui/loader/loader.model.ts","./src/app/libs/bitforce/components/ui/loader/loader.service.ts","./src/app/libs/bitforce/components/ui/loader/loader.component.html","./src/app/libs/bitforce/components/ui/loader/loader.component.ts","./src/app/libs/bitforce/guards/auth.guard.ts","./src/app/libs/bitforce/guards/ecommerce.guard.ts","./src/app/libs/bitforce/pipes/bitf-safe-html.pipe.ts","./src/app/libs/bitforce/services/auth/super-auth.service.ts","./src/app/libs/bitforce/decorators/try-catch.decorator.ts","./src/app/libs/bitforce/services/auth/auth.service.ts","./src/app/libs/bitforce/services/generic/generic.service.ts","./src/app/libs/bitforce/services/logger/logger.service.ts","./src/app/libs/bitforce/services/error-handler/error-handler.service.ts","./src/app/libs/bitforce/utils/files.lib.ts","./src/app/libs/bitforce/utils/mongo-utils.ts","./src/app/modules/login/sign-in/sign-in.component.ts","./src/app/modules/login/sign-in/sign-in.component.html","./src/app/modules/smiles-editor/smiles-editor-dialog/smiles-editor-dialog.component.ts","./src/app/modules/smiles-editor/smiles-editor-dialog/smiles-editor-dialog.component.html","./src/app/modules/smiles-editor/smiles-editor-header/smiles-editor-header.component.ts","./src/app/modules/smiles-editor/smiles-editor-header/smiles-editor-header.component.html","./src/app/modules/smiles-editor/smiles-editor-textual/smiles-editor-textual.component.ts","./src/app/modules/smiles-editor/smiles-editor-textual/smiles-editor-textual.component.html","./src/app/modules/smiles-editor/smiles-editor/smiles-editor.component.ts","./src/app/modules/smiles-editor/smiles-editor/smiles-editor.component.html","./src/app/modules/smiles-editor/smiles-editor/smiles-editor.enum.ts","./src/app/shared/common-utilities/bytes-converter.ts","./src/app/shared/common-utilities/clipboard.ts","./src/app/shared/common-utilities/siblings-to-sequence.ts","./src/app/shared/common-utilities/svg-to-url.ts","./src/app/shared/components/admin-sidenav/admin-sidenav.component.html","./src/app/shared/components/admin-sidenav/admin-sidenav.component.ts","./src/app/shared/components/ai-model-selection-dialog/ai-model-selection-dialog.component.ts","./src/app/shared/components/ai-model-selection-dialog/ai-model-selection-dialog.component.html","./src/app/shared/components/close-button/close-button.component.ts","./src/app/shared/components/close-button/close-button.component.html","./src/app/shared/components/copy-smiles-dialog/copy-smiles-dialog.component.ts","./src/app/shared/components/copy-smiles-dialog/copy-smiles-dialog.component.html","./src/app/shared/components/create-project-dialog/create-project-dialog.component.html","./src/app/shared/components/create-project-dialog/create-project-dialog.component.ts","./src/app/shared/components/create-retrosynthesis-wizard-dialog/create-retrosynthesis-wizard-dialog.component.html","./src/app/shared/components/create-retrosynthesis-wizard-dialog/create-retrosynthesis-wizard-dialog.component.ts","./src/app/shared/components/create-synthesis-wizard-dialog/create-synthesis-wizard-dialog.component.html","./src/app/shared/components/create-synthesis-wizard-dialog/create-synthesis-wizard-dialog.component.ts","./src/app/shared/components/download-file-entry-button/download-file-entry-button.component.html","./src/app/shared/components/download-file-entry-button/download-file-entry-button.component.ts","./src/app/shared/components/dropdown-menu/dropdown-menu.component.html","./src/app/shared/components/dropdown-menu/dropdown-menu.component.ts","./src/app/shared/components/feedback-share-bar/feedback-share-bar.component.html","./src/app/shared/components/feedback-share-bar/feedback-share-bar.component.ts","./src/app/shared/components/file-uploader-dialog/file-uploader-dialog.component.html","./src/app/shared/components/file-uploader-dialog/file-uploader-dialog.component.ts","./src/app/shared/components/file-uploader/file-uploader.component.ts","./src/app/shared/components/file-uploader/file-uploader.component.html","./src/app/shared/components/filters/filters.component.html","./src/app/shared/components/filters/filters.component.ts","./src/app/shared/components/fingerprint-button/fingerprint-button.component.html","./src/app/shared/components/fingerprint-button/fingerprint-button.component.ts","./src/app/shared/components/full-height-panel/full-height-panel.component.ts","./src/app/shared/components/full-height-panel/full-height-panel.component.html","./src/app/shared/components/get-roborxn-key/get-roborxn-key-dialog.component.ts","./src/app/shared/components/get-roborxn-key/get-roborxn-key-dialog.component.html","./src/app/shared/components/header/header.component.html","./src/app/shared/components/header/header.component.ts","./src/app/shared/components/information-details-menu/information-details-menu.component.html","./src/app/shared/components/information-details-menu/information-details-menu.component.ts","./src/app/shared/components/ketcher/ketcher.component.ts","./src/app/shared/components/ketcher/ketcher.component.html","./src/app/shared/components/new-project-button/new-project-button.component.ts","./src/app/shared/components/new-project-button/new-project-button.component.html","./src/app/shared/components/no-items-found/no-items-found.component.html","./src/app/shared/components/no-items-found/no-items-found.component.ts","./src/app/shared/components/ok-cancel-dialog/ok-cancel-dialog.component.html","./src/app/shared/components/ok-cancel-dialog/ok-cancel-dialog.component.ts","./src/app/shared/components/payment-method-dialog/payment-method-dialog.component.html","./src/app/shared/components/payment-method-dialog/payment-method-dialog.component.ts","./src/app/shared/components/plan/plan.component.html","./src/app/shared/components/plan/plan.component.ts","./src/app/shared/components/reaction-image/reaction-image.component.html","./src/app/shared/components/reaction-image/reaction-image.component.ts","./src/app/shared/components/release-notes-dialog/release-notes-dialog.component.ts","./src/app/shared/components/release-notes-dialog/release-notes-dialog.component.html","./src/app/shared/components/rename-dialog/rename-dialog.component.html","./src/app/shared/components/rename-dialog/rename-dialog.component.ts","./src/app/shared/components/retrosynthesis-queue-state/retrosynthesis-queue-state.component.html","./src/app/shared/components/retrosynthesis-queue-state/retrosynthesis-queue-state.component.ts","./src/app/shared/components/search-bar/search-bar.enum.ts","./src/app/shared/components/search-bar/search-bar.component.html","./src/app/shared/components/search-bar/search-bar.component.ts","./src/app/shared/components/search-billing-address/search-billing-address.component.html","./src/app/shared/components/search-billing-address/search-billing-address.component.ts","./src/app/shared/components/search-collaborators/search-collaborators.component.html","./src/app/shared/components/search-collaborators/search-collaborators.component.ts","./src/app/shared/components/select-country-dialog/select-country-dialog.component.html","./src/app/shared/components/select-country-dialog/select-country-dialog.component.ts","./src/app/shared/components/select-or-create-project/select-or-create-project.component.ts","./src/app/shared/components/select-or-create-project/select-or-create-project.component.html","./src/app/shared/components/select-project-dialog/select-project-dialog.component.ts","./src/app/shared/components/select-project-dialog/select-project-dialog.component.html","./src/app/shared/components/sequence-bar/sequence-bar.component.html","./src/app/shared/components/sequence-bar/sequence-bar.component.ts","./src/app/shared/components/sidenav/sidenav.component.html","./src/app/shared/components/sidenav/sidenav.component.ts","./src/app/shared/components/similar-reactions-documents-list/similar-reactions-documents-list.component.html","./src/app/shared/components/similar-reactions-documents-list/similar-reactions-documents-list.component.ts","./src/app/shared/components/super-wizard/super-wizard.component.ts","./src/app/shared/components/synthesis-execution-state/synthesis-execution-state.component.html","./src/app/shared/components/synthesis-execution-state/synthesis-execution-state.component.ts","./src/app/shared/components/synthesis-retrosynthesis-information/synthesis-retrosynthesis-information.component.html","./src/app/shared/components/synthesis-retrosynthesis-information/synthesis-retrosynthesis-information.component.ts","./src/app/shared/components/synthesis-status-icon/synthesis-status-icon.component.html","./src/app/shared/components/synthesis-status-icon/synthesis-status-icon.component.ts","./src/app/shared/components/table-list-expansion/table-list-expansion.component.ts","./src/app/shared/components/table-list-expansion/table-list-expansion.component.html","./src/app/shared/components/tmap-button/tmap-button.component.ts","./src/app/shared/components/tmap-button/tmap-button.component.html","./src/app/shared/components/training-cost-detail-dialog/training-cost-detail-dialog.component.html","./src/app/shared/components/training-cost-detail-dialog/training-cost-detail-dialog.component.ts","./src/app/shared/components/training-hours-help-dialog/training-hours-help-dialog.component.ts","./src/app/shared/components/training-hours-help-dialog/training-hours-help-dialog.component.html","./src/app/libs/bitforce/utils/bitf-assets-loading.lib.ts","./src/app/shared/components/tree-graph/status-box-helper.ts","./src/app/shared/components/tree-graph/tree-graph.component.html","./src/app/shared/components/tree-graph/tree-graph.component.ts","./src/app/shared/components/tree-legend/tree-legend.component.html","./src/app/shared/components/tree-legend/tree-legend.component.ts","./src/app/shared/components/unsubscribe-button/unsubscribe-button.component.html","./src/app/shared/components/unsubscribe-button/unsubscribe-button.component.ts","./src/app/shared/components/unsuccessful-payment-notification/unsuccessful-payment-notification.component.html","./src/app/shared/components/unsuccessful-payment-notification/unsuccessful-payment-notification.component.ts","./src/app/shared/components/upgrade-plan-button/upgrade-plan-button.component.html","./src/app/shared/components/upgrade-plan-button/upgrade-plan-button.component.ts","./src/app/shared/components/user-account-menu/user-account-menu.component.ts","./src/app/shared/components/user-account-menu/user-account-menu.component.html","./src/app/shared/components/user-overflow-menu/user-overflow-menu.component.html","./src/app/shared/components/user-overflow-menu/user-overflow-menu.component.ts","./src/app/shared/components/zoom/zoom.component.html","./src/app/shared/components/zoom/zoom.component.ts","./src/app/shared/directives/avatar.directive.ts","./src/app/shared/directives/click-outside.directive.ts","./src/app/shared/directives/clipboard.directive.ts","./src/app/shared/directives/draggable-resizable.directive.ts","./src/app/shared/directives/heap.directive.ts","./src/app/shared/enums/activity.enum.ts","./src/app/shared/enums/ai-model.enum.ts","./src/app/shared/enums/feedback.enum.ts","./src/app/shared/enums/filters.enum.ts","./src/app/shared/enums/reaction-property-prediction.ts","./src/app/shared/enums/reaction-settings-ingredient.enum.ts","./src/app/shared/enums/table-list.enum.ts","./src/app/shared/form-utilities/form-validation-message.pipe.ts","./src/app/shared/form-utilities/form.constants.ts","./src/app/shared/form-utilities/validation-message/validation-message.component.html","./src/app/shared/form-utilities/validation-message/validation-message.component.ts","./src/app/shared/form-utilities/validation-message.directive.ts","./src/app/shared/form-utilities/native-element-injector.directive.ts","./src/app/shared/form-utilities/validators/match.validator.ts","./src/app/shared/form-utilities/validators/minmax.validator.ts","./src/app/shared/form-utilities/validators/required-if.validator.ts","./src/app/shared/pipes/robo-synthesis-status.pipe.ts","./src/app/shared/pipes/trunc-decimal.pipe.ts","./src/app/shared/carbon-modules.ts","./src/app/shared/components/modal-close-button/modal-close-button.component.ts","./src/app/shared/components/modal-close-button/modal-close-button.component.html","./src/app/shared/components/file-upload-loader/file-upload-loader.component.ts","./src/app/shared/components/file-upload-loader/file-upload-loader.component.html","./src/app/shared/angular-cdk-modules.ts","./src/app/shared/components/upgrade-plan-dialog/upgrade-plan-dialog.component.html","./src/app/shared/components/upgrade-plan-dialog/upgrade-plan-dialog.component.ts","./src/app/shared/components/plan-forecast-notification/plan-forecast-notification.component.html","./src/app/shared/components/plan-forecast-notification/plan-forecast-notification.component.ts","./src/app/shared/pipes/bytes-to-size.pipe.ts","./src/app/shared/shared.module.ts","./src/environments/environment.production.ts","./src/app/core/components/not-found/not-found.component.ts","./src/app/core/components/not-found/not-found.component.html","./src/app/modules/login/logout/logout.component.ts","./src/app/libs/bitforce/components/functional/redirect/redirect.component.ts","./src/app/libs/bitforce/components/functional/get-auth-token/get-auth-token.component.ts","./src/app/libs/bitforce/components/functional/get-auth-token/get-auth-token.component.html","./src/app/core/components/main-layout/main-layout.component.html","./src/app/core/components/main-layout/main-layout.component.ts","./src/app/core/components/terms-of-use/terms-of-use.component.ts","./src/app/core/components/terms-of-use/terms-of-use.component.html","./src/app/app-routing.module.ts","./src/app/core/components/footer/footer.component.ts","./src/app/core/components/footer/footer.component.html","./src/app/modules/login/login.module.ts","./src/app/libs/bitforce/utils/url-utils.ts","./src/app/libs/bitforce/interceptors/api-ui-messages-interceptor.service.ts","./src/app/libs/bitforce/interceptors/oauth-interceptor.service.ts","./src/app/libs/bitforce/interceptors/retry-interceptor.service.ts","./src/app/core/components/message-after-login/message-after-login.component.ts","./src/app/core/components/message-after-login/message-after-login.component.html","./src/app/core/components/dpl-fail/dpl-fail.component.ts","./src/app/core/components/dpl-fail/dpl-fail.component.html","./src/app/core/core.module.ts","./src/app/core/module-config.ts","./src/app/core/services/messages-after-login.service.ts","./src/app/app.component.ts","./src/app/app.component.html","./src/app/app.module.ts","./src/main.ts","./node_modules/@mpcheckout/checkout-cbr-library/country-business-rules/ sync ^\\.\\/.*\\.json$"],"sourcesContent":["import { modelsMapperStrategy } from '@services/api/models-mapper/models-mapper.strategy';\nimport * as defaultParser from '@bitf/api/parsers/default-parser';\n\nimport { SignInComponent } from '@modules/login/sign-in/sign-in.component';\nimport { FullscreenLoadingComponent } from '@app/core/components/fullscreen-loading/fullscreen-loading.component';\nimport { environment } from '@env/environment';\n\nconst redirectUrl = new URL(environment.redirectUrl);\n\nexport const configs: any = {\n general: { homePageUrl: '/', loginUrl: '/sign-in' },\n parser: { modelsMapperStrategy, parserStrategy: { defaultParser } },\n guard: {\n checkUserRoutePermission: (state, authService) => {\n if (!state.url.includes('/admin')) {\n return true;\n }\n if (authService.user.isAdmin) {\n return true;\n }\n return false;\n },\n },\n loaderService: { customLoader: { component: FullscreenLoadingComponent, params: { fixed: true } } },\n authService: {\n tokenQueryParmName: 'code',\n localStorageTokenName: 'authToken',\n localStorageRefreshTokenName: 'refreshToken',\n getGenerateTokenApiConfig: token => ({\n method: 'GET',\n params: { code: token, redirectUri: redirectUrl.searchParams.get('redirect_uri') },\n }),\n },\n getAuthTokenComponent: { signInComponent: SignInComponent },\n};\n","import * as Models from '@models/index';\n\n// NOTE every new model / entity needs to be registered here\nexport const modelsMapperStrategy = (item, entityName) => {\n switch (entityName) {\n case 'activities':\n return new Models.Activity(item);\n case 'countries':\n return new Models.Country(item);\n case 'attempts':\n return new Models.Reaction(item);\n case 'collaborators':\n return new Models.Collaborator(item);\n case 'drafts':\n return new Models.Reaction(item);\n case 'molecules':\n return new Models.Molecule(item);\n case 'projects':\n return new Models.Project(item);\n case 'reactions-collection':\n return new Models.Reaction(item);\n case 'reactions':\n return new Models.Reaction(item);\n case 'users':\n return new Models.User(item);\n case 'prediction-task':\n return new Models.PredictionTask(item);\n case 'predictions':\n return new Models.PredictionTask(item);\n case 'login':\n return new Models.Login(item);\n case 'reagents':\n return new Models.Reagent(item);\n case 'get-random-challenge':\n case 'challenges':\n return new Models.Challenge(item);\n case 'challenges-results':\n return new Models.ChallengeResult(item);\n case 'invitations':\n return new Models.Invitation(item);\n case 'stats':\n case 'challenges-results/stats':\n return new Models.ChallengesResultsStats(item);\n case 'retrosynthesis/config':\n return new Models.RetrosynthesisWizardConfig(item);\n case 'retrosynthesis':\n case 'create-from-sequence':\n case 'expand-molecule':\n case 'create-from-paragraph':\n case 'retrosynthesis-snapshots':\n case 'retrosynthesis-attempt':\n case 'retrosynthesis-with-procedures':\n return new Models.Retrosynthesis(item);\n case 'synthesis':\n return new Models.SynthesisProcedure(item);\n case 'synthesis-executions':\n return new Models.SynthesisExecution(item);\n case 'synthesis/latest':\n return new Models.LatestSynthesis(item);\n case 'retrosynthesis-collection':\n case 'sequences':\n return new Models.RetrosynthesisSequence(item);\n case 'sequence-molecule':\n case 'node':\n return new Models.RetrosynthesisMolecule(item);\n case 'queue-state':\n return new Models.QueueState(item);\n case 'config':\n return new Models.RoboRxnConfig(item);\n case 'tune-rxn':\n return new Models.TuneRxnConfig(item);\n case 'status':\n return new Models.RoboRxnSummary(item);\n case 'actions-schema':\n return new Models.ActionSchema(item);\n case 'user-groups':\n return new Models.Group(item);\n case 'ai-training-models':\n return new Models.AiTrainingModel(item);\n case 'ai-training-files':\n return new Models.AiTrainingFile(item);\n case 'similar-reactions':\n return new Models.SimilarReaction(item);\n case 'tmap-reaction':\n return new Models.TmapReaction(item);\n case 'tmap':\n return new Models.Tmap(item);\n case 'file-entries':\n return new Models.FileEntry(item);\n case 'ingredients':\n return new Models.ReactionSettingsIngredient(item);\n case 'reaction-settings':\n return new Models.ReactionSettings(item);\n case 'reaction-properties-predictions':\n return new Models.ReactionPropertyPrediction(item);\n case 'annotations':\n return new Models.SynthesisAnnotation(item);\n case 'reaction-completion-predictions':\n return new Models.ReactionCompletionPrediction(item);\n case 'reaction-completions':\n return new Models.ReactionCompletion(item);\n case 'optical-chemical-recognition':\n return new Models.OpticalChemicalRecognition(item);\n case 'plans':\n return new Models.Plan(item);\n case 'user-billing-informations':\n return new Models.UserBillingInformation(item);\n case 'user-plan-usage':\n return new Models.UserPlanUsage(item);\n case 'subscriptions':\n return new Models.Subscription(item);\n case 'subscription-cost':\n return new Models.SubscriptionCost(item);\n case 'billing-overview':\n return new Models.BillingOverview(item);\n case 'socket-notifications':\n return new Models.SocketNotification(item);\n case 'subscription-team':\n return new Models.SubscriptionTeam(item);\n case 'optical-chemical-recognition-reaction-tree':\n case 'paragraph-actions':\n case 'like':\n case 'feedback':\n case 'emulate-status':\n case 'chemicals':\n case 'ai-models':\n case 'ai-model-categories':\n case 'share':\n case 'file-entries':\n case 'ingredient-categories':\n case 'hardware-settings':\n case 'molecule-information':\n case 'user-plan-limits':\n case 'address-lookup':\n case 'address-format':\n case 'payment-method':\n case 'plan-forecast':\n case 'plan-level':\n case 'payments':\n case '':\n return item;\n default:\n throw new Error(`No model mapper found for entity: ${entityName}`);\n }\n};\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'ibm-fullscreen-loading',\n templateUrl: './fullscreen-loading.component.html',\n styleUrls: ['./fullscreen-loading.component.scss'],\n})\nexport class FullscreenLoadingComponent implements OnInit {\n constructor() {}\n\n ngOnInit(): void {}\n}\n","<ibm-loading [isActive]=\"true\"\n [size]=\"'normal'\"\n [overlay]=\"true\"></ibm-loading>","import { AfterViewInit, Component, ViewChild } from '@angular/core';\nimport { BaseModal, Modal } from 'carbon-components-angular';\n@Component({ template: '' })\nexport abstract class SuperModalComponent extends BaseModal implements AfterViewInit {\n @ViewChild(Modal) modal!: Modal;\n disabledHandleKeyboardEvent: boolean;\n\n ngAfterViewInit() {\n if (!this.modal) {\n throw new Error('Modal not found');\n }\n if (this.disabledHandleKeyboardEvent) {\n // disable keyboard events, ESC and TAB\n this.modal.handleKeyboardEvent = () => {};\n }\n }\n}\n","import { SuperModel } from '@models/super-model.model';\nimport { User } from '@models/user.model';\n\nexport class Collaborator extends SuperModel {\n user: User;\n totalProjects: number;\n\n constructor(collaborator = {}) {\n super(collaborator);\n\n if (this.user) {\n this.user = new User(this.user);\n }\n }\n\n get serialised() {\n return {\n id: this.id,\n user: this.user && this.user.serialised,\n };\n }\n}\n","import { SuperModel } from '@models/super-model.model';\n\nexport class Group extends SuperModel {\n name: string;\n description: string;\n isDefault: boolean;\n canAddUser: boolean;\n canDeleteUser: boolean;\n isDeletable: boolean;\n totalUsers: number;\n settings: GroupSettings;\n createdOnDate: Date;\n\n constructor(payload: Partial<Group> = {}) {\n super(payload);\n\n this.settings = new GroupSettings(this.settings || {});\n this.createdOnDate = new Date(this.createdOn as any);\n if (this.canAddUser === undefined) {\n this.canAddUser = true;\n }\n }\n\n get nameWithDefault() {\n return this.name + (this.isDefault ? ' (default)' : '');\n }\n\n get serialised() {\n return {\n id: this.id,\n name: this.name,\n description: this.description,\n settings: this.settings.serialised,\n };\n }\n}\n\nexport class GroupSettings extends SuperModel {\n aiModels: { [key: string]: string[] };\n apiLimitEnabled: boolean;\n apiMaxCallPerMinute: number;\n apiMinTimeBetweenCall: number;\n\n constructor(payload: Partial<GroupSettings> = {}) {\n super(payload);\n\n this.aiModels = this.aiModels || { reaction: [], retrosynthesis: [] };\n }\n\n get serialised() {\n return {\n id: this.id,\n aiModels: this.aiModels,\n apiLimitEnabled: this.apiLimitEnabled,\n apiMaxCallPerMinute: this.apiMaxCallPerMinute,\n apiMinTimeBetweenCall: this.apiMinTimeBetweenCall,\n };\n }\n}\n","import { EPredictionLibrary } from '@app/shared/enums/reaction-property-prediction';\nimport { SuperModel } from '@models/super-model.model';\nimport { svgToUrl, ISvgToUrl } from '@shared/common-utilities/svg-to-url';\n\nexport class Molecule extends SuperModel {\n name: string;\n smiles: string;\n moleculeName: string;\n reactionsCount?: number;\n moleculeImage?: string;\n metaData?: any;\n library?: EPredictionLibrary;\n\n constructor(molecule = {}) {\n super(molecule);\n }\n\n get moleculeImageSvg(): ISvgToUrl {\n return svgToUrl(this.moleculeImage, this.library);\n }\n\n get serialised() {\n return {\n id: this.id,\n name: this.name,\n smiles: this.smiles,\n reactionsCount: this.reactionsCount,\n };\n }\n}\n","import { SuperModel } from './super-model.model';\nimport { svgToUrl, ISvgToUrl } from '@shared/common-utilities/svg-to-url';\nimport { IFeedback } from '@app/core/models';\nimport { Molecule } from './molecule.model';\n\nexport class Reaction extends SuperModel {\n attentionWeights: string;\n confidence: number;\n isConfidenceComputed?: boolean;\n message: string;\n smiles: string;\n firstAttempt: boolean;\n name: string;\n totaltime?: string;\n mol: string;\n attemptId?: string;\n predictionId?: string;\n feedback: IFeedback;\n isFavorite: boolean;\n\n isDeletable: boolean;\n isRenameable: boolean;\n isThermal: boolean;\n isPhotochemical: boolean;\n isAiModelDeleted: boolean;\n canAddToCollection: boolean;\n productMolecule: Molecule;\n precursorSmiles: string;\n datasetName: string;\n precursorMolecules: Molecule[];\n\n fieldsToCopy: Array<string> = [\n 'attentionWeights',\n 'confidence',\n 'message',\n 'reactionImage',\n 'smiles',\n 'firstAttempt',\n 'name',\n 'predictionId',\n ];\n\n constructor(data: any = {}) {\n super(data);\n if (data['attemptDTO']) {\n this.fieldsToCopy.forEach((field: string) => (this[field] = data['attemptDTO'][field]));\n this.attemptId = data['attemptDTO'].id;\n }\n\n if (data.productMolecule) {\n this.productMolecule = new Molecule(data.productMolecule);\n }\n\n if (data.precursorMolecules) {\n this.precursorMolecules = data.precursorMolecules.map(\n precursorMolecules => new Molecule(precursorMolecules)\n );\n }\n }\n\n get attentionWeightsSvg(): ISvgToUrl {\n return svgToUrl(this.attentionWeights);\n }\n\n get creatorName() {\n if (typeof this.createdBy === 'object') {\n return this.createdBy.fullName;\n }\n return this.createdBy;\n }\n\n get serialised() {\n return {\n id: this.id,\n attentionWeights: this.attentionWeights,\n confidence: this.confidence,\n message: this.message,\n smiles: this.smiles,\n };\n }\n}\n","import { SuperModel } from '@models/super-model.model';\nimport { IFeedback } from './retrosynthesis-sequence.model';\nimport { Action } from './action.model';\nimport { Molecule } from '.';\n\nexport class RetrosynthesisMolecule extends Molecule {\n moleculeId?: string;\n siblingId?: string;\n confidence?: string;\n isConfidenceComputed?: boolean;\n hasFeedback?: boolean;\n feedback?: IFeedback;\n label?: string;\n reactionSmiles?: string;\n moleculeImage?: string;\n metaData?: {\n borderColor?: string;\n };\n children?: RetrosynthesisMolecule[];\n parent?: RetrosynthesisMolecule;\n rclass: string;\n\n isExpandable?: boolean;\n isInspectable?: boolean;\n isEditable?: boolean;\n isDeletable?: boolean;\n isChildrenEditable?: boolean;\n isChildrenDeletable?: boolean;\n isValid?: boolean;\n isThermal?: boolean;\n isPhotochemical?: boolean;\n isTouched?: boolean;\n isFromFile?: boolean;\n numberOfAnnotations: number;\n\n initialActions: Action[];\n actions: Action[];\n status: SequenceStatus;\n completionPercentage?: number;\n remainingTime?: number;\n reactors: number[];\n statusDetails: string;\n statusLogs?: StatusLog[];\n custom?: boolean;\n productMassAndReactionInformation: {\n stoichiometryFactor: number;\n };\n count: number; // number of duplicates\n\n constructor(data: any = {}) {\n super(data);\n this.children = (data.children || []).map(m => new RetrosynthesisMolecule({ ...m, parent: this }));\n if (this.actions) {\n this.actions = this.actions.map(a => new Action(a));\n }\n if (this.initialActions) {\n this.initialActions = this.initialActions.map(a => new Action(a));\n }\n if (this.statusLogs) {\n this.statusLogs = this.statusLogs.map(e => new StatusLog(e));\n }\n\n this.reactors = this.reactors || [];\n this.isValid = data.isValid !== false;\n }\n\n get isParentValid() {\n return !this.parent || (this.parent?.isValid && this.parent?.isParentValid);\n }\n\n cloneMeWithOnlyFirstChild(): RetrosynthesisMolecule {\n return Object.assign({}, this, { children: this.children.map(c => ({ ...c, children: [] })) });\n }\n\n toJSON() {\n const data = Object.assign({}, this);\n // Prevents circular JSON\n delete data.parent;\n return data;\n }\n}\n\nexport class StatusLog extends SuperModel {\n timestamp: number;\n text: string;\n time: Date;\n\n constructor(data: any) {\n super(data);\n this.time = new Date(this.timestamp);\n }\n\n get serialised() {\n return {};\n }\n}\n\nexport type SequenceStatus =\n | 'PENDING'\n | 'WAITING'\n | 'RUNNING'\n | 'DONE'\n | 'ERROR'\n | 'NEW'\n | 'SKIPPED'\n | 'STOPPED'\n | 'PAUSED';\n\nexport enum ERetrosynthesisMoleculeAction {\n EXPAND = 'EXPAND',\n CUSTOM_EXPAND = 'CUSTOM_EXPAND',\n INSPECT = 'INSPECT',\n DELETE_CHILDREN = 'DELETE_CHILDREN',\n EDIT_CHILDREN = 'EDIT_CHILDREN',\n ADD_CHILDREN = 'ADD_CHILDREN',\n EDIT_MOLECULE = 'EDIT_MOLECULE',\n DELETE_MOLECULE = 'DELETE_MOLECULE',\n}\n","import { SuperModel } from '@models/super-model.model';\nimport { RetrosynthesisMolecule } from './retrosynthesis-molecule.model';\nimport { EFeedback } from '@shared/enums/feedback.enum';\nimport { svgToUrl, ISvgToUrl } from '@app/shared/common-utilities/svg-to-url';\nimport { User } from './user.model';\n\nexport class RetrosynthesisSequence extends SuperModel {\n label?: string;\n confidence?: number;\n confidenceTag: string;\n isConfidenceComputed?: boolean;\n metaData?: any;\n isSaved: boolean;\n tree: RetrosynthesisMolecule;\n feedback: IFeedback;\n optimizationScore?: number | string;\n complexityGraph: string;\n canCreateSynthesis?: boolean;\n currentSynthesisId?: string;\n name?: string;\n isDeletable: boolean;\n isRenameable: boolean;\n isFavorite: boolean;\n isAiModelDeleted: boolean;\n canAddToCollection: boolean;\n aiModel: string;\n user?: User;\n isShareable: boolean;\n canShare: boolean;\n productMolecule: RetrosynthesisMolecule;\n outcomeMolecules: Array<RetrosynthesisMolecule>;\n isInteractive?: boolean;\n isFromFile?: boolean;\n retrosynthesisId: string;\n steps: number;\n reactionSmiles: string;\n hasSynthesisProcedures: boolean;\n datasetName: string;\n\n constructor(data: any = {}) {\n super(data);\n\n if (data.tree) {\n this.tree = new RetrosynthesisMolecule(data.tree);\n }\n\n if (data.productMolecule) {\n this.productMolecule = new RetrosynthesisMolecule(data.productMolecule);\n }\n\n if (data.outcomeMolecules && data.outcomeMolecules.length) {\n this.outcomeMolecules = data.outcomeMolecules.map(molecule => new RetrosynthesisMolecule(molecule));\n }\n if (data.user) {\n this.user = new User(data.user);\n }\n }\n\n get complexityGraphSvg(): ISvgToUrl {\n return this.complexityGraph && svgToUrl(this.complexityGraph);\n }\n\n get serialised() {\n return {};\n }\n\n get creatorName() {\n if (this.user && typeof this.user === 'object') {\n return this.user.fullName;\n }\n return this.createdBy;\n }\n}\n\nexport interface IFeedback {\n opinion: EFeedback;\n message?: string;\n}\n\nexport enum EConfidenceTagName {\n L = 'Low',\n M = 'Medium',\n H = 'High',\n}\nexport enum EConfidenceTagColor {\n L = '#fa4d56',\n M = '#f1c21b',\n H = '#a7f0ba',\n}\n\nexport enum EConfidenceTagTextColor {\n L = '#ffffff',\n M = '#161616',\n H = '#044317',\n}\n","import { SuperModel } from '@models/super-model.model';\nimport { RetrosynthesisSequence } from './retrosynthesis-sequence.model';\nimport { RetrosynthesisMolecule } from './retrosynthesis-molecule.model';\nimport { RetrosynthesisSibling } from './retrosynthesis-sibling.model';\nimport { Project } from './project.model';\nimport { User } from './user.model';\nimport { FileEntry, ITreeLegendItem } from '.';\n\nexport class Retrosynthesis extends SuperModel {\n name: string;\n projectId: string;\n status: ERetrosynthesisStatus;\n errorMessage: string;\n task: {\n task_id: string;\n };\n molecules: RetrosynthesisMolecule[];\n sequences: RetrosynthesisSequence[];\n sequencesIds: string[];\n legend: ITreeLegendItem[];\n wizardParameters: IRetrosynthesisWizardParameters;\n siblings: RetrosynthesisSibling[];\n productMolecule: RetrosynthesisMolecule;\n metaData: {\n queuePosition: number;\n willBeCompletedOn: Date;\n progressMessage: string;\n };\n aiModel: string;\n predictionStats: {\n operations_backward_forward: string;\n optimization_time: string;\n };\n isInteractive: boolean;\n isFromFile: boolean;\n isRenameable: boolean;\n isDeletable?: boolean;\n isFinalized: boolean;\n isFavorite: boolean;\n outcomeMolecules: RetrosynthesisMolecule[];\n project: Project;\n user: User;\n totalSynthesisPlans: number;\n canCreateSynthesis: boolean;\n uploadedFile: FileEntry;\n\n constructor(data: any = {}) {\n super(data);\n\n if (data.molecules) {\n this.molecules = data.molecules.map(m => new RetrosynthesisMolecule(m));\n }\n if (data.sequences) {\n this.sequences = data.sequences.map(s => new RetrosynthesisSequence(s));\n }\n if (data.siblings) {\n this.siblings = data.siblings.map(s => new RetrosynthesisSibling(s));\n }\n if (data.metaData && data.metaData.willBeCompletedOn) {\n this.metaData.willBeCompletedOn = new Date(data.metaData.willBeCompletedOn * 1000);\n }\n if (data.productMolecule) {\n this.productMolecule = new RetrosynthesisMolecule(data.productMolecule);\n }\n if (data.outcomeMolecules && data.outcomeMolecules.length) {\n this.outcomeMolecules = data.outcomeMolecules.map(molecule => new RetrosynthesisMolecule(molecule));\n }\n if (data.project) {\n this.project = new Project(data.project);\n }\n if (data.uploadedFile) {\n this.uploadedFile = new FileEntry(data.uploadedFile);\n }\n }\n\n get creatorName() {\n if (this.createdBy && typeof this.createdBy === 'object') {\n return this.createdBy.fullName;\n } else if (this.user && typeof this.user === 'object') {\n return this.user.fullName;\n } else {\n return this.createdBy;\n }\n }\n\n get typology(): ERetrosynthesisTypology {\n if (this.isFromFile && !this.isInteractive) {\n return ERetrosynthesisTypology.FROM_FILE;\n }\n if (this.isInteractive) {\n return ERetrosynthesisTypology.INTERACTIVE;\n } else {\n return ERetrosynthesisTypology.AUTOMATIC;\n }\n }\n\n get typologyLabel() {\n switch (this.typology) {\n case ERetrosynthesisTypology.FROM_FILE:\n return 'From file';\n case ERetrosynthesisTypology.INTERACTIVE:\n return 'Interactive';\n case ERetrosynthesisTypology.AUTOMATIC:\n return 'Automatic';\n }\n }\n\n get serialised() {\n return {};\n }\n}\n\nexport interface IRetrosynthesisWizardParameters {\n available_smiles: Array<string>;\n exclude_smiles: Array<string>;\n exclude_substructures: Array<string>;\n parameters: {\n max_steps: IRetrosynthesisWizardParam;\n nbeams: IRetrosynthesisWizardParam;\n ntop: IRetrosynthesisWizardParam;\n };\n}\n\nexport interface IRetrosynthesisWizardParam {\n label: string;\n description: string;\n value: number;\n}\n\nexport enum ERetrosynthesisStatus {\n DONE = 'DONE', // Only for interactive: done but not finalized (SUCCESS)\n SUCCESS = 'SUCCESS',\n RETROSYNTHESIS_READY = 'RETROSYNTHESIS_READY',\n ERROR = 'ERROR',\n PENDING = 'PENDING',\n PROCESSING = 'PROCESSING',\n NEW = 'NEW',\n RUNNING = 'RUNNING',\n STOPPED = 'STOPPED',\n PAUSED = 'PAUSED',\n}\n\nexport enum ESynthesisStatusClassColor {\n DONE = 'bx--tag--done',\n SUCCESS = 'bx--tag--success',\n RETROSYNTHESIS_READY = 'bx--tag--retrosynthesis_ready',\n ERROR = 'bx--tag--error',\n PENDING = 'bx--tag--pending',\n WAITING = 'bx--tag--pending',\n PROCESSING = 'bx--tag--processing',\n NEW = 'bx--tag--new',\n RUNNING = 'bx--tag--running',\n STOPPED = 'bx--tag--stopped',\n PAUSED = 'bx--tag--paused',\n}\n\nexport enum ERetrosynthesisSteps {\n STEP1 = '1-steps',\n STEP2 = '2-3-steps',\n STEP3 = '4-6-steps',\n STEP4 = '7-15-steps',\n STEP5 = '16-steps',\n}\n\nexport enum ERetrosynthesisTypology {\n INTERACTIVE = 'interactive',\n AUTOMATIC = 'automatic',\n FROM_FILE = 'from_file',\n}\n","import { SuperModel } from '@models/super-model.model';\nimport { Retrosynthesis } from './retrosynthesis.model';\n\nexport class Reactor extends SuperModel {\n index: number;\n status: string;\n currentSynthesis: Retrosynthesis;\n\n constructor(data: Partial<Reactor>) {\n super(data);\n\n if (data.currentSynthesis) {\n this.currentSynthesis = new Retrosynthesis(data.currentSynthesis);\n }\n }\n\n get serialised() {\n return {\n index: this.index,\n status: this.status,\n currentSynthesis: this.currentSynthesis,\n };\n }\n}\n\nexport enum EReactorStatus {\n UNAVAILABLE = 'Unavailable',\n RUNNING = 'Running',\n STANDBY = 'Standby',\n MAINTENANCE = 'Maintenance Required',\n}\n","import { SuperModel } from './super-model.model';\nimport { Reaction } from './reaction.model';\n\nexport class PredictionTask extends SuperModel {\n attempts: Reaction[];\n status: string;\n request: any;\n type: string;\n canGenerateOutcomes: boolean;\n projectId: string;\n aiModel: string;\n\n constructor(object: any = {}) {\n super(object);\n if (object.attempts) {\n this.attempts = this.attempts.map(attempt => new Reaction(attempt));\n }\n }\n\n get serialised() {\n return { taskId: this.id };\n }\n}\n","import { SuperModel } from '@models/super-model.model';\nimport { User } from '@models/user.model';\nexport class Login extends SuperModel {\n token: string;\n refreshToken: string;\n user: User;\n idToken: string;\n\n constructor(data = {}) {\n super(data);\n\n if (this.user) {\n this.user = new User(this.user);\n }\n }\n\n get serialised() {\n console.error('this method should not being called');\n return undefined;\n }\n}\n","import { Molecule } from './molecule.model';\n\nexport class Reagent extends Molecule {\n type: string;\n}\n","import { SuperModel } from '@models/super-model.model';\nimport { Reaction } from './reaction.model';\n\nexport class Challenge extends SuperModel {\n name: string;\n source: string;\n challengeReaction: Reaction;\n groundTruthReaction?: Reaction;\n\n constructor(challenge = {}) {\n super(challenge);\n if (this.challengeReaction) {\n this.challengeReaction = new Reaction(this.challengeReaction);\n }\n if (this.groundTruthReaction) {\n this.groundTruthReaction = new Reaction(this.groundTruthReaction);\n }\n }\n\n get serialised() {\n return {\n id: this.id,\n };\n }\n}\n","import { SuperModel } from '@models/super-model.model';\nimport { Challenge } from './challenge.model';\nimport { Reaction } from './reaction.model';\n\nexport class ChallengeResult extends SuperModel {\n challenge?: Challenge;\n humanPrediction?: Reaction;\n machinePredictions?: Reaction[];\n humanTotalTime?: number;\n machineTotalTime?: number;\n humanCorrect?: boolean;\n machineCorrect?: boolean;\n\n constructor(challengeResult = {}) {\n super(challengeResult);\n if (this.challenge) {\n this.challenge = new Challenge(this.challenge);\n }\n if (this.humanPrediction) {\n this.humanPrediction = new Reaction(this.humanPrediction);\n }\n if (this.machinePredictions) {\n this.machinePredictions = this.machinePredictions.map(reaction => new Reaction(reaction));\n }\n }\n\n get serialised() {\n return {\n id: this.id,\n challenge: this.challenge && this.challenge.serialised,\n humanPrediction: this.humanPrediction && this.humanPrediction.serialised,\n humanTotalTime: this.humanTotalTime,\n machineTotalTime: this.machineTotalTime,\n humanCorrect: this.humanCorrect,\n machineCorrect: this.machineCorrect,\n };\n }\n}\n","import { SuperModel } from '@models/super-model.model';\n\nexport type InvitationStatus = 'WAITING' | 'PENDING' | 'ACCEPTED' | 'ERROR';\n\nexport class Invitation extends SuperModel {\n email: string;\n status?: InvitationStatus;\n isDeletable?: boolean;\n\n constructor(invitation = {}) {\n super(invitation);\n }\n\n get serialised() {\n return { email: this.email, status: this.status };\n }\n}\n","import { SuperModel } from '@models/super-model.model';\n\nexport class ChallengesResultsStats extends SuperModel {\n totalHumanTime: string;\n totalMachineTime: string;\n nOfCorrectHumanChallenges: number;\n nOfCorrectMachineChallenges: number;\n\n constructor(object: any) {\n super(object);\n }\n\n get serialised() {\n return {\n totalHumanTime: this.totalHumanTime,\n totalMachineTime: this.totalMachineTime,\n nOfCorrectHumanChallenges: this.nOfCorrectHumanChallenges,\n nOfCorrectMachineChallenges: this.nOfCorrectMachineChallenges,\n };\n }\n}\n","import { SuperModel } from './super-model.model';\n\nexport class RetrosynthesisWizardConfig extends SuperModel {\n //@ts-ignore\n [key: string]: IRetrosynthesisWizardConfigParam;\n\n constructor(data: any = {}) {\n super(data);\n\n if (!this.speed.step) {\n this.speed.step = this.speed.values[1] - this.speed.values[0];\n }\n }\n\n //@ts-ignore\n get serialised() {\n return {};\n }\n}\n\nexport interface IRetrosynthesisWizardConfigParam {\n label: string;\n description: string;\n min: number;\n max: number;\n step?: number;\n values?: Array<number>;\n metaData?: Array<IRetrosynthesisWizardConfigMetaDataItem>;\n type: 'checkbox' | 'slider' | 'radio';\n options?: Array<{ label: string; value: number }>;\n}\n\nexport interface IRetrosynthesisWizardConfigMetaDataItem {\n value: number;\n parameters: {\n beam_dimension: number;\n max_steps: number;\n nbeams: number;\n ntop: number;\n };\n}\n","import { SuperModel } from './super-model.model';\n\nexport class Action extends SuperModel {\n name: string;\n description: string;\n messages: IActionMessage[];\n content: { [key: string]: ActionContent[] };\n status: TActionStatus;\n completionPercentage: number;\n remainingTime: number;\n hasSpectrometerPdf: boolean;\n\n get label(): string {\n let label = this.name.toUpperCase().substring(0, 1) + this.name.substring(1);\n\n if (this.content) {\n if (this.content.material) {\n label += ' ' + (this.content.material[0] || { value: '' }).value;\n } else if (this.content.duration) {\n label += ' ' + (this.content.duration[0] || { value: 0 }).value + 's';\n }\n }\n\n return label;\n }\n\n constructor(data: any) {\n super(data);\n\n if (data.content) {\n Object.keys(data.content).forEach(key => {\n // Maps to single value to array, because parameters can be multiple\n const actionContent: ActionContent = data.content[key] || Action.emptyActionContent;\n if (Array.isArray(actionContent.value)) {\n this.content[key] = actionContent.value;\n } else if (!Array.isArray(actionContent)) {\n this.content[key] = [actionContent];\n }\n\n this.content[key].forEach(content => {\n content.quantity = content.quantity || { value: null, unit: null };\n });\n });\n }\n }\n\n static get emptyActionContent(): ActionContent {\n return {\n value: null,\n quantity: { value: null, unit: null },\n unit: null,\n stoichiometryFactor: null,\n isChanged: {\n value: false,\n quantity: { value: false, unit: false },\n unit: false,\n stoichiometryFactor: false,\n },\n };\n }\n\n get serialised() {\n return {};\n }\n}\n\nexport interface IActionLegendStep {\n id: any;\n text: string;\n error?: {\n title: string;\n message: string;\n };\n warning?: {\n title: string;\n message: string;\n };\n info?: {\n title: string;\n message: string;\n };\n}\n\nexport interface IActionMessage {\n type: TActionMessageType;\n shortMessage: string;\n longMessage: string;\n}\n\nexport interface ActionContent {\n value: string | number | boolean;\n quantity: { value: number; unit: string };\n unit: string;\n stoichiometryFactor: number;\n isMissingMaterial?: boolean;\n feasibleUnits?: string[];\n smiles?: string;\n isChanged?: {\n value: boolean;\n quantity?: {\n value?: boolean;\n unit?: boolean;\n };\n unit: boolean;\n stoichiometryFactor: boolean;\n };\n}\n\nexport type TActionMessageType = 'error' | 'warning' | 'info';\nexport type TActionStatus = 'WAITING' | 'RUNNING' | 'DONE' | 'ERROR' | 'SKIPPED' | 'PAUSED' | 'STOPPED';\n","import { SuperModel } from '@models/super-model.model';\nimport { RetrosynthesisMolecule } from './retrosynthesis-molecule.model';\n\nexport class RetrosynthesisSibling extends SuperModel {\n createdBy: string;\n id: string;\n modifiedBy: string;\n smiles: string;\n isThermal: boolean;\n isPhotochemical: boolean;\n reactions: IRetrosynthesisSiblingChildren[];\n\n constructor(data: any = {}) {\n super(data);\n\n if (data.reactions) {\n this.reactions = data.reactions.map(r => ({\n ...r,\n children: r.children.map(s => new RetrosynthesisMolecule(s)),\n }));\n }\n }\n\n get serialised() {\n return {};\n }\n}\n\nexport interface IRetrosynthesisSiblingChildren {\n children: RetrosynthesisMolecule[];\n rclass: string;\n confidence: number;\n confidenceTag: string;\n isConfidenceComputed?: boolean;\n id: string;\n smiles: string;\n reactionSmiles: string;\n isThermal: boolean;\n isPhotochemical: boolean;\n custom: boolean;\n}\n","import { SuperModel } from './super-model.model';\n\nexport class QueueState extends SuperModel {\n itemsInQueue?: number;\n willBeCompletedOn?: Date;\n\n constructor(data: any) {\n super(data);\n if (data.willBeCompletedOn) {\n this.willBeCompletedOn = new Date(data.willBeCompletedOn);\n }\n }\n\n get serialised() {\n return {};\n }\n}\n","import { SuperModel } from '@models/super-model.model';\n\nexport class RoboRxnConfig extends SuperModel {\n webcamUrl: string;\n\n constructor(data: any) {\n super(data);\n }\n\n get serialised() {\n return {\n webcamUrl: this.webcamUrl,\n };\n }\n}\n","import { SuperModel } from '@models/super-model.model';\n\nexport class ActionSchema extends SuperModel {\n name: string;\n label: string;\n description: string;\n supported: boolean;\n parameters: ActionSchemaParameter[];\n\n constructor(data: any) {\n super(data);\n this.parameters = this.parameters || [];\n this.parameters = this.parameters.map(p => new ActionSchemaParameter(p));\n }\n\n get serialised() {\n return {};\n }\n}\n\nexport class ActionSchemaParameter extends SuperModel {\n name: string;\n label: string;\n type: string;\n multiple: boolean;\n optional: boolean;\n values: {\n name: string;\n label: string;\n value: string;\n }[];\n units: string[];\n validations: { type: 'remote' | 'required' }[];\n\n constructor(data: any) {\n super(data);\n this.validations = this.validations || [];\n }\n\n get serialised() {\n return {};\n }\n}\n","import { SuperModel } from '@models/super-model.model';\n\nimport { Reactor } from '@models';\n\nexport class RoboRxnSummary extends SuperModel {\n reactors: Reactor[];\n\n constructor(data: any) {\n super(data);\n\n if (data.reactors) {\n this.reactors = data.reactors.map(item => new Reactor(item));\n }\n }\n\n get serialised() {\n return {\n reactors: this.reactors,\n };\n }\n}\n","import { SuperModel } from '@models/super-model.model';\nimport { SynthesisExecution } from '.';\nimport { Retrosynthesis } from './retrosynthesis.model';\n\nexport class LatestSynthesis extends SuperModel {\n queued: SynthesisExecution[];\n completed: SynthesisExecution[];\n\n constructor(data: Partial<LatestSynthesis>) {\n super(data);\n\n if (data.queued) {\n this.queued = data.queued.map(item => new SynthesisExecution(item));\n }\n\n if (data.completed) {\n this.completed = data.completed.map(item => new SynthesisExecution(item));\n }\n }\n\n get serialised() {\n return {\n queued: this.queued,\n completed: this.completed,\n };\n }\n}\n","import { SuperModel } from '@models/super-model.model';\nimport { AiTrainingFile } from '.';\n\nexport class AiTrainingModel extends SuperModel {\n name: string;\n modelType: EAiTrainingModelType;\n status: EAiTrainingModelStatus;\n roundTripAccuracy: number;\n top1Accuracy: number;\n levenshteinDistance: number;\n aiTrainingFile: AiTrainingFile;\n projectIds: string[];\n isDeletable: boolean;\n isRenameable: boolean;\n isStoppable: boolean;\n isSaveable: boolean;\n isReadyToUse: boolean;\n isProjectAssignable: boolean;\n\n constructor(data: any = {}) {\n super(data);\n\n if (data.aiTrainingFile) {\n this.aiTrainingFile = new AiTrainingFile(data.aiTrainingFile);\n }\n\n this.projectIds = data.projectIds || [];\n }\n\n get typeLabel() {\n return EAiTrainingModelTypeLabel[this.modelType];\n }\n\n get statusLabel() {\n return EAiTrainingModelStatusLabel[this.status];\n }\n\n get serialised() {\n return {\n id: this.id,\n };\n }\n}\n\nexport enum EAiTrainingModelType {\n REACTION = 'REACTION',\n RETROSYNTHESIS = 'RETROSYNTHESIS',\n}\n\nexport enum EAiTrainingModelTypeLabel {\n REACTION = 'Product prediction',\n RETROSYNTHESIS = 'Retrosynthetic route prediction',\n}\n\nexport enum EAiTrainingModelStatusLabel {\n TRAINING = 'Training',\n TRAINING_ERROR = 'Training error',\n COMPLETED = 'Completed',\n STOPPED = 'Stopped',\n SAVING = 'Saving',\n SAVE_ERROR = 'Save error',\n SAVED = 'Ready to run',\n DELETED_BY_ADMIN = 'Deleted by admin',\n EXPIRED = 'Expired',\n}\n\nexport enum EAiTrainingModelStatus {\n TRAINING = 'TRAINING',\n TRAINING_ERROR = 'TRAINING_ERROR',\n COMPLETED = 'COMPLETED',\n STOPPED = 'STOPPED',\n SAVING = 'SAVING',\n SAVE_ERROR = 'SAVE_ERROR',\n SAVED = 'SAVED',\n DELETED_BY_ADMIN = 'DELETED_BY_ADMIN',\n EXPIRED = 'EXPIRED',\n}\n","import { SuperModel } from '@models/super-model.model';\nimport { Molecule } from '.';\n\nexport class AiTrainingFile extends SuperModel {\n fileName: string;\n previewReactions?: {\n productMolecule: Molecule;\n outcomeMolecules: Molecule[];\n }[];\n\n constructor(data) {\n super(data);\n this.previewReactions = data.previewReactions?.map(previewReaction => ({\n productMolecule: new Molecule(previewReaction.productMolecule),\n outcomeMolecules: previewReaction.outcomeMolecules?.map(\n outcomeMolecule => new Molecule(outcomeMolecule)\n ),\n }));\n }\n\n get serialised() {\n return {\n id: this.id,\n };\n }\n}\n","import { SuperModel } from './super-model.model';\nimport { Molecule, RetrosynthesisMolecule } from '.';\n\nexport class SimilarReaction extends SuperModel {\n similaritiesScore: number;\n rclass: string;\n smiles: string;\n productMolecule: Molecule;\n outcomeMolecules: Molecule[];\n references: [\n {\n source: string;\n url: string;\n text: string;\n dataset: string;\n }\n ];\n\n constructor(data: any = {}) {\n super(data);\n\n if (data.productMolecule) {\n this.productMolecule = new RetrosynthesisMolecule(data.productMolecule);\n }\n if (data.outcomeMolecules && data.outcomeMolecules.length) {\n this.outcomeMolecules = data.outcomeMolecules.map(molecule => new RetrosynthesisMolecule(molecule));\n }\n }\n\n get score() {\n if (Math.abs(this.similaritiesScore) < 0.001) {\n return this.similaritiesScore.toExponential(3);\n } else if (Math.abs(this.similaritiesScore) < 1.0) {\n return this.similaritiesScore.toFixed(3);\n } else {\n return this.similaritiesScore;\n }\n }\n\n get serialised() {\n return {\n id: this.id,\n };\n }\n}\n","import { IAnalysisReport, SynthesisProcedure } from '.';\nimport { SynthesisSuperModel } from './synthesis-super.model';\n\nexport class SynthesisExecution extends SynthesisSuperModel {\n status: ESynthesisExecutionStatus;\n completedOn: string | Date;\n rootSynthesisExecutionNodeId: string;\n synthesisId: string;\n isRelaunchable: boolean;\n isPausable: boolean;\n isStoppable: boolean;\n analysisReports?: IAnalysisReport[];\n synthesis: SynthesisProcedure; // source synthesis procedure\n numberOfAnnotations: number;\n canAddAnnotations: boolean;\n\n constructor(data: any) {\n super(data);\n if (data.synthesis) {\n this.synthesis = new SynthesisProcedure(data.synthesis);\n }\n this.isProcedure = false;\n }\n\n get serialised() {\n return {\n reactors: this.id,\n };\n }\n}\n\nexport enum ESynthesisExecutionStatus {\n NEW = 'NEW',\n WAITING = 'WAITING',\n RUNNING = 'RUNNING',\n PAUSED = 'PAUSED',\n DONE = 'DONE',\n ERROR = 'ERROR',\n STOPPED = 'STOPPED',\n}\n","import { Retrosynthesis } from '.';\nimport { SynthesisSuperModel } from './synthesis-super.model';\n\nexport class SynthesisProcedure extends SynthesisSuperModel {\n retrosynthesis: Retrosynthesis;\n hasSynthesisExecutions: boolean;\n\n constructor(data: any) {\n super(data);\n\n if (data.retrosynthesis) {\n this.retrosynthesis = new Retrosynthesis(data.retrosynthesis);\n }\n this.isProcedure = true;\n }\n\n get serialised() {\n return {\n reactors: this.id,\n };\n }\n}\n","import { Reaction } from '.';\nimport { SuperModel } from './super-model.model';\n\nexport class Tmap extends SuperModel {\n backgroundColor: TmapColor;\n vertexCoordinates: TmapCoordinates;\n edgeCoordinates: TmapCoordinates;\n colors: {\n r: number[];\n g: number[];\n b: number[];\n };\n highlightedVertices: {\n index: number;\n color: TmapColor;\n rxnSmiles: string;\n }[];\n legend: TmapLegend;\n reactions: Reaction[];\n\n constructor(data: any = {}) {\n super(data);\n\n if (data.reactions) {\n this.reactions = data.reactions.map(reaction => new Reaction(reaction));\n }\n }\n\n get serialised() {\n return {};\n }\n}\n\nexport interface TmapLegend {\n entries: {\n [key: string]: TmapColor;\n };\n}\n\nexport interface TmapColor {\n r: number;\n g: number;\n b: number;\n}\ninterface TmapCoordinates {\n x: number[];\n y: number[];\n z: number[];\n}\n","import { Molecule } from '.';\nimport { SuperModel } from './super-model.model';\n\nexport class TmapReaction extends SuperModel {\n product: string;\n reactants: string[];\n rxnClass: string;\n source: string;\n url: string;\n productMolecule: Molecule;\n reactantsMolecules: Molecule[];\n\n constructor(data: any = {}) {\n super(data);\n\n if (data.productMolecule) {\n this.productMolecule = new Molecule(data.productMolecule);\n }\n\n if (data.reactantsMolecules) {\n this.reactantsMolecules = data.reactantsMolecules.map(\n reactantsMolecule => new Molecule(reactantsMolecule)\n );\n }\n }\n\n get smiles() {\n return [this.reactantsMolecules.map(r => r.smiles).join('.')]\n .concat(this.productMolecule.smiles)\n .join('>>');\n }\n\n get serialised() {\n return {};\n }\n}\n","import { SuperModel } from '@models/super-model.model';\n\nexport class TuneRxnConfig extends SuperModel {\n reactionDataSampleFileContent: string;\n reactionDataFileMaxSize: number;\n reactionDataPreviewLimit: number;\n\n constructor(data: any) {\n super(data);\n }\n\n get serialised() {\n return {\n reactionDataSampleFileContent: this.reactionDataSampleFileContent,\n reactionDataFileMaxSize: this.reactionDataFileMaxSize,\n reactionDataPreviewLimit: this.reactionDataPreviewLimit,\n };\n }\n}\n","import { SuperModel } from '@models/super-model.model';\n\nexport class FileEntry extends SuperModel {\n baseFileName: string;\n extension: string;\n fileName: string;\n mimeType: string;\n\n constructor(data) {\n super(data);\n }\n\n get serialised() {\n return {\n id: this.id,\n };\n }\n}\n","import { SuperModel } from './super-model.model';\n\nimport { EActivityStatus, EActivityType } from '@app/shared/enums/activity.enum';\nimport { User } from '.';\n\nexport class Activity extends SuperModel {\n projectId: string;\n projectName: string;\n activityType: EActivityType;\n activityName: string;\n status: EActivityStatus;\n creator: User;\n\n constructor(data: any) {\n super(data);\n\n if (data.creator) {\n this.creator = new User(data.creator);\n }\n }\n\n get activityStatusLabel() {\n switch (this.status) {\n case EActivityStatus.PREDICTION_READY:\n return 'Prediction ready';\n case EActivityStatus.RETROSYNTHESIS_READY:\n return 'Retrosynthesis ready';\n case EActivityStatus.PENDING:\n return 'Pending';\n case EActivityStatus.PROCESSING:\n return 'Processing';\n case EActivityStatus.RUNNING:\n return 'Running';\n case EActivityStatus.WAITING:\n return 'Waiting';\n default:\n return this.status;\n }\n }\n\n get activityTypeLabel() {\n switch (this.activityType) {\n case EActivityType.PREDICTION:\n return 'Product prediction';\n case EActivityType.RETROSYNTHESIS:\n return 'Automatic retrosynthetic route';\n case EActivityType.SYNTHESIS_EXECUTION:\n return 'Synthesis execution';\n case EActivityType.REACTION_COMPLETION_PREDICTION:\n return 'Reagent';\n default:\n return this.activityType;\n }\n }\n\n get serialised() {\n return {\n id: this.id,\n projectId: this.projectId,\n projectName: this.projectName,\n activityName: this.activityName,\n status: this.status,\n };\n }\n}\n","import { ISvgToUrl, svgToUrl } from '@app/shared/common-utilities/svg-to-url';\nimport { Molecule } from './molecule.model';\nimport { RetrosynthesisMolecule } from './retrosynthesis-molecule.model';\nimport { SuperModel } from './super-model.model';\n\nexport class OpticalChemicalRecognition extends SuperModel {\n fileID: string;\n fileImage: string;\n fileExtension: string;\n segments: OpticalChemicalRecognitionSegment[];\n reactions: OpticalChemicalRecognitionReaction[];\n\n constructor(payload: Partial<OpticalChemicalRecognition> = {}) {\n super(payload);\n if (payload.reactions) {\n this.reactions = payload.reactions.map(x => new OpticalChemicalRecognitionReaction(x));\n }\n\n if (payload.segments) {\n this.segments = payload.segments.map(x => new OpticalChemicalRecognitionSegment(x));\n }\n }\n\n get base64Image() {\n return `data:image/${this.fileExtension};base64,` + this.fileImage;\n }\n\n get serialised() {\n return {\n id: this.id,\n fileImage: this.fileImage,\n segments: this.segments.map(x => x.serialised),\n reactions: this.reactions.map(x => x.serialised),\n };\n }\n}\n\nexport class OpticalChemicalRecognitionSegment extends SuperModel {\n id?: string;\n xTopLeft: number;\n yTopLeft: number;\n xBottomRight: number;\n yBottomRight: number;\n boundingBoxType: EBoundingBoxType;\n content?: string;\n fromUser: boolean;\n //FE properties\n xTopLeftInitial?: number;\n yTopLeftInitial?: number;\n xBottomRightInitial?: number;\n yBottomRightInitial?: number;\n\n constructor(payload: Partial<OpticalChemicalRecognitionSegment> = {}) {\n super(payload);\n\n this.xBottomRightInitial = this.xBottomRight;\n this.xTopLeftInitial = this.xTopLeft;\n this.yBottomRightInitial = this.yBottomRight;\n this.yTopLeftInitial = this.yTopLeft;\n }\n\n get serialised() {\n return {\n id: this.id,\n xTopLeft: this.xTopLeft,\n yTopLeft: this.yTopLeft,\n xBottomRight: this.xBottomRight,\n yBottomRight: this.yBottomRight,\n boundingBoxType: this.boundingBoxType,\n content: this.content,\n fromUser: this.fromUser,\n };\n }\n}\n\nexport class OpticalChemicalRecognitionReaction extends SuperModel {\n id: string;\n reactant: { segmentId: string; content: string };\n text: { content: string };\n product: {\n segmentId: string;\n content: string;\n };\n polygon: number[][];\n tree?: IOpticalChemicalRecognitionTree;\n order: number;\n\n constructor(payload: Partial<OpticalChemicalRecognitionReaction> = {}) {\n super(payload);\n }\n\n get serialised() {\n return {\n id: this.id,\n reactant: this.reactant,\n text: this.text,\n product: this.product,\n polygon: this.polygon,\n };\n }\n}\n\nexport interface IOpticalChemicalRecognitionTree {\n moleculeImage: string;\n smiles: string;\n children: {\n moleculeImage: string;\n smiles: string;\n }[];\n}\n\nexport enum EBoundingBoxType {\n MOLECULE = 0,\n ARROW = 1,\n TEXT = 2,\n SYMBOL = 3,\n}\n","import { ISvgToUrl, svgToUrl } from '@app/shared/common-utilities/svg-to-url';\nimport { EIngredientPhase, EIngredientType } from '@app/shared/enums/reaction-settings-ingredient.enum';\nimport { SuperModel } from '@models/super-model.model';\nimport { IActionMessage } from './action.model';\n\nexport class ReactionSettingsIngredient extends SuperModel {\n name: string;\n smiles: string;\n image: string;\n quantity: number;\n unit: string;\n description: string;\n isVirtual: boolean;\n isPreviousProduct: boolean;\n isProduct: boolean;\n isPrecursor: boolean;\n isNonMolecularSubstance: boolean;\n isMissing: boolean; // computed client side\n ingredientCategory: TIngredientCategory;\n ingredientType: EIngredientType;\n phase: EIngredientPhase;\n pureCompound?: {\n weighings: {\n position: number;\n quantity: number;\n unit: string;\n }[];\n };\n handmadeSolution?: {\n position: number;\n components: {\n name: string;\n quantity: number;\n unit: string;\n main: boolean;\n saturatedSolution: boolean;\n }[];\n };\n standardSolution: {\n position: number;\n quantity: number;\n unit: string;\n concentration: number;\n concentrationUnit: string;\n };\n moleculeInfo: {\n molecularWeight: number;\n density: number;\n };\n messages: IActionMessage[];\n\n // Only for FE\n isExpanded = false;\n\n constructor(data: any = {}) {\n super(data);\n this.isMissing = data.messages?.some(m => m.shortMessage === 'Missing ingredient');\n }\n\n get moleculeImageSvg(): ISvgToUrl {\n return svgToUrl(this.image);\n }\n\n static getIngredientPhase(ingredientCategory: TIngredientCategory): EIngredientPhase {\n switch (ingredientCategory) {\n case 'solvent':\n return EIngredientPhase.LIQUID;\n case 'reagent':\n return EIngredientPhase.LIQUID;\n case 'pin':\n return EIngredientPhase.SOLID;\n }\n }\n get serialised() {\n return {\n id: this.id,\n };\n }\n}\n\nexport interface IMoleculeInformation {\n name: string;\n molecularWeight: number;\n density: number;\n stoichiometryFactor: number;\n}\n\nexport interface IHardwareSettings {\n product: {\n units: string[];\n };\n ingredientCategories: {\n [key in TIngredientCategory]: {\n availablePositions: number[];\n hardwareLimits: any[];\n };\n };\n units: {\n quantities: {\n [phaseKey in EIngredientPhase]: string[];\n };\n concentrations: {\n [phaseKey in EIngredientPhase]: string[];\n };\n };\n ingredientTypes: {\n [key in EIngredientType]: {\n quantities: {\n [phaseKey in EIngredientPhase]: string[];\n };\n concentrations: {\n [phaseKey in EIngredientPhase]: string[];\n };\n };\n };\n}\n\nexport interface IIngredientCategory {\n name: TIngredientCategory;\n}\n\nexport type TIngredientCategory = 'solvent' | 'reagent' | 'pin';\n","import { SuperModel } from '@models/super-model.model';\nimport { Action } from './action.model';\n\nexport class ReactionSettings extends SuperModel {\n product: IReactionSettingsProduct;\n actions: Action[];\n\n constructor(data: any = {}) {\n super(data);\n\n if (data.actions) {\n this.actions = data.actions.map(action => new Action(action));\n }\n }\n\n get serialised() {\n return {\n id: this.id,\n product: this.product,\n actions: this.actions,\n };\n }\n}\n\nexport interface IReactionSettingsProduct {\n productMassAndReactionInformation: {\n quantity: number;\n unit: string;\n yield: number;\n securityFactor: number;\n stoichiometryFactor: number;\n };\n\n moleculeInfo: {\n molecularWeight: number;\n density: number;\n name: string;\n };\n}\n","import { SuperModel } from './super-model.model';\nimport { User } from './user.model';\n\nexport class SynthesisAnnotation extends SuperModel {\n title?: string;\n description: string;\n step?: string;\n createdBy: User;\n canUpdateAnnotation: boolean;\n canDeleteAnnotation: boolean;\n\n constructor(data: any) {\n super(data);\n }\n\n get serialised() {\n return {\n title: this.title,\n description: this.description,\n step: this.step,\n };\n }\n}\n","import { EPredictionType } from '@app/shared/enums/reaction-property-prediction';\nimport { SuperModel } from '@models/super-model.model';\nimport { Molecule } from './molecule.model';\n\nexport class ReactionPropertyPrediction extends SuperModel {\n projectId: string;\n aiModel: string;\n reactionSmiles: string;\n type: EPredictionType;\n value: any;\n atomMapping?: {\n productMolecule: Molecule;\n precursorMolecules: Molecule[];\n };\n\n constructor(data: any = {}) {\n super(data);\n\n if (data.atomMapping) {\n if (data.atomMapping.productMolecule) {\n data.atomMapping.productMolecule = new Molecule(data.atomMapping.productMolecule);\n }\n if (data.atomMapping.precursorMolecules) {\n data.atomMapping.precursorMolecules = data.atomMapping.precursorMolecules.map(\n (molecule: any) => new Molecule(molecule)\n );\n }\n }\n }\n\n get typeLabel() {\n return this.type.replace(/_/g, ' ');\n }\n\n get serialised() {\n return;\n }\n}\n","import { SuperModel } from '@models/super-model.model';\nimport { Molecule } from './molecule.model';\nimport { RetrosynthesisMolecule } from './retrosynthesis-molecule.model';\nimport { IFeedback } from './retrosynthesis-sequence.model';\n\nexport class ReactionCompletion extends SuperModel {\n reactionCompletionPredictionId: string;\n name: string;\n smiles: string;\n confidence: number;\n isConfidenceComputed: boolean;\n isFavorite: boolean;\n isRenameable: boolean;\n isDeletable: boolean;\n feedback: IFeedback;\n productSmiles: string;\n productMolecule: Molecule;\n precursorSmiles: string;\n precursorMolecules: Molecule[];\n tree: RetrosynthesisMolecule;\n\n constructor(payload: Partial<ReactionCompletion> = {}) {\n super(payload);\n\n if (payload.productMolecule) {\n this.productMolecule = new Molecule(payload.productMolecule);\n }\n\n if (payload.tree) {\n this.tree = new RetrosynthesisMolecule(payload.tree);\n }\n\n if (payload.precursorMolecules) {\n this.precursorMolecules = payload.precursorMolecules.map(\n precursorMolecule => new Molecule(precursorMolecule)\n );\n }\n }\n\n get creatorName() {\n if (typeof this.createdBy === 'object') {\n return this.createdBy.fullName;\n }\n return this.createdBy;\n }\n\n get serialised() {\n return {\n id: this.id,\n reactionCompletionPredictionId: this.reactionCompletionPredictionId,\n name: this.name,\n smiles: this.smiles,\n confidence: this.confidence,\n feedback: this.feedback,\n productSmiles: this.productSmiles,\n productMolecule: this.productMolecule.serialised,\n precursorSmiles: this.precursorSmiles,\n precursorMolecules: this.precursorMolecules.map(precursorMolecule => precursorMolecule.serialised),\n tree: this.tree.serialised,\n };\n }\n}\n","import { EReactionCompletionPredictionStatus } from '@app/shared/enums/reaction-completion-prediction.enum';\nimport { SuperModel } from '@models/super-model.model';\nimport { ITreeLegendItem } from './tree-legend.interface';\nimport { ReactionCompletion } from './reaction-completion.model';\nimport { Molecule } from './molecule.model';\n\nexport class ReactionCompletionPrediction extends SuperModel {\n projectId: string;\n request: {\n reactants: string;\n product: string;\n aiModel: string;\n };\n status: EReactionCompletionPredictionStatus;\n errorMessage: string;\n canGenerateCompletions: boolean;\n aiModel: string;\n isAiModelDeleted: boolean;\n sequences: ReactionCompletion[];\n legend: ITreeLegendItem[];\n molecules: Molecule[];\n\n constructor(payload: Partial<ReactionCompletionPrediction> = {}) {\n super(payload);\n\n if (payload.sequences?.length) {\n this.sequences = payload.sequences.map(\n reactionCompletion => new ReactionCompletion(reactionCompletion)\n );\n }\n }\n\n get serialised() {\n return {\n id: this.id,\n projectId: this.projectId,\n request: this.request,\n status: this.status,\n errorMessage: this.errorMessage,\n canGenerateCompletions: this.canGenerateCompletions,\n aiModel: this.aiModel,\n isAiModelDeleted: this.isAiModelDeleted,\n reactionCompletions: this.sequences.map(reactionCompletion => reactionCompletion.serialised),\n };\n }\n}\n","import { SuperModel } from '@models/super-model.model';\n\nexport class Country extends SuperModel {\n countryName: string;\n countryCode2: string;\n countryCode3: string;\n\n constructor(country = {}) {\n super(country);\n }\n\n get serialised() {\n return {\n id: this.id,\n countryName: this.countryName,\n countryCode2: this.countryCode2,\n countryCode3: this.countryCode3,\n };\n }\n}\n","import { IPlanLevel } from './plan.model';\nimport { SuperModel } from './super-model.model';\n\nexport class Subscription extends SuperModel {\n plan: IPlanLevel;\n endTerm: number;\n endTermDate: Date;\n status: ESubscriptionStatus;\n subscriptionInProgress: boolean;\n constructor(data: any) {\n super(data);\n if (data?.endTerm) {\n this.endTermDate = new Date(data.endTerm);\n }\n }\n\n get serialised() {\n return {\n plan: this.plan,\n endTerm: this.endTerm,\n status: this.status,\n subscriptionInProgress: this.subscriptionInProgress,\n };\n }\n}\n\nexport enum ESubscriptionStatus {\n ACTIVE = 'Active',\n CANCELLED = 'Canceled',\n}\n","export interface IPlanForecast {\n title: string;\n message: string;\n level: string;\n type: EPlanForecastType;\n percentage: number;\n}\n\nexport enum EPlanForecastType {\n REACTION_PREDICTIONS = 'reactionPredictions',\n TRAINING_HOURS = 'trainingHours',\n PLAN_CANCELED = 'planCanceled',\n}\n","import { SuperModel } from './super-model.model';\n\nexport class SocketNotification extends SuperModel {\n subTopic: ESocketNotificationSubTopic;\n title: string;\n message: string;\n level: ESocketNotificationLevel;\n timeout: number;\n target: ESocketNotificationTarget;\n constructor(data: any) {\n super(data);\n }\n\n get serialised() {\n return {};\n }\n}\n\nexport enum ESocketNotificationSubTopic {\n SUBSCRIPTION_COMPLETED = 'SUBSCRIPTION_COMPLETED',\n SUBSCRIPTION_ERROR = 'SUBSCRIPTION_ERROR',\n}\n\nexport enum ESocketNotificationLevel {\n INFO = 'INFO',\n WARNING = 'WARNING',\n ERROR = 'ERROR',\n SUCCESS = 'SUCCESS',\n}\n\nexport enum ESocketNotificationTarget {\n TOAST = 'TOAST',\n DIALOG = 'DIALOG',\n}\n","import { SuperModel } from './super-model.model';\n\nexport class UserBillingInformation extends SuperModel {\n addressLine1: string;\n addressLine2: string;\n addressLine3: string;\n locality: string;\n province: string;\n postalCode: string;\n countryName: string;\n countryCode2: string;\n countryCode3: string;\n phone: string;\n email: string;\n fullName: string;\n firstName: string;\n lastName: string;\n constructor(data: any = {}) {\n super(data);\n }\n\n get fullAddress() {\n return `${this.addressLine1} ${this.addressLine2} ${this.addressLine3}\\n ${this.locality} ${\n this.locality ? ',' : ''\n } ${this.province} ${this.postalCode}\\n ${this.countryName}`\n .replace(/ +/g, ' ')\n .replace(/ ,/g, ',');\n }\n\n get serialised() {\n return {\n id: this.id,\n addressLine1: this.addressLine1,\n addressLine2: this.addressLine2,\n addressLine3: this.addressLine3,\n locality: this.locality,\n province: this.province,\n postalCode: this.postalCode,\n countryName: this.countryName,\n countryCode2: this.countryCode2,\n countryCode3: this.countryCode3,\n phone: this.phone,\n email: this.email,\n fullName: this.fullName,\n };\n }\n}\n","import { EPlanType } from './plan.model';\nimport { SuperModel } from './super-model.model';\n\nexport class UserPlanUsage extends SuperModel {\n planType: EPlanType;\n billingCycle: string;\n usageInCurrentCycle: number;\n usageInCurrentCycleFormatted: string;\n\n constructor(data: any) {\n super(data);\n }\n\n get serialised() {\n return {};\n }\n}\n","import { SuperModel } from './super-model.model';\n\nexport class SubscriptionCost extends SuperModel {\n plan: SubscriptionCostDescriptionPrice;\n tax: SubscriptionCostDescriptionPrice;\n total: SubscriptionCostDescriptionPrice;\n\n constructor(data: any) {\n super(data);\n }\n\n get serialised() {\n return {\n plan: this.plan,\n tax: this.tax,\n total: this.total,\n };\n }\n}\n\nexport interface SubscriptionCostDescriptionPrice {\n description: string;\n price: number;\n formattedPrice: string;\n}\n","import { IPaymentMethod } from './payment-method.interface';\nimport { Subscription } from './subscription.model';\nimport { SuperModel } from './super-model.model';\nimport { UserBillingInformation } from './user-billing-information.model';\n\nexport class BillingOverview extends SuperModel {\n billingInformation: UserBillingInformation;\n billingCycle: string;\n usageInCurrentCycleFormatted: string;\n amountInCurrentCycleFormatted: string;\n paymentMethod: IPaymentMethod;\n subscription: Subscription;\n constructor(data: any) {\n super(data);\n }\n\n get serialised() {\n return {};\n }\n}\n","import { SuperModel } from './super-model.model';\n\nexport class SubscriptionTeam extends SuperModel {\n description: string;\n name: string;\n documentNumber: string;\n\n constructor(data: any) {\n super(data);\n }\n\n get serialised() {\n return {\n description: this.description,\n name: this.name,\n documentNumber: this.documentNumber,\n id: this.id,\n };\n }\n}\n","import { SuperModel } from './super-model.model';\n\nexport class Plan extends SuperModel {\n name: string;\n planType: EPlanType;\n currencyCode: string;\n levels: IPlanLevel[];\n countryCode2: string;\n\n get nameWithCountry() {\n return `${this.countryCode2} ${this.name}`;\n }\n get canActivate() {\n return this.levels.some(x => x.canActivate);\n }\n constructor(plan = {}) {\n super(plan);\n }\n\n get serialised() {\n return {\n id: this.id,\n name: this.name,\n currencyCode: this.currencyCode,\n countryCode2: this.countryCode2,\n planType: this.planType,\n levels: this.levels,\n };\n }\n}\n\nexport interface IPlanLevel {\n id: string;\n name: string;\n description: string;\n features: IPlanFeature[];\n limits: IPlanLimits;\n price: string;\n canActivate: boolean;\n planType: EPlanType;\n countryCode2: string;\n}\n\nexport interface IPlanFeature {\n name: string;\n included: boolean;\n readOnly: boolean;\n}\n\nexport interface IPlanLimits {\n trainingHours: string;\n overageTrainingCost: string;\n overageTrainingCostRates: IPlanOverageTrainingCostRate[];\n reactionPredictions: string;\n tuningCap: string;\n modelsCaps: string;\n}\n\nexport interface IPlanOverageTrainingCostRate {\n hours: string;\n cost: string;\n}\n\nexport enum EPlanType {\n FREE = 'free',\n PAYGO = 'paygo',\n TEAM = 'team',\n}\n","import { SuperModel } from '@models/super-model.model';\nimport { Collaborator } from '@models/collaborator.model';\nimport { User } from './user.model';\n\nexport class Project extends SuperModel {\n name: string;\n collaborators: Collaborator[];\n totalReactionsCollected: number;\n totalRetrosynthesisCollected: number;\n totalReactions: number;\n totalSynthesis: number;\n totalRetrosynthesisRoutes: number;\n totalReactionCompletions: number;\n isFavorite: boolean;\n summary: any;\n\n constructor(project: any = {}) {\n super(project);\n\n if (this.collaborators) {\n this.collaborators = this.collaborators.map(colaborator => new Collaborator(colaborator));\n }\n }\n\n get serialised() {\n return {\n id: this.id,\n name: this.name,\n colaborators: this.collaborators && this.collaborators.map(collaborator => collaborator.serialised),\n };\n }\n\n isOwner(user: User): boolean {\n return (this.createdBy instanceof User ? (this.createdBy as User).id : this.createdBy) === user.id;\n }\n}\n","import { User } from '@models/user.model';\n\nexport abstract class SuperModel {\n id?: string;\n createdOn?: string | Date;\n modifiedOn?: string | Date;\n createdBy?: string | User;\n modifiedBy?: string | User;\n\n constructor(object: any = {}) {\n Object.assign(this, object);\n if (!object) {\n return;\n }\n if (typeof object.createdBy === 'object') {\n this.createdBy = new User(object.createdBy);\n }\n if (typeof object.modifiedBy === 'object') {\n this.modifiedBy = new User(object.modifiedBy);\n }\n }\n\n abstract readonly serialised;\n\n toString() {\n return '';\n }\n}\n","import {\n IRetrosynthesisWizardParameters,\n Project,\n Retrosynthesis,\n RetrosynthesisMolecule,\n RetrosynthesisSequence,\n User,\n} from '.';\nimport { SuperModel } from './super-model.model';\n\nexport abstract class SynthesisSuperModel extends SuperModel {\n molecules: RetrosynthesisMolecule[];\n sequences: RetrosynthesisSequence[];\n wizardParameters?: IRetrosynthesisWizardParameters;\n project: Project;\n user: User;\n productMolecule: RetrosynthesisMolecule;\n outcomeMolecules: RetrosynthesisMolecule[];\n retrosynthesis: Retrosynthesis;\n projectId: string;\n retrosynthesisId: string;\n retrosynthesisCollectionId: string;\n errorMessage: string;\n name: string;\n canCreateSynthesis: boolean;\n fromText: boolean;\n isFavorite: boolean;\n isRunnable: boolean;\n isEditable: boolean;\n isDeletable: boolean;\n isRenameable: boolean;\n isInteractive: boolean;\n isResumable: boolean;\n isFromFile: boolean;\n isProcedure?: boolean;\n stats: {\n total: number;\n totalByStatus: {\n WAITING: number;\n NEW: number;\n DONE: number;\n RUNNING: number;\n ERROR: number;\n };\n };\n steps: string;\n aiModel: string;\n reactors?: number[];\n smiles: string;\n reactionSmiles: string;\n datasetName: string;\n paragraphsText: string[];\n sourceType: ESynthesisSourceType;\n\n constructor(data) {\n super(data);\n\n if (data.retrosynthesis) {\n this.retrosynthesis = new Retrosynthesis(data.retrosynthesis);\n }\n if (data.molecules) {\n this.molecules = data.molecules.map(m => new RetrosynthesisMolecule(m));\n }\n if (data.sequences) {\n this.sequences = data.sequences.map(s => new RetrosynthesisSequence(s));\n }\n if (data.project) {\n this.project = new Project(data.project);\n }\n if (data.user) {\n this.user = new User(data.user);\n }\n if (data.productMolecule) {\n this.productMolecule = new RetrosynthesisMolecule(data.productMolecule);\n }\n if (data.outcomeMolecules && data.outcomeMolecules.length) {\n this.outcomeMolecules = data.outcomeMolecules.map(molecule => new RetrosynthesisMolecule(molecule));\n }\n }\n\n get creatorName() {\n if (this.createdBy && typeof this.createdBy === 'object') {\n return this.createdBy.fullName;\n } else if (this.user && typeof this.user === 'object') {\n return this.user.fullName;\n } else {\n return this.createdBy;\n }\n }\n\n get sourceTypeLabel() {\n switch (this.sourceType) {\n case ESynthesisSourceType.TEXT:\n return 'From text';\n case ESynthesisSourceType.RETROSYNTHESIS:\n return 'From retrosynthesis';\n }\n }\n}\n\nexport enum ESynthesisTypologyFilter {\n FROM_RETROSYNTHESIS = 'from_retrosynthesis',\n FROM_TEXT = 'from_text',\n}\n\nexport enum ESynthesisSourceType {\n TEXT = 'TEXT',\n RETROSYNTHESIS = 'RETROSYNTHESIS',\n}\n","import { SuperModel } from '@models/super-model.model';\nimport { Project } from '@models/project.model';\nimport { Group } from './group.model';\nimport { Country } from './country.model';\nimport { EPlanType } from './plan.model';\nexport class User extends SuperModel {\n role: UserRole;\n email: string;\n password?: string;\n firstName: string;\n lastName: string;\n fullName: string;\n company?: string;\n provider?: string;\n projects?: Project[];\n picture?: string;\n blocked?: boolean;\n apiKey?: string;\n isApiKeyLimitReached?: boolean;\n hasApiKeyCallsLimitation?: boolean;\n apiKeyCallsCount?: number;\n maxFreeApiKeyCalls?: number;\n roboRxnApiKey?: string;\n roboRxnEnabled: boolean;\n roboRxnApiKeyType: ERoboRxnApiKeyType;\n canUpgradePlan?: boolean;\n subscriptionInProgress?: boolean;\n planType: EPlanType;\n planDemoted?: boolean;\n migratedUser?: boolean;\n termsAccepted: string | Date;\n country: Country;\n canUseModelTuner?: boolean;\n\n lastLog?: string | Date;\n totalLogs?: number;\n totalProjects?: number;\n totalReactions?: number;\n totalFeedbecks?: number;\n subscriptionGroupId?: string;\n // avatar?: string;\n group: Group;\n walletId: string;\n\n constructor(user: Partial<User> = {}) {\n super(user);\n\n if (this.projects) {\n this.projects.map(project => new Project(project));\n }\n\n this.group = new Group(this.group || {});\n }\n\n get serialised() {\n return {\n email: this.email,\n password: this.password,\n name: this.firstName,\n surname: this.lastName,\n projects: this.projects && this.projects.map(project => project.serialised),\n picture: this.picture,\n apiKey: this.apiKey,\n country: this.country?.serialised,\n };\n }\n\n get groupName() {\n return this.group.name;\n }\n\n get isAdmin(): boolean {\n return this.role === UserRole.ADMIN;\n }\n\n get hasFreePlan(): boolean {\n return this.planType === EPlanType.FREE;\n }\n\n get hasNoLimitFileUpload(): boolean {\n return [EPlanType.PAYGO].includes(this.planType);\n }\n\n get isTeamOwner(): boolean {\n return this.planType === EPlanType.TEAM;\n }\n\n get isTeamMember(): boolean {\n return this.subscriptionGroupId !== null;\n }\n\n get isTerms(): boolean {\n return this.termsAccepted !== null;\n }\n\n get isBlocked(): boolean {\n return this.blocked;\n }\n\n get hasPayGoPlan(): boolean {\n return this.planType === EPlanType.PAYGO;\n }\n\n get hasSelectedCountry(): boolean {\n return (\n !!this.country &&\n !!this.country.countryCode2 &&\n !!this.country.countryCode3 &&\n !!this.country.countryName\n );\n }\n}\n\nexport enum UserRole {\n ADMIN = 'ADMIN',\n USER = 'USER',\n}\n\nexport enum ERoboRxnApiKeyType {\n ROBOT = 'robot',\n SIMULATOR = 'simulator',\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Observable } from 'rxjs/Observable';\nimport { HttpClient } from '@angular/common/http';\n\nimport { ApiSuperService, IApiResponse, IApiAction, IApiActionData } from '@bitf/api';\nimport { SimilarReaction, Tmap, TmapReaction } from '@app/core/models';\nimport { EAiModelType } from '@app/shared/enums/ai-model.enum';\n@Injectable({\n providedIn: 'root',\n})\nexport class ActionsService extends ApiSuperService {\n public tmapNumberOfNeighbors = 5; // suggested by Matteo Manica\n\n constructor(public http: HttpClient, injector: Injector) {\n super(injector);\n this.name = 'actions';\n }\n\n convertSimlesToSvgs(smilesList: string[]): Observable<IApiResponse<IApiActionData>> {\n return this.request({\n method: 'GET',\n path: `convert-smiles-to-svgs`,\n relation: 'actionData',\n queryParams: { smilesList },\n });\n }\n\n convertSimlesToMols(smilesList: string[]): Observable<IApiResponse<IApiActionData>> {\n return this.request({\n method: 'POST',\n path: `convert-smiles-to-mols`,\n relation: 'actionData',\n body: smilesList,\n isBodyRaw: true,\n });\n }\n\n validateSmiles(smiles: string): Observable<IApiResponse<IApiAction>> {\n return this.request<IApiAction>({\n method: 'GET',\n path: 'validate-smiles',\n relation: 'action',\n queryParams: { smiles },\n });\n }\n\n convertMaterialToSmiles(material: string): Observable<IApiResponse<IApiActionData>> {\n return this.request<IApiActionData>({\n method: 'POST',\n path: 'convert-material-to-smiles',\n relation: 'actionData',\n body: [material],\n isBodyRaw: true,\n });\n }\n\n convertSmilesToMaterial(smiles: string): Observable<IApiResponse<IApiActionData>> {\n return this.request<IApiActionData>({\n method: 'POST',\n path: 'convert-smiles-to-material',\n relation: 'actionData',\n body: [smiles],\n isBodyRaw: true,\n });\n }\n\n getSimilarReactionDocuments({\n smiles,\n page = 0,\n size = 10,\n referenceSize = 10,\n sort = 'score,DESC',\n aiModel,\n aiModelType,\n }: {\n smiles: string;\n page?: number;\n size?: number;\n referenceSize?: number;\n sort?: string;\n aiModelType: EAiModelType;\n aiModel: string;\n }): Observable<IApiResponse<SimilarReaction[]>> {\n return this.request<SimilarReaction[]>({\n method: 'GET',\n path: 'similar-reactions',\n relation: 'similar-reactions',\n queryParams: {\n smiles,\n size,\n referenceSize,\n sort,\n page,\n aiModelType,\n aiModel,\n },\n });\n }\n\n generateFingerprint(smiles: string): Observable<IApiResponse<IApiActionData>> {\n return this.request<IApiActionData>({\n method: 'GET',\n path: 'fingerprint',\n relation: 'actionData',\n queryParams: {\n smiles,\n },\n });\n }\n\n mapForReaction({\n aiModel,\n aiModelType,\n smiles,\n retrosynthesisSequenceId,\n }: {\n aiModel: string;\n aiModelType: EAiModelType;\n smiles?: string[];\n retrosynthesisSequenceId?: string;\n }) {\n return this.request<Tmap>({\n method: 'GET',\n path: `tmap/map-for-reactions`,\n relation: 'tmap',\n queryParams: {\n modelTag: aiModel,\n modelType: aiModelType,\n numberOfNeighbors: this.tmapNumberOfNeighbors,\n ...(smiles && smiles.filter(s => s).length > 0 && { smiles: smiles.join(',') }),\n ...(retrosynthesisSequenceId && { retrosynthesisSequenceId }),\n },\n });\n }\n\n renderReaction({\n vertexIndex,\n aiModel,\n aiModelType,\n showImage,\n imageBackgroundColor,\n }: {\n vertexIndex: number;\n aiModel: string;\n aiModelType: EAiModelType;\n showImage?: boolean;\n imageBackgroundColor?: string;\n }) {\n return this.request<TmapReaction>({\n method: 'GET',\n path: `tmap/render-reaction`,\n relation: 'tmap-reaction',\n queryParams: {\n ...(showImage && { showImage }),\n ...(imageBackgroundColor && { imageBackgroundColor }),\n modelTag: aiModel,\n modelType: aiModelType,\n vertexIndex,\n },\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { ApiSuperService, IApiRequest, IApiResponse } from '@app/libs/bitforce/api';\n\nimport { Activity } from '@app/core/models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ActivitiesService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'activities';\n }\n\n getQueuedActivities(requestParams: IApiRequest): Observable<IApiResponse<Activity[]>> {\n return this.get({\n ...requestParams,\n method: 'GET',\n path: `${this.apiUrl}${this.name}/${requestParams.relation}`,\n modelMapper: 'activities',\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { IPlanLevel, Plan } from '@app/core/models';\nimport { ApiSuperService, IApiResponse } from '@bitf/api';\nimport { Observable, of } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AdminService extends ApiSuperService {\n // mockApiUrl = 'https://b8d18e18-66eb-481b-a04d-259bcd048385.mock.pstmn.io/api/v1/';\n constructor(injector: Injector) {\n super(injector);\n this.name = 'admin';\n }\n\n getPlans(): Observable<IApiResponse<Plan[]>> {\n return this.request({\n method: 'GET',\n path: 'plans',\n modelMapper: 'plans',\n });\n }\n\n patchPlanLevel(planLevel: IPlanLevel): Observable<IApiResponse<IPlanLevel>> {\n return this.request({\n method: 'PATCH',\n path: 'plans-levels',\n body: { ...planLevel },\n isBodyRaw: true,\n modelMapper: 'plan-level',\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { AiModel, AiModelCategory } from '@app/core/models';\nimport { ApiSuperService, IApiResponse } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AiModelsService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'ai-models';\n }\n\n getAiModelsForRetrosynthesis({\n projectId,\n categoryName,\n }: {\n projectId?: string;\n categoryName?: string;\n }): Observable<IApiResponse<{ models: AiModel[] }>> {\n const queryParams = {\n ...(categoryName && { categoryName }),\n ...(projectId && { projectId }),\n };\n\n return this.request<{ models: AiModel[] }>({\n method: 'GET',\n path: 'retrosynthesis',\n queryParams,\n });\n }\n\n getAiModelsForPredictions(projectId?: string): Observable<IApiResponse<{ models: AiModel[] }>> {\n const queryParams = {};\n if (projectId) {\n queryParams['projectId'] = projectId;\n }\n return this.request<{ models: AiModel[] }>({\n method: 'GET',\n path: 'reaction',\n queryParams,\n });\n }\n\n getAiModelsForSynthesisFromSequence(projectId?: string) {\n const queryParams = {};\n if (projectId) {\n queryParams['projectId'] = projectId;\n }\n return this.request<{ models: AiModel[] }>({\n method: 'GET',\n path: 'smiles2actions',\n queryParams,\n });\n }\n\n getAiModelsForSynthesisFromText(projectId?: string) {\n const queryParams = {};\n if (projectId) {\n queryParams['projectId'] = projectId;\n }\n return this.request<{ models: AiModel[] }>({\n method: 'GET',\n path: 'paragraph2actions',\n queryParams,\n });\n }\n\n getAiModelsForPropertyPrediction(projectId?: string) {\n const queryParams = {};\n if (projectId) {\n queryParams['projectId'] = projectId;\n }\n return this.request<{ models: AiModel[] }>({\n method: 'GET',\n path: 'reaction-property-predictor',\n queryParams,\n });\n }\n\n getAiModelsForReactionCompletion(projectId?: string): Observable<IApiResponse<{ models: AiModel[] }>> {\n const queryParams = {};\n if (projectId) {\n queryParams['projectId'] = projectId;\n }\n return this.request<{ models: AiModel[] }>({\n method: 'GET',\n path: 'reaction-completion',\n queryParams,\n });\n }\n\n getAiModelCategoriesForRetrosynthesis(): Observable<IApiResponse<AiModelCategory[]>> {\n return this.request<AiModelCategory[]>({\n method: 'GET',\n path: 'retrosynthesis/categories',\n modelMapper: 'ai-model-categories',\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { ApiSuperService } from '@app/libs/bitforce/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AiTrainingModelsService extends ApiSuperService {\n // mockApiUrl = 'https://340cac68-939c-45bf-aca0-2d22ede80dc9.mock.pstmn.io/api/v1/';\n\n constructor(injector: Injector) {\n super(injector);\n this.name = 'ai-training-models';\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { ApiSuperService } from '@app/libs/bitforce/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AiTrainingFilesService extends ApiSuperService {\n // mockApiUrl = 'https://340cac68-939c-45bf-aca0-2d22ede80dc9.mock.pstmn.io/api/v1/';\n\n constructor(injector: Injector) {\n super(injector);\n this.name = 'ai-training-files';\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { ApiSuperService } from '@app/libs/bitforce/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReactionPropertyPredictionService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'reaction-properties-predictions';\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { IPlanForecast } from '@app/core/models';\nimport { ApiSuperService, IApiResponse } from '@app/libs/bitforce/api';\nimport { Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PlansService extends ApiSuperService {\n // mockApiUrl = 'https://b8d18e18-66eb-481b-a04d-259bcd048385.mock.pstmn.io/api/v1/';\n constructor(injector: Injector) {\n super(injector);\n this.name = 'plans';\n }\n\n getForecast(): Observable<IApiResponse<IPlanForecast[]>> {\n return this.request({\n method: 'GET',\n path: 'forecast',\n modelMapper: 'plan-forecast',\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { IAddressLookupResponse, IAddressFormat } from '@app/core/models';\nimport { ApiSuperService, IApiRequest, IApiResponse } from '@app/libs/bitforce/api';\nimport { Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AddressesService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'addresses';\n }\n\n validate(searchString: string): Observable<IApiResponse<IAddressLookupResponse>> {\n return this.request({\n method: 'POST',\n path: `validate`,\n body: { country: this.authService.user.country.countryCode3, searchString },\n isBodyRaw: true,\n modelMapper: 'address-lookup',\n });\n }\n\n format(formatUrl: string): Observable<IApiResponse<IAddressFormat>> {\n return this.request({\n method: 'POST',\n path: `format`,\n body: { formatUrl },\n isBodyRaw: true,\n modelMapper: 'address-format',\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { BillingOverview } from '@app/core/models';\nimport { ApiSuperService, IApiResponse } from '@app/libs/bitforce/api';\nimport { Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BillingsService extends ApiSuperService {\n // mockApiUrl = 'https://b8d18e18-66eb-481b-a04d-259bcd048385.mock.pstmn.io/api/v1/';\n constructor(injector: Injector) {\n super(injector);\n this.name = 'billings';\n }\n\n overview(): Observable<IApiResponse<BillingOverview>> {\n return this.request({\n method: 'GET',\n path: 'overview',\n modelMapper: 'billing-overview',\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Invitation, SubscriptionTeam, User } from '@app/core/models';\nimport { ApiSuperService, IApiResponse } from '@app/libs/bitforce/api';\nimport { Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SubscriptionsTeamService extends ApiSuperService {\n // mockApiUrl = 'https://b8d18e18-66eb-481b-a04d-259bcd048385.mock.pstmn.io/api/v1/';\n constructor(injector: Injector) {\n super(injector);\n this.name = 'subscription-team';\n }\n\n getCurrentSubscription(): Observable<IApiResponse<SubscriptionTeam>> {\n return this.request({\n method: 'GET',\n path: 'current',\n modelMapper: 'subscription-team',\n });\n }\n\n getInvitations(): Invitation[] {\n return [];\n }\n}\n","import { Injectable } from '@angular/core';\n// NOTE this is exposed here from '@bitf/services'\nimport { ConfigService, PaymentsService } from '.';\n\nimport { AuthService } from '@bitf/services/auth/auth.service';\nimport { GenericService } from '@bitf/services/generic/generic.service';\nimport { AttemptsService } from '@core/services/api/attempts.service';\nimport { CollaboratorsService } from '@core/services/api/collaborators.service';\nimport { MoleculesService } from '@core/services/api/molecules.service';\nimport { DraftsService } from '@core/services/api/drafts.service';\nimport { ProjectsService } from '@core/services/api/projects.service';\nimport { UsersService } from '@core/services/api/users.service';\nimport { EmailService } from '@core/services/api/email.service';\nimport { ReactionsService } from '@core/services/api/reactions.service';\nimport { ActionsService } from '@core/services/api/actions.service';\nimport { AdminService } from '@core/services/api/admin.service';\nimport { ReagentsService } from '@core/services/api/reagents.service';\nimport { ReactionsCollectionService } from '@core/services/api/reactions-collection.service';\nimport { ChallengesService } from '@core/services/api/challenges.service';\nimport { ChallengesResultsService } from '@core/services/api/challenges-results.service';\nimport { ParagraphToActionsService } from '@core/services/api/paragraph-to-actions.service';\nimport { AiModelsService } from '@core/services/api/ai-models.service';\nimport { RetrosynthesisService } from '@core/services/api/retrosynthesis.service';\nimport { RetrosynthesisSequencesService } from '@core/services/api/retrosynthesis-sequences.service';\nimport { GroupsService } from '@core/services/api/groups.service';\nimport { AiTrainingModelsService } from '@core/services/api/ai-training-models.service';\nimport { AiTrainingFilesService } from '@core/services/api/ai-training-files.service';\nimport { SynthesisExecutionsService } from '@core/services/api/synthesis-executions.service';\nimport { SynthesisProceduresService } from '@core/services/api/synthesis-procedures.service';\nimport { RobotRxnService } from '@core/services/api/roborxn.service';\nimport { FileEntriesService } from '@core/services/api/file-entries.service';\nimport { ActivitiesService } from '@core/services/api/activities.service';\nimport { ReactionPropertyPredictionService } from './reaction-property-prediction.service';\nimport { OpticalChemicalRecognitionService } from './optical-chemical-recognition.service';\nimport { HubspotService } from './hubspot.service';\nimport { PlansService } from './plans.service';\nimport { UserBillingInformationService } from './user-billing-informations.service';\nimport { AddressesService } from './addresses.service';\nimport { BillingsService } from './billings.service';\nimport { SubscriptionsService } from './subscriptions.service';\nimport { SubscriptionsTeamService } from './subscriptions-team.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ApiService {\n constructor(\n public aiModels: AiModelsService,\n public attempts: AttemptsService,\n public collaborators: CollaboratorsService,\n public drafts: DraftsService,\n public projects: ProjectsService,\n public molecules: MoleculesService,\n public users: UsersService,\n public emails: EmailService,\n public reactions: ReactionsService,\n public actions: ActionsService,\n public admin: AdminService,\n public auth: AuthService,\n public reagents: ReagentsService,\n public generic: GenericService,\n public reactionsCollection: ReactionsCollectionService,\n public challenges: ChallengesService,\n public challengesResults: ChallengesResultsService,\n public paragraphToActions: ParagraphToActionsService,\n public synthesisProcedures: SynthesisProceduresService,\n public synthesisExecutions: SynthesisExecutionsService,\n public retrosynthesis: RetrosynthesisService,\n public retrosynthesisSequences: RetrosynthesisSequencesService,\n public groups: GroupsService,\n public aiTrainingModels: AiTrainingModelsService,\n public aiTrainingFiles: AiTrainingFilesService,\n public robotRxn: RobotRxnService,\n public configs: ConfigService,\n public fileEntries: FileEntriesService,\n public activities: ActivitiesService,\n public reactionPropertyPrediction: ReactionPropertyPredictionService,\n public opticalChemicalRecognition: OpticalChemicalRecognitionService,\n public hubspot: HubspotService,\n public plans: PlansService,\n public addresses: AddressesService,\n public userBillingInformation: UserBillingInformationService,\n public subscriptions: SubscriptionsService,\n public billings: BillingsService,\n public payments: PaymentsService,\n public subscriptionsTeam: SubscriptionsTeamService\n ) {}\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { ApiSuperService, IApiRequest, IApiResponse } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AttemptsService extends ApiSuperService {\n // mockApiUrl = 'https://localhost:3002/';\n constructor(injector: Injector) {\n super(injector);\n this.name = 'attempts';\n }\n\n public submitFeedback(requestParams: IApiRequest): Observable<IApiResponse<any>> {\n return this.fetch({\n ...requestParams,\n method: 'POST',\n path: `${this.apiUrl}${this.name}/${requestParams.id}/feedback`,\n });\n }\n\n public likeDislikeAttempt(requestParams: IApiRequest): Observable<IApiResponse<any>> {\n return this.fetch({\n ...requestParams,\n method: 'POST',\n path: `${this.apiUrl}${this.name}/${requestParams.id}/${requestParams.action}`,\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { ApiSuperService, IApiAction, IApiRequest, IApiResponse } from '@bitf/api';\nimport { Observable, throwError, timer } from 'rxjs';\nimport { delayWhen, map, retryWhen } from 'rxjs/operators';\n\nimport { AuthService } from '@bitf/services';\nimport { ChallengeResult } from '@models';\n@Injectable({\n providedIn: 'root',\n})\nexport class ChallengesResultsService extends ApiSuperService {\n // mockApiUrl = 'https://localhost:3002/';\n checkResultsInterval = 5000;\n constructor(injector: Injector) {\n super(injector);\n this.name = 'challenges-results';\n }\n\n bulkDelete(requestParams: IApiRequest = {}): Observable<IApiResponse<IApiAction>> {\n return this.fetch({\n ...requestParams,\n method: 'DELETE',\n path: `${this.apiUrl}users/${this.authService.user.id}/${this.name}/delete-all`,\n }).pipe(\n map(envelope => this.parseEnvelope<IApiAction>(envelope, { ...requestParams, modelMapper: 'action' }))\n );\n }\n\n getChallengeResults(id: string): Observable<IApiResponse<ChallengeResult>> {\n return super\n .getById<ChallengeResult>({ id })\n .pipe(\n map(data => {\n if (data.metadata.uiMessages.errors.length) {\n throw new Error('PREDICTION_ERROR');\n }\n if (!this.isResultReady(data.content)) {\n throw new Error('PENDING');\n }\n return data;\n }),\n retryWhen(errorObs =>\n errorObs.pipe(\n delayWhen((error: Error) => {\n if (error.message === 'PENDING') {\n return timer(this.checkResultsInterval);\n }\n return throwError(error);\n })\n )\n )\n );\n }\n\n private isResultReady(challengeResult: ChallengeResult) {\n return !!challengeResult.machinePredictions;\n }\n}\n","import { Injectable, Injector } from '@angular/core';\n\nimport { ApiSuperService } from '@bitf/api';\n@Injectable({\n providedIn: 'root',\n})\nexport class ChallengesService extends ApiSuperService {\n // mockApiUrl = 'https://localhost:3002/';\n constructor(injector: Injector) {\n super(injector);\n this.name = 'challenges';\n }\n}\n","import { Injectable, Injector } from '@angular/core';\n\nimport { ApiSuperService } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CollaboratorsService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'collaborators';\n }\n}\n","import { Injectable, Injector } from '@angular/core';\n\nimport { ApiSuperService } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DraftsService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'drafts';\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { ApiSuperService } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class EmailService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'emails';\n }\n\n shareApp(email: string): Observable<any> {\n return super.fetch({\n method: 'POST',\n body: { email },\n path: `${this.apiUrl}emails/share-app`,\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\n\nimport { ApiSuperService } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FileEntriesService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'file-entries';\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { ApiSuperService, IApiResponse } from '@bitf/api';\nimport { Group } from '@models';\nimport { Observable, of } from 'rxjs';\nimport { delay } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class GroupsService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'user-groups';\n }\n\n mockGroups(params: any): Observable<IApiResponse<Group[]>> {\n const groups: Group[] = [\n new Group({\n id: '1',\n name: 'Group 1',\n description: 'description 1',\n totalUsers: 2,\n isDeletable: true,\n }),\n new Group({ id: '2', name: 'Group 2', description: 'description 2', totalUsers: 1 }),\n new Group({ id: '3', name: 'Group 3', description: 'description 3', totalUsers: 5 }),\n ];\n\n return of({\n content: groups,\n pagination: {\n first: true,\n last: true,\n page: 0,\n size: 10,\n itemsInPage: groups.length,\n totalItems: groups.length,\n totalPages: 1,\n },\n });\n }\n\n mockGroup(groupId: string): Observable<IApiResponse<Group>> {\n return of({\n content: new Group({ id: groupId, name: 'Group 1', description: 'description 1' }),\n }).pipe(delay(10));\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { ApiSuperService } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class HubspotService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'hubspot';\n }\n\n subscribeHubspot(): Observable<any> {\n return this.fetch({\n method: 'POST',\n path: `${this.apiUrl}hubspot/subscribe`,\n body: {},\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\n\nimport { ApiSuperService } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ConfigService extends ApiSuperService {\n // mockApiUrl = 'https://localhost:3002/';\n constructor(injector: Injector) {\n super(injector);\n this.name = 'config';\n }\n}\n","import { Injectable, Injector } from '@angular/core';\n\nimport { ApiSuperService } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RetrosynthesisSnapshotService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'retrosynthesis-snapshots';\n }\n}\n","import { Injectable } from '@angular/core';\nimport { CreateRetrosynthesisWizardDialogComponent } from '@app/shared/components/create-retrosynthesis-wizard-dialog/create-retrosynthesis-wizard-dialog.component';\nimport { CreateSynthesisWizardDialogComponent } from '@app/shared/components/create-synthesis-wizard-dialog/create-synthesis-wizard-dialog.component';\nimport { GetRoborxnKeyDialogComponent } from '@app/shared/components/get-roborxn-key/get-roborxn-key-dialog.component';\nimport { SelectProjectDialogComponent } from '@app/shared/components/select-project-dialog/select-project-dialog.component';\nimport { filter } from 'rxjs/operators';\nimport { EDialogCloseEventStatus } from '../dialog/dialog.enum';\nimport { IDialogCloseEvent } from '../dialog/dialog.interface';\nimport { DialogsService } from '../dialog/dialog.service';\nimport { Router } from '@angular/router';\nimport { Project } from '@app/core/models';\nimport { AuthService } from '@app/libs/bitforce/services';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CommonService {\n constructor(\n public router: Router,\n private dialogsService: DialogsService,\n private authService: AuthService\n ) {}\n\n onCreateForwardReaction() {\n this.dialogsService.dialog\n .open(SelectProjectDialogComponent, {\n title: 'Predict product',\n buttonCallToAction: 'Predict product',\n entityName: 'product',\n })\n .afterClosed()\n .pipe(filter((event: IDialogCloseEvent<Project>) => event.status === EDialogCloseEventStatus.OK))\n .subscribe((response: IDialogCloseEvent<Project>) => {\n this.router.navigate([\n 'projects',\n response.data.id,\n response.data.name,\n 'workspace',\n 'forward-reaction-prediction',\n ]);\n });\n }\n\n onCreatePredictRetrosyntheticRoutes() {\n this.dialogsService.dialog\n .open(CreateRetrosynthesisWizardDialogComponent, {})\n .afterClosed()\n .subscribe();\n }\n\n onPlanASynthesis() {\n if (!this.authService.user.roboRxnEnabled) {\n this.dialogsService.dialog\n .open(GetRoborxnKeyDialogComponent, {})\n .afterClosed()\n .subscribe();\n return;\n }\n this.dialogsService.dialog\n .open(CreateSynthesisWizardDialogComponent, {})\n .afterClosed()\n .subscribe();\n }\n\n onCreateReactionCompletion() {\n this.dialogsService.dialog\n .open(SelectProjectDialogComponent, {\n title: 'Predict reagents',\n buttonCallToAction: 'Predict reagents',\n entityName: 'reagent',\n })\n .afterClosed()\n .pipe(filter((event: IDialogCloseEvent<Project>) => event.status === EDialogCloseEventStatus.OK))\n .subscribe((response: IDialogCloseEvent<Project>) => {\n this.router.navigate([\n 'projects',\n response.data.id,\n response.data.name,\n 'reaction-completions',\n 'create',\n ]);\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { ApiSuperService } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MoleculesService extends ApiSuperService {\n // mockApiUrl = 'https://localhost:3002/';\n constructor(injector: Injector) {\n super(injector);\n this.name = 'molecules';\n }\n\n export(): Observable<any> {\n return this.fetch({\n method: 'GET',\n path: `${this.apiUrl}${this.name}/export`,\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { ApiSuperService } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class OpticalChemicalRecognitionService extends ApiSuperService {\n // mockApiUrl = 'http://localhost:3001/';\n constructor(injector: Injector) {\n super(injector);\n this.name = 'optical-chemical-recognition';\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Observable } from 'rxjs/Observable';\n\nimport { ApiSuperService, IApiRequest, IApiResponse } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ParagraphToActionsService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'paragraph-actions';\n }\n\n paragraphToActions(request: IApiRequest): Observable<IApiResponse<{ actionSequence: string }>> {\n return this.post<{ actionSequence: string }>(request);\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { ApiSuperService } from '@app/libs/bitforce/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PaymentsService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'payments';\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { ApiSuperService, IApiResponse } from '@bitf/api';\nimport { Project } from '@models/index';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ProjectsService extends ApiSuperService {\n // mockApiUrl = 'http://localhost:3001/';\n constructor(injector: Injector) {\n super(injector);\n this.name = 'projects';\n }\n\n export(project: Project): Observable<any> {\n return this.fetch({\n method: 'GET',\n path: `${this.apiUrl}${this.name}/${project.id}/export`,\n });\n }\n\n getProjectsWithRetrosynthesis(): Observable<IApiResponse<Project[]>> {\n return this.request({\n method: 'GET',\n path: 'with-retrosynthesis',\n relation: 'projects',\n queryParams: {\n size: 1000,\n },\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\n\nimport { ApiSuperService } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReactionsCollectionService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'reactions-collection';\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Observable, Observer, throwError, timer } from 'rxjs';\nimport { delayWhen, map, retryWhen } from 'rxjs/operators';\n\nimport { PredictionTask } from '@app/core/models/prediction-task.model';\nimport { ApiSuperService, IApiResponse } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReactionsService extends ApiSuperService {\n // mockApiUrl = 'https://localhost:3002/';\n checkOutcomesInterval = 5000;\n\n constructor(injector: Injector) {\n super(injector);\n this.name = 'predictions';\n }\n\n predict(\n projectId: string,\n predictionData: any,\n predictionTaskId: string = '',\n beam: boolean = false\n ): Observable<IApiResponse<PredictionTask>> {\n const queryParams: any = { projectId };\n if (predictionTaskId) {\n queryParams.predictionId = predictionTaskId;\n }\n return this.request({\n path: `${beam ? 'prb' : 'pr'}`,\n method: 'POST',\n body: predictionData,\n isBodyRaw: true,\n queryParams,\n });\n }\n\n getOutcomes(id: string) {\n return new Observable((observer: Observer<IApiResponse<PredictionTask>>) => {\n super\n .getById<PredictionTask>({ id, embed: ['createdBy'] })\n .pipe(\n map(data => {\n if (data.metadata.uiMessages.errors.length) {\n throw new Error('PREDICTION_ERROR');\n }\n if (!this.areOutcomesReady(data.content)) {\n throw new Error('PENDING');\n }\n if (data.content.status === 'PREDICTION_READY') {\n observer.next(data);\n throw new Error('PENDING');\n }\n return data;\n }),\n retryWhen(errorObs =>\n errorObs.pipe(\n delayWhen((error: Error) => {\n if (error.message === 'PENDING') {\n return timer(this.checkOutcomesInterval);\n }\n return throwError(error);\n })\n )\n )\n )\n .subscribe(response => {\n observer.next(response);\n observer.complete();\n });\n });\n }\n\n private areOutcomesReady(predictionTask: PredictionTask) {\n if (predictionTask.status === 'PENDING') {\n return false;\n }\n if (!predictionTask.attempts || (!predictionTask.attempts.length && predictionTask.status !== 'ERROR')) {\n return false;\n }\n if (predictionTask.status === 'NEW' && predictionTask.type === 'prb') {\n return false;\n }\n return true;\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { ApiSuperService } from '@bitf/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReagentsService extends ApiSuperService {\n // mockApiUrl = 'https://localhost:3002/';\n constructor(injector: Injector) {\n super(injector);\n this.name = 'reagents';\n }\n\n export(): Observable<any> {\n return this.request({\n method: 'GET',\n path: `${this.name}/export`,\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { ApiSuperService } from '@app/libs/bitforce/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RetrosynthesisSequencesService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'sequences';\n }\n}\n","import { IApiResponse } from '@app/libs/bitforce/api';\nimport { Observable, of, Subject } from 'rxjs';\nimport { catchError, filter, finalize, repeatWhen, switchMap, takeUntil, tap } from 'rxjs/operators';\nimport { ERetrosynthesisStatus, Retrosynthesis } from '../models';\n\nexport function retrosynthesisPolling({\n intervalMs,\n service,\n}: {\n intervalMs: number;\n service: RetroService;\n}) {\n const nextPoll$ = new Subject<void>();\n const complete$ = new Subject<void>();\n let timeoutId: any;\n return of(null).pipe(\n repeatWhen(() => nextPoll$),\n takeUntil(complete$),\n switchMap(() =>\n service.getRetrosynthesisResult().pipe(\n tap(response => {\n if (\n response.metadata &&\n response.metadata.uiMessages &&\n response.metadata.uiMessages.errors.length\n ) {\n throw new Error(ERetrosynthesisStatus.ERROR);\n }\n\n if (response.content.status === ERetrosynthesisStatus.ERROR) {\n throw new Error(ERetrosynthesisStatus.ERROR);\n }\n }),\n catchError(err => {\n console.error(err);\n throw err;\n })\n )\n ),\n switchMap(response => {\n const success =\n response.content.status === ERetrosynthesisStatus.SUCCESS ||\n response.content.status === ERetrosynthesisStatus.DONE;\n\n if (success) {\n complete$.next();\n return of(response);\n }\n\n return of(response).pipe(\n tap(() => {\n timeoutId = setTimeout(() => nextPoll$.next(), intervalMs);\n })\n );\n }),\n finalize(() => clearTimeout(timeoutId)),\n filter(response =>\n [\n ERetrosynthesisStatus.PROCESSING,\n ERetrosynthesisStatus.RETROSYNTHESIS_READY,\n ERetrosynthesisStatus.SUCCESS,\n ERetrosynthesisStatus.NEW,\n ERetrosynthesisStatus.DONE,\n ].includes(response.content.status)\n )\n );\n}\n\ninterface RetroService {\n getRetrosynthesisResult(): Observable<IApiResponse<Retrosynthesis>>;\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { IApiRequest, IApiResponse } from '@app/libs/bitforce/api';\nimport { ApiSuperService } from '@bitf/api/api-super.service';\nimport { ERetrosynthesisStatus, QueueState, Retrosynthesis, RetrosynthesisWizardConfig } from '@models';\nimport { interval, Observable, of } from 'rxjs';\nimport { catchError, startWith, switchMap } from 'rxjs/operators';\nimport { retrosynthesisPolling } from '../retrosynthesis-polling';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RetrosynthesisService extends ApiSuperService {\n // mockApiUrl = 'http://localhost:3001/';\n checkOutcomesInterval = 15000;\n expandInterval = 2000;\n pollQueueStateInterval = 50000;\n\n constructor(injector: Injector) {\n super(injector);\n this.name = 'retrosynthesis';\n }\n\n getWizardConfig({ categoryName }: { categoryName?: string }) {\n return this.request<RetrosynthesisWizardConfig>({\n method: 'GET',\n path: `config`,\n relation: 'retrosynthesis/config',\n queryParams: {\n ...(categoryName && { categoryName }),\n },\n });\n }\n\n getRetrosynthesis(request: IApiRequest): Observable<IApiResponse<Retrosynthesis>> {\n return retrosynthesisPolling({\n intervalMs: this.checkOutcomesInterval,\n service: {\n getRetrosynthesisResult: () => super.getById<Retrosynthesis>(request),\n },\n });\n }\n\n getExpandSequences({\n retroId,\n nodeId,\n }: {\n retroId: string;\n nodeId: string;\n }): Observable<IApiResponse<Retrosynthesis>> {\n return this.request<Retrosynthesis>({\n method: 'GET',\n relation: 'expand-molecule',\n path: `${retroId}/expand-molecule/${nodeId}`,\n }).pipe(\n switchMap(response => {\n if (response.content.status === ERetrosynthesisStatus.DONE) {\n return of(response);\n }\n const taskId = response.content.task.task_id;\n if (taskId !== undefined) {\n return retrosynthesisPolling({\n intervalMs: this.expandInterval,\n service: {\n getRetrosynthesisResult: () =>\n this.request<Retrosynthesis>({\n method: 'GET',\n relation: 'expand-molecule',\n path: `${retroId}/expand-molecule/${nodeId}/result/${taskId}`,\n }),\n },\n });\n }\n\n return of(response);\n })\n );\n }\n\n pollQueueState(): Observable<IApiResponse<QueueState>> {\n return interval(this.pollQueueStateInterval).pipe(\n startWith(1),\n switchMap(() =>\n super\n .getRel<QueueState>({ relation: 'queue-state' } as IApiRequest)\n .pipe(catchError(e => of({ content: undefined })))\n )\n );\n }\n\n shareRetrosynthesis(selectedSequenceId: string): Observable<IApiResponse<IShareRetrosynthesis>> {\n return this.postRel({\n relation: 'share',\n id: selectedSequenceId,\n body: {\n sequenceId: selectedSequenceId,\n },\n isBodyRaw: true,\n });\n }\n}\n\ninterface IShareRetrosynthesis {\n id: string;\n hashtags: string[];\n content: string;\n}\n","import { Injectable, Injector } from '@angular/core';\n\nimport { ApiSuperService } from '@bitf/api';\nimport { IHardwareSettings } from '@app/core/models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RobotRxnService extends ApiSuperService {\n // mockApiUrl = 'https://83b3046e-8bbe-4b29-a893-6a9d7059324b.mock.pstmn.io/api/v1/';\n\n constructor(injector: Injector) {\n super(injector);\n this.name = 'roborxn';\n }\n\n getRobotHardwareSettings() {\n return this.getRel<IHardwareSettings>({\n relation: 'hardware-settings',\n });\n }\n\n deleteIngredient(ingredientName: string, nodeId: string) {\n return this.request({\n method: 'DELETE',\n path: `ingredients/${ingredientName}/`,\n isBodyRaw: true,\n body: {\n nodeId,\n },\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Subscription, SubscriptionCost } from '@app/core/models';\nimport { ApiSuperService, IApiAction, IApiRequest, IApiResponse } from '@app/libs/bitforce/api';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SubscriptionsService extends ApiSuperService {\n // mockApiUrl = 'https://b8d18e18-66eb-481b-a04d-259bcd048385.mock.pstmn.io/api/v1/';\n constructor(injector: Injector) {\n super(injector);\n this.name = 'subscriptions';\n }\n\n cost(planId: string): Observable<IApiResponse<SubscriptionCost>> {\n return this.request({\n method: 'POST',\n path: `cost`,\n body: {\n planId,\n },\n modelMapper: 'subscription-cost',\n isBodyRaw: true,\n });\n }\n\n currentSubscription(): Observable<IApiResponse<Subscription>> {\n return this.request({\n method: 'GET',\n });\n }\n\n deleteCurrentSubscription(): Observable<IApiResponse<IApiAction>> {\n return this.request({\n method: 'DELETE',\n });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\n\nimport { ApiSuperService } from '@bitf/api/api-super.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SynthesisExecutionsService extends ApiSuperService {\n // mockApiUrl = 'https://83b3046e-8bbe-4b29-a893-6a9d7059324b.mock.pstmn.io/api/v1/';\n\n constructor(injector: Injector) {\n super(injector);\n this.name = 'synthesis-executions';\n }\n}\n","import { Injectable, Injector } from '@angular/core';\n\nimport { ApiSuperService } from '@bitf/api/api-super.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SynthesisProceduresService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'synthesis';\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { ApiSuperService } from '@app/libs/bitforce/api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UserBillingInformationService extends ApiSuperService {\n constructor(injector: Injector) {\n super(injector);\n this.name = 'user-billing-informations';\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { UserPlanUsage, User, IPaymentMethod } from '@app/core/models';\nimport { ApiSuperService, IApiResponse } from '@bitf/api';\nimport { AuthService } from '@app/libs/bitforce/services';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UsersService extends ApiSuperService {\n // mockApiUrl = 'https://localhost:3002/';\n user: User;\n\n constructor(injector: Injector) {\n super(injector);\n this.name = 'users';\n }\n\n logout() {\n localStorage.setItem('upgradeLater', 'false');\n return this.http.post(`${this.apiUrl}${this.name}/logout`, {});\n }\n\n // on api side we can use one method for each case\n changePasswordUsingToken(params: { token: string; password: string }): Observable<any> {\n return this.fetch({\n method: 'POST',\n path: `${this.apiUrl}users/change-password`,\n body: params,\n });\n }\n\n changePassword(params: { password: string; currentPassword: string }): Observable<any> {\n return this.fetch({\n method: 'POST',\n path: `${this.apiUrl}users/change-password`,\n body: params,\n });\n }\n\n generateKey(): Observable<any> {\n return this.fetch({\n method: 'POST',\n path: `${this.apiUrl}users/apikey`,\n body: {},\n });\n }\n\n removeKey(): Observable<any> {\n return this.fetch({\n method: 'DELETE',\n path: `${this.apiUrl}users/apikey`,\n body: {},\n });\n }\n\n addTerms(): Observable<any> {\n return this.fetch({\n method: 'POST',\n path: `${this.apiUrl}users/terms`,\n body: {},\n });\n }\n\n getPlanUsage(): Observable<IApiResponse<UserPlanUsage>> {\n return this.request({\n method: 'GET',\n path: `${this.authService.userId}/usage`,\n modelMapper: 'user-plan-usage',\n });\n }\n\n getPaymentMethods(): Observable<IApiResponse<IPaymentMethod[]>> {\n return this.request({\n method: 'GET',\n path: `payment-methods`,\n modelMapper: 'payment-method',\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { environment } from '@env/environment';\nimport { APP_VERSION } from '@env/version';\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\nimport { Breakpoints, BreakpointObserver } from '@angular/cdk/layout';\n\nimport { Challenge, Project } from '@models';\nimport { configs } from '@configs';\nimport { EventTrackingService } from '@services/event-tracking/event-tracking.service';\n\nimport { IActiveFilters } from '@app/shared/components/filters/filters.component';\nimport { IIbmSearchData } from '@app/shared/components/search-bar/search-bar.interface';\nimport { TableHeaderItem } from 'carbon-components-angular';\nimport { ETableList } from '@app/shared/enums/table-list.enum';\nimport { Platform } from '@angular/cdk/platform';\n\nexport type SidebarType = 'left' | 'right';\nexport type LeftSideBarPanel = 'change-password' | 'user-profile';\nexport type RightSideBarPanel = 'project-collaborators' | 'project-archive' | 'project-delete';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AppSessionService {\n activeBreakpoints = {\n isXSmall: false,\n isSmall: false,\n isMedium: false,\n isLarge: false,\n isXLarge: false,\n isHandset: false,\n isTablet: false,\n isWeb: false,\n isHandsetPortrait: false,\n isTabletPortrait: false,\n isWebPortrait: false,\n isHandsetLandscape: false,\n isTabletLandscape: false,\n isWebLandscape: false,\n };\n\n platformInformation = {\n isAndroid: false,\n isIOS: false,\n isFirefox: false,\n isWebkit: false,\n isTrident: false,\n isEdge: false,\n isSafari: false,\n };\n\n challenge: Challenge;\n isAdminArea = false;\n isAccountArea = false;\n isLeftSidenavVisible = false;\n isLeftSidenavActive = false;\n listTableState: {\n [key in ETableList]?: {\n currentPage: number;\n pageLength: number;\n filters: IActiveFilters;\n searchData: IIbmSearchData;\n tableHeaders: TableHeaderItem[];\n };\n } = {};\n\n readonly activeBreakpointsChanges$ = new Subject<void>();\n private _uiHelpers: IUiHelper[] = [];\n private readonly currentProject$ = new BehaviorSubject<Project>(null);\n private readonly uiHelpers$ = new Subject<IUiHelper[]>();\n private readonly projectsFavorites$ = new Subject<void>();\n private sidebarActivePanel = {\n left: undefined,\n right: undefined,\n };\n\n private sidebarVisible = {\n left: false,\n right: false,\n };\n\n constructor(\n private eventTrackingService: EventTrackingService,\n private breakpointObserver: BreakpointObserver,\n private platform: Platform\n ) {\n this.eventTrackingService.init();\n this.initBreakpointListener();\n this.setPlatformInformation();\n\n if (!environment.production) {\n console.log('ENV', environment);\n }\n window['printEnv'] = () => {\n console.log('Environment: ', environment);\n console.log('App Version: ', APP_VERSION);\n };\n }\n\n isSidebarVisible(sidebarType: SidebarType): boolean {\n return this.sidebarVisible[sidebarType];\n }\n\n getActivePanel(sidebarType: SidebarType): LeftSideBarPanel | RightSideBarPanel {\n return this.sidebarActivePanel[sidebarType];\n }\n\n toggleSidebarVisibility(sidebarType: SidebarType): void {\n this.sidebarVisible[sidebarType] = !this.sidebarVisible[sidebarType];\n }\n\n setSidebarVisibility(sidebarType: SidebarType, isVisible: boolean): void {\n this.sidebarVisible[sidebarType] = isVisible;\n }\n\n setSidebarPanel(sidebarType: SidebarType, panel: LeftSideBarPanel | RightSideBarPanel): void {\n this.sidebarActivePanel[sidebarType] = panel;\n }\n\n cleanSession() {\n this.setSidebarVisibility('left', false);\n this.setSidebarVisibility('right', false);\n }\n\n private get redirectUrlKey() {\n return `${environment.appName}-redirectUrl`;\n }\n\n set redirectUrl(url: string) {\n localStorage.setItem(this.redirectUrlKey, url);\n }\n\n get redirectUrl(): string {\n const redirectUrl = localStorage.getItem(this.redirectUrlKey);\n localStorage.removeItem(this.redirectUrlKey);\n return redirectUrl || configs.general.homePageUrl;\n }\n\n get projectsFavoritesChanges() {\n return this.projectsFavorites$;\n }\n\n get currentProject() {\n return this.currentProject$;\n }\n\n setCurrentProject(project: Project | null) {\n this.currentProject$.next(project);\n }\n\n getUiHelper(element: EUiHelperElement): Observable<IUiHelper> {\n return this.uiHelpers$.pipe(\n map(el => el[element]),\n filter(el => el)\n );\n }\n\n showUIHelper(element: EUiHelperElement) {\n this._uiHelpers[element] = { element, active: true };\n this.uiHelpers$.next(this._uiHelpers);\n }\n\n hideUIHelper(element: EUiHelperElement) {\n this._uiHelpers[element] = { element, active: false };\n this.uiHelpers$.next(this._uiHelpers);\n }\n\n resetListTableStateForProject() {\n delete this.listTableState[ETableList.REACTIONS_LIST];\n delete this.listTableState[ETableList.REACTIONS_COMPLETION_LIST];\n delete this.listTableState[ETableList.RETROSYNTHESIS_LIST];\n delete this.listTableState[ETableList.SYNTHESIS_PROCEDURE_LIST];\n delete this.listTableState[ETableList.SYNTHESIS_EXECUTION_LIST];\n }\n\n private setPlatformInformation() {\n this.platformInformation.isIOS =\n this.platform.IOS || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1); // iPadOS is not detected as IOS\n this.platformInformation.isAndroid = this.platform.ANDROID;\n this.platformInformation.isFirefox = this.platform.FIREFOX;\n this.platformInformation.isWebkit = this.platform.WEBKIT;\n this.platformInformation.isEdge = this.platform.EDGE;\n this.platformInformation.isTrident = this.platform.TRIDENT;\n }\n\n private initBreakpointListener() {\n // Ref: https://material.io/design/layout/responsive-layout-grid.html#breakpoints\n this.breakpointObserver\n .observe([\n Breakpoints.XSmall,\n Breakpoints.Small,\n Breakpoints.Medium,\n Breakpoints.Large,\n Breakpoints.XLarge,\n Breakpoints.Handset,\n Breakpoints.Tablet,\n Breakpoints.Web,\n Breakpoints.HandsetPortrait,\n Breakpoints.TabletPortrait,\n Breakpoints.WebPortrait,\n Breakpoints.HandsetLandscape,\n Breakpoints.TabletLandscape,\n Breakpoints.WebLandscape,\n ])\n .subscribe(() => {\n this.activeBreakpoints.isXSmall = this.breakpointObserver.isMatched(Breakpoints.XSmall);\n this.activeBreakpoints.isSmall = this.breakpointObserver.isMatched(Breakpoints.Small);\n this.activeBreakpoints.isMedium = this.breakpointObserver.isMatched(Breakpoints.Medium);\n this.activeBreakpoints.isLarge = this.breakpointObserver.isMatched(Breakpoints.Large);\n this.activeBreakpoints.isXLarge = this.breakpointObserver.isMatched(Breakpoints.XLarge);\n this.activeBreakpoints.isHandset = this.breakpointObserver.isMatched(Breakpoints.Handset);\n this.activeBreakpoints.isTablet = this.breakpointObserver.isMatched(Breakpoints.Tablet);\n this.activeBreakpoints.isWeb = this.breakpointObserver.isMatched(Breakpoints.Web);\n this.activeBreakpoints.isHandsetPortrait = this.breakpointObserver.isMatched(\n Breakpoints.HandsetPortrait\n );\n this.activeBreakpoints.isTabletPortrait = this.breakpointObserver.isMatched(\n Breakpoints.TabletPortrait\n );\n this.activeBreakpoints.isWebPortrait = this.breakpointObserver.isMatched(Breakpoints.WebPortrait);\n this.activeBreakpoints.isHandsetLandscape = this.breakpointObserver.isMatched(\n Breakpoints.HandsetLandscape\n );\n this.activeBreakpoints.isTabletLandscape = this.breakpointObserver.isMatched(\n Breakpoints.TabletLandscape\n );\n this.activeBreakpoints.isWebLandscape = this.breakpointObserver.isMatched(Breakpoints.WebLandscape);\n this.activeBreakpointsChanges$.next();\n });\n }\n}\n\ninterface IUiHelper {\n element: EUiHelperElement;\n active: boolean;\n}\n\nexport enum EUiHelperElement {\n COPY_AND_CREATE_BUTTON = 'copy_and_create_button',\n}\n","// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT!\n/* tslint:disable */\nexport const APP_VERSION = '4.2.0';\nexport const APP_NAME = 'ibm-angular-mlrp';\nexport const FILE_HASH = '1732270266657';\nexport const BUILD_DATE = '2024-11-22T10:11:06.657Z';\n/* tslint:enable */\n","export enum EDialogCloseEventStatus {\n OK,\n CANCEL,\n CLOSE,\n ERROR,\n}\n","import { Injectable } from '@angular/core';\n\nimport { ModalService } from 'carbon-components-angular';\nimport { Observable, Subscriber } from 'rxjs';\nimport { IDialog, IDialogCloseEvent, IDialogService } from './dialog.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DialogsService implements IDialogService {\n public dialog: IDialog;\n closeEvent$: Observable<unknown>;\n\n constructor(public modalService: ModalService) {\n this.dialog = { open: this.wrapCarbonDialog.bind(this), closeAll: this.closeAll };\n }\n\n private wrapCarbonDialog(component: any, options: any) {\n let observer: Subscriber<IDialogCloseEvent<unknown>>;\n this.closeEvent$ = new Observable<IDialogCloseEvent<unknown>>(obs => {\n observer = obs;\n });\n\n let modal: any;\n this.openModal(component, options).then(mdl => {\n modal = mdl;\n mdl.instance.close.subscribe((result: IDialogCloseEvent<unknown>) => {\n if (observer) {\n observer.next(result);\n observer.complete();\n }\n });\n });\n\n return {\n afterClosed: () => this.closeEvent$,\n close: (dialogResult: IDialogCloseEvent<unknown>) => {\n if (modal) {\n modal.dismiss(dialogResult);\n }\n },\n };\n }\n\n private async openModal(component: any, options: any) {\n const modal = this.modalService.create({\n component,\n inputs: { dialogData: options },\n });\n return modal;\n }\n\n private closeAll() {}\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { TEventTrackingName, TLoginLogoutTrackingName } from './event-tracking.type';\nimport {\n IBluemixAnalyticsLoginEventOptions,\n IBluemixAnalyticsCreatedObjectOptions,\n} from './event-tracking.interface';\nimport { AuthService } from '@bitf/services';\n@Injectable({\n providedIn: 'root',\n})\n// NOTE: All config variables are managed from ibm-env.js, injected by docker env\nexport class EventTrackingService {\n isBluemixAnalitycsEnabled = window['blueMixAnalyticsEnabled'];\n bluemixAnalytics: any = undefined;\n\n private authService: AuthService;\n constructor(injector: Injector) {\n // NOTE this is to avoid circular DI\n setTimeout(() => {\n this.authService = injector.get(AuthService);\n });\n }\n\n init() {\n if (!this.isBluemixAnalitycsEnabled) {\n return;\n }\n // This should be loaded because the bluemix script is loaded before the angular app and\n // is sync (no async await)\n this.bluemixAnalytics = window['bluemixAnalytics'];\n }\n\n trackLoginLogout(eventName: TLoginLogoutTrackingName, options?: IBluemixAnalyticsLoginEventOptions) {\n const _options: IBluemixAnalyticsLoginEventOptions = {\n ...options,\n email: this.authService?.user?.email,\n loginMethod: 'IBM appId',\n userAgent: navigator.userAgent,\n };\n this.sendEvent(eventName, _options);\n }\n\n trackEvent(eventName: TEventTrackingName, options: Partial<IBluemixAnalyticsCreatedObjectOptions> = {}) {\n const _options: IBluemixAnalyticsCreatedObjectOptions = {\n objectType: eventName,\n ...options,\n };\n this.sendEvent('Created Object', _options);\n }\n\n private sendEvent(label: string, options: any) {\n if (!this.isBluemixAnalitycsEnabled) {\n return;\n }\n if (!this.bluemixAnalytics) {\n console.warn('bluemixAnalytics not loaded');\n return;\n }\n try {\n const now = new Date();\n this.bluemixAnalytics.trackEvent(label, {\n ...options,\n userId: `rxnId-${this.authService?.user?.id}`,\n timestamp: now.toISOString(),\n });\n } catch (error) {\n console.error('Error on bluemixAnalytics.trackEvent', error);\n }\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { environment } from '@env/environment';\n\ndeclare const FB: any;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SocialFbService {\n initialised = false;\n\n constructor() {\n this.init();\n }\n\n init(): Promise<any> {\n return new Promise((resolve, reject) => {\n if (this.initialised) {\n resolve({});\n return;\n }\n if (!FB) {\n reject({});\n return;\n }\n\n const params = {\n appId: environment.fbAppId,\n hideFlashCallback: () => {},\n cookie: null,\n status: null,\n version: 'v2.8',\n };\n\n try {\n resolve(FB.init(params));\n this.initialised = true;\n } catch (e) {\n reject(e);\n }\n });\n }\n\n ui(params): Promise<any> {\n return new Promise<any>((resolve, reject) => {\n this.init().then(\n result => {\n try {\n FB.ui(params, (response: any) => {\n if (!response) {\n reject();\n } else if (response.error) {\n reject(response.error);\n } else {\n resolve(response);\n }\n });\n } catch (e) {\n reject(e);\n }\n },\n error => reject(error)\n );\n });\n }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SocialGoogleService {\n constructor() {}\n googleShareUrl = 'https://plus.google.com/share?url=';\n\n share(url) {\n window.open(\n this.googleShareUrl + url,\n '',\n 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600'\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class KetcherDataService {\n private _smiles: string[] = [];\n\n get smiles(): string[] {\n return this._smiles;\n }\n\n set smiles(smiles: string[]) {\n this._smiles = smiles;\n }\n\n constructor() {}\n\n clear() {\n this._smiles = [];\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n ERoboRxnApiKeyType,\n IHardwareSettings,\n RetrosynthesisMolecule,\n SynthesisProcedure,\n} from '@app/core/models';\nimport { Subject } from 'rxjs';\nimport { ApiService } from './api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SynthesisReactionSettingsService {\n reactionSettingsState$: Subject<any> = new Subject<any>();\n isReactionSettingsFormTouched = false;\n isReactionIngredientsFormTouched = false;\n\n synthesis: SynthesisProcedure;\n molecule: RetrosynthesisMolecule;\n hardwareSettings: IHardwareSettings;\n\n constructor(private apiService: ApiService) {}\n\n get isSimulator() {\n return this.apiService.auth.user.roboRxnApiKeyType === ERoboRxnApiKeyType.SIMULATOR;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { SocketService } from './socket.service';\nimport { ESocketNotificationLevel, ESocketNotificationTarget, SocketNotification } from '../models';\nimport { EToastMessageType } from './toast-messages/toast-message.enum';\nimport { ToastMessagesService } from './toast-messages/toast-messages.service';\nimport { DialogsService } from './dialog/dialog.service';\nimport { OkCancelDialogComponent } from '@app/shared/components/ok-cancel-dialog/ok-cancel-dialog.component';\nimport { Subject } from 'rxjs';\n@Injectable({\n providedIn: 'root',\n})\nexport class SocketNotificationService {\n notifications$ = new Subject<SocketNotification>();\n constructor(\n private socketService: SocketService,\n private toastMessagesService: ToastMessagesService,\n private dialogsService: DialogsService\n ) {}\n\n init() {\n this.socketService\n .watch<SocketNotification>('/user/topic/notification', 'socket-notifications')\n .subscribe(response => {\n this.parseNotification(response.content);\n this.notifications$.next(response.content);\n });\n }\n\n private parseNotification(notification: SocketNotification) {\n switch (notification.target) {\n case ESocketNotificationTarget.TOAST:\n this.showToastMessages(notification);\n break;\n case ESocketNotificationTarget.DIALOG:\n this.showDialog(notification);\n break;\n }\n }\n\n private showToastMessages(notification: SocketNotification) {\n let toastMessageType: EToastMessageType;\n switch (notification.level) {\n case ESocketNotificationLevel.INFO:\n toastMessageType = EToastMessageType.INFO;\n break;\n case ESocketNotificationLevel.WARNING:\n toastMessageType = EToastMessageType.WARNING;\n break;\n case ESocketNotificationLevel.ERROR:\n toastMessageType = EToastMessageType.ERROR;\n break;\n case ESocketNotificationLevel.SUCCESS:\n toastMessageType = EToastMessageType.SUCCESS;\n break;\n default:\n toastMessageType = EToastMessageType.WARNING;\n break;\n }\n\n this.toastMessagesService.show({\n title: notification.title || '',\n message: notification.message || '',\n duration: notification.timeout || 10000,\n type: toastMessageType,\n });\n }\n\n private showDialog(notification: SocketNotification) {\n this.dialogsService.dialog.closeAll();\n this.dialogsService.dialog.open(OkCancelDialogComponent, {\n title: notification.title,\n message: notification.message,\n okText: 'Ok',\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { RxStomp } from '@stomp/rx-stomp';\nimport { Observable } from 'rxjs';\nimport { AuthService } from '@app/libs/bitforce/services';\nimport { map } from 'rxjs/operators';\nimport { environment } from '@env/environment';\nimport { responseParser } from '@app/libs/bitforce/api/parsers/default-parser';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SocketService {\n rxStomp?: RxStomp;\n\n constructor(private authService: AuthService) {}\n\n connect() {\n this.rxStomp = new RxStomp();\n this.rxStomp.configure({\n brokerURL: this.getWsUrl(),\n heartbeatIncoming: 0,\n heartbeatOutgoing: 20000,\n reconnectDelay: 200,\n beforeConnect: async client => {\n if (!this.authService.isTokenValid(this.authService.authToken)) {\n await this.authService.renewToken().toPromise();\n }\n\n client.stompClient.connectHeaders = {\n Authorization: this.authService.authToken,\n };\n },\n });\n this.rxStomp.activate();\n }\n\n private getWsUrl() {\n return `${environment.wsUrl}`;\n }\n\n watch<T>(destination: string, modelMapperEntityName: string = ''): Observable<ISocketResponse<T>> {\n return this.rxStomp.watch(destination).pipe(\n map(response => ({\n response: (response as any) as ISocketRawResponse,\n content: responseParser<T>({ payload: JSON.parse(response.body) }, modelMapperEntityName).content,\n }))\n );\n }\n\n unsubscribe() {\n if (this.rxStomp) {\n this.rxStomp.deactivate();\n }\n }\n}\n\nexport interface ISocketResponse<T> {\n response: ISocketRawResponse;\n content: T;\n}\n\nexport interface ISocketRawResponse {\n body: string;\n binaryBody: Uint8Array;\n command: string;\n headers: {\n 'content-length': string;\n 'message-id': string;\n subscription: string;\n 'content-type': string;\n destination: string;\n };\n isBinaryBody: boolean;\n}\n","export enum EToastVerticalPosition {\n TOP = 'top',\n BOTTOM = 'bottom',\n}\n\nexport enum EToastHorizontalPosition {\n START = 'start',\n CENTER = 'center',\n END = 'end',\n LEFT = 'left',\n RIGHT = 'right',\n}\n\nexport enum EToastMessageType {\n SUCCESS = 'SUCCESS',\n INFO = 'INFO',\n WARNING = 'WARNING',\n ERROR = 'ERROR',\n}\n","import { ComponentRef, Injectable } from '@angular/core';\n\nimport { Notification, NotificationService } from 'carbon-components-angular';\nimport { NotificationContent } from 'carbon-components-angular/notification/notification-content.interface';\nimport { EToastHorizontalPosition, EToastMessageType, EToastVerticalPosition } from './toast-message.enum';\nimport { IToastData } from './toast-message.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ToastMessagesService {\n constructor(protected notificationService: NotificationService) {}\n\n show(data: IToastData): ComponentRef<Notification> {\n const options = {\n duration: data.duration || 8000,\n horizontalPosition: data.horizontalPosition || EToastHorizontalPosition.CENTER,\n verticalPosition: data.verticalPosition || EToastVerticalPosition.BOTTOM,\n };\n\n const notification = this.notificationService.showToast({\n type: data?.type?.toLowerCase() || EToastMessageType.SUCCESS.toLocaleLowerCase(),\n title: data.title,\n duration: options.duration,\n closeLabel: 'Close',\n subtitle: data.message,\n target: '.notification-container',\n showClose: true,\n lowContrast: false,\n } as NotificationContent);\n\n return notification.componentRef;\n }\n\n close(notificationRef: ComponentRef<Notification>) {\n this.notificationService.close(notificationRef);\n }\n}\n","import { Observable, from, of } from 'rxjs';\nimport { map, filter, switchMap, retryWhen, catchError } from 'rxjs/operators';\nimport { environment } from '@env/environment';\nimport {\n HttpEvent,\n HttpEventType,\n HttpRequest,\n HttpParameterCodec,\n HttpParams,\n HttpResponse,\n HttpErrorResponse,\n} from '@angular/common/http';\nimport { HttpClient } from '@angular/common/http';\n\nimport { IApiRequest, IApiResponse, IApiCount, IApiAction } from './api.interfaces';\nimport { getParser } from '@bitf/api/parsers';\nimport { AuthService } from '../services';\nimport { Injector } from '@angular/core';\n\nexport abstract class ApiSuperService {\n mockApiUrl = '';\n name: string;\n parserType = 'defaultParser';\n fileUploadStatus = { info: '', loaded: 0, total: 0, percentage: 0 };\n protected http: HttpClient;\n protected authService: AuthService;\n\n constructor(protected injector: Injector) {\n this.http = injector.get(HttpClient);\n this.authService = injector.get(AuthService);\n }\n\n get<T>(requestParams: IApiRequest = {}): Observable<IApiResponse<T[]>> {\n return this.fetch({\n method: 'GET',\n path: `${this.apiUrl}${this.name}`,\n ...requestParams,\n }).pipe(map(envelope => this.parseEnvelope<T[]>(envelope, requestParams)));\n }\n\n getById<T>(requestParams: IApiRequest = {}): Observable<IApiResponse<T>> {\n return this.request<T>({ method: 'GET', path: `${requestParams.id}`, ...requestParams });\n }\n\n post<T>(requestParams: IApiRequest = {}): Observable<IApiResponse<T>> {\n return this.request<T>({ method: 'POST', ...requestParams });\n }\n\n patch<T>(requestParams: IApiRequest = {}): Observable<IApiResponse<T>> {\n return this.request<T>({ method: 'PATCH', path: `${requestParams.body.id}`, ...requestParams });\n }\n\n put<T>(requestParams: IApiRequest = {}): Observable<IApiResponse<T>> {\n return this.request<T>({ method: 'PUT', path: `${requestParams.body.id}`, ...requestParams });\n }\n\n delete(requestParams: IApiRequest = {}): Observable<IApiResponse<IApiAction>> {\n return this.fetch({\n ...requestParams,\n method: 'DELETE',\n path: `${this.apiUrl}${this.name}/${requestParams.id}`,\n }).pipe(\n map(envelope => this.parseEnvelope<IApiAction>(envelope, { ...requestParams, modelMapper: 'action' }))\n );\n }\n\n // FIXME: check the return type\n bulkDelete(requestParams: IApiRequest): Observable<IApiResponse<IApiAction>> {\n return this.fetch({\n ...requestParams,\n method: 'DELETE',\n path: `${this.apiUrl}${this.name}/delete-all`,\n }).pipe(\n map(envelope =>\n this.parseEnvelope<IApiAction>(envelope, { ...requestParams, modelMapper: 'actionData' })\n )\n );\n }\n\n count(requestParams: IApiRequest = {}): Observable<IApiResponse<IApiCount>> {\n return this.fetch({\n method: 'GET',\n path: `${this.apiUrl}${this.name}/count`,\n ...requestParams,\n }).pipe(\n map(envelope => this.parseEnvelope<IApiCount>(envelope, { ...requestParams, modelMapper: 'count' }))\n );\n }\n\n // METHODS to call related entities ====================================================\n private doGetRel(requestParams: IApiRequest) {\n let path = requestParams.id\n ? `${this.apiUrl}${this.name}/${requestParams.id}/${requestParams.relation}`\n : `${this.apiUrl}${this.name}/${requestParams.relation}`;\n path += requestParams.path ? requestParams.path : '';\n return this.fetch({\n method: 'GET',\n ...requestParams,\n path,\n });\n }\n\n getAction<T>(requestParams: IApiRequest): Observable<IApiResponse<T>> {\n return this.doGetRel(requestParams).pipe(map(envelope => this.parseEnvelope<T>(envelope, requestParams)));\n }\n\n getRel<T>(requestParams: IApiRequest): Observable<IApiResponse<T>> {\n return this.doGetRel(requestParams).pipe(map(envelope => this.parseEnvelope<T>(envelope, requestParams)));\n }\n\n getRels<T>(requestParams: IApiRequest): Observable<IApiResponse<T[]>> {\n return this.doGetRel(requestParams).pipe(\n map(envelope => this.parseEnvelope<T[]>(envelope, requestParams))\n );\n }\n\n getRelById<T>(requestParams: IApiRequest = {}): Observable<IApiResponse<T>> {\n return this.request<T>({\n method: 'GET',\n path: `${requestParams.id}/${requestParams.relation}/${requestParams.relationId}`,\n ...requestParams,\n });\n }\n\n postRel<T>(requestParams: IApiRequest) {\n return this.request<T>({\n method: 'POST',\n path: `${requestParams.id}/${requestParams.relation}`,\n ...requestParams,\n });\n }\n\n putRel<T>(requestParams: IApiRequest): Observable<any> {\n return this.request<T>({\n method: 'PUT',\n path: `${requestParams.id}/${requestParams.relation}/${requestParams.body.id ||\n requestParams.relationId}`,\n ...requestParams,\n });\n }\n\n patchRel<T>(requestParams: IApiRequest = {}): Observable<IApiResponse<T>> {\n return this.request<T>({\n method: 'PATCH',\n path: `${requestParams.id}/${requestParams.relation}/${requestParams.body.id ||\n requestParams.relationId}`,\n ...requestParams,\n });\n }\n\n deleteRel(requestParams: IApiRequest): Observable<IApiResponse<IApiAction>> {\n return this.fetch({\n method: 'DELETE',\n path: `${this.apiUrl}${this.name}/${requestParams.id}/${requestParams.relation}/${requestParams.relationId}`,\n ...requestParams,\n }).pipe(\n map(envelope => this.parseEnvelope<IApiAction>(envelope, { ...requestParams, modelMapper: 'action' }))\n );\n }\n\n deleteRelBulk<T>(requestParams: IApiRequest): Observable<IApiResponse<IApiAction>> {\n let path = `${this.apiUrl}${this.name}`;\n path += requestParams.id ? `/${requestParams.id}` : '';\n path += requestParams.relation ? `/${requestParams.relation}` : '';\n\n return this.fetch({\n method: 'DELETE',\n path,\n ...requestParams,\n }).pipe(\n map(envelope =>\n this.parseEnvelope<IApiAction>(envelope, { ...requestParams, modelMapper: 'actionData' })\n )\n );\n }\n\n countRel(requestParams: IApiRequest): Observable<IApiResponse<IApiCount>> {\n return this.fetch({\n method: 'GET',\n path: `${this.apiUrl}${this.name}/${requestParams.id}/${requestParams.relation}/count`,\n ...requestParams,\n }).pipe(\n map(envelope => this.parseEnvelope<IApiCount>(envelope, { ...requestParams, modelMapper: 'count' }))\n );\n }\n\n // ADD and remove already existing entity as relations\n addEditRel<T>(requestParams: IApiRequest): Observable<IApiResponse<IApiAction>> {\n return this.fetch({\n method: 'PUT',\n path: `${this.apiUrl}${this.name}/${requestParams.id}/${requestParams.relation}/rel/${requestParams.relationId}`,\n ...requestParams,\n }).pipe(\n map(envelope => this.parseEnvelope<IApiAction>(envelope, { ...requestParams, modelMapper: 'action' }))\n );\n }\n\n removeRel<T>(requestParams: IApiRequest): Observable<IApiResponse<IApiAction>> {\n return this.fetch({\n method: 'DELETE',\n path: `${this.apiUrl}${this.name}/${requestParams.id}/${requestParams.relation}/rel/${requestParams.relationId}`,\n ...requestParams,\n }).pipe(\n map(envelope => this.parseEnvelope<IApiAction>(envelope, { ...requestParams, modelMapper: 'action' }))\n );\n }\n\n upload<T>(requestParams: IApiRequest): Observable<IApiResponse<T>> {\n const formData = new FormData();\n requestParams.files.forEach((file: File, index) => {\n formData.append(`file-${index}`, file, file.name);\n });\n\n const builtRequestParams = this.buildRequest(requestParams);\n builtRequestParams.params = new HttpParams({\n encoder: HTTP_PARAMETERS_CODEC,\n fromObject: builtRequestParams.params,\n });\n\n const request = new HttpRequest(\n 'POST',\n `${this.apiUrl}${this.name}/upload`,\n formData,\n builtRequestParams\n );\n\n return this.http.request(request).pipe(\n map(event => this.getUploadStatus(event, {} as File)),\n filter(event => event.type === HttpEventType.Response),\n map((envelope: HttpResponse<any>) => this.parseEnvelope<T>(envelope.body, requestParams))\n );\n }\n\n /**\n * This is an Api helper that will parse the request and response, calling the this.apiUrl\n * as base endpoint\n */\n request<T>(requestParams: IApiRequest = {}): Observable<IApiResponse<T>> {\n const path = `${this.apiUrl}${this.name}` + (requestParams.path ? `/${requestParams.path}` : '');\n const request = this.fetch({\n ...requestParams,\n path,\n });\n return request.pipe(map(envelope => this.parseEnvelope<T>(envelope, requestParams)));\n }\n /**\n * This is a generic Api helper usefull to do HTTP calls to arbitrary endpoint without parsing the\n * response. Note taht this is parsing the request, so this method can call only application API's\n */\n fetch(requestParams: IApiRequest = {}): Observable<any> {\n const body = this.parseBody(requestParams);\n const request = this.buildRequest(requestParams);\n request.params = new HttpParams({\n encoder: HTTP_PARAMETERS_CODEC,\n fromObject: request.params,\n });\n let apiCall: Observable<any>;\n switch (requestParams.method) {\n case 'GET':\n {\n apiCall = this.http[requestParams.method.toLocaleLowerCase()](`${requestParams.path}`, request);\n }\n break;\n case 'DELETE':\n if (body) {\n apiCall = this.http.request('delete', `${requestParams.path}`, { body });\n break;\n }\n apiCall = this.http[requestParams.method.toLocaleLowerCase()](`${requestParams.path}`, body, request);\n break;\n case 'POST':\n case 'PUT':\n case 'PATCH':\n apiCall = this.http[requestParams.method.toLocaleLowerCase()](`${requestParams.path}`, body, request);\n break;\n }\n\n return of(this.authService.isTokenValid(this.authService.authToken)).pipe(\n switchMap(isTokenValid =>\n isTokenValid || !this.authService.isTokenValid(this.authService.refreshToken)\n ? of(true)\n : this.authService.renewToken().pipe(\n catchError(e => {\n // token invalidated manually from identity provider\n this.authService.logout();\n throw e;\n })\n )\n ),\n switchMap(() =>\n apiCall.pipe(\n retryWhen(retryEvent =>\n retryEvent.pipe(\n switchMap(errorEvent => {\n // NOTE: doing this in the constructor will lead errors since the authService use this class\n if (errorEvent instanceof HttpErrorResponse && errorEvent.status === 401) {\n return from(this.authService.renewToken()).pipe(\n catchError(() => {\n // token invalidated manually from identity provider\n this.authService.logout();\n // NOTE: forward the HttpErrorResponse not the renewToken one\n throw errorEvent;\n })\n );\n } else {\n throw errorEvent;\n }\n })\n )\n ),\n catchError(error => {\n error.method = requestParams.method;\n error.requestBody = requestParams.body;\n error.queryParams = requestParams.queryParams;\n throw error;\n })\n )\n )\n );\n }\n\n buildRequest(requestParams?: IApiRequest) {\n // Set / override of some header params\n requestParams.headers = requestParams.headers || [];\n if (requestParams.bodyParser === 'formUrlEncoded') {\n requestParams.headers.push({\n headerName: 'Content-Type',\n value: 'application/x-www-form-urlencoded',\n });\n }\n const parser = getParser(this.parserType);\n return parser.requestParser(requestParams);\n }\n\n getModelMapper(requestParams: IApiRequest) {\n const { relation, modelMapper } = requestParams;\n return modelMapper || relation || this.name;\n }\n\n parseEnvelope<T>(apiOutput, requestParams: IApiRequest): IApiResponse<T> {\n const parser = getParser(this.parserType);\n const parsedResponse: IApiResponse<T> = parser.responseParser(\n apiOutput,\n this.getModelMapper(requestParams)\n );\n\n return parsedResponse;\n }\n\n parseBody(requestParams: IApiRequest) {\n let body = requestParams.body;\n if (!body) {\n return {};\n }\n\n if (!requestParams.isBodyRaw) {\n if (body.length) {\n body = body.map(item => item.serialised);\n } else {\n body = body.serialised;\n }\n }\n\n switch (requestParams.bodyParser) {\n case 'formData':\n const formData = new FormData();\n Object.entries(body as Record<string, any>).forEach(([key, val]) => {\n formData.set(key, val);\n });\n return formData;\n case 'formUrlEncoded':\n const bodyString: string[] = [];\n Object.entries(body).forEach(([key, val]) => {\n bodyString.push(`${key}=${val}`);\n });\n return bodyString.join('&');\n default:\n return body;\n }\n }\n\n get apiUrl() {\n return this.mockApiUrl || environment.apiUrl;\n }\n\n protected getUploadStatus(event: HttpEvent<any>, file: File) {\n switch (event.type) {\n case HttpEventType.Sent:\n this.fileUploadStatus.info = `Uploading file \"${file.name}\" of size ${file.size}.`;\n break;\n case HttpEventType.UploadProgress:\n this.fileUploadStatus.percentage = Math.round((100 * event.loaded) / event.total);\n this.fileUploadStatus.loaded = event.loaded;\n this.fileUploadStatus.total = event.total;\n this.fileUploadStatus.info = `File \"${file.name}\" is ${this.fileUploadStatus.percentage}% uploaded.`;\n break;\n case HttpEventType.Response:\n this.fileUploadStatus = { info: '', loaded: 0, total: 0, percentage: 0 };\n break;\n default:\n this.fileUploadStatus.info = `File \"${file.name}\" surprising upload event: ${event.type}.`;\n break;\n }\n return event;\n }\n}\n\nconst HTTP_PARAMETERS_CODEC: HttpParameterCodec = {\n encodeKey(key: string): string {\n return encodeURIComponent(key);\n },\n encodeValue(value: string): string {\n return encodeURIComponent(value);\n },\n decodeKey(key: string): string {\n return decodeURIComponent(key);\n },\n decodeValue(value: string): string {\n return decodeURIComponent(value);\n },\n};\n","import { HttpHeaders } from '@angular/common/http';\ntype HttpMethods = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD';\nexport interface IApiRequest {\n id?: string | number;\n method?: HttpMethods;\n path?: string;\n headers?: { headerName: string; value: string }[];\n queryParams?: any;\n query?: any;\n embed?: string[];\n computedFields?: string[];\n page?: number;\n size?: number;\n sorting?: IApiSorting[];\n body?: any;\n bodyParser?: string;\n isBodyRaw?: boolean;\n files?: File[];\n relation?: string;\n relationId?: string | number;\n action?: string;\n responseType?: 'text' | 'arraybuffer' | 'blob' | 'json';\n modelMapper?: string;\n}\n\nexport interface IApiRequestParsed {\n headers?: HttpHeaders;\n withCredentials?: boolean;\n reportProgress?: boolean;\n responseType: string;\n}\n\nexport interface IApiResponse<T> {\n content: T;\n pagination?: IApiPagination;\n metadata?: IApiMetadata;\n sorting?: IApiSorting[];\n}\n\nexport interface IApiPagination {\n first: boolean;\n last: boolean;\n page: number;\n size: number; // max number of items per page\n itemsInPage: number; // number of items on current page, for example on\n // last page could be less than size\n totalItems: number;\n totalPages: number;\n}\n\nexport interface IApiSorting {\n property: string;\n direction: IApiSortDirection;\n default?: boolean;\n}\n\nexport enum IApiSortDirection {\n DESC = 'DESC',\n ASC = 'ASC',\n}\n\nexport interface IApiMetadata {\n uiMessages?: {\n infos: IApiMessage[];\n errors: IApiMessage[];\n warnings: IApiMessage[];\n };\n extendedPagination?: {\n numberOfRetrosynthesis: number;\n numberOfSequences: number;\n };\n}\n\nexport type uiMessageType = 'SUCCESS' | 'INFO' | 'WARNING' | 'ERROR';\nexport type uiMessageTarget = 'TOAST' | 'VALIDATION' | 'DIALOG' | 'CONSOLE';\nexport interface IApiMessage {\n code: string;\n title: string;\n message: string;\n type: uiMessageType;\n fieldId: string;\n target: uiMessageTarget;\n duration: number;\n}\n\nexport interface IApiCount {\n count: number;\n}\n\nexport interface IApiParser {\n requestParser(request: IApiRequest);\n responseParser<T>(apiOputput: any, relation: string): IApiResponse<T>;\n}\n\nexport interface IApiAction {\n success: boolean;\n}\n\nexport interface IApiActionData {\n data: any;\n}\n","import { IApiResponse, IApiPagination, IApiSorting, IApiCount, IApiAction, IApiActionData } from '@bitf/api';\n\nimport {\n IApiDefaultEnvelope,\n IApiDefaultPaginationResponse,\n IApiDefaultSortingResponse,\n} from './default-api.interfaces';\n\nimport { modelMapper, modelsMapper } from '@bitf/api/parsers';\n\nexport const responseParser = <T>(apiOutput: any, relation: string): IApiResponse<T> => {\n if (apiOutput instanceof ArrayBuffer) {\n return {\n content: apiOutput as any,\n };\n }\n\n const envelope = apiOutput as IApiDefaultEnvelope;\n\n if (!envelope) {\n return undefined;\n }\n\n const parsedEnvelope: IApiResponse<T> = { content: null };\n\n if (isResponsePaged(envelope.payload)) {\n // Un wrap embed and computedFields\n envelope.payload.content = envelope.payload.content.map(item => unwrapExtraModelFields(item));\n parsedEnvelope.content = modelsMapper(envelope.payload.content, relation);\n const { content, sort, ...pagination } = envelope.payload;\n parsedEnvelope.pagination = parsePagination(pagination);\n parsedEnvelope.sorting = parseSorting(sort);\n } else if (isResponseList(envelope.payload)) {\n if (relation === 'actionData') {\n const apiActionData: IApiActionData = { data: envelope.payload } as IApiActionData;\n parsedEnvelope.content = apiActionData as any;\n } else {\n envelope.payload = envelope.payload.map(item => unwrapExtraModelFields(item));\n parsedEnvelope.content = modelsMapper(envelope.payload, relation);\n }\n } else {\n switch (relation) {\n case 'count':\n const apiCount = { count: envelope.payload } as IApiCount;\n parsedEnvelope.content = apiCount as any;\n break;\n case 'action':\n const apiAction = { success: envelope.payload } as IApiAction;\n parsedEnvelope.content = apiAction as any;\n break;\n case 'actionData':\n const apiActionData: IApiActionData = { data: envelope.payload } as IApiActionData;\n parsedEnvelope.content = apiActionData as any;\n break;\n default:\n envelope.payload = unwrapExtraModelFields(envelope.payload);\n parsedEnvelope.content = modelMapper(envelope.payload, relation);\n }\n }\n\n if (envelope.metadata) {\n parsedEnvelope.metadata = envelope.metadata;\n }\n\n return parsedEnvelope;\n};\n\nfunction parsePagination(pagination: IApiDefaultPaginationResponse): IApiPagination {\n if (!pagination) {\n return;\n }\n const parsedPagination: IApiPagination = {\n first: pagination.first,\n last: pagination.last,\n page: pagination.number,\n size: pagination.size,\n itemsInPage: pagination.numberOfElements,\n totalItems: pagination.totalElements,\n totalPages: pagination.totalPages,\n };\n return parsedPagination;\n}\n\nfunction parseSorting(sortingResponse: IApiDefaultSortingResponse[]): IApiSorting[] {\n if (!sortingResponse || !sortingResponse.length) {\n return;\n }\n return sortingResponse.map(\n (sorting: IApiDefaultSortingResponse) =>\n ({\n property: sorting.property,\n direction: sorting.direction,\n } as IApiSorting)\n );\n}\n\nfunction unwrapExtraModelFields(item: any) {\n if (!item) {\n return;\n }\n const extraFields = ['embed', 'computedFields'];\n extraFields.forEach(extraField => {\n if (item[extraField]) {\n Object.entries(item[extraField]).forEach(([key, val]) => {\n item[key] = val;\n });\n }\n });\n\n // NOTE: don't use delete for performance reason\n const returnObj = {};\n Object.entries(item).forEach(([key, val]) => {\n if (!extraFields.includes(key)) {\n returnObj[key] = val;\n }\n });\n return returnObj;\n}\n\nfunction isResponsePaged(response: any): boolean {\n try {\n return 'content' in response && Array.isArray(response.content);\n } catch (e) {\n return false;\n }\n}\n\nfunction isResponseList(response: any): boolean {\n return Array.isArray(response);\n}\n","import { HttpHeaders } from '@angular/common/http';\n\nimport { IApiRequest, IApiSorting } from '@bitf/api';\nimport { IApiDefaultRequestParsed } from './default-api.interfaces';\n\nexport const requestParser = ({\n headers,\n queryParams,\n query,\n embed,\n computedFields,\n page,\n size,\n sorting,\n files,\n responseType,\n}: IApiRequest): any => {\n // TODO: add embed\n const options: IApiDefaultRequestParsed = {\n params: {},\n responseType: responseType || 'json',\n headers: new HttpHeaders(),\n };\n if (queryParams) {\n Object.assign(options.params, queryParams);\n }\n if (query) {\n options.params.raw = JSON.stringify(query);\n }\n if (embed && Array.isArray(embed)) {\n options.params.embed = embed.join(',');\n }\n if (computedFields && Array.isArray(computedFields)) {\n options.params.computedFields = computedFields.join(',');\n }\n if (!isNaN(page)) {\n options.params.page = page;\n }\n if (!isNaN(size)) {\n options.params.size = size;\n }\n\n if (sorting) {\n const sortingString = stringifySort(sorting);\n if (sortingString) {\n options.params.sort = sortingString;\n }\n }\n if (headers) {\n headers.forEach(header => {\n const { headerName, value } = header;\n options.headers = options.headers.append(headerName, value);\n });\n }\n if (files) {\n options.headers.append('Content-Type', 'multipart/form-data');\n options.reportProgress = true;\n }\n\n return options;\n};\n\nfunction stringifySort(sorting: IApiSorting[]): string[] {\n if (!sorting) {\n return [''];\n }\n return sorting.map((sortingItem: IApiSorting) =>\n sortingItem ? `${sortingItem.property},${sortingItem.direction}` : ''\n );\n}\n","import { IApiParser } from '../api.interfaces';\nimport { configs } from '@configs';\n\nexport const getParser = (parserName: string): IApiParser => {\n const selectedParser = configs.parser.parserStrategy[parserName];\n if (!selectedParser) {\n throw new Error(`parser ${parserName} not present`);\n }\n return selectedParser;\n};\n\nexport const modelMapper = (item, relation: string = null): any =>\n configs.parser.modelsMapperStrategy(item, relation);\n\nexport const modelsMapper = (items, relation: string = null): any =>\n items.map(item => configs.parser.modelsMapperStrategy(item, relation));\n","import { Type } from '@angular/core';\n\nexport interface ILoaderAction {\n customLoader?: ICustomLoader;\n params?: any;\n action: LoaderAction;\n}\nexport enum LoaderAction {\n SHOW = 'show',\n HIDE = 'hide',\n}\n\nexport interface ICustomLoader {\n component: Type<any>;\n params: any;\n}\n","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport { ILoaderAction, LoaderAction, ICustomLoader } from './loader.model';\nimport { configs } from '@configs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LoaderService {\n customLoader: ICustomLoader;\n onLoaderChange: Subject<ILoaderAction> = new Subject<ILoaderAction>();\n constructor() {}\n\n show(customLoader: ICustomLoader = null) {\n this.onLoaderChange.next({\n action: LoaderAction.SHOW,\n customLoader: customLoader || (configs.loaderService && configs.loaderService.customLoader),\n } as ILoaderAction);\n }\n\n hide() {\n this.onLoaderChange.next({ action: LoaderAction.HIDE } as ILoaderAction);\n }\n}\n","<ng-container *ngIf=\"isReady\">\n <div class=\"loader-overlay\"\n *ngIf=\"loaderType === 'default'\">\n <div class=\"loader-overlay-content\">\n <div class=\"spinner\">\n <div class=\"bounce1\"></div>\n <div class=\"bounce2\"></div>\n <div class=\"bounce3\"></div>\n </div>\n </div>\n </div>\n <div [hidden]=\"loaderType !== 'custom'\"\n class=\"loader-overlay\">\n <div class=\"loader-overlay-content\">\n <template #content></template>\n </div>\n </div>\n</ng-container>","import {\n Component,\n OnInit,\n ComponentRef,\n ViewContainerRef,\n ViewChild,\n ComponentFactory,\n ComponentFactoryResolver,\n} from '@angular/core';\n\nimport { LoaderService } from './loader.service';\nimport { ILoaderAction, LoaderAction, ICustomLoader } from './loader.model';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'bitf-loader',\n templateUrl: './loader.component.html',\n styleUrls: ['./loader.component.scss'],\n})\nexport class LoaderComponent implements OnInit {\n @ViewChild('content', { read: ViewContainerRef })\n content;\n componentRef: ComponentRef<Component> = null;\n isReady = false;\n loaderType;\n\n constructor(private loaderService: LoaderService, private resolver: ComponentFactoryResolver) {}\n\n ngOnInit() {\n this.loaderService.onLoaderChange.subscribe((loaderAction: ILoaderAction) => {\n switch (loaderAction.action) {\n case LoaderAction.SHOW:\n this.show(loaderAction.customLoader);\n break;\n case LoaderAction.HIDE:\n this.hide();\n }\n });\n }\n\n show(customLoader: ICustomLoader = null) {\n this.isReady = true;\n this.loaderType = undefined;\n setTimeout(() => {\n this.clearContent();\n\n let componentFactory: ComponentFactory<Component>;\n if (customLoader) {\n componentFactory = this.resolver.resolveComponentFactory(customLoader.component);\n }\n\n if (componentFactory && this.content) {\n this.loaderType = 'custom';\n this.componentRef = this.content.createComponent(componentFactory);\n Object.assign(this.componentRef.instance, customLoader.params || {});\n } else {\n this.loaderType = 'default';\n }\n });\n }\n\n hide() {\n this.isReady = false;\n if (this.componentRef) {\n this.componentRef.destroy();\n this.componentRef = undefined;\n }\n this.clearContent();\n }\n\n clearContent() {\n if (!this.content) {\n return;\n }\n this.content.clear();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { CanActivate, CanActivateChild, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { Observable } from 'rxjs/Observable';\nimport { of } from 'rxjs/observable/of';\nimport { finalize, map, catchError, tap } from 'rxjs/operators';\nimport { TimeoutError } from 'rxjs';\nimport { Router } from '@angular/router';\n\nimport { User } from '@models';\nimport { AppSessionService, UsersService } from '@services';\nimport { AuthService } from '@bitf/services';\nimport { configs } from '@configs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthGuard implements CanActivate, CanActivateChild {\n constructor(\n private authService: AuthService,\n private usersService: UsersService,\n private router: Router,\n private appSessionService: AppSessionService\n ) {}\n\n canActivate(\n next: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean> | Promise<boolean> | boolean {\n if (this.authService.user) {\n const canAccess = configs.guard.checkUserRoutePermission(state, this.authService);\n if (canAccess) {\n return true;\n }\n this.router.navigate([configs.general.homePageUrl]);\n return false;\n } else if (this.authService.authToken && this.authService.userId) {\n return this.usersService\n .getById<User>({ id: this.authService.userId })\n .pipe(\n tap(data => {\n this.authService.user = data.content;\n }),\n map(() => {\n const canAccess = configs.guard.checkUserRoutePermission(state, this.authService);\n if (canAccess) {\n return true;\n }\n this.router.navigate([configs.general.homePageUrl]);\n return false;\n }),\n finalize(() => {\n // this.authService.appReady = true;\n }),\n catchError(error => {\n if (!(error instanceof TimeoutError)) {\n this.authService.logout();\n }\n return of(false);\n })\n );\n } else {\n // NOTE: here we could add some re-auth mechanism\n this.appSessionService.redirectUrl = state.url;\n this.router.navigate(['/sign-in']);\n return false;\n }\n }\n\n canActivateChild(\n childRoute: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean> | Promise<boolean> | boolean {\n return this.canActivate(childRoute, state);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, CanActivateChild } from '@angular/router';\nimport { Observable } from 'rxjs/Observable';\nimport { Router } from '@angular/router';\n\nimport { configs } from '@configs';\nimport { environment } from '@env/environment';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class EcommerceGuard implements CanActivate, CanActivateChild {\n constructor(private router: Router) {}\n\n canActivate(\n next: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean> | Promise<boolean> | boolean {\n if (environment.ecommerceEnabled) {\n return true;\n }\n\n this.router.navigate([configs.general.homePageUrl]);\n return false;\n }\n\n canActivateChild(\n childRoute: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean> | Promise<boolean> | boolean {\n return this.canActivate(childRoute, state);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Pipe({ name: 'bitfSafeHtml' })\nexport class BitfSafeHtml implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n\n transform(style): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(style);\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Router } from '@angular/router';\nimport { Observable, Subject } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { IApiResponse } from '@bitf/api';\nimport { configs } from '@configs';\nimport { environment } from '@env/environment';\nimport { Login, User } from '@models';\nimport { AppSessionService } from '@services/app-session.service';\n\ndeclare global {\n interface Window {\n heap: any;\n }\n}\n\nexport class SuperAuthService {\n _user: User;\n _authToken: string;\n _refreshToken: string;\n user$: Subject<User> = new Subject();\n _authTokenMetaData: any;\n\n constructor(public http: HttpClient, public router: Router, public appSessionService: AppSessionService) {}\n\n get user() {\n return this._user;\n }\n\n set user(user: User) {\n this._user = user;\n this.user$.next(user);\n }\n\n login(loginResponse: Login, setHeapIdentify = true) {\n this.authToken = loginResponse.token;\n this.refreshToken = loginResponse.refreshToken;\n this.user = loginResponse.user;\n this.userId = loginResponse.user.id;\n this.idToken = loginResponse.idToken;\n if (environment.heap.enabled && setHeapIdentify) {\n try {\n window.heap.identify(this.user.id);\n const emailDomain = this.user.email.split('@').pop();\n window.heap.addUserProperties({\n Provider: this.user.provider,\n MigratedUser: this.user.migratedUser,\n SubscriptionType: this.user.planType,\n EmailDomain: emailDomain,\n });\n } catch (error) {\n console.log('heap deactivated');\n }\n }\n }\n\n logout() {\n let logoutUrl;\n if (this.idToken) {\n logoutUrl = environment.logoutUrl + this.idToken;\n }\n this.appSessionService.cleanSession();\n this.authToken = undefined;\n this.authTokenMetaData = undefined;\n this.userId = undefined;\n this.idToken = undefined;\n this.refreshToken = undefined;\n if (logoutUrl) {\n window.location.href = logoutUrl;\n } else {\n this.router.navigate([configs.general.loginUrl]);\n }\n }\n\n generateToken(token: string): Observable<IApiResponse<Login>> {\n const tokenGeneratorUrl = `${environment.apiUrl}auth/security/token`;\n const tokenApiConfig = configs.authService.getGenerateTokenApiConfig(token);\n return this.http.get(tokenGeneratorUrl, { ...tokenApiConfig }).pipe(\n map((envelope: any) => ({\n content: new Login(envelope.payload),\n }))\n );\n }\n\n renewToken() {\n if (!this.refreshToken) {\n throw new Error('refresh token not found');\n }\n const tokenGeneratorUrl = `${environment.apiUrl}auth/security/refresh-token`;\n\n return this.http.post(tokenGeneratorUrl, this.refreshToken).pipe(\n map((envelope: any) => ({\n content: new Login(envelope.payload),\n })),\n map(data => this.login(data.content, false))\n );\n }\n\n get authToken(): string | undefined {\n if (this._authToken) {\n if (this.isTokenValid(this._authToken) || this.refreshToken) {\n return this._authToken;\n }\n return undefined;\n } else {\n // Try to load it from the local storage\n const localStorageToken = localStorage.getItem(configs.authService.localStorageTokenName);\n if (this.isTokenValid(localStorageToken) || this.refreshToken) {\n this._authToken = localStorageToken;\n return localStorageToken;\n }\n return undefined;\n }\n }\n\n set authToken(token: string) {\n this._authToken = token;\n if (!token) {\n localStorage.removeItem(configs.authService.localStorageTokenName);\n } else {\n localStorage.setItem(configs.authService.localStorageTokenName, token);\n }\n }\n\n get refreshToken(): string | undefined {\n if (this._refreshToken) {\n if (this.isTokenValid(this._refreshToken)) {\n return this._refreshToken;\n }\n return undefined;\n } else {\n // Try to load it from the local storage\n const localStorageRefreshToken = localStorage.getItem(configs.authService.localStorageRefreshTokenName);\n if (this.isTokenValid(localStorageRefreshToken)) {\n this._refreshToken = localStorageRefreshToken;\n return localStorageRefreshToken;\n }\n return undefined;\n }\n }\n\n set refreshToken(refreshToken: string) {\n this._refreshToken = refreshToken;\n if (!refreshToken) {\n localStorage.removeItem(configs.authService.localStorageRefreshTokenName);\n } else {\n localStorage.setItem(configs.authService.localStorageRefreshTokenName, refreshToken);\n }\n }\n\n get authTokenMetaData() {\n if (this._authTokenMetaData) {\n return this._authTokenMetaData;\n }\n const metaData = localStorage.getItem(`${configs.authService.localStorageTokenName}MetaData`);\n if (metaData) {\n this._authTokenMetaData = JSON.parse(metaData);\n return this._authTokenMetaData;\n }\n }\n\n set authTokenMetaData(authTokenMetaData: any) {\n if (!authTokenMetaData) {\n localStorage.removeItem(`${configs.authService.localStorageTokenName}MetaData`);\n this._authTokenMetaData = undefined;\n } else {\n localStorage.setItem(\n `${configs.authService.localStorageTokenName}MetaData`,\n JSON.stringify(authTokenMetaData)\n );\n }\n }\n\n get rawAuthToken() {\n return localStorage.getItem(configs.authService.localStorageTokenName);\n }\n\n get userId() {\n return localStorage.getItem('userId');\n }\n\n set userId(userId: string) {\n if (userId) {\n localStorage.setItem('userId', userId);\n } else {\n localStorage.removeItem('userId');\n }\n }\n\n get idToken() {\n return localStorage.getItem('idToken');\n }\n\n set idToken(idToken: string) {\n if (idToken) {\n localStorage.setItem('idToken', idToken);\n } else {\n localStorage.removeItem('idToken');\n }\n }\n\n isTokenValid(token: string) {\n if (!token) {\n return false;\n }\n return true;\n }\n}\n","import { ErrorHandlerService } from '@bitf/services';\n\nexport function TryCatch(message?) {\n return function(target: any, propertyKey: string, descriptor: PropertyDescriptor) {\n let descriptorType = 'value';\n if (descriptor.get && typeof descriptor.get === 'function') {\n descriptorType = 'get';\n } else if (descriptor.set && typeof descriptor.set === 'function') {\n descriptorType = 'set';\n }\n const decoratorFunctionFactory = _decoratorFunctionFactory.bind(this);\n let originalFunction;\n if (descriptorType === 'value') {\n originalFunction = descriptor[descriptorType];\n descriptor.value = decoratorFunctionFactory(originalFunction, target, propertyKey);\n } else {\n originalFunction = descriptor.get;\n descriptor.get = decoratorFunctionFactory(originalFunction, target, propertyKey);\n originalFunction = descriptor.set;\n descriptor.set = decoratorFunctionFactory(originalFunction, target, propertyKey);\n }\n };\n}\n\nfunction _decoratorFunctionFactory(originalFunction, target, propertyKey) {\n return function(...args) {\n try {\n return originalFunction.apply(this, args);\n } catch (error) {\n const errorHandlerService = window['rootInjector'].get(ErrorHandlerService);\n errorHandlerService.handle(error, {\n fromDecorator: true,\n className: target.constructor.name,\n functionName: propertyKey,\n });\n }\n };\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { Router } from '@angular/router';\n\nimport { SuperAuthService } from './super-auth.service';\nimport { AppSessionService } from '@services/app-session.service';\nimport { TryCatch } from '../../decorators';\nimport jwtDecode from 'jwt-decode';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthService extends SuperAuthService {\n constructor(public http: HttpClient, public router: Router, public appSessionService: AppSessionService) {\n super(http, router, appSessionService);\n }\n\n get authTokenMetaData(): ITokenMetaData {\n if (this._authTokenMetaData) {\n return this._authTokenMetaData;\n }\n\n const metaData = this.decodeToken(this.authToken);\n if (metaData) {\n this._authTokenMetaData = metaData;\n return metaData;\n }\n }\n\n set authTokenMetaData(authTokenMetaData: ITokenMetaData) {\n super['authTokenMetaData'] = authTokenMetaData;\n }\n\n @TryCatch()\n decodeToken(token: string): ITokenMetaData {\n if (!token) {\n return;\n }\n return jwtDecode(token) as ITokenMetaData;\n }\n\n @TryCatch()\n isTokenValid(token: string) {\n const decodedToken = this.decodeToken(token);\n const tokenExpiration = this.getTokenExpirationInMilliseconds(decodedToken);\n if (!tokenExpiration) {\n return false;\n }\n return tokenExpiration > Date.now();\n }\n\n getTokenExpirationInMilliseconds(token: ITokenMetaData): number {\n if (token?.exp === undefined) {\n return null;\n }\n return token.exp * 1000;\n }\n}\n\nexport interface ITokenMetaData {\n iss: string;\n exp: number;\n sub: string; // user id\n iat: number;\n tenant: string;\n scope: string;\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { map } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport { IApiRequest, IApiResponse, IApiAction } from '@bitf/api/api.interfaces';\nimport { ApiSuperService } from '@bitf/api/api-super.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class GenericService extends ApiSuperService {\n // mockApiUrl = 'https://localhost:3002/';\n constructor(injector: Injector) {\n super(injector);\n this.name = '';\n }\n\n callAction(request: IApiRequest): Observable<IApiResponse<IApiAction>> {\n request.path = `${this.apiUrl}${this.name}${request.path}`;\n return this.fetch(request).pipe(\n map(envelope => this.parseEnvelope<IApiAction>(envelope, { ...request, modelMapper: 'action' }))\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { LocationStrategy, PathLocationStrategy } from '@angular/common';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { environment } from '@env/environment';\nimport { ClientJS } from 'clientjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LoggerService {\n constructor(private locationStrategy: LocationStrategy) {}\n\n log(params: ILoggerParams) {\n this.addToLogMessagesPipe(this.createLogObj(params));\n }\n\n private createLogObj(params) {\n const route =\n this.locationStrategy instanceof PathLocationStrategy\n ? this.locationStrategy.path()\n : window.location.href;\n const fullUrl = window.location.href;\n\n const logObj = { ...params, environment: environment.appName, route, fullUrl };\n const clientJs = new ClientJS();\n const browserData = clientJs.getBrowserData();\n Object.assign(logObj, {\n browser: browserData.browser,\n os: browserData.os,\n device: clientJs.getDeviceType(),\n timeZone: clientJs.getTimeZone(),\n });\n return logObj;\n }\n\n private addToLogMessagesPipe(message) {\n const keyName = 'logMessages';\n const logMessages = localStorage.getItem(keyName);\n let logMessagesArray = [];\n if (logMessages) {\n logMessagesArray = JSON.parse(logMessages);\n }\n logMessagesArray.unshift(message);\n // Trim the array to avoid overflow\n if (logMessagesArray.length > environment.loggerConfig.maxLogRentention) {\n logMessagesArray.length = environment.loggerConfig.maxLogRentention;\n }\n localStorage.setItem(keyName, JSON.stringify(logMessagesArray));\n\n if (!environment.production) {\n console.error(message);\n }\n }\n}\nexport interface ILoggerParams {\n error?: Error;\n httpErrorResponse?: HttpErrorResponse;\n fromDecorator?: boolean;\n level?: string;\n title?: string;\n description?: string;\n className?: string;\n functionName?: string;\n location?: string;\n pageUrl?: string;\n browser?;\n os?;\n device?;\n timezone?;\n}\n","import { Injectable, Injector, ErrorHandler } from '@angular/core';\nimport { LoggerService, ILoggerParams } from '@bitf/services';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { environment } from '@env/environment';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ErrorHandlerService extends ErrorHandler {\n constructor(private injector: Injector) {\n super();\n }\n\n handleError(error: Error | HttpErrorResponse) {\n this.handle(error);\n super.handleError(error);\n }\n\n handle(errorObj: Error | HttpErrorResponse, loggerParams: ILoggerParams = {}) {\n const loggerService = this.injector.get(LoggerService);\n const logObj: ILoggerParams = {};\n if (errorObj instanceof Error) {\n if (\n environment.loggerConfig.logExceptions ||\n (loggerParams.fromDecorator && environment.loggerConfig.logDecoratedExceptions)\n ) {\n const stackParts = errorObj.stack.split(/\\u000A/);\n Object.assign(logObj, {\n level: 'ERROR',\n title: 'Exception',\n description: stackParts[0],\n location: stackParts[1],\n });\n }\n } else if (errorObj instanceof HttpErrorResponse) {\n if (environment.loggerConfig.logHttpErrorsWithStatusesCodes.includes(errorObj.status)) {\n Object.assign(logObj, {\n level: 'ERROR',\n title: 'HttpErrorResponse',\n httpErrorResponse: {\n error: errorObj.error,\n url: errorObj.url,\n message: errorObj.message,\n name: errorObj.name,\n },\n });\n }\n } else {\n logObj.level = (loggerParams && loggerParams.level) || 'INFO';\n logObj.title = loggerParams.title || 'Generic log';\n logObj.description = loggerParams.description || 'Generic log';\n }\n if (Object.keys(logObj).length) {\n Object.assign(logObj, loggerParams);\n if (environment.loggerConfig.enabled) {\n loggerService.log(logObj);\n }\n }\n }\n}\n","import { Observable } from 'rxjs/Observable';\n\nexport function imageSizeValidator(\n image: Blob | File,\n imageSizeRules: IImageSizeValidation\n): Observable<IFileValidationResult> {\n const obs = Observable.create(observer => {\n const img = new Image();\n img.onload = () => {\n let result;\n if (imageSizeRules.height < img.height || imageSizeRules.width < img.width) {\n result = {\n isValid: false,\n errors: [\n `Image height and width must not exceed ${imageSizeRules.height}px x ${imageSizeRules.width}px.`,\n ],\n } as IFileValidationResult;\n } else {\n result = { isValid: true, errors: [] } as IFileValidationResult;\n }\n observer.next(result);\n };\n img.src = URL.createObjectURL(image);\n });\n return obs;\n}\n\nexport function inputFileValidator(data: IFileValidationRules): IFileValidationResult {\n const errors: string[] = [];\n\n if (!data.extensions) {\n const error = 'You have to provide accepted file extensions';\n errors.push(error);\n }\n\n if (!data.files || !data.files.length) {\n const error = 'No file has been selected';\n errors.push(error);\n }\n\n data.files.forEach(f => {\n const fileExt = f.name.split('.').pop();\n if (!data.extensions.includes(fileExt)) {\n const error = `File: ${f.name} - extension ${fileExt} is not accepted`;\n errors.push(error);\n }\n });\n\n if (data.maxFileSize) {\n data.files.forEach(f => {\n if (data.maxFileSize < f.size) {\n const error = `File: ${f.name} - size is too big`;\n errors.push(error);\n }\n });\n }\n\n if (data.maxNumberOfFiles && data.maxNumberOfFiles < data.files.length) {\n const error = `Number of allowed files equals ${data.maxNumberOfFiles}`;\n errors.push(error);\n }\n\n return { isValid: errors.length === 0, errors } as IFileValidationResult;\n}\n\nexport const bitfPromptToDownloadFile = (\n fileContent: ArrayBuffer | string,\n fileType: string,\n fileExtension: string,\n fileName?: string\n) => {\n const downloadFile = new Blob([fileContent], { type: fileType });\n const objectUrl = URL.createObjectURL(downloadFile);\n\n const a = document.createElement('a');\n a.href = objectUrl;\n if (fileName) {\n a.download = `${fileName}.${fileExtension}`;\n }\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n};\n\nexport interface IFileValidationRules {\n files: File[];\n extensions: string[];\n maxFileSize?: number;\n maxNumberOfFiles?: number;\n required?: boolean;\n}\n\nexport interface IImageSizeValidation {\n width: number;\n height: number;\n}\n\nexport interface IFileValidationResult {\n isValid: boolean;\n errors: string[];\n}\n","export function getRange(from: any, to: any, propertyName) {\n if (!from && !to) {\n return null;\n }\n\n if (from && to) {\n return {\n $and: [\n { [propertyName]: { $gte: getRangeValue(from) } },\n { [propertyName]: { $lte: getRangeValue(to) } },\n ],\n };\n }\n // if (from && to) {\n // return {\n // [propertyName]: { $gt: getRangeValue(from), $lt: getRangeValue(to) },\n // };\n // }\n\n if (from) {\n return { [propertyName]: { $gte: getRangeValue(from) } };\n }\n\n if (to) {\n return { [propertyName]: { $lte: getRangeValue(to) } };\n }\n}\n\nfunction getRangeValue(value: any) {\n if (value instanceof Date) {\n return { $date: `${value.toISOString()}` };\n } else {\n return value;\n }\n}\n\nexport function getMongoQuery(filters: any, searchText: string, searchTextFields: Array<string>) {\n if ((!filters || (filters && !filters.filtersQuery)) && !searchText) {\n return {};\n }\n\n let searchQuery = null;\n\n if (searchText) {\n searchQuery = { $or: getRegexQueryFromKeyword(searchText, searchTextFields) };\n if (!filters || !filters.filtersQuery) {\n return searchQuery;\n }\n }\n\n if (filters && filters.filtersQuery && !searchQuery) {\n return filters.filtersQuery;\n }\n\n return {\n $and: [searchQuery, filters.filtersQuery],\n };\n}\n\nexport function getRegexQueryFromKeyword(keyword: string, fields: string[], excludeKeyword = false) {\n if (excludeKeyword) {\n keyword = `^((?!${keyword}).)*$`;\n }\n keyword = keyword.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n const searchValue = { $regex: keyword, $options: 'i' };\n return fields.map((fieldName: string) => {\n const obj = {};\n obj[fieldName] = searchValue;\n return obj;\n });\n}\n","import { Component, OnInit } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\nimport { environment } from '@env/environment';\n\n@Component({\n selector: 'ibm-sign-in',\n templateUrl: './sign-in.component.html',\n styleUrls: ['./sign-in.component.scss'],\n})\nexport class SignInComponent implements OnInit {\n loginForm: UntypedFormGroup;\n hostUrl = environment.hostUrl;\n\n constructor() {}\n\n ngOnInit() {}\n\n goToSignUp() {\n window.open(\n environment.redirectUrl.replace('openid-connect/auth', 'openid-connect/registrations'),\n '_self'\n );\n }\n\n goToLogin() {\n window.open(environment.redirectUrl, '_self');\n }\n\n goToLoginGoogle() {\n window.open(environment.redirectUrl + '&kc_idp_hint=google', '_self');\n }\n\n goToLoginFacebook() {\n window.open(environment.redirectUrl + '&kc_idp_hint=facebook', '_self');\n }\n}\n","<header class=\"header\">\n <img src=\"assets/img/logo/ibm-logo.svg\"\n class=\"logo\" />\n\n <span class=\"title\">Accelerated Discovery</span>\n</header>\n\n<div ibmRow>\n <div ibmCol\n class=\"left-side\"\n [columnNumbers]=\"{lg:9, md:4, sm:6}\">\n <div ibmRow\n class=\"d-flex flex-column\">\n <h2 class=\"title\"> RXN for Chemistry </h2>\n <p class=\"description mt-6\">Predict reactions, find retrosynthesis pathways, and derive experimental\n procedures with RXN for Chemistry.</p>\n </div>\n <div ibmRow\n class=\"mt-10\">\n <button ibmButton=\"primary\"\n class=\"mr-7 button-main\"\n (click)=\"goToSignUp()\"\n size=\"md\">\n Sign up\n </button>\n </div>\n <div ibmRow>\n <button ibmButton=\"ghost\"\n class=\"mr-7 button-main login-button\"\n (click)=\"goToLogin()\"\n size=\"md\">\n Log in\n </button>\n </div>\n <div ibmRow>\n <button ibmButton=\"ghost\"\n class=\"mr-7 button-main google-button\"\n (click)=\"goToLoginGoogle()\"\n size=\"md\">\n Log in with Google\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-google\"\n viewBox=\"0 0 16 16\">\n <path\n d=\"M15.545 6.558a9.42 9.42 0 0 1 .139 1.626c0 2.434-.87 4.492-2.384 5.885h.002C11.978 15.292 10.158 16 8 16A8 8 0 1 1 8 0a7.689 7.689 0 0 1 5.352 2.082l-2.284 2.284A4.347 4.347 0 0 0 8 3.166c-2.087 0-3.86 1.408-4.492 3.304a4.792 4.792 0 0 0 0 3.063h.003c.635 1.893 2.405 3.301 4.492 3.301 1.078 0 2.004-.276 2.722-.764h-.003a3.702 3.702 0 0 0 1.599-2.431H8v-3.08h7.545z\"\n fill=\"currentColor\"></path>\n </svg>\n </button>\n </div>\n <!-- <div ibmRow>\n <button ibmButton=\"ghost\"\n class=\"mr-7 button-main facebook-button\"\n (click)=\"goToLoginFacebook()\"\n size=\"md\">\n Log in with Facebook\n <svg focusable=\"false\"\n preserveAspectRatio=\"xMidYMid meet\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 32 32\"\n aria-hidden=\"true\">\n <path\n d=\"M26.67,4H5.33A1.34,1.34,0,0,0,4,5.33V26.67A1.34,1.34,0,0,0,5.33,28H16.82V18.72H13.7V15.09h3.12V12.42c0-3.1,1.89-4.79,4.67-4.79.93,0,1.86,0,2.79.14V11H22.37c-1.51,0-1.8.72-1.8,1.77v2.31h3.6l-.47,3.63H20.57V28h6.1A1.34,1.34,0,0,0,28,26.67V5.33A1.34,1.34,0,0,0,26.67,4Z\">\n </path>\n <title>Logo Facebook</title>\n </svg>\n </button>\n </div> -->\n </div>\n <div ibmCol\n class=\"right-side\"\n [columnNumbers]=\"{lg:7, md:4, sm:0}\">\n </div>\n</div>","import { Component, Inject, Input, OnInit } from '@angular/core';\nimport { BaseModal } from 'carbon-components-angular';\n\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\n\n@Component({\n selector: 'ibm-smiles-editor-dialog',\n templateUrl: './smiles-editor-dialog.component.html',\n styleUrls: ['./smiles-editor-dialog.component.scss'],\n})\nexport class SmilesEditorDialogComponent extends BaseModal implements OnInit {\n smiles: string;\n actionLabel: string;\n headerTitle: string;\n maxNumberOfMolecules: number;\n\n constructor(\n @Inject('dialogData')\n public dialogData: {\n smiles: string;\n actionLabel: string;\n maxNumberOfMolecules: number;\n }\n ) {\n super();\n\n this.smiles = dialogData.smiles;\n this.actionLabel = dialogData.actionLabel;\n this.maxNumberOfMolecules = dialogData.maxNumberOfMolecules || Infinity;\n }\n\n ngOnInit() {}\n\n closeModal() {\n this.close.emit({\n status: EDialogCloseEventStatus.CANCEL,\n } as IDialogCloseEvent<void>);\n }\n\n onConfirmSmiles({ smiles }: { smiles: string }) {\n this.close.emit({\n status: EDialogCloseEventStatus.OK,\n data: smiles,\n });\n }\n}\n","<ibm-modal [open]=\"open\"\n [hasScrollingContent]=\"false\"\n class=\"full-screen\">\n <section class=\"bx--modal-content\">\n <ibm-smiles-editor [smiles]=\"smiles\"\n [actionLabel]=\"actionLabel\"\n [maxNumberOfMolecules]=\"maxNumberOfMolecules\"\n (action)=\"onConfirmSmiles($event)\"\n (close)=\"closeModal()\"\n [inModal]=\"true\"></ibm-smiles-editor>\n </section>\n</ibm-modal>","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { ESmilesEditorType } from '../smiles-editor/smiles-editor.enum';\n\n@Component({\n selector: 'ibm-smiles-editor-header',\n templateUrl: './smiles-editor-header.component.html',\n styleUrls: ['./smiles-editor-header.component.scss'],\n})\nexport class SmilesEditorHeaderComponent implements OnInit {\n @Input()\n disableActions = false;\n @Input()\n currentEditor = ESmilesEditorType.VISUAL;\n @Input()\n actionLabel: string;\n @Output()\n close = new EventEmitter<void>();\n @Output()\n action = new EventEmitter<void>();\n @Output()\n changeEditorType = new EventEmitter<ESmilesEditorType>();\n @Input()\n inModal = false;\n\n eSmilesEditorType = ESmilesEditorType;\n\n ngOnInit() {}\n}\n","<ibm-mlrp-header [hasSidenav]=\"false\"\n [isModal]=\"inModal\">\n <ibm-header-global>\n <div class=\"smiles-editor-header__buttons-bar\">\n <button class=\"bx--btn border-radius-left\"\n [ngClass]=\"{'active': currentEditor === eSmilesEditorType.VISUAL}\"\n (click)=\"changeEditorType.emit(eSmilesEditorType.VISUAL)\">\n Visual editor\n </button>\n <button class=\"bx--btn border-radius-right\"\n [ngClass]=\"{'active': currentEditor === eSmilesEditorType.TEXTUAL}\"\n (click)=\"changeEditorType.emit(eSmilesEditorType.TEXTUAL)\">\n Smiles string editor\n </button>\n </div>\n <button ibmButton\n type=\"primary\"\n [disabled]=\"disableActions\"\n (click)=\"action.emit()\">\n {{actionLabel}}\n </button>\n <ibm-header-action title=\"close\"\n (click)=\"close.emit()\">\n <svg icon\n ibmIconCloseFilled\n size=\"16\"></svg>\n </ibm-header-action>\n </ibm-header-global>\n</ibm-mlrp-header>","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { finalize } from 'rxjs/operators';\n\nimport { ApiService, ToastMessagesService } from '@app/core/services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { IApiAction, IApiResponse } from '@app/libs/bitforce/api';\n\n@Component({\n selector: 'ibm-smiles-editor-textual',\n templateUrl: './smiles-editor-textual.component.html',\n styleUrls: ['./smiles-editor-textual.component.scss'],\n})\nexport class SmilesEditorTextualComponent implements OnInit {\n @Input()\n set smiles(smiles) {\n if (!this.smilesForm) {\n this.initForm();\n }\n this.smilesForm.patchValue({ smiles });\n }\n get smiles() {\n return this.smilesForm.value.smiles;\n }\n\n @Output()\n loadSmilesInVisualEditor: EventEmitter<string> = new EventEmitter<string>();\n\n smilesForm: UntypedFormGroup;\n isValidating = false;\n\n constructor(\n private fb: UntypedFormBuilder,\n private apiService: ApiService,\n private toastMessagesService: ToastMessagesService\n ) {}\n\n ngOnInit() {}\n\n initForm() {\n this.smilesForm = this.fb.group({\n smiles: [null, Validators.required],\n });\n }\n\n loadInKetcher() {\n this.isValidating = true;\n this.apiService.actions\n .validateSmiles(this.smilesForm.value.smiles)\n .pipe(finalize(() => (this.isValidating = false)))\n .subscribe(\n (response: IApiResponse<IApiAction>) => {\n if (response.content.success) {\n this.loadSmilesInVisualEditor.emit(this.smilesForm.value.smiles);\n }\n },\n () => {\n this.toastMessagesService.show({\n title: 'ERROR',\n message: 'Error on smiles validation service',\n type: EToastMessageType.ERROR,\n });\n }\n );\n }\n\n validateSmiles() {\n this.isValidating = true;\n this.apiService.actions\n .validateSmiles(this.smilesForm.value.smiles)\n .pipe(finalize(() => (this.isValidating = false)))\n .subscribe(\n (response: IApiResponse<IApiAction>) => {\n if (response.content.success) {\n this.toastMessagesService.show({\n title: '',\n message: 'Smiles is valid',\n type: EToastMessageType.SUCCESS,\n });\n }\n },\n () => {\n this.toastMessagesService.show({\n title: 'ERROR',\n message: 'Error on smiles validation service',\n type: EToastMessageType.ERROR,\n });\n }\n );\n }\n}\n","<div class=\"smiles-editor-textual\">\n <span class=\"smiles-editor-textual__title my-6\">\n Write your smiles string, validate and load into the\n visual editor to proceed with the retrosynthesis\n </span>\n\n <div class=\"smiles-editor-textual__form d-flex\">\n <form class=\"flex-grow-1\"\n [formGroup]=\"smilesForm\">\n <textarea ibmTextArea\n class=\"smiles-editor-textual__form__textarea\"\n formControlName=\"smiles\"></textarea>\n </form>\n </div>\n <div class=\"smiles-editor-textual__buttons\">\n <button ibmButton=\"ghost\"\n class=\"bg-white\"\n size=\"lg\"\n [disabled]=\"smilesForm.invalid\"\n [skeleton]=\"isValidating\"\n (click)=\"validateSmiles()\">\n Validate string smiles\n </button>\n\n <button ibmButton=\"primary\"\n size=\"lg\"\n [disabled]=\"smilesForm.invalid\"\n [skeleton]=\"isValidating\"\n (click)=\"loadInKetcher()\">\n Load in visual editor\n </button>\n </div>\n</div>","import {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { ToastMessagesService } from '@app/core/services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { KetcherComponent } from '@app/shared/components/ketcher/ketcher.component';\nimport { ESmilesEditorType, EVisualEditorType } from './smiles-editor.enum';\n\n@Component({\n selector: 'ibm-smiles-editor',\n templateUrl: './smiles-editor.component.html',\n styleUrls: ['./smiles-editor.component.scss'],\n})\nexport class SmilesEditorComponent implements OnInit, OnChanges {\n @ViewChild('ketcher', { static: true })\n ketcher: KetcherComponent;\n\n @Input()\n visualEditorType = EVisualEditorType.KETCHER;\n @Input()\n smiles: string;\n @Input()\n actionLabel: string;\n @Input()\n maxNumberOfMolecules = Infinity;\n @Input()\n inModal = false;\n @Output()\n action = new EventEmitter<{ smiles: string; mol: string }>();\n @Output()\n close = new EventEmitter<void>();\n\n currentEditor: ESmilesEditorType = ESmilesEditorType.VISUAL;\n eSmilesEditorType = ESmilesEditorType;\n\n constructor(private toastMessagesService: ToastMessagesService) {}\n\n ngOnInit(): void {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.smiles?.currentValue) {\n this.ketcher.setSmiles([this.smiles]);\n }\n }\n\n onLoadSmilesInVisualEditor(smiles) {\n this.smiles = smiles;\n this.onChangeEditorType(ESmilesEditorType.VISUAL);\n this.ketcher.setSmiles([this.smiles]);\n }\n\n onChangeEditorType(editorType: ESmilesEditorType) {\n this.currentEditor = editorType;\n switch (editorType) {\n case ESmilesEditorType.TEXTUAL:\n this.smiles = ''; // force change detection\n setTimeout(() => (this.smiles = this.ketcher?.smiles));\n break;\n }\n }\n\n onAction() {\n const smiles = this.ketcher?.smiles;\n if (this.ketcher && this.ketcher.ketcherInitialised && this.checkMaxNumberOfMolecules(smiles)) {\n this.action.emit({ smiles, mol: this.ketcher?.mol });\n }\n }\n\n private checkMaxNumberOfMolecules(smiles: string) {\n if (smiles.split('.').length > this.maxNumberOfMolecules) {\n this.toastMessagesService.show({\n title: `Error`,\n message: `You've entered more than ${this.maxNumberOfMolecules} molecule.`,\n type: EToastMessageType.ERROR,\n });\n return false;\n } else {\n return true;\n }\n }\n}\n","<ibm-smiles-editor-header (action)=\"onAction()\"\n [currentEditor]=\"currentEditor\"\n [disableActions]=\"currentEditor === eSmilesEditorType.TEXTUAL\"\n [actionLabel]=\"actionLabel\"\n [inModal]=\"inModal\"\n (changeEditorType)=\"onChangeEditorType($event)\"\n (close)=\"close.emit()\"></ibm-smiles-editor-header>\n\n<div class=\"smiles-editor\"\n [ngClass]=\"{ 'modal': inModal}\">\n <ibm-ketcher [hidden]=\"currentEditor !== eSmilesEditorType.VISUAL\"\n #ketcher\n class=\"flex-grow-1 h-100 w-100\"\n height=\"100%\"\n width=\"100%\"\n [enableAutoSave]=\"false\"></ibm-ketcher>\n\n <ibm-smiles-editor-textual [hidden]=\"currentEditor !== eSmilesEditorType.TEXTUAL\"\n class=\"flex-grow-1 w-100 h-100\"\n [smiles]=\"smiles\"\n (loadSmilesInVisualEditor)=\"onLoadSmilesInVisualEditor($event)\">\n </ibm-smiles-editor-textual>\n</div>","export enum ESmilesEditorType {\n VISUAL = 'visual',\n TEXTUAL = 'textual',\n}\n\nexport enum EVisualEditorType {\n KETCHER = 'KETCHER',\n}\n","export const dimensionUnits = ['Bytes', 'KB', 'MB', 'GB', 'TB'] as const;\n\nexport function getBestDimensionUnit(bytes: number) {\n const i = Math.min(Math.max(Math.floor(Math.log(bytes) / Math.log(1024)), 0), dimensionUnits.length - 1);\n return dimensionUnits[i];\n}\nexport function convertToBytes(value: number, unit: 'Bytes' | 'KB' | 'MB' | 'GB' | 'TB'): number {\n switch (unit) {\n case 'Bytes':\n return value;\n case 'KB':\n return value * 1024;\n case 'MB':\n return value * 1024 * 1024;\n case 'GB':\n return value * 1024 * 1024 * 1024;\n case 'TB':\n return value * 1024 * 1024 * 1024 * 1024;\n default:\n return 0;\n }\n}\n\nexport function convertFromBytes(value: number, unit: 'Bytes' | 'KB' | 'MB' | 'GB' | 'TB'): number {\n switch (unit) {\n case 'Bytes':\n return value;\n case 'KB':\n return value / 1024;\n case 'MB':\n return value / (1024 * 1024);\n case 'GB':\n return value / (1024 * 1024 * 1024);\n case 'TB':\n return value / (1024 * 1024 * 1024 * 1024);\n default:\n return 0;\n }\n}\n","export async function copyToClipboard(value: string, element = document.body) {\n const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n if (isSafari && navigator.clipboard) {\n try {\n await navigator.clipboard.write([\n // @ts-ignore\n new ClipboardItem({\n 'text/plain': new Promise(resolve => resolve(new Blob([value], { type: 'text/plain' }))),\n }),\n ]);\n return true;\n } catch (e) {\n console.error(e);\n return false;\n }\n } else {\n let input: HTMLInputElement = null;\n let result = true;\n\n try {\n input = document.createElement('input');\n input.setAttribute('value', value);\n input.style.position = 'absolute';\n input.style.top = '-10000px';\n element.appendChild(input);\n input.select();\n input.focus();\n document.execCommand('copy');\n } catch (error) {\n result = false;\n } finally {\n element.removeChild(input);\n }\n\n return result;\n }\n}\n","import { RetrosynthesisSequence, RetrosynthesisSibling, RetrosynthesisMolecule } from '@models';\n\nexport function sequencesFromSiblingsForMolecule({\n siblings,\n sequence,\n treeNode,\n}: {\n siblings: RetrosynthesisSibling[];\n sequence: RetrosynthesisSequence;\n treeNode: RetrosynthesisMolecule;\n}): RetrosynthesisSequence[] {\n return siblings\n .filter(sibling => sibling.smiles === treeNode.smiles)\n .map(sibling => siblingToSequence({ sibling, sequence, treeNode }))\n .reduce((acc, currentValue) => acc.concat(currentValue), []);\n}\n\nfunction siblingToSequence({\n sibling,\n sequence,\n treeNode,\n}: {\n sibling: RetrosynthesisSibling;\n sequence: RetrosynthesisSequence;\n treeNode: RetrosynthesisMolecule;\n}): RetrosynthesisSequence[] {\n const result: RetrosynthesisSequence[] = [];\n sibling.reactions.forEach((reaction, i) => {\n const newSiblingSequence = new RetrosynthesisSequence({\n ...sequence,\n id: i + 1,\n label: `Reaction ${i + 1}`,\n confidence: reaction.confidence,\n confidenceTag: reaction.confidenceTag,\n reactionSmiles: reaction.reactionSmiles,\n custom: reaction.custom,\n tree: {\n ...treeNode,\n confidence: reaction.confidence,\n rclass: reaction.rclass,\n siblingId: reaction.id,\n children: reaction.children,\n isThermal: reaction.isThermal,\n isPhotochemical: reaction.isPhotochemical,\n },\n });\n result.push(newSiblingSequence);\n });\n\n return result;\n}\n","import { DomSanitizer } from '@angular/platform-browser';\nimport { EPredictionLibrary } from '../enums/reaction-property-prediction';\n\nconst widthRegex = {\n [EPredictionLibrary.INDIGO]: /width=\"([\\d]+)\"/gm,\n [EPredictionLibrary.CDK]: /width='([\\d]+)[.]*[\\d]+mm'/gm,\n [EPredictionLibrary.RDKIT]: /width='([\\d]+)[.]*[\\d]+mm'/gm,\n};\nconst heightRegex = {\n [EPredictionLibrary.INDIGO]: /height=\"([\\d]+)\"/gm,\n [EPredictionLibrary.CDK]: /height='([\\d]+)[.]*[\\d]+mm'/gm,\n [EPredictionLibrary.RDKIT]: /height='([\\d]+)[.]*[\\d]+mm'/gm,\n};\n\nfunction pxToMM(px: number): number {\n return px * 0.264583;\n}\n\nexport function svgToUrl(svg: string, library: EPredictionLibrary = EPredictionLibrary.CDK): ISvgToUrl {\n const sanitizer = window['rootInjector'].get(DomSanitizer);\n if (!svg) {\n return {\n base64Url: sanitizer.bypassSecurityTrustUrl(\n // eslint-disable-next-line max-len\n 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iNjAiIGhlaWdodD0iNjAiPgo8cGF0aCBmaWxsPSJub25lIiBkPSJNMSwxVjE5OUgxOTlWMXoiLz4KPC9zdmc+'\n ),\n width: 60,\n height: 60,\n originalWidth: 60,\n originalHeight: 60,\n unit: 'px',\n };\n }\n const maxWidth = 300;\n const minWidth = 60;\n const maxHeight = 150;\n const minHeight = 50;\n const multiplier = 4;\n let width = 100;\n let height = 100;\n try {\n svg = svg.replace(new RegExp('svg:svg', 'g'), 'svg');\n let regex = widthRegex[library] || widthRegex[EPredictionLibrary.CDK];\n const regexWidthResult = regex.exec(svg);\n regex = heightRegex[library] || heightRegex[EPredictionLibrary.CDK];\n const regexHeightResult = regex.exec(svg);\n\n if (library === EPredictionLibrary.INDIGO) {\n regexWidthResult[0] = `width='${pxToMM(+regexWidthResult[1]).toFixed(2)}mm'`;\n regexHeightResult[0] = `height='${pxToMM(+regexHeightResult[1]).toFixed(2)}mm'`;\n regexWidthResult[1] = Math.floor(pxToMM(+regexWidthResult[1])).toString();\n regexHeightResult[1] = Math.floor(pxToMM(+regexHeightResult[1])).toString();\n }\n\n if (regexWidthResult[1] && regexHeightResult[1]) {\n width = +regexWidthResult[1] * multiplier;\n width = Math.max(width, minWidth);\n width = Math.min(width, maxWidth);\n height = (width * +regexHeightResult[1]) / +regexWidthResult[1];\n\n // Cap the max height\n if (height > maxHeight) {\n height = maxHeight;\n width = (+regexWidthResult[1] * height) / +regexHeightResult[1];\n } else if (height < minHeight) {\n height = minHeight;\n width = (+regexWidthResult[1] * height) / +regexHeightResult[1];\n }\n }\n\n const svgData = {\n base64Url: sanitizer.bypassSecurityTrustUrl(`data:image/svg+xml;base64,${btoa(svg)}`),\n width,\n height,\n originalWidth: +regexWidthResult[1],\n originalHeight: +regexHeightResult[1],\n unit: 'px',\n };\n return svgData;\n } catch (error) {\n const svgData = {\n base64Url: sanitizer.bypassSecurityTrustUrl(`data:image/svg+xml;base64,${btoa(svg)}`),\n width,\n height,\n originalWidth: undefined,\n originalHeight: undefined,\n unit: 'px',\n };\n return svgData;\n }\n}\n\nexport interface ISvgToUrl {\n base64Url: string;\n width: number;\n height: number;\n unit: string;\n originalWidth: number;\n originalHeight: number;\n}\n","<ibm-sidenav [expanded]=\"sidenavActive\"\n [hidden]=\"!sidenavActive\"\n #mainSidenav>\n <ibm-sidenav-item [route]=\"['admin', 'dashboard']\"\n title=\"Dashboard\"\n [active]=\"router.isActive(router.createUrlTree(['admin', 'dashboard']).toString(), true)\">\n <svg ibmIconDashboard\n size=\"16\"></svg>\n Admin dashboard\n </ibm-sidenav-item>\n <ibm-sidenav-item [route]=\"['admin', 'roborxn']\"\n title=\" Synthesis executions history\"\n [active]=\"router.isActive(router.createUrlTree(['admin', 'roborxn']).toString(), true)\">\n <svg ibmIconSchematics\n size=\"16\"></svg>\n Synthesis executions history\n </ibm-sidenav-item>\n <ibm-sidenav-item [route]=\"['admin', 'configurations']\"\n title=\"Configurations\"\n [active]=\"router.isActive(router.createUrlTree(['admin', 'configurations']).toString(), true)\">\n <svg ibmIconSettings\n size=\"16\"></svg>\n Configuration\n </ibm-sidenav-item>\n <ibm-sidenav-item [route]=\"['admin', 'users']\"\n title=\"Users\"\n [active]=\"router.isActive(router.createUrlTree(['admin', 'users']).toString(), true)\">\n <svg ibmIconUserMultiple\n size=\"16\"></svg>\n Users\n </ibm-sidenav-item>\n <ibm-sidenav-item [route]=\"['admin', 'groups']\"\n title=\"Groups\"\n [active]=\"router.isActive(router.createUrlTree(['admin', 'groups']).toString(), false)\">\n <svg ibmIconEventsAlt\n size=\"16\"></svg>\n Groups\n </ibm-sidenav-item>\n <ibm-sidenav-item [route]=\"['admin', 'model-tuner', 'list']\"\n title=\"Model tuner\"\n [active]=\"router.isActive(router.createUrlTree(['admin', 'model-tuner', 'list']).toString(), true)\">\n <svg ibmIconMachineLearningModel\n size=\"16\"></svg>\n Model tuner\n </ibm-sidenav-item>\n <ibm-sidenav-item [route]=\"['admin', 'plans']\"\n *ngIf=\"environment.ecommerceEnabled\"\n title=\"Plans\"\n [active]=\"router.isActive(router.createUrlTree(['admin', 'plans']).toString(), true)\">\n <svg ibmIconDataBase\n size=\"16\"></svg>\n Plans\n </ibm-sidenav-item>\n</ibm-sidenav>","import { Component, Input, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { environment } from '@env/environment';\n\n@Component({\n selector: 'ibm-mlrp-admin-sidenav',\n templateUrl: './admin-sidenav.component.html',\n styleUrls: ['./admin-sidenav.component.scss'],\n})\nexport class AdminSidenavComponent implements OnInit {\n @Input() sidenavActive: boolean;\n\n environment = environment;\n\n constructor(public router: Router) {}\n\n ngOnInit(): void {}\n}\n","import { Component, Inject, OnInit } from '@angular/core';\n\nimport { BaseModal } from 'carbon-components-angular';\n\nimport { AiModel } from '@app/core/models';\nimport { FormControl, Validators } from '@angular/forms';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\n\n@Component({\n selector: 'ibm-ai-model-selection-dialog',\n templateUrl: './ai-model-selection-dialog.component.html',\n styleUrls: ['./ai-model-selection-dialog.component.scss'],\n})\nexport class AIModelSelectionDialogComponent extends BaseModal implements OnInit {\n aiModelFromControl = new FormControl(null, [Validators.required]);\n aiModels: {\n content: string;\n model: AiModel;\n selected: boolean;\n }[] = [];\n\n constructor(\n @Inject('dialogData')\n public dialogData: { title: string; description: string; actionLabel: string; aiModels: AiModel[] }\n ) {\n super();\n }\n\n ngOnInit(): void {\n this.mapAiModels();\n }\n\n onSelectAIModel() {\n this.close.emit({\n status: EDialogCloseEventStatus.OK,\n data: this.aiModelFromControl.value,\n } as IDialogCloseEvent<AiModel>);\n }\n\n private mapAiModels() {\n this.aiModels = [];\n if (this.dialogData.aiModels) {\n this.aiModels = this.dialogData.aiModels.map((model: AiModel) => {\n const item = {\n content: model.name,\n model,\n selected: model.isDefault,\n };\n\n if (model.isDefault) {\n this.aiModelFromControl.setValue(model);\n }\n\n return item;\n });\n }\n }\n}\n","<ibm-modal [open]=\"open\">\n <ibm-modal-header (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>{{dialogData.title}}</h3>\n </ibm-modal-header>\n <div ibmModalContent>\n <div>{{dialogData.description}}</div>\n\n <div class=\"mt-5\">\n <ibm-dropdown label=\"AI model version\"\n placeholder=\"Choose AI model\"\n [formControl]=\"aiModelFromControl\"\n itemValueKey=\"content\">\n <ibm-dropdown-list [items]=\"aiModels\"></ibm-dropdown-list>\n </ibm-dropdown>\n </div>\n </div>\n <ibm-modal-footer>\n <button ibmButton=\"secondary\"\n (click)=\"closeModal()\">Close</button>\n\n <button ibmButton=\"primary\"\n [disabled]=\"!aiModelFromControl.value\"\n (click)=\"onSelectAIModel()\">\n {{dialogData.actionLabel}}\n </button>\n </ibm-modal-footer>\n</ibm-modal>","import { Component } from '@angular/core';\n\n@Component({\n selector: 'ibm-close-button',\n templateUrl: './close-button.component.html',\n styleUrls: ['./close-button.component.scss'],\n})\nexport class CloseButtonComponent {\n constructor() {}\n}\n","<button class=\"bx--modal-close position-static\"\n type=\"button\"\n data-modal-close\n aria-label=\"close modal\">\n <ibm-icon-close size=\"20\"></ibm-icon-close>\n</button>","import { Component, Inject, OnInit } from '@angular/core';\nimport { ToastMessagesService } from '@app/core/services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { copyToClipboard } from '@app/shared/common-utilities/clipboard';\nimport { BaseModal } from 'carbon-components-angular';\n\n@Component({\n selector: 'ibm-copy-smiles-dialog',\n templateUrl: './copy-smiles-dialog.component.html',\n styleUrls: ['./copy-smiles-dialog.component.scss'],\n})\nexport class CopySmilesDialogComponent extends BaseModal implements OnInit {\n constructor(\n @Inject('dialogData') public dialogData: { smiles: string },\n private toastMessagesService: ToastMessagesService\n ) {\n super();\n }\n\n ngOnInit(): void {}\n\n async onCopySmiles() {\n const copied = await copyToClipboard(this.dialogData.smiles);\n this.closeModal();\n\n if (copied) {\n this.toastMessagesService.show({\n title: 'Info',\n message: 'Smiles copied to clipboard',\n type: EToastMessageType.SUCCESS,\n });\n } else {\n this.toastMessagesService.show({\n title: 'Error',\n message: `Couldn't copy smiles to clipboard`,\n type: EToastMessageType.ERROR,\n });\n }\n }\n}\n","<ibm-modal [open]=\"open\"\n size=\"xs\">\n <ibm-modal-header (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>Copy smiles</h3>\n </ibm-modal-header>\n <div ibmModalContent>\n <div class=\"w-100 p-3 smiles-container\">\n {{ dialogData.smiles}}\n </div>\n </div>\n <ibm-modal-footer>\n <button ibmButton=\"secondary\"\n (click)=\"closeModal()\">Close</button>\n <button ibmButton=\"primary\"\n (click)=\"onCopySmiles()\">\n Copy\n </button>\n </ibm-modal-footer>\n</ibm-modal>","<ibm-modal [open]=\"open\">\n <ibm-modal-header (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>Create a new project</h3>\n </ibm-modal-header>\n <div ibmModalContent>\n <form id=\"createProjectForm\"\n class=\"ibm-create-project\"\n [formGroup]=\"createProjectForm\">\n <section>\n <div class=\"mb-5\">\n <ibm-label\n [invalid]=\"createProjectForm.get('projectName').touched && !createProjectForm.get('projectName').valid\"\n [invalidText]=\"'Project name required'\">\n Project Name\n <input ibmText\n formControlName=\"projectName\"\n id=\"projectName\"\n placeholder=\"Insert the name\"\n autocomplete=\"off\" />\n </ibm-label>\n </div>\n <div class=\"mb-5\">\n <ibm-checkbox formControlName=\"isAddingCollaborator\">\n Add Collaborator\n </ibm-checkbox>\n </div>\n <div *ngIf=\"createProjectForm.get('isAddingCollaborator').value\">\n <ibm-search-collaborators (collaboratorsSelectionChange)=\"collaboratorsSelectionChanged($event)\">\n </ibm-search-collaborators>\n </div>\n </section>\n </form>\n </div>\n <ibm-modal-footer>\n <button ibmButton=\"secondary\"\n (click)=\"closeModal()\">Close</button>\n <button ibmButton=\"primary\"\n (click)=\"createProject()\"\n [disabled]=\"!createProjectForm.valid\">\n Create a new project\n </button>\n </ibm-modal-footer>\n</ibm-modal>","import { Component, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { BaseModal } from 'carbon-components-angular';\n\nimport { ToastMessagesService, ApiService } from '@services';\nimport { Project, User } from '@models';\n\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\nimport { EventTrackingService } from '@app/core/services/event-tracking/event-tracking.service';\n\n@Component({\n selector: 'ibm-create-project-dialog',\n templateUrl: './create-project-dialog.component.html',\n styleUrls: ['./create-project-dialog.component.scss'],\n})\nexport class CreateProjectDialogComponent extends BaseModal implements OnInit {\n createProjectForm: UntypedFormGroup;\n selectedCollaborators: User[] = [];\n\n constructor(\n private fb: UntypedFormBuilder,\n private apiService: ApiService,\n private toastMessagesService: ToastMessagesService,\n private eventTrackingService: EventTrackingService\n ) {\n super();\n }\n\n ngOnInit() {\n this.createForm();\n }\n\n createForm() {\n this.createProjectForm = this.fb.group({\n projectName: ['', [Validators.required, Validators.maxLength(500)]],\n isAddingCollaborator: false,\n });\n }\n\n collaboratorsSelectionChanged(collaboratorsEmails) {\n this.selectedCollaborators = collaboratorsEmails.map(\n (collaboratorEmail: string) => new User({ email: collaboratorEmail })\n );\n }\n\n createProject() {\n const isAddingCollaborator = this.createProjectForm.get('isAddingCollaborator').value;\n const newProject = {\n name: this.createProjectForm.get('projectName').value,\n invitations: isAddingCollaborator ? this.selectedCollaborators : [],\n };\n\n this.apiService.projects\n .post<Project>({ body: newProject, bodyParser: 'raw', isBodyRaw: true })\n .subscribe(\n data => {\n this.eventTrackingService.trackEvent('Project Creation');\n this.toastMessagesService.show({\n title: 'Create project',\n message: 'Project has been created',\n type: EToastMessageType.SUCCESS,\n });\n this.close.emit({\n status: EDialogCloseEventStatus.OK,\n data: data.content,\n } as IDialogCloseEvent<Project>);\n },\n () => {\n this.toastMessagesService.show({\n title: 'Create project - failed',\n message: 'Project has not been created',\n type: EToastMessageType.ERROR,\n });\n }\n );\n }\n\n closeModal() {\n this.close.emit({\n status: EDialogCloseEventStatus.CANCEL,\n } as IDialogCloseEvent<void>);\n }\n}\n","<ibm-modal [open]=\"open\"\n [hasScrollingContent]=\"false\">\n <ibm-modal-header (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>Predict retrosynthesis</h3>\n </ibm-modal-header>\n <div ibmModalContent>\n <form (ngSubmit)=\"createRetro()\"\n [formGroup]=\"form\">\n <ibm-select-or-create-project toAddLabel=\"retrosynthesis\"\n [form]=\"form\"\n [projects]=\"projects\"\n [selectedProject]=\"dialogData?.project\"></ibm-select-or-create-project>\n\n <fieldset class=\"bx--fieldset mt-6\"\n *ngIf=\"form.value.projectGroup?.selectedProject || form.value.projectGroup?.projectName\">\n <legend class=\"bx--label\">Start From</legend>\n <ibm-radio-group formControlName=\"startFrom\"\n class=\"mt-2\">\n <ibm-radio [value]=\"TARGET_MOLECULE\">\n Target molecule\n </ibm-radio>\n <ibm-radio [value]=\"FROM_FILE\">\n From file\n </ibm-radio>\n </ibm-radio-group>\n\n <div class=\"mt-8\"\n *ngIf=\"form.value.startFrom === FROM_FILE\">\n <h6 class=\"mb-2\">Upload retrosynthetic data</h6>\n <p class=\"font-caption-02 mb-4\">\n You can upload text files containing one reaction SMILES per line ({{maxFileSizeString }} max\n size).<br />\n <a (click)=\"onDownloadExampleFile()\"\n title=\"Download file\">Download an example file</a>\n </p>\n <ibm-mlrp-file-uploader [dropText]=\"'Drag and Drop files here or upload'\"\n [maxFileSize]=\"uploadFileMaxSize\"\n [multiple]=\"false\"\n [acceptedExtensions]=\"['.txt']\"\n (selectedFiles)=\"onSelectedFiles($event)\"></ibm-mlrp-file-uploader>\n </div>\n </fieldset>\n </form>\n </div>\n <ibm-modal-footer>\n <button ibmButton=\"secondary\"\n (click)=\"closeModal()\">Close</button>\n <button ibmButton=\"primary\"\n (click)=\"createRetro()\"\n [disabled]=\"!form.valid\">\n Predict retrosynthesis\n </button>\n </ibm-modal-footer>\n</ibm-modal>","import { Component, Inject, Injector, OnDestroy, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { Router } from '@angular/router';\nimport { Subscription } from 'rxjs';\nimport { finalize } from 'rxjs/operators';\nimport { FileItem } from 'carbon-components-angular';\n\nimport { requiredIf } from '@app/shared/form-utilities/validators/required-if.validator';\nimport { Project, Retrosynthesis } from '@models';\nimport { ApiService } from '@services';\nimport { EDialogCloseEventStatus } from '@services/dialog/dialog.enum';\nimport { SuperWizardComponent } from '@app/shared/components/super-wizard/super-wizard.component';\nimport { IApiResponse } from '@app/libs/bitforce/api';\nimport { LoaderService } from '@app/libs/bitforce/components';\nimport { bitfPromptToDownloadFile } from '@app/libs/bitforce/utils';\n\n@Component({\n selector: 'ibm-create-retrosynthesis-wizard-dialog',\n templateUrl: './create-retrosynthesis-wizard-dialog.component.html',\n styleUrls: ['./create-retrosynthesis-wizard-dialog.component.scss'],\n})\nexport class CreateRetrosynthesisWizardDialogComponent extends SuperWizardComponent\n implements OnInit, OnDestroy {\n form: UntypedFormGroup;\n TARGET_MOLECULE = 'TARGET_MOLECULE';\n FROM_FILE = 'FROM_FILE';\n uploadFileMaxSize = 20971520;\n\n private subscription = new Subscription();\n\n constructor(\n public injector: Injector,\n private apiService: ApiService,\n private router: Router,\n private fb: UntypedFormBuilder,\n private loaderService: LoaderService,\n @Inject('dialogData') public dialogData: { project: Project }\n ) {\n super(injector);\n }\n\n ngOnInit(): void {\n this.form = this.fb.group({\n startFrom: [null, [Validators.required]],\n fileId: [null, requiredIf(() => this.form?.get('startFrom'), this.FROM_FILE)],\n });\n this.getProjectsListItems().subscribe();\n\n this.subscription.add(\n this.form.get('startFrom').valueChanges.subscribe(() => {\n this.form.get('fileId').updateValueAndValidity();\n })\n );\n }\n\n get maxFileSizeString() {\n return (this.uploadFileMaxSize || 0) / 1024 / 1024 + 'MB';\n }\n\n onSelectedFiles(files: Set<FileItem>) {\n if (files) {\n const selectedFile = Array.from(files)[0];\n if (selectedFile) {\n selectedFile.state = 'upload';\n this.apiService.fileEntries\n .upload<any>({ files: [selectedFile.file] })\n .subscribe(\n (response: any) => {\n this.form.patchValue({\n fileId: response.content?.id,\n });\n\n selectedFile.state = 'edit';\n selectedFile.uploaded = true;\n },\n error => {\n selectedFile.state = 'edit';\n selectedFile.invalid = true;\n selectedFile.invalidText =\n error.error?.metadata?.uiMessages?.errors[0]?.message || error.message;\n }\n );\n }\n } else {\n this.form.patchValue({\n fileId: null,\n });\n }\n }\n\n createRetro() {\n this.getOrCreateProject({ ...this.form.value.projectGroup }).subscribe((project: Project) => {\n if (this.form.value?.startFrom === this.FROM_FILE) {\n this.loaderService.show();\n this.apiService.retrosynthesis\n .post({\n path: 'rs/from-file',\n isBodyRaw: true,\n body: {\n projectId: project.id,\n fileId: this.form.value.fileId,\n },\n })\n .pipe(finalize(() => this.loaderService.hide()))\n .subscribe((response: IApiResponse<Retrosynthesis>) => {\n this.eventTrackingService.trackEvent('Predict Retrosynthesis');\n\n this.closeModal(EDialogCloseEventStatus.OK);\n this.router.navigate([\n '/projects',\n project.id,\n project.name,\n 'retrosynthesis',\n response.content.id,\n ]);\n });\n } else {\n this.closeModal(EDialogCloseEventStatus.OK);\n this.router.navigate(['projects', project.id, project.name, 'workspace', 'retrosynthesis']);\n }\n });\n }\n\n onDownloadExampleFile() {\n bitfPromptToDownloadFile(\n 'CCC(O)CCN.O=S(=O)(Cl)c1ccc2ncccc2c1>>CCC(O)CCNS(=O)(=O)c1ccc2ncccc2c1' +\n '\\n' +\n 'CCC(O)CCNS(=O)(=O)c1ccc2ncccc2c1.BrC(Br)(Br)Br.ClCCl>>CCC(Br)CCNS(=O)(=O)c1ccc2ncccc2c1',\n 'txt',\n 'txt',\n 'retrosynthesis-from-file-sample'\n );\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n}\n","<ibm-modal [open]=\"open\"\n [hasScrollingContent]=\"false\">\n <ibm-modal-header (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>Plan a synthesis</h3>\n <span></span>\n </ibm-modal-header>\n\n <div ibmModalContent\n class=\"ibm-create-synthesis\">\n <form (ngSubmit)=\"save()\"\n [formGroup]=\"form\">\n <ibm-select-or-create-project #projectSelect\n toAddLabel=\"synthesis\"\n [form]=\"form\"\n [projects]=\"projects\"\n [selectedProject]=\"dialogData?.project\"></ibm-select-or-create-project>\n <fieldset class=\"bx--fieldset mt-6\"\n *ngIf=\"form.value.projectGroup?.selectedProject || form.value.projectGroup?.projectName\">\n <legend class=\"bx--label\">Start From</legend>\n <ibm-radio-group formControlName=\"startFrom\"\n class=\"mt-2\">\n <ibm-radio [value]=\"EXPERIMENTAL_PROCEDURE\">\n Experimental procedure\n </ibm-radio>\n <ibm-radio [value]=\"RETROSYNTHESIS\">\n Retrosynthesis\n </ibm-radio>\n </ibm-radio-group>\n </fieldset>\n\n <ng-container *ngIf=\"form.value.startFrom === RETROSYNTHESIS\">\n <legend class=\"bx--label\">Source</legend>\n <ibm-radio-group formControlName=\"retroStartFrom\"\n class=\"mt-2\">\n <ibm-radio [value]=\"FROM_EXISTING_RETROSYNTHESIS\">\n Existing\n </ibm-radio>\n <ibm-radio [value]=\"FROM_RETROSYNTHESIS_FILE\">\n From file\n </ibm-radio>\n </ibm-radio-group>\n\n <ng-container *ngIf=\"form.value.retroStartFrom === FROM_EXISTING_RETROSYNTHESIS\">\n <fieldset *ngIf=\"fromProjects?.length > 0 || isFromProjectLoading\"\n class=\"mt-6\">\n <ibm-dropdown [skeleton]=\"true\"\n [label]=\"'From which project'\"\n *ngIf=\"isFromProjectLoading\">\n </ibm-dropdown>\n <ibm-combo-box *ngIf=\"fromProjects\"\n [theme]=\"'light'\"\n [label]=\"'From which project'\"\n [invalid]=\"form.get('fromProject').touched && !form.get('fromProject').valid\"\n invalidText=\"Project is required\"\n [appendInline]=\"false\"\n formControlName=\"fromProject\"\n [items]=\"fromProjects\"\n [autocomplete]=\"false\"\n [dropUp]=\"false\">\n <ibm-dropdown-list></ibm-dropdown-list>\n </ibm-combo-box>\n </fieldset>\n\n <fieldset class=\"mt-6\"\n *ngIf=\"(form.value.fromProject !== null && retrosynthesis?.length > 0) || isRetrosynthesisListLoading\">\n <ibm-dropdown [skeleton]=\"true\"\n [label]=\"'Select Retrosynthetic Route'\"\n *ngIf=\"isRetrosynthesisListLoading\">\n </ibm-dropdown>\n\n <ibm-combo-box *ngIf=\"retrosynthesis\"\n [theme]=\"'light'\"\n [label]=\"'Select Retrosynthetic Route'\"\n [invalid]=\"form.get('selectedRetrosynthesis').touched && !form.get('selectedRetrosynthesis').valid\"\n invalidText=\"Retrosynthetic Route is required\"\n [appendInline]=\"false\"\n formControlName=\"selectedRetrosynthesis\"\n [items]=\"retrosynthesis\"\n [autocomplete]=\"false\"\n [dropUp]=\"false\">>\n <ibm-dropdown-list></ibm-dropdown-list>\n </ibm-combo-box>\n </fieldset>\n\n\n <div *ngIf=\"retrosynthesis && retrosynthesis?.length === 0\"\n class=\"mt-4\">\n <ibm-icon-warning-alt-filled size=\"16\"></ibm-icon-warning-alt-filled>\n It seems you did not create any retrosynthesis in the selected project.\n </div>\n\n <fieldset class=\"mt-6\"\n *ngIf=\"(form.value.selectedRetrosynthesis !== null && sequences?.length > 0) ||isSequencesListLoading \">\n <ibm-dropdown [skeleton]=\"true\"\n [label]=\"'Select a sequence of the retrosynthetic route'\"\n *ngIf=\"isSequencesListLoading\">\n </ibm-dropdown>\n\n <ibm-combo-box *ngIf=\"sequences\"\n [theme]=\"'light'\"\n [label]=\"'Select a sequence of the retrosynthetic route'\"\n [invalid]=\"form.get('selectedSequence').touched && !form.get('selectedSequence').valid\"\n invalidText=\"Sequence is required\"\n [appendInline]=\"false\"\n formControlName=\"selectedSequence\"\n [items]=\"sequences\"\n [autocomplete]=\"false\"\n [dropUp]=\"false\">>\n <ibm-dropdown-list></ibm-dropdown-list>\n </ibm-combo-box>\n </fieldset>\n\n <ng-container *ngIf=\"form.value.selectedSequence !== null\">\n <ng-container [ngTemplateOutlet]=\"aiModelsFormField\"\n [ngTemplateOutletContext]=\"{form:form, isAiModelsLoading: isAiModelsLoading, aiModels: aiModels}\">\n </ng-container>\n </ng-container>\n\n <div *ngIf=\"sequences && sequences?.length === 0\"\n class=\"mt-4\">\n <ibm-icon-warning-alt-filled size=\"16\"></ibm-icon-warning-alt-filled>\n There aren't available sequences in this retrosynthesis\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"form.value.retroStartFrom === FROM_RETROSYNTHESIS_FILE\">\n <ng-container [ngTemplateOutlet]=\"aiModelsFormField\"\n [ngTemplateOutletContext]=\"{form:form, isAiModelsLoading: isAiModelsLoading, aiModels: aiModels}\">\n </ng-container>\n\n <div class=\"mt-6\"\n *ngIf=\"form.value.selectedAiModel !== null\">\n <h6 class=\"mb-2\">Upload retrosynthetic data</h6>\n <p class=\"font-caption-02 mb-4\">\n You can upload text files containing one reaction SMILES per line ({{ maxFileSizeString }} max\n size).<br />\n <a (click)=\"onDownloadExampleFile()\"\n title=\"Download file\">Download an example file</a>\n </p>\n <ibm-mlrp-file-uploader [dropText]=\"'Drag and Drop files here or upload'\"\n [maxFileSize]=\"uploadFileMaxSize\"\n [multiple]=\"false\"\n [acceptedExtensions]=\"['.txt']\"\n (selectedFiles)=\"onSelectedFiles($event)\"></ibm-mlrp-file-uploader>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #aiModelsFormField\n let-form='form'\n let-isAiModelsLoading='isAiModelsLoading'\n let-aiModels='aiModels'>\n <fieldset class=\"mt-6\"\n *ngIf=\"aiModels?.length > 0 || isAiModelsLoading \">\n <ibm-dropdown [skeleton]=\"true\"\n [label]=\"'Choose AI model'\"\n *ngIf=\"isAiModelsLoading\">\n </ibm-dropdown>\n\n <ibm-combo-box *ngIf=\"aiModels\"\n [theme]=\"'light'\"\n [label]=\"'Choose AI model'\"\n [invalid]=\"form.get('selectedAiModel').touched && !form.get('selectedAiModel').valid\"\n invalidText=\"Ai model is required\"\n [appendInline]=\"false\"\n formControlName=\"selectedAiModel\"\n [items]=\"aiModels\"\n [autocomplete]=\"false\"\n [dropUp]=\"false\">\n <ibm-dropdown-list></ibm-dropdown-list>\n </ibm-combo-box>\n </fieldset>\n </ng-template>\n </form>\n </div>\n\n <ibm-modal-footer>\n <button ibmButton=\"secondary\"\n (click)=\"closeModal()\">Close</button>\n <button ibmButton=\"primary\"\n (click)=\"save()\"\n [disabled]=\"!form.valid\">\n Plan a synthesis\n </button>\n </ibm-modal-footer>\n</ibm-modal>","import { Component, Inject, Injector, OnDestroy, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { Router } from '@angular/router';\nimport { Observable, of, Subscription } from 'rxjs';\nimport { FileItem, ListItem } from 'carbon-components-angular';\nimport { catchError, debounceTime, filter, finalize, map, switchMap, switchMapTo, tap } from 'rxjs/operators';\n\nimport { IApiResponse } from '@app/libs/bitforce/api';\nimport { LoaderService } from '@app/libs/bitforce/components';\n\nimport { AiModel, Project, SynthesisProcedure } from '@models';\nimport { ApiService } from '@services';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { SuperWizardComponent } from '@app/shared/components/super-wizard/super-wizard.component';\nimport { requiredIf } from '@app/shared/form-utilities/validators/required-if.validator';\nimport { bitfPromptToDownloadFile, getMongoQuery } from '@app/libs/bitforce/utils';\nimport { AuthService } from '@app/libs/bitforce/services';\n\n@Component({\n selector: 'ibm-create-synthesis-wizard-dialog',\n templateUrl: './create-synthesis-wizard-dialog.component.html',\n styleUrls: ['./create-synthesis-wizard-dialog.component.scss'],\n})\nexport class CreateSynthesisWizardDialogComponent extends SuperWizardComponent implements OnInit, OnDestroy {\n form: UntypedFormGroup;\n fromProjects: ListItem[];\n retrosynthesis: ListItem[];\n isRetrosynthesisListLoading = false;\n sequences: ListItem[];\n isSequencesListLoading = false;\n aiModels: ListItem[];\n isAiModelsLoading = false;\n isFromProjectLoading = false;\n uploadFileMaxSize = 20971520;\n\n EXPERIMENTAL_PROCEDURE = 'EXPERIMENTAL_PROCEDURE';\n RETROSYNTHESIS = 'RETROSYNTHESIS';\n FROM_RETROSYNTHESIS_FILE = 'FROM_RETROSYNTHESIS_FILE';\n FROM_EXISTING_RETROSYNTHESIS = 'FROM_EXISTING_RETROSYNTHESIS';\n\n private subscription = new Subscription();\n\n constructor(\n public injector: Injector,\n private apiService: ApiService,\n private loaderService: LoaderService,\n private fb: UntypedFormBuilder,\n private router: Router,\n private authService: AuthService,\n @Inject('dialogData') public dialogData: { project: Project }\n ) {\n super(injector);\n }\n\n ngOnInit(): void {\n this.form = this.fb.group({\n startFrom: [null, [Validators.required]],\n retroStartFrom: [null, requiredIf(() => this.form?.get('startFrom'), this.RETROSYNTHESIS)],\n fromProject: [\n null,\n requiredIf(() => this.form?.get('retroStartFrom'), this.FROM_EXISTING_RETROSYNTHESIS),\n ],\n selectedRetrosynthesis: [\n null,\n requiredIf(() => this.form?.get('retroStartFrom'), this.FROM_EXISTING_RETROSYNTHESIS),\n ],\n selectedSequence: [\n null,\n requiredIf(() => this.form?.get('retroStartFrom'), this.FROM_EXISTING_RETROSYNTHESIS),\n ],\n selectedAiModel: [\n null,\n requiredIf(() => this.form?.get('retroStartFrom'), this.FROM_EXISTING_RETROSYNTHESIS) ||\n requiredIf(() => this.form?.get('retroStartFrom'), this.FROM_RETROSYNTHESIS_FILE),\n ],\n fileId: [null, requiredIf(() => this.form?.get('retroStartFrom'), this.FROM_RETROSYNTHESIS_FILE)],\n });\n\n this.subscription.add(\n this.form.get('startFrom').valueChanges.subscribe(() => {\n this.form.patchValue({\n retroStartFrom: null,\n });\n this.resetStartFromRetrosynthesisForm();\n })\n );\n\n this.subscription.add(\n this.form.get('retroStartFrom').valueChanges.subscribe(() => {\n this.resetStartFromRetrosynthesisForm();\n })\n );\n\n this.getProjectsListItems().subscribe();\n\n this.retroStartFromChange();\n this.fromProjectChange();\n this.retrosyntheticRouteChange();\n this.sequenceRouteChange();\n }\n\n onDownloadExampleFile() {\n bitfPromptToDownloadFile(\n 'CCC(O)CCN.O=S(=O)(Cl)c1ccc2ncccc2c1>>CCC(O)CCNS(=O)(=O)c1ccc2ncccc2c1' +\n '\\n' +\n 'CCC(O)CCNS(=O)(=O)c1ccc2ncccc2c1.BrC(Br)(Br)Br.ClCCl>>CCC(Br)CCNS(=O)(=O)c1ccc2ncccc2c1',\n 'txt',\n 'txt',\n 'synthesis-from-file-sample'\n );\n }\n\n get maxFileSizeString() {\n return (this.uploadFileMaxSize || 0) / 1024 / 1024 + 'MB';\n }\n\n onSelectedFiles(files: Set<FileItem>) {\n if (files) {\n const selectedFile = Array.from(files)[0];\n if (selectedFile) {\n selectedFile.state = 'upload';\n this.apiService.fileEntries\n .upload<any>({ files: [selectedFile.file] })\n .subscribe(\n (response: any) => {\n this.form.patchValue({\n fileId: response.content?.id,\n });\n\n selectedFile.state = 'edit';\n selectedFile.uploaded = true;\n },\n error => {\n selectedFile.state = 'edit';\n selectedFile.invalid = true;\n selectedFile.invalidText =\n error.error?.metadata?.uiMessages?.errors[0]?.message || error.message;\n }\n );\n }\n } else {\n this.form.patchValue({\n fileId: null,\n });\n }\n }\n\n save() {\n this.getOrCreateProject(this.form.value.projectGroup).subscribe((project: Project) => {\n switch (this.form.value.startFrom) {\n case this.EXPERIMENTAL_PROCEDURE: {\n this.closeModal(EDialogCloseEventStatus.OK);\n this.router.navigate(['projects', project.id, project.name, 'experimental-procedure-text']);\n break;\n }\n case this.RETROSYNTHESIS: {\n switch (this.form.value.retroStartFrom) {\n case this.FROM_EXISTING_RETROSYNTHESIS: {\n this.loaderService.show();\n this.apiService.synthesisProcedures\n .getAction<SynthesisProcedure>({\n relation: 'create-from-sequence',\n method: 'POST',\n body: {\n sequenceId: this.form.value.selectedSequence.sequence.id,\n aiModel: this.form.value.selectedAiModel.model.name,\n projectId: project.id,\n },\n isBodyRaw: true,\n })\n .pipe(finalize(() => this.loaderService.hide()))\n .subscribe((response: IApiResponse<SynthesisProcedure>) => {\n this.eventTrackingService.trackEvent('Plan a Synthesis');\n\n this.closeModal(EDialogCloseEventStatus.OK);\n this.router.navigate([\n `/projects`,\n project.id,\n project.name,\n 'synthesis',\n 'procedures',\n response.content.id,\n ]);\n });\n break;\n }\n case this.FROM_RETROSYNTHESIS_FILE: {\n this.loaderService.show();\n this.apiService.synthesisProcedures\n .post<SynthesisProcedure>({\n path: 'create-from-file',\n body: {\n aiModel: this.form.value.selectedAiModel.model.name,\n projectId: project.id,\n fileId: this.form.value.fileId,\n },\n isBodyRaw: true,\n })\n .pipe(finalize(() => this.loaderService.hide()))\n .subscribe((response: IApiResponse<SynthesisProcedure>) => {\n this.eventTrackingService.trackEvent('Plan a Synthesis');\n\n this.closeModal(EDialogCloseEventStatus.OK);\n this.router.navigate([\n `/projects`,\n project.id,\n project.name,\n 'synthesis',\n 'procedures',\n response.content.id,\n ]);\n });\n break;\n }\n }\n }\n }\n });\n }\n\n private resetStartFromRetrosynthesisForm() {\n this.fromProjects = null;\n this.retrosynthesis = null;\n this.sequences = null;\n this.aiModels = null;\n this.form.patchValue(\n {\n fromProject: null,\n selectedRetrosynthesis: null,\n selectedSequence: null,\n selectedAiModel: null,\n fileId: null,\n },\n { emitEvent: false }\n );\n this.form.updateValueAndValidity();\n }\n\n private retroStartFromChange() {\n this.subscription.add(\n this.form\n .get('retroStartFrom')\n .valueChanges.pipe(\n filter(value => [this.FROM_EXISTING_RETROSYNTHESIS, this.FROM_RETROSYNTHESIS_FILE].includes(value)),\n switchMap(value => {\n if (value === this.FROM_EXISTING_RETROSYNTHESIS) {\n return of(null).pipe(\n switchMap(() => {\n this.isFromProjectLoading = true;\n return this.projectsService.getProjectsWithRetrosynthesis().pipe(\n finalize(() => (this.isFromProjectLoading = false)),\n catchError(err => {\n console.log(err);\n return of(null);\n })\n );\n }),\n map((response: IApiResponse<Project[]>) =>\n response.content?.map((project: Project) => ({\n content: project.name,\n project,\n selected: false,\n }))\n ),\n tap((projects: ListItem[]) => (this.fromProjects = projects))\n );\n } else {\n return this.loadAiModels().pipe(map(response => this.mapAiModels(response?.content?.models)));\n }\n })\n )\n .subscribe()\n );\n }\n\n // List of retrosynthesis\n private fromProjectChange() {\n this.subscription.add(\n this.form\n .get('fromProject')\n .valueChanges.pipe(\n tap((item: ListItem) => {\n this.retrosynthesis = null;\n this.sequences = null;\n this.aiModels = null;\n\n if (Array.isArray(item) && item.length === 0) {\n // NOTE: a value of [] is sent when the user press on the clear (x) button on the combobox\n this.form.get('fromProject').setValue(null, { emitEvent: false });\n }\n if (!item?.project) {\n this.form.patchValue(\n { selectedRetrosynthesis: null, selectedSequence: null, selectedAIModel: null },\n { emitEvent: false }\n );\n }\n }),\n filter((item: ListItem) => item?.project),\n switchMap((item: ListItem) => {\n this.isRetrosynthesisListLoading = true;\n return this.projectsService\n .getRels({\n id: item.project.id,\n relation: 'retrosynthesis',\n query: getMongoQuery(\n {\n filtersQuery: { $and: [{ createdBy: this.authService.user.id }] },\n },\n null,\n null\n ),\n })\n .pipe(\n finalize(() => (this.isRetrosynthesisListLoading = false)),\n catchError(err => {\n console.log(err);\n return of(null);\n })\n );\n }),\n filter(response => response !== null),\n tap((response: IApiResponse<SynthesisProcedure[]>) => {\n this.retrosynthesis = response.content.map(retro => {\n const isSelected = response?.content?.length === 1;\n const item = {\n content: retro.name,\n retrosynthesis: retro,\n selected: isSelected,\n };\n if (isSelected) {\n this.form.patchValue({ selectedRetrosynthesis: item });\n }\n return item;\n });\n })\n )\n .subscribe()\n );\n }\n\n // List of sequences or select default sequence\n private retrosyntheticRouteChange() {\n this.subscription.add(\n this.form\n .get('selectedRetrosynthesis')\n .valueChanges.pipe(\n tap((item: ListItem) => {\n this.sequences = null;\n this.aiModels = null;\n\n if (Array.isArray(item) && item.length === 0) {\n // NOTE: a value of [] is sent when the user press on the clear (x) button on the combobox\n this.form.get('selectedRetrosynthesis').setValue(null, { emitEvent: false });\n }\n this.form.get('selectedSequence').setValue(null, { emitEvent: false });\n }),\n filter((item: ListItem) => item?.retrosynthesis),\n switchMap((item: ListItem) => {\n this.isSequencesListLoading = true;\n return this.apiService.retrosynthesis.getById({ id: item.retrosynthesis.id }).pipe(\n finalize(() => (this.isSequencesListLoading = false)),\n catchError(err => {\n console.log(err);\n return of(null);\n })\n );\n })\n )\n .subscribe((response: IApiResponse<SynthesisProcedure>) => {\n this.sequences = null;\n if (response?.content?.sequences) {\n this.sequences = response?.content?.sequences\n .filter(sequence => sequence.canCreateSynthesis)\n .map(sequence => {\n const isSelected = response?.content?.sequences.length === 1;\n const item = {\n content: sequence.label,\n sequence,\n selected: isSelected,\n };\n if (isSelected) {\n this.form.patchValue({ selectedSequence: item });\n }\n return item;\n });\n }\n })\n );\n }\n\n // list of ai models\n private sequenceRouteChange() {\n this.subscription.add(\n this.form\n .get('selectedSequence')\n .valueChanges.pipe(\n tap((item: ListItem) => {\n this.aiModels = null;\n if (Array.isArray(item) && item.length === 0) {\n // NOTE: a value of [] is sent when the user press on the clear (x) button on the combobox\n this.form.get('selectedSequence').setValue(null, { emitEvent: false });\n }\n this.form.get('selectedAiModel').setValue(null, { emitEvent: false });\n }),\n filter((item: ListItem) => item?.sequence),\n debounceTime(500),\n switchMap(() => this.loadAiModels()),\n map(response => this.mapAiModels(response?.content?.models))\n )\n .subscribe()\n );\n }\n\n private loadAiModels(): Observable<IApiResponse<{ models: AiModel[] }>> {\n this.isAiModelsLoading = true;\n return this.apiService.aiModels.getAiModelsForSynthesisFromSequence().pipe(\n finalize(() => (this.isAiModelsLoading = false)),\n catchError(err => {\n console.log(err);\n return of(null);\n })\n );\n }\n\n private mapAiModels(models: AiModel[]) {\n this.aiModels = null;\n if (models) {\n this.aiModels = models.map((model: AiModel) => {\n const item = {\n content: model.name,\n model,\n selected: model.isDefault,\n };\n\n if (model.isDefault) {\n this.form.patchValue({ selectedAiModel: item });\n }\n return item;\n });\n }\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n}\n","<ng-container *ngIf=\"fileEntry\">\n <div class=\"d-flex align-items-center mt-4 cursor-pointer\"\n (click)=\"onDownloadFile()\">\n <span class=\"mr-3\">{{ fileEntry.fileName }}</span>\n <svg icon\n ibmIconDownload\n class=\"fill-interactive cursor-pointer\"\n size=\"16\"></svg>\n </div>\n</ng-container>","import { Component, Input, OnInit } from '@angular/core';\nimport { finalize } from 'rxjs/operators';\n\nimport { FileEntry } from '@app/core/models';\nimport { ApiService, ToastMessagesService } from '@app/core/services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { LoaderService } from '@app/libs/bitforce/components';\nimport { bitfPromptToDownloadFile } from '@app/libs/bitforce/utils';\n\n@Component({\n selector: 'ibm-download-file-entry-button',\n templateUrl: './download-file-entry-button.component.html',\n styleUrls: ['./download-file-entry-button.component.scss'],\n})\nexport class DownloadFileEntryButtonComponent implements OnInit {\n @Input() fileEntry: FileEntry;\n\n constructor(\n private loaderService: LoaderService,\n private apiService: ApiService,\n private toastMessagesService: ToastMessagesService\n ) {}\n\n ngOnInit(): void {}\n\n onDownloadFile() {\n if (this.fileEntry) {\n this.loaderService.show();\n this.apiService.fileEntries\n .request<any>({\n method: 'GET',\n path: `${this.fileEntry.id}/download`,\n responseType: 'arraybuffer',\n })\n .pipe(finalize(() => this.loaderService.hide()))\n .subscribe(response => {\n this.toastMessagesService.show({\n title: 'Download file',\n message: 'Download of file has been started',\n type: EToastMessageType.SUCCESS,\n });\n bitfPromptToDownloadFile(\n response.content,\n this.fileEntry.mimeType,\n this.fileEntry.extension,\n this.fileEntry.baseFileName\n );\n });\n } else {\n this.toastMessagesService.show({\n title: 'Error',\n message: 'Error while downloading file',\n type: EToastMessageType.ERROR,\n });\n }\n }\n}\n","<div\n data-dropdown\n data-dropdown-type=\"inline\"\n data-value\n class=\"bx--dropdown bx--dropdown--inline w-100\"\n #dropDown\n>\n <ul class=\"bx--dropdown-list\" role=\"menu\" tabindex=\"0\">\n <li\n *ngFor=\"let item of items\"\n data-option\n data-value=\"{item}\"\n (click)=\"select.emit(item)\"\n class=\"bx--dropdown-item\"\n >\n <a class=\"bx--dropdown-link\">{{ item }}</a>\n </li>\n </ul>\n</div>\n","import { AfterViewInit, Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core';\nimport { Dropdown } from 'carbon-components';\n\n@Component({\n selector: 'ibm-dropdown-menu',\n templateUrl: './dropdown-menu.component.html',\n styleUrls: ['./dropdown-menu.component.scss'],\n})\nexport class DropdownMenuComponent<T> implements AfterViewInit {\n @Input()\n items: T[];\n @Input()\n set opened(value: boolean) {\n if (this.dropDown) {\n if (value) {\n this.openDropdown();\n } else {\n this.closeDropdown();\n }\n } else {\n this.openedAfterViewInit = value;\n }\n }\n\n @Output()\n select = new EventEmitter<T>();\n\n @ViewChild('dropDown', { static: true }) dropDownEl: ElementRef;\n private dropDown: Dropdown;\n\n private openedAfterViewInit: boolean = undefined;\n\n constructor() {}\n\n ngAfterViewInit() {\n this.dropDown = new Dropdown(this.dropDownEl.nativeElement);\n if (this.openedAfterViewInit !== undefined) {\n if (this.openedAfterViewInit) {\n this.openDropdown();\n } else {\n this.closeDropdown();\n }\n this.openedAfterViewInit = undefined;\n }\n }\n\n private openDropdown() {\n const opened = this.dropdownOpened();\n if (!opened) {\n this.toggleDropdown();\n }\n\n return opened;\n }\n\n private closeDropdown() {\n const closed = !this.dropdownOpened();\n if (!closed) {\n this.toggleDropdown();\n }\n\n return closed;\n }\n\n private toggleDropdown() {\n this.dropDown._toggle({\n type: 'click',\n target: this.dropDownEl.nativeElement,\n });\n }\n\n private dropdownOpened() {\n return this.dropDown && this.dropDown.element.classList.contains('bx--dropdown--open');\n }\n}\n","<div class=\"feedback-share-bar\"\n (ibmClickOutside)=\"onClickOutside()\">\n <div class=\"feedback-share-bar__btn\"\n (click)=\"toggleFeedbackBox()\"\n [ngClass]=\"{'active': showFeedbackBox, 'mr-3': hasShare }\"\n *ngIf=\"hasFeedback\">\n <svg icon\n ibmIconFaceWink\n size=\"24\"></svg>\n </div>\n <div class=\"feedback-share-bar__btn\"\n (click)=\"toggleShareBox()\"\n [ngClass]=\"{'active': showShareBox }\"\n *ngIf=\"hasShare\">\n <svg icon\n ibmIconShare\n size=\"20\"></svg>\n </div>\n\n <!-- Share -->\n <div class=\"feedback-share-bar__box-container\"\n *ngIf=\"showShareBox\">\n <div class=\"feedback-share-bar__box-container__header p-5 pb-0\">\n Share your retrosynthesis\n <svg icon\n ibmIconClose\n size=\"16\"\n (click)=\"closeAllBoxes()\"\n class=\"cursor-pointer\"></svg>\n </div>\n <div class=\"feedback-share-bar__box-container__content share p-5\">\n <div class=\"mb-6\">If you proceed, this sequence will become public.</div>\n <div class=\"mb-4\">Are you sure you want to continue?</div>\n <div class=\"mb-4 small--xs\">Click on the option that you prefer</div>\n <div class=\"d-flex flex-column\">\n <div class=\"share-button cursor-pointer mb-3\"\n (click)=\"onShareOn(eShareType.TWITTER)\">\n I want to share this on Twitter\n <div class=\"share-button__icon\">\n <svg icon\n ibmIconLogoTwitter\n size=\"32\"></svg>\n </div>\n </div>\n <div class=\"share-button cursor-pointer\"\n (click)=\"onCopyShareUrl()\">\n <div class=\"d-flex flex-column\">\n Copy URL\n <span class=\"share-button__share-url\">\n {{ shareUrl }}\n </span>\n </div>\n <div class=\"share-button__icon copy-icon\">\n <svg icon\n ibmIconCopy\n size=\"16\"></svg>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Feedback -->\n <div class=\"feedback-share-bar__box-container\"\n *ngIf=\"showFeedbackBox\">\n <div class=\"feedback-share-bar__box-container__header p-5 pb-0\">\n Help us to improve\n <svg icon\n ibmIconClose\n size=\"16\"\n (click)=\"closeAllBoxes()\"\n class=\"cursor-pointer\"></svg>\n </div>\n <div class=\"feedback-share-bar__box-container__content feedback p-5\">\n <form [formGroup]=\"feedbackForm\">\n <div class=\"mb-4\">What do you think about this sequence?</div>\n <div class=\"feedback-options-container mb-8\">\n <ibm-radio-group formControlName=\"feedback\"\n (change)=\"onChangeFeedback($event)\">\n <ibm-radio [value]=\"eFeedbackType.LIKE\"\n [hostClass]=\"true\">\n <div class=\"feedback-radio-box\">\n <span class=\"feedback-label\">It's good</span>\n <svg icon\n ibmIconFaceSatisfied\n size=\"32\"></svg>\n </div>\n </ibm-radio>\n <ibm-radio [value]=\"eFeedbackType.DISLIKE\"\n [hostClass]=\"true\">\n <div class=\"feedback-radio-box\">\n <span class=\"feedback-label\">It's not so good</span>\n <svg icon\n ibmIconFaceDissatisfied\n size=\"32\"></svg>\n </div>\n </ibm-radio>\n </ibm-radio-group>\n </div>\n <ng-container *ngIf=\"feedbackForm.value.feedback === eFeedbackType.DISLIKE\">\n <div class=\"mb-3\">Would you like to suggest a better solution?</div>\n <ibm-label class=\"mb-4\">\n Write a SMILES string\n <textarea ibmTextArea\n rows=\"4\"\n formControlName=\"smiles\"></textarea>\n </ibm-label>\n <div class=\"d-flex flex-column mb-4\">\n <span class=\"mb-3 small--xs\">Suggest a correction using the visual editor</span>\n <button class=\"visual-editor-btn\"\n (click)=\"onOpenKetcher()\">\n Open visual editor\n </button>\n </div>\n </ng-container>\n </form>\n </div>\n <div class=\"feedback-share-bar__box-container__footer\">\n <button ibmButton=\"secondary\"\n class=\"cancel-button pr-0\"\n (click)=\"onCancelFeedback()\">Cancel</button>\n <button ibmButton=\"primary\"\n class=\"pr-0\"\n (click)=\"submitFeedback()\"\n [disabled]=\"!feedbackForm.valid\">Send Feedback</button>\n </div>\n </div>\n</div>","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { RadioChange } from 'carbon-components-angular';\nimport { finalize } from 'rxjs/operators';\n\nimport { IFeedback, RetrosynthesisSequence } from '@models';\nimport { EFeedback } from '../../enums/feedback.enum';\nimport { DialogsService } from '@app/core/services';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { environment } from '@env/environment';\nimport { SmilesEditorDialogComponent } from '@app/modules/smiles-editor/smiles-editor-dialog/smiles-editor-dialog.component';\n\nexport enum EShareType {\n TWITTER = 'twitter',\n}\n@Component({\n selector: 'ibm-feedback-share-bar',\n templateUrl: './feedback-share-bar.component.html',\n styleUrls: ['./feedback-share-bar.component.scss'],\n})\nexport class FeedbackShareBarComponent implements OnInit, OnChanges {\n @Input() hasShare: boolean;\n @Input() hasFeedback: boolean;\n @Input() sequence: RetrosynthesisSequence;\n @Input() feedback: IFeedback;\n @Output() sendFeedback: EventEmitter<IFeedback> = new EventEmitter<IFeedback>();\n @Output() shareOn: EventEmitter<EShareType> = new EventEmitter<EShareType>();\n @Output() copyShareUrl: EventEmitter<void> = new EventEmitter();\n\n eShareType = EShareType;\n eFeedbackType = EFeedback;\n showFeedbackBox = false;\n showShareBox = false;\n feedbackForm: UntypedFormGroup;\n isKetcherOpened = false;\n feedbackBackup: IFeedback;\n shareUrl = environment.hostUrl + '/public';\n\n constructor(private formBuilder: UntypedFormBuilder, private dialogsService: DialogsService) {}\n\n ngOnInit(): void {\n this.intiForm();\n }\n\n async ngOnChanges(changes: SimpleChanges) {\n if (changes.feedback) {\n this.feedbackBackup = changes.feedback.currentValue;\n this.intiForm();\n }\n }\n\n private intiForm() {\n this.feedbackForm = this.formBuilder.group({\n feedback: [this.feedback?.opinion || null, Validators.required],\n smiles: [this.feedback?.message || null],\n });\n }\n\n onShareOn(shareType: EShareType) {\n this.shareOn.emit(shareType);\n this.closeAllBoxes();\n }\n\n onCopyShareUrl() {\n this.copyShareUrl.emit();\n this.closeAllBoxes();\n }\n\n submitFeedback() {\n this.sendFeedback.emit({\n message: this.feedbackForm.get('smiles').value,\n opinion: this.feedbackForm.get('feedback').value,\n });\n this.closeAllBoxes();\n }\n\n onChangeFeedback(data: RadioChange) {\n switch (data.value) {\n case this.eFeedbackType.LIKE:\n this.feedbackForm.get('smiles').disable();\n this.feedbackForm.get('smiles').clearValidators();\n this.feedbackForm.get('smiles').updateValueAndValidity();\n break;\n case this.eFeedbackType.DISLIKE:\n this.feedbackForm.get('smiles').enable();\n this.feedbackForm.get('smiles').setValidators([Validators.required]);\n this.feedbackForm.get('smiles').updateValueAndValidity();\n break;\n }\n this.feedbackForm.get('smiles').reset();\n }\n\n toggleFeedbackBox() {\n this.showShareBox = false;\n this.showFeedbackBox = !this.showFeedbackBox;\n }\n\n toggleShareBox() {\n this.showFeedbackBox = false;\n this.showShareBox = !this.showShareBox;\n }\n\n onOpenKetcher() {\n this.isKetcherOpened = true;\n this.dialogsService.dialog\n .open(SmilesEditorDialogComponent, {\n smiles: this.feedbackForm.get('smiles').value,\n actionLabel: 'Confirm',\n })\n .afterClosed()\n .pipe(\n finalize(() => {\n setTimeout(() => (this.isKetcherOpened = false));\n })\n )\n .subscribe((closeEvent: IDialogCloseEvent<any>) => {\n if (closeEvent.status === EDialogCloseEventStatus.OK) {\n this.feedbackForm.get('smiles').setValue(closeEvent.data);\n }\n });\n }\n\n onCancelShare() {\n this.closeAllBoxes();\n }\n\n onCancelFeedback() {\n this.closeAllBoxes();\n this.feedback = this.feedbackBackup;\n this.intiForm();\n }\n\n onClickOutside() {\n this.closeAllBoxes();\n }\n\n closeAllBoxes() {\n if (!this.isKetcherOpened) {\n this.showFeedbackBox = false;\n this.showShareBox = false;\n }\n }\n}\n","<ibm-modal [open]=\"open\">\n <ibm-modal-header (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>{{ dialogData.dialogTitle }}</h3>\n </ibm-modal-header>\n <div ibmModalContent\n class=\"ibm-rename-synthesis\">\n <p class=\"font-caption-02 mb-4\">\n {{ dialogData.dialogDescription }} ({{maxFileSizeString }} max\n size).<br />\n <a (click)=\"onDownloadExampleFile()\"\n *ngIf=\"dialogData.showExampleFile\"\n title=\"Download file\">Download an example file</a>\n </p>\n <ibm-mlrp-file-uploader [dropText]=\"'Drag and Drop files here or upload'\"\n [maxFileSize]=\"uploadFileMaxSize\"\n [multiple]=\"false\"\n [acceptedExtensions]=\"dialogData.acceptedFileExtensions || []\"\n (selectedFiles)=\"onSelectedFiles($event)\"></ibm-mlrp-file-uploader>\n </div>\n <ibm-modal-footer>\n <button class=\"bx--btn bx--btn--secondary\"\n (click)=\"closeModal()\">Close</button>\n <button class=\"bx--btn bx--btn--primary\"\n (click)=\"onConfirm()\"\n [disabled]=\"!form.valid\"\n modal-primary-focus>\n Confirm\n </button>\n </ibm-modal-footer>\n</ibm-modal>","import { Component, Inject, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { BaseModal, FileItem } from 'carbon-components-angular';\n\nimport { ApiService } from '@app/core/services';\nimport { bitfPromptToDownloadFile } from '@app/libs/bitforce/utils';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\n\n@Component({\n selector: 'ibm-file-uploader-dialog',\n templateUrl: './file-uploader-dialog.component.html',\n styleUrls: ['./file-uploader-dialog.component.scss'],\n})\nexport class FileUploaderDialogComponent extends BaseModal implements OnInit {\n uploadFileMaxSize = 20971520;\n form: FormGroup;\n\n constructor(\n @Inject('dialogData')\n public dialogData: {\n dialogTitle: string;\n dialogDescription: string;\n showExampleFile: boolean;\n exampleFileContent: string;\n exampleFileName: string;\n uploadFileMaxSize: number;\n acceptedFileExtensions: string[];\n },\n private formBuilder: FormBuilder,\n private apiService: ApiService\n ) {\n super();\n this.uploadFileMaxSize = dialogData.uploadFileMaxSize || this.uploadFileMaxSize;\n }\n\n ngOnInit(): void {\n this.form = this.formBuilder.group({\n fileId: [null, Validators.required],\n });\n }\n\n get maxFileSizeString() {\n return (this.uploadFileMaxSize || 0) / 1024 / 1024 + 'MB';\n }\n\n onSelectedFiles(files: Set<FileItem>) {\n if (files) {\n const selectedFile = Array.from(files)[0];\n if (selectedFile) {\n selectedFile.state = 'upload';\n this.apiService.fileEntries\n .upload<any>({ files: [selectedFile.file] })\n .subscribe(\n (fileResponse: any) => {\n selectedFile.state = 'edit';\n selectedFile.uploaded = true;\n\n this.form.patchValue({\n fileId: fileResponse.content?.id,\n });\n },\n error => {\n selectedFile.state = 'edit';\n selectedFile.invalid = true;\n selectedFile.invalidText =\n error.error?.metadata?.uiMessages?.errors[0]?.message || error.message;\n }\n );\n }\n }\n }\n\n onDownloadExampleFile() {\n bitfPromptToDownloadFile(\n this.dialogData.exampleFileContent,\n 'txt',\n 'txt',\n this.dialogData.exampleFileName\n );\n }\n\n onConfirm() {\n this.close.emit({\n status: EDialogCloseEventStatus.OK,\n data: {\n fileId: this.form.get('fileId').value,\n },\n } as IDialogCloseEvent<{ fileId: string }>);\n }\n\n closeModal() {\n this.close.emit({\n status: EDialogCloseEventStatus.CANCEL,\n } as IDialogCloseEvent<void>);\n }\n}\n","import { Component, EventEmitter, Injector, Input, Output } from '@angular/core';\nimport { ToastMessagesService } from '@app/core/services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { FileItem } from 'carbon-components-angular';\n\n@Component({\n selector: 'ibm-mlrp-file-uploader',\n templateUrl: './file-uploader.component.html',\n styleUrls: ['./file-uploader.component.scss'],\n})\nexport class FileUploaderComponent {\n @Input() files: Set<FileItem> = new Set();\n @Input() title: string;\n @Input() description: string;\n @Input() multiple = false;\n @Input() skeleton = false;\n @Input() buttonText;\n @Input() buttonType;\n @Input() dropText: string;\n @Input() acceptedExtensions: string[] = [];\n @Input() maxFileSize = 20000;\n @Input() size = 'normal';\n @Input() drop = true;\n\n @Output() selectedFiles: EventEmitter<Set<FileItem>> = new EventEmitter();\n\n constructor(private toastMessagesService: ToastMessagesService) {}\n\n onSelectFiles(event: Set<FileItem>) {\n const transferredFiles = Array.from(event);\n\n if (!transferredFiles.length) {\n this.files.clear();\n this.selectedFiles.emit();\n return;\n }\n\n const promises = transferredFiles.map(file => this.readFileAndCheckTypePromise(file));\n\n Promise.all(promises)\n .then(filePromiseArray => filePromiseArray.map((acceptedFile: any) => acceptedFile.file))\n .then((acceptedFiles: FileItem[]) => {\n const validFileItems = Array.from(this.files).filter((file: any) => !file.invalid);\n this.files = new Set(acceptedFiles);\n this.selectedFiles.emit(new Set(validFileItems));\n })\n .catch(error => {\n this.toastMessagesService.show({\n title: 'Error',\n message: error.currentTarget.error.message,\n type: EToastMessageType.ERROR,\n });\n });\n }\n\n private readFileAndCheckTypePromise(fileObj: FileItem) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsArrayBuffer(fileObj.file);\n reader.onload = () => {\n const invalidText = [];\n let isExtAllowed = true;\n\n if (this.acceptedExtensions.length) {\n isExtAllowed = this.acceptedExtensions.some(ext =>\n fileObj.file.name.toUpperCase().endsWith(ext.toUpperCase())\n );\n if (!isExtAllowed) {\n invalidText.push('File extension not allowed');\n }\n }\n\n const isFileSizeAllowed = this.maxFileSize >= fileObj.file.size;\n if (!isFileSizeAllowed) {\n invalidText.push('File exceeded size limit');\n }\n\n fileObj.uploaded = false;\n fileObj.state = invalidText.length ? 'edit' : 'upload';\n fileObj.invalid = !isExtAllowed || !isFileSizeAllowed;\n fileObj.invalidText = invalidText.join(', ');\n\n resolve({\n file: fileObj,\n });\n };\n\n reader.onerror = error => {\n this.files.delete(fileObj);\n reject(error);\n };\n });\n }\n}\n","<ibm-file-uploader [title]=\"title\"\n [description]=\"description\"\n [accept]=\"acceptedExtensions\"\n [multiple]=\"multiple\"\n [skeleton]=\"skeleton\"\n [(files)]=\"files\"\n [size]=\"size\"\n [drop]=\"drop\"\n [dropText]=\"dropText\"\n [buttonText]=\"buttonText\"\n [buttonType]=\"buttonType\"\n (filesChange)=\"onSelectFiles($event)\">\n</ibm-file-uploader>","<button [ibmButton]=\"filtersValues ? 'primary' : 'secondary'\"\n [iconOnly]=\"true\"\n [hasAssistiveText]=\"true\"\n [ibmOverflowMenu]=\"templateRef\"\n [shouldClose]=\"shouldCloseFilters.bind(this)\"\n (click)=\"toggleFilters()\"\n [customPane]=\"true\"\n [flip]=\"true\"\n [offset]=\"{ x: 4, y: 0 }\"\n placement=\"bottom\"\n wrapperClass=\"ibm-filters-wrapper\"\n #overflowMenu>\n <svg ibmIconFilter\n size=\"16\"></svg>\n</button>\n<ng-template #templateRef>\n <form class=\"ibm-filters\"\n [formGroup]=\"filtersForm\"\n (submit)=\"onFiltersFormSubmit()\">\n <div class=\"ibm-filters__container\">\n <div class=\"ibm-filters__container__form-item\"\n *ngIf=\"filters.includes(eFilterType.FAVORITE)\">\n <div class=\"w-100\">\n <ibm-dropdown label=\"Show\"\n [theme]=\"'light'\"\n placeholder=\"All\"\n formControlName=\"favorite\"\n [dropUp]=\"false\"\n itemValueKey=\"value\">\n <ibm-dropdown-list [items]=\"favoriteSelectionOptions\"></ibm-dropdown-list>\n </ibm-dropdown>\n </div>\n </div>\n\n <div class=\"ibm-filters__container__form-item\"\n *ngIf=\"filters.includes(eFilterType.CREATED_BY)\">\n <div class=\"w-100\">\n <ibm-dropdown label=\"Creator\"\n [theme]=\"'light'\"\n placeholder=\"Choose creator\"\n formControlName=\"createdBy\"\n [dropUp]=\"false\"\n itemValueKey=\"id\"\n [skeleton]=\"filtersData?.createdBy?.isLoading\">\n <ibm-dropdown-list [items]=\"filtersData?.createdBy?.options || []\"></ibm-dropdown-list>\n </ibm-dropdown>\n </div>\n </div>\n\n <div class=\"ibm-filters__container__form-item\"\n *ngIf=\"filters.includes(eFilterType.CREATOR_FULL_NAME)\">\n <div class=\"w-100\">\n <ibm-label>\n Creator\n <input ibmText\n [theme]=\"'light'\"\n autocomplete=\"off\"\n formControlName=\"creatorFullName\">\n </ibm-label>\n </div>\n </div>\n\n <div class=\"ibm-filters__container__form-item\"\n *ngIf=\"filters.includes(eFilterType.AI_MODEL)\">\n <div class=\"w-100\">\n <ibm-combo-box label=\"AI model\"\n [theme]=\"'light'\"\n placeholder=\"Choose AI models\"\n formControlName=\"aiModel\"\n [dropUp]=\"false\"\n itemValueKey=\"id\"\n type=\"multi\"\n *ngIf=\"!filtersData?.aIModel?.isLoading\"\n [items]=\"filtersData?.aIModel?.options || []\">\n <ibm-dropdown-list></ibm-dropdown-list>\n </ibm-combo-box>\n <ibm-dropdown label=\"AI Model\"\n placeholder=\"Choose AI Models\"\n *ngIf=\"filtersData?.aIModel?.isLoading\"\n [skeleton]=\"true\">\n <ibm-dropdown-list></ibm-dropdown-list>\n </ibm-dropdown>\n </div>\n </div>\n\n <div class=\"ibm-filters__container__form-item\"\n *ngIf=\"filters.includes(eFilterType.SYNTHESIS_SOURCE_TYPOLOGY)\">\n <div class=\"w-100\">\n <ibm-dropdown label=\"Source\"\n [theme]=\"'light'\"\n placeholder=\"Source\"\n formControlName=\"synthesisSourceTypology\"\n [dropUp]=\"false\"\n itemValueKey=\"id\"\n (selected)=\"onSynthesisSourceTypologyChange($event.item)\">\n <ibm-dropdown-list [items]=\"filtersData?.synthesisSourceTypology?.options || []\">\n </ibm-dropdown-list>\n </ibm-dropdown>\n </div>\n </div>\n\n <div class=\"ibm-filters__container__form-item\"\n *ngIf=\"filters.includes(eFilterType.RETROSYNTHESIS_SOURCE)\">\n <div class=\"w-100\">\n <ibm-combo-box [theme]=\"'light'\"\n label=\"Retrosynthesis\"\n placeholder=\"Search retrosynthesis\"\n formControlName=\"retrosynthesisSource\"\n [dropUp]=\"false\"\n (search)=\"onSearch($event, eFilterType.RETROSYNTHESIS_SOURCE)\"\n [items]=\"filtersData?.retrosynthesisSource?.options || []\">\n <ibm-dropdown-list></ibm-dropdown-list>\n </ibm-combo-box>\n </div>\n </div>\n\n <div class=\"ibm-filters__container__form-item\"\n *ngIf=\"filters.includes(eFilterType.SYNTHESIS_PROCEDURE)\">\n <div class=\"w-100\">\n <ibm-combo-box [theme]=\"'light'\"\n label=\"Source\"\n placeholder=\"Search source\"\n formControlName=\"synthesisProcedure\"\n [dropUp]=\"false\"\n (search)=\"onSearch($event, eFilterType.SYNTHESIS_PROCEDURE)\"\n [items]=\"filtersData?.synthesisProcedure?.options || []\">\n <ibm-dropdown-list></ibm-dropdown-list>\n </ibm-combo-box>\n </div>\n </div>\n\n\n <div class=\"ibm-filters__container__form-item\"\n *ngIf=\"filters.includes(eFilterType.DATE)\">\n <ibm-date-picker range=\"true\"\n id=\"initial-value-datepicker\"\n formControlName=\"dateRange\"\n dateFormat=\"Y-m-d\"\n label=\"Start date\"\n rangeLabel=\"End date\"\n [theme]=\"'light'\">\n </ibm-date-picker>\n </div>\n\n <div class=\"ibm-filters__container__form-item\"\n *ngIf=\"filters.includes(eFilterType.RETROSYNTHESIS_TYPOLOGY)\">\n <div class=\"w-100\">\n <ibm-dropdown label=\"Type\"\n [theme]=\"'light'\"\n placeholder=\"Type\"\n formControlName=\"retrosynthesisTypology\"\n [dropUp]=\"false\"\n itemValueKey=\"id\">\n <ibm-dropdown-list [items]=\"filtersData?.retrosynthesisTypology?.options || []\">\n </ibm-dropdown-list>\n </ibm-dropdown>\n </div>\n </div>\n\n <div class=\"ibm-filters__container__form-item\"\n *ngIf=\"filters.includes(eFilterType.CONFIDENCE)\">\n <div class=\"d-flex w-100\">\n <ibm-number [label]=\"numberMin\"\n [theme]=\"'light'\"\n [min]=\"0\"\n [max]=\"1\"\n [step]=\"0.1\"\n [precision]=\"1\"\n formControlName=\"minConfidence\">\n </ibm-number>\n <ibm-number [label]=\"numberMax\"\n [theme]=\"'light'\"\n [min]=\"0\"\n [max]=\"1\"\n [step]=\"0.1\"\n [precision]=\"1\"\n formControlName=\"maxConfidence\">\n </ibm-number>\n </div>\n </div>\n\n <div class=\"ibm-filters__container__form-item\"\n *ngIf=\"filters.includes(eFilterType.STEPS)\">\n <ibm-number label=\"Steps from\"\n [theme]=\"'light'\"\n [min]=\"0\"\n [max]=\"100\"\n [step]=\"1\"\n [precision]=\"1\"\n formControlName=\"stepsFrom\">\n </ibm-number>\n <ibm-number label=\"Steps to\"\n [theme]=\"'light'\"\n [min]=\"0\"\n [max]=\"100\"\n [step]=\"1\"\n [precision]=\"1\"\n formControlName=\"stepsTo\">\n </ibm-number>\n </div>\n\n <div class=\"ibm-filters__container__form-item\"\n *ngIf=\"filters.includes(eFilterType.STATUS)\">\n <div class=\"w-100\">\n <ibm-dropdown label=\"Status\"\n [theme]=\"'light'\"\n placeholder=\"Status\"\n formControlName=\"status\"\n [dropUp]=\"false\"\n itemValueKey=\"value\">\n <ibm-dropdown-list [items]=\"filtersData?.status.options || []\"></ibm-dropdown-list>\n </ibm-dropdown>\n </div>\n </div>\n\n <div class=\"ibm-filters__container__form-item\"\n *ngIf=\"filters.includes(eFilterType.TRAINING_MODEL_TYPE)\">\n <div class=\"w-100\">\n <ibm-dropdown label=\"Model training type\"\n [theme]=\"'light'\"\n placeholder=\"Model training type\"\n formControlName=\"modelType\"\n [dropUp]=\"false\"\n itemValueKey=\"value\">\n <ibm-dropdown-list [items]=\"filtersData?.modelType.options || []\"></ibm-dropdown-list>\n </ibm-dropdown>\n </div>\n </div>\n\n <div class=\"ibm-filters__container__form-item d-flex flex-column\"\n *ngIf=\"filters.includes(eFilterType.MOLECULES)\">\n <div class=\"ibm-filters-molecule-description\">\n Select with or without and type the molecule SMILES, use “,†to separate and add more that one\n </div>\n <div class=\"ibm-filters-molecule\">\n <div class=\"ibm-filters-molecule_item-wrapper\">\n <ibm-dropdown [theme]=\"'light'\"\n formControlName=\"moleculeSelectionType\"\n [dropUp]=\"false\"\n itemValueKey=\"value\">\n <ibm-dropdown-list [items]=\"moleculeSelectionOptions\"></ibm-dropdown-list>\n </ibm-dropdown>\n </div>\n <div class=\"ibm-filters-molecule_item-wrapper\">\n <input ibmText\n [theme]=\"'light'\"\n [autocomplete]=\"false\"\n formControlName=\"molecules\">\n </div>\n </div>\n </div>\n <div class=\"mt-5\">\n <a (click)=\"resetFilters()\">Reset all filters</a>\n </div>\n </div>\n <div class=\"ibm-filters__footer\">\n <button [ibmButton]=\"'primary'\"\n [disabled]=\"filtersForm.invalid\"\n type=\"submit\">\n Filter\n </button>\n <button [ibmButton]=\"'secondary'\"\n (click)=\"closeFilters()\">\n Cancel\n </button>\n </div>\n </form>\n</ng-template>","import { Component, OnInit, Input, Output, EventEmitter, ViewChild, OnDestroy } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { ListItem, OverflowMenuDirective } from 'carbon-components-angular';\n\nimport { MinMaxValidator } from '@app/shared/form-utilities';\nimport { getRange, getRegexQueryFromKeyword } from '@bitf/utils';\nimport { Observable, Subscription } from 'rxjs';\nimport { EFilterType } from '@app/shared/enums/filters.enum';\nimport { ERetrosynthesisTypology } from '@app/core/models';\nimport { ESynthesisSourceType, ESynthesisTypologyFilter } from '@app/core/models/synthesis-super.model';\n\n@Component({\n selector: 'ibm-filters',\n templateUrl: './filters.component.html',\n styleUrls: ['./filters.component.scss'],\n})\nexport class FiltersComponent implements OnInit, OnDestroy {\n @ViewChild(OverflowMenuDirective) overflowMenu: OverflowMenuDirective;\n\n @Input()\n filters: EFilterType[] = [];\n @Input()\n filtersValues: IFiltersFormValue;\n @Input()\n header = 'Filter reactions collected by';\n @Input()\n loadFiltersData: Observable<{ [key: string]: any }> = new Observable();\n\n @Output()\n filtersChange: EventEmitter<IActiveFilters> = new EventEmitter<IActiveFilters>();\n @Output()\n showFiltersChange: EventEmitter<boolean> = new EventEmitter();\n @Output()\n cancel: EventEmitter<any> = new EventEmitter();\n @Output()\n search: EventEmitter<{\n searchValue: string;\n filterType: EFilterType;\n }> = new EventEmitter();\n\n filtersData: IFiltersData = {};\n isFiltersDataLoaded = false;\n showFilters = false;\n filtersForm: UntypedFormGroup;\n numberMin = 'Min confidence';\n numberMax = 'Max confidence';\n subscription = new Subscription();\n eFilterType = EFilterType;\n\n dateFormat = 'd-m-Y';\n moleculeSelectionOptions: ListItem[] = [\n { content: '-', selected: true },\n { value: 'with', content: 'With this', selected: false },\n { value: 'without', content: 'Without this', selected: false },\n ];\n favoriteSelectionOptions: ListItem[] = [\n { content: 'All', selected: true },\n { value: 'favorite', content: 'Favorite', selected: false },\n { value: 'not_favorite', content: 'Not favorite', selected: false },\n ];\n\n constructor(private fb: UntypedFormBuilder) {}\n\n ngOnInit() {\n this.createForm();\n }\n\n createForm() {\n this.filtersForm = this.fb.group({\n dateRange: [],\n favorite: [null],\n minConfidence: [\n null,\n [MinMaxValidator.MinMaxValidator('maxConfidence'), Validators.min(0), Validators.max(10)],\n ],\n maxConfidence: [null, [Validators.min(0), Validators.max(10)]],\n molecules: [],\n moleculeSelectionType: [this.moleculeSelectionOptions[0]],\n solvent: [false],\n catalyst: [false],\n generic: [false],\n status: [null],\n stepsFrom: [null, [MinMaxValidator.MinMaxValidator('stepsTo'), Validators.min(0), Validators.max(10)]],\n stepsTo: [null, [Validators.min(0), Validators.max(10)]],\n createdBy: [null],\n creatorFullName: [null],\n aiModel: [[]],\n modelType: [[]],\n retrosynthesisTypology: [null],\n synthesisSourceTypology: [null],\n retrosynthesisSource: [\n {\n value: null,\n disabled:\n this.filters.includes(EFilterType.SYNTHESIS_SOURCE_TYPOLOGY) &&\n this.filtersValues?.synthesisSourceTypology !== ESynthesisTypologyFilter.FROM_RETROSYNTHESIS,\n },\n ],\n synthesisProcedure: [null],\n });\n\n if (this.filtersValues) {\n this.filtersForm.patchValue(this.filtersValues);\n }\n }\n\n onFiltersFormSubmit() {\n if (!this.filtersForm.valid) {\n return;\n }\n\n this.filtersChange.emit(this.getActiveFilters());\n this.closeFilters();\n }\n\n onSearch(searchValue, filterType) {\n if (searchValue) {\n this.search.emit({ searchValue, filterType });\n }\n }\n\n getSmilesQuery() {\n const smilesString = this.filtersForm.value.molecules;\n if (!smilesString) {\n return null;\n }\n const type = this.filtersForm.value.moleculeSelectionType;\n\n if (!smilesString || !type) {\n return null;\n }\n let smilesQueryList = null;\n if (type === 'with') {\n smilesQueryList = smilesString\n .split(',')\n .map(smiles => getRegexQueryFromKeyword(smiles, ['smiles'])[0]);\n } else {\n smilesQueryList = smilesString\n .split(',')\n .map(smiles => getRegexQueryFromKeyword(smiles, ['smiles'], true)[0]);\n }\n\n return smilesQueryList ? { $and: smilesQueryList } : null;\n }\n\n onSynthesisSourceTypologyChange(item: ListItem) {\n if (item.id !== ESynthesisTypologyFilter.FROM_RETROSYNTHESIS) {\n this.filtersForm.get('retrosynthesisSource').disable();\n this.filtersForm.get('retrosynthesisSource').reset();\n } else {\n this.filtersForm.get('retrosynthesisSource').enable();\n }\n }\n\n resetFilters() {\n this.filtersForm.reset({\n aiModel: [],\n });\n this.filtersForm.updateValueAndValidity();\n this.onFiltersFormSubmit();\n }\n\n closeFilters(): void {\n this.showFilters = false;\n this.overflowMenu.close();\n }\n\n openFilters(): void {\n this.showFilters = true;\n this.overflowMenu.open();\n }\n\n shouldCloseFilters() {\n return !this.showFilters;\n }\n\n toggleFilters() {\n if (!this.isFiltersDataLoaded) {\n this.isFiltersDataLoaded = true;\n this.subscription.add(\n this.loadFiltersData.subscribe((filtersData: IFiltersData) => {\n this.filtersData = { ...this.filtersData, ...filtersData };\n setTimeout(() => {\n this.filtersForm.patchValue(this.filtersValues);\n });\n })\n );\n }\n\n this.showFiltersChange.emit(!this.overflowMenu.isOpen);\n if (!this.overflowMenu.isOpen) {\n this.openFilters();\n } else {\n this.closeFilters();\n }\n }\n\n private getActiveFilters(): IActiveFilters {\n const filters = {\n $and: [],\n };\n\n const dateRange: [Date, Date] = this.filtersForm.get('dateRange').value;\n if (dateRange) {\n dateRange[1] = new Date(dateRange[1].getTime() + 60 * 60 * 24 * 1000);\n filters.$and.push({\n $or: [\n getRange(dateRange[0], dateRange[1], 'createdOn'),\n getRange(dateRange[0], dateRange[1], 'modifiedOn'),\n ],\n });\n }\n\n // check for confidence range\n if (this.filters.includes(EFilterType.CONFIDENCE)) {\n const confidenceRange = getRange(\n this.filtersForm.get('minConfidence').value,\n this.filtersForm.get('maxConfidence').value,\n 'confidence'\n );\n if (confidenceRange) {\n filters.$and.push(confidenceRange);\n }\n }\n\n // check for confidence range\n if (this.filters.includes(EFilterType.STEPS)) {\n const confidenceRange = getRange(\n this.filtersForm.get('stepsFrom').value,\n this.filtersForm.get('stepsTo').value,\n 'steps'\n );\n if (confidenceRange) {\n filters.$and.push(confidenceRange);\n }\n }\n\n // check for molecules\n if (this.filters.includes(EFilterType.MOLECULES)) {\n const smilesQuery = this.getSmilesQuery();\n if (smilesQuery) {\n filters.$and.push(smilesQuery);\n }\n }\n\n // check for status\n if (this.filters.includes(EFilterType.STATUS) && this.filtersForm.get('status').value) {\n filters.$and.push({\n status: {\n $regex: this.filtersForm.get('status').value,\n $options: 'i',\n },\n });\n }\n\n // check ai training model\n if (\n this.filters.includes(EFilterType.TRAINING_MODEL_TYPE) &&\n this.filtersForm.get('modelType').value &&\n this.filtersForm.get('modelType').value.length\n ) {\n filters.$and.push({\n modelType: {\n $regex: this.filtersForm.get('modelType').value,\n $options: 'i',\n },\n });\n }\n\n // check for createdBy\n if (this.filters.includes(EFilterType.CREATED_BY) && this.filtersForm.get('createdBy').value) {\n filters.$and.push({\n createdBy: this.filtersForm.get('createdBy').value,\n });\n }\n\n // check for creator full name\n if (\n this.filters.includes(EFilterType.CREATOR_FULL_NAME) &&\n this.filtersForm.get('creatorFullName').value\n ) {\n filters.$and.push({\n creatorFullName: {\n $regex: this.filtersForm.get('creatorFullName').value,\n $options: 'i',\n },\n });\n }\n\n // check for aiModel\n if (\n this.filters.includes(EFilterType.AI_MODEL) &&\n this.filtersForm.get('aiModel').value &&\n this.filtersForm.get('aiModel').value.length\n ) {\n filters.$and.push({\n aiModel: { $in: this.filtersForm.get('aiModel').value },\n });\n }\n\n if (\n this.filters.includes(EFilterType.RETROSYNTHESIS_TYPOLOGY) &&\n this.filtersForm.get('retrosynthesisTypology').value\n ) {\n const retroTypology: ERetrosynthesisTypology = this.filtersForm.get('retrosynthesisTypology').value;\n switch (retroTypology) {\n case ERetrosynthesisTypology.INTERACTIVE:\n filters.$and.push({\n interactive: true,\n });\n break;\n case ERetrosynthesisTypology.AUTOMATIC:\n filters.$and.push({\n interactive: false,\n fromFile: false,\n });\n break;\n case ERetrosynthesisTypology.FROM_FILE:\n filters.$and.push({\n fromFile: true,\n interactive: false,\n });\n break;\n }\n }\n\n if (\n this.filters.includes(EFilterType.SYNTHESIS_SOURCE_TYPOLOGY) &&\n this.filtersForm.get('synthesisSourceTypology').value\n ) {\n const synthesisSourceTypology: ESynthesisTypologyFilter = this.filtersForm.get(\n 'synthesisSourceTypology'\n ).value;\n switch (synthesisSourceTypology) {\n case ESynthesisTypologyFilter.FROM_TEXT:\n filters.$and.push({\n sourceType: ESynthesisSourceType.TEXT,\n });\n break;\n case ESynthesisTypologyFilter.FROM_RETROSYNTHESIS:\n filters.$and.push({\n sourceType: ESynthesisSourceType.RETROSYNTHESIS,\n });\n break;\n }\n }\n\n if (\n this.filters.includes(EFilterType.RETROSYNTHESIS_SOURCE) &&\n this.filtersForm.get('retrosynthesisSource').value &&\n !Array.isArray(this.filtersForm.get('retrosynthesisSource').value)\n ) {\n filters.$and.push({\n retrosynthesisId: this.filtersForm.get('retrosynthesisSource').value.id,\n });\n }\n\n if (\n this.filters.includes(EFilterType.SYNTHESIS_PROCEDURE) &&\n this.filtersForm.get('synthesisProcedure').value &&\n !Array.isArray(this.filtersForm.get('synthesisProcedure').value)\n ) {\n filters.$and.push({\n synthesisId: this.filtersForm.get('synthesisProcedure').value.id,\n });\n }\n\n // check for favorite\n if (this.filters.includes(EFilterType.FAVORITE) && this.filtersForm.get('favorite').value) {\n filters.$and.push({\n favorite: this.filtersForm.get('favorite').value === 'favorite',\n });\n }\n\n return {\n filtersQuery: filters.$and.length ? filters : null,\n filtersValues: filters.$and.length ? this.filtersForm.value : null,\n };\n }\n\n ngOnDestroy() {\n this.closeFilters();\n this.subscription.unsubscribe();\n }\n}\n\nexport interface IFiltersFormValue {\n dateRange?: any;\n minConfidence?: number;\n maxConfidence?: number;\n molecules?: string;\n solvent?: boolean;\n catalyst?: boolean;\n generic?: boolean;\n favorite?: boolean;\n moleculeSelectionType?: ListItem;\n status?: ListItem;\n createdBy?: string;\n aiModel?: string[];\n isInteractive?: boolean;\n retrosynthesisSource?: ListItem;\n synthesisProcedure?: ListItem;\n retrosynthesisTypology?: string;\n synthesisSourceTypology?: string;\n}\n\nexport interface IActiveFilters {\n filtersQuery?: any;\n filtersValues?: IFiltersFormValue;\n}\n\nexport interface IFiltersData {\n [key: string]: {\n options: ListItem[];\n isLoading: boolean;\n };\n}\n","<button ibmButton=\"ghost\"\n (click)=\"onCopyFingerprint()\"\n class=\"text-01 small--xs\"\n [iconOnly]=\"true\"\n title=\"Copy fingerprint\"\n *ngIf=\"smiles\"\n data-e2e=\"fingerprintBtn\">\n <svg icon\n ibmIconFingerprintRecognition\n size=\"16\"\n class=\"bx--btn__icon\"></svg>\n</button>\n<div id=\"fingerprintValue\"\n class=\"d-none\"\n data-e2e=\"fingerprintValue\"></div>","import { Component, Input, OnInit } from '@angular/core';\nimport { ApiService, ToastMessagesService } from '@app/core/services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { LoaderService } from '@app/libs/bitforce/components';\nimport { copyToClipboard } from '@app/shared/common-utilities/clipboard';\nimport { finalize } from 'rxjs/operators';\n\n@Component({\n selector: 'ibm-fingerprint-button',\n templateUrl: './fingerprint-button.component.html',\n styleUrls: ['./fingerprint-button.component.scss'],\n})\nexport class FingerprintButtonComponent implements OnInit {\n @Input() smiles: string;\n\n constructor(\n private toastMessagesService: ToastMessagesService,\n private apiService: ApiService,\n private loaderService: LoaderService\n ) {}\n\n ngOnInit(): void {}\n\n onCopyFingerprint() {\n const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n this.loaderService.show();\n if (isSafari && navigator.clipboard) {\n // @ts-ignore\n navigator.clipboard.write([\n // @ts-ignore\n new ClipboardItem({\n 'text/plain': this.getFingerprint()\n .toPromise()\n .then(response => {\n const fingerprint = response.content?.data?.fingerprint;\n if (fingerprint) {\n this.showFingerprintConfirmMessage();\n return new Blob([`[${fingerprint}]`], { type: 'text/plain' });\n } else {\n this.showFingerprintErrorMessage();\n }\n })\n .catch(() => {\n this.showFingerprintErrorMessage();\n return '';\n }),\n }),\n ]);\n } else {\n this.getFingerprint().subscribe(async response => {\n const fingerprint = response.content?.data?.fingerprint;\n if (fingerprint) {\n await copyToClipboard(`[${fingerprint}]`);\n if (document.getElementById('fingerprintValue')) {\n document.getElementById('fingerprintValue').innerText = `[${fingerprint}]`;\n }\n this.showFingerprintConfirmMessage();\n } else {\n this.showFingerprintErrorMessage();\n }\n });\n }\n }\n\n private getFingerprint() {\n return this.apiService.actions.generateFingerprint(this.smiles).pipe(\n finalize(() => {\n this.loaderService.hide();\n })\n );\n }\n\n private showFingerprintConfirmMessage() {\n this.toastMessagesService.show({\n title: 'Info',\n message: 'Fingerprint copied to clipboard',\n type: EToastMessageType.SUCCESS,\n });\n }\n\n private showFingerprintErrorMessage() {\n this.toastMessagesService.show({\n title: 'Error',\n message: 'Unable to generate fingerprint',\n type: EToastMessageType.ERROR,\n });\n }\n}\n","import {\n AfterContentChecked,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\n\n@Component({\n selector: 'ibm-full-height-panel',\n templateUrl: './full-height-panel.component.html',\n styleUrls: ['./full-height-panel.component.scss'],\n})\nexport class FullHeightPanelComponent implements OnInit, AfterContentChecked {\n @ViewChild('button') buttonRef: ElementRef;\n @Input() buttonTitle: string;\n @Input() panelWidth;\n @Input() showPanel = false;\n @Input() e2eButtonData;\n @Output() togglePanel = new EventEmitter<boolean>();\n\n panelPosition = { top: '0', left: '0' };\n\n constructor() {}\n\n ngOnInit(): void {\n this.panelWidth = Math.min(this.panelWidth, 800);\n }\n\n ngAfterContentChecked(): void {\n const data = this.buttonRef?.nativeElement?.getBoundingClientRect();\n this.panelPosition.top = `${data?.top + data?.height}px`;\n this.panelPosition.left = `${data?.right - this.panelWidth}px`;\n }\n\n onTogglePanel() {\n this.showPanel = !this.showPanel;\n this.togglePanel.emit(this.showPanel);\n }\n}\n","<div class=\"d-inline\">\n <button #button\n ibmButton=\"ghost\"\n (click)=\"onTogglePanel()\"\n [ngClass]=\"{'btn-active': showPanel}\"\n [iconOnly]=\"true\"\n [attr.aria-expanded]=\"showPanel\"\n [attr.data-e2e]=\"e2eButtonData\"\n [title]=\"buttonTitle\">\n <ng-content select=\"[icon]\"></ng-content>\n </button>\n <div class=\"panel-container p-5\"\n [ngStyle]=\"{\n 'left': panelPosition.left, \n 'top': panelPosition.top, \n 'width': panelWidth + 'px', \n 'height': 'calc(100vh - ' + panelPosition.top +'',\n 'max-height': 'calc(100vh - ' + panelPosition.top +''\n }\"\n [ngClass]=\"{ 'panel-container__invisible': !showPanel }\">\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</div>","import { Component, OnInit } from '@angular/core';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\nimport { Router } from '@angular/router';\n\nimport { BaseModal } from 'carbon-components-angular';\nimport { ToastMessagesService } from '@app/core/services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\n\n@Component({\n selector: 'ibm-get-roborxn-key-dialog',\n templateUrl: './get-roborxn-key-dialog.component.html',\n styleUrls: ['./get-roborxn-key-dialog.component.scss'],\n})\nexport class GetRoborxnKeyDialogComponent extends BaseModal implements OnInit {\n simulatorKey = 'z7WcYzqPGEcFW.iY2VUA7hvzTs4';\n\n constructor(private router: Router, private toastMessagesService: ToastMessagesService) {\n super();\n }\n\n ngOnInit() {}\n\n onActivateNow() {\n this.router.navigate(['/', 'user', 'profile']);\n this.close.emit({\n status: EDialogCloseEventStatus.OK,\n } as IDialogCloseEvent<void>);\n }\n\n onCancel() {\n this.close.emit({\n status: EDialogCloseEventStatus.CANCEL,\n } as IDialogCloseEvent<void>);\n }\n\n simulatorKeyClick() {\n this.toastMessagesService.show({\n title: 'Info',\n message: 'Key copied to clipboard',\n type: EToastMessageType.SUCCESS,\n });\n }\n}\n","<ibm-modal [open]=\"open\"\n [size]=\"'sm'\">\n <ibm-modal-header (closeSelect)=\"onCancel()\">\n <h4>IBM RoboRXN</h4>\n </ibm-modal-header>\n <section class=\"bx--modal-content\">\n It looks like you do not have a valid RoboRXN activation key.\n You can activate the simulator key right away and unleash the power of Cloud and AI:\n\n <p class=\"d-flex align-items-center justify-content-center mt-3\">\n <span class=\"font-weight-bold mr-5\">{{ simulatorKey }}</span>\n <button ibmButton=\"ghost\"\n [iconOnly]=\"true\"\n (click)=\"simulatorKeyClick()\"\n [ibmClipboard]=\"simulatorKey\">\n <ibm-icon-copy-file size=\"20\"\n class=\"fill-interactive\"></ibm-icon-copy-file>\n </button>\n </p>\n </section>\n\n <ibm-modal-footer>\n <button ibmButton=\"secondary\"\n (click)=\"onCancel()\">\n Cancel\n </button>\n <button ibmButton=\"primary\"\n (click)=\"onActivateNow()\">\n Activate now\n </button>\n </ibm-modal-footer>\n</ibm-modal>","<ibm-header name=\"RXN\"\n [brand]=\"brandTemplate\">\n <ibm-hamburger *ngIf=\"hasSidenav && !isModal\"\n [active]=\"appSessionService.isLeftSidenavVisible\"\n (selected)=\"appSessionService.isLeftSidenavVisible = !appSessionService.isLeftSidenavVisible\">\n </ibm-hamburger>\n <ibm-header-global>\n <ng-content></ng-content>\n </ibm-header-global>\n</ibm-header>\n\n<ng-template #brandTemplate>\n <a class=\"bx--header__name\"\n [routerLink]=\"['/', 'home']\"> <span class=\"bx--header__name--prefix\">IBM</span> RXN for Chemistry</a>\n</ng-template>","import { Component, HostBinding, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\n\nimport { AppSessionService } from '@services';\n\n@Component({\n selector: 'ibm-mlrp-header[hasSidenav]',\n templateUrl: './header.component.html',\n styleUrls: ['./header.component.scss'],\n})\nexport class HeaderComponent implements OnInit, OnChanges {\n @HostBinding('class.bx--header') headerClass = true;\n @Input() hasSidenav;\n @Input() isModal;\n @Input() isUserMenuActive;\n\n constructor(public appSessionService: AppSessionService) {}\n\n ngOnInit(): void {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.hasSidenav && !this.isModal) {\n setTimeout(() => (this.appSessionService.isLeftSidenavActive = changes.hasSidenav.currentValue));\n }\n }\n}\n","<h5>{{title}}</h5>\n<div>\n <h6 class=\"mt-6\">Owner</h6>\n <div class=\"mt-4\"\n *ngIf=\"owner\">{{owner}}</div>\n</div>\n\n<div>\n <h6 class=\"mt-6\">Date of creation</h6>\n <div class=\"mt-4\">{{createdOn | date: 'dd/MM/yyyy'}}</div>\n</div>\n\n<div *ngIf=\"aiModel\">\n <h6 class=\"mt-6\">AI Model</h6>\n <div class=\"mt-4\">{{aiModel}}</div>\n</div>","import { Component, Input, OnInit } from '@angular/core';\n\n@Component({\n selector: 'ibm-information-details-menu',\n templateUrl: './information-details-menu.component.html',\n styleUrls: ['./information-details-menu.component.scss'],\n})\nexport class InformationDetailsMenuComponent implements OnInit {\n @Input() title: string;\n @Input() owner: string;\n @Input() createdOn: Date;\n @Input() aiModel: string;\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n ViewChild,\n AfterViewInit,\n OnDestroy,\n} from '@angular/core';\n\nimport { ApiService, KetcherDataService } from '@services';\nimport { IApiResponse, IApiActionData } from '@bitf/api';\n\n@Component({\n selector: 'ibm-ketcher',\n templateUrl: './ketcher.component.html',\n styleUrls: ['./ketcher.component.scss'],\n})\nexport class KetcherComponent implements AfterViewInit, OnDestroy {\n @Input()\n set smiles(smiles: string) {\n if (!smiles) {\n return;\n }\n this.setSmiles([smiles]);\n }\n\n get smiles() {\n if (!this.ketcher) {\n return '';\n }\n return this.ketcher.getSmiles();\n }\n\n @Input()\n width = '100%';\n @Input()\n height = '400px';\n @Input()\n enableAutoSave: boolean;\n @Output()\n autoSave: EventEmitter<IKetcherEvent> = new EventEmitter<IKetcherEvent>();\n @Output()\n change: EventEmitter<IKetcherEvent> = new EventEmitter<IKetcherEvent>();\n\n @ViewChild('ketcherIframe', { read: ElementRef, static: true })\n ketcherIframe: ElementRef;\n\n ketcher: any;\n autosaveIntervaHandler: any;\n autoSaveInterval = 5000;\n molToAdd: string;\n molToSet: string;\n\n ketcherInitialised = false;\n\n constructor(private apiService: ApiService, private ketcherDataService: KetcherDataService) {}\n\n ngAfterViewInit() {\n this.initKetcher();\n }\n\n private initKetcher() {\n setTimeout(() => {\n this.ketcher = this.ketcherIframe.nativeElement.contentWindow.ketcher;\n this.initAutosave();\n this.initOnChange();\n this.afterInitKetcher();\n this.ketcherInitialised = true;\n }, 1500);\n }\n\n private afterInitKetcher() {\n if (this.ketcherDataService.smiles && this.ketcherDataService.smiles.length) {\n this.setSmiles(this.ketcherDataService.smiles);\n this.ketcherDataService.clear();\n }\n\n if (this.molToSet) {\n this.ketcher.setMolecule(this.molToSet);\n }\n\n if (this.molToAdd) {\n this.ketcher.addFragment(this.molToAdd);\n }\n }\n\n private initAutosave() {\n if (this.enableAutoSave) {\n this.autosaveIntervaHandler = setInterval(() => {\n const event = {\n smiles: this.ketcher.getSmiles(),\n mol: this.ketcher.getMolfile(),\n } as IKetcherEvent;\n this.autoSave.emit(event);\n }, this.autoSaveInterval);\n }\n }\n\n private initOnChange() {\n this.ketcher?.editor?.on('change', () => {\n const event = {\n smiles: this.ketcher?.getSmiles(),\n mol: this.ketcher?.getMolfile(),\n } as IKetcherEvent;\n this.change.emit(event);\n });\n }\n\n setSmiles(smiles: string[]) {\n if (!smiles || !smiles.length) {\n return;\n }\n this.apiService.actions\n .convertSimlesToMols([smiles.join('.')])\n .subscribe((response: IApiResponse<IApiActionData>) => {\n if (this.ketcher) {\n if (response.content.data && response.content.data[0]) {\n this.ketcher.setMolecule(response.content.data[0]);\n }\n } else {\n if (response.content.data && response.content.data.length) {\n this.molToSet = response.content.data[0];\n }\n }\n // NOTE: error handled by API\n });\n }\n\n addSmiles(smiles: string[]) {\n if (!smiles || !smiles.length) {\n return;\n }\n this.apiService.actions\n .convertSimlesToMols([smiles.join('.')])\n .subscribe((response: IApiResponse<IApiActionData>) => {\n if (this.ketcher) {\n if (response.content.data && response.content.data[0]) {\n this.ketcher.addFragment(response.content.data[0]);\n }\n } else {\n this.molToAdd = response.content.data[0];\n }\n // NOTE: error handled by API\n });\n }\n\n get mol() {\n return this.ketcher.getMolfile();\n }\n\n ngOnDestroy(): void {\n if (this.autosaveIntervaHandler) {\n clearInterval(this.autosaveIntervaHandler);\n }\n this.ketcher = undefined;\n }\n}\n\nexport interface IKetcherEvent {\n smiles: string;\n mol: string;\n}\n","<iframe id=\"ketcher-frame\"\n #ketcherIframe\n src=\"assets/ketcher/ketcher.html\"\n scrolling=\"no\"\n [width]=\"width\"\n [height]=\"height\">","import { Component, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { Project } from '@models';\nimport { DialogsService } from '@services';\nimport { IDialogCloseEvent } from '@services/dialog/dialog.interface';\n\nimport { CreateProjectDialogComponent } from '@app/shared/components/create-project-dialog/create-project-dialog.component';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\n\n@Component({\n selector: 'ibm-new-project-button',\n templateUrl: './new-project-button.component.html',\n styleUrls: ['./new-project-button.component.scss'],\n})\nexport class NewProjectButtonComponent implements OnInit {\n constructor(private dialogsService: DialogsService, private router: Router) {}\n\n ngOnInit(): void {}\n\n onNewProject() {\n this.dialogsService.dialog\n .open(CreateProjectDialogComponent, {})\n .afterClosed()\n .subscribe((closeEvent: IDialogCloseEvent<Project>) => {\n if (closeEvent.status === EDialogCloseEventStatus.OK) {\n this.router.navigate(['projects', closeEvent.data.id, closeEvent.data.name, 'dashboard']);\n }\n });\n }\n}\n","<button class=\"bx--btn bx--btn--primary\"\n type=\"button\"\n (click)=\"onNewProject()\">\n Add new project<svg class=\"bx--btn__icon mr-0\"\n ibmIconAdd\n size=\"20\"></svg>\n</button>","<div class=\"text-center font-productive-heading-03 p-5\">\n <ng-container *ngIf=\"message; else defaultMessage\">\n {{ message }}\n </ng-container>\n <ng-template #defaultMessage>\n No items found.\n </ng-template>\n</div>","import { Component, OnInit, Input } from '@angular/core';\n\n@Component({\n selector: 'ibm-no-items-found',\n templateUrl: './no-items-found.component.html',\n styleUrls: ['./no-items-found.component.scss'],\n})\nexport class NoItemsFoundComponent implements OnInit {\n @Input() message: string;\n\n constructor() {}\n\n ngOnInit() {}\n}\n","<ibm-modal [open]=\"open\"\n [size]=\"dialogData.size || 'sm'\"\n [hasScrollingContent]=\"false\">\n <ibm-modal-header (closeSelect)=\"onCancel()\">\n <h4>{{ dialogData.title }}</h4>\n </ibm-modal-header>\n <section class=\"bx--modal-content\">\n <span *ngIf=\"dialogData.message\"\n class=\"message\"\n [innerHTML]=\"dialogData.message \">\n </span>\n\n <div *ngIf=\"dialogData?.useConfirmCheckbox\"\n class=\"mt-5\">\n <ibm-checkbox [(ngModel)]=\"confirmCheckbox\">\n {{dialogData.confirmCheckboxText}}\n </ibm-checkbox>\n </div>\n <div *ngIf=\"dialogData?.useConfirmDropdown\"\n class=\"mt-5\">\n <ibm-dropdown [(ngModel)]=\"confirmDropdown\"\n [label]=\"dialogData.confirmDropdownLabel\">\n <ibm-dropdown-list [items]=\"dialogData?.confirmDropdownOptions\"></ibm-dropdown-list>\n </ibm-dropdown>\n </div>\n\n </section>\n <ibm-modal-footer>\n <button *ngIf=\"dialogData.cancelText\"\n [ibmButton]=\"dialogData.cancelButtonType || 'secondary'\"\n (click)=\"onCancel()\">\n {{ dialogData.cancelText }}\n </button>\n <button *ngIf=\"dialogData.okText\"\n [ibmButton]=\"dialogData.okButtonType || 'primary'\"\n [disabled]=\"(dialogData?.useConfirmCheckbox && !confirmCheckbox) || (dialogData?.useConfirmDropdown && !confirmDropdown)\"\n (click)=\"onOk()\">\n {{ dialogData.okText }}\n </button>\n </ibm-modal-footer>\n</ibm-modal>","import { Component, Injector, OnInit } from '@angular/core';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IDialogCloseEvent, IOkCancelDialogData } from '@app/core/services/dialog/dialog.interface';\n\nimport { BaseModal } from 'carbon-components-angular';\n\n@Component({\n selector: 'ibm-ok-cancel-dialog',\n templateUrl: './ok-cancel-dialog.component.html',\n styleUrls: ['./ok-cancel-dialog.component.scss'],\n})\nexport class OkCancelDialogComponent extends BaseModal implements OnInit {\n dialogData: IOkCancelDialogData;\n okButtonType: string;\n confirmCheckbox = false;\n confirmDropdown: unknown;\n constructor(private injector: Injector) {\n super();\n this.dialogData = this.injector.get('dialogData');\n }\n\n ngOnInit() {}\n\n onOk() {\n this.close.emit({\n status: EDialogCloseEventStatus.OK,\n data: this.confirmDropdown,\n } as IDialogCloseEvent<unknown>);\n }\n\n onCancel() {\n this.close.emit({\n status: EDialogCloseEventStatus.CANCEL,\n } as IDialogCloseEvent<unknown>);\n }\n}\n","<ibm-modal [open]=\"open\"\n size=\"md\"\n [hasScrollingContent]=\"false\">\n <ibm-modal-header (closeSelect)=\"onClose()\">\n <h4>Add payment method</h4>\n </ibm-modal-header>\n <section class=\"bx--modal-content d-grid\"\n [ngClass]=\"{'mb-0 p-0': !isLoading && !hasError}\">\n <div class=\"d-flex justify-content-center overflow-hidden align-center\"\n *ngIf=\"isLoading\">\n <ibm-loading [isActive]=\"true\"\n size=\"md\"></ibm-loading>\n </div>\n <div *ngIf=\"hasError\">An error has occurred, please retry again</div>\n <div id=\"payment-section\"\n [hidden]=\"isLoading\"></div>\n </section>\n</ibm-modal>","import { Component, Injector, OnDestroy, OnInit } from '@angular/core';\nimport { SubscriptionCost, User, UserBillingInformation } from '@app/core/models';\nimport { nanoid } from 'nanoid';\nimport { finalize, map, switchMap, tap } from 'rxjs/operators';\nimport { BaseModal } from 'carbon-components-angular';\nimport PaymentService from '@mpcheckout/payment-iframe';\n\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { environment } from '@env/environment';\n\nimport { ToastMessagesService } from '@app/core/services/toast-messages/toast-messages.service';\n\nimport { PaymentsService } from '@app/core/services/api/payments.service';\nimport { UsersService } from '@app/core/services/api/users.service';\nimport { UserBillingInformationService } from '@app/core/services/api/user-billing-informations.service';\nimport { AuthService } from '@bitf/services/auth/auth.service';\nimport { of } from 'rxjs';\n\n@Component({\n selector: 'ibm-payment-method-dialog',\n templateUrl: './payment-method-dialog.component.html',\n styleUrls: ['./payment-method-dialog.component.scss'],\n})\nexport class PaymentMethodDialogComponent extends BaseModal implements OnInit, OnDestroy {\n dialogData: {\n subscriptionCost: SubscriptionCost;\n currencyCode: string;\n isRetry?: boolean;\n isWalletManagementSession: boolean;\n };\n paymentService: PaymentService;\n isLoading = false;\n hasError = false;\n userBillingInformationService: UserBillingInformationService;\n usersServices: UsersService;\n paymentsService: PaymentsService;\n authService: AuthService;\n toastMessagesService: ToastMessagesService;\n\n constructor(private injector: Injector) {\n super();\n this.dialogData = this.injector.get('dialogData');\n this.toastMessagesService = this.injector.get(ToastMessagesService);\n\n this.authService = this.injector.get(AuthService);\n this.usersServices = this.injector.get(UsersService);\n this.paymentsService = this.injector.get(PaymentsService);\n this.userBillingInformationService = this.injector.get(UserBillingInformationService);\n }\n\n ngOnInit(): void {\n this.isLoading = true;\n this.userBillingInformationService\n .get<UserBillingInformation>()\n .pipe(map(data => data.content?.[0]))\n .subscribe(data => {\n this.initPaymentService(data);\n });\n }\n\n private initPaymentService(userBillingInformation: UserBillingInformation) {\n const user = new User(this.authService.user);\n this.paymentService = new PaymentService('payment-section', 'payment-section', {\n startSession: {\n url: `${environment.apiUrl}payments/${this.dialogData.isRetry ? 'retry-payment' : 'start-session'}`,\n requestHeader: {\n Authorization: `Bearer ${this.authService.authToken}`,\n },\n payload: {\n cssUrl: `${environment.hostUrl}/assets/payment-service/style.css`,\n language: 'en',\n countryCode: userBillingInformation.countryCode2,\n currencyCode: this.dialogData.currencyCode,\n orderId: nanoid(20),\n customer: {\n type: 'Private',\n firstName: userBillingInformation.firstName,\n lastName: userBillingInformation.lastName,\n addressLine1: userBillingInformation.addressLine1,\n addressLine2: userBillingInformation.addressLine2,\n city: userBillingInformation.locality,\n countryCode: userBillingInformation.countryCode2,\n postalCode: userBillingInformation.postalCode,\n stateCode: userBillingInformation.province,\n phone: userBillingInformation.phone,\n email: userBillingInformation.email,\n },\n orderAmounts: {\n amount: this.dialogData.subscriptionCost?.plan.price,\n tax: this.dialogData.subscriptionCost?.tax.price,\n total: this.dialogData.subscriptionCost?.total.price,\n },\n isRecurringPayment: true,\n walletid: {\n id: `rxn-${this.authService.user.id}`,\n type: 'id',\n },\n autoSubmit: this.dialogData.isRetry,\n isWalletManagementSession: this.dialogData.isWalletManagementSession ?? false,\n },\n },\n create: {\n autoSubmit: true,\n },\n fail: {\n callback: error => {\n this.isLoading = false;\n this.hasError = true;\n this.toastMessagesService.show({\n title: 'Payment Method',\n message: 'Error on payment method',\n type: EToastMessageType.ERROR,\n });\n },\n },\n cancel: {\n callback: () => {\n this.isLoading = true;\n this.onClose();\n },\n },\n complete: {\n callback: result => {\n console.log('result', result);\n of(null)\n .pipe(\n tap(() => (this.isLoading = true)),\n switchMap(() => {\n if (user.walletId) {\n return this.paymentsService.put({\n path: 'update',\n isBodyRaw: true,\n body: {\n cardBrand: result.paymentDetails.instrument.cardBrand,\n authorizationReferenceNumber: result.paymentDetails.authorizationReferenceNumber,\n authorizationReferenceNumberExtended:\n result.paymentDetails.authorizationReferenceNumberExtended,\n },\n });\n } else {\n return of(null);\n }\n }),\n switchMap(() => {\n if (this.dialogData.isRetry) {\n return this.paymentsService.post({\n path: 'completed',\n isBodyRaw: true,\n body: {\n authorizationReferenceNumber: result?.paymentDetails.authorizationReferenceNumber,\n },\n });\n } else {\n return of(null);\n }\n }),\n switchMap(() =>\n this.usersServices.patch<User>({\n body: {\n id: user.id,\n walletId: result.walletid,\n },\n isBodyRaw: true,\n })\n ),\n finalize(() => (this.isLoading = false))\n )\n .subscribe(() =>\n this.close.emit({\n status: EDialogCloseEventStatus.OK,\n data: {\n cardBrand: result.paymentDetails.instrument.cardBrand,\n authorizationReferenceNumber: result.paymentDetails.authorizationReferenceNumber,\n authorizationReferenceNumberExtended:\n result.paymentDetails.authorizationReferenceNumberExtended,\n },\n } as IDialogCloseEvent<any>)\n );\n },\n },\n change: {\n callback: () => {\n this.isLoading = false;\n },\n },\n timeout: {\n callback: () => {\n this.isLoading = false;\n this.toastMessagesService.show({\n title: 'Payment Method',\n message: 'Timeout on payment method',\n type: EToastMessageType.ERROR,\n });\n },\n },\n autoResize: false,\n });\n this.isLoading = true;\n this.paymentService.init();\n }\n\n onClose() {\n this.close.emit({\n status: EDialogCloseEventStatus.CLOSE,\n } as IDialogCloseEvent<void>);\n }\n\n ngOnDestroy(): void {\n if (this.paymentService) {\n this.paymentService.destroy();\n }\n }\n}\n","<div class=\"plan-container\"\n [ngClass]=\"{'plan-container--current-plan': isCurrentPlan, 'border-light': showBorder}\">\n <div *ngIf=\"showHeader\"\n class=\"mb-7\">\n <h3 class=\"mb-3\"\n [title]=\"plan.name\">{{plan.name}}</h3>\n <p [title]=\"plan.levels[levelIndex]?.description\"\n [innerHTML]=\"plan.levels[levelIndex]?.description\"></p>\n </div>\n <div *ngIf=\"plan.levels[levelIndex]?.limits?.overageTrainingCostRates?.length\">\n <p class=\"small--xs text-01 mb-1\">Cost based on monthly compute usage:</p>\n <div class=\"d-flex align-items-center\"\n *ngFor=\"let item of plan.levels[levelIndex]?.limits?.overageTrainingCostRates\">\n <p class=\"mr-5 small--sm flex-basis-33\">{{item.hours}}</p>\n <strong>{{item.cost}}</strong>\n </div>\n </div>\n\n <button *ngIf=\"buttonAction === 'upgrade'\"\n ibmButton=\"primary\"\n class=\"mt-7\"\n [disabled]=\"isDisabled\"\n (click)=\"onChangePlan()\">\n {{ upgradeButtonText }}\n <ibm-icon-arrow-right size=\"16\"\n class=\"bx--btn__icon\"></ibm-icon-arrow-right></button>\n</div>","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { IPlanLevel, Plan } from '@app/core/models';\nimport { DialogsService } from '@app/core/services';\nimport { TrainingCostDetailDialogComponent } from '../training-cost-detail-dialog/training-cost-detail-dialog.component';\nimport { TrainingHoursHelpDialogComponent } from '../training-hours-help-dialog/training-hours-help-dialog.component';\n\n@Component({\n selector: 'ibm-plan',\n templateUrl: './plan.component.html',\n styleUrls: ['./plan.component.scss'],\n})\nexport class PlanComponent implements OnInit {\n @Input() plan: Plan;\n @Input() levelIndex: number;\n @Input() isCurrentPlan: boolean;\n @Input() buttonAction: 'upgrade';\n @Input() showHeader = true;\n @Input() showButtonAction = true;\n @Input() showHeaderFeatures = true;\n @Input() showBorder = false;\n @Input() isDisabled = true;\n @Input() upgradeButtonText = 'Pay by credit card';\n @Output() changePlan = new EventEmitter<string>();\n\n constructor(private dialogsService: DialogsService) {}\n\n ngOnInit(): void {}\n\n onOpenTrainingCostDetails(level: IPlanLevel) {\n this.dialogsService.dialog\n .open(TrainingCostDetailDialogComponent, {\n data: level?.limits?.overageTrainingCostRates,\n })\n .afterClosed()\n .subscribe();\n }\n\n onOpenTrainingHoursHelp() {\n this.dialogsService.dialog\n .open(TrainingHoursHelpDialogComponent, {})\n .afterClosed()\n .subscribe();\n }\n\n onChangePlan() {\n this.changePlan.emit(this.plan.planType);\n }\n}\n","<div class=\"d-flex align-items-center\">\n <ng-container *ngFor=\"let precursorMolecule of precursorMolecules; let lastImg = last;\">\n <img [src]=\"precursorMolecule.moleculeImageSvg?.base64Url\"\n [ngStyle]=\"{\n width: precursorMolecule.moleculeImageSvg.width * size + precursorMolecule.moleculeImageSvg?.unit,\n height: precursorMolecule.moleculeImageSvg.height * size + precursorMolecule.moleculeImageSvg?.unit\n }\" />\n <div class=\"mx-3\">\n <svg icon\n ibmIconAdd\n size=\"20\"\n *ngIf=\"!lastImg\"></svg>\n <svg icon\n ibmIconArrowRight\n size=\"20\"\n *ngIf=\"lastImg\"></svg>\n </div>\n </ng-container>\n <img [src]=\"productMolecule?.moleculeImageSvg?.base64Url\"\n [ngStyle]=\"{\n width: productMolecule?.moleculeImageSvg.width * size + productMolecule?.moleculeImageSvg?.unit,\n height: productMolecule?.moleculeImageSvg.height * size + productMolecule?.moleculeImageSvg?.unit\n }\" />\n <ng-container *ngFor=\"let outcomeMolecule of outcomeMolecules; let lastImg = last; let firstImg = first;\">\n <div class=\"mx-3\">\n <svg icon\n ibmIconArrowRight\n size=\"20\"\n *ngIf=\"firstImg\"></svg>\n </div>\n <img [src]=\"outcomeMolecule.moleculeImageSvg?.base64Url\"\n [ngStyle]=\"{\n width: outcomeMolecule.moleculeImageSvg.width * size + outcomeMolecule.moleculeImageSvg?.unit,\n height: outcomeMolecule.moleculeImageSvg.height * size + outcomeMolecule.moleculeImageSvg?.unit\n }\" />\n <div class=\"mx-3\">\n <svg icon\n ibmIconAdd\n size=\"20\"\n *ngIf=\"!lastImg\"></svg>\n </div>\n </ng-container>\n</div>","import { Component, Input } from '@angular/core';\nimport { Molecule } from '@app/core/models';\n\n@Component({\n selector: 'ibm-reaction-image',\n templateUrl: './reaction-image.component.html',\n styleUrls: ['./reaction-image.component.scss'],\n})\nexport class ReactionImageComponent {\n @Input() productMolecule: Molecule; // this represent the result or the source of a reaction\n @Input() outcomeMolecules?: Molecule[]; // use this input when you are showing a retrosynthesis image\n @Input() precursorMolecules?: Molecule[]; // use this input when you are showing a reaction image\n @Input() size = 1; // svg image size multiplier\n\n constructor() {}\n}\n","import { Component, OnInit } from '@angular/core';\nimport { ActionsService } from '@app/core/services';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\nimport { BaseModal } from 'carbon-components-angular';\n\n@Component({\n selector: 'ibm-release-notes-dialog',\n templateUrl: './release-notes-dialog.component.html',\n styleUrls: ['./release-notes-dialog.component.scss'],\n})\nexport class ReleaseNotesDialogComponent extends BaseModal implements OnInit {\n static version = 1;\n\n constructor(public actionsService: ActionsService) {\n super();\n }\n\n ngOnInit(): void {}\n\n onClose() {\n this.close.emit({\n status: EDialogCloseEventStatus.OK,\n } as IDialogCloseEvent<void>);\n }\n}\n","<ibm-modal [open]=\"open\">\n <ibm-modal-header (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>Site upgrades:</h3>\n </ibm-modal-header>\n <div ibmModalContent\n class=\"mx-5\">\n <ul ibmList>\n <li ibmListItem><strong>UI enhancements</strong> for a more intuitive user experience</li>\n <li ibmListItem><strong>Enhanced parallelization</strong> for faster results</li>\n <li ibmListItem><strong>Unlimited API access</strong> with subscription</li>\n <li ibmListItem><strong>Multiple payment options</strong> to suit your needs:\n <ul ibmList>\n <li ibmListItem><strong>Pay as you go</strong> to buy only what you need, or get a</li>\n <li ibmListItem><strong>Teams subscription</strong> for higher usage</li>\n </ul>\n </li>\n </ul>\n </div>\n <ibm-modal-footer>\n <button class=\"bx--btn bx--btn--primary\"\n data-e2e=\"closeReleaseNotesBtn\"\n (click)=\"onClose()\">Ok</button>\n </ibm-modal-footer>\n</ibm-modal>","<ibm-modal [open]=\"open\">\n <ibm-modal-header (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>{{dialogData.title}}</h3>\n </ibm-modal-header>\n <div ibmModalContent\n class=\"ibm-rename-dialog\">\n\n <div class=\"mb-6\"\n *ngIf=\"dialogData.message\">\n {{dialogData.message}}\n </div>\n\n <form (ngSubmit)=\"onRename()\"\n [formGroup]=\"form\">\n <section>\n <div class=\"mb-5\">\n <label for=\"name\"\n class=\"bx--label\">{{dialogData.label || \"Name\"}}</label>\n <input *ibmValidationMessage=\"form.get('name')\"\n formControlName=\"name\"\n type=\"text\"\n id=\"name\"\n class=\"bx--text-input\"\n placeholder=\"{{dialogData.placeholder || 'Insert the name' }}\"\n autocomplete=\"off\" />\n </div>\n </section>\n </form>\n </div>\n <ibm-modal-footer>\n <button class=\"bx--btn bx--btn--secondary\"\n (click)=\"closeModal()\">Close</button>\n <button class=\"bx--btn bx--btn--primary\"\n modal-primary-focus\n [disabled]=\"!form.valid\"\n type=\"button\"\n (click)=\"onRename()\">\n Rename\n </button>\n </ibm-modal-footer>\n</ibm-modal>","import { Component, Inject, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { BaseModal } from 'carbon-components-angular';\n\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\n\n@Component({\n selector: 'ibm-rename-dialog',\n templateUrl: './rename-dialog.component.html',\n styleUrls: ['./rename-dialog.component.scss'],\n})\nexport class RenameDialogComponent extends BaseModal implements OnInit {\n form: UntypedFormGroup;\n\n constructor(\n private formBuilder: UntypedFormBuilder,\n @Inject('dialogData')\n public dialogData: { name: string; title: string; message: string; label: string; placeholder: string }\n ) {\n super();\n }\n\n ngOnInit() {\n this.createForm();\n }\n\n createForm() {\n this.form = this.formBuilder.group({\n name: [this.dialogData.name, Validators.required],\n });\n }\n\n onRename() {\n this.close.emit({\n status: EDialogCloseEventStatus.OK,\n data: this.form.value.name,\n } as IDialogCloseEvent<string>);\n }\n\n closeModal() {\n this.close.emit({\n status: EDialogCloseEventStatus.CANCEL,\n } as IDialogCloseEvent<void>);\n }\n}\n","<div class=\"retrosynthesis-queue-state-container d-flex align-items-center p-5 mb-5\"\n *ngIf=\"queueState && queueState.itemsInQueue\">\n <ibm-loading class=\"mr-5\"></ibm-loading>\n <div *ngIf=\"!queueState.willBeCompletedOn\">\n All your retrosynthetic tasks are currently running.\n </div>\n <div *ngIf=\"queueState.willBeCompletedOn\">\n You have {{ queueState.itemsInQueue }} retrosynthesis requests in the queue. The last\n one is expected to be completed on {{ queueState.willBeCompletedOn | date: 'short' }}.\n </div>\n <a class=\"ml-5\"\n [routerLink]=\"['..','retrosynthesis']\"\n *ngIf=\"showListLink\">View</a>\n</div>","import { Component, Input, OnDestroy, OnInit } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { QueueState } from '@app/core/models';\nimport { RetrosynthesisService } from '@app/core/services';\n\n@Component({\n selector: 'ibm-retrosynthesis-queue-state',\n templateUrl: './retrosynthesis-queue-state.component.html',\n styleUrls: ['./retrosynthesis-queue-state.component.scss'],\n})\nexport class RetrosynthesisQueueStateComponent implements OnInit, OnDestroy {\n @Input() showListLink = false;\n queueState: QueueState;\n private subscription = new Subscription();\n\n constructor(private retrosynthesisService: RetrosynthesisService) {}\n\n ngOnInit(): void {\n this.subscription.add(\n this.retrosynthesisService.pollQueueState().subscribe(response => {\n this.queueState = response.content;\n })\n );\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n}\n","export enum ESearchType {\n ALPHABETICAL = 'alphabetical',\n SMILES = 'smiles',\n}\n","<div class=\"align align-right w-100 h-100 imb-search-bar\">\n <div class=\"imb-search-bar__dropdown-container\"\n *ngIf=\"showSmilesOption\">\n <ibm-dropdown (selected)=\"onSearchTypeSelected()\"\n [appendInline]=\"false\"\n itemValueKey=\"id\"\n [(ngModel)]=\"searchType\">\n <ibm-dropdown-list [items]=\"searchTypes\"></ibm-dropdown-list>\n </ibm-dropdown>\n </div>\n <ibm-search autocomplete=\"off\"\n [placeholder]=\"searchType === eSearchType.SMILES ? 'Search by smiles' : placeholder\"\n [value]=\"searchString\"\n (valueChange)=\"onSearch($event)\"\n (clear)=\"onSearch($event)\">\n </ibm-search>\n\n <div class=\"imb-search-bar__draw-search px-5\"\n *ngIf=\"showKetcherButton\"\n (click)=\"onOpenKetcherFilter()\">\n Draw and search <svg class=\"bx--btn__icon\"\n ibmIconEdit\n size=\"16\"></svg>\n </div>\n</div>","import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\nimport { Subject, Subscription } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\n\nimport { IIbmSearchData } from './search-bar.interface';\nimport { DialogsService } from '@app/core/services';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { ESearchType } from './search-bar.enum';\nimport { SmilesEditorDialogComponent } from '@app/modules/smiles-editor/smiles-editor-dialog/smiles-editor-dialog.component';\n\n@Component({\n selector: 'ibm-search-bar',\n templateUrl: './search-bar.component.html',\n styleUrls: ['./search-bar.component.scss'],\n})\nexport class SearchBarComponent implements OnInit, OnDestroy {\n @Input()\n set searchData(value: IIbmSearchData) {\n this.searchString = value.searchString;\n this.searchType = value.isSmiles ? ESearchType.SMILES : ESearchType.ALPHABETICAL;\n }\n\n @Input()\n showSmilesOption = false;\n @Input()\n showKetcherButton = false;\n @Input()\n placeholder = '';\n @Output()\n searchChange: EventEmitter<IIbmSearchData> = new EventEmitter<IIbmSearchData>();\n\n private searchSub$ = new Subject<void>();\n searchString = '';\n searchType: ESearchType = ESearchType.ALPHABETICAL;\n eSearchType = ESearchType;\n subscription: Subscription = new Subscription();\n searchTypes = [\n {\n content: 'Alphabetical',\n id: ESearchType.ALPHABETICAL,\n },\n {\n content: 'Smiles',\n id: ESearchType.SMILES,\n },\n ];\n\n constructor(private dialogsService: DialogsService) {}\n\n ngOnInit() {\n this.subscription.add(\n this.searchSub$.pipe(debounceTime(500)).subscribe(_ => {\n this.searchChange.emit({\n searchString: this.searchString,\n isSmiles: this.searchType === ESearchType.SMILES,\n });\n })\n );\n }\n\n onOpenKetcherFilter() {\n this.dialogsService.dialog\n .open(SmilesEditorDialogComponent, {\n smiles: this.searchType === ESearchType.SMILES || !this.showSmilesOption ? this.searchString : null,\n actionLabel: 'Search',\n })\n .afterClosed()\n .subscribe((closeEvent: IDialogCloseEvent<any>) => {\n if (closeEvent.status === EDialogCloseEventStatus.OK) {\n this.searchType = ESearchType.SMILES;\n this.searchString = closeEvent.data;\n this.searchChange.emit({\n searchString: closeEvent.data,\n isSmiles: true,\n });\n }\n });\n }\n\n onSearch(searchString) {\n this.searchString = searchString || '';\n if (!searchString) {\n this.searchType = ESearchType.ALPHABETICAL;\n }\n this.searchSub$.next();\n }\n\n onSearchTypeSelected() {\n if (this.searchString !== '') {\n this.searchSub$.next();\n }\n }\n\n ngOnDestroy(): void {\n this.subscription.unsubscribe();\n }\n}\n","<ibm-search [theme]=\"theme\"\n [ngClass]=\"{'loader-active': isLoading}\"\n [label]=\"placeholder\"\n [placeholder]=\"placeholder\"\n [value]=\"searchString\"\n [autocomplete]=\"'off'\"\n (valueChange)=\"onSearch($event)\"\n (clear)=\"onClear()\">\n</ibm-search>\n<ibm-dropdown theme=\"dark\"\n [dropUp]=\"true\"\n #addressesDropDown>\n <ibm-dropdown-list [items]=\"options\"\n (select)=\"onSelect($event)\"></ibm-dropdown-list>\n</ibm-dropdown>\n\n<ibm-loading *ngIf=\"isLoading\"\n [isActive]=\"true\"\n size=\"sm\"></ibm-loading>","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';\nimport { IAddressFormatWithCountry, IAddressLookupResponse, User } from '@app/core/models';\nimport { ApiService } from '@app/core/services';\nimport { IApiResponse } from '@app/libs/bitforce/api';\nimport { Dropdown, ListItem } from 'carbon-components-angular';\nimport { Subject } from 'rxjs';\nimport { map, finalize, debounceTime, distinctUntilChanged, filter, switchMap, tap } from 'rxjs/operators';\n\ntype AddressListItem = ListItem & { format: string };\n\n@Component({\n selector: 'ibm-search-billing-address',\n templateUrl: './search-billing-address.component.html',\n styleUrls: ['./search-billing-address.component.scss'],\n})\nexport class SearchBillingAddressComponent implements OnInit {\n @ViewChild('addressesDropDown', { static: true }) addressesDropDown: Dropdown;\n\n @Input() theme = 'light';\n options: Array<AddressListItem> = [];\n searchString = '';\n isLoading = false;\n placeholder: string;\n private search$ = new Subject<string>();\n @Output() valueChange = new EventEmitter<IAddressFormatWithCountry>();\n\n constructor(private apiService: ApiService) {}\n ngOnInit(): void {\n const user = new User(this.apiService.auth.user);\n this.placeholder = `Address - ${user.country.countryName}`;\n this.search$\n .pipe(\n filter(x => !!x),\n debounceTime(500),\n tap(() => (this.isLoading = true)),\n switchMap(x => this.apiService.addresses.validate(x).pipe(finalize(() => (this.isLoading = false)))),\n map((response: IApiResponse<IAddressLookupResponse>) =>\n response.content.results.map(\n x =>\n ({\n content: x.suggestion,\n format: x.format,\n } as AddressListItem)\n )\n )\n )\n .subscribe(options => {\n this.options = options;\n setTimeout(() => this.addressesDropDown.openMenu());\n });\n }\n\n onSelect(event: { item: AddressListItem; isUpdate?: boolean }) {\n if (event.item?.format) {\n this.valueChange.emit(null);\n this.isLoading = true;\n this.apiService.addresses\n .format(event.item.format)\n .pipe(map(y => y.content))\n .subscribe(x => {\n const user = new User(this.apiService.auth.user);\n this.valueChange.emit({ ...x, ...user.country });\n this.searchString = event.item.content;\n this.options = [];\n this.isLoading = false;\n });\n }\n }\n\n onSearch(search: string) {\n this.search$.next(search);\n }\n\n onClear() {\n this.options = [];\n this.valueChange.emit(null);\n }\n}\n","<div class=\"d-flex flex-column ibm-search-users\">\n <div class=\"d-flex\">\n <div class=\"w-100\">\n <form [formGroup]=\"searchCollaboratorsForm\">\n <input formControlName=\"searchTextControl\"\n type=\"email\"\n id=\"collaboratorSearch\"\n class=\"bx--text-input\"\n placeholder=\"Insert the email\"\n (keyup.enter)=\"addCollaboratorByEmail()\"\n autocomplete=\"off\" />\n </form>\n <div (ibmClickOutside)=\"onClickedOutside()\">\n <ul class=\"ibm-search-users__search\"\n *ngIf=\"showUsersList && collaborators.length\">\n <li (click)=\"addCollaborator(collaborator.user)\"\n class=\"ibm-search-users__search-results\"\n *ngFor=\"let collaborator of collaborators\">\n <span>\n {{ selectedCollaborator.user.fullName }}\n {{ collaborator.user.email }}\n </span>\n </li>\n </ul>\n </div>\n </div>\n <button [ibmButton]=\"'primary'\"\n class=\"bx--btn--field\"\n [iconOnly]=\"true\"\n [disabled]=\"!searchCollaboratorsForm.valid\"\n (click)=\"addCollaboratorByEmail()\">\n <svg ibmIconSend\n size=\"16\"\n class=\"fill-white\"></svg>\n </button>\n </div>\n <div class=\"d-flex flex-wrap\">\n <div class=\"ibm-search-users__usersSelected\"\n *ngFor=\"let selectedCollaborator of selectedCollaborators; let i = index\">\n <span class=\"bx--tag bx--tag--gray\">\n <ng-container *ngIf=\"selectedCollaborator.id\">\n {{ selectedCollaborator.user.fullName }}\n </ng-container>\n <ng-container *ngIf=\"!selectedCollaborator.id\">\n {{ selectedCollaborator }}\n </ng-container>\n <a class=\"ibm-search-users__close align-right\"\n (click)=\"deleteCollaborator(i)\">\n <svg width=\"10\"\n height=\"10\"\n viewBox=\"0 0 10 10\"\n fill-rule=\"evenodd\">\n <path d=\"M9.8 8.6L8.4 10 5 6.4 1.4 10 0 8.6 3.6 5 .1 1.4 1.5 0 5 3.6 8.6 0 10 1.4 6.4 5z\">\n </path>\n </svg>\n </a>\n </span>\n </div>\n </div>\n</div>","import { Component, OnInit, Output, EventEmitter } from '@angular/core';\nimport { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\nimport { IApiResponse, IApiRequest } from '@bitf/api';\nimport { ApiService, ToastMessagesService } from '@services';\nimport { User, Collaborator } from '@models';\nimport { getMongoQuery } from '@bitf/utils';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\n\n@Component({\n selector: 'ibm-search-collaborators',\n templateUrl: './search-collaborators.component.html',\n styleUrls: ['./search-collaborators.component.scss'],\n})\nexport class SearchCollaboratorsComponent implements OnInit {\n @Output()\n collaboratorsSelectionChange: EventEmitter<string[]> = new EventEmitter<string[]>();\n\n searchCollaboratorsForm: UntypedFormGroup;\n\n collaborators: Collaborator[] = [];\n selectedCollaborators: (any | Collaborator)[] = [];\n showUsersList: boolean;\n subscriptions: Subscription = new Subscription();\n searchText = '';\n delay = 500;\n minLength = 3;\n\n constructor(\n private apiService: ApiService,\n private fb: UntypedFormBuilder,\n private toastMessagesService: ToastMessagesService\n ) {}\n\n ngOnInit() {\n this.initForm();\n }\n\n initForm() {\n this.searchCollaboratorsForm = this.fb.group({\n searchTextControl: [null, [Validators.email, Validators.required]],\n });\n\n // Temporarily disabled, waiting for BE fix\n // const searchTextControl = this.searchCollaboratorsForm.get('searchTextControl');\n // const sub = searchTextControl.valueChanges\n // .pipe(debounceTime(this.delay), distinctUntilChanged())\n // .subscribe(value => {\n // if (!value.length) {\n // this.showUsersList = false;\n // this.collaborators = [];\n // return;\n // }\n // const request = {\n // query: getMongoQuery(null, value, ['fullName', 'email']),\n // id: this.apiService.auth.user.id,\n // relation: 'collaborators',\n // } as IApiRequest;\n\n // this.apiService.users\n // .getRels<Collaborator>(request)\n // .subscribe((response: IApiResponse<Collaborator[]>) => {\n // this.collaborators = response.content.length ? response.content : [];\n // this.removeSelectedCollaboratorsFromList();\n // this.showUsersList = true;\n // });\n // });\n // this.subscriptions.add(sub);\n }\n\n addCollaborator(user: User) {\n if (user) {\n this.selectedCollaborators.push(user.email);\n this.removeSelectedCollaboratorsFromList();\n }\n this.selectionChanged();\n this.resetInput();\n }\n\n addCollaboratorByEmail() {\n const searchText = this.searchCollaboratorsForm.value.searchTextControl;\n const emailPattern = /^[a-zA-Z0-9._\\-\\+]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$/;\n const regexEmail = new RegExp(emailPattern);\n if (searchText && regexEmail.test(searchText)) {\n this.selectedCollaborators.push(searchText);\n this.showUsersList = false;\n this.selectionChanged();\n this.resetInput();\n } else {\n this.toastMessagesService.show({\n title: 'Error',\n message: 'Incorrect email',\n type: EToastMessageType.ERROR,\n });\n }\n }\n\n deleteCollaborator(index: number) {\n this.selectedCollaborators.splice(index, 1);\n this.selectionChanged();\n }\n\n onClickedOutside() {\n this.showUsersList = false;\n }\n\n selectionChanged() {\n const collaboratorsEmails = this.selectedCollaborators.map((collaborator: Collaborator | any) => {\n if (collaborator instanceof Collaborator) {\n return collaborator.user.email;\n }\n return collaborator;\n });\n\n this.collaboratorsSelectionChange.emit(collaboratorsEmails);\n }\n\n clearSelectedCollaboratorsList() {\n this.resetInput();\n this.selectedCollaborators = [];\n }\n\n resetInput() {\n this.searchCollaboratorsForm.setValue({ searchTextControl: '' });\n }\n\n private removeSelectedCollaboratorsFromList(): void {\n this.collaborators = this.collaborators.filter(\n collaborator =>\n !this.selectedCollaborators.find(collaboratorEmail => collaboratorEmail === collaborator.user.email)\n );\n }\n}\n","<ibm-modal [open]=\"open\"\n [hasScrollingContent]=\"false\">\n <ibm-modal-header [showCloseButton]=\"false\">\n <h3 ibmModalHeaderHeading>Select country</h3>\n </ibm-modal-header>\n <div ibmModalContent>\n <ng-container [formGroup]=\"countryForm\">\n <ibm-label> Choose between available countries</ibm-label>\n <ibm-combo-box *ngIf=\"!isLoading\"\n [theme]=\"'light'\"\n [appendInline]=\"false\"\n [invalid]=\"countryForm.get('country').touched && !countryForm.get('country').valid\"\n invalidText=\"Country is required\"\n formControlName=\"country\"\n [items]=\"countries\"\n [autocomplete]=\"false\"\n itemValueKey=\"code\"\n [dropUp]=\"false\">\n <ibm-dropdown-list></ibm-dropdown-list>\n </ibm-combo-box>\n <ibm-dropdown *ngIf=\"isLoading\"\n [skeleton]=\"true\"></ibm-dropdown>\n </ng-container>\n </div>\n <ibm-modal-footer>\n <button ibmButton=\"primary\"\n [disabled]=\"!countryForm.valid\"\n (click)=\"onSaveCountry()\">\n Save\n </button>\n </ibm-modal-footer>\n</ibm-modal>","import { Component, OnInit } from '@angular/core';\nimport { ListItem } from 'carbon-components-angular';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { finalize } from 'rxjs/operators';\nimport { ICountryMappingDetails, countryMappings } from '@mpcheckout/checkout-cbr-library';\n\nimport { Country, User } from '@app/core/models';\nimport { ApiService, ToastMessagesService } from '@app/core/services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { LoaderService } from '@app/libs/bitforce/components';\nimport { SuperModalComponent } from '@app/core/components/super-modal/super-modal.component';\n\n@Component({\n selector: 'ibm-select-country-dialog',\n templateUrl: './select-country-dialog.component.html',\n styleUrls: ['./select-country-dialog.component.scss'],\n})\nexport class SelectCountryDialogComponent extends SuperModalComponent implements OnInit {\n public countries: ListItem[] = [];\n public countryForm: FormGroup;\n public isLoading = false;\n disabledHandleKeyboardEvent = true;\n constructor(\n private apiService: ApiService,\n private formBuilder: FormBuilder,\n private toastMessagesService: ToastMessagesService,\n private loaderService: LoaderService\n ) {\n super();\n }\n\n ngOnInit(): void {\n this.countries = countryMappings\n .map(country => ({\n content: country.countryName,\n code: country.countryCode2,\n country,\n selected: false,\n }))\n .sort((country1, country2) => country1.content.localeCompare(country2.content));\n\n this.countryForm = this.formBuilder.group({\n country: [null, Validators.required],\n });\n }\n\n onSaveCountry() {\n const selectedCountry = this.countries.find(\n country => country.code === this.countryForm.get('country').value\n ).country as ICountryMappingDetails;\n\n this.loaderService.show();\n this.apiService.users\n .patch<User>({\n body: {\n id: this.apiService.auth.user.id,\n country: new Country({\n countryCode2: selectedCountry.countryCode2,\n countryCode3: selectedCountry.countryCode3,\n countryName: selectedCountry.countryName,\n }),\n },\n isBodyRaw: true,\n })\n .pipe(finalize(() => this.loaderService.hide()))\n .subscribe(response => {\n this.apiService.auth.user = response.content;\n this.closeModal();\n this.toastMessagesService.show({\n type: EToastMessageType.SUCCESS,\n title: 'Country saved',\n message: 'Your country has been saved.',\n });\n });\n }\n}\n","import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { requiredIf } from '@app/shared/form-utilities/validators/required-if.validator';\nimport { Project } from '@app/core/models';\nimport { ListItem } from 'carbon-components-angular';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'ibm-select-or-create-project',\n templateUrl: './select-or-create-project.component.html',\n styleUrls: ['./select-or-create-project.component.scss'],\n})\nexport class SelectOrCreateProjectComponent implements OnInit, OnChanges, OnDestroy {\n @Input()\n toAddLabel: string;\n @Input()\n projects: ListItem[];\n @Input()\n selectedProject: Project;\n @Input()\n form: UntypedFormGroup;\n\n projectForm: UntypedFormGroup;\n EProjectSelectionMode = EProjectSelectionMode;\n\n private subscription = new Subscription();\n\n constructor(private fb: UntypedFormBuilder) {}\n\n ngOnInit(): void {\n this.projectForm = this.fb.group({\n projectRadio: ['existing', Validators.required],\n projectName: [\n null,\n requiredIf(() => this.projectForm?.get('projectRadio'), EProjectSelectionMode.NEW_PROJECT),\n ],\n selectedProject: [\n null,\n requiredIf(() => this.projectForm?.get('projectRadio'), EProjectSelectionMode.EXISTING_PROJECT),\n ],\n });\n\n this.subscription.add(\n this.projectForm.get('projectRadio').valueChanges.subscribe(() => {\n this.projectForm.get('projectName').updateValueAndValidity();\n this.projectForm.get('selectedProject').updateValueAndValidity();\n })\n );\n\n this.form.addControl('projectGroup', this.projectForm);\n }\n\n ngOnChanges() {\n if (this.selectedProject && this.projects) {\n const selectedItem = this.projects.find(item => item.project.id === this.selectedProject.id);\n this.projects = [\n ...this.projects.map(item => {\n item.selected = item.project.id === this.selectedProject.id;\n return item;\n }),\n ];\n this.projectForm.patchValue({ selectedProject: selectedItem });\n }\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n}\n\nexport enum EProjectSelectionMode {\n EXISTING_PROJECT = 'existing',\n NEW_PROJECT = 'new',\n}\n","<ng-container [formGroup]=\"projectForm\">\n <div class=\"mb-4\">\n <legend class=\"bx--label mb-6\">\n Add {{toAddLabel}} to a pre-existing project or create a brand new one\n </legend>\n <ibm-radio-group aria-label=\"radiogroup\"\n formControlName=\"projectRadio\">\n <ibm-radio value=\"radio\"\n [checked]=\"true\"\n [value]=\"EProjectSelectionMode.EXISTING_PROJECT\">\n Add to pre-existing project\n </ibm-radio>\n <ibm-radio [value]=\"EProjectSelectionMode.NEW_PROJECT\">\n Add to a brand new project\n </ibm-radio>\n </ibm-radio-group>\n </div>\n <div *ngIf=\"projectForm.value.projectRadio === EProjectSelectionMode.NEW_PROJECT\">\n <ibm-label [invalid]=\"!projectForm.get('projectName').pristine && !projectForm.get('projectName').valid\"\n [invalidText]=\"'Project name is required'\">\n Give a name to your new project\n <input ibmText\n formControlName=\"projectName\"\n id=\"projectName\"\n placeholder=\"Project name\"\n autocomplete=\"off\" />\n </ibm-label>\n </div>\n <div *ngIf=\"projectForm.value.projectRadio === EProjectSelectionMode.EXISTING_PROJECT\">\n <ibm-label> Choose between your projects</ibm-label>\n <ibm-combo-box *ngIf=\"projects\"\n [theme]=\"'light'\"\n [appendInline]=\"false\"\n [invalid]=\"projectForm.get('selectedProject').touched && !projectForm.get('selectedProject').valid\"\n invalidText=\"Project is required\"\n formControlName=\"selectedProject\"\n [items]=\"projects\"\n [autocomplete]=\"false\"\n [dropUp]=\"false\">\n <ibm-dropdown-list></ibm-dropdown-list>\n </ibm-combo-box>\n <ibm-dropdown *ngIf=\"!projects\"\n [skeleton]=\"true\"></ibm-dropdown>\n </div>\n</ng-container>","import { Component, Inject, Injector, Input, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { Project } from '@app/core/models';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\nimport { SuperWizardComponent } from '../super-wizard/super-wizard.component';\n\n@Component({\n selector: 'ibm-select-project-dialog',\n templateUrl: './select-project-dialog.component.html',\n styleUrls: ['./select-project-dialog.component.scss'],\n})\nexport class SelectProjectDialogComponent extends SuperWizardComponent implements OnInit {\n form: FormGroup;\n\n constructor(\n public injector: Injector,\n private formBuilder: FormBuilder,\n @Inject('dialogData')\n public dialogData: { title: string; description: string; buttonCallToAction: string; entityName: string }\n ) {\n super(injector);\n }\n\n ngOnInit(): void {\n this.form = this.formBuilder.group({});\n this.getProjectsListItems().subscribe();\n }\n\n onSelectProject() {\n this.getOrCreateProject(this.form.value.projectGroup).subscribe((project: Project) => {\n this.close.emit({\n status: EDialogCloseEventStatus.OK,\n data: project,\n } as IDialogCloseEvent<Project>);\n });\n }\n}\n","<ibm-modal [open]=\"open\"\n [hasScrollingContent]=\"false\">\n <ibm-modal-header (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>{{ dialogData.title }}</h3>\n <span>{{ dialogData.description }}</span>\n </ibm-modal-header>\n <div ibmModalContent\n class=\"ibm-rename-retrosynthesis\">\n <form (ngSubmit)=\"onSelectProject()\"\n [formGroup]=\"form\">\n <ibm-select-or-create-project #projectSelect\n [toAddLabel]=\"dialogData.entityName\"\n [form]=\"form\"\n [projects]=\"projects\"></ibm-select-or-create-project>\n </form>\n </div>\n <ibm-modal-footer>\n <button ibmButton=\"secondary\"\n (click)=\"closeModal()\">Close</button>\n <button ibmButton=\"primary\"\n (click)=\"onSelectProject()\"\n [disabled]=\"!form.valid\">\n {{ dialogData.buttonCallToAction }}\n </button>\n </ibm-modal-footer>\n</ibm-modal>","<div class=\"sub-header\"\n *ngIf=\"sequence\">\n <div class=\"bg-ui-04 text-04 left-bar\">\n <ibm-dropdown *ngIf=\"sequences && sequences.length > 1\"\n [size]=\"'xl'\"\n [theme]=\"'light'\"\n [dropUp]=\"false\"\n (selected)=\"selected.emit($event.item)\"\n class=\"w-100 custom-dropdown\">\n <ibm-dropdown-list [items]=\"sequences\"></ibm-dropdown-list>\n <div class=\"d-none\"\n *ngFor=\"let sequence of sequences\"\n data-e2e=\"outcomeId\">{{sequence.id}}</div>\n </ibm-dropdown>\n <span *ngIf=\"sequences && sequences.length === 1\"\n class=\"px-3\">\n {{ sequences[0].content }}\n </span>\n <span *ngIf=\"!sequences\"\n class=\"px-3\">\n {{ sequence.label }}\n </span>\n </div>\n\n <div class=\"right-bar pl-4\">\n <div class=\"d-flex align-items-center\">\n <ng-container *ngIf=\"sequence.isConfidenceComputed || sequence.isConfidenceComputed === undefined\">\n <span *ngIf=\"sequence.confidenceTag && eConfidenceTagName[sequence.confidenceTag]\"\n class=\"bx--tag bx--tag--blue\"\n [ngStyle]=\"{\n 'background-color': eConfidenceTagColor[sequence.confidenceTag],\n color: sequence.confidenceTag && eConfidenceTagTextColor[sequence.confidenceTag]\n }\">{{ eConfidenceTagName[sequence.confidenceTag] }}\n confidence\n </span>\n <span class=\"ml-4\"\n *ngIf=\"sequence.confidence !== undefined\"\n [title]=\"sequence.confidence\">Confidence: {{ sequence.confidence | truncDecimal: 3 }}</span>\n </ng-container>\n <ng-container *ngIf=\"\n sequence.isConfidenceComputed===false\">\n <ibm-inline-loading loadingText=\"Computing confidence\"></ibm-inline-loading>\n </ng-container>\n <ng-content select=\"[left]\"></ng-content>\n </div>\n <div class=\"d-flex align-items-center\">\n <ng-content select=\"[right]\"></ng-content>\n </div>\n </div>\n</div>","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\nimport {\n EConfidenceTagColor,\n EConfidenceTagName,\n EConfidenceTagTextColor,\n Reaction,\n ReactionCompletion,\n RetrosynthesisSequence,\n} from '@models';\nimport { ListItem } from 'carbon-components-angular';\n\n@Component({\n selector: 'ibm-sequence-bar',\n templateUrl: './sequence-bar.component.html',\n styleUrls: ['./sequence-bar.component.scss'],\n})\nexport class SequenceBarComponent implements OnInit {\n @Input() sequence: RetrosynthesisSequence | Reaction | ReactionCompletion;\n @Input() sequences: ListItem;\n\n @Output() selected: EventEmitter<ListItem> = new EventEmitter();\n\n eConfidenceTagName = EConfidenceTagName;\n eConfidenceTagTextColor = EConfidenceTagTextColor;\n eConfidenceTagColor = EConfidenceTagColor;\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","<ibm-sidenav [expanded]=\"sidenavActive\"\n [hidden]=\"!sidenavActive\"\n #mainSidenav>\n <ng-container *ngIf=\"!appSessionService.isAccountArea\">\n <!-- main application sidenav -->\n <ibm-sidenav-item [route]=\"['home']\"\n ibmHeapTrack=\"SIDENAV: Home\"\n title=\"Home\"\n [active]=\"router.isActive(router.createUrlTree(['home']).toString(), true)\">\n <svg ibmIconHome\n size=\"16\"></svg>\n Home\n </ibm-sidenav-item>\n <ibm-sidenav-item [route]=\"['projects', 'list']\"\n ibmHeapTrack=\"SIDENAV: Projects\"\n title=\"Projects\"\n [active]=\"router.isActive(router.createUrlTree(['projects', 'list']).toString(), true)\">\n <svg ibmIconFolders\n size=\"16\"></svg>\n Projects\n </ibm-sidenav-item>\n <ibm-sidenav-menu title=\"Favorite projects\"\n [expanded]=\"isFavoriteProjectMenuExpanded\"\n *ngIf=\"projects?.length > 0\"\n #favoriteProjectsMenu>\n <svg icon\n ibmIconStar\n *ngIf=\"!isFetchingFavoritesProjects\"\n size=\"16\"></svg>\n <svg icon\n *ngIf=\"isFetchingFavoritesProjects\"\n ibmIconFade\n size=\"16\"></svg>\n <ibm-sidenav-item *ngFor=\"let project of projects\"\n [title]=\"project.name\"\n [route]=\"['projects', project.id, project.name, 'dashboard']\"\n [active]=\"\n router.isActive(\n router\n .createUrlTree(['projects', project.id, project.name])\n .toString(),\n false\n )\n \">\n {{ project.name }}\n </ibm-sidenav-item>\n </ibm-sidenav-menu>\n <ibm-sidenav-item [route]=\"['collaborators', 'list']\"\n ibmHeapTrack=\"SIDENAV: Collaborators\"\n title=\"Collaborators\"\n [active]=\"router.isActive(router.createUrlTree(['collaborators', 'list']).toString(), true)\">\n <svg ibmIconCollaborate\n size=\"16\"></svg>\n Collaborators\n </ibm-sidenav-item>\n\n <div class=\"sidenav-divider\"></div>\n\n <ibm-sidenav-item (click)=\"onCreate('retrosynthesis')\"\n ibmHeapTrack=\"SIDENAV: Predict retrosynthesis\"\n title=\"Predict retrosynthesis\">\n <svg ibmIconNetwork_2\n size=\"16\"></svg>\n Predict retrosynthesis\n </ibm-sidenav-item>\n\n <ibm-sidenav-item (click)=\"onCreate('forward-reaction')\"\n ibmHeapTrack=\"SIDENAV: Predict product\"\n title=\"Predict product\">\n <svg ibmIconNetwork_1\n size=\"16\"></svg>\n Predict product\n </ibm-sidenav-item>\n\n <ibm-sidenav-item (click)=\"onCreate('reaction-completion')\"\n ibmHeapTrack=\"SIDENAV: Predict reagents\"\n title=\"Predict reagents\">\n <svg ibmIconChemistry\n size=\"16\"></svg>\n Predict reagents\n </ibm-sidenav-item>\n\n <ibm-sidenav-item (click)=\"onCreate('synthesis')\"\n ibmHeapTrack=\"SIDENAV: Plan a synthesis\"\n title=\"Plan a synthesis\">\n <svg ibmIconNetwork_3\n size=\"16\"></svg>\n Plan a synthesis\n </ibm-sidenav-item>\n\n <div class=\"sidenav-divider\"></div>\n\n <ibm-sidenav-item [route]=\"['actions', 'reaction-properties-prediction']\"\n ibmHeapTrack=\"SIDENAV: Atom mapping\"\n title=\"Atom mapping\"\n [active]=\"router.isActive(router.createUrlTree(['actions', 'reaction-properties-prediction']).toString(), true)\">\n <svg ibmIconSankeyDiagram\n size=\"16\"></svg>\n Atom mapping\n </ibm-sidenav-item>\n <ibm-sidenav-item [route]=\"['actions', 'text-to-procedure']\"\n ibmHeapTrack=\"SIDENAV: Text to procedure\"\n title=\"Text to procedure\"\n [active]=\"router.isActive(router.createUrlTree(['actions', 'text-to-procedure']).toString(), true)\">\n <svg ibmIconMigrate\n size=\"16\"></svg>\n Text to procedure\n </ibm-sidenav-item>\n <ibm-sidenav-item [route]=\"['optical-chemical-recognition']\"\n ibmHeapTrack=\"SIDENAV: Reaction digitization\"\n title=\"Reaction digitization\"\n [active]=\"router.isActive(router.createUrlTree(['optical-chemical-recognition']).toString(), false)\">\n <svg ibmIconObjectStorage\n size=\"16\"></svg>\n Reaction digitization\n </ibm-sidenav-item>\n\n <ibm-sidenav-item [route]=\"['model-tuner']\"\n *ngIf=\"apiService.auth?.user?.canUseModelTuner\"\n ibmHeapTrack=\"SIDENAV: Model Tuner\"\n title=\"Model Tuner\"\n [active]=\"router.isActive(router.createUrlTree(['model-tuner']).toString(), false)\">\n <svg ibmIconMachineLearningModel\n size=\"16\"></svg>\n Model Tuner\n </ibm-sidenav-item>\n\n <div class=\"sidenav-divider\"></div>\n\n <ibm-sidenav-item (click)=\"onExternalLinkClick('https://accelerate-science.github.io/rxn/')\"\n ibmHeapTrack=\"SIDENAV: Learn\"\n title=\"Learn\">\n <svg ibmIconEducation\n size=\"16\"></svg>\n Learn\n </ibm-sidenav-item>\n </ng-container>\n\n <!-- user account sidenav -->\n <ng-container *ngIf=\"appSessionService.isAccountArea\">\n <ibm-sidenav-item [route]=\"['/', 'account']\"\n title=\"Account overview\"\n [active]=\"router.isActive(router.createUrlTree(['account', 'details']).toString(), false)\"\n [isSubMenu]=\"true\">\n Account overview\n </ibm-sidenav-item>\n <ibm-sidenav-item\n *ngIf=\"environment.ecommerceEnabled && (apiService.auth?.user?.hasPayGoPlan || (apiService.auth?.user?.isTeamMember && apiService.auth?.user?.isTeamOwner))\"\n [route]=\"['/', 'account', 'billing']\"\n title=\"Billing\"\n [active]=\"router.isActive(router.createUrlTree(['account', 'billing']).toString(), false)\"\n [isSubMenu]=\"true\">\n Billing\n </ibm-sidenav-item>\n <ibm-sidenav-item [route]=\"['/', 'account', 'subscription']\"\n *ngIf=\"!(apiService.auth?.user?.hasFreePlan && !apiService.auth?.user?.canUpgradePlan && !apiService.auth?.user?.isTeamMember)\"\n title=\"Subscription\"\n [active]=\"router.isActive(router.createUrlTree(['account', 'subscription']).toString(), true)\"\n [isSubMenu]=\"true\">\n Subscription\n </ibm-sidenav-item>\n <ibm-sidenav-item [route]=\"['/', 'account', 'keys']\"\n title=\"My keys\"\n [active]=\"router.isActive(router.createUrlTree(['account', 'keys']).toString(), true)\"\n [isSubMenu]=\"true\">\n My keys\n </ibm-sidenav-item>\n <ibm-sidenav-item [route]=\"['/', 'account', 'team']\"\n *ngIf=\"apiService.auth?.user?.isTeamOwner\"\n title=\"My team\"\n [active]=\"router.isActive(router.createUrlTree(['account', 'team']).toString(), true)\"\n [isSubMenu]=\"true\">\n My team\n </ibm-sidenav-item>\n </ng-container>\n</ibm-sidenav>\n\n<div class=\"sidenav-footer text-center py-4\"\n [ngClass]=\"{'d-block': sidenavActive}\">\n <a class=\"bx--link\"\n onclick=\"cookieconsent.openPreferencesCenter();\">Cookie</a>\n |\n <a ibmLink\n [routerLink]=\"['/terms-of-use']\"\n target=\"_blank\">Terms</a>\n |\n <a ibmLink\n href=\"https://www.ibm.com/privacy/us/en/?lnk=flg-priv-usen\"\n target=\"_blank\">Privacy</a>\n |\n <a ibmLink\n href=\"https://share.hsforms.com/1OGflIdkDSF2ZBoUbVQ93ggdammb\"\n target=\"_blank\">Support</a>\n</div>","import { Component, Input, OnDestroy, OnInit, QueryList, ViewChildren } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Subscription } from 'rxjs';\nimport { SideNavMenu } from 'carbon-components-angular';\n\nimport { Project } from '@app/core/models';\nimport { ApiService, AppSessionService, CommonService } from '@app/core/services';\nimport { IApiSortDirection } from '@app/libs/bitforce/api';\nimport { EventTrackingService } from '@services';\nimport { finalize } from 'rxjs/operators';\nimport { environment } from '@env/environment';\n\n@Component({\n selector: 'ibm-mlrp-sidenav',\n templateUrl: './sidenav.component.html',\n styleUrls: ['./sidenav.component.scss'],\n})\nexport class SidenavComponent implements OnInit, OnDestroy {\n @ViewChildren(SideNavMenu) sidenavMenus: QueryList<SideNavMenu>;\n @Input() sidenavActive: boolean;\n\n isFetchingFavoritesProjects = false;\n subscriptions: Subscription = new Subscription();\n projects: Project[] = [];\n currentProject: Project;\n\n environment = environment;\n\n constructor(\n public apiService: ApiService,\n public router: Router,\n public appSessionService: AppSessionService,\n public eventTrackingService: EventTrackingService,\n public commonService: CommonService\n ) {}\n\n ngOnInit(): void {\n this.subscriptions.add(\n this.appSessionService.projectsFavoritesChanges.subscribe(() => {\n this.loadFavoritesProjects();\n })\n );\n\n this.subscriptions.add(\n this.appSessionService.currentProject.subscribe(currentProject => {\n this.currentProject = currentProject;\n })\n );\n\n this.loadFavoritesProjects();\n }\n\n get isFavoriteProjectMenuExpanded() {\n return (\n (this.currentProject && this.projects.some(project => project.id === this.currentProject.id)) ||\n this.sidenavMenus.first?.expanded\n );\n }\n\n showCookieConsent() {\n const cookieBtn: any = document.querySelector('#teconsent > a');\n if (cookieBtn) {\n cookieBtn.click();\n }\n }\n\n loadFavoritesProjects() {\n if (this.apiService.auth.user) {\n this.isFetchingFavoritesProjects = true;\n this.apiService.projects\n .get<Project>({\n query: { favorite: true },\n sorting: [{ property: 'name', direction: IApiSortDirection.ASC }],\n })\n .pipe(finalize(() => (this.isFetchingFavoritesProjects = false)))\n .subscribe(response => {\n this.projects = response.content;\n });\n }\n }\n\n onCreate(resourceType: 'forward-reaction' | 'retrosynthesis' | 'synthesis' | 'reaction-completion') {\n switch (resourceType) {\n case 'forward-reaction':\n this.commonService.onCreateForwardReaction();\n break;\n case 'retrosynthesis':\n this.commonService.onCreatePredictRetrosyntheticRoutes();\n break;\n case 'synthesis':\n this.commonService.onPlanASynthesis();\n break;\n case 'reaction-completion':\n this.commonService.onCreateReactionCompletion();\n break;\n }\n }\n\n onExternalLinkClick(url) {\n window.open(url, 'blank');\n }\n\n ngOnDestroy() {\n this.subscriptions.unsubscribe();\n }\n}\n","<div (ibmClickOutside)=\"onClickOutside()\"\n class=\"d-inline\"\n *ngIf=\"smiles\">\n <button #viewDocs\n ibmButton=\"ghost\"\n class=\"view-docs-btn\"\n (click)=\"onTogglePanel()\"\n [ngClass]=\"{'btn-active': showPanel}\"\n [iconOnly]=\"true\"\n [attr.aria-expanded]=\"showPanel\"\n [disabled]=\"isLoading\"\n data-e2e=\"similarReactionsBtn\">\n <svg icon\n ibmIconNotebook\n size=\"16\"\n class=\"bx--btn__icon\"></svg>\n </button>\n <div class=\"document-list-container p-5\"\n [ngStyle]=\"{\n 'left': panelPosition.left, \n 'top': panelPosition.top, \n 'width': panelWidth + 'px', \n 'height': 'calc(100vh - ' + panelPosition.top +'',\n 'max-height': 'calc(100vh - ' + panelPosition.top +''\n }\"\n [ngClass]=\"{ 'document-list-container__invisible': !showPanel }\">\n <h4 class=\"mb-5\">Similar reactions list</h4>\n <ibm-accordion *ngIf=\"!isLoading\"\n data-e2e=\"similarReactionsList\">\n <ibm-accordion-item [title]=\"title\"\n *ngFor=\"let reaction of similarReactions; let i = index;\"\n [context]=\"{ 'reaction': reaction, 'index': i }\"\n [expanded]=\"i === 0\">\n <div class=\"document-list-container__document-description\"\n *ngFor=\"let reference of reaction.references; let refIndex = index;\">\n <div *ngIf=\"paginationModel[i].currentPage === refIndex + 1\"\n class=\"p-5\">\n <div class=\"d-flex align-items-center justify-content-between mb-5\">\n <h5>{{ reference.source }}</h5>\n <div class=\"d-flex align-items-center cursor-pointer text-interactive-01\"\n (click)=\"onViewDocument($event, reference.url)\"\n *ngIf=\"reference.url\">\n Open Document\n <svg icon\n ibmIconLaunch\n class=\"fill-interactive ml-3\"\n size=\"16\"></svg>\n </div>\n </div>\n <div class=\"d-flex flex-column\">\n <div class=\"d-flex align-items-center mb-3\"\n *ngIf=\"reference.url\">\n <h6 class=\"mr-2\">URL:</h6>\n <span>{{reference.url}}</span>\n </div>\n <div class=\"d-flex align-items-center mb-3\">\n <h6 class=\"mr-2\">Dataset:</h6>\n <span>{{reference.dataset}}</span>\n </div>\n <div class=\"break-all\">\n {{ reference.text }}\n </div>\n </div>\n </div>\n </div>\n <ibm-pagination [model]=\"paginationModel[i]\"\n [pageInputDisabled]=\"true\"\n [showPageInput]=\"false\"\n (selectPage)=\"onSelectPage($event, i)\"\n [translations]=\"{ OF_LAST_PAGES: 'of {{last}} documents', OF_LAST_PAGE: 'of {{last}} document'}\"\n class=\"w-100\">\n </ibm-pagination>\n </ibm-accordion-item>\n </ibm-accordion>\n\n <ibm-accordion *ngIf=\"isLoading\"\n skeleton=\"true\">\n <ibm-accordion-item></ibm-accordion-item>\n <ibm-accordion-item></ibm-accordion-item>\n <ibm-accordion-item></ibm-accordion-item>\n </ibm-accordion>\n </div>\n\n <ng-template #title\n let-reaction=\"reaction\"\n let-index=\"index\">\n <div class=\"d-flex flex-column bx--accordion__title reaction-container\">\n <div class=\"d-flex align-items-center justify-content-between w-100 mb-5\">\n <div class=\"d-flex align-items-center\">\n <h5 class=\"mr-3\">\n Reaction {{index + 1}}\n </h5>\n <button ibmButton=\"ghost\"\n *ngIf=\"reaction.smiles\"\n [iconOnly]=\"true\"\n size=\"sm\"\n title=\"Copy Smiles\"\n (click)=\"onCopySmiles($event, reaction.smiles)\">\n <svg icon\n ibmIconCopy\n size=\"16\"></svg>\n </button>\n </div>\n <div class=\"d-flex align-items-center\">\n <strong class=\"mr-2\">\n Score\n </strong>\n <span class=\"bx--tag bx--tag--green mr-5\">\n {{ reaction.score }}\n </span>\n <strong class=\"mr-2\">\n Reaction class\n </strong>\n <span class=\"bx--tag bx--tag--gray mr-3\">\n {{ reaction.rclass || 'N/A' }}\n </span>\n </div>\n </div>\n <div class=\"d-flex align-items-center my-7\">\n <div class=\"reaction-container__image d-flex align-items-start mb-1\">\n <ng-container *ngTemplateOutlet=\"reactionImage; context: { data: reaction }\"></ng-container>\n </div>\n </div>\n </div>\n </ng-template>\n\n <ng-template #reactionImage\n let-data=\"data\">\n <div class=\"d-flex align-items-center\"\n *ngIf=\"data\"\n [ngStyle]=\"{'max-width': (panelWidth - 100) + 'px'}\">\n <ibm-reaction-image [productMolecule]=\"data.productMolecule\"\n [precursorMolecules]=\"data.outcomeMolecules\"></ibm-reaction-image>\n </div>\n </ng-template>","import { AfterContentChecked, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';\nimport { SimilarReaction } from '@app/core/models';\nimport { ApiService, ToastMessagesService } from '@app/core/services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { copyToClipboard } from '@app/shared/common-utilities/clipboard';\nimport { EAiModelType } from '@app/shared/enums/ai-model.enum';\nimport { PaginationModel } from 'carbon-components-angular';\nimport { finalize } from 'rxjs/operators';\n\n@Component({\n selector: 'ibm-similar-reactions-documents-list',\n templateUrl: './similar-reactions-documents-list.component.html',\n styleUrls: ['./similar-reactions-documents-list.component.scss'],\n})\nexport class SimilarReactionsDocumentsListComponent implements OnInit, AfterContentChecked {\n @ViewChild('viewDocs') viewDocs: ElementRef;\n @Input() smiles: string;\n @Input() aiModel: string;\n @Input() aiModelType: EAiModelType;\n @Input() showPanel = false;\n @Input() panelWidth = 800;\n\n similarReactions: SimilarReaction[] = [];\n panelPosition = { top: '0', left: '0' };\n isLoading = false;\n paginationModel: PaginationModel[] = [];\n\n constructor(private apiService: ApiService, private toastMessagesService: ToastMessagesService) {}\n\n ngOnInit(): void {\n this.panelWidth = Math.min(this.panelWidth, 800);\n }\n\n ngAfterContentChecked() {\n const data = this.viewDocs?.nativeElement?.getBoundingClientRect();\n this.panelPosition.top = `${data?.top + data?.height}px`;\n this.panelPosition.left = `${data?.right - this.panelWidth}px`;\n }\n\n onClickOutside() {\n this.showPanel = false;\n }\n\n onTogglePanel() {\n this.showPanel = !this.showPanel;\n if (this.showPanel) {\n this.isLoading = true;\n this.apiService.actions\n .getSimilarReactionDocuments({\n smiles: this.smiles,\n aiModel: this.aiModel,\n aiModelType: this.aiModelType,\n })\n .pipe(\n finalize(() => {\n this.isLoading = false;\n })\n )\n .subscribe(response => {\n this.similarReactions = response.content;\n this.paginationModel = this.similarReactions.map(similarReaction => ({\n currentPage: 1,\n pageLength: 1,\n totalDataLength: similarReaction.references?.length,\n }));\n });\n } else {\n this.similarReactions = [];\n }\n }\n\n onSelectPage(currentPage: number, paginatorIndex: number) {\n this.paginationModel[paginatorIndex].currentPage = currentPage;\n }\n\n onViewDocument($event: Event, url: string) {\n $event.stopPropagation();\n window.open(url);\n }\n\n async onCopySmiles($event: Event, smiles: string) {\n $event.stopPropagation();\n const copied = await copyToClipboard(smiles);\n if (copied) {\n this.toastMessagesService.show({\n title: 'Info',\n message: 'Smiles copied to clipboard',\n type: EToastMessageType.SUCCESS,\n });\n } else {\n // eslint-disable-next-line @typescript-eslint/quotes\n this.toastMessagesService.show({\n title: 'Error',\n message: `Couldn't copy smiles to clipboard`,\n type: EToastMessageType.ERROR,\n });\n }\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\nimport { IApiResponse } from '@bitf/api';\nimport { Project } from '@models';\nimport { ProjectsService } from '@services';\nimport { BaseModal, ListItem } from 'carbon-components-angular';\nimport { Observable, of, throwError } from 'rxjs';\nimport { catchError, filter, map, tap } from 'rxjs/operators';\nimport { EProjectSelectionMode } from '@shared/components/select-or-create-project/select-or-create-project.component';\nimport { EventTrackingService } from '@app/core/services/event-tracking/event-tracking.service';\n\n@Injectable()\nexport class SuperWizardComponent extends BaseModal {\n projects: ListItem[];\n protected projectsService: ProjectsService;\n protected eventTrackingService: EventTrackingService;\n\n constructor(public injector: Injector) {\n super();\n this.projectsService = this.injector.get<ProjectsService>(ProjectsService);\n this.eventTrackingService = this.injector.get<EventTrackingService>(EventTrackingService);\n }\n\n protected getProjectsListItems(selectProjectId?: string): Observable<ListItem[]> {\n return this.projectsService\n .get<Project>({ size: 1000 })\n .pipe(\n filter((response: IApiResponse<Project[]>) => response !== null),\n map((response: IApiResponse<Project[]>) =>\n response.content.map((project: Project) => ({\n content: project.name,\n project,\n selected: project.id === selectProjectId,\n }))\n ),\n tap((projects: ListItem[]) => (this.projects = projects)),\n catchError(err => {\n this.projects = [];\n return throwError(err);\n })\n );\n }\n\n protected getOrCreateProject(projectGroupValue: any) {\n let source$: Observable<Project> = of(projectGroupValue.selectedProject?.project);\n if (projectGroupValue.projectRadio === EProjectSelectionMode.NEW_PROJECT) {\n source$ = this.projectsService\n .post<Project>({ body: { name: projectGroupValue.projectName }, bodyParser: 'raw', isBodyRaw: true })\n .pipe(\n map(response => response.content),\n tap(() => {\n this.eventTrackingService.trackEvent('Project Creation');\n })\n );\n }\n return source$;\n }\n\n closeModal(status = EDialogCloseEventStatus.CANCEL) {\n this.close.emit({\n status,\n } as IDialogCloseEvent<void>);\n }\n}\n","<div class=\"synthesis-executions-container p-5 d-flex align-items-center mb-5\"\n *ngIf=\"!!synthesisExecutions\">\n <ibm-loading class=\"mr-5\"></ibm-loading>\n <span class=\"mr-5\">{{ synthesisExecutions }} Synthesis executions in progress</span>\n <a [routerLink]=\"['..','synthesis','executions']\"\n *ngIf=\"showListLink\">View</a>\n</div>","import { Component, Input, OnDestroy, OnInit } from '@angular/core';\nimport { catchError, filter, switchMap } from 'rxjs/operators';\nimport { of, Subscription, timer } from 'rxjs';\n\nimport { ESynthesisExecutionStatus, Project } from '@app/core/models';\nimport { ApiService } from '@app/core/services';\nimport { IApiResponse } from '@app/libs/bitforce/api';\n\n@Component({\n selector: 'ibm-synthesis-execution-state',\n templateUrl: './synthesis-execution-state.component.html',\n styleUrls: ['./synthesis-execution-state.component.scss'],\n})\nexport class SynthesisExecutionStateComponent implements OnDestroy, OnInit {\n @Input() projectId: string;\n @Input() showListLink = false;\n\n private pollingInterval = 15000;\n private subscription = new Subscription();\n synthesisExecutions: number;\n\n constructor(private apiService: ApiService) {}\n\n ngOnInit(): void {\n this.subscription.add(\n timer(0, this.pollingInterval)\n .pipe(\n switchMap(() =>\n this.apiService.projects\n .getById<Project>({\n id: this.projectId,\n computedFields: ['summary'],\n })\n .pipe(catchError(_ => of(null)))\n ),\n filter(response => {\n if (response?.content?.id === this.projectId) {\n return true;\n }\n return false;\n })\n )\n .subscribe((response: IApiResponse<Project>) => {\n this.synthesisExecutions = response.content?.summary?.totalSynthesisByStatus\n .filter(status =>\n [ESynthesisExecutionStatus.WAITING, ESynthesisExecutionStatus.RUNNING].includes(status.key)\n )\n .map(status => status.value)\n .reduce((c, p) => c + p, 0);\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscription.unsubscribe();\n }\n}\n","<ng-container *ngIf=\"synthesis.retrosynthesis\">\n <div class=\"information-overflow-menu__border my-6\"></div>\n\n <h5>Retrosynthesis info</h5>\n <ng-container *ngIf=\"synthesis?.retrosynthesis?.id\">\n <h6 class=\"mt-6\">Retro ID</h6>\n <div class=\"mt-4\">{{synthesis?.retrosynthesis?.id}}</div>\n </ng-container>\n\n <ng-container *ngIf=\"synthesis.retrosynthesis?.typology\">\n <h6 class=\"mt-6\">Type</h6>\n <div class=\"mt-4\">\n <ng-container [ngSwitch]=\"synthesis.retrosynthesis.typology\">\n <ibm-tag type=\"blue\"\n *ngSwitchCase=\"eRetrosynthesisTypology.INTERACTIVE\">\n <span>{{ synthesis.retrosynthesis.typologyLabel }}</span>\n </ibm-tag>\n <ibm-tag type=\"blue\"\n *ngSwitchCase=\"eRetrosynthesisTypology.AUTOMATIC\">\n <span>{{ synthesis.retrosynthesis.typologyLabel }}</span>\n </ibm-tag>\n <ibm-tag type=\"yellow\"\n *ngSwitchCase=\"eRetrosynthesisTypology.FROM_FILE\">\n <span>{{ synthesis.retrosynthesis.typologyLabel }}</span>\n </ibm-tag>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"synthesis?.sequences[0]\">\n <h6 class=\"mt-6\">Confidence</h6>\n <div class=\"mt-4\">{{synthesis?.sequences[0]?.confidence | truncDecimal: 3}}</div>\n </ng-container>\n\n <ng-container *ngIf=\"synthesis.retrosynthesis?.uploadedFile\">\n <h6 class=\"mt-6\">File uploaded</h6>\n <ibm-download-file-entry-button [fileEntry]=\"synthesis.retrosynthesis.uploadedFile\">\n </ibm-download-file-entry-button>\n </ng-container>\n</ng-container>","import { Component, Input, OnInit } from '@angular/core';\nimport { ERetrosynthesisTypology, Synthesis } from '@app/core/models';\n@Component({\n selector: 'ibm-synthesis-retrosynthesis-information',\n templateUrl: './synthesis-retrosynthesis-information.component.html',\n styleUrls: ['./synthesis-retrosynthesis-information.component.scss'],\n})\nexport class SynthesisRetrosynthesisInformationComponent implements OnInit {\n @Input() synthesis: Synthesis;\n eRetrosynthesisTypology = ERetrosynthesisTypology;\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","<ng-container [ngSwitch]=\"status\">\n <div class=\"synthesis-status\">\n <div *ngSwitchCase=\"'RUNNING'\"\n class=\"synthesis-status__icon running\">\n <svg icon\n ibmIconPlayFilled\n [size]=\"size\"></svg>\n </div>\n\n <div *ngSwitchCase=\"'WAITING'\"\n class=\"synthesis-status__icon waiting\">\n <svg icon\n ibmIconInProgress\n [size]=\"size\"></svg>\n </div>\n\n <div *ngSwitchCase=\"'SKIPPED'\"\n class=\"synthesis-status__icon skipped\">\n <svg icon\n ibmIconSkipForwardOutlineFilled\n [size]=\"size\"></svg>\n </div>\n\n <div *ngSwitchCase=\"'ERROR'\"\n class=\"synthesis-status__icon error\">\n <svg icon\n ibmIconErrorFilled\n [size]=\"size\"></svg>\n </div>\n\n <div *ngSwitchCase=\"'DONE'\"\n class=\"synthesis-status__icon done\">\n <svg icon\n ibmIconCheckmarkFilled\n [size]=\"size\"></svg>\n </div>\n\n <div *ngSwitchCase=\"'PAUSED'\"\n class=\"synthesis-status__icon paused\">\n <svg icon\n ibmIconPauseOutlineFilled\n [size]=\"size\"></svg>\n </div>\n\n <div *ngSwitchCase=\"'STOPPED'\"\n class=\"synthesis-status__icon stopped\">\n <svg icon\n ibmIconStopFilled\n [size]=\"size\"></svg>\n </div>\n\n <div *ngSwitchCase=\"'NEW'\"\n class=\"synthesis-status__icon new\">\n <svg icon\n ibmIconEdit\n [size]=\"size\"></svg>\n </div>\n\n <div *ngSwitchDefault>{{ status }}</div>\n </div>\n</ng-container>","import { Component, Input, OnInit } from '@angular/core';\nimport { ERetrosynthesisStatus } from '@app/core/models';\n\n@Component({\n selector: 'ibm-synthesis-status-icon',\n templateUrl: './synthesis-status-icon.component.html',\n styleUrls: ['./synthesis-status-icon.component.scss'],\n})\nexport class SynthesisStatusIconComponent implements OnInit {\n @Input() status: ERetrosynthesisStatus;\n @Input() size = 16;\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'ibm-table-list-expansion',\n templateUrl: './table-list-expansion.component.html',\n styleUrls: ['./table-list-expansion.component.scss'],\n})\nexport class TableListExpansionComponent implements OnInit {\n constructor() {}\n\n ngOnInit(): void {}\n}\n","<div class=\"list__expansion-row\">\n <div class=\"list__expansion-row__table\">\n <div class=\"list__expansion-row__table-row\">\n <div class=\"list__expansion-row__img-container\">\n <ng-content select=\"[images]\"></ng-content>\n </div>\n </div>\n <div class=\"list__expansion-row__table-row\">\n <div class=\"list__expansion-row__smiles-container\">\n <div class=\"list__expansion-row__smiles-container__title small--xs mb-5\">Smiles</div>\n <div class=\"list__expansion-row__smiles-container__smiles\">\n <ng-content select=\"[smiles]\"></ng-content>\n </div>\n </div>\n </div>\n </div>\n</div>","import { Component, Input, OnInit } from '@angular/core';\nimport { EAiModelType } from '@app/shared/enums/ai-model.enum';\n\n@Component({\n selector: 'ibm-tmap-button',\n templateUrl: './tmap-button.component.html',\n styleUrls: ['./tmap-button.component.scss'],\n})\nexport class TmapButtonComponent implements OnInit {\n @Input() aiModel: string;\n @Input() aiModelType: EAiModelType;\n @Input() reactionName: string;\n @Input() reactionSmiles: string;\n @Input() retrosynthesisSequenceId: string;\n constructor() {}\n\n ngOnInit(): void {}\n}\n","<a ibmButton=\"ghost\"\n class=\"text-01 small--xs\"\n data-e2e=\"tmapBtn\"\n [iconOnly]=\"true\"\n title=\"Open Tmap\"\n [routerLink]=\"['/tmap']\"\n [queryParams]=\"{ 'aiModel': aiModel, 'aiModelType': aiModelType, 'reactionName': reactionName, 'reactionSmiles': reactionSmiles, 'retrosynthesisSequenceId': retrosynthesisSequenceId }\">\n <svg icon\n ibmIconDataVis_1\n size=\"16\"\n class=\"bx--btn__icon\"></svg>\n</a>","<ibm-modal [open]=\"open\"\n size=\"xs\"\n [hasScrollingContent]=\"false\">\n <ibm-modal-header (closeSelect)=\"closeModal()\">\n <h4>Pay-as-you-go training rates</h4>\n </ibm-modal-header>\n <section class=\"bx--modal-content\">\n <ibm-structured-list>\n <ibm-list-row *ngFor=\"let item of dialogData.data\">\n <ibm-list-column>\n <div class=\"d-flex align-items-center\">\n <span>{{item.hours}}</span>\n <span class=\"ml-auto\"><strong>{{item.cost}}</strong></span>\n </div>\n </ibm-list-column>\n </ibm-list-row>\n </ibm-structured-list>\n </section>\n</ibm-modal>","import { Component, Injector } from '@angular/core';\nimport { IPlanOverageTrainingCostRate } from '@app/core/models';\nimport { BaseModal } from 'carbon-components-angular';\n\n@Component({\n selector: 'ibm-training-cost-detail-dialog',\n templateUrl: './training-cost-detail-dialog.component.html',\n styleUrls: ['./training-cost-detail-dialog.component.scss'],\n})\nexport class TrainingCostDetailDialogComponent extends BaseModal {\n dialogData: { data: IPlanOverageTrainingCostRate[] };\n constructor(private injector: Injector) {\n super();\n this.dialogData = this.injector.get('dialogData');\n }\n}\n","import { Component, Injector } from '@angular/core';\nimport { BaseModal } from 'carbon-components-angular';\n\n@Component({\n selector: 'ibm-training-hours-help-dialog',\n templateUrl: './training-hours-help-dialog.component.html',\n styleUrls: ['./training-hours-help-dialog.component.scss'],\n})\nexport class TrainingHoursHelpDialogComponent extends BaseModal {\n constructor() {\n super();\n }\n}\n","<ibm-modal [open]=\"open\"\n size=\"xs\"\n [hasScrollingContent]=\"false\">\n <ibm-modal-header (closeSelect)=\"closeModal()\">\n <h4>How many training hours do I need?</h4>\n </ibm-modal-header>\n <section class=\"bx--modal-content\">\n <p>The number of training hours you consume will directly correlate to the number of prediction reactions\n used as input.\n </p>\n <ul ibmList\n class=\"pl-5 mt-4\">\n <li ibmListItem>30k reactions - ~30 minutes</li>\n <li ibmListItem>30k-60k reactions - ~1 hour</li>\n <li ibmListItem>60k-180k reactions - ~3.25 hours</li>\n <li ibmListItem>180k-450k reactions - ~8 hours</li>\n <li ibmListItem>450k-750k reactions - ~13 hours</li>\n <li ibmListItem>750k-1m reactions - ~18 hours</li>\n </ul>\n </section>\n</ibm-modal>","export function bitfLoadAsset(fileUrl, fileType: string, id = fileUrl): Promise<any> {\n return new Promise<void | string>((resolve, reject) => {\n let assetElement;\n // Check if the asset is already loaded\n const alreadyLoadedAsset = document.getElementById(id);\n if (alreadyLoadedAsset) {\n resolve('File already loaded');\n return;\n }\n switch (fileType) {\n case 'js':\n assetElement = document.createElement('script');\n assetElement.setAttribute('type', 'text/javascript');\n assetElement.setAttribute('src', fileUrl);\n assetElement.setAttribute('id', id);\n break;\n\n case 'css':\n assetElement = document.createElement('link');\n assetElement.setAttribute('rel', 'stylesheet');\n assetElement.setAttribute('type', 'text/css');\n assetElement.setAttribute('href', fileUrl);\n assetElement.setAttribute('id', id);\n break;\n\n default:\n reject('File could not be loaded');\n return;\n }\n assetElement.onload = () => {\n resolve();\n };\n assetElement.onerror = error => {\n reject(error);\n };\n document.getElementsByTagName('head')[0].appendChild(assetElement);\n });\n}\n","import { RetrosynthesisMolecule } from '@app/core/models';\n\nexport function getStatusBoxProperties(sequenceNode: RetrosynthesisMolecule) {\n const buttonProps = {\n fill: '#0f62fe',\n event: sequenceNode.isInspectable ? `element:inspectBox` : null,\n title: sequenceNode.status as string,\n textStroke: '#ffffff',\n };\n\n switch (sequenceNode.status) {\n case 'WAITING':\n buttonProps.title = 'Waiting';\n buttonProps.fill = '#0062ff';\n break;\n case 'RUNNING':\n buttonProps.title = 'In progress';\n buttonProps.fill = '#f0c11c';\n break;\n case 'DONE':\n buttonProps.fill = '#42be65';\n buttonProps.title = 'Completed';\n break;\n case 'PENDING':\n buttonProps.title = 'Pending';\n buttonProps.event = undefined;\n buttonProps.fill = '#0062ff';\n break;\n case 'ERROR':\n buttonProps.title = 'Unsuccessfully completed';\n buttonProps.fill = '#fb4b53';\n break;\n case 'SKIPPED':\n buttonProps.title = 'Skipped';\n // buttonProps.event = undefined;\n buttonProps.fill = '#8d8d8d';\n break;\n case 'STOPPED':\n buttonProps.title = 'Stopped';\n buttonProps.fill = '#da1a2a';\n break;\n case 'PAUSED':\n buttonProps.title = 'Paused';\n buttonProps.fill = '#FFA500';\n break;\n default:\n buttonProps.title = sequenceNode.status;\n }\n\n return buttonProps;\n}\n","<div class=\"paper-container\"\n [ngClass]=\"showBottomBar && 'bottom-bar-padding'\"></div>\n<div class=\"tree-graph-bottom-bar p-3\"\n *ngIf=\"showBottomBar\">\n <div class=\"tree-graph-bottom-bar__section justify-content-start\">\n <ng-content select=\"[left]\"></ng-content>\n </div>\n <div class=\"tree-graph-bottom-bar__section justify-content-center\">\n <ibm-zoom #zoom\n (zoomSelected)=\"setZoom($event)\"\n [zoomValues]=\"zoomSteps\"\n [currentZoomIndex]=\"currentZoomIndex\"\n theme=\"dark\"></ibm-zoom>\n </div>\n\n <div class=\"tree-graph-bottom-bar__section justify-content-end\">\n <ng-content select=\"[right]\"\n class=\"tree-graph-bottom-bar__section\"></ng-content>\n </div>\n</div>","// TODO\n// grab colors from config\n\n// svg sizes\n// fix zoom and paper drag / pan\n// changing sequence zoom the tree\n// the graph must be centered\n// order of the molecules when we open the detail change\n// Smiles in the molecule description should have a mouse hover or expand his height dynamically\ndeclare const joint: any;\nimport {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n ElementRef,\n} from '@angular/core';\nimport { bitfLoadAsset } from '@bitf/utils';\nimport {\n RetrosynthesisMolecule,\n Retrosynthesis,\n RetrosynthesisSequence,\n ERetrosynthesisMoleculeAction,\n Synthesis,\n ReactionCompletionPrediction,\n} from '@models';\nimport { sequencesFromSiblingsForMolecule } from '@app/shared/common-utilities/siblings-to-sequence';\nimport { getStatusBoxProperties } from './status-box-helper';\nimport { copyToClipboard } from '../../common-utilities/clipboard';\nimport { AppSessionService, DialogsService, ToastMessagesService } from '@app/core/services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { TruncDecimalPipe } from '@app/shared/pipes/trunc-decimal.pipe';\nimport { CopySmilesDialogComponent } from '../copy-smiles-dialog/copy-smiles-dialog.component';\n\n@Component({\n selector: 'ibm-tree-graph',\n templateUrl: './tree-graph.component.html',\n styleUrls: ['./tree-graph.component.scss'],\n})\nexport class TreeGraphComponent implements OnInit, OnChanges {\n @Input()\n treeData: Retrosynthesis | Synthesis | ReactionCompletionPrediction;\n @Input()\n sequenceIndex = 0;\n @Input()\n showEdges = true;\n @Input()\n showMoleculesColor = true;\n @Input()\n uiConfig;\n @Input()\n selectedMoleculeId: string = null;\n @Input()\n roborxn = false;\n @Input()\n noLeafButtons = false;\n @Input()\n showBottomBar = false;\n @Input()\n readonly = false;\n @Input()\n annotationsMode = false;\n @Input()\n editMode = false;\n @Input()\n interactive = false;\n\n @Output()\n edgeClicked = new EventEmitter();\n @Output()\n sequenceIndexChange = new EventEmitter<number>();\n @Output()\n interactiveButtonClicked = new EventEmitter<{\n molecule: RetrosynthesisMolecule;\n action: ERetrosynthesisMoleculeAction;\n }>();\n\n // Rappid elements\n graph;\n paper;\n paperScroller;\n treeLayout;\n\n isTreeGraphInitialised = false;\n jointInitialised = false;\n zoomSteps: number[] = [];\n currentZoomIndex = 0;\n initialZoom = 0;\n parsedTreeData;\n defaultUiConfig = {\n fontFamily: '\"ibm-plex-sans\", Helvetica Neue, Arial, sans-serif',\n fontSize: 15,\n fontWeight: 500,\n molecule: {\n height: 250,\n },\n moleculeToolsIcon: {\n fill: '#0f62fe',\n size: 16,\n },\n smilesText: {\n fill: '#000',\n },\n card: {\n width: 250,\n height: 290, // molecule.height + smiles.height\n strokeWidth: 2,\n strokeColor: '#e0e0e0',\n fill: '#FFF',\n },\n labelText: {\n fill: '#FFF',\n },\n toolsBox: {\n height: 40,\n icons: {\n fill: 'white',\n size: 20,\n },\n },\n zoomStep: 100,\n minZoom: 100,\n maxZoom: 400,\n padding: 1,\n expand: {\n paddingTop: 20,\n relativeWidth: 0.9,\n },\n };\n\n constructor(\n private toastMessagesService: ToastMessagesService,\n private elRef: ElementRef,\n private truncDecimalPipe: TruncDecimalPipe,\n private appSessionService: AppSessionService,\n private dialogsService: DialogsService\n ) {}\n\n ngOnInit() {\n this.readonly = this.readonly || (this.treeData as Retrosynthesis).isFinalized;\n this.interactive = this.interactive && !this.roborxn;\n this.uiConfig = Object.assign(this.defaultUiConfig, this.uiConfig);\n for (let index = this.uiConfig.minZoom; index <= this.uiConfig.maxZoom; index += this.uiConfig.zoomStep) {\n this.zoomSteps.push(index);\n }\n }\n\n isTreeEditable() {\n return this.editMode && this.interactive && !this.readonly;\n }\n\n async ngOnChanges(changes: SimpleChanges) {\n try {\n if (changes.treeData) {\n await this.init();\n this.parseTreeData(changes.treeData.currentValue);\n const children = (changes.treeData.currentValue.sequences[0] || { tree: {} }).tree.children || [];\n this.uiConfig.padding = children.length <= 1 ? 30 : this.uiConfig.padding;\n this.showSequenceByIndex(this.sequenceIndex);\n const needsFit = this.interactive || changes.treeData.previousValue == null;\n if (needsFit) {\n this.zoomToFit();\n }\n }\n\n if (changes.sequenceIndex) {\n this.parseTreeData(this.treeData);\n this.showSequenceByIndex(this.sequenceIndex);\n this.zoomToFit();\n }\n\n if (changes.selectedMoleculeId) {\n this.parseTreeData(this.treeData);\n this.showSequenceByIndex(this.sequenceIndex);\n }\n\n if (changes.editMode) {\n this.parseTreeData(this.treeData);\n this.showSequenceByIndex(this.sequenceIndex);\n }\n\n if (changes.annotationsMode) {\n this.parseTreeData(this.treeData);\n this.showSequenceByIndex(this.sequenceIndex);\n }\n } catch (e) {\n console.error(e);\n this.toastMessagesService.show({\n title: 'Error',\n message: 'Graph could not be initialised',\n type: EToastMessageType.ERROR,\n });\n }\n }\n\n private async init(): Promise<any> {\n await this.loadRappidScripts();\n this.initJoint();\n this.initTreeGraph();\n }\n\n private loadRappidScripts(): Promise<any> {\n return Promise.all([\n bitfLoadAsset('assets/rappid/rappid.boundle.min.js', 'js'),\n bitfLoadAsset('assets/rappid/rappid.boundle.min.css', 'css'),\n ]);\n }\n\n private initJoint() {\n if (this.jointInitialised) {\n return;\n }\n joint.dia.Element.define(\n 'ibm.Molecule',\n {},\n {\n markup: [\n { tagName: 'rect', selector: 'card' },\n { tagName: 'image', selector: 'molecule' },\n { tagName: 'rect', selector: 'toolsBox' },\n { tagName: 'image', selector: 'copyIcon' },\n { tagName: 'image', selector: 'editIcon' },\n { tagName: 'image', selector: 'deleteIcon' },\n { tagName: 'text', selector: 'smilesText' },\n { tagName: 'rect', selector: 'belowBox' },\n { tagName: 'text', selector: 'belowBoxText' },\n { tagName: 'text', selector: 'belowBoxTextExpand' },\n { tagName: 'text', selector: 'belowBoxTextCustomExpand' },\n { tagName: 'line', selector: 'belowBoxTextSeparator' },\n { tagName: 'line', selector: 'lineSeparator' },\n { tagName: 'rect', selector: 'numberOfMoleculesBox' },\n { tagName: 'text', selector: 'numberOfMoleculesBoxText' },\n ],\n }\n );\n this.jointInitialised = true;\n }\n\n private initTreeGraph() {\n if (this.isTreeGraphInitialised) {\n this.treeLayout.set('parentGap', this.showEdges ? 180 : 110);\n return;\n }\n\n // GRAPH ---------------------------------\n this.graph = new joint.dia.Graph();\n\n // PAPER ---------------------------------\n this.paper = new joint.dia.Paper({\n model: this.graph,\n interactive: false,\n });\n\n // PAPER SCROLLER ---------------------------------\n this.paperScroller = new joint.ui.PaperScroller({\n paper: this.paper,\n padding: 0,\n baseWidth: 0,\n baseHeight: 0,\n cursor: 'grab',\n // autoResizePaper: true,\n });\n\n this.paperScroller.$el\n // .css({ width: '100%', height: '100%', border: 'solid 4px green' })\n .appendTo('.paper-container');\n\n this.paper.on('blank:pointerdown', this.paperScroller.startPanning);\n\n this.paper.on('element:showAlternativeReactions', (linkView, evt, x, y) => {\n evt.stopPropagation();\n if (this.treeData instanceof Retrosynthesis) {\n const targetElement = linkView.model.getTargetElement();\n const nodeClicked = targetElement.attributes.sequenceNode.parent;\n const newSequence = new RetrosynthesisSequence({\n ...this.treeData.sequences[this.sequenceIndex],\n id: 0,\n label: 'Reaction 0',\n confidence: nodeClicked.confidence,\n tree: {\n ...nodeClicked.cloneMeWithOnlyFirstChild(),\n isEditable: false,\n isExpandable: false,\n },\n });\n\n const newRetroResponse = {\n ...this.treeData,\n sequences: [newSequence],\n };\n\n // Search for siblings to create new sequences\n if (this.treeData.siblings) {\n const newSequences = sequencesFromSiblingsForMolecule({\n siblings: (this.treeData as Retrosynthesis).siblings,\n sequence: this.treeData.sequences[this.sequenceIndex],\n treeNode: nodeClicked,\n });\n\n newRetroResponse.sequences = newRetroResponse.sequences.concat(newSequences);\n }\n this.edgeClicked.emit(newRetroResponse);\n }\n });\n\n this.paper.on('element:expandBox', (linkView, evt) => {\n evt.stopPropagation();\n this.interactiveButtonClicked.emit({\n molecule: linkView.model.attributes.sequenceNode,\n action: ERetrosynthesisMoleculeAction.EXPAND,\n });\n });\n\n this.paper.on('element:expandBoxCustom', (linkView, evt) => {\n evt.stopPropagation();\n this.interactiveButtonClicked.emit({\n molecule: linkView.model.attributes.sequenceNode,\n action: ERetrosynthesisMoleculeAction.CUSTOM_EXPAND,\n });\n });\n\n this.paper.on('element:inspectBox', (linkView, evt) => {\n evt.stopPropagation();\n const toEmit = linkView.model.getTargetElement\n ? linkView.model.getTargetElement().attributes.sequenceNode.parent\n : linkView.model.attributes.sequenceNode;\n this.interactiveButtonClicked.emit(toEmit);\n });\n\n this.paper.on('element:copy', async (linkView, evt) => {\n evt.stopPropagation();\n const smiles = linkView.model.attributes.sequenceNode.smiles;\n if (!this.appSessionService.platformInformation.isIOS) {\n const copied = await copyToClipboard(smiles, this.elRef.nativeElement);\n\n if (copied) {\n this.toastMessagesService.show({\n title: 'Info',\n message: 'Smiles copied to clipboard',\n type: EToastMessageType.SUCCESS,\n });\n } else {\n this.toastMessagesService.show({\n title: 'Error',\n message: `Couldn't copy smiles to clipboard`,\n type: EToastMessageType.ERROR,\n });\n }\n } else {\n this.dialogsService.dialog\n .open(CopySmilesDialogComponent, {\n smiles,\n })\n .afterClosed()\n .subscribe();\n }\n });\n\n this.paper.on('element:editChild', (linkView, evt) => {\n evt.stopPropagation();\n this.interactiveButtonClicked.emit({\n molecule: linkView.model.attributes?.source?.attributes?.sequenceNode,\n action: ERetrosynthesisMoleculeAction.EDIT_CHILDREN,\n });\n });\n\n this.paper.on('element:deleteChild', (linkView, evt) => {\n evt.stopPropagation();\n this.interactiveButtonClicked.emit({\n molecule: linkView.model.attributes?.source?.attributes?.sequenceNode,\n action: ERetrosynthesisMoleculeAction.DELETE_CHILDREN,\n });\n });\n\n this.paper.on('element:addChild', (linkView, evt) => {\n evt.stopPropagation();\n this.interactiveButtonClicked.emit({\n molecule: linkView.model.attributes?.source?.attributes?.sequenceNode,\n action: ERetrosynthesisMoleculeAction.ADD_CHILDREN,\n });\n });\n\n this.paper.on('element:editMolecule', (linkView, evt) => {\n evt.stopPropagation();\n this.interactiveButtonClicked.emit({\n molecule: linkView.model.attributes?.sequenceNode,\n action: ERetrosynthesisMoleculeAction.EDIT_MOLECULE,\n });\n });\n\n this.paper.on('element:deleteMolecule', (linkView, evt) => {\n evt.stopPropagation();\n this.interactiveButtonClicked.emit({\n molecule: linkView.model.attributes?.sequenceNode,\n action: ERetrosynthesisMoleculeAction.DELETE_MOLECULE,\n });\n });\n\n // TREE LAYOUT ---------------------------------\n this.treeLayout = new joint.layout.TreeLayout({\n graph: this.graph,\n direction: 'B',\n parentGap: this.showEdges ? 180 : 110,\n siblingGap: 30,\n });\n\n this.isTreeGraphInitialised = true;\n }\n\n private parseTreeData(treeData: Retrosynthesis | Synthesis | ReactionCompletionPrediction) {\n this.parsedTreeData = treeData.sequences.map(sequence => {\n const membersAndConnections = { members: [], connections: [] };\n this.parseSequence(treeData, sequence.tree, membersAndConnections);\n return membersAndConnections;\n });\n }\n\n private parseSequence(\n treeData,\n sequenceNode,\n membersAndConnections,\n parentNode?,\n addEdge = true,\n siblingRank = 0\n ) {\n const molecule = treeData.molecules.find(\n m =>\n m.id === sequenceNode.moleculeId ||\n m.smiles\n .split('.')\n .sort()\n .join('.') ===\n sequenceNode.smiles\n .split('.')\n .sort()\n .join('.')\n );\n if (!molecule) {\n return;\n }\n // Create node\n const moleculeMember = this.createNode(molecule, sequenceNode, siblingRank);\n membersAndConnections.members.push(moleculeMember);\n\n // Create links\n if (parentNode) {\n membersAndConnections.connections.push(\n this.createLinkBetweenNodes(parentNode, moleculeMember, addEdge)\n );\n }\n if (sequenceNode.children && sequenceNode.children.length) {\n sequenceNode.children.forEach((sequenceNodeChild, i) =>\n this.parseSequence(\n treeData,\n sequenceNodeChild,\n membersAndConnections,\n moleculeMember,\n i === 0,\n siblingRank + 1 + i\n )\n );\n }\n return {};\n }\n\n private showSequenceByIndex(index = 0) {\n if (!this.parsedTreeData[index]) {\n index = 0;\n }\n this.sequenceIndex = index;\n this.sequenceIndexChange.emit(index);\n if (this.parsedTreeData[this.sequenceIndex] && this.parsedTreeData[this.sequenceIndex].connections) {\n // LOAD THE GRAPH CELLS\n this.graph.resetCells(\n this.parsedTreeData[this.sequenceIndex].members.concat(\n this.parsedTreeData[this.sequenceIndex].connections\n )\n );\n } else {\n return;\n }\n\n // RUN TREE LAYOUT ALGORITHM ------------\n this.treeLayout.layout();\n }\n\n private zoomToFit() {\n // PAPER SCROLLER PROPS\n this.paperScroller.zoomToFit({ padding: this.uiConfig.padding });\n this.currentZoomIndex = this.zoomSteps.findIndex(z => z === 100);\n this.initialZoom = this.paperScroller.zoom();\n this.paperScroller.positionContent('top');\n }\n\n private createNode(molecule: RetrosynthesisMolecule, sequenceNode: RetrosynthesisMolecule, siblingRank) {\n const isLeaf = sequenceNode.children && sequenceNode.children.length === 0;\n const belowBoxVisible = !this.noLeafButtons && sequenceNode.isExpandable && !this.readonly && isLeaf;\n\n let buttonProps = {\n title: 'Expand',\n fill: '#0f62fe',\n };\n if (this.roborxn) {\n buttonProps = getStatusBoxProperties(sequenceNode);\n }\n\n const belowBox = belowBoxVisible ? this.createBelowBox(buttonProps, sequenceNode) : undefined;\n const belowBoxText = belowBoxVisible ? this.createBelowBoxText(buttonProps, sequenceNode) : undefined;\n\n const filter = {\n name: 'highlight',\n args: {\n color: 'black',\n width: 2,\n opacity: 0.5,\n blur: 5,\n },\n };\n\n const isSelected = sequenceNode.id === this.selectedMoleculeId;\n const isParentSelected = sequenceNode.parent && sequenceNode.parent.id === this.selectedMoleculeId;\n const useFilter = isSelected || isParentSelected;\n\n const element = new joint.shapes.ibm.Molecule({\n size: {\n width: this.uiConfig.card.width,\n height: this.uiConfig.card.height,\n },\n siblingRank,\n sequenceNode,\n molecule,\n attrs: {\n root: {\n opacity: sequenceNode.status === 'PENDING' ? 0.3 : 1,\n filter: useFilter ? filter : undefined,\n },\n card: {\n fill: this.uiConfig.card.fill,\n stroke:\n (this.showMoleculesColor && sequenceNode.metaData && sequenceNode.metaData.borderColor) ||\n this.uiConfig.card.strokeColor,\n strokeWidth: this.uiConfig.card.strokeWidth,\n width: this.uiConfig.card.width,\n height: this.uiConfig.molecule.height + this.uiConfig.toolsBox.height,\n cursor: 'default',\n pointerEvents: 'visiblePainted',\n },\n molecule: {\n xlinkHref: createInlineSvgImage(molecule.moleculeImage),\n width: this.uiConfig.card.width - this.uiConfig.card.strokeWidth * 2,\n height: this.uiConfig.molecule.height - this.uiConfig.card.strokeWidth * 2,\n x: this.uiConfig.card.strokeWidth,\n y: this.uiConfig.card.strokeWidth,\n title: molecule.smiles,\n cursor: 'copy',\n event: 'element:copy',\n },\n toolsBox: {\n width: this.uiConfig.card.width - this.uiConfig.card.strokeWidth,\n height: this.uiConfig.toolsBox.height,\n fill: sequenceNode.custom ? '#e0e0e0' : '#ffffff',\n x: 1,\n y: this.uiConfig.molecule.height - 1,\n pointerEvents: 'none',\n cursor: 'default',\n event: 'element:toolsBox',\n },\n lineSeparator: {\n x1: 1,\n y1: this.uiConfig.molecule.height,\n x2: this.uiConfig.card.width - 1,\n y2: this.uiConfig.molecule.height,\n stroke: this.uiConfig.card.strokeColor,\n pointerEvents: 'none',\n },\n smilesText: {\n pointerEvents: 'none',\n fill: this.uiConfig.smilesText.fill,\n fontSize: this.uiConfig.fontSize,\n fontWeight: this.uiConfig.fontWeight,\n fontFamily: this.uiConfig.fontFamily,\n textAnchor: 'start',\n textVerticalAnchor: 'middle',\n refY: this.uiConfig.molecule.height + this.uiConfig.toolsBox.height / 2,\n refX: 10,\n textWrap: {\n text: molecule.moleculeName || molecule.smiles,\n ellipsis: true,\n width: -10,\n height: this.uiConfig.toolsBox.height / 2,\n },\n opacity: this.isTreeEditable() ? 0 : 1,\n },\n ...(sequenceNode.count > 1 && {\n numberOfMoleculesBox: {\n width: 32,\n height: 32,\n refX: this.uiConfig.card.width / 2 - 16,\n refY: -16,\n fill: '#0f62fe',\n rx: 16,\n ry: 16,\n title: 'Stoichiometry',\n cursor: 'default',\n },\n }),\n ...(sequenceNode.count > 1 && {\n numberOfMoleculesBoxText: {\n pointerEvents: 'none',\n fill: 'white',\n fontSize: this.uiConfig.fontSize,\n fontWeight: this.uiConfig.fontWeight,\n fontFamily: this.uiConfig.fontFamily,\n textAnchor: 'middle',\n textVerticalAnchor: 'middle',\n refX: this.uiConfig.card.width / 2,\n width: 32,\n height: 32,\n textWrap: {\n text: sequenceNode.count,\n ellipsis: true,\n },\n },\n }),\n ...(sequenceNode.isEditable && {\n editIcon: {\n xlinkHref: createInlineSvgImage(\n `<svg version=\"1.1\" id=\"icon\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 32 32\" style=\"enable-background:new 0 0 32 32;\" xml:space=\"preserve\">\n <rect x=\"2\" y=\"26\" width=\"28\" height=\"2\" fill=\"${this.uiConfig.moleculeToolsIcon.fill}\"/>\n <path d=\"M25.4,9c0.8-0.8,0.8-2,0-2.8c0,0,0,0,0,0l-3.6-3.6c-0.8-0.8-2-0.8-2.8,0c0,0,0,0,0,0l-15,15V24h6.4L25.4,9z M20.4,4L24,7.6\n l-3,3L17.4,7L20.4,4z M6,22v-3.6l10-10l3.6,3.6l-10,10H6z\"\n fill=\"${this.uiConfig.moleculeToolsIcon.fill}\"/>\n </svg>`\n ),\n width: this.uiConfig.moleculeToolsIcon.size,\n height: this.uiConfig.moleculeToolsIcon.size,\n refY:\n this.uiConfig.molecule.height +\n this.uiConfig.toolsBox.height / 2 -\n this.uiConfig.moleculeToolsIcon.size / 2,\n refX: this.uiConfig.card.width / 2 - this.uiConfig.moleculeToolsIcon.size * 3,\n cursor: 'pointer',\n event: 'element:editMolecule',\n title: 'Edit',\n opacity: this.isTreeEditable() ? 1 : 0,\n pointerEvents: this.isTreeEditable() ? 'visiblePainted' : 'none',\n },\n }),\n copyIcon: {\n xlinkHref: createInlineSvgImage(\n `<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"${this.uiConfig.moleculeToolsIcon.fill}\" d=\"M1 10H0V2C0 .9.9 0 2 0h8v1H2c-.6 0-1 .5-1 1v8z\"></path><path fill=\"${this.uiConfig.moleculeToolsIcon.fill}\" d=\"M11 4.2V8h3.8L11 4.2zM15 9h-4c-.6 0-1-.4-1-1V4H4.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h10c.3 0 .5-.2.5-.5V9zm-4-6c.1 0 .3.1.4.1l4.5 4.5c0 .1.1.3.1.4v6.5c0 .8-.7 1.5-1.5 1.5h-10c-.8 0-1.5-.7-1.5-1.5v-10C3 3.7 3.7 3 4.5 3H11z\"></path></svg>`\n ),\n title: 'Copy',\n width: this.uiConfig.moleculeToolsIcon.size,\n height: this.uiConfig.moleculeToolsIcon.size,\n refY:\n this.uiConfig.molecule.height +\n this.uiConfig.toolsBox.height / 2 -\n this.uiConfig.moleculeToolsIcon.size / 2,\n refX: this.uiConfig.card.width / 2 - this.uiConfig.moleculeToolsIcon.size / 2,\n cursor: 'pointer',\n event: 'element:copy',\n opacity: this.isTreeEditable() ? 1 : 0,\n pointerEvents: this.isTreeEditable() ? 'visiblePainted' : 'none',\n },\n ...(sequenceNode.isDeletable && {\n deleteIcon: {\n xlinkHref: createInlineSvgImage(\n `<svg id=\"icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"><rect fill=\"${this.uiConfig.moleculeToolsIcon.fill}\" x=\"12\" y=\"12\" width=\"2\" height=\"12\"/><rect fill=\"${this.uiConfig.moleculeToolsIcon.fill}\" x=\"18\" y=\"12\" width=\"2\" height=\"12\"/><path fill=\"${this.uiConfig.moleculeToolsIcon.fill}\" d=\"M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z\"/><rect fill=\"${this.uiConfig.moleculeToolsIcon.fill}\" x=\"12\" y=\"2\" width=\"8\" height=\"2\"/></svg>`\n ),\n width: this.uiConfig.moleculeToolsIcon.size,\n height: this.uiConfig.moleculeToolsIcon.size,\n refY:\n this.uiConfig.molecule.height +\n this.uiConfig.toolsBox.height / 2 -\n this.uiConfig.moleculeToolsIcon.size / 2,\n refX: this.uiConfig.card.width / 2 + this.uiConfig.moleculeToolsIcon.size * 2,\n cursor: 'pointer',\n event: 'element:deleteMolecule',\n title: 'Delete',\n opacity: this.isTreeEditable() ? 1 : 0,\n pointerEvents: this.isTreeEditable() ? 'visiblePainted' : 'none',\n },\n }),\n // EXPAND\n belowBox,\n ...belowBoxText,\n },\n });\n\n element.set({\n offset: this.showEdges ? -50 : -15,\n });\n\n return element;\n }\n\n private createBelowBox(buttonProps: any, sequenceNode: any) {\n const isCommercial = sequenceNode.isCommercial;\n if (isCommercial) {\n return {\n isCommercial,\n x: (this.uiConfig.card.width * (1 - this.uiConfig.expand.relativeWidth)) / 2,\n y: this.uiConfig.molecule.height + this.uiConfig.toolsBox.height + this.uiConfig.expand.paddingTop,\n cursor: 'default',\n width: this.uiConfig.card.width * this.uiConfig.expand.relativeWidth,\n height: this.uiConfig.toolsBox.height,\n rx: this.uiConfig.toolsBox.height / 2,\n ry: this.uiConfig.toolsBox.height / 2,\n ...buttonProps,\n fill: '#8D8D8D',\n };\n }\n return {\n isCommercial,\n x: (this.uiConfig.card.width * (1 - this.uiConfig.expand.relativeWidth)) / 2,\n y: this.uiConfig.molecule.height + this.uiConfig.toolsBox.height + this.uiConfig.expand.paddingTop,\n cursor: 'default',\n width: this.uiConfig.card.width * this.uiConfig.expand.relativeWidth,\n height: this.uiConfig.toolsBox.height,\n rx: this.uiConfig.toolsBox.height / 2,\n ry: this.uiConfig.toolsBox.height / 2,\n ...buttonProps,\n };\n }\n\n private createBelowBoxText(buttonProps: any, sequenceNode: any) {\n return {\n belowBoxTextExpand: {\n event: 'element:expandBox',\n fill: this.uiConfig.labelText.fill,\n fontSize: this.uiConfig.fontSize,\n fontFamily: this.uiConfig.fontFamily,\n textAnchor: 'middle',\n textVerticalAnchor: 'middle',\n refY:\n this.uiConfig.molecule.height +\n (this.uiConfig.toolsBox.height * 3) / 2 +\n this.uiConfig.expand.paddingTop,\n refX:\n this.uiConfig.card.width / 2 - (this.uiConfig.card.width * this.uiConfig.expand.relativeWidth) / 4,\n text:\n '\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0AI\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0',\n cursor: 'pointer',\n pointerEvents: 'visiblePainted',\n },\n belowBoxTextSeparator: {\n x1: this.uiConfig.card.width / 2,\n y1: this.uiConfig.molecule.height + this.uiConfig.toolsBox.height + this.uiConfig.expand.paddingTop,\n x2: this.uiConfig.card.width / 2,\n y2:\n this.uiConfig.molecule.height +\n this.uiConfig.toolsBox.height +\n this.uiConfig.expand.paddingTop +\n this.uiConfig.toolsBox.height,\n stroke: 'white',\n cursor: 'pointer',\n pointerEvents: 'visiblePainted',\n },\n belowBoxTextCustomExpand: {\n event: 'element:expandBoxCustom',\n fill: this.uiConfig.labelText.fill,\n fontSize: this.uiConfig.fontSize,\n fontFamily: this.uiConfig.fontFamily,\n textAnchor: 'middle',\n textVerticalAnchor: 'middle',\n refY:\n this.uiConfig.molecule.height +\n (this.uiConfig.toolsBox.height * 3) / 2 +\n this.uiConfig.expand.paddingTop,\n refX:\n this.uiConfig.card.width / 2 + (this.uiConfig.card.width * this.uiConfig.expand.relativeWidth) / 4,\n text: '\\u00A0\\u00A0\\u00A0\\u00A0Custom\\u00A0\\u00A0\\u00A0\\u00A0',\n cursor: 'pointer',\n pointerEvents: 'visiblePainted',\n },\n };\n }\n\n private createLinkBetweenNodes(source, target, addEdge) {\n const sequenceNode: RetrosynthesisMolecule = source.get('sequenceNode');\n\n const link = new joint.shapes.standard.Link({\n source,\n target,\n attrs: {\n root: {\n pointerEvents: 'none',\n opacity: sequenceNode.status === 'PENDING' ? 0.3 : 1,\n },\n line: {\n stroke: '#0f62fe',\n sourceMarker: {\n type: 'path',\n d: 'M 20 -10 0 0 20 10 Z',\n },\n targetMarker: {\n type: 'path',\n d: '',\n },\n },\n },\n z: 2,\n isLinkBetweenNodes: true,\n });\n\n if (this.showEdges) {\n link.set('z', 3);\n const markup = [\n {\n tagName: 'rect',\n selector: 'labelBody',\n },\n {\n tagName: 'text',\n selector: 'labelText',\n },\n ];\n\n if (!this.interactive && !this.roborxn && !this.readonly) {\n markup.push({\n tagName: 'image',\n selector: 'viewAlternativeReactionsIcon',\n });\n }\n\n if (this.interactive && !this.roborxn) {\n if (sequenceNode.isChildrenEditable && this.isTreeEditable()) {\n markup.push({\n tagName: 'image',\n selector: 'interactiveEditIcon',\n });\n }\n if (sequenceNode.isChildrenDeletable && this.isTreeEditable()) {\n markup.push({\n tagName: 'image',\n selector: 'interactiveDeleteIcon',\n });\n }\n if (sequenceNode.isChildrenEditable && this.isTreeEditable()) {\n markup.push({\n tagName: 'image',\n selector: 'interactiveAddChildIcon',\n });\n }\n }\n\n if (sequenceNode.isThermal) {\n markup.push({\n tagName: 'rect',\n selector: 'heatBkg',\n });\n markup.push({\n tagName: 'image',\n selector: 'heatIcon',\n });\n }\n\n if (sequenceNode.isPhotochemical) {\n markup.push({\n tagName: 'rect',\n selector: 'lightBkg',\n });\n markup.push({\n tagName: 'image',\n selector: 'lightIcon',\n });\n }\n\n let buttonProps = {\n fill: '#0f62fe',\n event: null,\n title:\n sequenceNode.isConfidenceComputed === false\n ? 'Computing confidence'\n : `${this.truncDecimalPipe.transform(+sequenceNode.confidence, 3)} - ${sequenceNode.rclass}`,\n textStroke: '#ffffff',\n };\n\n if (this.roborxn) {\n if ((this.treeData as Synthesis).isProcedure) {\n if (!this.readonly) {\n buttonProps.title = `INSPECT`;\n markup.push({\n tagName: 'image',\n selector: 'reactionSettingsIcon',\n });\n buttonProps.event = sequenceNode.isInspectable ? `element:inspectBox` : null;\n }\n\n const isInvalid =\n !sequenceNode.isValid ||\n (sequenceNode.actions && sequenceNode.actions.length === 0) ||\n sequenceNode.status === 'SKIPPED';\n\n if (!this.readonly) {\n if (isInvalid) {\n markup.push({\n tagName: 'rect',\n selector: 'actionsWarnBkg',\n });\n markup.push({\n tagName: 'image',\n selector: 'actionsWarn',\n });\n } else {\n buttonProps.fill = '#0f62fe';\n markup.push({\n tagName: 'rect',\n selector: 'actionsValidBkg',\n });\n markup.push({\n tagName: 'image',\n selector: 'actionsValid',\n });\n }\n }\n\n if (!sequenceNode.isParentValid) {\n buttonProps.fill = '#C6C6C6';\n buttonProps.event = null;\n }\n } else {\n if (this.annotationsMode) {\n buttonProps.title = `${sequenceNode.numberOfAnnotations}`;\n buttonProps.event = `element:inspectBox`;\n\n markup.push({\n tagName: 'image',\n selector: 'notesIcon',\n });\n } else {\n buttonProps = getStatusBoxProperties(sequenceNode);\n }\n }\n }\n\n const attrs = {\n labelBody: {\n width: this.uiConfig.card.width,\n height: this.uiConfig.toolsBox.height,\n x: -this.uiConfig.card.width / 2,\n y: -this.uiConfig.toolsBox.height / 2,\n rx: this.uiConfig.toolsBox.height / 2,\n ry: this.uiConfig.toolsBox.height / 2,\n pointerEvents: buttonProps.event && !this.readonly ? 'visiblePainted' : 'none',\n ...buttonProps,\n },\n labelText: {\n ref: 'labelBody',\n pointerEvents: 'none',\n textAnchor: 'middle',\n textVerticalAnchor: 'middle',\n textWrap: {\n text: buttonProps.title,\n ellipsis: true,\n width: this.uiConfig.card.width - 80,\n height: this.uiConfig.toolsBox.height / 2,\n },\n fill: buttonProps.textStroke || this.uiConfig.labelText.fill,\n fontSize: this.uiConfig.fontSize,\n fontFamily: this.uiConfig.fontFamily,\n opacity:\n this.isTreeEditable() && (sequenceNode.isChildrenEditable || sequenceNode.isChildrenDeletable)\n ? 0\n : 1,\n },\n reactionSettingsIcon: {\n xlinkHref: createInlineSvgImage(\n `<svg id=\"icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"><defs><style>.cls-1{fill:none;}</style></defs><title>settings</title><path fill=\"${this.uiConfig.toolsBox.icons.fill}\" d=\"M27,16.76c0-.25,0-.5,0-.76s0-.51,0-.77l1.92-1.68A2,2,0,0,0,29.3,11L26.94,7a2,2,0,0,0-1.73-1,2,2,0,0,0-.64.1l-2.43.82a11.35,11.35,0,0,0-1.31-.75l-.51-2.52a2,2,0,0,0-2-1.61H13.64a2,2,0,0,0-2,1.61l-.51,2.52a11.48,11.48,0,0,0-1.32.75L7.43,6.06A2,2,0,0,0,6.79,6,2,2,0,0,0,5.06,7L2.7,11a2,2,0,0,0,.41,2.51L5,15.24c0,.25,0,.5,0,.76s0,.51,0,.77L3.11,18.45A2,2,0,0,0,2.7,21L5.06,25a2,2,0,0,0,1.73,1,2,2,0,0,0,.64-.1l2.43-.82a11.35,11.35,0,0,0,1.31.75l.51,2.52a2,2,0,0,0,2,1.61h4.72a2,2,0,0,0,2-1.61l.51-2.52a11.48,11.48,0,0,0,1.32-.75l2.42.82a2,2,0,0,0,.64.1,2,2,0,0,0,1.73-1L29.3,21a2,2,0,0,0-.41-2.51ZM25.21,24l-3.43-1.16a8.86,8.86,0,0,1-2.71,1.57L18.36,28H13.64l-.71-3.55a9.36,9.36,0,0,1-2.7-1.57L6.79,24,4.43,20l2.72-2.4a8.9,8.9,0,0,1,0-3.13L4.43,12,6.79,8l3.43,1.16a8.86,8.86,0,0,1,2.71-1.57L13.64,4h4.72l.71,3.55a9.36,9.36,0,0,1,2.7,1.57L25.21,8,27.57,12l-2.72,2.4a8.9,8.9,0,0,1,0,3.13L27.57,20Z\" transform=\"translate(0 0)\"/><path fill=\"${this.uiConfig.toolsBox.icons.fill}\" d=\"M16,22a6,6,0,1,1,6-6A5.94,5.94,0,0,1,16,22Zm0-10a3.91,3.91,0,0,0-4,4,3.91,3.91,0,0,0,4,4,3.91,3.91,0,0,0,4-4A3.91,3.91,0,0,0,16,12Z\" transform=\"translate(0 0)\"/><rect id=\"_Transparent_Rectangle_\" data-name=\"<Transparent Rectangle>\" class=\"cls-1\" width=\"32\" height=\"32\"/></svg>`\n ),\n preserveAspectRatio: 'xMidYMid',\n ref: 'labelBody',\n width: this.uiConfig.toolsBox.icons.size,\n height: this.uiConfig.toolsBox.icons.size,\n refX: this.uiConfig.card.width - this.uiConfig.toolsBox.icons.size - 10,\n refY: this.uiConfig.toolsBox.height / 2 - this.uiConfig.toolsBox.icons.size / 2,\n cursor: 'pointer',\n },\n viewAlternativeReactionsIcon: {\n xlinkHref: createInlineSvgImage(\n `<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" style=\"will-change: transform;\"><path fill=\"${this.uiConfig.toolsBox.icons.fill}\" d=\"M15 14.3L10.7 10c1.9-2.3 1.6-5.8-.7-7.7S4.2.7 2.3 3 .7 8.8 3 10.7c2 1.7 5 1.7 7 0l4.3 4.3.7-.7zM2 6.5C2 4 4 2 6.5 2S11 4 11 6.5 9 11 6.5 11 2 9 2 6.5z\"></path></svg>`\n ),\n preserveAspectRatio: 'xMidYMid',\n pointerEvents: 'visiblePainted',\n cursor: 'pointer',\n ref: 'labelBody',\n width: 24,\n height: 24,\n refDx: -35,\n y: -12,\n refY: '50%',\n event: 'element:showAlternativeReactions',\n },\n actionsWarn: {\n xlinkHref: createInlineSvgImage(\n '<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\" style=\"will-change: transform; fill: #f1c21b\"><path d=\"M16,22a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,22Z\"></path><rect width=\"2\" height=\"9\" x=\"15\" y=\"11\"></rect><path d=\"M29,29H3a1,1,0,0,1-.89-1.46l13-25a1,1,0,0,1,1.78,0l13,25A1,1,0,0,1,29,29ZM4.65,27h22.7L16,5.17Z\"></path></svg>'\n ),\n preserveAspectRatio: 'xMidYMid',\n pointerEvents: 'visiblePainted',\n width: 24,\n height: 24,\n x: 24,\n y: -52,\n title: sequenceNode.status === 'SKIPPED' ? 'Skipped' : 'There are invalid or no actions',\n },\n actionsWarnBkg: {\n width: 32,\n height: 32,\n x: 20,\n y: -56,\n fill: '#FCF4D6',\n rx: 16,\n ry: 16,\n strokeWidth: 2,\n stroke: '#FCF4D6',\n pointerEvents: 'visiblePainted',\n },\n actionsValid: {\n xlinkHref: createInlineSvgImage(\n `<svg id=\"icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" style=\"fill: #42BE65\">\n <defs>\n <style>\n .cls-1 {\n fill: none;\n }\n </style>\n </defs>\n <polygon points=\"14 21.414 9 16.413 10.413 15 14 18.586 21.585 11 23 12.415 14 21.414\"/>\n <path d=\"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z\"/>\n <rect id=\"_Transparent_Rectangle_\" data-name=\"<Transparent Rectangle>\" class=\"cls-1\" width=\"32\" height=\"32\"/>\n </svg>\n `\n ),\n preserveAspectRatio: 'xMidYMid',\n pointerEvents: 'visiblePainted',\n width: 24,\n height: 24,\n x: 24,\n y: -52,\n },\n actionsValidBkg: {\n width: 32,\n height: 32,\n x: 20,\n y: -56,\n fill: '#DEFBE6',\n rx: 16,\n ry: 16,\n strokeWidth: 2,\n stroke: '#DEFBE6',\n pointerEvents: 'visiblePainted',\n },\n interactiveDeleteIcon: {\n xlinkHref: createInlineSvgImage(\n `<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 32 32\" aria-hidden=\"true\" style=\"will-change: transform;\">\n <path fill=\"${this.uiConfig.toolsBox.icons.fill}\" d=\"M12 12h2v12h-2zm6 0h2v12h-2z\" />\n <path fill=\"${this.uiConfig.toolsBox.icons.fill}\" d=\"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20zm4-26h8v2h-8z\"/>\n </svg>`\n ),\n width: this.uiConfig.toolsBox.icons.size,\n height: this.uiConfig.toolsBox.icons.size,\n refX: this.uiConfig.card.width / 2 - this.uiConfig.toolsBox.icons.size * 3,\n refY: this.uiConfig.toolsBox.height / 2 - this.uiConfig.toolsBox.icons.size / 2,\n event: 'element:deleteChild',\n cursor: 'pointer',\n ref: 'labelBody',\n title: 'Delete',\n pointerEvents: 'visiblePainted',\n },\n interactiveEditIcon: {\n xlinkHref: createInlineSvgImage(\n `<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 32 32\" aria-hidden=\"true\" style=\"will-change: transform;\">\n <path fill=\"${this.uiConfig.toolsBox.icons.fill}\" d=\"M2 27h28v2H2zM25.41 9a2 2 0 0 0 0-2.83l-3.58-3.58a2 2 0 0 0-2.83 0l-15 15V24h6.41zm-5-5L24 7.59l-3 3L17.41 7zM6 22v-3.59l10-10L19.59 12l-10 10z\"/>\n </svg>`\n ),\n width: this.uiConfig.toolsBox.icons.size,\n height: this.uiConfig.toolsBox.icons.size,\n refX: this.uiConfig.card.width / 2 - this.uiConfig.toolsBox.icons.size / 2,\n refY: this.uiConfig.toolsBox.height / 2 - this.uiConfig.toolsBox.icons.size / 2,\n event: 'element:editChild',\n cursor: 'pointer',\n ref: 'labelBody',\n title: 'Edit',\n pointerEvents: 'visiblePainted',\n },\n interactiveAddChildIcon: {\n xlinkHref: createInlineSvgImage(\n `<svg id=\"icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\">\n <defs><style>.cls-1{fill:none;}</style></defs>\n <path fill=\"${this.uiConfig.toolsBox.icons.fill}\" d=\"M28,12a2,2,0,0,0,2-2V4a2,2,0,0,0-2-2H4A2,2,0,0,0,2,4v6a2,2,0,0,0,2,2H15v4H9a2,2,0,0,0-2,2v4H4a2,2,0,0,0-2,2v4a2,2,0,0,0,2,2h8a2,2,0,0,0,2-2V24a2,2,0,0,0-2-2H9V18H23v4H20a2,2,0,0,0-2,2v4a2,2,0,0,0,2,2h8a2,2,0,0,0,2-2V24a2,2,0,0,0-2-2H25V18a2,2,0,0,0-2-2H17V12ZM12,28H4V24h8Zm16,0H20V24h8ZM4,4H28v6H4Z\"/>\n <rect id=\"_Transparent_Rectangle_\" data-name=\"<Transparent Rectangle>\" class=\"cls-1\" width=\"32\" height=\"32\"/>\n </svg>`\n ),\n width: this.uiConfig.toolsBox.icons.size,\n height: this.uiConfig.toolsBox.icons.size,\n fill: 'white',\n refX: this.uiConfig.card.width / 2 + this.uiConfig.toolsBox.icons.size * 2,\n refY: this.uiConfig.toolsBox.height / 2 - this.uiConfig.toolsBox.icons.size / 2,\n event: 'element:addChild',\n cursor: 'pointer',\n ref: 'labelBody',\n title: 'Add molecules',\n pointerEvents: 'visiblePainted',\n },\n heatBkg: {\n width: 32,\n height: 32,\n x: -52,\n y: -56,\n fill: '#dcdcdc',\n rx: 16,\n ry: 16,\n strokeWidth: 2,\n stroke: '#dcdcdc',\n pointerEvents: 'visiblePainted',\n },\n heatIcon: {\n xlinkHref: createInlineSvgImage(\n `<svg id=\"icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\">\n <rect x=\"26\" y=\"13\" width=\"4\" height=\"2\"/>\n <rect x=\"23.1214\" y=\"5.879\" width=\"3.9999\" height=\"1.9998\" transform=\"translate(2.4937 19.7783) rotate(-45)\"/>\n <rect x=\"24.1212\" y=\"19.1214\" width=\"1.9998\" height=\"3.9999\" transform=\"translate(-7.5773 23.9496) rotate(-45)\"/>\n <rect x=\"17\" y=\"2\" width=\"2\" height=\"4\"/>\n <path d=\"M18,8a6.0365,6.0365,0,0,0-1,.09v2.0518A3.9567,3.9567,0,0,1,18,10a4,4,0,0,1,0,8v2A6,6,0,0,0,18,8Z\"/>\n <path d=\"M10,20.1839V7H8V20.1839a3,3,0,1,0,2,0Z\"/>\n <path d=\"M9,30A6.9931,6.9931,0,0,1,4,18.1108V7A5,5,0,0,1,14,7V18.1108A6.9931,6.9931,0,0,1,9,30ZM9,4A3.0033,3.0033,0,0,0,6,7V18.9834l-.332.2983a5,5,0,1,0,6.664,0L12,18.9834V7A3.0033,3.0033,0,0,0,9,4Z\"/>\n </svg>\n `\n ),\n preserveAspectRatio: 'xMidYMid',\n pointerEvents: 'visiblePainted',\n ref: 'labelBody',\n width: 20,\n height: 20,\n x: -46,\n y: -50,\n title: 'Reaction requires heat',\n },\n lightBkg: {\n width: 32,\n height: 32,\n x: -52,\n y: -56,\n fill: '#dcdcdc',\n rx: 16,\n ry: 16,\n strokeWidth: 2,\n stroke: '#dcdcdc',\n pointerEvents: 'visiblePainted',\n },\n lightIcon: {\n xlinkHref: createInlineSvgImage(\n // eslint-disable-next-line\n `<svg id=\"icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\">\n <rect x=\"11\" y=\"24\" width=\"10\" height=\"2\" />\n <rect x=\"13\" y=\"28\" width=\"6\" height=\"2\" />\n <path\n d=\"M16,2A10,10,0,0,0,6,12a9.19,9.19,0,0,0,3.46,7.62c1,.93,1.54,1.46,1.54,2.38h2c0-1.84-1.11-2.87-2.19-3.86A7.2,7.2,0,0,1,8,12a8,8,0,0,1,16,0,7.2,7.2,0,0,1-2.82,6.14c-1.07,1-2.18,2-2.18,3.86h2c0-.92.53-1.45,1.54-2.39A9.18,9.18,0,0,0,26,12,10,10,0,0,0,16,2Z\"\n transform=\"translate(0 0)\" />\n </svg>\n `\n ),\n preserveAspectRatio: 'xMidYMid',\n pointerEvents: 'visiblePainted',\n ref: 'labelBody',\n width: 20,\n height: 20,\n x: -46,\n y: -50,\n title: 'Reaction requires light',\n },\n notesIcon: {\n xlinkHref: createInlineSvgImage(\n `<svg version=\"1.1\" id=\"icon\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n width=\"32px\" height=\"32px\" viewBox=\"0 0 32 32\" style=\"enable-background:new 0 0 32 32; fill: ${this.uiConfig.toolsBox.icons.fill};\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:none;}\n </style>\n <title>document</title>\n <path d=\"M25.7,9.3l-7-7C18.5,2.1,18.3,2,18,2H8C6.9,2,6,2.9,6,4v24c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V10C26,9.7,25.9,9.5,25.7,9.3\n z M18,4.4l5.6,5.6H18V4.4z M24,28H8V4h8v6c0,1.1,0.9,2,2,2h6V28z\"/>\n <rect x=\"10\" y=\"22\" width=\"12\" height=\"2\"/>\n <rect x=\"10\" y=\"16\" width=\"12\" height=\"2\"/>\n <rect class=\"st0\" width=\"32\" height=\"32\"/>\n </svg>\n `\n ),\n preserveAspectRatio: 'xMidYMid',\n pointerEvents: 'none',\n ref: 'labelBody',\n width: this.uiConfig.toolsBox.icons.size,\n height: this.uiConfig.toolsBox.icons.size,\n refX: this.uiConfig.card.width / 2 + 10,\n refY: this.uiConfig.toolsBox.height / 2 - this.uiConfig.toolsBox.icons.size / 2,\n },\n };\n\n const position = {\n distance: 60,\n offset: {\n x: 0,\n y: 0,\n },\n };\n\n link.label(0, {\n markup,\n attrs,\n position,\n });\n }\n return link;\n }\n\n setZoom(zoomValue: number) {\n this.currentZoomIndex = this.zoomSteps.findIndex(z => z === zoomValue);\n const newZoomValue = (this.initialZoom / 100) * zoomValue;\n this.paperScroller.zoom(newZoomValue, { absolute: true });\n this.paperScroller.positionContent('top');\n }\n}\n\nfunction createInlineSvgImage(svg: string) {\n return 'data:image/svg+xml;base64,' + btoa(svg);\n}\n","<div class=\"tree-legend\">\n <div class=\"tree-legend__content p-5\"\n *ngIf=\"isOpened && legend\">\n <ng-container *ngFor=\"let legendEntry of legend;\">\n <div class=\"d-flex align-items-center tree-legend__container\">\n <div class=\"tree-legend__container__color mr-3\"\n [ngStyle]=\"{ 'background-color': legendEntry.color }\">\n </div>\n <div class=\"tree-legend__container__label small--xs\"\n [title]=\"legendEntry.label\">{{ legendEntry.label }}</div>\n </div>\n </ng-container>\n </div>\n\n <div (click)=\"isOpened = !isOpened\"\n class=\"cursor-pointer tree-legend__button d-flex justify-content-between w-100 align-items-center px-5 py-4\">\n <strong>Legend</strong>\n <svg icon\n *ngIf=\"!isOpened\"\n ibmIconChevronUp\n size=\"20\"></svg>\n <svg icon\n *ngIf=\"isOpened\"\n ibmIconChevronDown\n size=\"20\"></svg>\n </div>\n</div>","import { Component, OnInit, Input } from '@angular/core';\nimport { ITreeLegendItem } from '@models';\n\n@Component({\n selector: 'ibm-tree-legend',\n templateUrl: './tree-legend.component.html',\n styleUrls: ['./tree-legend.component.scss'],\n})\nexport class TreeLegendComponent implements OnInit {\n @Input()\n legend: Array<ITreeLegendItem>;\n isOpened = false;\n\n constructor() {}\n\n ngOnInit() {}\n}\n","<button *ngIf=\"canUnsubscribe\"\n ibmButton=\"danger--tertiary\"\n (click)=\"onDeleteSubscription()\">\n Unsubscribe from RXN for Chemistry\n</button>","import { DatePipe } from '@angular/common';\nimport { Component, OnInit } from '@angular/core';\nimport {\n EPlanType,\n Plan,\n Subscription,\n ESubscriptionStatus,\n ESocketNotificationSubTopic,\n} from '@app/core/models';\nimport { ApiService, DialogsService } from '@app/core/services';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IOkCancelDialogData } from '@app/core/services/dialog/dialog.interface';\nimport { OkCancelDialogComponent } from '@app/shared/components/ok-cancel-dialog/ok-cancel-dialog.component';\nimport { ListItem } from 'carbon-components-angular';\nimport { map, switchMap, filter, tap, take } from 'rxjs/operators';\nimport { SocketNotificationService } from '@app/core/services/socket-notification.service';\nimport { AuthService } from '@app/libs/bitforce/services';\n\n@Component({\n selector: 'ibm-unsubscribe-button',\n templateUrl: './unsubscribe-button.component.html',\n styleUrls: ['./unsubscribe-button.component.scss'],\n})\nexport class UnsubscribeButtonComponent implements OnInit {\n subscription: Subscription;\n\n constructor(\n private apiService: ApiService,\n private dialogsService: DialogsService,\n private datePipe: DatePipe,\n private socketNotificationService: SocketNotificationService,\n private authService: AuthService\n ) {}\n\n ngOnInit() {\n this.fetchSubscription().subscribe();\n }\n\n private fetchSubscription() {\n return this.apiService.subscriptions\n .currentSubscription()\n .pipe(map(data => data.content))\n .pipe(\n tap(subscription => {\n this.subscription = subscription;\n\n if (subscription.subscriptionInProgress) {\n this.subscribeToNotifications();\n }\n })\n );\n }\n\n onDeleteSubscription() {\n this.dialogsService.dialog\n .open(OkCancelDialogComponent, {\n title: `Downgrade your plan`,\n message: `Are you sure you want to downgrade your <strong>${\n this.subscription?.plan?.name\n }</strong> plan to the <strong>Free</strong> plan? <br/><br/> You will continue to have access to the <strong>${\n this.subscription?.plan?.name\n }</strong> plan's features and rates until the end of your current cycle on ${this.datePipe.transform(\n this.subscription.endTermDate,\n 'yyyy-MM-dd'\n )}.`,\n okText: 'Continue',\n cancelText: 'Cancel',\n okButtonType: 'danger',\n useConfirmDropdown: true,\n confirmDropdownLabel: 'Please Confirm',\n confirmDropdownOptions: [{ content: 'I want to downgrade to the Free plan' } as ListItem],\n } as IOkCancelDialogData)\n .afterClosed()\n .pipe(\n filter(closeEvent => closeEvent.status === EDialogCloseEventStatus.OK),\n switchMap(() => this.apiService.subscriptions.deleteCurrentSubscription()),\n switchMap(() => this.fetchSubscription())\n )\n .subscribe();\n }\n\n private subscribeToNotifications() {\n this.socketNotificationService.notifications$\n .pipe(\n filter(notification =>\n [\n ESocketNotificationSubTopic.SUBSCRIPTION_COMPLETED,\n ESocketNotificationSubTopic.SUBSCRIPTION_ERROR,\n ].includes(notification.subTopic)\n ),\n take(1),\n switchMap(() => this.fetchSubscription())\n )\n .subscribe();\n }\n\n get canUnsubscribe(): boolean {\n return (\n this.subscription?.status === ESubscriptionStatus.ACTIVE &&\n !this.subscription.subscriptionInProgress &&\n (this.authService.user?.isTeamOwner ||\n (this.subscription?.plan?.planType !== EPlanType.FREE && !this.authService.user?.isTeamMember))\n );\n }\n}\n","<ibm-notification [notificationObj]=\"{\n type: 'error',\n showClose: false,\n lowContrast: true,\n template: paymentErrorNotification\n}\"\n *ngIf=\"authService?.user?.planDemoted\">\n</ibm-notification>\n\n<ng-template #paymentErrorNotification>\n <h4 class=\"pt-0 mt-0\">Payment unsuccessful</h4>\n <p>We were unable to charge your credit card. Please update your billing information to continue\n using the full version of RXN for Chemistry.</p>\n <button ibmButton=\"tertiary\"\n size='sm'\n class=\"mt-6\"\n (click)=\"onRetryPayment()\">Update payment information</button>\n</ng-template>","import { Component } from '@angular/core';\nimport { ApiService, DialogsService } from '@app/core/services';\nimport { AuthService } from '@app/libs/bitforce/services';\nimport { PaymentMethodDialogComponent } from '../payment-method-dialog/payment-method-dialog.component';\nimport { SubscriptionCost, User } from '@app/core/models';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { LoaderService } from '@app/libs/bitforce/components';\nimport { finalize } from 'rxjs/operators';\n\n@Component({\n selector: 'ibm-unsuccessful-payment-notification',\n templateUrl: './unsuccessful-payment-notification.component.html',\n styleUrls: ['./unsuccessful-payment-notification.component.scss'],\n})\nexport class UnsuccessfulPaymentNotificationComponent {\n constructor(\n private dialogsService: DialogsService,\n public authService: AuthService,\n private apiService: ApiService,\n private loaderService: LoaderService\n ) {}\n\n onRetryPayment() {\n this.dialogsService.dialog\n .open(PaymentMethodDialogComponent, {\n isRetry: true,\n })\n .afterClosed()\n .subscribe(response => {\n if (response.status === EDialogCloseEventStatus.OK) {\n this.loaderService.show();\n this.apiService.users\n .getById<User>({\n id: this.apiService.auth.userId,\n })\n .pipe(finalize(() => this.loaderService.hide()))\n .subscribe(userResponse => {\n this.apiService.auth.user = userResponse.content;\n });\n }\n });\n }\n}\n","<button ibmButton\n *ngIf=\"authService?.user.canUpgradePlan\"\n [routerLink]=\"['/', 'subscription', 'plans']\"\n class=\"max-width-none my-3\"\n [type]=\"'primary'\">\n <strong class=\"p-3\">Get unlimited access to RXN for Chemistry</strong>\n</button>","import { Component, Input } from '@angular/core';\nimport { AuthService } from '@app/libs/bitforce/services';\n\n@Component({\n selector: 'ibm-upgrade-plan-button',\n templateUrl: './upgrade-plan-button.component.html',\n styleUrls: ['./upgrade-plan-button.component.scss'],\n})\nexport class UpgradePlanButtonComponent {\n constructor(public authService: AuthService) {}\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'ibm-user-account-menu',\n templateUrl: './user-account-menu.component.html',\n styleUrls: ['./user-account-menu.component.scss'],\n})\nexport class UserAccountMenuComponent implements OnInit {\n constructor() {}\n\n ngOnInit(): void {}\n}\n","<ibm-header-action title=\"action\"\n routerLink=\"/\">\n <svg ibmIconHome\n size=\"20\"></svg>\n</ibm-header-action>","<ng-template #customTrigger>\n <svg ibmIconUserAvatarFilledAlt\n size=\"20\"></svg>\n</ng-template>\n<ibm-overflow-menu [placement]=\"'bottom'\"\n [customTrigger]=\"customTrigger\"\n [flip]=\"true\"\n [offset]=\"{ x: 3, y: 0 }\">\n <ibm-overflow-menu-option [routerLink]=\"['/', 'account']\">Account</ibm-overflow-menu-option>\n <!-- <ibm-overflow-menu-option *ngIf=\"!apiService.auth?.user?.hasFreePlan\"\n [routerLink]=\"['/', 'account', 'billing']\">Billing\n </ibm-overflow-menu-option> -->\n <!-- <ibm-overflow-menu-option [routerLink]=\"['/', 'account', 'profile']\">Profile\n </ibm-overflow-menu-option> -->\n <ibm-overflow-menu-option [routerLink]=\"['/', 'admin']\"\n *ngIf=\"apiService.auth?.user?.isAdmin && !appSessionService.isAdminArea\">Admin\n </ibm-overflow-menu-option>\n <ibm-overflow-menu-option [routerLink]=\"['/']\"\n *ngIf=\"apiService.auth?.user?.isAdmin && appSessionService.isAdminArea\">Back to app\n </ibm-overflow-menu-option>\n <ibm-overflow-menu-option [routerLink]=\"['/', 'logout']\">Logout</ibm-overflow-menu-option>\n</ibm-overflow-menu>","import { Component, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { ApiService, AppSessionService } from '@services';\nimport { environment } from '@env/environment';\n\n@Component({\n selector: 'ibm-user-overflow-menu',\n templateUrl: './user-overflow-menu.component.html',\n styleUrls: ['./user-overflow-menu.component.scss'],\n})\nexport class UserOverflowMenuComponent implements OnInit {\n userMenuOpened = false;\n\n constructor(public apiService: ApiService, public appSessionService: AppSessionService) {}\n\n ngOnInit(): void {}\n\n onToggleUserMenu() {\n this.userMenuOpened = !this.userMenuOpened;\n }\n}\n","<div class=\"zoom-container d-flex align-items-center\"\n [ngClass]=\"theme\">\n <button ibmButton=\"ghost\"\n [iconOnly]=\"true\"\n class=\"zoom-container__zoom-in\"\n (click)=\"onZoomIn()\">\n <svg icon\n ibmIconZoomIn\n size=\"16\"></svg>\n </button>\n <ibm-dropdown *ngIf=\"showZoomSelector && !appSessionService.activeBreakpoints.isTablet\"\n itemValueKey=\"value\"\n [ngModel]=\"currentZoom.value\"\n (selected)=\"onZoomSelected($event)\"\n [ngClass]=\"theme\">\n <ibm-dropdown-list [items]=\"zoomOptions\"></ibm-dropdown-list>\n </ibm-dropdown>\n <button *ngIf=\"showFitToScreen\"\n ibmButton=\"ghost\"\n [iconOnly]=\"true\"\n (click)=\"onFitToScreen()\"><svg icon\n ibmIconFitToScreen\n size=\"16\"></svg>\n </button>\n <button ibmButton=\"ghost\"\n class=\"zoom-container__zoom-out\"\n [iconOnly]=\"true\"\n (click)=\"onZoomOut()\"><svg icon\n ibmIconZoomOut\n size=\"16\"></svg>\n </button>\n</div>","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { AppSessionService } from '@app/core/services';\nimport { ListItem } from 'carbon-components-angular';\n\n@Component({\n selector: 'ibm-zoom',\n templateUrl: './zoom.component.html',\n styleUrls: ['./zoom.component.scss'],\n})\nexport class ZoomComponent implements OnInit {\n @Input()\n theme = 'light';\n @Input()\n defaultZoomValue = 100;\n @Input()\n showZoomSelector = true;\n @Input()\n showFitToScreen = false;\n @Input()\n zoomValues = [50, 75, 100, 200, 300, 400];\n @Input()\n currentZoomIndex;\n\n @Output()\n zoomSelected: EventEmitter<number> = new EventEmitter<number>();\n @Output()\n fitToScreen: EventEmitter<void> = new EventEmitter<void>();\n\n public zoomOptions: ListItem[] = [];\n\n constructor(public appSessionService: AppSessionService) {}\n\n ngOnInit() {\n this.zoomOptions = this.zoomValues.map((val, index) => ({\n content: val + '%',\n value: val,\n selected: index === this.defaultZoomIndex,\n }));\n\n if (!this.currentZoomIndex) {\n this.currentZoomIndex = this.defaultZoomIndex;\n }\n }\n\n get defaultZoomIndex() {\n return Math.max(this.zoomValues.indexOf(this.defaultZoomValue), 0);\n }\n\n get currentZoom() {\n return this.zoomOptions[this.currentZoomIndex];\n }\n\n resetToDefault() {\n this.currentZoomIndex = this.defaultZoomIndex;\n }\n\n onZoomIn() {\n this.currentZoomIndex = Math.min(this.currentZoomIndex + 1, this.zoomOptions.length - 1);\n this.emitZoomValue();\n }\n\n onZoomOut() {\n this.currentZoomIndex = Math.max(this.currentZoomIndex - 1, 0);\n this.emitZoomValue();\n }\n\n onZoomSelected({ item }: { item: ListItem }) {\n this.currentZoomIndex = this.zoomOptions.findIndex(option => option.value === item.value);\n this.emitZoomValue();\n }\n\n onFitToScreen() {\n this.resetToDefault();\n this.fitToScreen.emit();\n }\n\n private emitZoomValue() {\n this.zoomSelected.emit(this.currentZoom.value);\n }\n}\n","import { Directive, ElementRef, Input, OnChanges, SimpleChanges, Renderer2 } from '@angular/core';\n\n@Directive({\n selector: 'img[ibmAvatar]',\n})\nexport class AvatarDirective implements OnChanges {\n @Input()\n ibmAvatar: string;\n constructor(private elementRef: ElementRef) {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.ibmAvatar.currentValue) {\n this.elementRef.nativeElement.src = changes.ibmAvatar.currentValue;\n } else {\n this.elementRef.nativeElement.src = 'assets/img/avatars/default-avatar.svg';\n }\n }\n}\n\n@Directive({\n selector: '[ibmBackgroundAvatar]',\n})\nexport class BackgroundAvatarDirective implements OnChanges {\n @Input()\n ibmBackgroundAvatar: string;\n constructor(private elementRef: ElementRef, private renderer: Renderer2) {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.ibmBackgroundAvatar.currentValue) {\n this.renderer.setStyle(\n this.elementRef.nativeElement,\n 'backgroundImage',\n `url(${changes.ibmBackgroundAvatar.currentValue})`\n );\n } else {\n this.renderer.setStyle(\n this.elementRef.nativeElement,\n 'backgroundImage',\n 'url(assets/img/avatars/default-avatar.svg)'\n );\n }\n }\n}\n","import {\n Directive,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n PLATFORM_ID,\n SimpleChanges,\n NgZone,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\n@Directive({ selector: '[ibmClickOutside]' })\nexport class ClickOutsideDirective implements OnInit, OnChanges, OnDestroy {\n @Input() clickOutsideEnabled = true;\n\n @Input() attachOutsideOnClick = false;\n @Input() delayClickOutsideInit = false;\n @Input() emitOnBlur = false;\n\n @Input() exclude = '';\n @Input() excludeBeforeClick = false;\n\n @Input() clickOutsideEvents = '';\n\n @Output() ibmClickOutside: EventEmitter<Event> = new EventEmitter<Event>();\n\n private _nodesExcluded: Array<HTMLElement> = [];\n private _events: Array<string> = ['click'];\n\n constructor(\n private _el: ElementRef,\n private _ngZone: NgZone,\n @Inject(PLATFORM_ID) private platformId: object\n ) {\n this._initOnClickBody = this._initOnClickBody.bind(this);\n this._onClickBody = this._onClickBody.bind(this);\n this._onWindowBlur = this._onWindowBlur.bind(this);\n }\n\n ngOnInit() {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n\n this._init();\n }\n\n ngOnDestroy() {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n\n this._removeClickOutsideListener();\n this._removeAttachOutsideOnClickListener();\n this._removeWindowBlurListener();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n\n if (changes['attachOutsideOnClick'] || changes['exclude'] || changes['emitOnBlur']) {\n this._init();\n }\n }\n\n private _init() {\n if (this.clickOutsideEvents !== '') {\n this._events = this.clickOutsideEvents.split(',').map(e => e.trim());\n }\n\n this._excludeCheck();\n\n if (this.attachOutsideOnClick) {\n this._initAttachOutsideOnClickListener();\n } else {\n this._initOnClickBody();\n }\n\n if (this.emitOnBlur) {\n this._initWindowBlurListener();\n }\n }\n\n private _initOnClickBody() {\n if (this.delayClickOutsideInit) {\n setTimeout(this._initClickOutsideListener.bind(this));\n } else {\n this._initClickOutsideListener();\n }\n }\n\n private _excludeCheck() {\n if (this.exclude) {\n try {\n const nodes = Array.from(document.querySelectorAll(this.exclude)) as Array<HTMLElement>;\n if (nodes) {\n this._nodesExcluded = nodes;\n }\n } catch (err) {\n console.error('[ng-click-outside] Check your exclude selector syntax.', err);\n }\n }\n }\n\n private _onClickBody(ev: Event) {\n if (!this.clickOutsideEnabled) {\n return;\n }\n\n if (this.excludeBeforeClick) {\n this._excludeCheck();\n }\n\n if (!this._el.nativeElement.contains(ev.target) && !this._shouldExclude(ev.target)) {\n this._emit(ev);\n\n if (this.attachOutsideOnClick) {\n this._removeClickOutsideListener();\n }\n }\n }\n\n /**\n * Resolves problem with outside click on iframe\n *\n * @see https://github.com/arkon/ng-click-outside/issues/32\n */\n private _onWindowBlur(ev: Event) {\n setTimeout(() => {\n if (!document.hidden) {\n this._emit(ev);\n }\n });\n }\n\n private _emit(ev: Event) {\n if (!this.clickOutsideEnabled) {\n return;\n }\n\n this._ngZone.run(() => this.ibmClickOutside.emit(ev));\n }\n\n private _shouldExclude(target): boolean {\n for (const excludedNode of this._nodesExcluded) {\n if (excludedNode.contains(target)) {\n return true;\n }\n }\n\n return false;\n }\n\n private _initClickOutsideListener() {\n this._ngZone.runOutsideAngular(() => {\n this._events.forEach(e => document.body.addEventListener(e, this._onClickBody));\n });\n }\n\n private _removeClickOutsideListener() {\n this._ngZone.runOutsideAngular(() => {\n this._events.forEach(e => document.body.removeEventListener(e, this._onClickBody));\n });\n }\n\n private _initAttachOutsideOnClickListener() {\n this._ngZone.runOutsideAngular(() => {\n this._events.forEach(e => this._el.nativeElement.addEventListener(e, this._initOnClickBody));\n });\n }\n\n private _removeAttachOutsideOnClickListener() {\n this._ngZone.runOutsideAngular(() => {\n this._events.forEach(e => this._el.nativeElement.removeEventListener(e, this._initOnClickBody));\n });\n }\n\n private _initWindowBlurListener() {\n this._ngZone.runOutsideAngular(() => {\n window.addEventListener('blur', this._onWindowBlur);\n });\n }\n\n private _removeWindowBlurListener() {\n this._ngZone.runOutsideAngular(() => {\n window.removeEventListener('blur', this._onWindowBlur);\n });\n }\n}\n","import {\n Directive,\n EventEmitter,\n Input,\n Output,\n OnInit,\n HostListener,\n Inject,\n ElementRef,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n@Directive({\n selector: '[ibmClipboard]',\n})\nexport class ClipboardDirective implements OnInit {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('ibmClipboard')\n value: string = null;\n\n @Output()\n copyEvent: EventEmitter<string> = new EventEmitter<string>();\n @Output()\n errorEvent: EventEmitter<Error> = new EventEmitter<Error>();\n\n @HostListener('click')\n copyToClipboard() {\n const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n if (isSafari && navigator.clipboard) {\n navigator.clipboard\n .write([\n // @ts-ignore\n new ClipboardItem({\n 'text/plain': new Promise((resolve, reject) =>\n resolve(new Blob([this.value], { type: 'text/plain' }))\n ),\n }),\n ])\n .catch(() => {\n this.errorEvent.emit(new Error('The content could not be copied'));\n })\n .then(() => {\n this.copyEvent.emit();\n });\n } else {\n let input: HTMLInputElement = null;\n\n try {\n input = this.dom.createElement('input');\n input.setAttribute('value', this.value);\n input.style.position = 'absolute';\n input.style.top = '-10000px';\n this.trigger.nativeElement.parentElement.appendChild(input);\n input.select();\n this.dom.execCommand('copy');\n setTimeout(() => this.copyEvent.emit());\n } catch (error) {\n this.errorEvent.emit(new Error('The content could not be copied'));\n } finally {\n this.trigger.nativeElement.parentElement.removeChild(input);\n }\n }\n }\n\n constructor(@Inject(DOCUMENT) private dom: Document, private trigger: ElementRef) {}\n\n ngOnInit() {}\n}\n","import {\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport interact from 'interactjs';\n\n@Directive({\n selector: '[ibmDraggableResizable]',\n})\nexport class DraggableResizableDirective implements OnInit, OnChanges {\n @Input()\n mutableElement: IMutableElement;\n @Input()\n interactive = true;\n @Output()\n updateElement = new EventEmitter<IMutableElement>();\n @Output()\n clickElement = new EventEmitter();\n\n constructor(private element: ElementRef) {}\n\n @HostListener('click', ['$event'])\n public onClick(event: any): void {\n this.clickElement.emit();\n }\n\n async ngOnInit() {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.interactive) {\n if (changes.interactive.currentValue) {\n this.makeInteractive();\n } else {\n interact(this.element.nativeElement).unset();\n }\n }\n }\n\n private makeInteractive() {\n interact(this.element.nativeElement)\n .draggable({\n listeners: {\n move: event => {\n this.updateElement.emit({\n id: this.mutableElement?.id,\n xTopLeft: this.mutableElement?.xTopLeft + event.dx,\n xBottomRight: this.mutableElement?.xBottomRight + event.dx,\n yTopLeft: this.mutableElement?.yTopLeft + event.dy,\n yBottomRight: this.mutableElement?.yBottomRight + event.dy,\n });\n },\n },\n autoScroll: true,\n inertia: true,\n modifiers: [\n interact.modifiers.restrictRect({\n restriction: 'parent',\n endOnly: true,\n }),\n ],\n })\n .resizable({\n // resize from all edges and corners\n edges: { left: true, right: true, bottom: true, top: true },\n margin: 5,\n listeners: {\n move: event => {\n this.updateElement.emit({\n id: this.mutableElement.id,\n xTopLeft: this.mutableElement?.xTopLeft + event.deltaRect.left,\n xBottomRight: this.mutableElement?.xBottomRight + event.deltaRect.right,\n yTopLeft: this.mutableElement?.yTopLeft + event.deltaRect.top,\n yBottomRight: this.mutableElement?.yBottomRight + event.deltaRect.bottom,\n });\n },\n },\n modifiers: [\n // keep the edges inside the parent\n interact.modifiers.restrictEdges({\n outer: 'parent',\n }),\n\n // minimum size\n interact.modifiers.restrictSize({\n min: { width: 20, height: 20 },\n }),\n ],\n inertia: true,\n });\n }\n}\n\nexport interface IMutableElement {\n id: string;\n xTopLeft: number;\n yTopLeft: number;\n xBottomRight: number;\n yBottomRight: number;\n}\n","import { DOCUMENT } from '@angular/common';\nimport { Directive, Input, OnInit, HostListener, ElementRef, Inject } from '@angular/core';\nimport { environment } from '@env/environment';\n\n@Directive({\n selector: '[ibmHeapTrack]',\n})\nexport class HeapDirective implements OnInit {\n @Input('ibmHeapTrack') value: string = null;\n\n @HostListener('click')\n sendTrackToHeap() {\n if (environment.heap.enabled) {\n window.heap.track(this.value);\n }\n }\n\n constructor(@Inject(DOCUMENT) private dom: Document, private trigger: ElementRef) {}\n\n ngOnInit() {}\n}\n","export enum EActivityType {\n PREDICTION = 'PREDICTION',\n RETROSYNTHESIS = 'RETROSYNTHESIS',\n SYNTHESIS_EXECUTION = 'SYNTHESIS_EXECUTION',\n REACTION_COMPLETION_PREDICTION = 'REACTION_COMPLETION_PREDICTION',\n}\n\nexport enum EActivityStatus {\n RUNNING = 'RUNNING',\n PENDING = 'PENDING',\n WAITING = 'WAITING',\n PROCESSING = 'PROCESSING',\n RETROSYNTHESIS_READY = 'RETROSYNTHESIS_READY',\n PREDICTION_READY = 'PREDICTION_READY',\n REACTION_COMPLETION_READY = 'REACTION_COMPLETION_READY',\n}\n","export enum EAiModelType {\n RETROSYNTHESIS = 'retrosynthesis',\n REACTION = 'reaction',\n SYNTHESIS = 'smiles2actions',\n REACTION_COMPLETION = 'reactioncompletion',\n}\n","export enum EFeedback {\n LIKE = 'CORRECT',\n DISLIKE = 'INCORRECT',\n}\n","export enum EFilterType {\n DATE = 'DATE',\n MOLECULES = 'MOLECULES',\n CONFIDENCE = 'CONFIDENCE',\n STATUS = 'STATUS',\n FAVORITE = 'FAVORITE',\n STEPS = 'STEPS',\n CREATED_BY = 'CREATED_BY',\n CREATOR_FULL_NAME = 'CREATOR_FULL_NAME',\n AI_MODEL = 'AI_MODEL',\n RETROSYNTHESIS_TYPOLOGY = 'RETROSYNTHESIS_TYPOLOGY',\n SYNTHESIS_SOURCE_TYPOLOGY = 'SYNTHESIS_SOURCE_TYPOLOGY',\n SYNTHESIS_PROCEDURE = 'SYNTHESIS_PROCEDURE',\n RETROSYNTHESIS_SOURCE = 'RETROSYNTHESIS_SOURCE',\n TRAINING_MODEL_TYPE = 'TRAINING_MODEL_TYPE',\n}\n","export enum EPredictionType {\n FLOAT = 'float',\n ATOM_MAPPING = 'atom_mapping',\n}\n\nexport enum EPredictionLibrary {\n CDK = 'CDK',\n RDKIT = 'RDKIT',\n INDIGO = 'INDIGO',\n}\n\nexport enum EReactionPropertyPredictionWizardStep {\n ADD_REACTIONS = 0,\n PREDICTION_RESULTS = 1,\n}\n","export enum EIngredientType {\n HANDMADE_SOLUTION = 'handmade_solution',\n PURE_COMPOUND = 'pure_compound',\n STANDARD_SOLUTION = 'standard_solution',\n}\n\nexport enum EIngredientPhase {\n SOLID = 'solid',\n LIQUID = 'liquid',\n GAS = 'gas',\n}\n\nexport enum EAddIngredientWizardStep {\n INFO = 0,\n COMPOSITION = 1,\n}\n","export enum ETableList {\n PROJECTS_LIST = 'PROJECTS_LIST',\n REACTIONS_LIST = 'REACTIONS_LIST',\n REACTIONS_COMPLETION_LIST = 'REACTIONS_COMPLETION_LIST',\n RETROSYNTHESIS_LIST = 'RETROSYNTHESIS_LIST',\n SYNTHESIS_PROCEDURE_LIST = 'SYNTHESIS_PROCEDURE_LIST',\n SYNTHESIS_EXECUTION_LIST = 'SYNTHESIS_EXECUTION_LIST',\n TRAINING_MODELS_LIST = 'TRAINING_MODELS_LIST',\n TRAINING_MODELS_ADMIN_LIST = 'TRAINING_MODELS_ADMIN_LIST',\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport * as errorMessages from './validation-message/validation-messages.json';\n\n@Pipe({\n name: 'formValidationMessage',\n})\nexport class FormValidationMessagePipe implements PipeTransform {\n transform(errors): any {\n if (!errors) {\n return '';\n }\n // NOTE: Used for default Angular errors\n return Object.keys(errors)\n .map(key => errors[key]?.message || errorMessages[key] || 'Incorrect value')\n .join(', ');\n }\n}\n","export class FormConstants {\n // eslint-disable-next-line max-len\n static readonly passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\\$%\\^&\\*])(?=.{8,100})/;\n}\n","<div class=\"ibm--validation-error\" *ngIf=\"attachedTo?.invalid && ((!validateOnSubmitOnly && attachedTo.touched) || formSubmitted)\">\n <ng-container *ngFor=\"let error of errors\">\n {{error}}\n <br />\n </ng-container>\n</div>","import { Component, OnInit, Input, ElementRef } from '@angular/core';\nimport { UntypedFormControl, ControlContainer, FormGroupDirective } from '@angular/forms';\nimport * as errorMessages from './validation-messages.json';\n\n@Component({\n selector: 'ibm-validation-message',\n templateUrl: './validation-message.component.html',\n styleUrls: ['./validation-message.component.scss'],\n})\nexport class ValidationMessageComponent implements OnInit {\n @Input()\n attachedTo: UntypedFormControl;\n @Input()\n validateOnSubmitOnly = false;\n @Input()\n inputElement: HTMLElement = null;\n\n constructor(private elementRef: ElementRef, public controlContainer: ControlContainer) {\n elementRef.nativeElement.className += ' invalid-feedback';\n }\n\n get errors(): any[] {\n if (!this.attachedTo || !this.attachedTo.errors) {\n this.inputElement.removeAttribute('data-invalid');\n return [];\n }\n\n const errors = [];\n for (const error in this.attachedTo.errors) {\n if (errorMessages['default'][error]) {\n errors.push(errorMessages['default'][error]);\n } else if (error === 'fromServer') {\n errors.push(this.attachedTo.errors[error]);\n }\n }\n\n if (this.attachedTo.status === 'INVALID' && (this.attachedTo.touched || this.formSubmitted)) {\n this.inputElement.setAttribute('data-invalid', '');\n } else {\n this.inputElement.removeAttribute('data-invalid');\n }\n\n return errors;\n }\n\n get formSubmitted() {\n return (this.controlContainer.formDirective as FormGroupDirective).submitted;\n }\n\n ngOnInit() {}\n}\n","import {\n Directive,\n Input,\n ElementRef,\n ViewContainerRef,\n ComponentRef,\n TemplateRef,\n ComponentFactoryResolver,\n OnDestroy,\n} from '@angular/core';\n\nimport {\n FormGroup,\n UntypedFormControl,\n AbstractControl,\n ControlContainer,\n FormGroupDirective,\n} from '@angular/forms';\nimport { Subscription } from 'rxjs';\n\n// eslint-disable-next-line max-len\nimport { ValidationMessageComponent } from '@shared/form-utilities/validation-message/validation-message.component';\n\n// NOTE Demo / test directive\n@Directive({\n selector: '[ibmValidationMessage]',\n})\nexport class ValidationMessageDirective implements OnDestroy {\n el: ElementRef;\n\n private formControl: AbstractControl;\n private errorComponent: ComponentRef<ValidationMessageComponent>;\n private validateOnSubmitOnly = false;\n private statusChangeSubscription: Subscription;\n private submitChangeSubscription: Subscription;\n private view: any;\n private inputElement: HTMLElement;\n\n @Input('ibmValidationMessage')\n set formField(formControl: UntypedFormControl) {\n this.unsubscribeAll();\n\n this.formControl = formControl;\n\n this.view = null;\n if (this.viewContainer.length > 0) {\n this.view = this.viewContainer.get(0);\n } else {\n this.view = this.viewContainer.createEmbeddedView(this.templateRef);\n }\n\n this.inputElement = this.view.rootNodes[0];\n\n if (formControl) {\n const cmpFactory = this.cfr.resolveComponentFactory(ValidationMessageComponent);\n this.errorComponent = this.viewContainer.createComponent(cmpFactory);\n this.errorComponent.instance.attachedTo = formControl;\n this.errorComponent.instance.validateOnSubmitOnly = this.validateOnSubmitOnly;\n this.errorComponent.instance.inputElement = this.inputElement;\n\n const formDirective = this.controlContainer.formDirective as FormGroupDirective;\n this.statusChangeSubscription = formControl.statusChanges.subscribe(e => this.manipulateCSSClasses());\n this.submitChangeSubscription = formDirective.ngSubmit.subscribe(e => this.onSubmit());\n }\n }\n\n constructor(\n private templateRef: TemplateRef<any>,\n private viewContainer: ViewContainerRef,\n private cfr: ComponentFactoryResolver,\n private controlContainer: ControlContainer\n ) {}\n\n private onSubmit() {\n this.formControl.markAsTouched();\n this.manipulateCSSClasses();\n }\n\n private unsubscribeAll() {\n if (this.inputElement) {\n this.inputElement.removeAttribute('data-invalid');\n }\n if (this.errorComponent) {\n this.errorComponent.destroy();\n }\n if (this.statusChangeSubscription) {\n this.statusChangeSubscription.unsubscribe();\n delete this.statusChangeSubscription;\n }\n\n if (this.submitChangeSubscription) {\n this.submitChangeSubscription.unsubscribe();\n delete this.submitChangeSubscription;\n }\n }\n\n private manipulateCSSClasses() {\n this.inputElement.removeAttribute('data-invalid');\n const formSubmitted = (this.controlContainer.formDirective as FormGroupDirective).submitted;\n\n if (this.validateOnSubmitOnly && !formSubmitted) {\n return;\n }\n\n const reset = (!this.formControl.touched && this.formControl.pristine) || this.formControl.disabled;\n\n let classes: string[] = this.inputElement.className.split(' ');\n const hasInvalid = classes.includes('is-invalid');\n\n if (reset) {\n classes = classes.filter(c => c !== 'is-invalid');\n } else if (this.formControl.status === 'INVALID' && !hasInvalid) {\n classes.push('is-invalid');\n } else if (this.formControl.status !== 'INVALID' && hasInvalid) {\n classes = classes.filter(c => c !== 'is-invalid');\n }\n\n this.inputElement.className = classes.join(' ');\n }\n\n ngOnDestroy() {\n this.unsubscribeAll();\n }\n}\n","import { Directive, ElementRef } from '@angular/core';\nimport { NgControl } from '@angular/forms';\n\n@Directive({\n selector: '[ibmNativeElementInjector]',\n})\nexport class NativeElementInjectorDirective {\n constructor(private el: ElementRef, private control: NgControl) {\n setTimeout(() => {\n (control.control as any).nativeElement = el.nativeElement;\n });\n }\n}\n","import { UntypedFormControl } from '@angular/forms';\n\n/* check if all controls in group has the same value */\nexport class MatchOtherValidator {\n static valueChanges$ = null;\n\n static matchOtherValidator(otherControlName: string) {\n let currentControl: UntypedFormControl;\n let otherControl: UntypedFormControl;\n\n return function matchOtherValidate(control: UntypedFormControl) {\n if (!control.parent) {\n return null;\n }\n\n if (!currentControl) {\n currentControl = control;\n otherControl = control.parent.get(otherControlName) as UntypedFormControl;\n\n if (!otherControl) {\n throw new Error('Other control is not found in parent group');\n }\n\n MatchOtherValidator.valueChanges$ = otherControl.valueChanges.subscribe(() => {\n currentControl.updateValueAndValidity();\n });\n }\n\n if (otherControl && otherControl.value !== currentControl.value) {\n return {\n invalidMatchOther: true,\n };\n }\n\n return null;\n };\n }\n\n static clearValueChanges() {\n if (MatchOtherValidator.valueChanges$) {\n MatchOtherValidator.valueChanges$.unsubscribe();\n }\n }\n}\n","import { UntypedFormControl } from '@angular/forms';\n\n/* check if min control in group is not greater than max */\nexport class MinMaxValidator {\n static valueChanges$ = null;\n\n static MinMaxValidator(maxControlName: string) {\n let minControl: UntypedFormControl;\n let maxControl: UntypedFormControl;\n\n return function minMaxValidate(control: UntypedFormControl) {\n if (!control.parent) {\n return null;\n }\n\n if (!minControl) {\n minControl = control;\n maxControl = control.parent.get(maxControlName) as UntypedFormControl;\n\n if (!maxControl) {\n throw new Error('Other control is not found in parent group');\n }\n\n MinMaxValidator.valueChanges$ = maxControl.valueChanges.subscribe(() => {\n minControl.updateValueAndValidity();\n });\n }\n\n if (maxControl && maxControl.value !== null && maxControl.value < minControl.value) {\n return { invalidMinMax: true };\n }\n\n return null;\n };\n }\n\n static clearValueChanges() {\n if (MinMaxValidator.valueChanges$) {\n MinMaxValidator.valueChanges$.unsubscribe();\n }\n }\n}\n","import { AbstractControl, ValidationErrors, Validators } from '@angular/forms';\n\n/**\n * NOTE: to make this validator work, it is needed to revalidate correlated form controls\n *\n * @param controlGetter getter function to get the control to check for validation\n * @param value the value that makes the control to be validated requred\n * @returns validator function\n */\nexport function requiredIf(\n controlGetter: () => AbstractControl,\n value: any\n): (c: AbstractControl) => ValidationErrors | null {\n return c => (controlGetter()?.value === value ? Validators.required(c) : null);\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'roboSynthesisStatus' })\nexport class RoboSynthesisStatus implements PipeTransform {\n transform(value: string): string {\n return statusLabel(value);\n }\n}\n\nexport function statusLabel(value: string): string {\n value = translate(value || '');\n return value.charAt(0).toUpperCase() + value.toLowerCase().slice(1);\n}\n\nfunction translate(value: string) {\n const translations = {\n NEW: 'Draft',\n DONE: 'Completed',\n };\n\n return translations[value] || value;\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'truncDecimal',\n})\nexport class TruncDecimalPipe implements PipeTransform {\n transform(value: number, decimals = 3): string {\n if (value < Math.pow(10, -decimals)) {\n return value.toExponential(decimals);\n } else if (!Number.isInteger(value)) {\n return (Math.floor(value * Math.pow(10, decimals)) / Math.pow(10, decimals)).toString();\n } else {\n return value.toString();\n }\n }\n}\n","import {\n FadeModule,\n UserAvatarFilledAltModule,\n AddModule,\n HomeModule,\n FoldersModule,\n StarModule,\n ChemistryModule,\n MigrateModule,\n SankeyDiagramModule,\n CollaborateModule,\n EducationModule,\n LaunchModule,\n ArrowRightModule,\n StarFilledModule,\n VideoModule,\n SettingsModule,\n DeleteModule,\n EmailModule,\n SendModule,\n EditModule,\n CloseFilledModule,\n ViewModule,\n CheckmarkFilledModule,\n ErrorFilledModule,\n PauseOutlineFilledModule,\n StopFilledModule,\n DraggableModule,\n DownloadModule,\n FilterModule,\n LogoTwitterModule,\n FaceWinkModule,\n CloseModule,\n FaceSatisfiedModule,\n FaceDissatisfiedModule,\n ZoomOutModule,\n ZoomInModule,\n CopyModule,\n InformationModule,\n InformationFilledModule,\n CopyFileModule,\n ChartLineSmoothModule,\n GeneratePdfModule,\n ChartLineModule,\n FlowModule,\n PauseFilledModule,\n PlayFilledModule,\n RenewModule,\n WarningModule,\n WarningFilledModule,\n WarningAltFilledModule,\n DataVis_1Module,\n ChevronDownModule,\n InProgressModule,\n SkipForwardOutlineFilledModule,\n TimeModule,\n DashboardModule,\n SchematicsModule,\n UserMultipleModule,\n EventsAltModule,\n UserAdminModule,\n UserModule,\n ReportModule,\n SaveModule,\n MachineLearningModelModule,\n ImageModule,\n NotebookModule,\n FingerprintRecognitionModule,\n ShareModule,\n IdeaModule,\n TemperatureHotModule,\n ChevronUpModule,\n CameraModule,\n OpenPanelRightModule,\n OpenPanelFilledRightModule,\n HelpModule,\n CheckboxCheckedModule,\n CheckboxModule as CheckboxIconModule,\n InProgressErrorModule,\n RocketModule,\n FitToScreenModule,\n DocumentViewModule,\n InProgressWarningModule,\n DataBaseModule,\n DragVerticalModule,\n AddCommentModule,\n ArrowLeftModule,\n VisualRecognitionModule,\n TaskViewModule,\n TextCreationModule,\n ArrowsHorizontalModule,\n ErrorModule,\n SubtractModule,\n Network_1Module,\n Network_2Module,\n Network_3Module,\n ObjectStorageModule,\n WalletModule,\n} from '@carbon/icons-angular';\n// REF https://carbon-elements.netlify.app/icons/examples/preview/\nimport {\n SideNavModule,\n HeaderModule,\n GridModule,\n DialogModule,\n PlaceholderModule,\n ModalModule,\n NotificationModule,\n LoadingModule,\n TableModule,\n PaginationModule,\n TagModule,\n StructuredListModule,\n SearchModule,\n SkeletonModule,\n ButtonModule,\n DropdownModule,\n InputModule,\n DatePickerModule,\n NumberModule,\n CheckboxModule,\n RadioModule,\n ComboBoxModule,\n SliderModule,\n TilesModule,\n SelectModule,\n ListModule,\n TabsModule,\n ProgressIndicatorModule,\n ProgressBarModule,\n FileUploaderModule,\n InlineLoadingModule,\n AccordionModule,\n ToggleModule,\n IconModule,\n BreadcrumbModule,\n} from 'carbon-components-angular';\n\nexport const CARBON_ICONS = [\n FadeModule,\n UserAvatarFilledAltModule,\n AddModule,\n HomeModule,\n FoldersModule,\n StarModule,\n ChemistryModule,\n MigrateModule,\n SankeyDiagramModule,\n CollaborateModule,\n EducationModule,\n LaunchModule,\n StarFilledModule,\n VideoModule,\n SettingsModule,\n DeleteModule,\n EmailModule,\n SendModule,\n EditModule,\n CloseFilledModule,\n ArrowRightModule,\n ViewModule,\n CheckmarkFilledModule,\n ErrorFilledModule,\n ErrorModule,\n PauseOutlineFilledModule,\n StopFilledModule,\n DraggableModule,\n DownloadModule,\n FilterModule,\n LogoTwitterModule,\n FaceWinkModule,\n CloseModule,\n LogoTwitterModule,\n FaceSatisfiedModule,\n FaceDissatisfiedModule,\n ZoomOutModule,\n ZoomInModule,\n EditModule,\n CopyModule,\n InformationModule,\n InformationFilledModule,\n CopyFileModule,\n ChartLineSmoothModule,\n GeneratePdfModule,\n ChartLineModule,\n FlowModule,\n PauseFilledModule,\n PlayFilledModule,\n RenewModule,\n WarningModule,\n WarningFilledModule,\n WarningAltFilledModule,\n DataVis_1Module,\n ChevronDownModule,\n InProgressModule,\n SkipForwardOutlineFilledModule,\n TimeModule,\n DashboardModule,\n SchematicsModule,\n UserMultipleModule,\n EventsAltModule,\n UserAdminModule,\n UserModule,\n ReportModule,\n SaveModule,\n MachineLearningModelModule,\n ImageModule,\n NotebookModule,\n FingerprintRecognitionModule,\n ShareModule,\n IdeaModule,\n TemperatureHotModule,\n ChevronUpModule,\n CameraModule,\n OpenPanelRightModule,\n OpenPanelFilledRightModule,\n HelpModule,\n ChevronDownModule,\n ChevronUpModule,\n CheckboxIconModule,\n CheckboxCheckedModule,\n InProgressErrorModule,\n RocketModule,\n FitToScreenModule,\n DocumentViewModule,\n InProgressWarningModule,\n DataBaseModule,\n DragVerticalModule,\n AddCommentModule,\n ArrowLeftModule,\n VisualRecognitionModule,\n TaskViewModule,\n TextCreationModule,\n ArrowsHorizontalModule,\n SubtractModule,\n Network_1Module,\n Network_2Module,\n Network_3Module,\n ObjectStorageModule,\n WalletModule,\n];\n\nexport const CARBON_COMPONENTS = [\n SideNavModule,\n HeaderModule,\n GridModule,\n DialogModule,\n PlaceholderModule,\n ModalModule,\n NotificationModule,\n LoadingModule,\n TableModule,\n PaginationModule,\n TagModule,\n StructuredListModule,\n SearchModule,\n SkeletonModule,\n ButtonModule,\n DropdownModule,\n InputModule,\n DatePickerModule,\n NumberModule,\n CheckboxModule,\n RadioModule,\n ComboBoxModule,\n SliderModule,\n TilesModule,\n SelectModule,\n ListModule,\n TabsModule,\n ProgressIndicatorModule,\n ProgressBarModule,\n FileUploaderModule,\n InlineLoadingModule,\n AccordionModule,\n ToggleModule,\n IconModule,\n BreadcrumbModule,\n];\n\nexport const CARBON_MODULES = [...CARBON_ICONS, ...CARBON_COMPONENTS];\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'ibm-modal-close-button',\n templateUrl: './modal-close-button.component.html',\n styleUrls: ['./modal-close-button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalCloseButtonComponent {\n @Input()\n autoclose = true;\n @Output()\n click = new EventEmitter<void>();\n\n constructor() {}\n}\n","<button (click)=\"click.emit()\"\n class=\"bx--modal-close\"\n type=\"button\"\n [attr.data-modal-close]=\"autoclose ? true : undefined\"\n aria-label=\"close modal\"\n title=\"Close\">\n <ibm-icon-close></ibm-icon-close>\n</button>","import { Component, Input, OnInit } from '@angular/core';\nimport { ApiSuperService } from '@app/libs/bitforce/api';\n\n@Component({\n selector: 'ibm-file-upload-loader',\n templateUrl: './file-upload-loader.component.html',\n styleUrls: ['./file-upload-loader.component.scss'],\n})\nexport class FileUploadLoaderComponent implements OnInit {\n @Input() uploaderService: ApiSuperService;\n constructor() {}\n\n ngOnInit(): void {}\n}\n","<div class=\"d-flex flex-column align-items-center\">\n <ibm-loading></ibm-loading>\n <strong class=\"loading-text\">{{ uploaderService?.fileUploadStatus?.percentage }}%</strong>\n</div>","import { DragDropModule } from '@angular/cdk/drag-drop';\n\nexport const ANGULAR_CDK_MODULES = [DragDropModule];\n","<ibm-modal [open]=\"open\"\n [hasScrollingContent]=\"false\"\n size=\"sm\">\n <ibm-modal-header (closeSelect)=\"closeModal()\">\n <h3 ibmModalHeaderHeading>You reached your limit</h3>\n </ibm-modal-header>\n <div ibmModalContent>\n <div [ngClass]=\"{'mb-4': dialogData.userPlanLimits.reactionLimit}\"\n *ngIf=\"dialogData.userPlanLimits.modelLimit\">You reached your limit of\n {{ dialogData.userPlanLimits?.limits?.trainingModels }} model trainings\n included in your plan. To train more models, please upgrade your plan.</div>\n <div *ngIf=\"dialogData.userPlanLimits.reactionLimit\">You reached your limit of\n {{ dialogData.userPlanLimits?.limits?.reactionPredictions }} reaction predictions\n included in your plan. To create more predictions, please upgrade your plan.</div>\n </div>\n <ibm-modal-footer>\n <button ibmButton=\"secondary\"\n (click)=\"closeModal()\">Close</button>\n <button ibmButton=\"primary\"\n (click)=\"onUpgradePlan()\">\n Upgrade Now\n </button>\n </ibm-modal-footer>\n</ibm-modal>","import { Component, Inject, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { IUserPlanLimits } from '@app/core/models';\nimport { environment } from '@env/environment';\nimport { BaseModal } from 'carbon-components-angular';\n\n@Component({\n selector: 'ibm-upgrade-plan-dialog',\n templateUrl: './upgrade-plan-dialog.component.html',\n styleUrls: ['./upgrade-plan-dialog.component.scss'],\n})\nexport class UpgradePlanDialogComponent extends BaseModal implements OnInit {\n constructor(\n private router: Router,\n @Inject('dialogData')\n public dialogData: { userPlanLimits: IUserPlanLimits }\n ) {\n super();\n }\n\n ngOnInit(): void {}\n\n onUpgradePlan() {\n this.closeModal();\n this.router.navigate(environment.upgradeUrl.split('/'));\n }\n}\n","<ibm-notification (close)=\"onClose(notification)\"\n *ngFor=\"let notification of planForecast\"\n [notificationObj]=\"{\n type: notification.level,\n template: templateNotification,\n lowContrast: true,\n title: notification.title,\n message: notification.message\n }\"></ibm-notification>\n\n<ng-template #templateNotification\n let-data>\n <div>\n <div class=\"d-flex flex-column\">\n <h3 ibmToastTitle\n class=\"mt-0\">{{data.title}}</h3>\n <p ibmToastCaption\n class=\"mb-0 pt-2 text-01\">{{data.message}}</p>\n </div>\n <button *ngIf=\"showUpgradeButton\"\n [routerLink]=\"['/', 'subscription', 'plans']\"\n ibmButton=\"primary\"\n size=\"md\"\n class=\"mt-4\">Upgrade</button>\n </div>\n</ng-template>","import { Component, Input, OnInit } from '@angular/core';\nimport { EPlanForecastType, IPlanForecast } from '@app/core/models';\nimport { ApiService } from '@app/core/services';\n\n@Component({\n selector: 'ibm-plan-forecast-notification',\n templateUrl: './plan-forecast-notification.component.html',\n styleUrls: ['./plan-forecast-notification.component.scss'],\n})\nexport class PlanForecastNotificationComponent implements OnInit {\n @Input() showUpgradeButton = false;\n @Input() filterByType: EPlanForecastType[];\n limitToShow = 25;\n planForecast: IPlanForecast[] = [];\n constructor(private apiService: ApiService) {}\n\n ngOnInit(): void {\n this.apiService.plans.getForecast().subscribe(data => {\n this.planForecast = data.content\n .filter(x => (this.filterByType ? this.filterByType.includes(x.type) : true))\n .filter(x => {\n const condition = localStorage.getItem(this.getLocalStorageKey(x)) !== String(x.percentage);\n if (x.type === EPlanForecastType.PLAN_CANCELED) {\n return condition;\n } else {\n return condition && 100 - x.percentage >= this.limitToShow;\n }\n });\n });\n }\n\n onClose(planForecast: IPlanForecast) {\n localStorage.setItem(this.getLocalStorageKey(planForecast), String(planForecast.percentage));\n this.planForecast.splice(this.planForecast.indexOf(planForecast), 1);\n }\n\n private getLocalStorageKey(planForecast: IPlanForecast) {\n return `notification-plan-forecast-${planForecast.type}`;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { convertFromBytes, getBestDimensionUnit } from '../common-utilities/bytes-converter';\n\n@Pipe({\n name: 'bytesToSize',\n})\nexport class BytesToSizePipe implements PipeTransform {\n transform(value: string | number): string {\n const bytes = +value;\n if (isNaN(bytes)) {\n return null;\n }\n if (bytes <= 0) {\n return '0 Bytes';\n }\n const dimension = getBestDimensionUnit(bytes);\n let size = convertFromBytes(bytes, dimension).toFixed(2);\n if (size.endsWith('.00')) {\n size = parseInt(size, 10).toString();\n }\n return size + ' ' + dimension;\n }\n}\n","import { NgModule, ModuleWithProviders, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\n\nimport { CARBON_MODULES } from './carbon-modules';\n\nimport { FiltersComponent } from '@app/shared/components/filters/filters.component';\nimport { SearchCollaboratorsComponent } from '@app/shared/components/search-collaborators/search-collaborators.component';\nimport { GetRoborxnKeyDialogComponent } from '@app/shared/components/get-roborxn-key/get-roborxn-key-dialog.component';\n\nimport { ClickOutsideDirective } from '@shared/directives/click-outside.directive';\nimport { ClipboardDirective } from '@shared/directives/clipboard.directive';\nimport { AvatarDirective } from '@shared/directives/avatar.directive';\nimport { BackgroundAvatarDirective } from '@shared/directives/avatar.directive';\n\nimport {\n ValidationMessageComponent,\n ValidationMessageDirective,\n NativeElementInjectorDirective,\n} from '@shared/form-utilities';\n\nimport { BitfSafeHtml } from '@bitf/pipes/bitf-safe-html.pipe';\nimport { LoaderComponent } from '@bitf/components';\nimport { TreeGraphComponent } from './components/tree-graph/tree-graph.component';\nimport { SearchBarComponent } from './components/search-bar/search-bar.component';\nimport { CloseButtonComponent } from './components/close-button/close-button.component';\n\nimport { RoboSynthesisStatus } from '@app/shared/pipes/robo-synthesis-status.pipe';\nimport { ZoomComponent } from '@app/shared/components/zoom/zoom.component';\nimport { ModalCloseButtonComponent } from './components/modal-close-button/modal-close-button.component';\nimport { DropdownMenuComponent } from './components/dropdown-menu/dropdown-menu.component';\nimport { CreateProjectDialogComponent } from './components/create-project-dialog/create-project-dialog.component';\nimport { HeaderComponent } from './components/header/header.component';\nimport { SidenavComponent } from './components/sidenav/sidenav.component';\nimport { NewProjectButtonComponent } from './components/new-project-button/new-project-button.component';\nimport { UserOverflowMenuComponent } from './components/user-overflow-menu/user-overflow-menu.component';\nimport { OkCancelDialogComponent } from './components/ok-cancel-dialog/ok-cancel-dialog.component';\nimport { SynthesisStatusIconComponent } from './components/synthesis-status-icon/synthesis-status-icon.component';\nimport { TableListExpansionComponent } from './components/table-list-expansion/table-list-expansion.component';\nimport { KetcherComponent } from './components/ketcher/ketcher.component';\nimport { FeedbackShareBarComponent } from './components/feedback-share-bar/feedback-share-bar.component';\nimport { SequenceBarComponent } from './components/sequence-bar/sequence-bar.component';\nimport { InformationDetailsMenuComponent } from './components/information-details-menu/information-details-menu.component';\nimport { RetrosynthesisQueueStateComponent } from './components/retrosynthesis-queue-state/retrosynthesis-queue-state.component';\nimport { SynthesisExecutionStateComponent } from './components/synthesis-execution-state/synthesis-execution-state.component';\nimport { AdminSidenavComponent } from './components/admin-sidenav/admin-sidenav.component';\nimport { NoItemsFoundComponent } from './components/no-items-found/no-items-found.component';\nimport { FileUploadLoaderComponent } from './components/file-upload-loader/file-upload-loader.component';\nimport { SimilarReactionsDocumentsListComponent } from './components/similar-reactions-documents-list/similar-reactions-documents-list.component';\nimport { FingerprintButtonComponent } from './components/fingerprint-button/fingerprint-button.component';\nimport { TmapButtonComponent } from './components/tmap-button/tmap-button.component';\nimport { SelectOrCreateProjectComponent } from './components/select-or-create-project/select-or-create-project.component';\nimport { ReactionImageComponent } from './components/reaction-image/reaction-image.component';\nimport { FileUploaderComponent } from './components/file-uploader/file-uploader.component';\nimport { CreateRetrosynthesisWizardDialogComponent } from './components/create-retrosynthesis-wizard-dialog/create-retrosynthesis-wizard-dialog.component';\nimport { CreateSynthesisWizardDialogComponent } from './components/create-synthesis-wizard-dialog/create-synthesis-wizard-dialog.component';\nimport { SynthesisRetrosynthesisInformationComponent } from './components/synthesis-retrosynthesis-information/synthesis-retrosynthesis-information.component';\nimport { DownloadFileEntryButtonComponent } from './components/download-file-entry-button/download-file-entry-button.component';\nimport { ANGULAR_CDK_MODULES } from './angular-cdk-modules';\nimport { TruncDecimalPipe } from './pipes/trunc-decimal.pipe';\nimport { FormValidationMessagePipe } from './form-utilities/form-validation-message.pipe';\nimport { CopySmilesDialogComponent } from './components/copy-smiles-dialog/copy-smiles-dialog.component';\nimport { FileUploaderDialogComponent } from './components/file-uploader-dialog/file-uploader-dialog.component';\nimport { FullHeightPanelComponent } from './components/full-height-panel/full-height-panel.component';\nimport { SelectProjectDialogComponent } from './components/select-project-dialog/select-project-dialog.component';\nimport { AIModelSelectionDialogComponent } from './components/ai-model-selection-dialog/ai-model-selection-dialog.component';\nimport { RenameDialogComponent } from './components/rename-dialog/rename-dialog.component';\nimport { TreeLegendComponent } from './components/tree-legend/tree-legend.component';\nimport { DraggableResizableDirective } from './directives/draggable-resizable.directive';\nimport { UserAccountMenuComponent } from './components/user-account-menu/user-account-menu.component';\nimport { UpgradePlanDialogComponent } from './components/upgrade-plan-dialog/upgrade-plan-dialog.component';\nimport { SelectCountryDialogComponent } from './components/select-country-dialog/select-country-dialog.component';\nimport { PlanComponent } from './components/plan/plan.component';\nimport { TrainingCostDetailDialogComponent } from './components/training-cost-detail-dialog/training-cost-detail-dialog.component';\nimport { TrainingHoursHelpDialogComponent } from './components/training-hours-help-dialog/training-hours-help-dialog.component';\nimport { SearchBillingAddressComponent } from './components/search-billing-address/search-billing-address.component';\nimport { PaymentMethodDialogComponent } from './components/payment-method-dialog/payment-method-dialog.component';\nimport { PlanForecastNotificationComponent } from './components/plan-forecast-notification/plan-forecast-notification.component';\nimport { BytesToSizePipe } from './pipes/bytes-to-size.pipe';\nimport { UnsuccessfulPaymentNotificationComponent } from './components/unsuccessful-payment-notification/unsuccessful-payment-notification.component';\nimport { UpgradePlanButtonComponent } from './components/upgrade-plan-button/upgrade-plan-button.component';\nimport { UnsubscribeButtonComponent } from './components/unsubscribe-button/unsubscribe-button.component';\nimport { HeapDirective } from './directives/heap.directive';\nimport { ReleaseNotesDialogComponent } from './components/release-notes-dialog/release-notes-dialog.component';\n\nconst SHARED_MODULES = [\n CommonModule,\n ReactiveFormsModule,\n FormsModule,\n RouterModule,\n CARBON_MODULES,\n ANGULAR_CDK_MODULES,\n];\n\nconst SHARED_COMPONENTS = [\n NativeElementInjectorDirective,\n ValidationMessageDirective,\n ValidationMessageComponent,\n FiltersComponent,\n SearchCollaboratorsComponent,\n TreeGraphComponent,\n SearchBarComponent,\n CloseButtonComponent,\n ZoomComponent,\n ModalCloseButtonComponent,\n DropdownMenuComponent,\n CreateProjectDialogComponent,\n HeaderComponent,\n SidenavComponent,\n NewProjectButtonComponent,\n UserOverflowMenuComponent,\n TableListExpansionComponent,\n SequenceBarComponent,\n KetcherComponent,\n FeedbackShareBarComponent,\n InformationDetailsMenuComponent,\n OkCancelDialogComponent,\n SynthesisStatusIconComponent,\n RetrosynthesisQueueStateComponent,\n SynthesisExecutionStateComponent,\n GetRoborxnKeyDialogComponent,\n AdminSidenavComponent,\n NoItemsFoundComponent,\n FileUploadLoaderComponent,\n SimilarReactionsDocumentsListComponent,\n FingerprintButtonComponent,\n TmapButtonComponent,\n SelectOrCreateProjectComponent,\n ReactionImageComponent,\n FileUploaderComponent,\n CreateRetrosynthesisWizardDialogComponent,\n CreateSynthesisWizardDialogComponent,\n SynthesisRetrosynthesisInformationComponent,\n DownloadFileEntryButtonComponent,\n CopySmilesDialogComponent,\n FileUploaderDialogComponent,\n FullHeightPanelComponent,\n AIModelSelectionDialogComponent,\n RenameDialogComponent,\n SelectProjectDialogComponent,\n TreeLegendComponent,\n UserAccountMenuComponent,\n UpgradePlanDialogComponent,\n SelectCountryDialogComponent,\n ReleaseNotesDialogComponent,\n PlanComponent,\n TrainingCostDetailDialogComponent,\n TrainingHoursHelpDialogComponent,\n SearchBillingAddressComponent,\n PaymentMethodDialogComponent,\n PlanForecastNotificationComponent,\n UnsuccessfulPaymentNotificationComponent,\n UpgradePlanButtonComponent,\n UnsubscribeButtonComponent,\n];\n\nconst SHARED_DIRECTIVES = [\n ValidationMessageDirective,\n ClickOutsideDirective,\n ClipboardDirective,\n AvatarDirective,\n BackgroundAvatarDirective,\n DraggableResizableDirective,\n HeapDirective,\n];\n\nconst SHARED_BITF_COMPONENTS = [LoaderComponent, BitfSafeHtml];\nconst SHARED_PIPES = [RoboSynthesisStatus, TruncDecimalPipe, FormValidationMessagePipe, BytesToSizePipe];\n\n@NgModule({\n imports: [...SHARED_MODULES],\n exports: [\n ...SHARED_MODULES,\n ...SHARED_COMPONENTS,\n ...SHARED_DIRECTIVES,\n ...SHARED_BITF_COMPONENTS,\n ...SHARED_PIPES,\n ],\n declarations: [...SHARED_COMPONENTS, ...SHARED_DIRECTIVES, ...SHARED_BITF_COMPONENTS, ...SHARED_PIPES],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n providers: [...SHARED_PIPES],\n})\nexport class SharedModule {\n // This should only be called inside the CoreModule!\n static forRoot(): ModuleWithProviders<SharedModule> {\n return {\n ngModule: SharedModule,\n providers: [],\n };\n }\n}\n","const hostUrl = window['hostUrl'] || 'https://rxn.res.ibm.com/rxn';\nconst apiUrl = hostUrl + '/api/api/v1/';\nconst wsUrl = window['wsUrl'] || 'wss://rxn.res.ibm.com/rxn/api/ws';\nconst userProfileUrl =\n window['userProfileUrl'] ||\n `https://ad.apps.rxn-stage.accelerator.cafe/auth/realms/RXN-prod/account?referrer=rxn-stage`;\nconst redirectUrl = window['redirectUrl'] || 'https://ad.apps.rxn-stage-cp.43ed.p1.openshiftapps.com/plans';\nconst logoutUrl =\n window['logoutUrl'] ||\n `https://ad.apps.rxn-stage.accelerator.cafe/auth/realms/RXN-prod/protocol/openid-connect/logout?post_logout_redirect_uri=${hostUrl}/sign-in&id_token_hint=`;\nconst upgradeUrl = window['upgradeUrl'] || '/subscription';\nconst plansEnabled = window['plansEnabled'] || false;\nconst ecommerceEnabled = window['ecommerceEnabled'] || false;\n\nexport const environment = {\n production: true,\n appName: 'ibm-mlrp-production',\n storageVersion: '1.0.0',\n apiUrl,\n wsUrl,\n hostUrl,\n userProfileUrl,\n redirectUrl,\n logoutUrl,\n upgradeUrl,\n plansEnabled,\n ecommerceEnabled,\n authInterceptorUrl: '/rxn/api/api/v1',\n logUrl: '',\n fbAppId: '368641450316101',\n httpRetryConfig: {\n enabled: false,\n verbs: {\n get: { enabled: false, timeout: 45000, maxRetries: 2, retryForStatusesCodes: [500] },\n post: { enabled: false, timeout: null, maxRetries: 1, retryForStatusesCodes: [500] },\n patch: { enabled: false, timeout: null, maxRetries: 1, retryForStatusesCodes: [500] },\n put: { enabled: false, timeout: null, maxRetries: 1, retryForStatusesCodes: [500] },\n delete: { enabled: false, timeout: null, maxRetries: 1, retryForStatusesCodes: [500] },\n },\n },\n loggerConfig: {\n enabled: true,\n maxLogRentention: 20,\n logHttpErrorsWithStatusesCodes: [500, 401, 403, 404],\n logDecoratedExceptions: true,\n logExceptions: true,\n },\n heap: {\n enabled: window['heapAnalyticsEnabled'] || false,\n appId: window['ibmHeapId'] || '',\n },\n};\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'ibm-not-found',\n templateUrl: './not-found.component.html',\n styleUrls: ['./not-found.component.scss'],\n})\nexport class NotFoundComponent implements OnInit {\n constructor() {}\n\n ngOnInit() {}\n}\n","<ibm-mlrp-header [hasSidenav]=\"false\">\n</ibm-mlrp-header>\n\n<div class=\"vh-100 d-flex justify-content-center align-center\">\n <div class=\"text-center\">\n <h1>404 - Page not found</h1>\n <a class=\"bx--btn bx--btn--tertiary mt-5\"\n [routerLink]=\"['/home']\"\n type=\"button\">Back home</a>\n </div>\n</div>","import { Component, OnInit } from '@angular/core';\nimport { finalize } from 'rxjs/operators';\n\nimport { ApiService, EventTrackingService } from '@services';\n@Component({\n selector: 'ibm-logout',\n templateUrl: './logout.component.html',\n styleUrls: ['./logout.component.scss'],\n})\nexport class LogoutComponent implements OnInit {\n constructor(private apiService: ApiService, private eventTrackingService: EventTrackingService) {}\n\n ngOnInit() {\n this.eventTrackingService.trackLoginLogout('Service Logout');\n this.apiService.auth.logout();\n }\n}\n","import { Component, OnInit } from '@angular/core';\n\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { LoaderService } from '@bitf/components';\nimport { IApiResponse, IApiAction } from '@bitf/api';\nimport { GenericService } from '@bitf/services/generic/generic.service';\n// TODO we should provide a default toast similar to loader\nimport { ToastMessagesService } from '@services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'bitf-redirect',\n templateUrl: './redirect.component.html',\n styleUrls: ['./redirect.component.scss'],\n})\nexport class RedirectComponent implements OnInit {\n apiCall: string;\n redirectTo: string;\n\n constructor(\n private route: ActivatedRoute,\n private loaderService: LoaderService,\n private genericService: GenericService,\n private router: Router,\n private toastMessagesService: ToastMessagesService\n ) {}\n\n ngOnInit() {\n this.loaderService.show();\n this.apiCall = this.route.snapshot.queryParams['apiCall'];\n this.redirectTo = this.route.snapshot.queryParams['redirectTo'];\n\n if (this.apiCall) {\n this.genericService.callAction({ path: this.apiCall, method: 'GET' }).subscribe(\n (response: IApiResponse<IApiAction>) => {\n if (response.content.success) {\n /*\n When an user accepts an invitation to collaborate to a project, sometimes after redirect the\n projects list is not already updated, the timeout tries to mitigate this problem.\n */\n setTimeout(() => {\n this.loaderService.hide();\n this.router.navigateByUrl(this.redirectTo);\n }, 1000);\n } else {\n this.errorRedirect();\n }\n },\n error => {\n this.errorRedirect();\n }\n );\n } else if (this.redirectTo) {\n this.router.navigateByUrl(this.redirectTo);\n } else {\n this.router.navigate(['']);\n }\n }\n\n errorRedirect() {\n this.loaderService.hide();\n this.toastMessagesService.show({\n title: 'Error',\n message: 'Incorrect redirect params',\n type: EToastMessageType.ERROR,\n });\n setTimeout(() => this.router.navigate(['']));\n }\n}\n","import {\n Component,\n OnInit,\n ComponentRef,\n ViewContainerRef,\n ViewChild,\n ComponentFactory,\n ComponentFactoryResolver,\n} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { Router } from '@angular/router';\n\nimport { AppSessionService, EventTrackingService } from '@services';\nimport { configs } from '@configs';\n\n// TODO we should provide a default toast similar to loader\nimport { ToastMessagesService } from '@services';\nimport { LoaderService } from '@bitf/components';\nimport { AuthService } from '@bitf/services';\nimport { ApiService } from '../../../../../core/services/api/api.service';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'bitf-get-auth-token',\n templateUrl: './get-auth-token.component.html',\n styleUrls: ['./get-auth-token.component.scss'],\n})\nexport class GetAuthTokenComponent implements OnInit {\n @ViewChild('content', { read: ViewContainerRef, static: true })\n content;\n componentRef: ComponentRef<Component> = null;\n userIsBlocked = false;\n constructor(\n private activatedRoute: ActivatedRoute,\n private authService: AuthService,\n private toastMessagesService: ToastMessagesService,\n private router: Router,\n private loaderService: LoaderService,\n private appSessionService: AppSessionService,\n private apiService: ApiService,\n private resolver: ComponentFactoryResolver,\n private eventTrackingService: EventTrackingService\n ) {}\n\n ngOnInit() {\n this.loaderService.show();\n\n const token = this.activatedRoute.snapshot.queryParamMap.get(configs.authService.tokenQueryParmName);\n setTimeout(() => {\n // if (token) {\n let componentFactory: ComponentFactory<Component>;\n if (configs.getAuthTokenComponent.signInComponent) {\n componentFactory = this.resolver.resolveComponentFactory(\n configs.getAuthTokenComponent.signInComponent\n );\n }\n if (componentFactory) {\n this.componentRef = this.content.createComponent(componentFactory);\n }\n this.apiService.auth.user$.subscribe(user => {\n if (user.isBlocked === true) {\n this.userIsBlocked = true;\n }\n });\n setTimeout(() => {\n this.generateToken(token);\n }, 300);\n // } else {\n // this.loaderService.hide();\n // setTimeout(() => this.router.navigate([configs.general.loginUrl]));\n // this.toastMessagesService.show({\n // title: 'Error',\n // message: 'Error on logging in',\n // type: EToastMessageType.ERROR,\n // });\n // }\n }, 300);\n }\n\n generateToken(token) {\n // TODO pass in constant the shape of this payload\n this.authService.generateToken(token).subscribe(\n data => {\n this.authService.login(data.content);\n if (!this.userIsBlocked) {\n this.toastMessagesService.show({\n title: 'Sign in',\n message: 'You are logged in',\n type: EToastMessageType.SUCCESS,\n });\n }\n\n this.eventTrackingService.trackLoginLogout('Service Login');\n this.router.navigateByUrl(this.appSessionService.redirectUrl);\n setTimeout(() => {\n this.loaderService.hide();\n }, 500);\n },\n () => {\n this.loaderService.hide();\n setTimeout(() => this.router.navigate([configs.general.loginUrl]));\n this.toastMessagesService.show({\n title: 'Error',\n message: 'Error on logging in',\n type: EToastMessageType.ERROR,\n });\n }\n );\n }\n}\n","<template #content></template>","<!-- the following header is here only to avoid empty space on top of the page when navigating between routes, each component overrides this one -->\n<ibm-mlrp-header [hasSidenav]=\"appSessionService.isLeftSidenavActive\"></ibm-mlrp-header>\n<main ibmGrid\n class=\"mlrp-content bx--grid--full-width\"\n [ngClass]=\"{ \n 'sidenav-expanded': appSessionService.isLeftSidenavActive && appSessionService.isLeftSidenavVisible, \n 'fullscreen': isFullscreen()}\">\n <router-outlet></router-outlet>\n</main>\n<!-- user sidenav -->\n<ibm-mlrp-sidenav *ngIf=\"!appSessionService.isAdminArea && appSessionService.isLeftSidenavActive\"\n [sidenavActive]=\"appSessionService.isLeftSidenavVisible\">\n</ibm-mlrp-sidenav>\n\n<!-- admin sidnav -->\n<ibm-mlrp-admin-sidenav *ngIf=\"appSessionService.isAdminArea && appSessionService.isLeftSidenavActive\"\n [sidenavActive]=\"appSessionService.isLeftSidenavVisible\">\n</ibm-mlrp-admin-sidenav>\n\n<div class=\"tablet-overlay\"\n *ngIf=\"appSessionService.activeBreakpoints.isTabletPortrait\">\n <div class=\"d-flex flex-column justify-content-center align-items-center h-100\">\n <img src=\"assets/img/home/tablet-landscape-suggestione.png\" />\n </div>\n</div>","import { Component, HostListener, OnInit } from '@angular/core';\nimport { ActivatedRoute, ActivatedRouteSnapshot } from '@angular/router';\n\nimport { AppSessionService } from '@services';\n@Component({\n selector: 'ibm-main-layout',\n templateUrl: './main-layout.component.html',\n styleUrls: ['./main-layout.component.scss'],\n})\nexport class MainLayoutComponent implements OnInit {\n constructor(public appSessionService: AppSessionService, private activatedRoute: ActivatedRoute) {}\n\n ngOnInit(): void {\n this.onResize();\n }\n\n @HostListener('window:resize', ['$event'])\n onResize() {\n // lg breakpoint\n if (window.innerWidth < 1056) {\n setTimeout(() => (this.appSessionService.isLeftSidenavVisible = false));\n } else {\n setTimeout(() => (this.appSessionService.isLeftSidenavVisible = true));\n }\n }\n\n public isFullscreen(node: ActivatedRouteSnapshot = this.activatedRoute.snapshot) {\n return node && (node.data.fullscreen || this.isFullscreen(node.firstChild));\n }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'ibm-terms-of-use',\n templateUrl: './terms-of-use.component.html',\n styleUrls: ['./terms-of-use.component.scss'],\n})\nexport class TermsOfUseComponent {}\n","<ibm-mlrp-header [hasSidenav]=\"false\">\n</ibm-mlrp-header>\n\n\n<p><strong>AI Results Terms of Use</strong></p>\n<p>The results of any AI model can be downloaded and used by each user with no\n limitations under a <a href=\"https://creativecommons.org/licenses/by/4.0/\"\n rel=\"no-follow\">CC-BY license</a></p>\n<p class=\"text-center mt-5\">\n <strong>International Business Machines Corporation</strong>\n</p>\n<p class=\"text-center\">\n <strong>\n Thomas J. Watson Research Center, 1101 Kitchawan Road, Yorktown Heights,\n New York 10598, USA\n </strong>\n</p>\n<p class=\"mt-5 mb-5\">\n <strong>Complete Agreement:</strong> This IBM Technology Early Access\n Agreement (“Agreementâ€) is the complete agreement governing the Customer’s\n access to and use of the IBM Technology made available in a cloud services\n environment.\n</p>\n<table cellspacing=\"0\"\n cellpadding=\"0\"\n class=\"terms-table\">\n <tbody>\n <tr>\n <td colspan=\"2\"\n valign=\"top\">\n </td>\n </tr>\n <tr>\n <td colspan=\"2\"\n valign=\"top\">\n <p>\n <strong>1. Definitions</strong>\n </p>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>a. Customer</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n <strong>“Customerâ€</strong> means the company and/or\n authorized users of the IBM Technology.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>b. Content</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n <strong>“Contentâ€</strong> means any public or\n proprietary data and information that Customer or its\n authorized users provides, authorizes access to, uploads\n or inputs to the IBM Technology under this Agreement,\n including but not limited to inputs to a model,\n including by inferencing or prompting the model, and any\n content provided by Customer for further training of a\n model, including fine-tuning or prompt-tuning.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>c. IBM Technology</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n <strong>“IBM Technologyâ€</strong> means RXN for\n Chemistry, which is a digital chemistry service that\n provides access to technology that predicts chemical\n properties and reactions. IBM Technology offers a set of\n capabilities that enable chemists and materials\n scientists to experiment with AI models for, including\n but not limited to, forward reaction prediction,\n retrosynthetic prediction, and experimental procedure\n generation.\n </li>\n </ul>\n <p>\n <strong></strong> <br />\n </p>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n </td>\n <td valign=\"top\">\n </td>\n </tr>\n <tr>\n <td colspan=\"2\"\n valign=\"top\">\n <p>\n <strong>2. Scope</strong>\n </p>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>\n a. IBM Technology Access, Right to Use, Customer\n Responsibilities\n </strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n IBM will provide Customer with secure access to the IBM\n Technology.\n </li>\n <li>\n Customer may use the IBM Technology to access and use a\n set of cloud-hosted tools that use AI to perform\n predictions and analysis of chemical reactions. Customer\n may use the IBM Technology as long as Customer has\n access to it.\n </li>\n <li>\n Customer is responsible for the use of the IBM\n Technology by any user who accesses the IBM Technology\n with Customer's account credentials.\n </li>\n <li>\n Customer agrees to provide IBM with usage statistics and\n feedback on its use of the IBM Technology. IBM may use\n such usage statistics and feedback for any purpose,\n including for improvements or enhancements of the IBM\n Technology.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>b. Prohibited Use</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n IBM Technology may not be used to undertake any activity\n or host Content that: (1) is unlawful, fraudulent,\n harmful, malicious, obscene, or offensive; (2) breaches,\n threatens or violates the rights of others; (3) disrupts\n or gains (or intends to disrupt or gain) unauthorized\n access to data, services, networks, or computing\n environments within or external to IBM; (4) sends\n unsolicited, abusive, or deceptive messages of any type;\n (5) distributes any form of malware, or (6) is not in\n accordance with this Agreement.\n </li>\n <li>\n If there is a complaint or notice of violation, access\n to the IBM Technology may be immediately suspended until\n resolved, and terminated if not resolved promptly.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>c. IBM’s Right to Change IBM Cloud Services</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n At any time and at IBM’s discretion, IBM may change the\n terms applicable to the IBM Technology, modify the\n computing environment, or withdraw its features, in\n whole or in part by providing notice to the Customer.\n </li>\n <li>\n Continued use of the IBM Technology is assumed as\n Customer’s acceptance of any such change. If Customer\n does not accept a change, Customer is responsible to\n discontinue the use of the IBM Technology upon such\n notice by IBM.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>d. Tier plans</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n <strong>Free plan</strong>. Access to the IBM Technology\n through the web-based UI.\n </li>\n <li>\n <strong>Pay-as-you-go plan</strong>. Access to the IBM\n Technology, including the UI/UX and the API, with an\n expanded catalog of public models and collaboration\n features. Access to the IBM Technology will be provided\n on a time delineated basis, where the metric of use will\n be a computational second.\n </li>\n <li>\n <strong>Subscription plan</strong>. All features and\n access to the IBM Technology included in the\n pay-as-you-go plan for up to ten (10) user accounts\n during the term of this Agreement.\n </li>\n </ul>\n <p>\n <strong></strong> <br />\n </p>\n </td>\n </tr>\n <tr>\n <td colspan=\"2\"\n valign=\"top\">\n </td>\n </tr>\n <tr>\n <td colspan=\"2\"\n valign=\"top\">\n <p>\n <strong>3. Consideration</strong>\n </p>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n a. Consideration amount\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Pricing information can be found under\n <a href=\"https://rxn.app.accelerate.science/rxn/user-subscription\">\n https://rxn.app.accelerate.science/rxn/user-subscription\n </a>\n .\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n b. Payment method\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Payments are non-refundable and will be made in U.S.\n Dollars via credit card provided by Customer.\n </li>\n <li>\n <strong>Pay-as-you-go plan</strong>. Payments will be\n automatically billed on an actual usage, in arrears, at\n the end of the monthly billing period.\n </li>\n <li>\n <strong>Subscription plan.</strong>Both, monthly and\n annual payments will be automatically billed in advance\n prior to obtaining access to the IBM Technology.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n c. Taxes\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n In the event Customer is required to pay any withholding\n or deduction of tax required under an applicable\n governmental entity regulation based on IBM’s charge for\n cross border transaction, Customer will increase the sum\n payable by the amount necessary to ensure IBM receives\n an amount equal to the sum it would have received had no\n withholdings or deductions been made. Customer is\n responsible to pay any withholding tax directly to the\n appropriate government entity where required by law.\n </li>\n <li>\n If Customer imports, exports, transfers, accesses, or\n uses an IBM Technology across a border, Customer agrees\n to be responsible for and pay authorities any custom,\n duty, tax, or similar levy assessed by the authorities.\n This excludes those taxes based on IBM’s net income.\n </li>\n <li>\n Where taxes are based upon the location(s) receiving the\n benefit of the IBM Technology, Customer has an ongoing\n obligation to notify IBM of such location(s) if\n different than Customer’s business address listed above.\n </li>\n </ul>\n </td>\n </tr>\n </tbody>\n <tbody>\n <tr>\n <td colspan=\"2\"\n valign=\"top\">\n <p>\n <strong>4. Term and Termination</strong>\n </p>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>a. Term</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n This Agreement becomes effective on the date Customer\n accepts this Agreement and remains in effect as long as\n Customer has access to the IBM Technology under this\n Agreement.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>b. Termination</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n <strong>Termination for Convenience</strong>. Customer\n may terminate its subscription to the IBM Technology at\n any time by giving IBM a written notice of termination.\n Such termination shall be effective as of the time of\n notification.\n </li>\n <li>\n <strong>Termination for Material Breach</strong>. If\n either party to this Agreement breaches any material\n obligation of this Agreement, then, upon thirty (30)\n days written notice to the breaching party specifying\n such breach, the non-breaching Party may terminate this\n Agreement without liability, unless the breach specified\n in the notice has been cured within the thirty (30) day\n notice period to the satisfaction of the non-breaching\n party.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>c. Effect of Termination</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Upon termination of the Agreement, IBM will revoke\n Customer’s access to the IBM Technology and remove\n Content from it after a retention period of one (1)\n month.\n </li>\n </ul>\n </td>\n </tr>\n </tbody>\n</table>\n<table cellspacing=\"0\"\n cellpadding=\"0\"\n class=\"terms-table\">\n <tbody>\n <tr>\n <td colspan=\"2\"\n valign=\"top\">\n <p>\n <strong>5. Content and Data Protection</strong>\n </p>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>a. Ownership</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Customer will retain all right, title and interest in\n the Content and the output generated by the IBM\n Technology, subject only to the limited right of access\n provided to IBM under this Agreement.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>b. IBM’s Right of Access</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Customer grants the rights and permissions to IBM, its\n affiliates, and contractors of either, to use, provide,\n store, and otherwise process Content solely for the\n purpose of providing access to and facilitating the use\n of and improving the IBM Technology.\n </li>\n <li>\n IBM, its affiliates, and contractors of either, may\n access and use the Content solely for such purposes,\n unless otherwise agreed in writing.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>c. Confidentiality</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Content shall be considered Customer confidential\n information.\n </li>\n <li>\n Except for Content, any information provided by either\n party under this Agreement will be considered\n non-confidential, and each party will be free to use and\n disclose such information without limitation.\n </li>\n <li>\n IBM, its affiliates, and contractors of either will\n treat Content as confidential by only disclosing it to\n those employees and representatives to the extent\n necessary to provide access to and facilitate the use of\n the IBM Technology.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>d. Customer Representations and Warranties</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Customer represents and warrants that (i) the Content\n does not contain information that may include personally\n identifiable information, except Business Contact\n Information or Account Usage Information, as defined in\n Article 8(b), (ii) the Content does not contain any\n other information that may be subject to personal\n privacy laws of any jurisdiction, including the European\n General Data Protection Regulation (EU/2016/679) (“Data\n Protection Lawsâ€), (iii) it has all necessary rights and\n consents to upload or input Content to the IBM\n Technology and to permit IBM and its contractors to\n access and use the Content if required for the purpose\n of providing access to and facilitating the use of the\n IBM Technology, (iv) the access and use of Content by\n IBM and its contractors for the purpose of (iii) will\n not violate any laws, including Data Protection Laws.\n Customer is solely responsible for outputs generated by\n any model.\n </li>\n <li>\n Customer agrees not to upload or input any Content to\n the IBM Technology that may contain personally\n identifiable information or any other data that may be\n subject to Data Protection Laws, unless and until the\n parties have reached an agreement in writing on the\n requirements for receipt and processing of any such\n other data. Such additional agreement can be found at\n <a href=\"http://ibm.com/dpa\">\n http://ibm.com/dpa\n </a>\n and will be subject to the terms of this Agreement.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>e. Removal of Content</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Customer may remove Content from IBM Technology at any\n time.\n </li>\n <li>\n IBM will remove Content from IBM computing resources\n upon the termination of the access to the IBM\n Technology, or earlier upon Customer's request.\n </li>\n </ul>\n </td>\n </tr>\n </tbody>\n</table>\n<table cellspacing=\"0\"\n cellpadding=\"0\"\n class=\"terms-table\">\n <tbody>\n <tr>\n <td colspan=\"2\"\n valign=\"top\">\n <p>\n <strong>\n 6. IBM Technology Ownership, Access and Use Standards\n </strong>\n </p>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>a. Ownership</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n IBM will retain all right, title and interest in the IBM\n Technology, subject only to the limited right of access\n provided to Customer under this Agreement.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>b. Customer’s Right of Access</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Customer may access and use the IBM Technology, and any\n information contained therein only as provided in this\n Agreement. Customer may access the IBM Technology, as\n licensed, through (i) a user interface, or (ii) a public\n API. Customer accepts that availability of the IBM\n Technology is subject to maintenance and unanticipated\n conditions.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>\n c. Customer’s Responsibility of Access Control\n </strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Customer is solely responsible for: (i) access control\n to the IBM Technology, (ii) ensuring that all usernames\n and passwords provided by IBM to Customer remain\n confidential and are not used by unauthorized\n individuals, and (iii) all activities performed by\n Customer employees/representatives while logged in under\n usernames and passwords that IBM has provided to\n Customer. Customer must immediately contact IBM if it\n suspects usernames and passwords have been compromised\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>\n d. Customer’s Responsibilities and Use Standards\n </strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Customer ensures that all of its equipment which can\n access the IBM Technology will be physically and\n technically protected, including without limitation,\n screen and keyboard locks, and will prevent IP\n forwarding or other services such as DNS or DHCP, and\n maintain the security and integrity of Customer’s\n facilities and its computer network.\n </li>\n <li>\n Customer ensures to comply with state-of-the-art\n security standards and to not expose IBM Technology to\n any cybersecurity threats. Customer will promptly notify\n IBM if Customer discovers or suspects any cybersecurity\n threat, and will fully cooperate with IBM to remove such\n threat and protect the IBM Technology, which may\n include, without limitation, termination of Customer’s\n access rights to the IBM Technology.\n </li>\n <li>\n Customer will not use the IBM name, any IBM trademark,\n or refer to Customer’s access to the IBM Technology\n without IBM’s prior written approval.\n </li>\n <li>\n Customer will not, and will not allow any third party\n to: (i) copy, modify, link to, distribute or access the\n IBM Technology, or any component thereof, or (ii)\n reverse engineer or otherwise attempt to discover or\n decode the IBM Technology, or any component thereof,\n except as specifically permitted by law without the\n possibility of contractual waiver.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>e. IBM’s Right to Monitor</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n IBM may monitor Customer’s use of the IBM Technology for\n (i) control of Customer’s compliance with the Use\n Standards set out in Article 6(d) above, (ii) quality\n control, and (iii) other purposes.\n </li>\n </ul>\n </td>\n </tr>\n </tbody>\n</table>\n<table cellspacing=\"0\"\n cellpadding=\"0\"\n class=\"terms-table\">\n <tbody>\n <tr>\n <td colspan=\"2\"\n valign=\"top\">\n <p>\n <strong>7. Disclaimers and Limitation of Liability</strong>\n </p>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>a. No Warranty</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n The IBM Technology is provided as-is, with no warranties\n of any kind, including (i) no warranty for uninterrupted\n or error-free operation of the IBM Technology; or (ii)\n no other warranties such as implied warranties or\n conditions of satisfactory quality, merchantability,\n fitness for a particular purpose, and any warranty of\n non-infringement of patents, copyrights, or any other\n intellectual property right.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>b. Customers risks</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Customer assumes all risks associated with its access to\n and use of the IBM Technology, and all component(s)\n thereof. The risks Customer assumes include, but are not\n limited to, the risks of (i) IBM Technology errors, (ii)\n intellectual property rights related to uploading or\n inputting Content to the IBM Technology, or those\n related to any output of the IBM Technology (iii) damage\n to or loss of Customer programs or equipment, and (iv)\n unavailability or interruption of operations. Neither\n IBM, nor its affiliates or contractors are responsible\n for the accuracy, completeness, timeliness, reliability,\n content or availability of the IBM Technology.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>c. Limitation of Liability</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n IBM’s and Customer’s entire liability for all claims in\n the aggregate arising under this Agreement will not\n exceed the amount of any actual direct damages incurred\n up to the lesser of ten thousand US Dollars (USD\n $10,000) or the actual amounts paid for access to the\n IBM Technology. This limit applies regardless of why a\n party claims damages from the other party, including\n default, fundamental breach, negligence,\n misrepresentation, or other contract or tort claim.\n </li>\n <li>\n The following amounts, if a party is legally liable for\n them, are not subject to the above liability cap: (i)\n damages that cannot be capped by applicable law, (ii)\n damages for misuse or misappropriation of intellectual\n property rights in breach of this Agreement, (iii)\n damages for misuse, misappropriation or disclosure of\n confidential information in breach of a party’s\n confidentiality obligations under this Agreement, (iv)\n payment obligations pursuant to Article 3.0\n (Consideration), and (v) damage for breach of Customer’s\n obligations pursuant to Article 5.0 (Content and Data\n Privacy).\n </li>\n <li>\n Except for damages for misuse or misappropriation of\n intellectual property in breach of the Agreement,\n damages for misuse, misappropriation or disclosure of\n confidential information in breach of a party’s\n confidentiality obligations under this Agreement, damage\n for breach of Customer’s obligations pursuant to Article\n 5.0 (Content and Data Privacy), under no circumstances,\n even if informed of the possibility, is either Party\n liable for special, incidental, exemplary, indirect or\n economic consequential damages (including damages based\n on the value of lost data or the cost of recreating it),\n lost profits, business, revenue, or anticipated savings.\n </li>\n </ul>\n </td>\n </tr>\n </tbody>\n</table>\n<table cellspacing=\"0\"\n cellpadding=\"0\"\n class=\"terms-table\">\n <tbody>\n <tr>\n <td colspan=\"2\"\n valign=\"top\">\n <p>\n <strong>8. General Provisions</strong>\n </p>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>\n a. Business Contact Information and Account Usage\n Information\n </strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n IBM, its affiliates, and contractors of either require\n use of business contact information and certain account\n usage information. This information is not Content.\n Business Contact Information is used to communicate and\n manage business dealings with the Customer. Examples of\n Business Contact Information include name, business\n telephone, address, email, user ID, and tax registration\n information. Account Usage Information is required to\n enable, provide, manage, support, administer, and\n improve the IBM Technology. Examples of Account Usage\n Information include digital information gathered using\n tracking technologies, such as cookies and web beacons\n during use of the IBM Technology.\n </li>\n <li>\n The IBM Privacy Statement at\n <a href=\"https://www.ibm.com/privacy/\">\n https://www.ibm.com/privacy/\n </a>\n provides additional details with respect to IBM's\n collection, use, and handling of business contact and\n account usage information.\n </li>\n <li>\n When Customer provides information to IBM and notice to,\n or consent by, the individuals is required for such\n processing, Customer will notify individuals and obtain\n consent.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>b. Publicity</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n This Agreement does not confer any rights to use in\n advertising, publicity other marketing activities any\n name, trade name, trademark, or other designation of\n either party hereto, including any contraction,\n abbreviation, or simulation of any of the foregoing,\n without prior written approval, and neither party will\n use or refer to this Agreement or its terms in any such\n activities without the express written approval of the\n other party.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>c. Assignment</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Neither party may assign, or otherwise transfer, its\n rights or delegate its obligations under this Agreement,\n in whole or in part, without the prior written consent\n of the other. Any attempt to do so will be void.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>d. Notices and Administration</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n All notices under this Agreement must be in writing and\n sent to: IBM Corporation, 1101 Kitchawan Drive, Office\n 36-238C, Yorktown Heights, 10598 New York, USA, Attn:\n <a href=\"mailto:research.contracts@ibm.com\">\n research.contracts@ibm.com\n </a>\n .\n </li>\n <li>\n The parties’ consent to the use of electronic means for\n communications as a signed writing.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>e. Export Control</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Each Party shall comply with all applicable export and\n import laws and associated embargo and economic sanction\n regulations, including those of the United States, that\n prohibit or restrict the export, re-export, or transfer\n of products, technology, services or data, directly or\n indirectly, to certain countries, or for certain end\n uses or end users. Technology, software, and items\n furnished under this Agreement are subject to United\n States export/re-export control laws and regulations,\n including the U.S. Export Administration Regulations\n (EAR). The Parties will not provide technical data,\n defense articles, or services controlled under the U.S.\n International Traffic in Arms Regulations (ITAR).\n Further, unless authorized by applicable government\n license or otherwise permitted by regulation, including\n but not limited to any U.S. authorization, each Party\n may not directly or indirectly export or re-export, at\n any time, any technology, software, and/or commodities\n furnished or developed under this Agreement between the\n Parties, or its direct product, to any prohibited\n country (including release of technology, software,\n and/or commodities to nationals, wherever they may be\n located, of any prohibited country) as specified in\n applicable export, embargo, and sanctions regulations.\n Prohibited countries include Sudan, Ukraine (including\n the Crimea, Donetsk, Luhansk, Kherson, and Zaporizhia\n (Zaporizhzhia) regions of Ukraine), and countries in\n Country Group D:1, E:1 or E:2, of the U.S. Export\n Administration Regulations Supplement No. 1 to Part 740\n of the EAR\n https://www.bis.doc.gov/index.php/regulations/export-administration-regulations-ear.\n The Parties acknowledge that these obligations survive\n the termination of this Agreement.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>f. Cause of Action</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Neither party will bring a legal action arising out of\n or related to this Agreement, regardless of form, more\n than one (1) year after the cause of action has accrued.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>g. Governing Law and Dispute Resolution</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n The Parties agree to the application of the laws of the\n State of New York, United States, without regard to the\n conflict of laws provisions thereof, to any disputes\n under this Agreement.\n </li>\n <li>\n Any proceedings to resolve disputes relating to this\n Agreement shall be brought only in the State of New\n York, and in a U.S. federal court in New York State if\n there is jurisdiction. The Parties waive the right to\n trial by jury in any matter which arises under this\n Agreement.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>h. Global Resources</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n IBM may use personnel and resources in locations\n worldwide, including contractors, to support the\n delivery of the IBM Technology.\n </li>\n <li>\n Customer’s use of the IBM Technology may result in the\n transfer of Content across country borders.\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <p>\n <strong>i. Survival</strong>\n </p>\n </td>\n <td valign=\"top\">\n <ul>\n <li>\n Any rights and obligations which by their nature survive\n and continue after the termination of this Agreement\n will survive and continue to bind the Parties and their\n successors and assigns until such obligations are\n fulfilled.\n </li>\n <li>\n If any provision of the Agreement is invalid or\n unenforceable, the remaining provisions remain in full\n force and effect.\n </li>\n </ul>\n </td>\n </tr>\n </tbody>\n</table>","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { AuthGuard, EcommerceGuard } from '@bitf/guards';\nimport { NotFoundComponent } from '@core/components/not-found/not-found.component';\n\nimport { SignInComponent } from '@modules/login/sign-in/sign-in.component';\nimport { LogoutComponent } from '@modules/login/logout/logout.component';\nimport { RedirectComponent, GetAuthTokenComponent } from '@bitf/components/functional';\nimport { MainLayoutComponent } from './core/components/main-layout/main-layout.component';\nimport { TermsOfUseComponent } from './core/components/terms-of-use/terms-of-use.component';\n\nconst routes: Routes = [\n { path: '', redirectTo: 'home', pathMatch: 'full' },\n {\n path: 'sign-in',\n component: SignInComponent,\n },\n {\n path: 'afterauth',\n component: GetAuthTokenComponent,\n },\n {\n path: 'logout',\n component: LogoutComponent,\n },\n {\n path: '',\n component: MainLayoutComponent,\n children: [\n {\n path: 'home',\n canActivateChild: [AuthGuard],\n loadChildren: () => import('src/app/modules/home/home.module').then(m => m.HomeModule),\n },\n {\n path: 'projects',\n canActivateChild: [AuthGuard],\n loadChildren: () => import('src/app/modules/projects/projects.module').then(m => m.ProjectsModule),\n },\n {\n path: 'robo-rxn',\n loadChildren: () => import('src/app/modules/robo-rxn/robo-rxn.module').then(m => m.RoboRxnModule),\n },\n {\n path: 'learn',\n loadChildren: () => import('src/app/modules/learn/learn.module').then(m => m.LearnModule),\n canActivateChild: [AuthGuard],\n },\n {\n path: 'subscription',\n loadChildren: () =>\n import('src/app/modules/subscription/subscription.module').then(m => m.SubscriptionModule),\n canActivateChild: [AuthGuard, EcommerceGuard],\n },\n {\n // for backward compatibility\n path: 'user-subscription',\n redirectTo: 'account/subscription',\n },\n {\n path: 'account',\n loadChildren: () => import('src/app/modules/account/account.module').then(m => m.AccountModule),\n canActivateChild: [AuthGuard],\n },\n {\n path: 'actions',\n loadChildren: () => import('src/app/modules/actions/actions.module').then(m => m.ActionsModule),\n canActivate: [AuthGuard],\n },\n {\n path: 'streaming',\n loadChildren: () => import('src/app/modules/streaming/streaming.module').then(m => m.StreamingModule),\n canActivate: [AuthGuard],\n },\n {\n path: 'collaborators',\n loadChildren: () =>\n import('src/app/modules/collaborators/collaborators.module').then(m => m.CollaboratorsModule),\n canActivateChild: [AuthGuard],\n },\n {\n path: 'public',\n loadChildren: () => import('src/app/modules/public/public.module').then(m => m.PublicModule),\n },\n {\n path: 'admin',\n loadChildren: () => import('src/app/modules/admin/admin.module').then(m => m.AdminModule),\n canActivateChild: [AuthGuard],\n },\n {\n path: 'tmap',\n loadChildren: () => import('src/app/modules/tmap/tmap.module').then(m => m.TmapModule),\n canActivateChild: [AuthGuard],\n },\n {\n path: 'model-tuner',\n loadChildren: () =>\n import('@app/modules/model-tuner/model-tuner.module').then(m => m.ModelTunerModule),\n canActivateChild: [AuthGuard],\n },\n {\n path: 'optical-chemical-recognition',\n loadChildren: () =>\n import('@app/modules/optical-chemical-recognition/optical-chemical-recognition.module').then(\n m => m.OpticalChemicalRecognitionModule\n ),\n canActivateChild: [AuthGuard],\n },\n {\n path: 'terms-of-use',\n component: TermsOfUseComponent,\n },\n {\n path: 'redirect',\n component: RedirectComponent,\n canActivate: [AuthGuard],\n },\n {\n path: '**',\n component: NotFoundComponent,\n },\n ],\n },\n];\n\n@NgModule({\n imports: [\n RouterModule.forRoot(routes, {\n paramsInheritanceStrategy: 'always',\n anchorScrolling: 'enabled',\n scrollOffset: [0, 64],\n }),\n ],\n exports: [RouterModule],\n})\nexport class AppRoutingModule {}\n","import { Component, OnInit, OnDestroy } from '@angular/core';\n\n@Component({\n selector: 'ibm-mlrp-footer',\n templateUrl: './footer.component.html',\n styleUrls: ['./footer.component.scss'],\n})\nexport class FooterComponent implements OnInit, OnDestroy {\n constructor() {}\n\n ngOnInit() {}\n\n ngOnDestroy() {}\n}\n","<div class=\"ibm--footer-space\"></div>\n<footer class=\"small--xs muted py-5 text-center\">\n â’¸ IBM\n <strong>RXN</strong>\n</footer>","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\nimport { SharedModule } from '@shared/shared.module';\n\nimport { SignInComponent } from '@modules/login/sign-in/sign-in.component';\nimport { LogoutComponent } from './logout/logout.component';\n\n@NgModule({\n imports: [SharedModule, RouterModule],\n declarations: [SignInComponent, LogoutComponent],\n})\nexport class LoginModule {}\n","import { HttpRequest } from '@angular/common/http';\n\nexport const isCallingApi = (environment, req: HttpRequest<any>) =>\n req.url.includes(environment.authInterceptorUrl) || req.url.includes('localhost');\n","import { Injectable } from '@angular/core';\nimport { HttpEvent, HttpHandler, HttpRequest, HttpResponse, HttpErrorResponse } from '@angular/common/http';\nimport { Observable } from 'rxjs/Observable';\nimport { tap } from 'rxjs/operators';\n\nimport { environment } from '@env/environment';\nimport { DialogsService, ToastMessagesService } from '@services';\n\nimport { isCallingApi } from '@bitf/utils';\nimport { IApiDefaultEnvelope } from '@bitf/api/parsers/default-parser';\nimport { IApiMessage } from '@bitf/api';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { OkCancelDialogComponent } from '@shared/components/ok-cancel-dialog/ok-cancel-dialog.component';\n\n@Injectable()\nexport class ApiUiMessagesInterceptor {\n messageTypes = ['infos', 'warnings', 'errors'];\n\n constructor(private toastMessagesService: ToastMessagesService, private dialogsService: DialogsService) {}\n\n intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n return next.handle(req).pipe(\n tap(\n response => {\n if (isCallingApi(environment, req) && response instanceof HttpResponse) {\n this.parseUiMessages(response.body);\n }\n return response;\n },\n error => {\n if (isCallingApi(environment, req) && error instanceof HttpErrorResponse) {\n this.parseUiMessages(error.error, error);\n }\n }\n )\n );\n }\n\n parseUiMessages(payload: IApiDefaultEnvelope, error?: HttpErrorResponse) {\n const uiMessages = payload && payload.metadata && payload.metadata.uiMessages;\n if (uiMessages) {\n this.messageTypes.forEach(messageType => {\n this.parseUiMessageByType(uiMessages, messageType);\n });\n } else if (error) {\n this.toastMessagesService.show({\n title: `Server error ${error.status}`,\n message: error.message,\n type: EToastMessageType.ERROR,\n });\n }\n }\n\n parseUiMessageByType(uiMessages, messageType) {\n uiMessages[messageType].forEach((message: IApiMessage) => {\n switch (message.target) {\n case 'TOAST':\n this.showToastMessages(message);\n break;\n case 'DIALOG':\n this.showDialog(message);\n break;\n case 'CONSOLE':\n console.log(message);\n break;\n default:\n console.log(message);\n break;\n }\n });\n }\n\n showToastMessages(uiMessage: IApiMessage) {\n let toastMessageType: EToastMessageType;\n switch (uiMessage.type) {\n case 'SUCCESS':\n toastMessageType = EToastMessageType.SUCCESS;\n break;\n case 'INFO':\n toastMessageType = EToastMessageType.SUCCESS;\n break;\n case 'WARNING':\n toastMessageType = EToastMessageType.WARNING;\n break;\n case 'ERROR':\n toastMessageType = EToastMessageType.ERROR;\n break;\n default:\n toastMessageType = EToastMessageType.WARNING;\n break;\n }\n\n this.toastMessagesService.show({\n title: uiMessage.title || '',\n message: uiMessage.message || '',\n duration: uiMessage.duration || 10000,\n type: toastMessageType,\n });\n }\n\n showDialog(uiMessage: IApiMessage) {\n this.dialogsService.dialog.closeAll();\n this.dialogsService.dialog.open(OkCancelDialogComponent, {\n title: uiMessage.title,\n message: uiMessage.message,\n okText: 'Ok',\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\nimport { Observable } from 'rxjs/Observable';\n\nimport { isCallingApi } from '@bitf/utils';\nimport { environment } from '@env/environment';\nimport { AuthService } from '@bitf/services';\n@Injectable()\nexport class OAuthInterceptor implements HttpInterceptor {\n constructor(private authService: AuthService) {}\n\n intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n const isCallingLoginEndpoints = req.url.includes('/auth/security');\n const isPublicApi = req.url.includes('/retrosynthesis-snapshots');\n\n if (\n !isPublicApi &&\n isCallingApi(environment, req) &&\n !isCallingLoginEndpoints &&\n this.authService.authToken\n ) {\n const authReq = req.clone({\n headers: req.headers.set('Authorization', `Bearer ${this.authService.authToken}`),\n });\n return next.handle(authReq);\n }\n return next.handle(req);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n HttpEvent,\n HttpInterceptor,\n HttpHandler,\n HttpRequest,\n HttpErrorResponse,\n} from '@angular/common/http';\nimport { Observable } from 'rxjs/Observable';\nimport { throwError, TimeoutError, timer } from 'rxjs';\nimport { timeout, retryWhen, mergeMap } from 'rxjs/operators';\n\nimport { environment } from '@env/environment';\nimport { isCallingApi } from '@bitf/utils';\nimport { ToastMessagesService } from '@app/core/services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\n\n@Injectable()\nexport class RetryInterceptor implements HttpInterceptor {\n constructor(private toastMessagesService: ToastMessagesService) {}\n\n intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n if (!isCallingApi(environment, req) || !environment.httpRetryConfig.enabled) {\n return next.handle(req);\n }\n\n const config = environment.httpRetryConfig.verbs[req.method.toLowerCase()] || null;\n\n if (!config || !config.enabled) {\n return next.handle(req);\n }\n\n let retryAttempt = 0;\n return next.handle(req).pipe(\n timeout(config.timeout * (1 + 0.2 * retryAttempt)),\n retryWhen(\n (obs: Observable<Error>): Observable<number> =>\n obs.pipe(\n mergeMap((error, i) => {\n retryAttempt = i + 1;\n const shouldRetryForStatus =\n error instanceof HttpErrorResponse && config.retryForStatusesCodes.includes(error.status);\n const shouldRetryAgain = retryAttempt <= config.maxRetries;\n const isTimeoutError = error instanceof TimeoutError;\n const shouldRetryOnTimeout = isTimeoutError && config.timeout;\n if (shouldRetryAgain && (shouldRetryForStatus || shouldRetryOnTimeout)) {\n // NOTE: wait 1sec + incremental shift before to do another call\n return timer(1000 * (1 + 0.2 * (retryAttempt - 1)));\n }\n this.toastMessagesService.show({\n title: 'HTTP Error',\n message: `Request timeout`,\n type: EToastMessageType.ERROR,\n });\n return throwError(error);\n })\n )\n )\n );\n }\n}\n","import { Component, Inject } from '@angular/core';\n\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\nimport { ToastMessagesService, ApiService } from '@services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { SuperModalComponent } from '../super-modal/super-modal.component';\n\n@Component({\n selector: 'ibm-message-after-login',\n templateUrl: './message-after-login.component.html',\n styleUrls: ['./message-after-login.component.scss'],\n})\nexport class MessageAfterLoginComponent extends SuperModalComponent {\n agreeTerms = false;\n enrollUpdates = false;\n disabledHandleKeyboardEvent = true;\n\n constructor(\n @Inject('dialogData') public dialogData: any,\n private apiService: ApiService,\n private toastMessagesService: ToastMessagesService\n ) {\n super();\n }\n\n closeModal(): void {\n this.close.emit({\n status: EDialogCloseEventStatus.CLOSE,\n } as IDialogCloseEvent<void>);\n }\n\n onOK() {\n this.apiService.users.addTerms().subscribe(x => {\n if (x.metadata.uiMessages.errors.length === 0) {\n this.toastMessagesService.show({\n title: 'Terms and Conditions',\n message: 'Terms and Conditions have been accepted',\n type: EToastMessageType.SUCCESS,\n });\n }\n });\n if (this.enrollUpdates) {\n this.apiService.hubspot.subscribeHubspot().subscribe(x => {\n if (x.metadata.uiMessages.errors.length === 0) {\n this.toastMessagesService.show({\n title: 'Hubspot Success',\n message: 'Hubspot Success',\n type: EToastMessageType.SUCCESS,\n });\n }\n });\n }\n this.close.emit({\n status: EDialogCloseEventStatus.OK,\n } as IDialogCloseEvent<void>);\n }\n}\n","<ibm-modal class=\"message-after-login\"\n [open]=\"open\">\n <ibm-modal-header [showCloseButton]=false>\n <h3 ibmModalHeaderHeading>Terms and Conditions</h3>\n </ibm-modal-header>\n <div ibmModalContent>\n <div class=\"mt-5\">\n <ibm-checkbox id=\"agreeTerms\"\n [(ngModel)]=\"agreeTerms\">\n I accept the <a [routerLink]=\"['/terms-of-use']\"\n target=\"_blank\">terms and conditions</a>.\n </ibm-checkbox>\n </div>\n <div class=\"mt-5\">\n <ibm-checkbox id=\"enrollUpdates\"\n [(ngModel)]=\"enrollUpdates\">\n Sign me up for occasional Accelerated Discovery updates.\n </ibm-checkbox>\n </div>\n </div>\n <ibm-modal-footer>\n <button id=\"submitTerms\"\n [disabled]=\"!agreeTerms\"\n ibmButton=\"primary\"\n (click)=\"onOK()\">\n Submit\n </button>\n </ibm-modal-footer>\n</ibm-modal>","import { Component, Inject } from '@angular/core';\n\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\nimport { BaseModal } from 'carbon-components-angular';\n\n@Component({\n selector: 'ibm-dpl-fail',\n templateUrl: './dpl-fail.component.html',\n styleUrls: ['./dpl-fail.component.scss'],\n})\nexport class DplFailComponent extends BaseModal {\n // NOTE: this is read from the MessagesAfterLoginService\n\n constructor(@Inject('dialogData') public dialogData: any) {\n super();\n }\n\n closeModal(): void {\n this.close.emit({\n status: EDialogCloseEventStatus.CLOSE,\n } as IDialogCloseEvent<void>);\n }\n}\n","<ibm-modal class=\"message-after-login\"\n [open]=\"open\">\n <ibm-modal-header [showCloseButton]=false>\n <h3 ibmModalHeaderHeading>User Account Approval In Progress</h3>\n </ibm-modal-header>\n <div ibmModalContent>\n <div class=\"mt-5\">\n Your account is currently under review. You will be notified when you are able to access RXN.\n </div>\n </div>\n <ibm-modal-footer>\n <button [routerLink]=\"['/', 'logout']\"\n (click)=\"closeModal()\"\n ibmButton=\"primary\"\n size=\"md\">Logout</button>\n </ibm-modal-footer>\n</ibm-modal>","import { NgModule, Optional, SkipSelf, ErrorHandler } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';\nimport { RouterModule } from '@angular/router';\nimport { BrowserModule } from '@angular/platform-browser';\n\nimport { throwIfAlreadyLoaded } from '@core/module-config';\nimport { FooterComponent } from '@core/components/footer/footer.component';\nimport { NotFoundComponent } from '@core/components/not-found/not-found.component';\nimport { SharedModule } from '@shared/shared.module';\n\n// Modules included in main bundle (not lazy loaded)\nimport { LoginModule } from '@modules/login/login.module';\nimport { OAuthInterceptor, RetryInterceptor, ApiUiMessagesInterceptor } from '@bitf/interceptors';\nimport { RedirectComponent, GetAuthTokenComponent } from '@bitf/components/functional';\n\nimport { ErrorHandlerService } from '@bitf/services';\nimport { MessageAfterLoginComponent } from './components/message-after-login/message-after-login.component';\nimport { DplFailComponent } from './components/dpl-fail/dpl-fail.component';\nimport { MainLayoutComponent } from './components/main-layout/main-layout.component';\nimport { FullscreenLoadingComponent } from './components/fullscreen-loading/fullscreen-loading.component';\nimport { TermsOfUseComponent } from './components/terms-of-use/terms-of-use.component';\n\nconst DECLARE_EXPORTS_COMPONENTS = [\n FooterComponent,\n NotFoundComponent,\n RedirectComponent,\n GetAuthTokenComponent,\n MessageAfterLoginComponent,\n MainLayoutComponent,\n GetAuthTokenComponent,\n DplFailComponent,\n FullscreenLoadingComponent,\n TermsOfUseComponent,\n];\n\n@NgModule({\n imports: [BrowserModule, CommonModule, HttpClientModule, SharedModule.forRoot(), RouterModule, LoginModule],\n providers: [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: OAuthInterceptor,\n multi: true,\n },\n {\n provide: HTTP_INTERCEPTORS,\n useClass: ApiUiMessagesInterceptor,\n multi: true,\n },\n {\n provide: HTTP_INTERCEPTORS,\n useClass: RetryInterceptor,\n multi: true,\n },\n { provide: ErrorHandler, useClass: ErrorHandlerService },\n ],\n declarations: [...DECLARE_EXPORTS_COMPONENTS],\n exports: [...DECLARE_EXPORTS_COMPONENTS],\n})\nexport class CoreModule {\n constructor(\n @Optional()\n @SkipSelf()\n parentModule: CoreModule\n ) {\n throwIfAlreadyLoaded(parentModule, 'CoreModule');\n }\n}\n","export function throwIfAlreadyLoaded(parentModule: any, moduleName: string) {\n if (parentModule) {\n throw new Error(`${moduleName} has already been loaded. Import Core modules in the AppModule only.`);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { MessageAfterLoginComponent } from '../components/message-after-login/message-after-login.component';\nimport { EDialogCloseEventStatus } from './dialog/dialog.enum';\nimport { DialogsService } from './dialog/dialog.service';\nimport { of } from 'rxjs';\nimport { SelectCountryDialogComponent } from '@app/shared/components/select-country-dialog/select-country-dialog.component';\nimport { switchMap, tap } from 'rxjs/operators';\nimport { ApiService } from './api';\nimport { EToastMessageType } from './toast-messages/toast-message.enum';\nimport { ToastMessagesService } from './toast-messages/toast-messages.service';\nimport { ReleaseNotesDialogComponent } from '@app/shared/components/release-notes-dialog/release-notes-dialog.component';\nimport { IDialogCloseEvent } from './dialog/dialog.interface';\nimport { environment } from '@env/environment';\n@Injectable({\n providedIn: 'root',\n})\nexport class MessagesAfterLoginService {\n constructor(\n private apiService: ApiService,\n private dialogsService: DialogsService,\n private toastMessagesService: ToastMessagesService\n ) {}\n\n showMessages() {\n const user = this.apiService.auth.user;\n if (user.isBlocked === true) {\n this.toastMessagesService.show({\n title: 'User Account Approval In Progress',\n message:\n 'Your account is currently under review. You will be notified when you are able to access RXN.',\n type: EToastMessageType.ERROR,\n });\n this.apiService.auth.logout();\n } else {\n of(true)\n .pipe(\n switchMap(() => {\n if (!user.country && environment.ecommerceEnabled) {\n return this.dialogsService.dialog.open(SelectCountryDialogComponent, {}).afterClosed();\n }\n return of({ status: EDialogCloseEventStatus.CLOSE });\n }),\n switchMap(() => {\n if (user.isTerms !== true) {\n return this.dialogsService.dialog.open(MessageAfterLoginComponent, {}).afterClosed();\n }\n return of({ status: EDialogCloseEventStatus.CLOSE });\n }),\n switchMap(() => {\n let releaseNotes;\n try {\n releaseNotes = JSON.parse(localStorage.getItem('releaseNotes'));\n } catch (e) {}\n releaseNotes = releaseNotes || { version: 0 };\n\n if (releaseNotes.version < ReleaseNotesDialogComponent.version) {\n return this.dialogsService.dialog\n .open(ReleaseNotesDialogComponent, {})\n .afterClosed()\n .pipe(\n tap((response: IDialogCloseEvent<any>) => {\n if (response?.status === EDialogCloseEventStatus.OK) {\n localStorage.setItem(\n 'releaseNotes',\n JSON.stringify({\n version: ReleaseNotesDialogComponent.version,\n })\n );\n }\n })\n );\n }\n return of({ status: EDialogCloseEventStatus.CLOSE });\n })\n )\n .subscribe();\n }\n }\n}\n","import { Component, HostListener, OnDestroy, OnInit } from '@angular/core';\nimport { ApiService } from './core/services';\nimport { MessagesAfterLoginService } from './core/services/messages-after-login.service';\nimport { SocketService } from './core/services/socket.service';\nimport { filter, take } from 'rxjs/operators';\nimport { SocketNotificationService } from './core/services/socket-notification.service';\nimport { environment } from '@env/environment';\n\n@Component({\n selector: 'ibm-app',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.scss'],\n})\nexport class AppComponent implements OnInit, OnDestroy {\n constructor(\n private apiService: ApiService,\n private messagesAfterLoginService: MessagesAfterLoginService,\n private socketService: SocketService,\n private socketNotificationService: SocketNotificationService\n ) {}\n\n ngOnInit() {\n this.apiService.auth.user$\n .pipe(\n filter(user => !!user),\n take(1)\n )\n .subscribe(() => {\n this.messagesAfterLoginService.showMessages();\n this.socketService.connect();\n this.socketNotificationService.init();\n });\n }\n\n @HostListener('window:resize', ['$event'])\n onResize() {\n // This utility manages mobile viewport (when height 100% goes over the page)\n document.documentElement.style.setProperty('--vh', `${window.innerHeight * 0.01}px`);\n }\n\n ngOnDestroy() {\n this.socketService.unsubscribe();\n }\n}\n","<router-outlet></router-outlet>\n<bitf-loader></bitf-loader>\n<ibm-placeholder></ibm-placeholder>\n<div class=\"notification-container\"></div>","import { NgModule } from '@angular/core';\n\nimport { AppRoutingModule } from '@app/app-routing.module';\n\nimport { CoreModule } from '@app/core/core.module';\nimport { SharedModule } from '@shared/shared.module';\nimport { AppComponent } from './app.component';\n\n@NgModule({\n declarations: [AppComponent],\n imports: [AppRoutingModule, CoreModule, SharedModule],\n bootstrap: [AppComponent],\n})\nexport class AppModule {}\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from '@env/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic()\n .bootstrapModule(AppModule)\n .then(module => {\n window['rootInjector'] = module.injector;\n })\n .catch(err => console.log(err));\n","var map = {\n\t\"./v1/self-service/AE.json\": 25141,\n\t\"./v1/self-service/ALL.json\": 21475,\n\t\"./v1/self-service/AO.json\": 68507,\n\t\"./v1/self-service/AT.json\": 57862,\n\t\"./v1/self-service/AU.json\": 73616,\n\t\"./v1/self-service/AZ.json\": 29827,\n\t\"./v1/self-service/BE.json\": 60162,\n\t\"./v1/self-service/BH.json\": 44232,\n\t\"./v1/self-service/BN.json\": 27718,\n\t\"./v1/self-service/BR.json\": 21128,\n\t\"./v1/self-service/CA.json\": 53990,\n\t\"./v1/self-service/CH.json\": 31790,\n\t\"./v1/self-service/CN.json\": 15863,\n\t\"./v1/self-service/CY.json\": 88461,\n\t\"./v1/self-service/CZ.json\": 37907,\n\t\"./v1/self-service/DE.json\": 27335,\n\t\"./v1/self-service/DK.json\": 45227,\n\t\"./v1/self-service/EE.json\": 67819,\n\t\"./v1/self-service/EG.json\": 47519,\n\t\"./v1/self-service/ES.json\": 30085,\n\t\"./v1/self-service/FI.json\": 17925,\n\t\"./v1/self-service/FR.json\": 76405,\n\t\"./v1/self-service/GH.json\": 88074,\n\t\"./v1/self-service/GR.json\": 56399,\n\t\"./v1/self-service/HK.json\": 54578,\n\t\"./v1/self-service/HR.json\": 57194,\n\t\"./v1/self-service/HU.json\": 92784,\n\t\"./v1/self-service/IE.json\": 17068,\n\t\"./v1/self-service/IL.json\": 53364,\n\t\"./v1/self-service/IN.json\": 85841,\n\t\"./v1/self-service/IT.json\": 74335,\n\t\"./v1/self-service/JO.json\": 70222,\n\t\"./v1/self-service/JP.json\": 12770,\n\t\"./v1/self-service/KE.json\": 77593,\n\t\"./v1/self-service/KR.json\": 38164,\n\t\"./v1/self-service/LT.json\": 50082,\n\t\"./v1/self-service/LU.json\": 35013,\n\t\"./v1/self-service/LV.json\": 76344,\n\t\"./v1/self-service/MX.json\": 65833,\n\t\"./v1/self-service/MY.json\": 94927,\n\t\"./v1/self-service/NG.json\": 64549,\n\t\"./v1/self-service/NL.json\": 91169,\n\t\"./v1/self-service/NO.json\": 73833,\n\t\"./v1/self-service/NZ.json\": 38367,\n\t\"./v1/self-service/OM.json\": 4726,\n\t\"./v1/self-service/PH.json\": 66111,\n\t\"./v1/self-service/PK.json\": 59330,\n\t\"./v1/self-service/PL.json\": 68191,\n\t\"./v1/self-service/PT.json\": 83998,\n\t\"./v1/self-service/QA.json\": 69327,\n\t\"./v1/self-service/RO.json\": 39209,\n\t\"./v1/self-service/RU.json\": 64751,\n\t\"./v1/self-service/SA.json\": 90013,\n\t\"./v1/self-service/SE.json\": 99931,\n\t\"./v1/self-service/SG.json\": 78685,\n\t\"./v1/self-service/TH.json\": 38718,\n\t\"./v1/self-service/TW.json\": 64892,\n\t\"./v1/self-service/UK.json\": 69053,\n\t\"./v1/self-service/US.json\": 90404,\n\t\"./v1/self-service/VN.json\": 60461,\n\t\"./v1/self-service/ZA.json\": 59158,\n\t\"./v1/self-service/ZM.json\": 77018,\n\t\"./v1/self-service/country-business-rules.schema.json\": 71403,\n\t\"./v2/self-service/AE.json\": 1922,\n\t\"./v2/self-service/ALL.json\": 69010,\n\t\"./v2/self-service/AO.json\": 76783,\n\t\"./v2/self-service/AT.json\": 45774,\n\t\"./v2/self-service/AU.json\": 13615,\n\t\"./v2/self-service/AZ.json\": 66680,\n\t\"./v2/self-service/BE.json\": 81994,\n\t\"./v2/self-service/BH.json\": 38239,\n\t\"./v2/self-service/BN.json\": 72620,\n\t\"./v2/self-service/BR.json\": 71386,\n\t\"./v2/self-service/CA.json\": 31057,\n\t\"./v2/self-service/CH.json\": 38951,\n\t\"./v2/self-service/CN.json\": 14331,\n\t\"./v2/self-service/CY.json\": 41598,\n\t\"./v2/self-service/CZ.json\": 8414,\n\t\"./v2/self-service/DE.json\": 56907,\n\t\"./v2/self-service/DK.json\": 98161,\n\t\"./v2/self-service/EE.json\": 93971,\n\t\"./v2/self-service/EG.json\": 54719,\n\t\"./v2/self-service/ES.json\": 92193,\n\t\"./v2/self-service/FI.json\": 45365,\n\t\"./v2/self-service/FR.json\": 19286,\n\t\"./v2/self-service/GH.json\": 14670,\n\t\"./v2/self-service/GR.json\": 9379,\n\t\"./v2/self-service/HK.json\": 47043,\n\t\"./v2/self-service/HR.json\": 96889,\n\t\"./v2/self-service/HU.json\": 6277,\n\t\"./v2/self-service/IE.json\": 22070,\n\t\"./v2/self-service/IL.json\": 21180,\n\t\"./v2/self-service/IN.json\": 28113,\n\t\"./v2/self-service/IT.json\": 50923,\n\t\"./v2/self-service/JO.json\": 11841,\n\t\"./v2/self-service/JP.json\": 77231,\n\t\"./v2/self-service/KE.json\": 57590,\n\t\"./v2/self-service/KR.json\": 12677,\n\t\"./v2/self-service/LT.json\": 13510,\n\t\"./v2/self-service/LU.json\": 64057,\n\t\"./v2/self-service/LV.json\": 5792,\n\t\"./v2/self-service/MX.json\": 18120,\n\t\"./v2/self-service/MY.json\": 1820,\n\t\"./v2/self-service/NG.json\": 95363,\n\t\"./v2/self-service/NL.json\": 40731,\n\t\"./v2/self-service/NO.json\": 61766,\n\t\"./v2/self-service/NZ.json\": 40852,\n\t\"./v2/self-service/OM.json\": 91762,\n\t\"./v2/self-service/PH.json\": 95710,\n\t\"./v2/self-service/PK.json\": 14361,\n\t\"./v2/self-service/PL.json\": 55297,\n\t\"./v2/self-service/PT.json\": 75961,\n\t\"./v2/self-service/QA.json\": 77244,\n\t\"./v2/self-service/RO.json\": 31869,\n\t\"./v2/self-service/RU.json\": 5173,\n\t\"./v2/self-service/SA.json\": 42215,\n\t\"./v2/self-service/SE.json\": 40662,\n\t\"./v2/self-service/SG.json\": 38682,\n\t\"./v2/self-service/TH.json\": 81085,\n\t\"./v2/self-service/TW.json\": 51503,\n\t\"./v2/self-service/UK.json\": 92990,\n\t\"./v2/self-service/US.json\": 30044,\n\t\"./v2/self-service/VN.json\": 84214,\n\t\"./v2/self-service/ZA.json\": 94310,\n\t\"./v2/self-service/ZM.json\": 96463,\n\t\"./v2/self-service/country-business-rules.schema.json\": 88900,\n\t\"./v3/self-service/AE.json\": 67370,\n\t\"./v3/self-service/ALL.json\": 4731,\n\t\"./v3/self-service/AO.json\": 81468,\n\t\"./v3/self-service/AT.json\": 43453,\n\t\"./v3/self-service/AU.json\": 92352,\n\t\"./v3/self-service/AZ.json\": 93725,\n\t\"./v3/self-service/BE.json\": 75960,\n\t\"./v3/self-service/BH.json\": 81934,\n\t\"./v3/self-service/BN.json\": 49270,\n\t\"./v3/self-service/BR.json\": 82271,\n\t\"./v3/self-service/CA.json\": 93915,\n\t\"./v3/self-service/CH.json\": 88779,\n\t\"./v3/self-service/CN.json\": 87241,\n\t\"./v3/self-service/CY.json\": 52351,\n\t\"./v3/self-service/CZ.json\": 87459,\n\t\"./v3/self-service/DE.json\": 92145,\n\t\"./v3/self-service/DK.json\": 45674,\n\t\"./v3/self-service/EE.json\": 80212,\n\t\"./v3/self-service/EG.json\": 65960,\n\t\"./v3/self-service/ES.json\": 82072,\n\t\"./v3/self-service/FI.json\": 75623,\n\t\"./v3/self-service/FR.json\": 10573,\n\t\"./v3/self-service/GH.json\": 83626,\n\t\"./v3/self-service/GR.json\": 49486,\n\t\"./v3/self-service/HK.json\": 94472,\n\t\"./v3/self-service/HR.json\": 69789,\n\t\"./v3/self-service/HU.json\": 40295,\n\t\"./v3/self-service/IE.json\": 74458,\n\t\"./v3/self-service/IL.json\": 92577,\n\t\"./v3/self-service/IN.json\": 58648,\n\t\"./v3/self-service/IT.json\": 90414,\n\t\"./v3/self-service/JO.json\": 28038,\n\t\"./v3/self-service/JP.json\": 35202,\n\t\"./v3/self-service/KE.json\": 60091,\n\t\"./v3/self-service/KR.json\": 72683,\n\t\"./v3/self-service/LT.json\": 86677,\n\t\"./v3/self-service/LU.json\": 21773,\n\t\"./v3/self-service/LV.json\": 33686,\n\t\"./v3/self-service/MX.json\": 46721,\n\t\"./v3/self-service/MY.json\": 75663,\n\t\"./v3/self-service/NG.json\": 66738,\n\t\"./v3/self-service/NL.json\": 28152,\n\t\"./v3/self-service/NO.json\": 54781,\n\t\"./v3/self-service/NZ.json\": 600,\n\t\"./v3/self-service/OM.json\": 74811,\n\t\"./v3/self-service/PH.json\": 33626,\n\t\"./v3/self-service/PK.json\": 86978,\n\t\"./v3/self-service/PL.json\": 85479,\n\t\"./v3/self-service/PT.json\": 8608,\n\t\"./v3/self-service/QA.json\": 18847,\n\t\"./v3/self-service/RO.json\": 33843,\n\t\"./v3/self-service/RU.json\": 61409,\n\t\"./v3/self-service/SA.json\": 19086,\n\t\"./v3/self-service/SE.json\": 49608,\n\t\"./v3/self-service/SG.json\": 46217,\n\t\"./v3/self-service/TH.json\": 92761,\n\t\"./v3/self-service/TW.json\": 26629,\n\t\"./v3/self-service/UK.json\": 82754,\n\t\"./v3/self-service/US.json\": 84331,\n\t\"./v3/self-service/VN.json\": 65241,\n\t\"./v3/self-service/ZA.json\": 57180,\n\t\"./v3/self-service/ZM.json\": 67219,\n\t\"./v3/self-service/country-business-rules.schema.json\": 56882,\n\t\"./v4/country-mapping/country-code-2-list.json\": 59308,\n\t\"./v4/country-mapping/country-code-2-mapping.json\": 69882,\n\t\"./v4/country-mapping/country-code-3-list.json\": 95743,\n\t\"./v4/country-mapping/country-code-3-mapping.json\": 72079,\n\t\"./v4/country-mapping/country-mapping-list.json\": 16406,\n\t\"./v4/country-mapping/country-name-list.json\": 20451,\n\t\"./v4/country-mapping/country-name-mapping.json\": 60527,\n\t\"./v4/self-service/AD.json\": 55310,\n\t\"./v4/self-service/AE.json\": 86335,\n\t\"./v4/self-service/AF.json\": 73970,\n\t\"./v4/self-service/AG.json\": 26572,\n\t\"./v4/self-service/AI.json\": 69599,\n\t\"./v4/self-service/AL.json\": 69455,\n\t\"./v4/self-service/AM.json\": 80907,\n\t\"./v4/self-service/AN.json\": 8051,\n\t\"./v4/self-service/AO.json\": 48070,\n\t\"./v4/self-service/AR.json\": 10749,\n\t\"./v4/self-service/AS.json\": 20694,\n\t\"./v4/self-service/AT.json\": 67743,\n\t\"./v4/self-service/AU.json\": 45553,\n\t\"./v4/self-service/AW.json\": 37887,\n\t\"./v4/self-service/AX.json\": 20506,\n\t\"./v4/self-service/AZ.json\": 16015,\n\t\"./v4/self-service/BA.json\": 96948,\n\t\"./v4/self-service/BB.json\": 25398,\n\t\"./v4/self-service/BD.json\": 26962,\n\t\"./v4/self-service/BE.json\": 72285,\n\t\"./v4/self-service/BF.json\": 98975,\n\t\"./v4/self-service/BG.json\": 64091,\n\t\"./v4/self-service/BH.json\": 54916,\n\t\"./v4/self-service/BI.json\": 23359,\n\t\"./v4/self-service/BJ.json\": 51843,\n\t\"./v4/self-service/BL.json\": 91809,\n\t\"./v4/self-service/BM.json\": 32793,\n\t\"./v4/self-service/BN.json\": 11351,\n\t\"./v4/self-service/BO.json\": 31830,\n\t\"./v4/self-service/BQ.json\": 5845,\n\t\"./v4/self-service/BR.json\": 69845,\n\t\"./v4/self-service/BS.json\": 28383,\n\t\"./v4/self-service/BT.json\": 46296,\n\t\"./v4/self-service/BV.json\": 674,\n\t\"./v4/self-service/BW.json\": 29449,\n\t\"./v4/self-service/BY.json\": 21580,\n\t\"./v4/self-service/BZ.json\": 88028,\n\t\"./v4/self-service/CA.json\": 54011,\n\t\"./v4/self-service/CC.json\": 88018,\n\t\"./v4/self-service/CD.json\": 55396,\n\t\"./v4/self-service/CF.json\": 41043,\n\t\"./v4/self-service/CG.json\": 77783,\n\t\"./v4/self-service/CH.json\": 1607,\n\t\"./v4/self-service/CI.json\": 44532,\n\t\"./v4/self-service/CK.json\": 64662,\n\t\"./v4/self-service/CL.json\": 55472,\n\t\"./v4/self-service/CM.json\": 74976,\n\t\"./v4/self-service/CN.json\": 66434,\n\t\"./v4/self-service/CO.json\": 25977,\n\t\"./v4/self-service/CR.json\": 500,\n\t\"./v4/self-service/CS.json\": 67193,\n\t\"./v4/self-service/CV.json\": 14619,\n\t\"./v4/self-service/CW.json\": 76691,\n\t\"./v4/self-service/CX.json\": 50127,\n\t\"./v4/self-service/CY.json\": 87314,\n\t\"./v4/self-service/CZ.json\": 58133,\n\t\"./v4/self-service/DE.json\": 27401,\n\t\"./v4/self-service/DJ.json\": 66194,\n\t\"./v4/self-service/DK.json\": 49147,\n\t\"./v4/self-service/DM.json\": 47364,\n\t\"./v4/self-service/DO.json\": 14559,\n\t\"./v4/self-service/DZ.json\": 37644,\n\t\"./v4/self-service/EC.json\": 5722,\n\t\"./v4/self-service/EE.json\": 51533,\n\t\"./v4/self-service/EG.json\": 54597,\n\t\"./v4/self-service/EH.json\": 31867,\n\t\"./v4/self-service/ER.json\": 72490,\n\t\"./v4/self-service/ES.json\": 108,\n\t\"./v4/self-service/ET.json\": 3688,\n\t\"./v4/self-service/FI.json\": 19145,\n\t\"./v4/self-service/FJ.json\": 69613,\n\t\"./v4/self-service/FK.json\": 40045,\n\t\"./v4/self-service/FM.json\": 6205,\n\t\"./v4/self-service/FO.json\": 1741,\n\t\"./v4/self-service/FR.json\": 42529,\n\t\"./v4/self-service/GA.json\": 15001,\n\t\"./v4/self-service/GD.json\": 73286,\n\t\"./v4/self-service/GE.json\": 98611,\n\t\"./v4/self-service/GF.json\": 13069,\n\t\"./v4/self-service/GG.json\": 96756,\n\t\"./v4/self-service/GH.json\": 67126,\n\t\"./v4/self-service/GI.json\": 43525,\n\t\"./v4/self-service/GL.json\": 94080,\n\t\"./v4/self-service/GM.json\": 20495,\n\t\"./v4/self-service/GN.json\": 19819,\n\t\"./v4/self-service/GP.json\": 93095,\n\t\"./v4/self-service/GQ.json\": 16045,\n\t\"./v4/self-service/GR.json\": 18342,\n\t\"./v4/self-service/GS.json\": 24244,\n\t\"./v4/self-service/GT.json\": 36482,\n\t\"./v4/self-service/GU.json\": 97781,\n\t\"./v4/self-service/GW.json\": 47487,\n\t\"./v4/self-service/GY.json\": 16459,\n\t\"./v4/self-service/HK.json\": 10515,\n\t\"./v4/self-service/HM.json\": 56895,\n\t\"./v4/self-service/HN.json\": 22308,\n\t\"./v4/self-service/HR.json\": 42849,\n\t\"./v4/self-service/HT.json\": 22195,\n\t\"./v4/self-service/HU.json\": 12375,\n\t\"./v4/self-service/ID.json\": 35443,\n\t\"./v4/self-service/IE.json\": 48302,\n\t\"./v4/self-service/IL.json\": 57327,\n\t\"./v4/self-service/IM.json\": 75705,\n\t\"./v4/self-service/IN.json\": 59435,\n\t\"./v4/self-service/IO.json\": 53501,\n\t\"./v4/self-service/IQ.json\": 85934,\n\t\"./v4/self-service/IS.json\": 91235,\n\t\"./v4/self-service/IT.json\": 21235,\n\t\"./v4/self-service/JE.json\": 80007,\n\t\"./v4/self-service/JM.json\": 70615,\n\t\"./v4/self-service/JO.json\": 13337,\n\t\"./v4/self-service/JP.json\": 74804,\n\t\"./v4/self-service/KE.json\": 91991,\n\t\"./v4/self-service/KG.json\": 13012,\n\t\"./v4/self-service/KH.json\": 14230,\n\t\"./v4/self-service/KI.json\": 26689,\n\t\"./v4/self-service/KM.json\": 23755,\n\t\"./v4/self-service/KN.json\": 12285,\n\t\"./v4/self-service/KR.json\": 77571,\n\t\"./v4/self-service/KW.json\": 29848,\n\t\"./v4/self-service/KY.json\": 31261,\n\t\"./v4/self-service/KZ.json\": 20639,\n\t\"./v4/self-service/LA.json\": 26416,\n\t\"./v4/self-service/LB.json\": 46414,\n\t\"./v4/self-service/LC.json\": 81916,\n\t\"./v4/self-service/LI.json\": 5575,\n\t\"./v4/self-service/LK.json\": 57413,\n\t\"./v4/self-service/LR.json\": 18405,\n\t\"./v4/self-service/LS.json\": 80699,\n\t\"./v4/self-service/LT.json\": 98004,\n\t\"./v4/self-service/LU.json\": 51194,\n\t\"./v4/self-service/LV.json\": 63260,\n\t\"./v4/self-service/LY.json\": 48923,\n\t\"./v4/self-service/MA.json\": 89659,\n\t\"./v4/self-service/MC.json\": 59056,\n\t\"./v4/self-service/MD.json\": 2650,\n\t\"./v4/self-service/ME.json\": 17872,\n\t\"./v4/self-service/MF.json\": 29125,\n\t\"./v4/self-service/MG.json\": 87698,\n\t\"./v4/self-service/MH.json\": 1375,\n\t\"./v4/self-service/MK.json\": 54743,\n\t\"./v4/self-service/ML.json\": 44869,\n\t\"./v4/self-service/MM.json\": 61554,\n\t\"./v4/self-service/MN.json\": 41817,\n\t\"./v4/self-service/MO.json\": 81462,\n\t\"./v4/self-service/MP.json\": 73694,\n\t\"./v4/self-service/MQ.json\": 14681,\n\t\"./v4/self-service/MR.json\": 65562,\n\t\"./v4/self-service/MS.json\": 17259,\n\t\"./v4/self-service/MT.json\": 34574,\n\t\"./v4/self-service/MU.json\": 45478,\n\t\"./v4/self-service/MV.json\": 8282,\n\t\"./v4/self-service/MW.json\": 30743,\n\t\"./v4/self-service/MX.json\": 38840,\n\t\"./v4/self-service/MY.json\": 83717,\n\t\"./v4/self-service/MZ.json\": 26226,\n\t\"./v4/self-service/NA.json\": 62879,\n\t\"./v4/self-service/NC.json\": 34737,\n\t\"./v4/self-service/NE.json\": 93390,\n\t\"./v4/self-service/NF.json\": 53862,\n\t\"./v4/self-service/NG.json\": 49288,\n\t\"./v4/self-service/NI.json\": 23358,\n\t\"./v4/self-service/NL.json\": 94768,\n\t\"./v4/self-service/NO.json\": 19813,\n\t\"./v4/self-service/NP.json\": 8173,\n\t\"./v4/self-service/NR.json\": 66534,\n\t\"./v4/self-service/NU.json\": 88542,\n\t\"./v4/self-service/NZ.json\": 6261,\n\t\"./v4/self-service/OM.json\": 98963,\n\t\"./v4/self-service/PA.json\": 61672,\n\t\"./v4/self-service/PE.json\": 9201,\n\t\"./v4/self-service/PF.json\": 10331,\n\t\"./v4/self-service/PG.json\": 15459,\n\t\"./v4/self-service/PH.json\": 43096,\n\t\"./v4/self-service/PK.json\": 10357,\n\t\"./v4/self-service/PL.json\": 2792,\n\t\"./v4/self-service/PM.json\": 69499,\n\t\"./v4/self-service/PN.json\": 57698,\n\t\"./v4/self-service/PR.json\": 75367,\n\t\"./v4/self-service/PS.json\": 76222,\n\t\"./v4/self-service/PT.json\": 34304,\n\t\"./v4/self-service/PW.json\": 89093,\n\t\"./v4/self-service/PY.json\": 97825,\n\t\"./v4/self-service/QA.json\": 43977,\n\t\"./v4/self-service/RE.json\": 35188,\n\t\"./v4/self-service/RO.json\": 93216,\n\t\"./v4/self-service/RS.json\": 18849,\n\t\"./v4/self-service/RU.json\": 4256,\n\t\"./v4/self-service/RW.json\": 29453,\n\t\"./v4/self-service/SA.json\": 95189,\n\t\"./v4/self-service/SB.json\": 22890,\n\t\"./v4/self-service/SC.json\": 67259,\n\t\"./v4/self-service/SD.json\": 23126,\n\t\"./v4/self-service/SE.json\": 86543,\n\t\"./v4/self-service/SG.json\": 68196,\n\t\"./v4/self-service/SH.json\": 48642,\n\t\"./v4/self-service/SI.json\": 71269,\n\t\"./v4/self-service/SJ.json\": 65278,\n\t\"./v4/self-service/SK.json\": 47297,\n\t\"./v4/self-service/SL.json\": 47238,\n\t\"./v4/self-service/SM.json\": 55022,\n\t\"./v4/self-service/SN.json\": 11478,\n\t\"./v4/self-service/SO.json\": 18369,\n\t\"./v4/self-service/SR.json\": 11365,\n\t\"./v4/self-service/SS.json\": 91564,\n\t\"./v4/self-service/ST.json\": 8062,\n\t\"./v4/self-service/SV.json\": 71779,\n\t\"./v4/self-service/SX.json\": 73264,\n\t\"./v4/self-service/SZ.json\": 67493,\n\t\"./v4/self-service/TC.json\": 51074,\n\t\"./v4/self-service/TD.json\": 19444,\n\t\"./v4/self-service/TF.json\": 51017,\n\t\"./v4/self-service/TG.json\": 24807,\n\t\"./v4/self-service/TH.json\": 89455,\n\t\"./v4/self-service/TJ.json\": 58194,\n\t\"./v4/self-service/TK.json\": 78729,\n\t\"./v4/self-service/TL.json\": 92451,\n\t\"./v4/self-service/TM.json\": 6809,\n\t\"./v4/self-service/TN.json\": 13275,\n\t\"./v4/self-service/TO.json\": 45692,\n\t\"./v4/self-service/TR.json\": 64727,\n\t\"./v4/self-service/TT.json\": 69747,\n\t\"./v4/self-service/TV.json\": 30394,\n\t\"./v4/self-service/TW.json\": 1295,\n\t\"./v4/self-service/TZ.json\": 95471,\n\t\"./v4/self-service/UA.json\": 48894,\n\t\"./v4/self-service/UG.json\": 60823,\n\t\"./v4/self-service/UK.json\": 9261,\n\t\"./v4/self-service/UM.json\": 99745,\n\t\"./v4/self-service/US.json\": 15468,\n\t\"./v4/self-service/UY.json\": 86710,\n\t\"./v4/self-service/UZ.json\": 28988,\n\t\"./v4/self-service/VA.json\": 5814,\n\t\"./v4/self-service/VC.json\": 54973,\n\t\"./v4/self-service/VE.json\": 3848,\n\t\"./v4/self-service/VG.json\": 86415,\n\t\"./v4/self-service/VI.json\": 58150,\n\t\"./v4/self-service/VN.json\": 78545,\n\t\"./v4/self-service/VU.json\": 32186,\n\t\"./v4/self-service/WF.json\": 43159,\n\t\"./v4/self-service/WS.json\": 23154,\n\t\"./v4/self-service/YE.json\": 55790,\n\t\"./v4/self-service/YT.json\": 94872,\n\t\"./v4/self-service/ZA.json\": 89279,\n\t\"./v4/self-service/ZM.json\": 80927,\n\t\"./v4/self-service/ZW.json\": 5210,\n\t\"./v4/self-service/country-business-rules.schema.json\": 61088\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 62830;"],"x_google_ignoreList":[321]}